From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60492 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pjrn1-0001ji-Lu for qemu-devel@nongnu.org; Mon, 31 Jan 2011 06:19:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pjrmu-0000RT-Dh for qemu-devel@nongnu.org; Mon, 31 Jan 2011 06:19:23 -0500 Received: from david.siemens.de ([192.35.17.14]:18322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pjrmu-0000PE-5E for qemu-devel@nongnu.org; Mon, 31 Jan 2011 06:19:16 -0500 Message-ID: <4D469AAF.7090002@siemens.com> Date: Mon, 31 Jan 2011 12:19:11 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <4D468470.4060300@redhat.com> In-Reply-To: <4D468470.4060300@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 01/22] Prevent abortion on multiple VCPU kicks List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Marcelo Tosatti , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" On 2011-01-31 10:44, Avi Kivity wrote: > On 01/27/2011 03:09 PM, Jan Kiszka wrote: >> If we call qemu_cpu_kick more than once before the target was able to >> process the signal, pthread_kill will fail, and qemu will abort. Prevent >> this by avoiding the redundant signal. >> > > Doesn't fit with the manual page (or with the idea that signals are > asynchronous): > > NAME > pthread_kill - send a signal to a thread > > > ... > > ERRORS > ESRCH No thread with the ID thread could be found. > > EINVAL An invalid signal was specified. > Valid remark, but I was receiving EAGAIN for blocked RT signals. Don't know if this is Linux-specific. A quick glance at the man pages did not reveal if this is allowed or at least gray area. However, even when selectively ignoring this, it's more efficient to catch the redundant signaling in user space. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux