[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1305101739030.23038@pobox.suse.cz>
Date: Fri, 10 May 2013 17:42:13 +0200 (CEST)
From: Jiri Kosina <jkosina@...e.cz>
To: Frederic Weisbecker <fweisbec@...il.com>
Cc: Borislav Petkov <bp@...en8.de>, Tony Luck <tony.luck@...el.com>,
linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: NOHZ: WARNING: at arch/x86/kernel/smp.c:123
native_smp_send_reschedule
On Fri, 10 May 2013, Frederic Weisbecker wrote:
> In fact it would be nice to have DO_ONCE(something) and stuff whatever
> we want inside.
> All the printk_once() et. al could even be implemented using that.
Sounds nice, but if it's going to be used for something else than purely
debugging output, one has to keep in mind that printk_once() as currently
implemented is actually racy.
I.e. you'd need to have locking (or at least cmpxchg) protecting the
update of the static variable.
--
Jiri Kosina
SUSE Labs
--
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