diff options
author | Yunsheng Lin <linyunsheng@huawei.com> | 2021-06-17 09:04:14 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-21 11:51:41 -0700 |
commit | 89837eb4b2463c556a123437f242d6c2bc62ce81 (patch) | |
tree | ab9bb315eee4d6fa2b5b59514cdf1a2db7b4b641 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 603113c514e95c3350598bc3cccbd03af7ea4ab2 (diff) |
net: sched: add barrier to ensure correct ordering for lockless qdisc
The spin_trylock() was assumed to contain the implicit
barrier needed to ensure the correct ordering between
STATE_MISSED setting/clearing and STATE_MISSED checking
in commit a90c57f2cedd ("net: sched: fix packet stuck
problem for lockless qdisc").
But it turns out that spin_trylock() only has load-acquire
semantic, for strongly-ordered system(like x86), the compiler
barrier implicitly contained in spin_trylock() seems enough
to ensure the correct ordering. But for weakly-orderly system
(like arm64), the store-release semantic is needed to ensure
the correct ordering as clear_bit() and test_bit() is store
operation, see queued_spin_lock().
So add the explicit barrier to ensure the correct ordering
for the above case.
Fixes: a90c57f2cedd ("net: sched: fix packet stuck problem for lockless qdisc")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions