Re: [tip:core/locking] mutex: Fix optimistic spinning vs. BKL

From: Linus Torvalds
Date: Tue May 18 2010 - 12:28:55 EST




On Tue, 18 May 2010, Ingo Molnar wrote:
>
> Tony, mind sending a version of this patch that does not
> include a jiffies based spinning loop?

I think it should just be the two-liner

if (current->lock_depth >= 0)
break;

in that loop. Plus comment.

Linus
--
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/