[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/5] qemu-char/monitor: make monitor_puts thread
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [PATCH 0/5] qemu-char/monitor: make monitor_puts thread safe |
Date: |
Fri, 27 Jun 2014 08:33:54 -0400 |
On Fri, 27 Jun 2014 11:43:20 +0200
Stefan Hajnoczi <address@hidden> 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 <address@hidden>
I appreciate your review, but this one is already merged on master.