[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/3] block/nbd: nbd_co_reconnect_loop(): don't sleep if drain
Re: [PATCH 3/3] block/nbd: nbd_co_reconnect_loop(): don't sleep if drained
Mon, 27 Jul 2020 21:42:47 +0300
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
23.07.2020 21:55, Eric Blake wrote:
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 <email@example.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.
I don't remember. Probably once? And, as I said in cover letter, it even was
not master branch but some my experiment..
- Re: [PATCH 1/3] block/nbd: allow drain during reconnect attempt, (continued)