summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJan Glauber <jglauber@cavium.com>2019-06-05 16:48:49 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2019-06-07 23:15:06 +0300
commit893a7d32e8e04ca4d6c882336b26ed660ca0a48d (patch)
treedc6946c02bd1d17178e8ac9b4925513834490e11 /include
parentd93445225cd3c8eb0bf1350c04875576428b45b4 (diff)
downloadlinux-893a7d32e8e04ca4d6c882336b26ed660ca0a48d.tar.xz
lockref: Limit number of cmpxchg loop retries
The lockref cmpxchg loop is unbound as long as the spinlock is not taken. Depending on the hardware implementation of compare-and-swap a high number of loop retries might happen. Add an upper bound to the loop to force the fallback to spinlocks after some time. A retry value of 100 should not impact any hardware that does not have this issue. With the retry limit the performance of an open-close testcase improved between 60-70% on ThunderX2. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Jan Glauber <jglauber@marvell.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions