mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Liu, Chuansheng" <chuansheng.liu@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	Yanmin "Zhang <yanmin_zhang@linux.intel.com>
	(yanmin_zhang@linux.intel.com)"  <yanmin_zhang@linux.intel.com>
Subject: Re: [PATCH] printk: do not flush the logbuf into console driver in interrupt
Date: Thu, 17 May 2012 11:31:04 +0200	[thread overview]
Message-ID: <1337247064.4281.18.camel@twins> (raw)
In-Reply-To: <27240C0AC20F114CBF8149A2696CBE4A0B1F0B@SHSMSX101.ccr.corp.intel.com>

On Thu, 2012-05-17 at 07:46 +0000, Liu, Chuansheng wrote:
> From: liu chuansheng <chuansheng.liu@intel.com>
> Subject: [PATCH] printk: do not flush the logbuf into console driver in interrupt
> 
> When irq handle tried to call printk, and it also has the chance to obtain the console sem,
> then flush the log buf to console driver,but the console driver often give several ms latency
> or more when much data in log buf existed, it will delay the irq handle.
> 
> The solution is when calling the printk in interrupt, just write the chars into log buf,
> and expect other threads to flush it into console driver.
> 
> Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
> 
> diff --git a/kernel/printk.c b/kernel/printk.c index b663c2c..99959e1 100644
> --- a/kernel/printk.c
> +++ b/kernel/printk.c
> @@ -804,7 +804,8 @@ static int console_trylock_for_printk(unsigned int cpu)
>                  * the buffer. We need to hold the console semaphore
>                  * in order to do this test safely.
>                  */
> -               if (!can_use_console(cpu)) {
> +               if (!can_use_console(cpu) ||
> +                       (in_interrupt() && (!oops_in_progress))) {
>                         console_locked = 0;
>                         wake = 1;
>                         retval = 0;

Uhm no.. I would very much like to get my OOPSes from interrupt context
to make it out to the console.

  reply	other threads:[~2012-05-17  9:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-17  7:46 Liu, Chuansheng
2012-05-17  9:31 ` Peter Zijlstra [this message]
2012-05-18  0:16   ` Liu, Chuansheng

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=1337247064.4281.18.camel@twins \
    --to=peterz@infradead.org \
    --cc=chuansheng.liu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=yanmin_zhang@linux.intel.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