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-ia64-devel

RE: [Xen-ia64-devel] Re: [Xen-devel] [PATCH] fix event channelnotificati

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "Isaku Yamahata" <yamahata@xxxxxxxxxxxxx>
Subject: RE: [Xen-ia64-devel] Re: [Xen-devel] [PATCH] fix event channelnotification loss on IA64
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Fri, 30 Jun 2006 10:57:18 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 29 Jun 2006 19:58:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcabgKPbfdiQz0ACSISluUkTLBz3nAAbuBPQ
Thread-topic: [Xen-ia64-devel] Re: [Xen-devel] [PATCH] fix event channelnotification loss on IA64
>From: Keir Fraser
>Sent: 2006年6月29日 21:29
>
>On 29 Jun 2006, at 06:43, Isaku Yamahata wrote:
>
>> evtchn_do_upcall() has a micro optimization which is depends on
>> that xchg is a barrier.
>> However xchg of IA64 has acquire semantics so that event
>> channel notification is lost sometimes. This patch fixes it.
>
>clear_bit() isn't a barrier either (at least according to Linux bitop
>semantics). You want 'rmb();'. I suggest just putting it inside ifndef
>CONFIG_X86, with the comment about XCHG being a barrier on x86
>placed
>just before the ifndef. Leave the zap of pending flag as a plain write.
>
>  -- Keir
>

        Yes, the explicit semantic of clear_bit doesn’t contain the barrier, 
which however implicitly imposes a partial barrier on xen/ia64 due to its 
memory model. On IA64, a acquire semantic serves to ensure current 
instruction made visible prior to all subsequent instructions, and clear_bit 
on IA64 is implemented with cmpxchg.acq which can ensure subsequent 
event manipulations strictly following event indicator clearance.

        But, in this special case, seems to use rmb() is preferred, since this 
clearance doesn't need to be a semaphore operation which should be 
light.

Thanks
Kevin

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

<Prev in Thread] Current Thread [Next in Thread>
  • RE: [Xen-ia64-devel] Re: [Xen-devel] [PATCH] fix event channelnotification loss on IA64, Tian, Kevin <=