Re: [PATCH] console: prevent registered consoles from dumping oldkernel message over again

From: Feng Tang
Date: Wed Jan 12 2011 - 09:51:55 EST


Hi Alan,

On Wed, 12 Jan 2011 19:14:01 +0800
Alan Cox <alan@xxxxxxxxxxxxxxx> wrote:

> On Wed, 12 Jan 2011 14:48:46 +0800
> Feng Tang <feng.tang@xxxxxxxxx> wrote:
>
> > For a platform with many consoles like:
> > "console=tty1 console=ttyMFD2 console=ttyS0 earlyprintk=mrst"
> >
> > Each time when the non "selected_console" (tty1 and ttyMFD2 here)
> > get registered, the existing kernel message will be printed out on
> > registered consoles again, the "mrst" early console will get some
> > same message for 3 times, and "tty1" will get some for twice.
> >
> > So try to temporarily disable registered console's printing when
> > dump the existing kernel messages to the new console.
>
> I don't think the existing behaviour should be changed because other
> systems and users rely on it. Perhaps we need to be able to do
>
> console=xxx addconsole=yyy
>
> or some such instead so the user can indicate if the console should
> get all the messages so far or just be added as an extra console


Don't know if I understand correctly, but with this patch all the consoles
still will get the full version of kernel messages, it just save some
console from dumping some of the early messages several times.

Still use the old example, assume log0 is the kernel messages from boot start to
the point where tty1 get registered, log1 is from tty1's registering to
ttyMFD2's, log2 is the rest kernel message. Before this patch, on the
boot console, we will see: log0 + log0 + log1 + log0 + log1 + log2.

Thanks,
Feng
--
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/