Re: [PATCH] sched: correct testing need_resched inmutex_spin_on_owner()

From: Peter Zijlstra
Date: Tue Jun 07 2011 - 09:50:36 EST


On Tue, 2011-06-07 at 15:47 +0200, Peter Zijlstra wrote:
> Only if your above assumption holds, which it doesn't. It explicitly
> checks to see if _this_ cpu needs a resched while spinning, if so it
> bails the spinning and calls schedule in the lock slow path.
>
> If the owner cpu reschedules, owner will leave the rq and

s/rq/cpu/

> owner_running() will return false, also breaking the loop.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/