[PATCH] add "notime" boot option

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Randy Dunlap
Date: Tuesday, May 22, 2007 - 12:09 pm

From: Randy Dunlap <randy.dunlap@oracle.com>

Add "notime" boot option to prevent timing data from being printed on
each printk message line.

We've seen a few cases of 'time' data locking problems (possibly
involving netconsole or net drivers).  If a kernel is built with
CONFIG_PRINTK_TIME=y, it may have a boot locking hang.  Booting
with "notime" may (i.e., could) prevent the lock hang and allow the
kernel to boot successfully, without requiring a kernel rebuild.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 Documentation/kernel-parameters.txt |    2 ++
 kernel/printk.c                     |   10 +++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

--- linux-2622-rc2.orig/Documentation/kernel-parameters.txt
+++ linux-2622-rc2/Documentation/kernel-parameters.txt
@@ -1227,6 +1227,8 @@ and is between 256 and 4096 characters. 
 
 	nosync		[HW,M68K] Disables sync negotiation for all devices.
 
+	notime		Do not print timing data on each printk message line.
+
 	notsc		[BUGS=IA-32] Disable Time Stamp Counter
 
 	nousb		[USB] Disable the USB subsystem
--- linux-2622-rc2.orig/kernel/printk.c
+++ linux-2622-rc2/kernel/printk.c
@@ -458,9 +458,17 @@ static int __init printk_time_setup(char
 	printk_time = 1;
 	return 1;
 }
-
 __setup("time", printk_time_setup);
 
+static int __init printk_notime_setup(char *str)
+{
+	if (*str)
+		return 0;
+	printk_time = 0;
+	return 1;
+}
+__setup("notime", printk_notime_setup);
+
 __attribute__((weak)) unsigned long long printk_clock(void)
 {
 	return sched_clock();
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] add "notime" boot option, Randy Dunlap, (Tue May 22, 12:09 pm)
Re: [PATCH] add &quot;notime&quot; boot option, Dave Jones, (Tue May 22, 12:40 pm)
Re: [PATCH] add &quot;notime&quot; boot option, Randy Dunlap, (Tue May 22, 1:00 pm)
Re: [PATCH] add &quot;notime&quot; boot option, Michael Tokarev, (Wed May 23, 4:03 am)
Re: [PATCH] add &quot;notime&quot; boot option, Randy Dunlap, (Wed May 23, 10:04 am)
Re: [PATCH] add &quot;notime&quot; boot option, Rene Herman, (Wed May 23, 12:15 pm)
Re: [PATCH] add &quot;notime&quot; boot option, Randy Dunlap, (Wed May 23, 1:55 pm)
Re: [PATCH] add &quot;notime&quot; boot option, Rene Herman, (Wed May 23, 9:54 pm)
Re: [PATCH] add &quot;notime&quot; boot option, Randy Dunlap, (Wed May 23, 10:08 pm)
Re: [PATCH] add &quot;notime&quot; boot option, Rene Herman, (Wed May 23, 10:11 pm)
Re: [PATCH] add &quot;notime&quot; boot option, Rene Herman, (Wed May 23, 11:29 pm)
Re: [PATCH] add &quot;notime&quot; boot option, Jan Engelhardt, (Thu May 24, 9:13 am)
Re: [PATCH] add &quot;notime&quot; boot option, Randy Dunlap, (Thu May 24, 9:24 am)
Re: [PATCH] add &quot;notime&quot; boot option, Jan Engelhardt, (Thu May 24, 9:33 am)
[PATCH] use printk.time option, drop time/notime, Randy Dunlap, (Thu May 24, 5:15 pm)
Re: [PATCH] use printk.time option, drop time/notime, Andrew Morton, (Tue May 29, 1:07 pm)
Re: [PATCH] use printk.time option, drop time/notime, Jan Engelhardt, (Tue May 29, 2:28 pm)
[PATCH v3] add printk.time option, deprecate 'time', Randy Dunlap, (Wed May 30, 11:37 am)