Page MenuHomeFreeBSD

vm_object: iterate to add pages in reconstruction
Needs ReviewPublic

Authored by dougm on Nov 21 2024, 8:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 10, 2:41 PM
Unknown Object (File)
Thu, Jan 2, 6:23 AM
Unknown Object (File)
Fri, Dec 27, 9:56 AM
Unknown Object (File)
Fri, Dec 27, 5:20 AM
Unknown Object (File)
Fri, Dec 27, 3:05 AM
Unknown Object (File)
Dec 26 2024, 2:29 PM
Unknown Object (File)
Dec 26 2024, 11:34 AM
Unknown Object (File)
Nov 30 2024, 8:05 PM
Subscribers

Details

Reviewers
markj
alc
Summary

Where vm_page_rename(), vm_object_collapse_scan(), and
vm_object_split() move pages from a source object to a destination,
use an iterator to add to the destination, as we already use an
iterator to remove from the source.

Also, remove a leftover, purposeless assignment.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dougm requested review of this revision.Nov 21 2024, 8:39 AM
dougm created this revision.
dougm edited the summary of this revision. (Show Details)
dougm added a subscriber: kib.

Drop the fix that @kib has committed separately.

sys/vm/vm_page.c
2105

Shouldn't this result in a panic? A caller renaming a page over an existing page in the new object would be a bug.

sys/vm/vm_page.h
687–688

The parameter names don't match those in the function definition.

dougm marked 2 inline comments as done.

Add a panic when a page duplication is found. Match param names between definition and declaration.

Rebase, assuming this will be applied after D47829.

This change increased the cycles spent in both vm_object_split() and vm_object_collapse_scan() during a buildworld. It appears that we're not moving enough pages to overcome the startup costs of the iterator.