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)
Sun, Jul 27, 1:36 AM
Unknown Object (File)
Thu, Jul 24, 1:37 PM
Unknown Object (File)
Mon, Jul 21, 2:07 PM
Unknown Object (File)
Mon, Jul 21, 1:40 PM
Unknown Object (File)
Mon, Jul 21, 2:46 AM
Unknown Object (File)
Sun, Jul 20, 2:06 PM
Unknown Object (File)
Thu, Jul 17, 4:34 AM
Unknown Object (File)
Sun, Jul 13, 8:38 AM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
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
2108

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.

dougm removed reviewers: markj, alc.

Rebase. Testing shows this degrades performance, still, so dropping reviewers.