Page MenuHomeFreeBSD

alc (Alan Cox)
User

Projects

User Details

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

Recent Activity

Yesterday

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

Mon, Mar 24

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

Mon, Mar 17

alc added inline comments to D49391: vm_grab: assert no VM_ALLOC_WAITFAIL.
Mon, Mar 17, 7:45 PM
alc added inline comments to D49391: vm_grab: assert no VM_ALLOC_WAITFAIL.
Mon, Mar 17, 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.

Mon, Mar 17, 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.

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

Fri, Mar 14

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

Wed, Mar 12

alc added inline comments to D49224: vm_object: add getpages utility.
Wed, Mar 12, 6:52 PM
alc added inline comments to D49224: vm_object: add getpages utility.
Wed, Mar 12, 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

Oct 18 2024

alc added inline comments to D47181: vm_reserv: Introduce vm_reserv_populate_range.
Oct 18 2024, 10:32 PM

Oct 15 2024

alc added inline comments to D47048: vm_reserv: Introduce vm_reserv_alloc_npages.
Oct 15 2024, 8:41 PM

Oct 11 2024

alc accepted D47064: swap_pager: swapoff detecting object death.
Oct 11 2024, 5:42 PM
alc added inline comments to D47064: swap_pager: swapoff detecting object death.
Oct 11 2024, 4:48 PM

Oct 10 2024

alc accepted D47021: vm_radix: add iter insert and remove interfaces.
Oct 10 2024, 3:58 PM

Oct 9 2024

alc accepted D47018: shm_alloc(): cleanup.
Oct 9 2024, 8:10 AM

Oct 8 2024

alc added inline comments to D46895: pctrie: unlock writes without smr.
Oct 8 2024, 5:06 PM
alc added a comment to D46848: swap_pager: use swblk iterators in swp_pager_meta_build.

The test plan should say what the units are.

Oct 8 2024, 8:04 AM
alc accepted D46848: swap_pager: use swblk iterators in swp_pager_meta_build.
Oct 8 2024, 8:03 AM

Oct 7 2024

alc added inline comments to D46848: swap_pager: use swblk iterators in swp_pager_meta_build.
Oct 7 2024, 4:24 PM
alc accepted D46974: swap_pager: rename iter init functions.
Oct 7 2024, 4:05 PM
alc accepted D46978: vm_meter: Add counter for NOFREE pages.
Oct 7 2024, 3:49 PM
alc added a comment to D46848: swap_pager: use swblk iterators in swp_pager_meta_build.

Can you separate out the function renames, and commit that first.

Oct 7 2024, 8:08 AM
alc added a comment to D46945: vm_object: Assert that managed pages are on pagequeues when freeing.
In D46945#1070648, @kib wrote:
In D46945#1070436, @kib wrote:
In D46945#1070223, @kib wrote:

Consider vm_page_grab_valid(). It allocates a page, and tries to read the page' content from pager. If the pager failed, the page is freed. I do not believe that the freed invalid page is enqueued there.

But there the page is freed immediately, not during object teardown, where the assertion is added.

The situation where invalid page was left on the object queue was quite common until recently.

Sure, but even in that case the page must still be added to a page queue, otherwise it is leaked until the VM object is destroyed. The assertion is meant to catch exactly this kind of bug.

Yes and yes. But it happens (happen), and the assert is too late to catch the moment.

I do not object against this change, only pointing out my experience.

Oct 7 2024, 8:02 AM

Oct 6 2024

alc added inline comments to D46848: swap_pager: use swblk iterators in swp_pager_meta_build.
Oct 6 2024, 8:17 PM
alc accepted D46968: pctrie: don't assign to root.
Oct 6 2024, 8:07 PM
alc added a comment to D46895: pctrie: unlock writes without smr.

There are too many things going on here at once. Can you generate a simple patch that fixes the correctness bug that Mark pointed out.

Oct 6 2024, 7:40 PM