Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759371AbYAXXRx (ORCPT ); Thu, 24 Jan 2008 18:17:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758783AbYAXXRd (ORCPT ); Thu, 24 Jan 2008 18:17:33 -0500 Received: from outbound-sin.frontbridge.com ([207.46.51.80]:31958 "EHLO outbound5-sin-R.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758723AbYAXXRb (ORCPT ); Thu, 24 Jan 2008 18:17:31 -0500 X-BigFish: VP X-MS-Exchange-Organization-Antispam-Report: OrigIP: 160.33.98.75;Service: EHS Message-ID: <47991DD7.9070009@am.sony.com> Date: Thu, 24 Jan 2008 15:23:03 -0800 From: Tim Bird User-Agent: Thunderbird 1.5.0.4 (X11/20060614) MIME-Version: 1.0 To: Peter Zijlstra CC: Steven Rostedt , Daniel Walker , LKML , Ingo Molnar , Linus Torvalds , Andrew Morton , Christoph Hellwig , Mathieu Desnoyers , Gregory Haskins , Arnaldo Carvalho de Melo , Thomas Gleixner , Sam Ravnborg , "Frank Ch. Eigler" , Jan Kiszka , John Stultz , Arjan van de Ven , Steven Rostedt Subject: Re: [PATCH] defer printks in irqs References: <20080123160236.969334052@goodmis.org> <20080123160441.236562634@goodmis.org> <1201107978.13596.16.camel@imap.mvista.com> <1201110185.13596.22.camel@imap.mvista.com> <47991454.50603@am.sony.com> <1201214935.6341.105.camel@lappy> In-Reply-To: <1201214935.6341.105.camel@lappy> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 24 Jan 2008 23:17:24.0739 (UTC) FILETIME=[4752DD30:01C85EDF] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1574 Lines: 42 Peter Zijlstra wrote: > I suspect these features reduce the chance a crash messages makes it out > onto the console, but fail to spot any of the copious text mention this > critical issue. Anything not in interrupts would not be deferred. The following code is meant to avoid deferring in oops as well. I'm not sure if that covers all crash cases or not. If you know of other cases, and ways to detect them, please advise. >> +#ifdef CONFIG_PRINTK_DEFER_IN_IRQ >> + /* >> + * If we're in an interrupt and it's not an emergency, >> + * don't emit to console just yet. >> + */ >> + if ((irqs_disabled() || in_interrupt()) && !oops_in_progress) { >> + defer = 1; >> + } >> +#endif I made the code conditional because printk messages are pretty critical for debugging, and I wanted someone to be aware if they altered the behavior in any way. I suspect that only in embedded, when people are having realtime performance problems, would this change be of interest. Please recognize that I'm not submitting this for kernel inclusion at this time. Please see the larger thread for context. That said, I appreciate the feedback on the code. -- Tim ============================= Tim Bird Architecture Group Chair, CE Linux Forum Senior Staff Engineer, Sony Corporation of America ============================= -- 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/