On Mon, Aug 29, 2016 at 05:41:09PM +0200, Peter Zijlstra wrote:
On Fri, Aug 26, 2016 at 07:40:34PM -0400, Waiman Long wrote:Much simpler solution... only accept handoffs when we're stuck in the
On 08/26/2016 11:18 AM, Peter Zijlstra wrote:So I found (or rather the buildbot did) a problem with it.
Still need to look at adding spinning to the handoff case.I have looked at the handoff code and I didn't see any problem.
Also need to look at writing (much) better changelogs, they stink.
locking-selftest has testcases like:
lock(&A);
if (trylock(&A))
/* fail */
and
ww_lock(&A)
if (ww_lock(&A) != -EDEADLK)
/* fail */
But with the 'trylock' accepting the lock if owner==current, in order to
accept the hand-off, this breaks in interesting ways.
Now, ARCH_MIN_TASKALIGN is at least 8 (mips, s390, parisc) which would
give us one more FLAG bit to play with.
The below seems to make things happy again..
wait loop (which precludes doing recursive locking, since that would've
failed much earlier).
Now, let me look at that spinner patch you sent.