Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753682Ab3EJPmS (ORCPT ); Fri, 10 May 2013 11:42:18 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60439 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753253Ab3EJPmR (ORCPT ); Fri, 10 May 2013 11:42:17 -0400 Date: Fri, 10 May 2013 17:42:13 +0200 (CEST) From: Jiri Kosina To: Frederic Weisbecker Cc: Borislav Petkov , Tony Luck , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: NOHZ: WARNING: at arch/x86/kernel/smp.c:123 native_smp_send_reschedule In-Reply-To: Message-ID: References: <20130510002930.GB2394@somewhere> <20130510092811.GA22942@pd.tnic> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 763 Lines: 21 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/