* [PATCH net-next] net: page_pool: add page allocation stats for two fast page allocate path
@ 2022-05-12 6:56 Guangbin Huang
2022-05-13 10:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Guangbin Huang @ 2022-05-12 6:56 UTC (permalink / raw)
To: davem, kuba, edumazet, pabeni, bpf
Cc: netdev, linux-kernel, lipeng321, huangguangbin2, chenhao288
From: Jie Wang <wangjie125@huawei.com>
Currently If use page pool allocation stats to analysis a RX performance
degradation problem. These stats only count for pages allocate from
page_pool_alloc_pages. But nic drivers such as hns3 use
page_pool_dev_alloc_frag to allocate pages, so page stats in this API
should also be counted.
Signed-off-by: Jie Wang <wangjie125@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
---
net/core/page_pool.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index bdbadfaee867..f18e6e771993 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -704,8 +704,10 @@ struct page *page_pool_alloc_frag(struct page_pool *pool,
if (page && *offset + size > max_size) {
page = page_pool_drain_frag(pool, page);
- if (page)
+ if (page) {
+ alloc_stat_inc(pool, fast);
goto frag_reset;
+ }
}
if (!page) {
@@ -727,6 +729,7 @@ struct page *page_pool_alloc_frag(struct page_pool *pool,
pool->frag_users++;
pool->frag_offset = *offset + size;
+ alloc_stat_inc(pool, fast);
return page;
}
EXPORT_SYMBOL(page_pool_alloc_frag);
--
2.33.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net-next] net: page_pool: add page allocation stats for two fast page allocate path
2022-05-12 6:56 [PATCH net-next] net: page_pool: add page allocation stats for two fast page allocate path Guangbin Huang
@ 2022-05-13 10:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-13 10:40 UTC (permalink / raw)
To: Guangbin Huang
Cc: davem, kuba, edumazet, pabeni, bpf, netdev, linux-kernel,
lipeng321, chenhao288
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Thu, 12 May 2022 14:56:31 +0800 you wrote:
> From: Jie Wang <wangjie125@huawei.com>
>
> Currently If use page pool allocation stats to analysis a RX performance
> degradation problem. These stats only count for pages allocate from
> page_pool_alloc_pages. But nic drivers such as hns3 use
> page_pool_dev_alloc_frag to allocate pages, so page stats in this API
> should also be counted.
>
> [...]
Here is the summary with links:
- [net-next] net: page_pool: add page allocation stats for two fast page allocate path
https://git.kernel.org/netdev/net-next/c/0f6deac3a079
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-13 10:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-12 6:56 [PATCH net-next] net: page_pool: add page allocation stats for two fast page allocate path Guangbin Huang
2022-05-13 10:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox