percpu: expose statistics about percpu memory via debugfs

There is limited visibility into the use of percpu memory leaving us
unable to reason about correctness of parameters and overall use of
percpu memory. These counters and statistics aim to help understand
basic statistics about percpu memory such as number of allocations over
the lifetime, allocation sizes, and fragmentation.

New Config: PERCPU_STATS

Signed-off-by: Dennis Zhou <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
This commit is contained in:
Dennis Zhou 2017-06-19 19:28:31 -04:00 • committed by Tejun Heo
commit 30a5b5367e
7 changed files with 380 additions and 0 deletions

View file

@ -706,3 +706,11 @@ config ARCH_USES_HIGH_VMA_FLAGS
bool
config ARCH_HAS_PKEYS
bool
config PERCPU_STATS
bool "Collect percpu memory statistics"
default n
help
This feature collects and exposes statistics via debugfs. The
information includes global and per chunk statistics, which can
be used to help understand percpu memory usage.