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)
Mon, Jan 13, 12:57 AM
Unknown Object (File)
Sat, Jan 11, 6:57 AM
Unknown Object (File)
Nov 28 2024, 8:46 PM
Unknown Object (File)
Nov 25 2024, 3:00 PM
Unknown Object (File)
Nov 25 2024, 3:00 PM
Unknown Object (File)
Nov 25 2024, 3:00 PM
Unknown Object (File)
Nov 25 2024, 3:00 PM
Unknown Object (File)
Nov 25 2024, 3:00 PM
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.