mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
net: page_pool: report when page pool was destroyed
Report when page pool was destroyed. Together with the inflight
/ memory use reporting this can serve as a replacement for the
warning about leaked page pools we currently print to dmesg.
Example output for a fake leaked page pool using some hacks
in netdevsim (one "live" pool, and one "leaked" on the same dev):
$ ./cli.py --no-schema --spec netlink/specs/netdev.yaml \
--dump page-pool-get
[{'id': 2, 'ifindex': 3},
{'id': 1, 'ifindex': 3, 'destroyed': 133, 'inflight': 1}]
Tested-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
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:
committed by
Paolo Abeni
parent
7aee8429ee
commit
69cb4952b6
@@ -127,6 +127,18 @@ attribute-sets:
|
||||
type: uint
|
||||
doc: |
|
||||
Amount of memory held by inflight pages.
|
||||
-
|
||||
name: detach-time
|
||||
type: uint
|
||||
doc: |
|
||||
Seconds in CLOCK_BOOTTIME of when Page Pool was detached by
|
||||
the driver. Once detached Page Pool can no longer be used to
|
||||
allocate memory.
|
||||
Page Pools wait for all the memory allocated from them to be freed
|
||||
before truly disappearing. "Detached" Page Pools cannot be
|
||||
"re-attached", they are just waiting to disappear.
|
||||
Attribute is absent if Page Pool has not been detached, and
|
||||
can still be used to allocate new memory.
|
||||
|
||||
operations:
|
||||
list:
|
||||
@@ -178,6 +190,7 @@ operations:
|
||||
- napi-id
|
||||
- inflight
|
||||
- inflight-mem
|
||||
- detach-time
|
||||
dump:
|
||||
reply: *pp-reply
|
||||
config-cond: page-pool
|
||||
|
||||
Reference in New Issue
Block a user