mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	rene.herman@gmail.com, mjt@tls.msk.ru,
	Jan Engelhardt <jengelh@linux01.gwdg.de>
Subject: [PATCH v3] add printk.time option, deprecate 'time'
Date: Wed, 30 May 2007 11:37:00 -0700	[thread overview]
Message-ID: <20070530113700.73da8cd0.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20070529130705.fdf43e4b.akpm@linux-foundation.org>

On Tue, 29 May 2007 13:07:05 -0700 Andrew Morton wrote:

> That's going to break a *lot* of people's setups - timestamping appears
> to be very popular.  We will get sad emails from people.
> 
> If we're going to do this then I'm afraid we should retain the `time='
> thing for a while and add a this-is-going-away printk to it.

[$ checkpatch-v2.pl ~/patch/printk-time-onoff.patch 
Your patch has no obvious style problems and is ready for submission.]


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

Allow printk_time to be enabled or disabled at boot time.
Previously it could be enabled only, but not disabled.

Change printk_time from an int to a bool since that's what it is.
Make its logical (exposed) name just be "time" (was "printk_time").

Note:  Changes kernel boot option syntax from "time" to "printk.time=value".

Since printk_time is declared as a module_param, it can also be
changed at run-time by modifying
  /sys/module/printk/parameters/time
to a value of 1/Y/y to enabled it or 0/N/n to disable it.

Since printk_time is declared as a module_param, its value can also
be set at boot-time by using
  linux printk.time=<bool>

If the "time" boot option is used, print a message that it is deprecated
and will be removed.
Note its planned removal in feature-removal-schedule.txt.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 Documentation/feature-removal-schedule.txt |    7 +++++++
 Documentation/kernel-parameters.txt        |    4 ++++
 kernel/printk.c                            |    5 ++++-
 3 files changed, 15 insertions(+), 1 deletion(-)

--- linux-2622-rc3.orig/Documentation/kernel-parameters.txt
+++ linux-2622-rc3/Documentation/kernel-parameters.txt
@@ -1426,6 +1426,9 @@ and is between 256 and 4096 characters. 
 			autoconfiguration.
 			Ranges are in pairs (memory base and size).
 
+	printk.time=	Show timing data prefixed to each printk message line
+			Format: <bool>  (1/Y/y=enable, 0/N/n=disable)
+
 	profile=	[KNL] Enable kernel profiling via /proc/profile
 			Format: [schedule,]<number>
 			Param: "schedule" - profile schedule points.
@@ -1826,6 +1829,7 @@ and is between 256 and 4096 characters. 
 			Set number of hash buckets for TCP connection
 
 	time		Show timing data prefixed to each printk message line
+			[deprecated, see 'printk.time']
 
 	tipar.timeout=	[HW,PPT]
 			Set communications timeout in tenths of a second
--- linux-2622-rc3.orig/kernel/printk.c
+++ linux-2622-rc3/kernel/printk.c
@@ -449,13 +449,16 @@ static int printk_time = 1;
 #else
 static int printk_time = 0;
 #endif
-module_param(printk_time, int, S_IRUGO | S_IWUSR);
+module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR);
 
 static int __init printk_time_setup(char *str)
 {
 	if (*str)
 		return 0;
 	printk_time = 1;
+	printk(KERN_NOTICE "The 'time' option is deprecated and "
+		"is scheduled for removal in early 2008\n");
+	printk(KERN_NOTICE "Use 'printk.time=<value>' instead\n");
 	return 1;
 }
 
--- linux-2622-rc3.orig/Documentation/feature-removal-schedule.txt
+++ linux-2622-rc3/Documentation/feature-removal-schedule.txt
@@ -346,3 +346,10 @@ Who:  Tejun Heo <htejun@gmail.com>
 
 ---------------------------
 
+What:	'time' kernel boot parameter
+When:	January 2008
+Why:	replaced by 'printk.time=<value>' so that printk timestamps can be
+	enabled or disabled as needed
+Who:	Randy Dunlap <randy.dunlap@oracle.com>
+
+---------------------------

      parent reply	other threads:[~2007-05-30 18:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 19:09 [PATCH] add "notime" boot option Randy Dunlap
2007-05-22 19:40 ` Dave Jones
2007-05-22 20:00   ` Randy Dunlap
2007-05-23 11:03 ` Michael Tokarev
2007-05-23 17:04   ` Randy Dunlap
2007-05-23 19:15     ` Rene Herman
2007-05-23 20:55       ` Randy Dunlap
2007-05-24  4:54         ` Rene Herman
2007-05-24  5:08           ` Randy Dunlap
2007-05-24  5:11             ` Rene Herman
2007-05-24  6:29               ` Rene Herman
2007-05-24 16:13 ` Jan Engelhardt
2007-05-24 16:24   ` Randy Dunlap
2007-05-24 16:33     ` Jan Engelhardt
2007-05-25  0:15       ` [PATCH] use printk.time option, drop time/notime Randy Dunlap
2007-05-29 20:07         ` Andrew Morton
2007-05-29 21:28           ` Jan Engelhardt
2007-05-30 18:37           ` Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070530113700.73da8cd0.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjt@tls.msk.ru \
    --cc=rene.herman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome