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)
Dec 23 2023, 10:42 AM
Unknown Object (File)
Nov 1 2023, 6:34 PM
Unknown Object (File)
Sep 25 2023, 12:51 AM
Unknown Object (File)
Sep 25 2023, 12:51 AM
Unknown Object (File)
Sep 25 2023, 12:50 AM
Unknown Object (File)
Sep 25 2023, 12:49 AM
Unknown Object (File)
Sep 6 2023, 12:08 AM
Unknown Object (File)
May 23 2023, 2:32 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