net: page_pool: report amount of memory held by page pools

Advanced deployments need the ability to check memory use
of various system components. It makes it possible to make informed
decisions about memory allocation and to find regressions and leaks.

Report memory use of page pools. Report both number of references
and bytes held.

Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Jakub Kicinski
2023-11-26 15:07:36 -08:00
committed by Paolo Abeni
parent d2ef6aa077
commit 7aee8429ee
5 changed files with 36 additions and 4 deletions

View File

@ -114,6 +114,19 @@ attribute-sets:
checks:
min: 1
max: u32-max
-
name: inflight
type: uint
doc: |
Number of outstanding references to this page pool (allocated
but yet to be freed pages). Allocated pages may be held in
socket receive queues, driver receive ring, page pool recycling
ring, the page pool cache, etc.
-
name: inflight-mem
type: uint
doc: |
Amount of memory held by inflight pages.
operations:
list:
@ -163,6 +176,8 @@ operations:
- id
- ifindex
- napi-id
- inflight
- inflight-mem
dump:
reply: *pp-reply
config-cond: page-pool