From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: Using signals to communicate two Qemu processes Date: Sat, 13 Dec 2008 17:43:29 -0600 Message-ID: <494448A1.8010107@codemonkey.ws> References: <18C018878FB0244EB71B7FE328978A320F9FDA4C@rrsmsx503.amr.corp.intel.com> <49443567.40609@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Passera, Pablo R" , "kvm@vger.kernel.org" To: dlaor@redhat.com Return-path: Received: from yw-out-2324.google.com ([74.125.46.30]:22017 "EHLO yw-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752067AbYLMXne (ORCPT ); Sat, 13 Dec 2008 18:43:34 -0500 Received: by yw-out-2324.google.com with SMTP id 9so906679ywe.1 for ; Sat, 13 Dec 2008 15:43:33 -0800 (PST) In-Reply-To: <49443567.40609@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Dor Laor wrote: > Passera, Pablo R wrote: >> Hi all, >> I am trying to communicate two VMs using a virtio driver. >> Once a data is moved to the driver I want to notify the other Qemu >> process that there is new data available in the buffer. I was >> thinking about using linux signals to synchronize both processes but >> when I register my SIGUSR1 handler in Qemu I am seeing an strange >> behavior. After starting the VM and Linux gets loaded, Qemu is >> receiving SIGUSR2 at a regular time period. Looking a little bit at >> the code I realize that signals are being used for other purposes in >> Qemu, however, SIGUSR1 is not used. Is it possible to use signals to >> synchronize these processes or should I think about using a different >> mechanism? >> >> > SIGUSR2 is used as aio completion signal. You can use SIGUSR1 but you > need to know what you're doing (some threads block signals). > Better fit would be a pipe. Or even a unix domain socket. Regards, Anthony Liguori