Re: [PATCH] locking/spinlock_debug: Remove spinlock lockup detection code

From: Peter Zijlstra
Date: Thu Feb 09 2017 - 10:46:39 EST


On Wed, Feb 08, 2017 at 02:46:48PM -0500, Waiman Long wrote:
> The current spinlock lockup detection code can sometimes produce false
> positives because of the unfairness of the locking algorithm itself.

Also, __delay(1) can be really terrible, which then causes the timeout
to be highly variable and prone to triggering.

> So the lockup detection code is now removed. Instead, we are relying
> on the NMI watchdog to detect potential lockup. We won't have lockup
> detection if the watchdog isn't running.
>
> The commented-out read-write lock lockup detection code are also
> removed.

Yes, this retains all the extra validation fields, which I've meanwhile
heard are sometimes useful but does away with all the fragile bits.


Thanks!