diff options
author | Yunsheng Lin | 2021-08-24 17:06:49 +0800 |
---|---|---|
committer | David S. Miller | 2021-08-24 10:46:31 +0100 |
commit | 7fb9b66dc9ce52b058b3f9f3016b4d39f692c3b9 (patch) | |
tree | ad6e3d7949cb84af75038ffe0a0d5d04c9ad23cf /net | |
parent | 669f047ec12624e1fa07e0df88a84104b1d4dcd9 (diff) |
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')
-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); |