diff options
author | Yunsheng Lin <linyunsheng@huawei.com> | 2021-08-24 11:06:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-24 11:46:31 +0200 |
commit | 7fb9b66dc9ce52b058b3f9f3016b4d39f692c3b9 (patch) | |
tree | ad6e3d7949cb84af75038ffe0a0d5d04c9ad23cf /net/core | |
parent | Merge branch 'dsa-sw-bridging' (diff) | |
download | linux-7fb9b66dc9ce52b058b3f9f3016b4d39f692c3b9.tar.xz linux-7fb9b66dc9ce52b058b3f9f3016b4d39f692c3b9.zip |
page_pool: use relaxed atomic for release side accounting
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>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/page_pool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/page_pool.c b/net/core/page_pool.c index e1409056965a..1a6978427d6c 100644 --- a/net/core/page_pool.c +++ b/net/core/page_pool.c @@ -370,7 +370,7 @@ skip_dma_unmap: /* 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); |