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)
Mon, Dec 1, 8:46 AM
Unknown Object (File)
Sun, Nov 30, 8:42 AM
Unknown Object (File)
Sat, Nov 29, 11:53 PM
Unknown Object (File)
Thu, Nov 27, 11:43 PM
Unknown Object (File)
Thu, Nov 27, 1:34 AM
Unknown Object (File)
Sat, Nov 22, 2:52 PM
Unknown Object (File)
Thu, Nov 13, 6:41 PM
Unknown Object (File)
Nov 9 2025, 1:15 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.