From: Anthony Liguori <anthony@codemonkey.ws>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Luiz Capitulino <lcapitulino@redhat.com>,
Marian Krcmarik <mkrcmari@redhat.com>,
Alon Levy <alevy@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>,
spice-devel <spice-devel@freedesktop.org>
Subject: Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access
Date: Fri, 02 Sep 2011 10:37:23 -0500 [thread overview]
Message-ID: <4E60F833.2090307@codemonkey.ws> (raw)
In-Reply-To: <4E60F6BD.4090800@redhat.com>
On 09/02/2011 10:31 AM, Paolo Bonzini wrote:
> On 09/02/2011 05:18 PM, Gerd Hoffmann wrote:
>>
>>> Can you just use a bottom half to defer this work to the I/O thread?
>>> Bottom half scheduling has to be signal safe which means it will also be
>>> thread safe.
>>
>> Not that straight forward as I would have to pass arguments to the
>> bottom half.
>
> Can you add a variant of qemu_bh_new that accepts a sizeof for the new
> bottom half? Then the bottom half itself can be passed as the opaque and
> used for the arguments.
Bottom halves are opaque to the caller.
Passing arguments would require careful consideration of locking too. I
think the best way to resolve this is to fix libspice and not try to
work around the problem in QEMU.
Regards,
Anthony Liguori
>
> Paolo
next prev parent reply other threads:[~2011-09-02 15:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-01 19:35 [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access Luiz Capitulino
2011-09-01 19:47 ` Daniel P. Berrange
2011-09-01 21:03 ` Jan Kiszka
2011-09-02 1:34 ` Anthony Liguori
2011-09-02 9:41 ` Daniel P. Berrange
2011-09-02 11:26 ` Jan Kiszka
2011-09-02 13:39 ` Gerd Hoffmann
2011-09-02 14:03 ` Anthony Liguori
2011-09-02 14:24 ` Luiz Capitulino
2011-09-02 14:28 ` Anthony Liguori
2011-09-02 15:18 ` Gerd Hoffmann
2011-09-02 15:20 ` Anthony Liguori
2011-09-02 15:31 ` Paolo Bonzini
2011-09-02 15:37 ` Anthony Liguori [this message]
2011-09-05 7:48 ` Gerd Hoffmann
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=4E60F833.2090307@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=alevy@redhat.com \
--cc=kraxel@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mkrcmari@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=spice-devel@freedesktop.org \
/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;
as well as URLs for NNTP newsgroup(s).