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)
Fri, Apr 3, 6:29 PM
Unknown Object (File)
Thu, Apr 2, 11:50 AM
Unknown Object (File)
Sun, Mar 22, 10:01 PM
Unknown Object (File)
Sun, Mar 22, 10:00 PM
Unknown Object (File)
Mon, Mar 16, 10:40 PM
Unknown Object (File)
Mon, Mar 16, 10:30 PM
Unknown Object (File)
Sun, Mar 15, 9:44 AM
Unknown Object (File)
Mar 2 2026, 6:06 PM
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