Page MenuHomeFreeBSD

vm_page: pass page to iter_free
ClosedPublic

Authored by dougm on Nov 24 2024, 8:07 PM.
Tags
None
Referenced Files
F132238086: D47727.id146896.diff
Wed, Oct 15, 2:11 AM
Unknown Object (File)
Tue, Oct 7, 7:09 PM
Unknown Object (File)
Thu, Oct 2, 9:45 PM
Unknown Object (File)
Tue, Sep 23, 2:27 PM
Unknown Object (File)
Sep 13 2025, 9:10 AM
Unknown Object (File)
Sep 12 2025, 9:28 AM
Unknown Object (File)
Sep 11 2025, 7:27 AM
Unknown Object (File)
Sep 11 2025, 4:59 AM
Subscribers

Details

Summary

Pass the to-be-freed page to vm_page_iter_free as a parameter, rather than computing it from the iterator parameter, to improve performance.

Sort declarations of page_iter functions in vm_page.h.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dougm requested review of this revision.Nov 24 2024, 8:07 PM
dougm created this revision.
sys/vm/vm_page.h
604–605
656

Insert before this declaration; move vm_page_launder and vm_page_lookup down to restore sorting.

dougm marked 2 inline comments as done.
sys/vm/vm_page.c
1716–1717

This comment needs updating.

sys/vm/vm_page.h
655

This should be before _iter_init.

dougm edited the summary of this revision. (Show Details)

Pass the removed page to vm_page_iter_remove, and functions that use it. Update comments. Reorder declarations.

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.

dougm edited the summary of this revision. (Show Details)

Remove changes to vm_page_iter_remove.

This revision is now accepted and ready to land.Nov 25 2024, 7:45 AM
This revision was automatically updated to reflect the committed changes.