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)
Wed, Oct 22, 5:26 PM
Unknown Object (File)
Thu, Oct 9, 5:09 AM
Unknown Object (File)
Sat, Oct 4, 10:55 AM
Unknown Object (File)
Thu, Oct 2, 12:47 AM
Unknown Object (File)
Sep 15 2025, 10:18 AM
Unknown Object (File)
Sep 10 2025, 10:24 PM
Unknown Object (File)
Sep 10 2025, 10:11 PM
Unknown Object (File)
Sep 7 2025, 3:13 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.