[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] block/nbd.c: Fixed IO request coroutine not being wakeup
From: |
Eric Blake |
Subject: |
Re: [PATCH v2] block/nbd.c: Fixed IO request coroutine not being wakeup when kill NBD server |
Date: |
Mon, 14 Mar 2022 10:45:55 -0500 |
User-agent: |
NeoMutt/20211029-410-d8ee8c |
On Wed, Mar 09, 2022 at 04:21:01PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> 09.03.2022 10:48, Rao Lei wrote:
> > During the IO stress test, the IO request coroutine has a probability that
> > is
> > can't be awakened when the NBD server is killed.
> >
> > The GDB stack is as follows:
> > When we do failover in COLO mode, QEMU will hang while it is waiting for
> > the in-flight IO. From the call trace, we can see the IO request coroutine
> > has yielded in nbd_co_send_request(). When we kill the NBD server, it will
> > never
> > be wake up. Actually, when we do IO stress test, it will have a lot of
> > requests in free_sema queue. When the NBD server is killed, current
> > MAX_NBD_REQUESTS finishes with errors but they wake up at most
> > MAX_NBD_REQEUSTS from the queue. So, let's move qemu_co_queue_next out
> > to fix this issue.
> >
> > Signed-off-by: Lei Rao<lei.rao@intel.com>
>
> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Thanks; will queue through my NBD tree.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org