Re: [debug patch] printk: Add a printk killswitch to robustify NMIwatchdog messages

From: Peter Zijlstra
Date: Mon Jun 06 2011 - 12:01:13 EST


On Mon, 2011-06-06 at 17:52 +0200, Ingo Molnar wrote:
> * Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> > Needs more staring at, preferably by someone who actually
> > understands that horrid mess :/ Also, this all still doesn't make
> > printk() work reliably while holding rq->lock.
>
> So, what about my suggestion to just *remove* the wakeup from there
> and use the deferred wakeup mechanism that klogd uses.
>
> That would make printk() *visibly* more robust in practice.

That's currently done from the jiffy tick, do you want to effectively
delay releasing the console_sem for the better part of a jiffy?

> [ It would also open up the way to possibly make printk() NMI entry
> safe - currently we lock up if we printk in an NMI or #MC context
> that happens to nest inside a printk(). ]

Well, for that to happen you also need to deal with logbuf_lock nesting.
Personally I think using printk() from NMI context is quite beyond sane.
--
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/