public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel/printk: do not turn off bootconsole in printk_late_init if keep_bootcon
@ 2011-08-10  0:02 Nishanth Aravamudan
  2011-08-15 12:03 ` Fabio M. Di Nitto
  2011-08-20  0:10 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Nishanth Aravamudan @ 2011-08-10  0:02 UTC (permalink / raw)
  To: Fabio M . Di Nitto; +Cc: linux-kernel, David S. Miller, Alan Cox, Greg KH

It seems that commit 7bf693951a8e5f7e600a45b74d91d962a453146e doesn't
always achieve what it aims, as printk_late_init() runs it
unconditionally turns off all boot consoles. With this patch, I am able
to see more messages on the boot console in KVM guests than I can
without, when keep_bootcon is specified.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg KH <gregkh@suse.de>
---
 kernel/printk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/printk.c b/kernel/printk.c
index 37dff34..293a6cc 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -1602,7 +1602,7 @@ static int __init printk_late_init(void)
 	struct console *con;
 
 	for_each_console(con) {
-		if (con->flags & CON_BOOT) {
+		if (!keep_bootcon && con->flags & CON_BOOT) {
 			printk(KERN_INFO "turn off boot console %s%d\n",
 				con->name, con->index);
 			unregister_console(con);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] kernel/printk: do not turn off bootconsole in printk_late_init if keep_bootcon
  2011-08-10  0:02 [PATCH] kernel/printk: do not turn off bootconsole in printk_late_init if keep_bootcon Nishanth Aravamudan
@ 2011-08-15 12:03 ` Fabio M. Di Nitto
  2011-08-20  0:10 ` Andrew Morton
  1 sibling, 0 replies; 4+ messages in thread
From: Fabio M. Di Nitto @ 2011-08-15 12:03 UTC (permalink / raw)
  To: Nishanth Aravamudan; +Cc: linux-kernel, David S. Miller, Alan Cox, Greg KH

On 8/10/2011 2:02 AM, Nishanth Aravamudan wrote:
> It seems that commit 7bf693951a8e5f7e600a45b74d91d962a453146e doesn't
> always achieve what it aims, as printk_late_init() runs it
> unconditionally turns off all boot consoles. With this patch, I am able
> to see more messages on the boot console in KVM guests than I can
> without, when keep_bootcon is specified.
> 
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Cc: Greg KH <gregkh@suse.de>
> ---
>  kernel/printk.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/printk.c b/kernel/printk.c
> index 37dff34..293a6cc 100644
> --- a/kernel/printk.c
> +++ b/kernel/printk.c
> @@ -1602,7 +1602,7 @@ static int __init printk_late_init(void)
>  	struct console *con;
>  
>  	for_each_console(con) {
> -		if (con->flags & CON_BOOT) {
> +		if (!keep_bootcon && con->flags & CON_BOOT) {
>  			printk(KERN_INFO "turn off boot console %s%d\n",
>  				con->name, con->index);
>  			unregister_console(con);

Patch looks ok to me, just send it through the right channels for inclusion.

Fabio

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kernel/printk: do not turn off bootconsole in printk_late_init if keep_bootcon
  2011-08-10  0:02 [PATCH] kernel/printk: do not turn off bootconsole in printk_late_init if keep_bootcon Nishanth Aravamudan
  2011-08-15 12:03 ` Fabio M. Di Nitto
@ 2011-08-20  0:10 ` Andrew Morton
  2011-08-23 18:41   ` Nishanth Aravamudan
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2011-08-20  0:10 UTC (permalink / raw)
  To: Nishanth Aravamudan
  Cc: Fabio M . Di Nitto, linux-kernel, David S. Miller, Alan Cox,
	Greg KH

On Tue,  9 Aug 2011 17:02:33 -0700
Nishanth Aravamudan <nacc@us.ibm.com> wrote:

> It seems that commit 7bf693951a8e5f7e600a45b74d91d962a453146e doesn't
> always achieve what it aims, as printk_late_init() runs it
> unconditionally turns off all boot consoles. With this patch, I am able
> to see more messages on the boot console in KVM guests than I can
> without, when keep_bootcon is specified.
> 
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Cc: Greg KH <gregkh@suse.de>

The patch is applicable to 2.6.39.x and to 3.0.x but I'm unable to work
out if the end-user impact is sufficiently serious to warrant
backporting the fix into those kernels.

Please let us know you opinion on this.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kernel/printk: do not turn off bootconsole in printk_late_init if keep_bootcon
  2011-08-20  0:10 ` Andrew Morton
@ 2011-08-23 18:41   ` Nishanth Aravamudan
  0 siblings, 0 replies; 4+ messages in thread
From: Nishanth Aravamudan @ 2011-08-23 18:41 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Fabio M . Di Nitto, linux-kernel, David S. Miller, Alan Cox,
	Greg KH

Hi Andrew,

On 19.08.2011 [17:10:24 -0700], Andrew Morton wrote:
> On Tue,  9 Aug 2011 17:02:33 -0700
> Nishanth Aravamudan <nacc@us.ibm.com> wrote:
> 
> > It seems that commit 7bf693951a8e5f7e600a45b74d91d962a453146e doesn't
> > always achieve what it aims, as printk_late_init() runs it
> > unconditionally turns off all boot consoles. With this patch, I am able
> > to see more messages on the boot console in KVM guests than I can
> > without, when keep_bootcon is specified.
> > 
> > Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> > Cc: David S. Miller <davem@davemloft.net>
> > Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
> > Cc: Greg KH <gregkh@suse.de>
> 
> The patch is applicable to 2.6.39.x and to 3.0.x but I'm unable to work
> out if the end-user impact is sufficiently serious to warrant
> backporting the fix into those kernels.
> 
> Please let us know you opinion on this.

Sorry for the delay in responding. I think it is appropriate for the
relevant -stable trees. However, it's more of an annoyance than a
serious bug (ideally you don't need to keep the boot console around as
console handover should be working -- I was encountering a situation
where the console handover wasn't working and not having the boot
console available meant I couldn't see why).

Thanks,
Nish

-- 
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-23 18:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-10  0:02 [PATCH] kernel/printk: do not turn off bootconsole in printk_late_init if keep_bootcon Nishanth Aravamudan
2011-08-15 12:03 ` Fabio M. Di Nitto
2011-08-20  0:10 ` Andrew Morton
2011-08-23 18:41   ` Nishanth Aravamudan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox