projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f01ea9
)
lockref: Relax in cmpxchg loop
author
Luck, Tony
<
[email protected]
>
Tue, 3 Sep 2013 21:49:49 +0000
(14:49 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 3 Sep 2013 22:36:42 +0000
(15:36 -0700)
While we are likley to succeed and break out of this loop, it isn't
guaranteed. We should be power and thread friendly if we do have to
go around for a second (or third, or more) attempt.
Signed-off-by: Tony Luck <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
lib/lockref.c
patch
|
blob
|
history
diff --git
a/lib/lockref.c
b/lib/lockref.c
index 7819c2d1d315eff9a010b989d716f1b46387ef4e..9d76f404ce9a6589e7e5b98733d7317b0ad5bb1a 100644
(file)
--- a/
lib/lockref.c
+++ b/
lib/lockref.c
@@
-19,6
+19,7
@@
if (likely(old.lock_count == prev.lock_count)) { \
SUCCESS; \
} \
+ cpu_relax(); \
} \
} while (0)