From: Luiz Capitulino <lcapitulino@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: kwolf@redhat.com, Paolo Bonzini <pbonzini@redhat.com>,
famz@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH 0/5] qemu-char/monitor: make monitor_puts thread safe
Date: Fri, 27 Jun 2014 08:33:54 -0400 [thread overview]
Message-ID: <20140627083354.04ef285d@redhat.com> (raw)
In-Reply-To: <20140627094320.GF12061@stefanha-thinkpad.muc.redhat.com>
On Fri, 27 Jun 2014 11:43:20 +0200
Stefan Hajnoczi <stefanha@redhat.com> wrote:
> On Tue, Jun 03, 2014 at 06:39:05PM +0200, Paolo Bonzini wrote:
> > Even though virtio-blk-dataplane mostly synchronizes with the block layer
> > by means of the AioContext, we still need to introduce mutexes for other
> > QEMU subsystems that the dataplane thread might encounter on its way.
> > Adding rerror/werror support, for example, means that the dataplane
> > thread will have to generate QMP events.
> >
> > monitor_puts is the entry point for generating QMP responses and events.
> > Making it thread-safe lets virtio-blk-dataplane threads generate QMP
> > events; because the same entry point is also used for responses, a
> > response and an event will never be intertwined.
> >
> > Protection is inserted at both the qemu-char and monitor levels.
> > A generic mutex is necessary in qemu_fe_chr_write so that
> > qemu_chr_fe_write_all does not break its output; we reuse that
> > mutex in some of the character devices.
> >
> > There is no need to protect against removal of the monitor's backend,
> > since the monitor itself cannot be removed.
> >
> > Paolo Bonzini (6):
> > qemu-char: introduce qemu_chr_alloc
> > qemu-char: do not call chr_write directly
> > qemu-char: move pty_chr_update_read_handler around
> > qemu-char: make writes thread-safe
> > monitor: protect outbuf with mutex
> > monitor: protect event emission
> >
> > backends/baum.c | 2 +-
> > backends/msmouse.c | 2 +-
> > include/sysemu/char.h | 20 ++++++--
> > monitor.c | 55 ++++++++++++++++++----
> > qemu-char.c | 125 +++++++++++++++++++++++++++++++++-----------------
> > spice-qemu-char.c | 2 +-
> > ui/console.c | 2 +-
> > 7 files changed, 149 insertions(+), 59 deletions(-)
>
> Modulo Fam's missing unlock comment:
>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
I appreciate your review, but this one is already merged on master.
prev parent reply other threads:[~2014-06-27 12:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-03 16:39 [Qemu-devel] [PATCH 0/5] qemu-char/monitor: make monitor_puts thread safe Paolo Bonzini
2014-06-03 16:39 ` [Qemu-devel] [PATCH 1/6] qemu-char: introduce qemu_chr_alloc Paolo Bonzini
2014-06-11 6:28 ` Fam Zheng
2014-06-03 16:39 ` [Qemu-devel] [PATCH 2/6] qemu-char: do not call chr_write directly Paolo Bonzini
2014-06-11 6:30 ` Fam Zheng
2014-06-03 16:39 ` [Qemu-devel] [PATCH 3/6] qemu-char: move pty_chr_update_read_handler around Paolo Bonzini
2014-06-11 6:32 ` Fam Zheng
2014-06-03 16:39 ` [Qemu-devel] [PATCH 4/6] qemu-char: make writes thread-safe Paolo Bonzini
2014-06-11 6:59 ` Fam Zheng
2014-06-11 8:16 ` Paolo Bonzini
2014-06-03 16:39 ` [Qemu-devel] [PATCH 5/6] monitor: protect outbuf with mutex Paolo Bonzini
2014-06-10 14:10 ` Luiz Capitulino
2014-06-10 14:24 ` Paolo Bonzini
2014-06-10 14:28 ` Luiz Capitulino
2014-06-03 16:39 ` [Qemu-devel] [PATCH 6/6] monitor: protect event emission Paolo Bonzini
2014-06-10 13:33 ` Luiz Capitulino
2014-06-27 9:43 ` [Qemu-devel] [PATCH 0/5] qemu-char/monitor: make monitor_puts thread safe Stefan Hajnoczi
2014-06-27 12:33 ` Luiz Capitulino [this message]
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=20140627083354.04ef285d@redhat.com \
--to=lcapitulino@redhat.com \
--cc=famz@redhat.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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;
as well as URLs for NNTP newsgroup(s).