Page MenuHomeFreeBSD

Fix VPO_UNMANAGED handling in vm_page_reclaim_run().
ClosedPublic

Authored by markj on Dec 18 2019, 6:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 16, 3:40 AM
Unknown Object (File)
Fri, Mar 14, 2:34 PM
Unknown Object (File)
Thu, Mar 13, 12:12 AM
Unknown Object (File)
Wed, Mar 12, 10:16 AM
Unknown Object (File)
Wed, Mar 12, 6:12 AM
Unknown Object (File)
Mar 9 2025, 2:18 PM
Unknown Object (File)
Jan 31 2025, 8:24 AM
Unknown Object (File)
Jan 30 2025, 1:20 AM
Subscribers

Details

Summary

When we allocate a replacement page we must clear VPO_UNMANAGED, since
we only ever reclaim pages from managed objects. vm_page_replace() does
not handle this for us.

Sprinkle some assertions to help catch this sort of issue.

Test Plan

Peter is testing this.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj added reviewers: alc, kib, dougm, jeff.
kib added inline comments.
sys/vm/vm_page.c
3676 ↗(On Diff #65786)

I think this assert is not useful, it is tautologically repeats the condition that resulted in this branch.

3680 ↗(On Diff #65786)

same

This revision is now accepted and ready to land.Dec 18 2019, 9:26 PM
sys/vm/vm_page.c
3676 ↗(On Diff #65786)

Ugh, for some reason I read the condition as (m->object->flags & OBJ_UNMANAGED) == 0.

Add a non-tautological assertion to vm_page_free_prep().

This revision now requires review to proceed.Dec 18 2019, 9:38 PM
This revision is now accepted and ready to land.Dec 18 2019, 9:46 PM