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)
Sat, Dec 21, 7:56 AM
Unknown Object (File)
Nov 26 2024, 3:35 PM
Unknown Object (File)
Nov 17 2024, 10:25 PM
Unknown Object (File)
Oct 3 2024, 12:47 AM
Unknown Object (File)
Sep 27 2024, 5:57 AM
Unknown Object (File)
Sep 27 2024, 5:51 AM
Unknown Object (File)
Sep 21 2024, 4:02 PM
Unknown Object (File)
Sep 21 2024, 4:02 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