Page MenuHomeFreeBSD

Start implementing queue state updates using fcmpset loops. [2/5]
ClosedPublic

Authored by markj on Dec 12 2019, 12:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 11, 6:20 AM
Unknown Object (File)
Sat, Oct 11, 6:20 AM
Unknown Object (File)
Fri, Oct 10, 11:06 PM
Unknown Object (File)
Sep 10 2025, 1:14 PM
Unknown Object (File)
Aug 26 2025, 11:24 PM
Unknown Object (File)
Aug 2 2025, 11:43 PM
Unknown Object (File)
Jul 29 2025, 9:16 PM
Unknown Object (File)
Jun 24 2025, 11:14 AM
Subscribers
None

Details

Reviewers
alc
kib
jeff
Summary

Introduce vm_page_pqstate_commit(), which is a generic function that
handles more cases than the specialized vm_page_pqstate_commit_*()
functions.

Implement vm_page_mvqueue() (the backend for vm_page_activate(),
vm_page_deactivate(), etc.), vm_page_unwire() and vm_page_release_toq()
using the new pqstate operations. Use vm_page_release_toq() as the
common back-end for vm_page_unwire() and vm_page_release(). This has
the side effect that vm_page_unwire() will leave the page in the active
queue if it is already there.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 28089
Build 26233: arc lint + arc unit

Event Timeline

sys/vm/vm_page.c
3892

As I mentioned elsewhere if there is no object ref and this is the last ref we will requeue the page before calling free below.

Really this should not requeue if old == 1 but only if WIRE_COUNT(old) == 1

Would like to see the last unwire requeue avoided but otherwise LGTM.

This revision is now accepted and ready to land.Dec 20 2019, 11:03 PM