Re: [1/4] rcu: Detect uses of rcu read side in extended quiescent states

From: Michel Lespinasse
Date: Fri Jun 10 2011 - 04:58:49 EST


On Mon, Jun 6, 2011 at 6:36 PM, Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:
> Ok but that only improves the rcu debugging. What about instead improving
> might_sleep() to also work in !PREEMPT, so that it profits to any detection
> of forbidden sleeping (sleep inside spinlock, preempt_disable, might_fault, etc...)
>
> We could define a new config:
>
> config PREEMPT_COUNT
>       default PREEMPT || DEBUG_SPINLOCK_SLEEP
>
> and build preempt_disable()/preempt_enable() on top of that instead
> of using CONFIG_PREEMPT directly.
>
> Does that look sane?

Yes, I think this would be helpful.

I actually sent out a patch for that about a year ago - message title
was "Stronger CONFIG_DEBUG_SPINLOCK_SLEEP without CONFIG_PREEMPT".
However that code has rotted since, and my attempt at a trivial port
ended up spewing complaints in dmesg at boot time...

--
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.
--
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/