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

Michel Lespinasse
2011-06-10T08:58:46Z

On Mon, Jun 6, 2011 at 6:36 PM, Frederic Weisbecker <fweisbec@gmail.com> 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.