Page MenuHomeFreeBSD

vm_page: pass page to iter_free
ClosedPublic

Authored by dougm on Nov 24 2024, 8:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 6, 3:29 AM
Unknown Object (File)
Fri, Jun 5, 11:47 PM
Unknown Object (File)
Fri, Jun 5, 11:15 PM
Unknown Object (File)
Fri, Jun 5, 8:57 PM
Unknown Object (File)
Thu, Jun 4, 6:02 AM
Unknown Object (File)
Thu, May 14, 3:31 PM
Unknown Object (File)
Apr 26 2026, 5:13 AM
Unknown Object (File)
Apr 21 2026, 8:12 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.