Page MenuHomeFreeBSD

Add some counters for per-page queue operations.
ClosedPublic

Authored by markj on Sep 24 2019, 4:28 PM.

Details

Summary

This is a counterpart to the counters we have in vm_object.c. For now,
add counters for queue operations: the number of dequeues and requeues
(queue_ops), and the number of batch entries which resulted in no queue
updates (queue_nops). A NOP occurs when the page's queue state has been
updated between the batch enqueue and completion. This occurs most
often when vm_page_free_prep() begins a batched dequeue and the page is
fully dequeued by vm_page_alloc() before the batch entry is processed.
This can happen easily with page allocated from the UMA cache, which is
LIFO.

Test Plan

After bootup and a kernel build I have:

markj@biggie> sysctl vm.stats.page
vm.stats.page.queue_nops: 98184
vm.stats.page.queue_ops: 23363542

In some workloads the ratio nops/ops can be significantly
larger. These are targets for optimization, since a high ratio
implies that we are taking the page queue locks more often
than necessary.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markj created this revision.Sep 24 2019, 4:28 PM
markj edited the test plan for this revision. (Show Details)Sep 24 2019, 4:33 PM
markj added reviewers: alc, kib.
markj edited the test plan for this revision. (Show Details)Sep 24 2019, 4:38 PM
markj added a reviewer: jeff.
kib accepted this revision.Sep 24 2019, 5:20 PM
This revision is now accepted and ready to land.Sep 24 2019, 5:20 PM
alc accepted this revision.Sep 24 2019, 6:10 PM
This revision was automatically updated to reflect the committed changes.