Message ID | 1643499540-8351-9-git-send-email-jdamato@fastly.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | page_pool: Add page_pool stat counters | expand |
diff --git a/include/net/page_pool.h b/include/net/page_pool.h index ed2bc73..4991109 100644 --- a/include/net/page_pool.h +++ b/include/net/page_pool.h @@ -149,6 +149,7 @@ struct page_pool_stats { u64 empty; /* failed refills due to empty ptr ring, forcing * slow path allocation */ + u64 refill; /* allocations via successful refill */ } alloc; }; diff --git a/net/core/page_pool.c b/net/core/page_pool.c index 9d20b12..ffb68b8 100644 --- a/net/core/page_pool.c +++ b/net/core/page_pool.c @@ -185,6 +185,7 @@ static struct page *__page_pool_get_cached(struct page_pool *pool) page_pool_stat_alloc_inc(fast); } else { page = page_pool_refill_alloc_cache(pool); + page_pool_stat_alloc_inc(refill); } return page;
Add a stat tracking succesfull allocations which triggered a refill. Signed-off-by: Joe Damato <jdamato@fastly.com> --- include/net/page_pool.h | 1 + net/core/page_pool.c | 1 + 2 files changed, 2 insertions(+)