Page MenuHomeFreeBSD

vm_object: use iterator in populate()
ClosedPublic

Authored by dougm on Mon, Apr 21, 3:23 AM.
Tags
None
Referenced Files
F115765836: D49938.id154252.diff
Mon, Apr 28, 8:47 AM
F115765469: D49938.id154239.diff
Mon, Apr 28, 8:43 AM
F115765441: D49938.id154241.diff
Mon, Apr 28, 8:42 AM
F115741362: D49938.diff
Sun, Apr 27, 11:53 PM
Unknown Object (File)
Fri, Apr 25, 1:04 PM
Unknown Object (File)
Fri, Apr 25, 12:47 PM
Unknown Object (File)
Fri, Apr 25, 11:52 AM
Unknown Object (File)
Fri, Apr 25, 11:24 AM
Subscribers

Details

Summary

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

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

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

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
2154

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
2153–2155
This revision is now accepted and ready to land.Thu, Apr 24, 11:37 PM
This revision was automatically updated to reflect the committed changes.