Isaku Yamahata
2006-Jun-29 05:43 UTC
[Xen-devel] [PATCH] fix event channel notification loss on IA64
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. -- yamahata _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Jun-29 13:28 UTC
Re: [Xen-devel] [PATCH] fix event channel notification loss on IA64
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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Isaku Yamahata
2006-Jun-30 01:48 UTC
Re: [Xen-devel] [PATCH] fix event channel notification loss on IA64
On Thu, Jun 29, 2006 at 02:28:37PM +0100, Keir Fraser wrote:> > 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.I see. Here is the updated patch. -- yamahata _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel