[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ee5c3780-2b0e-4db2-97d0-48659686c772@kernel.org>
Date: Wed, 22 Nov 2023 16:24:55 +0100
From: Jesper Dangaard Brouer <hawk@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc: netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
almasrymina@...gle.com, ilias.apalodimas@...aro.org, dsahern@...il.com,
dtatulea@...dia.com, willemb@...gle.com
Subject: Re: [PATCH net-next v3 09/13] net: page_pool: report amount of memory
held by page pools
On 11/22/23 04:44, Jakub Kicinski wrote:
> 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.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> Documentation/netlink/specs/netdev.yaml | 13 +++++++++++++
> include/uapi/linux/netdev.h | 2 ++
> net/core/page_pool.c | 13 +++++++++----
> net/core/page_pool_priv.h | 2 ++
> net/core/page_pool_user.c | 8 ++++++++
> 5 files changed, 34 insertions(+), 4 deletions(-)
>
I like it, but see comment/suggestion below.
Acked-by: Jesper Dangaard Brouer <hawk@...nel.org>
> diff --git a/Documentation/netlink/specs/netdev.yaml b/Documentation/netlink/specs/netdev.yaml
> index 82fbe81f7a49..85209e19dca9 100644
> --- a/Documentation/netlink/specs/netdev.yaml
> +++ b/Documentation/netlink/specs/netdev.yaml
> @@ -114,6 +114,17 @@ name: netdev
> 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).
Maybe it is worth explaining in this doc that these inflight references
also cover elements in (ptr) ring (and alloc-cache) ?
In a follow up patchset, we likely also want to expose the PP ring size.
As that could be relevant when assessing inflight number.
--Jesper
> + -
> + name: inflight-mem
> + type: uint
> + doc: |
> + Amount of memory held by inflight pages.
>
> operations:
> list:
> @@ -163,6 +174,8 @@ name: netdev
> - id
> - ifindex
> - napi-id
> + - inflight
> + - inflight-mem
> dump:
> reply: *pp-reply
> config-cond: page-poo
Powered by blists - more mailing lists