From: Andy Whitcroft <apw@canonical.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Crutcher Dunnavant <crutcher+kernel@datastacks.com>,
linux-kernel@vger.kernel.org, Andy Whitcroft <apw@canonical.com>
Subject: [PATCH 3/3] sysrq: add commentary on why we use the console loglevel over using KERN_EMERG
Date: Wed, 7 Jan 2009 21:49:18 +0000 [thread overview]
Message-ID: <1231364958-26253-4-git-send-email-apw@canonical.com> (raw)
In-Reply-To: <1231364958-26253-1-git-send-email-apw@canonical.com>
Add an explanitory comment as to why we modify the kernel console
loglevel rather than simply moving sysrq messages to KERN_EMERG level.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
drivers/char/sysrq.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index d41b9f6..33a9351 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -473,6 +473,12 @@ void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)
unsigned long flags;
spin_lock_irqsave(&sysrq_key_table_lock, flags);
+ /*
+ * Raise the apparent loglevel to maximum so that the sysrq header
+ * is shown to provide the user with positive feedback. We do not
+ * simply emit this at KERN_EMERG as that would change message
+ * routing in the consumers of /proc/kmsg.
+ */
orig_log_level = console_loglevel;
console_loglevel = 7;
printk(KERN_INFO "SysRq : ");
--
1.6.0.4.911.gc990
next prev parent reply other threads:[~2009-01-07 21:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 12:37 sysrq loglevel Andy Whitcroft
2009-01-07 19:25 ` Andrew Morton
2009-01-07 20:50 ` Andy Whitcroft
2009-01-07 21:49 ` [PATCH 0/3] document sysrq interaction with loglevels Andy Whitcroft
2009-01-07 21:49 ` [PATCH 1/3] sysrq documentation: remove the redundant updated date Andy Whitcroft
2009-01-07 21:49 ` [PATCH 2/3] sysrq documentation: document why the command header only is shown Andy Whitcroft
2009-01-07 23:30 ` Randy Dunlap
2009-01-07 21:49 ` Andy Whitcroft [this message]
2009-01-08 8:44 ` [PATCH 3/3] sysrq: add commentary on why we use the console loglevel over using KERN_EMERG Nick Andrew
2009-01-08 2:10 ` [PATCH 0/3] document sysrq interaction with loglevels V2 Andy Whitcroft
2009-01-08 2:10 ` [PATCH 1/3] sysrq documentation: remove the redundant updated date Andy Whitcroft
2009-01-08 2:10 ` [PATCH 2/3] sysrq documentation: document why the command header only is shown Andy Whitcroft
2009-01-08 2:10 ` [PATCH 3/3] sysrq: add commentary on why we use the console loglevel over using KERN_EMERG Andy Whitcroft
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=1231364958-26253-4-git-send-email-apw@canonical.com \
--to=apw@canonical.com \
--cc=akpm@linux-foundation.org \
--cc=crutcher+kernel@datastacks.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®