Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966797Ab2ERAQj (ORCPT ); Thu, 17 May 2012 20:16:39 -0400 Received: from mga03.intel.com ([143.182.124.21]:3906 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933558Ab2ERAQh convert rfc822-to-8bit (ORCPT ); Thu, 17 May 2012 20:16:37 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="101423200" From: "Liu, Chuansheng" To: Peter Zijlstra CC: "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "Yanmin Zhang (yanmin_zhang@linux.intel.com)" Subject: RE: [PATCH] printk: do not flush the logbuf into console driver in interrupt Thread-Topic: [PATCH] printk: do not flush the logbuf into console driver in interrupt Thread-Index: AQHNNA/O5D5Fgjq34UmFIOYYpsVqOpbOrkLg Date: Fri, 18 May 2012 00:16:32 +0000 Message-ID: <27240C0AC20F114CBF8149A2696CBE4A0B2479@SHSMSX101.ccr.corp.intel.com> References: <27240C0AC20F114CBF8149A2696CBE4A0B1F0B@SHSMSX101.ccr.corp.intel.com> <1337247064.4281.18.camel@twins> In-Reply-To: <1337247064.4281.18.camel@twins> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2350 Lines: 52 > Uhm no.. I would very much like to get my OOPSes from interrupt context to > make it out to the console. (!oops_in_progress) this condition is in the patch, it should cover OOPSes output to console in interrupt context, I tested this case just now. > -----Original Message----- > From: Peter Zijlstra [mailto:peterz@infradead.org] > Sent: Thursday, May 17, 2012 5:31 PM > To: Liu, Chuansheng > Cc: linux-kernel@vger.kernel.org; tglx@linutronix.de; Yanmin Zhang > (yanmin_zhang@linux.intel.com) > Subject: Re: [PATCH] printk: do not flush the logbuf into console driver in > interrupt > > On Thu, 2012-05-17 at 07:46 +0000, Liu, Chuansheng wrote: > > From: liu chuansheng > > 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 > > > > 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/