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)
Fri, Aug 14, 11:14 AM
Unknown Object (File)
Wed, Aug 12, 11:40 AM
Unknown Object (File)
Wed, Aug 12, 9:07 AM
Unknown Object (File)
Mon, Aug 10, 7:11 PM
Unknown Object (File)
Sun, Aug 9, 10:53 PM
Unknown Object (File)
Sat, Aug 8, 9:09 PM
Unknown Object (File)
Sat, Aug 8, 4:34 PM
Unknown Object (File)
Sat, Aug 8, 1:49 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