From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: Q: smp.c && barriers (Was: [PATCH 1/4] generic-smp: remove single ipi fallback for smp_call_function_many()) Date: Wed, 18 Feb 2009 18:05:17 +0100 Message-ID: <20090218170517.GA9769@elte.hu> References: <20090217112657.GE26402@wotan.suse.de> <20090217192810.GA4980@redhat.com> <20090217213256.GJ6761@linux.vnet.ibm.com> <20090217214518.GA13189@redhat.com> <20090217223910.GM6761@linux.vnet.ibm.com> <20090218135212.GB23125@wotan.suse.de> <20090218162116.GC29863@elte.hu> <20090218165808.GA9120@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mx2.mail.elte.hu ([157.181.151.9]:44070 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753122AbZBRRFq (ORCPT ); Wed, 18 Feb 2009 12:05:46 -0500 Content-Disposition: inline In-Reply-To: <20090218165808.GA9120@elte.hu> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Linus Torvalds Cc: Suresh Siddha , "Pallipadi, Venkatesh" , Yinghai Lu , Nick Piggin , "Paul E. McKenney" , Oleg Nesterov , Peter Zijlstra , Jens Axboe , Rusty Russell , Steven Rostedt , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org an off-list comment pointed out this piece of information as well: http://www.sandpile.org/ia32/coherent.htm A WRMSR to one of the x2APIC MSRs (0000_0800h...0000_0BFFh) is not guaranteed to be serializing. So i suspect we should just enclose it in smp_mb() pairs to make sure it's a full barrier in both directions? Although since it's an explicitly async mechanism with no ordering expectations whatsoever, just doing an smp_mb() before it should be enough, to make sure the IPI can never arrive to another CPU/core faster than the event-horizon/visibility of preceding operations. Ingo