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
Unknown Object (File)
Dec 23 2023, 9:00 AM
Unknown Object (File)
Dec 8 2023, 12:04 PM
Unknown Object (File)
Nov 8 2023, 4:21 PM
Unknown Object (File)
Nov 8 2023, 12:48 AM
Unknown Object (File)
Nov 7 2023, 11:36 AM
Unknown Object (File)
Nov 6 2023, 11:08 AM
Unknown Object (File)
Oct 6 2023, 11:44 PM
Unknown Object (File)
Oct 6 2023, 10:32 AM
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 26041
Build 24586: 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
3116–3118

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.