|
From: | Eric Blake |
Subject: | Re: [PATCH 3/3] block/nbd: nbd_co_reconnect_loop(): don't sleep if drained |
Date: | Thu, 23 Jul 2020 13:55:36 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 7/20/20 4:00 AM, Vladimir Sementsov-Ogievskiy wrote:
We try to go to wakeable sleep, so that, if drain begins it will break the sleep. But what if nbd_client_co_drain_begin() already called and s->drained is already true? We'll go to sleep, and drain will have to wait for the whole timeout. Let's improve it. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> --- block/nbd.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
How frequently did you hit this case? At any rate, the optimization looks sane, and I'm happy to include it in 5.1.
Reviewed-by: Eric Blake <eblake@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |