* [PATCH] printk: add Kconfig for default console loglevel
@ 2011-07-26 15:33 Dave Reisner
2011-07-26 16:37 ` Randy Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Dave Reisner @ 2011-07-26 15:33 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Dave Reisner
Keep the historical default of 7, but allow distributions and users to
tune this value instead of requiring a kernel cmdline parameter.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
---
kernel/printk.c | 4 +++-
lib/Kconfig.debug | 10 ++++++++++
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/kernel/printk.c b/kernel/printk.c
index 37dff34..fabc216 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -58,7 +58,9 @@ void asmlinkage __attribute__((weak)) early_printk(const char *fmt, ...)
/* We show everything that is MORE important than this.. */
#define MINIMUM_CONSOLE_LOGLEVEL 1 /* Minimum loglevel we let people use */
-#define DEFAULT_CONSOLE_LOGLEVEL 7 /* anything MORE serious than KERN_DEBUG */
+
+/* default to 7 -- anything MORE serious than KERN_DEBUG */
+#define DEFAULT_CONSOLE_LOGLEVEL CONFIG_DEFAULT_CONSOLE_LOGLEVEL
DECLARE_WAIT_QUEUE_HEAD(log_wait);
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index c0cb9c4..6caa66e 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -21,6 +21,16 @@ config DEFAULT_MESSAGE_LOGLEVEL
that are auditing their logs closely may want to set it to a lower
priority.
+config DEFAULT_CONSOLE_LOGLEVEL
+ int "Default console log level (1-7)"
+ range 1 7
+ default "7"
+ help
+ Default console log level setting for printk statements.
+
+ This was hard-coded to KERN_INFO (7) since at least 2.6.12. You may
+ wish to turn this down to 4 for a quieter console.
+
config ENABLE_WARN_DEPRECATED
bool "Enable __deprecated logic"
default y
--
1.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] printk: add Kconfig for default console loglevel
2011-07-26 15:33 [PATCH] printk: add Kconfig for default console loglevel Dave Reisner
@ 2011-07-26 16:37 ` Randy Dunlap
2011-07-26 17:01 ` Joe Perches
0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2011-07-26 16:37 UTC (permalink / raw)
To: Dave Reisner; +Cc: Andrew Morton, linux-kernel, Dave Reisner
On Tue, 26 Jul 2011 11:33:51 -0400 Dave Reisner wrote:
> Keep the historical default of 7, but allow distributions and users to
> tune this value instead of requiring a kernel cmdline parameter.
Hi,
Please explain how this is different from what is already in lib/Kconfig.debug:
config DEFAULT_MESSAGE_LOGLEVEL
int "Default message log level (1-7)"
range 1 7
default "4"
help
Default log level for printk statements with no specified priority.
> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
> ---
> kernel/printk.c | 4 +++-
> lib/Kconfig.debug | 10 ++++++++++
> 2 files changed, 13 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/printk.c b/kernel/printk.c
> index 37dff34..fabc216 100644
> --- a/kernel/printk.c
> +++ b/kernel/printk.c
> @@ -58,7 +58,9 @@ void asmlinkage __attribute__((weak)) early_printk(const char *fmt, ...)
>
> /* We show everything that is MORE important than this.. */
> #define MINIMUM_CONSOLE_LOGLEVEL 1 /* Minimum loglevel we let people use */
> -#define DEFAULT_CONSOLE_LOGLEVEL 7 /* anything MORE serious than KERN_DEBUG */
> +
> +/* default to 7 -- anything MORE serious than KERN_DEBUG */
> +#define DEFAULT_CONSOLE_LOGLEVEL CONFIG_DEFAULT_CONSOLE_LOGLEVEL
>
> DECLARE_WAIT_QUEUE_HEAD(log_wait);
>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index c0cb9c4..6caa66e 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -21,6 +21,16 @@ config DEFAULT_MESSAGE_LOGLEVEL
> that are auditing their logs closely may want to set it to a lower
> priority.
>
> +config DEFAULT_CONSOLE_LOGLEVEL
> + int "Default console log level (1-7)"
> + range 1 7
> + default "7"
> + help
> + Default console log level setting for printk statements.
> +
> + This was hard-coded to KERN_INFO (7) since at least 2.6.12. You may
> + wish to turn this down to 4 for a quieter console.
> +
> config ENABLE_WARN_DEPRECATED
> bool "Enable __deprecated logic"
> default y
> --
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] printk: add Kconfig for default console loglevel
2011-07-26 16:37 ` Randy Dunlap
@ 2011-07-26 17:01 ` Joe Perches
2011-07-26 17:16 ` Randy Dunlap
2011-07-29 12:58 ` Dave Reisner
0 siblings, 2 replies; 5+ messages in thread
From: Joe Perches @ 2011-07-26 17:01 UTC (permalink / raw)
To: Randy Dunlap; +Cc: Dave Reisner, Andrew Morton, linux-kernel, Dave Reisner
On Tue, 2011-07-26 at 09:37 -0700, Randy Dunlap wrote:
> On Tue, 26 Jul 2011 11:33:51 -0400 Dave Reisner wrote:
> > Keep the historical default of 7, but allow distributions and users to
> > tune this value instead of requiring a kernel cmdline parameter.
> Please explain how this is different from what is already in lib/Kconfig.debug:
> config DEFAULT_MESSAGE_LOGLEVEL
> int "Default message log level (1-7)"
> range 1 7
> default "4"
> help
> Default log level for printk statements with no specified priority.
DEFAULT_MESSAGE_LOGLEVEL sets a KERN_<level> for
printks without a KERN_<level>.
> > +config DEFAULT_CONSOLE_LOGLEVEL
> > + int "Default console log level (1-7)"
> > + range 1 7
> > + default "7"
> > + help
> > + Default console log level setting for printk statements.
> > +
> > + This was hard-coded to KERN_INFO (7) since at least 2.6.12. You may
> > + wish to turn this down to 4 for a quieter console.
> > +
This allows 'unimportant' messages to not be shown by default.
I think there are lots of KERN_INFO messages that are
miscategorized. This change might cause some shifting
of KERN_<level>s in the future, so it's OK by me.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] printk: add Kconfig for default console loglevel
2011-07-26 17:01 ` Joe Perches
@ 2011-07-26 17:16 ` Randy Dunlap
2011-07-29 12:58 ` Dave Reisner
1 sibling, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2011-07-26 17:16 UTC (permalink / raw)
To: Joe Perches; +Cc: Dave Reisner, Andrew Morton, linux-kernel, Dave Reisner
On Tue, 26 Jul 2011 10:01:45 -0700 Joe Perches wrote:
> On Tue, 2011-07-26 at 09:37 -0700, Randy Dunlap wrote:
> > On Tue, 26 Jul 2011 11:33:51 -0400 Dave Reisner wrote:
> > > Keep the historical default of 7, but allow distributions and users to
> > > tune this value instead of requiring a kernel cmdline parameter.
> > Please explain how this is different from what is already in lib/Kconfig.debug:
> > config DEFAULT_MESSAGE_LOGLEVEL
> > int "Default message log level (1-7)"
> > range 1 7
> > default "4"
> > help
> > Default log level for printk statements with no specified priority.
>
> DEFAULT_MESSAGE_LOGLEVEL sets a KERN_<level> for
> printks without a KERN_<level>.
>
> > > +config DEFAULT_CONSOLE_LOGLEVEL
> > > + int "Default console log level (1-7)"
> > > + range 1 7
> > > + default "7"
> > > + help
> > > + Default console log level setting for printk statements.
> > > +
> > > + This was hard-coded to KERN_INFO (7) since at least 2.6.12. You may
> > > + wish to turn this down to 4 for a quieter console.
> > > +
>
> This allows 'unimportant' messages to not be shown by default.
Thanks. Maybe Kconfig help text could be clearer.
> I think there are lots of KERN_INFO messages that are
> miscategorized. This change might cause some shifting
> of KERN_<level>s in the future, so it's OK by me.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] printk: add Kconfig for default console loglevel
2011-07-26 17:01 ` Joe Perches
2011-07-26 17:16 ` Randy Dunlap
@ 2011-07-29 12:58 ` Dave Reisner
1 sibling, 0 replies; 5+ messages in thread
From: Dave Reisner @ 2011-07-29 12:58 UTC (permalink / raw)
To: Joe Perches; +Cc: Randy Dunlap, Andrew Morton, linux-kernel, Dave Reisner
On Tue, Jul 26, 2011 at 10:01:45AM -0700, Joe Perches wrote:
> On Tue, 2011-07-26 at 09:37 -0700, Randy Dunlap wrote:
> > On Tue, 26 Jul 2011 11:33:51 -0400 Dave Reisner wrote:
> > > Keep the historical default of 7, but allow distributions and users to
> > > tune this value instead of requiring a kernel cmdline parameter.
> > Please explain how this is different from what is already in lib/Kconfig.debug:
> > config DEFAULT_MESSAGE_LOGLEVEL
> > int "Default message log level (1-7)"
> > range 1 7
> > default "4"
> > help
> > Default log level for printk statements with no specified priority.
>
> DEFAULT_MESSAGE_LOGLEVEL sets a KERN_<level> for
> printks without a KERN_<level>.
>
> > > +config DEFAULT_CONSOLE_LOGLEVEL
> > > + int "Default console log level (1-7)"
> > > + range 1 7
> > > + default "7"
> > > + help
> > > + Default console log level setting for printk statements.
> > > +
> > > + This was hard-coded to KERN_INFO (7) since at least 2.6.12. You may
> > > + wish to turn this down to 4 for a quieter console.
> > > +
>
> This allows 'unimportant' messages to not be shown by default.
>
> I think there are lots of KERN_INFO messages that are
> miscategorized. This change might cause some shifting
> of KERN_<level>s in the future, so it's OK by me.
>
Joe,
Did you want me to resubmit with your addition? Do I need to cc anyone
else to move this along to Linus's integration branch? Apologies, my
familiarity with the merge process for the kernel stops at the
documentation in the git repo.
dave
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-07-29 12:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-26 15:33 [PATCH] printk: add Kconfig for default console loglevel Dave Reisner
2011-07-26 16:37 ` Randy Dunlap
2011-07-26 17:01 ` Joe Perches
2011-07-26 17:16 ` Randy Dunlap
2011-07-29 12:58 ` Dave Reisner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox