Page MenuHomeFreeBSD

vm_object: use iterators in page_collect_flush()
ClosedPublic

Authored by dougm on Apr 17 2025, 3:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 6 2025, 8:16 AM
Unknown Object (File)
Nov 5 2025, 8:56 PM
Unknown Object (File)
Nov 5 2025, 6:59 PM
Unknown Object (File)
Nov 5 2025, 5:20 PM
Unknown Object (File)
Nov 3 2025, 3:44 AM
Unknown Object (File)
Oct 14 2025, 12:51 AM
Unknown Object (File)
Sep 27 2025, 9:24 PM
Unknown Object (File)
Sep 26 2025, 6:43 AM
Subscribers

Details

Summary

Implement vm_object_page_collect_flush() using iterators instead of vm_page_next() and vm_page_prev().

Diff Detail

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

Event Timeline

dougm requested review of this revision.Apr 17 2025, 3:55 PM
dougm created this revision.
sys/vm/vm_object.c
1163

vm_pageout_flush() calls vm_pager_put_pages(), which implementations drop the object lock. Wouldn't this invalidate the iterator in the main loop in vm_object_page_clean(). In particular, the old 'goto rescan' condition is only sometimes to help.

Always reset the iterator after calling vm_object_page_collect_flush.

This revision is now accepted and ready to land.Apr 17 2025, 9:50 PM