Thread (10 messages) 10 messages, 4 authors, 2015-03-16

Question on mutex code

From: dave@stgolabs.net (Davidlohr Bueso)
Date: 2015-03-15 01:09:16
Also in: lkml

On Sat, 2015-03-14 at 18:03 -0700, Davidlohr Bueso wrote:
Good analysis, but not quite accurate for one simple fact: mutex
trylocks _only_ use fastpaths (obviously just depend on the counter
cmpxchg to 0), so you never fallback to the slowpath you are mentioning,
thus the race is non existent. Please see the arch code.
For debug we use the trylock slowpath, but so does everything else, so
again you cannot hit this scenario.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help