Page MenuHomeFreeBSD

alc (Alan Cox)
User

Projects

User Details

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

Recent Activity

Yesterday

alc added a comment to D50333: vm_phys: Ensure that pages are removed from pagequeues before freeing.

I think that there is another edge case that isn't being handled. Similar to my comment about the vm_page_dequeue after vm_reserv_alloc_page, suppose that a page is allocated from a reservation via vm_page_alloc(), validated, mapped, added to a paging queue, and then later freed back to the reservation. Now, suppose that the reservation is broken and the recently-freed page is passed to the buddy allocator. The lazy dequeue may not have completed yet. I think that reservation breaking will need to perform the vm_page_dequeue on each of the pages being passed to the buddy allocator.

Fri, May 23, 6:49 AM

Sun, May 18

alc accepted D50392: vm_page: reset iterator after domainset drops lock.
Sun, May 18, 5:09 PM

Sat, May 17

alc accepted D50389: pctrie: use popmap in locked lookup_range.
Sat, May 17, 10:00 PM

Fri, May 16

alc accepted D50263: vm_page: cleanup.
Fri, May 16, 7:32 AM

Tue, May 13

alc added inline comments to D50310: vfs: vntblinit(): Rework comments on the computation of 'kern.maxvnodes'.
Tue, May 13, 5:11 PM
alc added inline comments to D50310: vfs: vntblinit(): Rework comments on the computation of 'kern.maxvnodes'.
Tue, May 13, 4:45 PM

Mon, May 12

alc accepted D50249: vm_page: reorder declarations in header file.
Mon, May 12, 6:47 PM

Thu, May 8

alc added inline comments to D50253: vm_page_grab_pages: fetch page ranges.
Thu, May 8, 10:35 PM
alc added inline comments to D50253: vm_page_grab_pages: fetch page ranges.
Thu, May 8, 9:49 PM
alc added inline comments to D50253: vm_page_grab_pages: fetch page ranges.
Thu, May 8, 9:30 PM
alc added inline comments to D50253: vm_page_grab_pages: fetch page ranges.
Thu, May 8, 9:28 PM

Wed, May 7

alc accepted D50199: vm_page: drop mpred param from insert_lookup.
Wed, May 7, 9:37 PM
alc added inline comments to D50199: vm_page: drop mpred param from insert_lookup.
Wed, May 7, 3:47 PM

Mon, May 5

alc accepted D48007: vm_object: drop memq field.
Mon, May 5, 10:50 PM
alc added inline comments to D48007: vm_object: drop memq field.
Mon, May 5, 10:50 PM

Thu, May 1

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

Apr 24 2025

alc accepted D49987: vm_map: fix iterator jump size.
Apr 24 2025, 7:52 AM
alc added inline comments to D49987: vm_map: fix iterator jump size.
Apr 24 2025, 7:08 AM
alc accepted D49987: vm_map: fix iterator jump size.
Apr 24 2025, 6:57 AM

Apr 9 2025

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.

Apr 9 2025, 6:49 PM

Apr 5 2025

alc accepted D49675: vm_object: Make a comment more clear.
Apr 5 2025, 7:10 PM
alc added inline comments to D49675: vm_object: Make a comment more clear.
Apr 5 2025, 6:48 PM
alc added inline comments to D49443: vm_object: Fix handling of wired map entries in vm_object_split().
Apr 5 2025, 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