Page MenuHomeFreeBSD

vm_page: pass page to iter_free
ClosedPublic

Authored by dougm on Nov 24 2024, 8:07 PM.
Tags
None
Referenced Files
F151711345: D47727.id146892.diff
Fri, Apr 10, 5:05 AM
F151674595: D47727.id146898.diff
Thu, Apr 9, 10:47 PM
Unknown Object (File)
Sun, Apr 5, 7:08 AM
Unknown Object (File)
Sun, Apr 5, 6:30 AM
Unknown Object (File)
Sat, Apr 4, 12:11 AM
Unknown Object (File)
Fri, Apr 3, 6:07 AM
Unknown Object (File)
Thu, Apr 2, 8:50 AM
Unknown Object (File)
Wed, Apr 1, 8:35 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.