[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1381870805.22110.37.camel@joe-AO722>
Date: Tue, 15 Oct 2013 14:00:05 -0700
From: Joe Perches <joe@...ches.com>
To: Frederic Weisbecker <fweisbec@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
"H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Liu Chuansheng <chuansheng.liu@...el.com>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH 2/3] core: Convert printk_once to use DO_ONCE
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists