Re: [PATCH] rwsem: reduce spinlock contention in wakeup code path

From: Linus Torvalds
Date: Sun Sep 29 2013 - 20:52:01 EST

On Sun, Sep 29, 2013 at 5:40 PM, Davidlohr Bueso <davidlohr@xxxxxx> wrote:
> Hmm, I'm getting the following at bootup:
> May be due to missing lock nesting notation

Yes it is. And that reminds me of a problem I think we had with this
code: we had a possible case of the preemption counter nesting too
deeply. I forget the details, but it was something people worried

That mm_take_all_locks() thing is really special, and I suspect that
if we go down this way we should just do a single preempt-disable and
then use the arch_write_lock() to avoid both the lockdep splat _and_
the preemption counter overflow.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at