Page MenuHomeFreeBSD

Handle wired pages on pager error.
ClosedPublic

Authored by kib on Oct 8 2016, 5:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 29, 6:59 PM
Unknown Object (File)
Feb 22 2024, 9:59 AM
Unknown Object (File)
Feb 7 2024, 11:16 PM
Unknown Object (File)
Dec 27 2023, 5:37 PM
Unknown Object (File)
Dec 27 2023, 5:10 PM
Unknown Object (File)
Dec 20 2023, 2:33 AM
Unknown Object (File)
Oct 23 2023, 1:47 AM
Unknown Object (File)
Oct 6 2023, 1:17 AM
Subscribers

Details

Summary

If vm_fault_hold(9) finds wired page after the pager error, do not free it, leave the page to the wire owner. E.g. the page might be a part of the invalidated buffer.

Diff Detail

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

Event Timeline

kib retitled this revision from to Handle wired pages on pager error..
kib updated this object.
kib edited the test plan for this revision. (Show Details)
kib added reviewers: alc, markj.
kib set the repository for this revision to rS FreeBSD src repository - subversion.
sys/vm/vm_fault.c
722 ↗(On Diff #21185)

Normally, we would only access the page's wire count with the page lock held. Is there a reason why we can safely access the page's wire count here without holding the page lock?

746 ↗(On Diff #21185)

Ditto.

You are right.

In my case, the race was impossible because this situation (VM_PAGER_BAD) was only observed for the FFS pager, and one wired reference was from the buffer, which explains why the race which you noted did not realized in the tests.

Check wired_count under the page lock.

markj edited edge metadata.
markj added inline comments.
sys/vm/vm_fault.c
724 ↗(On Diff #21185)

Do you need to recheck wire_count after acquiring the page lock?

This revision is now accepted and ready to land.Oct 10 2016, 5:36 PM

Sorry, ignore the inline comment.

alc edited edge metadata.
This revision was automatically updated to reflect the committed changes.