Page MenuHomeFreeBSD

vm_object: use iterator in populate()
ClosedPublic

Authored by dougm on Apr 21 2025, 3:23 AM.
Tags
None
Referenced Files
F137884603: D49938.diff
Wed, Nov 26, 9:01 PM
Unknown Object (File)
Tue, Nov 25, 4:33 PM
Unknown Object (File)
Fri, Nov 21, 7:51 PM
Unknown Object (File)
Fri, Nov 21, 7:50 PM
Unknown Object (File)
Fri, Nov 21, 7:49 PM
Unknown Object (File)
Fri, Nov 21, 7:44 PM
Unknown Object (File)
Fri, Nov 21, 7:43 PM
Unknown Object (File)
Fri, Nov 21, 7:34 PM
Subscribers

Details

Summary

Use an iterator instead of tailq pointers in vm_object_populate().

Diff Detail

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

Event Timeline

dougm requested review of this revision.Apr 21 2025, 3:23 AM
dougm created this revision.
sys/vm/vm_object.c
2156

I can't use VM_RADIX_FOREACH because when page[start] is NULL, the loop should end but VM_RADIX_FORALL would just start with the first page > start.

I can't use VM_RADIX_FORALL because the original code can skip gaps of null pages, and FORALL cannot.

sys/vm/vm_object.c
2156

Perhaps add this text to the commit message, if not as a comment into the code.

dougm added a reviewer: alc.

Use the same iterator for grabbing and for unbusying. Use VM_RADIX_FORALL with an upper bound.

sys/vm/vm_object.c
2155–2156
This revision is now accepted and ready to land.Apr 24 2025, 11:37 PM
This revision was automatically updated to reflect the committed changes.