Page MenuHomeFreeBSD

alc (Alan Cox)
User

Projects

User Details

User Since
Dec 14 2014, 5:52 AM (541 w, 5 d)

Recent Activity

Yesterday

alc accepted D50094: uma_core: replace listq with plinks.q in temp lists.

The key here is that all page allocation functions call vm_page_dequeue(), completing any lingering page queue operations that involve the plinks.q field.

Thu, May 1, 6:37 AM

Wed, Apr 30

alc added a comment to D50088: pctrie: add a locked pctrie_lookup_range.

Are you going to update the patch to include vm_page_grab_pages()?

Wed, Apr 30, 5:14 PM

Tue, Apr 29

alc accepted D42732: arm64: Use the DMAP region in pmap_mapbios.
Tue, Apr 29, 6:29 AM
alc accepted D47114: vm_grab_pages_unlocked: read all the pages at once.
Tue, Apr 29, 6:16 AM

Mon, Apr 28

alc added inline comments to D47114: vm_grab_pages_unlocked: read all the pages at once.
Mon, Apr 28, 5:37 PM

Sat, Apr 26

alc added a comment to D49391: vm_grab: assert no VM_ALLOC_WAITFAIL.

Aren't all of the changes to vm_page.h valid? Can we have a standalone patch with just those changes?

Sat, Apr 26, 8:15 PM
alc added inline comments to D49917: agp: use iterators to speed up lookups.
Sat, Apr 26, 7:25 PM
alc accepted D50012: vm_fault: use iterators in dontneed().
Sat, Apr 26, 5:13 PM
alc accepted D50042: vm_page: drop find_least.
Sat, Apr 26, 4:59 AM

Fri, Apr 25

alc added a comment to D49957: vm_fault: reset iterator after vm_fault_populate().
In D49957#1140976, @alc wrote:

Now that iterators are much smaller, consisting of only four 64-bit fields, I think we should seriously consider embedding an iterator in the vm_object for use by operations that require a write lock on the object. If that iterator is used by the functions that insert and remove pages from the trie, then it will always be consistent, and most of the pctrie_iter_reset()s can be eliminated. With the removal of the memq from the object, this would only grow the size of the vm_object by 2 64-bit fields. (If there was some way to avoid having both the root of the pctrie and the iterator's pointer to that root within the vm_object, then the size of the vm_object would only grow by 1 64-bit field.)

The operations, like vm_map_pmap_enter(), that utilize a read lock will still need to define and use their own private iterator.

That all said, I think that we should complete the removal of the memq, and then consider embedding an iterator in the object.

Fri, Apr 25, 8:18 PM
alc added a comment to D49957: vm_fault: reset iterator after vm_fault_populate().

Now that iterators are much smaller, consisting of only four 64-bit fields, I think we should seriously consider embedding an iterator in the vm_object for use by operations that require a write lock on the object. If that iterator is used by the functions that insert and remove pages from the trie, then it will always be consistent, and most of the pctrie_iter_reset()s can be eliminated. With the removal of the memq from the object, this would only grow the size of the vm_object by 2 64-bit fields. (If there was some way to avoid having both the root of the pctrie and the iterator's pointer to that root within the vm_object, then the size of the vm_object would only grow by 1 64-bit field.)

Fri, Apr 25, 8:12 PM
alc accepted D50010: vm_fault: use iterator in populate().
Fri, Apr 25, 6:57 AM
alc added inline comments to D49957: vm_fault: reset iterator after vm_fault_populate().
Fri, Apr 25, 6:44 AM

Thu, Apr 24

alc added inline comments to D49938: vm_object: use iterator in populate().
Thu, Apr 24, 8:15 PM
alc accepted D49987: vm_map: fix iterator jump size.
Thu, Apr 24, 7:52 AM
alc added inline comments to D49987: vm_map: fix iterator jump size.
Thu, Apr 24, 7:08 AM
alc accepted D49987: vm_map: fix iterator jump size.
Thu, Apr 24, 6:57 AM

Wed, Apr 9

alc added a comment to D49688: vm_page: uses iterators in page allocaction.

The performance results in the TEST PLAN are much improved over what I was seeing last fall for a similar set of changes, in particular, the results for vm_page_alloc(). Clearly, the improvements to the implementation of iterators in the last few months, particularly I suspect the elimination of the rather large array on the stack, have made a difference. Modulo any low-level changes/fixes to this patch that are needed, I would be very happy to see it committed. This is really the most critical step in my mind to the elimination of the two linked list pointers from struct vm_page, which I hope will yield a small but measurable performance improvement, particularly for pages allocated from superpage reservations.

Wed, Apr 9, 6:49 PM

Sat, Apr 5

alc accepted D49675: vm_object: Make a comment more clear.
Sat, Apr 5, 7:10 PM
alc added inline comments to D49675: vm_object: Make a comment more clear.
Sat, Apr 5, 6:48 PM
alc added inline comments to D49443: vm_object: Fix handling of wired map entries in vm_object_split().
Sat, Apr 5, 6:07 PM

Mar 24 2025

alc accepted D49415: vm_reserv: clarify reserv_from_object.
Mar 24 2025, 2:42 AM

Mar 17 2025

alc added inline comments to D49391: vm_grab: assert no VM_ALLOC_WAITFAIL.
Mar 17 2025, 7:45 PM
alc added inline comments to D49391: vm_grab: assert no VM_ALLOC_WAITFAIL.
Mar 17 2025, 7:42 PM
alc added a comment to D49391: vm_grab: assert no VM_ALLOC_WAITFAIL.
In D49391#1126158, @alc wrote:

The vm_page.h comment incorrectly says vm_page_alloc accepts VM_ALLOC_WAITOK.

Mar 17 2025, 7:05 AM
alc added a comment to D49391: vm_grab: assert no VM_ALLOC_WAITFAIL.

The vm_page.h comment incorrectly says vm_page_alloc accepts VM_ALLOC_WAITOK.

Mar 17 2025, 6:48 AM
alc added inline comments to D49391: vm_grab: assert no VM_ALLOC_WAITFAIL.
Mar 17 2025, 6:12 AM

Mar 14 2025

alc accepted D49224: vm_object: add getpages utility.
Mar 14 2025, 11:58 PM
alc added inline comments to D49224: vm_object: add getpages utility.
Mar 14 2025, 5:53 PM
alc accepted D49224: vm_object: add getpages utility.
Mar 14 2025, 6:22 AM

Mar 12 2025

alc added inline comments to D49224: vm_object: add getpages utility.
Mar 12 2025, 6:52 PM
alc added inline comments to D49224: vm_object: add getpages utility.
Mar 12 2025, 6:35 PM

Mar 10 2025

alc added inline comments to D49224: vm_object: add getpages utility.
Mar 10 2025, 1:00 AM

Mar 8 2025

alc added inline comments to D49224: vm_object: add getpages utility.
Mar 8 2025, 9:33 PM
alc added inline comments to D49224: vm_object: add getpages utility.
Mar 8 2025, 9:33 PM

Feb 28 2025

alc accepted D49154: arm64: Clean up enabling in-kernel BTI.
Feb 28 2025, 7:47 AM

Feb 27 2025

alc accepted D49103: vm_page: expose page_alloc_after.
Feb 27 2025, 7:29 AM

Feb 22 2025

alc added inline comments to D49103: vm_page: expose page_alloc_after.
Feb 22 2025, 10:01 PM
alc added inline comments to D49096: vm_page: define partial page invalidate.
Feb 22 2025, 8:53 PM
alc added inline comments to D49103: vm_page: expose page_alloc_after.
Feb 22 2025, 6:52 PM

Feb 16 2025

alc accepted D49015: pctrie: move iter_remove check from panic to KASSERT.
Feb 16 2025, 7:03 PM

Feb 15 2025

alc added inline comments to D49015: pctrie: move iter_remove check from panic to KASSERT.
Feb 15 2025, 6:10 PM
alc added inline comments to D49017: vm_object: drop pointless assignment.
Feb 15 2025, 5:57 PM
alc accepted D49017: vm_object: drop pointless assignment.
Feb 15 2025, 5:53 PM

Dec 9 2024

alc accepted D48002: buf_ring: Remove an unneeded barrier.
Dec 9 2024, 5:23 PM

Dec 8 2024

alc accepted D47730: vm_page: pass page to iter_remove.
Dec 8 2024, 8:00 PM
alc accepted D47934: vm_map: overlap system map mutex and user man sx.
Dec 8 2024, 9:06 AM

Dec 7 2024

alc added a comment to D47695: vm_object: iterate to add pages in reconstruction.

This change increased the cycles spent in both vm_object_split() and vm_object_collapse_scan() during a buildworld. It appears that we're not moving enough pages to overcome the startup costs of the iterator.

Dec 7 2024, 6:42 PM
alc added a comment to D47656: pctrie: avoid pointless null check in lookup.

Shouldn't this be abandoned?

Dec 7 2024, 6:36 PM
alc added inline comments to D47808: arm64: Move setting TCR_HD to C code.
Dec 7 2024, 6:20 PM
alc accepted D47808: arm64: Move setting TCR_HD to C code.
Dec 7 2024, 6:16 PM
alc added inline comments to D47934: vm_map: overlap system map mutex and user man sx.
Dec 7 2024, 6:11 PM

Dec 6 2024

alc accepted D47892: sys/vm: remove support for growing-up stacks.
Dec 6 2024, 7:08 AM

Dec 5 2024

alc added inline comments to D47892: sys/vm: remove support for growing-up stacks.
Dec 5 2024, 6:07 PM

Nov 30 2024

alc committed rGc296ac7e0f1c: vm: Optimize page rename (authored by alc).
vm: Optimize page rename
Nov 30 2024, 5:35 PM
alc closed D47829: vm: Micro-optimize page rename.
Nov 30 2024, 5:35 PM

Nov 29 2024

alc added inline comments to D47829: vm: Micro-optimize page rename.
Nov 29 2024, 6:53 PM
alc updated the diff for D47829: vm: Micro-optimize page rename.

Update in response to reviewer comments.

Nov 29 2024, 6:38 PM
alc added a comment to D47829: vm: Micro-optimize page rename.

Comments in vm_reserv.c need to be updated to reflect this change.

If you have measured the improvement, how big is it?

Nov 29 2024, 6:26 PM
alc updated the diff for D47829: vm: Micro-optimize page rename.

Update in response to reviewer comments.

Nov 29 2024, 5:58 PM
alc added inline comments to D47829: vm: Micro-optimize page rename.
Nov 29 2024, 5:54 PM

Nov 28 2024

alc added inline comments to D47808: arm64: Move setting TCR_HD to C code.
Nov 28 2024, 6:12 PM
alc added inline comments to D47678: arm64: Implement pmap_map_io_transient.
Nov 28 2024, 5:54 PM
alc requested review of D47829: vm: Micro-optimize page rename.
Nov 28 2024, 5:07 PM

Nov 27 2024

alc committed rGfd630ae93634: vm: Retire an unused declaration (authored by alc).
vm: Retire an unused declaration
Nov 27 2024, 8:23 AM
alc closed D47729: vm: Retire an unused declaration.
Nov 27 2024, 8:23 AM

Nov 25 2024

alc accepted D47727: vm_page: pass page to iter_free.
Nov 25 2024, 7:45 AM
alc added a comment to D47727: vm_page: pass page to iter_free.

Let's limit this change to vm_page_iter_free. It reduces the average cycles in _kmem_unback and vm_object_page_remove by 7% and 5.3%, respectively.

Nov 25 2024, 6:59 AM

Nov 24 2024

alc added inline comments to D47727: vm_page: pass page to iter_free.
Nov 24 2024, 11:22 PM
alc accepted D47717: Tweaks for pmap_qremove() and transient mappings.
Nov 24 2024, 11:18 PM
alc requested review of D47729: vm: Retire an unused declaration.
Nov 24 2024, 9:29 PM
alc added inline comments to D47727: vm_page: pass page to iter_free.
Nov 24 2024, 8:39 PM
alc added inline comments to D47680: subr_pctrie: straightline climbing.
Nov 24 2024, 6:36 PM
alc added inline comments to D46724: vm_object: use pciters to remove pages.
Nov 24 2024, 6:28 PM
alc added a comment to D47718: vm_map: replace list links with iterator.

By itself, this is going to be slower. This should be a part of a larger patch that removes the memq, so that we can evaluate whether the elimination of the memq makes up for the higher cost of the iterators.

Nov 24 2024, 9:33 AM
alc added inline comments to D46724: vm_object: use pciters to remove pages.
Nov 24 2024, 6:40 AM
alc added inline comments to D46724: vm_object: use pciters to remove pages.
Nov 24 2024, 5:11 AM

Nov 23 2024

alc added inline comments to D47678: arm64: Implement pmap_map_io_transient.
Nov 23 2024, 7:06 PM
alc added inline comments to D47678: arm64: Implement pmap_map_io_transient.
Nov 23 2024, 6:34 PM

Nov 20 2024

alc added inline comments to D47678: arm64: Implement pmap_map_io_transient.
Nov 20 2024, 8:22 AM
alc added inline comments to D47678: arm64: Implement pmap_map_io_transient.
Nov 20 2024, 7:40 AM
alc accepted D47678: arm64: Implement pmap_map_io_transient.
Nov 20 2024, 7:30 AM

Nov 17 2024

alc committed rG8c8d36b9d172: vm: static-ize vm_page_alloc_after() (authored by alc).
vm: static-ize vm_page_alloc_after()
Nov 17 2024, 6:20 PM
alc closed D47644: vm: static-ize vm_page_alloc_after().
Nov 17 2024, 6:20 PM
alc requested review of D47644: vm: static-ize vm_page_alloc_after().
Nov 17 2024, 4:53 AM

Nov 16 2024

alc added inline comments to D47181: vm_reserv: Introduce vm_reserv_populate_range.
Nov 16 2024, 11:01 PM
alc accepted D47036: vm_page: iterators in alloc_contig_domain.

Cycles to perform a 2MB aligned vm_page_alloc_contig() for shm_create_largepage() on a Ryzen 5900X:

x base
+ iter
+------------------------------------------------------------------------------+
|  +                                                             x             |
|  ++                                                            x             |
|  ++                                                           xx             |
| ++++        +                                                xxx xx         x|
||_MA___|                                                     |__MA____|       |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  10         16813         17866       16989.5       17074.6     294.94715
+  10         12691         13496         12759       12833.1     239.58643
Difference at 95.0% confidence
        -4241.5 +/- 252.466
        -24.841% +/- 1.2701%
        (Student's t, pooled s = 268.696)
Nov 16 2024, 7:05 PM

Nov 13 2024

alc accepted D47526: swap_pager: Ensure that swapoff puts swapped-in pages in page queues.
Nov 13 2024, 6:45 AM

Nov 12 2024

alc added a comment to D47526: swap_pager: Ensure that swapoff puts swapped-in pages in page queues.

Is this related to the KASSERT that was recently added to vm_object_terminate_single_page?

Nov 12 2024, 7:36 PM

Oct 30 2024

alc added a comment to D47046: vm_radix: Add iter lookup_le interface.

In D47036, I put it after vm_radix_iter_step, mostly because PCTRIE_ITER_LOOKUP_LE comes shortly after PCTRIE_ITER_STEP_GE in pctrie.h. 'step' and 'jump' are built on top of lookup_ge, so I kept them grouped with lookup_ge.

I had a comment, and there should be one here for consistency with all the other little functions in this file.

I agree that we should have a sensible order to things, and that we don't. I suggest non-iter before iter, then insert before lookup before remove before replace before disposal, then lookup == before lookup >= before lookup <=.

Oct 30 2024, 6:44 AM

Oct 27 2024

alc added a comment to D47046: vm_radix: Add iter lookup_le interface.

To be clear, there is no question that this function will get used, so adding it sooner, rather than later, would be okay with me.

Oct 27 2024, 8:47 PM
alc accepted D47046: vm_radix: Add iter lookup_le interface.

I'm looking at patches from both you and @dougm that define this function. However, each of you adds it in a different location within the file. :-)

Oct 27 2024, 8:44 PM
alc closed D47298: vm: Eliminate unnecessary lock asserts.
Oct 27 2024, 7:08 PM
alc committed rG2001bef84ba6: vm: Eliminate unnecessary lock asserts (authored by alc).
vm: Eliminate unnecessary lock asserts
Oct 27 2024, 7:07 PM
alc requested review of D47298: vm: Eliminate unnecessary lock asserts.
Oct 27 2024, 5:50 PM

Oct 26 2024

alc added a comment to D47036: vm_page: iterators in alloc_contig_domain.

Incorporating D47277 has increased the average number of cycles to perform vm_page_alloc() to 1325.

Oct 26 2024, 8:27 PM
alc added a comment to D47036: vm_page: iterators in alloc_contig_domain.

Incorporating D47277 yielded the lowest average cycles in vm_page_alloc_contig() that I've seen.

Oct 26 2024, 7:56 PM
alc added a comment to D47036: vm_page: iterators in alloc_contig_domain.

Switching from ..._lookup_le() to ..._lookup_lt() increased the average number of cycles in vm_page_alloc().

Oct 26 2024, 6:23 PM
alc added a comment to D47036: vm_page: iterators in alloc_contig_domain.

D47207 has reduced the average number of cycles to perform vm_page_alloc() from 1295 to 1265.

Oct 26 2024, 6:09 PM

Oct 19 2024

alc added inline comments to D47036: vm_page: iterators in alloc_contig_domain.
Oct 19 2024, 5:34 PM