Page MenuHomeFreeBSD

Fix some issues in vm_pqbatch_process_page().
ClosedPublic

Authored by markj on Aug 22 2019, 6:48 PM.
Tags
None
Referenced Files
F129316060: D21368.id61172.diff
Fri, Sep 19, 4:07 PM
Unknown Object (File)
Sun, Sep 14, 5:00 AM
Unknown Object (File)
Sat, Sep 13, 12:01 PM
Unknown Object (File)
Mon, Sep 8, 4:18 AM
Unknown Object (File)
Fri, Sep 5, 6:13 PM
Unknown Object (File)
Thu, Sep 4, 5:57 PM
Unknown Object (File)
Tue, Sep 2, 11:42 AM
Unknown Object (File)
Jul 6 2025, 9:53 PM
Subscribers

Details

Summary

Don't bother masking off the non-queue state bits. It is not necessary
in non-INVARIANTS kernels, so just perform the mask in the assertions
instead.

Remove a comment about the order in which we set and clear flags. It
applies to an earlier version of the batched processing that I did, but
now it is only ever safe to test for or toggle PGA_ENQUEUED with the
page queue lock held.

Avoid unconditionally clearing both PGA_REQUEUE and PGA_REQUEUE_HEAD.
It is possible that another thread is concurrently setting
PGA_REQUEUE_HEAD and submitting a batch entry while
vm_pqbatch_process_page() is applying PGA_REQUEUE.

Test Plan

Peter is testing the patch.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26017
Build 24564: arc lint + arc unit

Event Timeline

markj added reviewers: kib, alc, dougm.
kib added inline comments.
sys/vm/vm_page.c
3088

() around '&' are excessive. May be print raw qflags value instead, just in case.

This revision is now accepted and ready to land.Aug 22 2019, 7:12 PM
sys/vm/vm_page.c
3088

I will fix it before committing.

sys/vm/vm_page.c
3109–3110

In effect, PGA_REQUEUE_HEAD takes precedence over PGA_REQUEUE. I would suggest adding a comment to that effect.

markj marked 2 inline comments as done.

Address feedback.

This revision now requires review to proceed.Aug 23 2019, 4:40 PM
This revision was not accepted when it landed; it landed in state Needs Review.Aug 26 2019, 8:20 PM
This revision was automatically updated to reflect the committed changes.