From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [Patch 2 of 2]: PV-domain SMP performance Linux-part Date: Thu, 18 Dec 2008 08:18:40 +0100 Message-ID: <4949F950.80509@fujitsu-siemens.com> References: <4948EF0B.6090404@fujitsu-siemens.com> <49492387.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <49492387.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Jan Beulich wrote: >> --- 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 = current_vcpu_info(); \ >> - if ((_vcpu->evtchn_upcall_mask = (x)) == 0) { \ >> + if ( !(x) ) { \ > > This isn't correct, as it breaks 0->1 transitions (there are a few instances of > this in the kernel). Thanks! I will correct it. > >> + _vcpu->no_desched = 0; \ >> + _vcpu->evtchn_upcall_mask = 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... I took that from include/xen/hypercall.h, which mentioned problems with just casting the function result. Juergen -- Juergen Gross Principal Developer IP SW OS6 Telephone: +49 (0) 89 636 47950 Fujitsu Siemens Computers e-mail: juergen.gross@fujitsu-siemens.com Otto-Hahn-Ring 6 Internet: www.fujitsu-siemens.com D-81739 Muenchen Company details: www.fujitsu-siemens.com/imprint.html