[Skiboot] [PATCH v3, 1/2] core/lock: Add deadlock detection

Stewart Smith stewart at linux.vnet.ibm.com
Wed Mar 7 18:04:20 AEDT 2018

Matt Brown <matthew.brown.dev at gmail.com> writes:
> This adds simple deadlock detection. The detection looks for circular
> dependencies in the lock requests. It will abort and display a stack trace
> when a deadlock occurs.
> The detection is enabled by DEBUG_LOCKS (enabled by default).
> While the detection may have a slight performance overhead, as there are
> not a huge number of locks in skiboot this overhead isn't significant.
> Signed-off-by: Matt Brown <matthew.brown.dev at gmail.com>

In my quest to go through the backlog of patches to skiboot, I *finally*
got to these lock-hardening patches.

I'm understandably slightly concerned about adding in overhead to the
taking of locks... but I'm not so concerned as to go and immediately put
this all behind another #ifdef and limit to debug builds (at least yet).

So, I've taken the series into master as of 84186ef0944c and let's see
how it goes! Worst case we may hide behind a DEBUG build if we notice
them having a too large impact.

Thanks heaps for this and apologies for taking so long to get this far
down the todo list!

Stewart Smith
OPAL Architect, IBM.

More information about the Skiboot mailing list