public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86_64: be less annoying on boot
@ 2008-09-24 18:35 Bill Nottingham
  2008-09-25  9:15 ` Ingo Molnar
  0 siblings, 1 reply; 10+ messages in thread
From: Bill Nottingham @ 2008-09-24 18:35 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 220 bytes --]

As long as we're printing mostly useless messages on every boot regardless
of debug level, make them 5% more amusing.

Signed-off-by: Bill Nottingham <notting@redhat.com>

(Alternatively, just remove them, of course...)

[-- Attachment #2: kernel.patch --]
[-- Type: text/plain, Size: 528 bytes --]

diff -up linux-2.6.26.noarch/arch/x86/kernel/head64.c.foo linux-2.6.26.noarch/arch/x86/kernel/head64.c
--- linux-2.6.26.noarch/arch/x86/kernel/head64.c.foo	2008-09-24 14:31:27.000000000 -0400
+++ linux-2.6.26.noarch/arch/x86/kernel/head64.c	2008-09-24 14:31:33.000000000 -0400
@@ -112,7 +112,7 @@ void __init x86_64_start_kernel(char * r
 
 	x86_64_init_pda();
 
-	early_printk("Kernel really alive\n");
+	early_printk("Kernel really alive! It's alive! IT'S ALIIIIIIIIIVE!\n");
 
 	x86_64_start_reservations(real_mode_data);
 }

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

* Re: [PATCH] x86_64: be less annoying on boot
  2008-09-24 18:35 [PATCH] x86_64: be less annoying on boot Bill Nottingham
@ 2008-09-25  9:15 ` Ingo Molnar
  2008-09-25 16:13   ` Bill Nottingham
  0 siblings, 1 reply; 10+ messages in thread
From: Ingo Molnar @ 2008-09-25  9:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Thomas Gleixner, H. Peter Anvin


* Bill Nottingham <notting@redhat.com> wrote:

> As long as we're printing mostly useless messages on every boot regardless
> of debug level, make them 5% more amusing.
> 
> Signed-off-by: Bill Nottingham <notting@redhat.com>
> 
> (Alternatively, just remove them, of course...)

LOL :) Applied the commit below to tip/x86/debug, thanks Bill!

	Ingo

-------------------->
>From f6476774f1fe32593d3d71903b1e98514efbf685 Mon Sep 17 00:00:00 2001
From: Bill Nottingham <notting@redhat.com>
Date: Wed, 24 Sep 2008 14:35:17 -0400
Subject: [PATCH] x86_64: be less annoying on boot

Remove mostly useless message on every boot.

Signed-off-by: Bill Nottingham <notting@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/head64.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 9bfc4d7..11aa501 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -112,8 +112,6 @@ void __init x86_64_start_kernel(char * real_mode_data)
 
 	x86_64_init_pda();
 
-	early_printk("Kernel really alive\n");
-
 	x86_64_start_reservations(real_mode_data);
 }
 


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

* Re: [PATCH] x86_64: be less annoying on boot
  2008-09-25  9:15 ` Ingo Molnar
@ 2008-09-25 16:13   ` Bill Nottingham
  2008-09-27 18:50     ` Ingo Molnar
  0 siblings, 1 reply; 10+ messages in thread
From: Bill Nottingham @ 2008-09-25 16:13 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin

Ingo Molnar (mingo@elte.hu) said: 
> > (Alternatively, just remove them, of course...)
> 
> LOL :) Applied the commit below to tip/x86/debug, thanks Bill!

Does the 'kernel alive' right before it serve any purpose either?

Bill

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

* Re: [PATCH] x86_64: be less annoying on boot
  2008-09-25 16:13   ` Bill Nottingham
@ 2008-09-27 18:50     ` Ingo Molnar
  2008-09-27 18:51       ` Ingo Molnar
  2008-09-27 19:11       ` dcg
  0 siblings, 2 replies; 10+ messages in thread
From: Ingo Molnar @ 2008-09-27 18:50 UTC (permalink / raw)
  To: linux-kernel, Thomas Gleixner, H. Peter Anvin


* Bill Nottingham <notting@redhat.com> wrote:

> Ingo Molnar (mingo@elte.hu) said: 
> > > (Alternatively, just remove them, of course...)
> > 
> > LOL :) Applied the commit below to tip/x86/debug, thanks Bill!
> 
> Does the 'kernel alive' right before it serve any purpose either?

that has some marginal use: it shows that we are past the really basic 
system setup code, we decompressed the kernel and entered protected mode 
with boot paging enabled.

we had bugs in the past where we'd hang/crash after GRUB starts us and 
before we reach this printk.

OTOH ... forcing it upon all users is strong. Feel free to send another 
patch that removes it.

	Ingo

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

* Re: [PATCH] x86_64: be less annoying on boot
  2008-09-27 18:50     ` Ingo Molnar
@ 2008-09-27 18:51       ` Ingo Molnar
  2008-09-27 19:11       ` dcg
  1 sibling, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2008-09-27 18:51 UTC (permalink / raw)
  To: linux-kernel, Thomas Gleixner, H. Peter Anvin, Bill Nottingham


(Cc: added. Mail-Followup-To is evil.)

* Ingo Molnar <mingo@elte.hu> wrote:

> 
> * Bill Nottingham <notting@redhat.com> wrote:
> 
> > Ingo Molnar (mingo@elte.hu) said: 
> > > > (Alternatively, just remove them, of course...)
> > > 
> > > LOL :) Applied the commit below to tip/x86/debug, thanks Bill!
> > 
> > Does the 'kernel alive' right before it serve any purpose either?
> 
> that has some marginal use: it shows that we are past the really basic 
> system setup code, we decompressed the kernel and entered protected mode 
> with boot paging enabled.
> 
> we had bugs in the past where we'd hang/crash after GRUB starts us and 
> before we reach this printk.
> 
> OTOH ... forcing it upon all users is strong. Feel free to send another 
> patch that removes it.
> 
> 	Ingo

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

* Re: [PATCH] x86_64: be less annoying on boot
  2008-09-27 18:50     ` Ingo Molnar
  2008-09-27 18:51       ` Ingo Molnar
@ 2008-09-27 19:11       ` dcg
  2008-09-27 19:18         ` Ingo Molnar
  1 sibling, 1 reply; 10+ messages in thread
From: dcg @ 2008-09-27 19:11 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin

El Sat, 27 Sep 2008 20:50:27 +0200, Ingo Molnar <mingo@elte.hu> escribió:

> that has some marginal use: it shows that we are past the really basic 
> system setup code, we decompressed the kernel and entered protected mode 
> with boot paging enabled.

What I find annoying about that printk is that I see it even with the "quiet"
boot flag.

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

* Re: [PATCH] x86_64: be less annoying on boot
  2008-09-27 19:11       ` dcg
@ 2008-09-27 19:18         ` Ingo Molnar
  2008-09-28 16:49           ` dcg
  2008-09-28 16:53           ` Andi Kleen
  0 siblings, 2 replies; 10+ messages in thread
From: Ingo Molnar @ 2008-09-27 19:18 UTC (permalink / raw)
  To: dcg; +Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin


* dcg <diegocg@gmail.com> wrote:

> El Sat, 27 Sep 2008 20:50:27 +0200, Ingo Molnar <mingo@elte.hu> escribió:
> 
> > that has some marginal use: it shows that we are past the really 
> > basic system setup code, we decompressed the kernel and entered 
> > protected mode with boot paging enabled.
> 
> What I find annoying about that printk is that I see it even with the 
> "quiet" boot flag.

that's a property of early_printk() - it just doesnt listen to any of 
the normal printk modifiers. (and that's the point of early_printk())

could you please send a patch that only calls that early_printk() if 
console_loglevel == 10? (i.e. if "debug" has been passed)

	Ingo

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

* Re: [PATCH] x86_64: be less annoying on boot
  2008-09-27 19:18         ` Ingo Molnar
@ 2008-09-28 16:49           ` dcg
  2008-09-29  8:06             ` Ingo Molnar
  2008-09-28 16:53           ` Andi Kleen
  1 sibling, 1 reply; 10+ messages in thread
From: dcg @ 2008-09-28 16:49 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin

El Sat, 27 Sep 2008 21:18:24 +0200, Ingo Molnar <mingo@elte.hu> escribió:

> could you please send a patch that only calls that early_printk() if 
> console_loglevel == 10? (i.e. if "debug" has been passed)


Sure, here it is.



Honour "quiet" boot parameter in early_printk() calls


Signed-off-by: Diego Calleja <diegocg@gmail.com>
---
 arch/x86/kernel/head64.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: 2.6/arch/x86/kernel/head64.c
===================================================================
--- 2.6.orig/arch/x86/kernel/head64.c	2008-09-27 22:54:41.000000000 +0200
+++ 2.6/arch/x86/kernel/head64.c	2008-09-27 23:14:02.000000000 +0200
@@ -108,11 +108,13 @@
 	}
 	load_idt((const struct desc_ptr *)&idt_descr);
 
-	early_printk("Kernel alive\n");
+	if (console_loglevel == 10)
+		early_printk("Kernel alive\n");
 
 	x86_64_init_pda();
 
-	early_printk("Kernel really alive\n");
+	if (console_loglevel == 10)
+		early_printk("Kernel really alive\n");
 
 	x86_64_start_reservations(real_mode_data);
 }



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

* Re: [PATCH] x86_64: be less annoying on boot
  2008-09-27 19:18         ` Ingo Molnar
  2008-09-28 16:49           ` dcg
@ 2008-09-28 16:53           ` Andi Kleen
  1 sibling, 0 replies; 10+ messages in thread
From: Andi Kleen @ 2008-09-28 16:53 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: dcg, linux-kernel, Thomas Gleixner, H. Peter Anvin

Ingo Molnar <mingo@elte.hu> writes:
>
> that's a property of early_printk() - it just doesnt listen to any of 
> the normal printk modifiers. (and that's the point of early_printk())
>
> could you please send a patch that only calls that early_printk() if 
> console_loglevel == 10? (i.e. if "debug" has been passed)

That would be useless because the parameters are not parsed at this point.

I personally find this early printk very useful for the reason Ingo
noted earlier (you know you're already past the boot loader). And that
can be very useful in debugging. Even for that that anonymous "quiet" person
who posted earlier. Two are not needed though.

-Andi
-- 
ak@linux.intel.com

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

* Re: [PATCH] x86_64: be less annoying on boot
  2008-09-28 16:49           ` dcg
@ 2008-09-29  8:06             ` Ingo Molnar
  0 siblings, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2008-09-29  8:06 UTC (permalink / raw)
  To: dcg; +Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin


* dcg <diegocg@gmail.com> wrote:

> El Sat, 27 Sep 2008 21:18:24 +0200, Ingo Molnar <mingo@elte.hu> escribió:
> 
> > could you please send a patch that only calls that early_printk() if 
> > console_loglevel == 10? (i.e. if "debug" has been passed)
> 
> 
> Sure, here it is.
> 
> 
> 
> Honour "quiet" boot parameter in early_printk() calls
> 
> 
> Signed-off-by: Diego Calleja <diegocg@gmail.com>

applied to tip/x86/debug, thanks Diego.

If anyone can see other too-verbose-bootup-message annoyances during 
default distro bootups, please send patches.

	Ingo

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

end of thread, other threads:[~2008-09-29  8:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-24 18:35 [PATCH] x86_64: be less annoying on boot Bill Nottingham
2008-09-25  9:15 ` Ingo Molnar
2008-09-25 16:13   ` Bill Nottingham
2008-09-27 18:50     ` Ingo Molnar
2008-09-27 18:51       ` Ingo Molnar
2008-09-27 19:11       ` dcg
2008-09-27 19:18         ` Ingo Molnar
2008-09-28 16:49           ` dcg
2008-09-29  8:06             ` Ingo Molnar
2008-09-28 16:53           ` Andi Kleen

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