[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] main-loop: fix qemu_notify_event for aio_not
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2] main-loop: fix qemu_notify_event for aio_notify optimization |
Date: |
Mon, 27 Jul 2015 11:20:16 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Fri, Jul 24, 2015 at 01:42:55PM +0200, Paolo Bonzini wrote:
> aio_notify can be optimized away, and in fact almost always will. However,
> qemu_notify_event is used in places where this is incorrect---most notably,
> when handling SIGTERM. When aio_notify is optimized away, it is possible that
> QEMU enters a blocking ppoll immediately afterwards and stays there, without
> reaching main_loop_should_exit().
>
> Fix this by using a bottom half. The bottom half can be optimized too, but
> scheduling it is enough for the ppoll not to block. The hang is thus avoided.
>
> Reported-by: Peter Maydell <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> main-loop.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
pgpFkQP4D_hWv.pgp
Description: PGP signature