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> Signed-off-by: hongrongxuan <hongrongxuan@huawei.com>
This commit is contained in:
parent
09bb2f044b
commit
f0d06f9ac4
|
@ -366,7 +366,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);
|
||||
|
|
Loading…
Reference in New Issue