From: Davidlohr Bueso Date: Wed, 30 Jul 2014 20:41:53 +0000 (-0700) Subject: locking/mutexes: Refactor optimistic spinning code X-Git-Tag: fixes-against-v3.18-rc2~101^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76916515d9d84e6552ee5e218e0ed566ad75e600;p=pandora-kernel.git locking/mutexes: Refactor optimistic spinning code When we fail to acquire the mutex in the fastpath, we end up calling __mutex_lock_common(). A *lot* goes on in this function. Move out the optimistic spinning code into mutex_optimistic_spin() and simplify the former a bit. Furthermore, this is similar to what we have in rwsems. No logical changes. Signed-off-by: Davidlohr Bueso Acked-by: Jason Low Signed-off-by: Peter Zijlstra Cc: aswin@hp.com Cc: mingo@kernel.org Cc: Linus Torvalds Link: http://lkml.kernel.org/r/1406752916-3341-4-git-send-email-davidlohr@hp.com Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed