qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2.1 34/36] qemu-char: make writes thread-safe


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH 2.1 34/36] qemu-char: make writes thread-safe
Date: Wed, 25 Jun 2014 08:06:10 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Am 18.06.2014 08:43, schrieb Paolo Bonzini:
> This will let threads other than the I/O thread raise QMP events.
> 
> GIOChannel is thread-safe, and send and receive state is usually
> well-separated.  The only driver that requires some care is the
> pty driver, where some of the state is shared by the read and write
> sides.  That state is protected with the chr_write_lock too.
> 
> Reviewed-by: Fam Zheng <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  include/sysemu/char.h | 11 ++++++----
>  qemu-char.c           | 58 
> ++++++++++++++++++++++++++++++++++++++++-----------
>  2 files changed, 53 insertions(+), 16 deletions(-)
> 

Latest QEMU is broken for w64. This command no longer starts the GTK gui:

wine64 x86_64-softmmu/qemu-system-x86_64 -L pc-bios

Wine reports a dead lock:

err:ntdll:RtlpWaitForCriticalSection section 0x964f0 "?" wait timed out
in thread 0009, blocked by 0000, retrying (60 sec)

git bisect finds this commit which introduced that regression:

9005b2a7589540a3733b3abdcfbccfe7746cd1a1 is the first bad commit
commit 9005b2a7589540a3733b3abdcfbccfe7746cd1a1
Author: Paolo Bonzini <address@hidden>
Date:   Wed Jun 18 08:43:58 2014 +0200

    qemu-char: make writes thread-safe

    This will let threads other than the I/O thread raise QMP events.

    GIOChannel is thread-safe, and send and receive state is usually
    well-separated.  The only driver that requires some care is the
    pty driver, where some of the state is shared by the read and write
    sides.  That state is protected with the chr_write_lock too.

    Reviewed-by: Fam Zheng <address@hidden>
    Signed-off-by: Paolo Bonzini <address@hidden>
    Signed-off-by: Luiz Capitulino <address@hidden>

:040000 040000 0a8837feb639c89178d4d9fbdfa10e26dd702b40
5be463e0d46eb49e65a2b3e11deb494b63975906 M      include
:100644 100644 9961b02ce607764a3d8ea2d70353036b95f955f2
a9025e642e779c2b2ad0c462ae863d761365b35d M      qemu-char.c

I did not run tests with 32 bit versions, nor did I run a native test on
Windows.

Regards
Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]