Page MenuHomeFreeBSD

alc (Alan Cox)
User

Projects

User Details

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

Recent Activity

Mon, Dec 9

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

Sun, Dec 8

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

Sat, Dec 7

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.

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

Shouldn't this be abandoned?

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

Fri, Dec 6

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

Thu, Dec 5

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

Sat, Nov 30

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

Fri, Nov 29

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

Update in response to reviewer comments.

Fri, Nov 29, 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?

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

Update in response to reviewer comments.

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

Thu, Nov 28

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

Wed, Nov 27

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

Mon, Nov 25

alc accepted D47727: vm_page: pass page to iter_free.
Mon, Nov 25, 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.

Mon, Nov 25, 6:59 AM

Sun, Nov 24

alc added inline comments to D47727: vm_page: pass page to iter_free.
Sun, Nov 24, 11:22 PM
alc accepted D47717: Tweaks for pmap_qremove() and transient mappings.
Sun, Nov 24, 11:18 PM
alc requested review of D47729: vm: Retire an unused declaration.
Sun, Nov 24, 9:29 PM
alc added inline comments to D47727: vm_page: pass page to iter_free.
Sun, Nov 24, 8:39 PM
alc added inline comments to D47680: subr_pctrie: straightline climbing.
Sun, Nov 24, 6:36 PM
alc added inline comments to D46724: vm_object: use pciters to remove pages.
Sun, Nov 24, 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.

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

Sat, Nov 23

alc added inline comments to D47678: arm64: Implement pmap_map_io_transient.
Sat, Nov 23, 7:06 PM
alc added inline comments to D47678: arm64: Implement pmap_map_io_transient.
Sat, Nov 23, 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

Oct 5 2024

alc added inline comments to D46848: swap_pager: use swblk iterators in swp_pager_meta_build.
Oct 5 2024, 8:13 PM
alc added inline comments to D46848: swap_pager: use swblk iterators in swp_pager_meta_build.
Oct 5 2024, 5:22 PM

Oct 4 2024

alc added inline comments to D46848: swap_pager: use swblk iterators in swp_pager_meta_build.
Oct 4 2024, 3:59 PM
alc accepted D46943: vm_page: Use atomic loads for cmpset loops.
Oct 4 2024, 3:39 PM
alc accepted D46879: tmpfs: check residence in data_locked.
Oct 4 2024, 7:22 AM
alc accepted D46879: tmpfs: check residence in data_locked.
Oct 4 2024, 6:19 AM

Oct 3 2024

alc accepted D46885: vm_kern: Use VM_ALLOC_NOFREE when allocating 'zero_region' page.
Oct 3 2024, 3:24 PM

Sep 29 2024

alc accepted D46620: swap_pager: use pctrie iterators.
Sep 29 2024, 4:27 PM
alc added inline comments to D46620: swap_pager: use pctrie iterators.
Sep 29 2024, 8:06 AM
alc accepted D46620: swap_pager: use pctrie iterators.
Sep 29 2024, 7:56 AM
alc added a comment to D46620: swap_pager: use pctrie iterators.

With this patch:
{F96917947}
I compared the cycles consumed freeing 1000000 pages without and with this patch. The results from ministat:

x old
+ new
+------------------------------------------------------------------------------+
|    +   ++ +++ ++   ++ +                              x x x  x x  x x x   x  +|
||_____________M____A__________________|                  |_____A_____|        |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  12      11315490      11602387      11444362      11447090     88533.923
+  12      10575194      11651487      10713880      10792243     283272.81
Difference at 95.0% confidence
        -654847 +/- 177689
        -5.72064% +/- 1.54457%
        (Student's t, pooled s = 209859)
Sep 29 2024, 7:53 AM
alc added inline comments to D46620: swap_pager: use pctrie iterators.
Sep 29 2024, 6:59 AM

Sep 24 2024

alc accepted D46620: swap_pager: use pctrie iterators.

I don't see any correctness problems.

Sep 24 2024, 5:46 PM

Sep 23 2024

alc accepted D46754: swap_pager: update meta_free comment.
Sep 23 2024, 6:22 PM
alc added a comment to D46753: swap_pager: deoptimize swapoff_object.

No, this is not what @markj meant.

Sep 23 2024, 1:46 AM

Sep 22 2024

alc added inline comments to D46620: swap_pager: use pctrie iterators.
Sep 22 2024, 5:29 PM

Sep 20 2024

alc added inline comments to D46686: jemalloc: set LG_VADDR to 64 on amd64.
Sep 20 2024, 4:30 AM

Sep 19 2024

alc accepted D46699: vm: Use VM_ALLOC_NOFREE when allocating bogus_page.
Sep 19 2024, 3:45 PM

Sep 16 2024

alc accepted D46682: swap_pager: enhance meta_transfer comments.
Sep 16 2024, 5:29 AM

Sep 15 2024

alc added a comment to D45409: vm_phys: reduce touching of page->pool fields.

This is much better.

Sep 15 2024, 6:10 PM
alc added inline comments to D46619: RLIMIT_PIPE.
Sep 15 2024, 6:03 PM
alc accepted D46624: arm64: Support mapping a 52-bit physical adddress.
Sep 15 2024, 5:56 PM
alc added inline comments to D46629: swap_pager: handle swblk being freed while lock dropped in meta_transfer .
Sep 15 2024, 5:39 PM
alc accepted D46678: vm_map: add vm_map_find_locked(9).

Just out of curiosity, is this a first step in a larger set of changes?

Sep 15 2024, 5:31 PM
alc accepted D46629: swap_pager: handle swblk being freed while lock dropped in meta_transfer .
Sep 15 2024, 5:53 AM

Sep 14 2024

alc added inline comments to D46629: swap_pager: handle swblk being freed while lock dropped in meta_transfer .
Sep 14 2024, 5:49 PM

Sep 10 2024

alc accepted D46395: arm64: Make L1_BLOCKS_SUPPORTED dynamic.
Sep 10 2024, 6:39 PM