Re: [PATCH] printk: robustify printk

From: Ingo Molnar
Date: Mon Aug 11 2008 - 07:51:45 EST



* Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:

> > We could clean this up further by integrating the rcu_needs_cpu()
> > and printk_needs_cpu() into a softirq mechanism. We already check
> > for pending softirqs in tick-sched.c, so the above complication
> > would go away completely.
>
> RCU depends on the polling to advance the state machine, if you want
> an event driven state machine, you'd have to drive it from
> rcu_read_unlock() adding overhead there - and I'm pretty sure you
> don't want to do that.
>
> So while its a tad ugly to poll for these states, I'm not too worried
> in these two cases - of course every additional poll needs good
> justification.

ok - i guess we can declare stop_tick a slowpath as well (we are on the
way towards idling).

> > ( But that's for a separate cleanup patch i think. )
> >
> > No strong feelings though. Peter, which one do you prefer?
>
> I personally prefer this printk_tick() driven one over the RCU driven
> one because it doesn't trade deadlocks.

i've started testing it in tip/core/printk to give it some track record
- thanks Peter.

Linus, any strong opinion against Peter's patch below (or in favor of
the RCU patch)? Tentatively for v2.6.28 i'd say, to give people time to
object to the async behavior.

Ingo

----------------->