From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755236AbZBRRQA (ORCPT ); Wed, 18 Feb 2009 12:16:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751697AbZBRRPv (ORCPT ); Wed, 18 Feb 2009 12:15:51 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:40569 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751458AbZBRRPu (ORCPT ); Wed, 18 Feb 2009 12:15:50 -0500 Date: Wed, 18 Feb 2009 09:14:51 -0800 (PST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Ingo Molnar 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 Subject: Re: Q: smp.c && barriers (Was: [PATCH 1/4] generic-smp: remove single ipi fallback for smp_call_function_many()) In-Reply-To: <20090218170517.GA9769@elte.hu> Message-ID: 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> <20090218170517.GA9769@elte.hu> User-Agent: Alpine 2.00 (LFD 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 On Wed, 18 Feb 2009, Ingo Molnar wrote: > > 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? Why would we care about "both directions"? I think putting an sfence _before_ the wrmsr (and not even all of them - just put it in front of the "send IPI" sequence) should be fine. Any other ordering sounds like just unnecessary overhead to me. We do want this to be low-overhead, even if we probably don't care _that_ much. Linus