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
about.

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.

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/