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
F163268314: D49874.diff
Tue, Jul 21, 2:47 PM
Unknown Object (File)
Jun 4 2026, 12:11 AM
Unknown Object (File)
May 26 2026, 11:13 AM
Unknown Object (File)
May 25 2026, 7:45 PM
Unknown Object (File)
May 25 2026, 9:06 AM
Unknown Object (File)
May 25 2026, 12:18 AM
Unknown Object (File)
May 21 2026, 7:19 PM
Unknown Object (File)
May 21 2026, 10:49 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