WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [Patch] x86: enforce strict memory order for x2apic

To: 'Jan Beulich' <jbeulich@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [Patch] x86: enforce strict memory order for x2apic
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Thu, 25 Sep 2008 16:29:27 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Thu, 25 Sep 2008 01:29:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <48DB66EF.76E4.0078.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <D8078B8B3B09934AA9F8F2D5FB3F28CE08873AF318@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <48DB66EF.76E4.0078.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acke6BxdawHaFq+URY+zIa4qA4I70QAABTqA
Thread-topic: [Xen-devel] [Patch] x86: enforce strict memory order for x2apic
>From: Jan Beulich [mailto:jbeulich@xxxxxxxxxx]
>Sent: 2008年9月25日 16:25
>
>>>> "Tian, Kevin" <kevin.tian@xxxxxxxxx> 25.09.08 08:55 >>>
>>We kick a fix by simply using 'mb' instead of 'wmb'.
>>This can effectively enforce program order, as args
>>for WRMSR are loaded from memory. Those memory loads
>>are ordered by mb and so does WRMSR. Alternative is
>
>The whole change looks a little dubious to me, perhaps largely
>as I can't
>spot which WRMSR (loading its arguments from memory) you're talking
>about.

WRMSR to ICR, where EDX/EAX is derived from cpu_online
_map and x86_cpu_to_apicid

>
>>to add a 'fence' parameter to send_IPI_mask and then
>>only use 'mb' in x2apic version. We think it's not
>>necessary to go with that complexity.
>
>On the other hand you're penalizing LAPIC systems with this, too. I'm
>not certain that's better than fixing the (incorrect)
>assumptions just in
>the x2APIC case.

I agree. I'll revise the patch to add a 'mb()' in x2APIC instead,
though that may bring a bit overhead to cases when fencing
is not required, like event check IPI.

Thanks,
Kevin
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel