diff options
| author | Jan Glauber <[email protected]> | 2019-06-05 13:48:49 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2019-06-07 20:15:06 +0000 |
| commit | 893a7d32e8e04ca4d6c882336b26ed660ca0a48d (patch) | |
| tree | dc6946c02bd1d17178e8ac9b4925513834490e11 /fs/proc/array.c | |
| parent | uaccess: add noop untagged_addr definition (diff) | |
| download | kernel-893a7d32e8e04ca4d6c882336b26ed660ca0a48d.tar.gz kernel-893a7d32e8e04ca4d6c882336b26ed660ca0a48d.zip | |
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 <[email protected]>
Signed-off-by: Jan Glauber <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions
