From: "Jan Beulich" Subject: Re: [Patch 2 of 2]: PV-domain SMP performance Linux-part Date: Wed, 17 Dec 2008 15:06:31 +0000 Message-ID: <49492387.76E4.0078.0@novell.com> References: <4948EF0B.6090404@fujitsu-siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4948EF0B.6090404@fujitsu-siemens.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Juergen Gross Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org >--- a/include/asm-x86_64/mach-xen/asm/irqflags.h Sat Dec 13 = 16:00:43 2008 +0000 >+++ b/include/asm-x86_64/mach-xen/asm/irqflags.h Wed Dec 17 = 13:12:53 2008 +0100 >@@ -33,8 +33,12 @@ do { = \ > vcpu_info_t *_vcpu; \ > barrier(); \ > _vcpu =3D current_vcpu_info(); \ >- if ((_vcpu->evtchn_upcall_mask =3D (x)) =3D=3D 0) { = \ >+ if ( !(x) ) { \ This isn't correct, as it breaks 0->1 transitions (there are a few = instances of this in the kernel). >+ _vcpu->no_desched =3D 0; = \ >+ _vcpu->evtchn_upcall_mask =3D 0; = \ > barrier(); /* unmask then check (avoid races) */ \ >+ if ( unlikely(_vcpu->desched_delay) ) \ >+ (void)((HYPERVISOR_sched_op(SCHEDOP_yield, = _vcpu))?:0); \ Why not just cast the function result to void? Likewise further below... > if ( unlikely(_vcpu->evtchn_upcall_pending) ) \ > force_evtchn_callback(); \ > } \ Jan