* [PATCH net-next v3] page_pool: use relaxed atomic for release side accounting
@ 2021-08-24 9:06 Yunsheng Lin
2021-08-24 9:12 ` Ilias Apalodimas
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yunsheng Lin @ 2021-08-24 9:06 UTC (permalink / raw)
To: davem, kuba; +Cc: hawk, ilias.apalodimas, netdev, linux-kernel, hkallweit1
There is no need to synchronize the account updating, so
use the relaxed atomic to avoid some memory barrier in the
data path.
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
---
V3: Drop patch 2.
V2: Remove unnecessary unliky() mark as pointed out by
Heiner.
---
net/core/page_pool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index e140905..1a69784 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -370,7 +370,7 @@ void page_pool_release_page(struct page_pool *pool, struct page *page)
/* This may be the last page returned, releasing the pool, so
* it is not safe to reference pool afterwards.
*/
- count = atomic_inc_return(&pool->pages_state_release_cnt);
+ count = atomic_inc_return_relaxed(&pool->pages_state_release_cnt);
trace_page_pool_state_release(pool, page, count);
}
EXPORT_SYMBOL(page_pool_release_page);
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v3] page_pool: use relaxed atomic for release side accounting
2021-08-24 9:06 [PATCH net-next v3] page_pool: use relaxed atomic for release side accounting Yunsheng Lin
@ 2021-08-24 9:12 ` Ilias Apalodimas
2021-08-24 9:12 ` Ilias Apalodimas
2021-08-24 9:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Ilias Apalodimas @ 2021-08-24 9:12 UTC (permalink / raw)
To: Yunsheng Lin
Cc: David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
Networking, open list, Heiner Kallweit
On Tue, 24 Aug 2021 at 12:07, Yunsheng Lin <linyunsheng@huawei.com> wrote:
>
> There is no need to synchronize the account updating, so
> use the relaxed atomic to avoid some memory barrier in the
> data path.
>
> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
> ---
> V3: Drop patch 2.
> V2: Remove unnecessary unliky() mark as pointed out by
> Heiner.
> ---
> net/core/page_pool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/page_pool.c b/net/core/page_pool.c
> index e140905..1a69784 100644
> --- a/net/core/page_pool.c
> +++ b/net/core/page_pool.c
> @@ -370,7 +370,7 @@ void page_pool_release_page(struct page_pool *pool, struct page *page)
> /* This may be the last page returned, releasing the pool, so
> * it is not safe to reference pool afterwards.
> */
> - count = atomic_inc_return(&pool->pages_state_release_cnt);
> + count = atomic_inc_return_relaxed(&pool->pages_state_release_cnt);
> trace_page_pool_state_release(pool, page, count);
> }
> EXPORT_SYMBOL(page_pool_release_page);
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v3] page_pool: use relaxed atomic for release side accounting
2021-08-24 9:06 [PATCH net-next v3] page_pool: use relaxed atomic for release side accounting Yunsheng Lin
2021-08-24 9:12 ` Ilias Apalodimas
@ 2021-08-24 9:12 ` Ilias Apalodimas
2021-08-24 9:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Ilias Apalodimas @ 2021-08-24 9:12 UTC (permalink / raw)
To: Yunsheng Lin
Cc: David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
Networking, open list, Heiner Kallweit
On Tue, 24 Aug 2021 at 12:07, Yunsheng Lin <linyunsheng@huawei.com> wrote:
>
> There is no need to synchronize the account updating, so
> use the relaxed atomic to avoid some memory barrier in the
> data path.
>
> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
> ---
> V3: Drop patch 2.
> V2: Remove unnecessary unliky() mark as pointed out by
> Heiner.
> ---
> net/core/page_pool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/page_pool.c b/net/core/page_pool.c
> index e140905..1a69784 100644
> --- a/net/core/page_pool.c
> +++ b/net/core/page_pool.c
> @@ -370,7 +370,7 @@ void page_pool_release_page(struct page_pool *pool, struct page *page)
> /* This may be the last page returned, releasing the pool, so
> * it is not safe to reference pool afterwards.
> */
> - count = atomic_inc_return(&pool->pages_state_release_cnt);
> + count = atomic_inc_return_relaxed(&pool->pages_state_release_cnt);
> trace_page_pool_state_release(pool, page, count);
> }
> EXPORT_SYMBOL(page_pool_release_page);
> --
> 2.7.4
>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v3] page_pool: use relaxed atomic for release side accounting
2021-08-24 9:06 [PATCH net-next v3] page_pool: use relaxed atomic for release side accounting Yunsheng Lin
2021-08-24 9:12 ` Ilias Apalodimas
2021-08-24 9:12 ` Ilias Apalodimas
@ 2021-08-24 9:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-08-24 9:50 UTC (permalink / raw)
To: Yunsheng Lin
Cc: davem, kuba, hawk, ilias.apalodimas, netdev, linux-kernel, hkallweit1
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Tue, 24 Aug 2021 17:06:49 +0800 you wrote:
> There is no need to synchronize the account updating, so
> use the relaxed atomic to avoid some memory barrier in the
> data path.
>
> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
>
> [...]
Here is the summary with links:
- [net-next,v3] page_pool: use relaxed atomic for release side accounting
https://git.kernel.org/netdev/net-next/c/7fb9b66dc9ce
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] 4+ messages in thread
end of thread, other threads:[~2021-08-24 9:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24 9:06 [PATCH net-next v3] page_pool: use relaxed atomic for release side accounting Yunsheng Lin
2021-08-24 9:12 ` Ilias Apalodimas
2021-08-24 9:12 ` Ilias Apalodimas
2021-08-24 9:50 ` 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;
as well as URLs for NNTP newsgroup(s).