public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: dlaor@redhat.com
Cc: "Passera, Pablo R" <pablo.r.passera@intel.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: Using signals to communicate two Qemu processes
Date: Sat, 13 Dec 2008 17:43:29 -0600	[thread overview]
Message-ID: <494448A1.8010107@codemonkey.ws> (raw)
In-Reply-To: <49443567.40609@redhat.com>

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

  reply	other threads:[~2008-12-13 23:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-12 18:23 Using signals to communicate two Qemu processes Passera, Pablo R
2008-12-13 22:21 ` Dor Laor
2008-12-13 23:43   ` Anthony Liguori [this message]
2008-12-23 17:17 ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=494448A1.8010107@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=dlaor@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pablo.r.passera@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox