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
F137411541: D22868.id65786.diff
Sun, Nov 23, 5:12 AM
Unknown Object (File)
Thu, Nov 20, 11:59 PM
Unknown Object (File)
Thu, Nov 20, 11:58 PM
Unknown Object (File)
Thu, Nov 20, 11:54 PM
Unknown Object (File)
Thu, Nov 20, 11:53 PM
Unknown Object (File)
Thu, Nov 20, 11:48 PM
Unknown Object (File)
Thu, Nov 20, 12:55 PM
Unknown Object (File)
Wed, Nov 19, 4:11 PM
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