Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933934Ab3JOVM5 (ORCPT ); Tue, 15 Oct 2013 17:12:57 -0400 Received: from mail-we0-f182.google.com ([74.125.82.182]:63701 "EHLO mail-we0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933754Ab3JOVM4 (ORCPT ); Tue, 15 Oct 2013 17:12:56 -0400 Date: Tue, 15 Oct 2013 23:12:52 +0200 From: Frederic Weisbecker To: Joe Perches Cc: Andrew Morton , LKML , Steven Rostedt , Linus Torvalds , "H. Peter Anvin" , Peter Zijlstra , Thomas Gleixner , Liu Chuansheng , Ingo Molnar Subject: Re: [PATCH 2/3] core: Convert printk_once to use DO_ONCE Message-ID: <20131015211251.GE3269@localhost.localdomain> References: <1381870252-5430-1-git-send-email-fweisbec@gmail.com> <1381870252-5430-3-git-send-email-fweisbec@gmail.com> <1381870805.22110.37.camel@joe-AO722> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1381870805.22110.37.camel@joe-AO722> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 885 Lines: 27 On Tue, Oct 15, 2013 at 02:00:05PM -0700, Joe Perches wrote: > On Tue, 2013-10-15 at 22:50 +0200, Frederic Weisbecker wrote: > [] > > diff --git a/include/linux/printk.h b/include/linux/printk.h > [] > > @@ -252,14 +253,7 @@ extern asmlinkage void dump_stack(void) __cold; > > > > #ifdef CONFIG_PRINTK > > #define printk_once(fmt, ...) \ > > -({ \ > > - static bool __print_once; \ > > - \ > > - if (!__print_once) { \ > > - __print_once = true; \ > > - printk(fmt, ##__VA_ARGS__); \ > > - } \ > > -}) > > + DO_ONCE(printk(fmt, ##__VA_ARGS__)); > > It's hard to believe the overhead is worth it. Which overhead? -- 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/