From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH 08/10] MCE: Relay UCR MCE to guest Date: Wed, 20 Oct 2010 17:03:51 -0500 Message-ID: <4CBF6747.3020308@linux.vnet.ibm.com> References: <10ae5833ff9de153c311917d532f3e84e5b00387.1287596626.git.mtosatti@redhat.com> <4CBF485C.9060808@linux.vnet.ibm.com> <4CBF65A7.3090903@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org, Avi Kivity To: Paolo Bonzini Return-path: Received: from e3.ny.us.ibm.com ([32.97.182.143]:57571 "EHLO e3.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754262Ab0JTWDx (ORCPT ); Wed, 20 Oct 2010 18:03:53 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e3.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o9KLl4Xx022476 for ; Wed, 20 Oct 2010 17:47:04 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9KM3pek120120 for ; Wed, 20 Oct 2010 18:03:52 -0400 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o9KM3pdZ003277 for ; Wed, 20 Oct 2010 16:03:51 -0600 In-Reply-To: <4CBF65A7.3090903@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/20/2010 04:56 PM, Paolo Bonzini wrote: > On 10/20/2010 09:51 PM, Anthony Liguori wrote: >> I don't understand why this loop is needed but we specifically wait for >> a signal to get delivered that's either SIG_IPI or SIGBUS. We then check >> whether a SIG_IPI or SIGBUS is pending and loop waiting for signals >> again. >> >> Shouldn't we be looping on just sigismember(SIGBUS)? > > You mean because SIG_IPI is a real-time signal and standard signals > are delivered first? OTOH, real-time signals can be queued multiple > times so it makes sense to loop on SIG_IPI as well. > >> BTW, we're no longer respecting timeout because we're not adjusting ts >> after each iteration. > > The timeout of qemu_kvm_eat_signal is always zero. So then qemu_kvm_eat_signal purely polls and it will happily keep polling as long as there is a signal pending. So what's the point of doing a sigtimedwait() and dropping qemu_mutex? Why not just check sigpending in a loop? Regards, Anthony Liguori > Paolo