diff options
author | Joe Damato <jdamato@fastly.com> | 2022-03-02 08:55:47 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-03-03 10:55:28 +0100 |
commit | 8610037e8106b48c79cfe0afb92b2b2466e51c3d (patch) | |
tree | 32f1b4cdbf620845dcf8f6af2a37319bc0b1f311 /net/Kconfig | |
parent | tcp: Remove the unused api (diff) | |
download | linux-8610037e8106b48c79cfe0afb92b2b2466e51c3d.tar.xz linux-8610037e8106b48c79cfe0afb92b2b2466e51c3d.zip |
page_pool: Add allocation stats
Add per-pool statistics counters for the allocation path of a page pool.
These stats are incremented in softirq context, so no locking or per-cpu
variables are needed.
This code is disabled by default and a kernel config option is provided for
users who wish to enable them.
The statistics added are:
- fast: successful fast path allocations
- slow: slow path order-0 allocations
- slow_high_order: slow path high order allocations
- empty: ptr ring is empty, so a slow path allocation was forced.
- refill: an allocation which triggered a refill of the cache
- waive: pages obtained from the ptr ring that cannot be added to
the cache due to a NUMA mismatch.
Signed-off-by: Joe Damato <jdamato@fastly.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/Kconfig')
-rw-r--r-- | net/Kconfig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/Kconfig b/net/Kconfig index 8a1f9d0287de..6b78f695caa6 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -434,6 +434,19 @@ config NET_DEVLINK config PAGE_POOL bool +config PAGE_POOL_STATS + default n + bool "Page pool stats" + depends on PAGE_POOL + help + Enable page pool statistics to track page allocation and recycling + in page pools. This option incurs additional CPU cost in allocation + and recycle paths and additional memory cost to store the statistics. + These statistics are only available if this option is enabled and if + the driver using the page pool supports exporting this data. + + If unsure, say N. + config FAILOVER tristate "Generic failover module" help |