Page MenuHomeFreeBSD

Add more counters to the page queue scans.
Needs ReviewPublic

Authored by markj on Feb 6 2020, 3:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 23 2023, 3:41 AM
Unknown Object (File)
Jul 9 2023, 5:49 AM
Unknown Object (File)
Jan 6 2023, 7:54 PM
Unknown Object (File)
Dec 29 2022, 11:14 PM
Subscribers
None

Details

Reviewers
jeff
alc
kib
dougm
Summary

This makes it easier to see whether the page daemon is skipping large
numbers of pages for some reason. Add per-scan counters to the
stack-allocated scan_state structure, and export them to the
corresponding page queue after a scan.

Add a sysctl tree for each page queue in the system and keep stats under
it.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 29207
Build 27134: arc lint + arc unit

Event Timeline

sys/vm/vm_pageout.c
217

The counters have a large chance of wrap, I believe. This is fine, but I would suggest make them unsigned to avoid relying on -fwrapv.

sys/vm/vm_pageout.c
217

Note that these counters are reset on each scan, so one would need to have more than 2^31 pages in a queue to hit the possibility of wraparound. I think u_long would probably make the most sense; there is a number of existing page counters that need to be widened, and I was going to use u_long there too.