[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] nbd/server: Use drained block ops to quiesce the server
From: |
Eric Blake |
Subject: |
Re: [PATCH 2/2] nbd/server: Use drained block ops to quiesce the server |
Date: |
Tue, 1 Jun 2021 16:31:01 -0500 |
User-agent: |
NeoMutt/20210205 |
On Tue, Jun 01, 2021 at 06:31:29PM +0200, Sergio Lopez wrote:
> > Hm, how do you get more than one coroutine per client yielding in
> > nbd_read_eof() at the same time? I thought the model is that you always
> > have one coroutine reading the next request (which is
> > client->recv_coroutine) and all the others are just processing the
> > request they had read earlier. Multiple coroutines reading from the
> > same socket would sound like a bad idea.
>
> You're right, there's only a single coroutine yielding on
> nbd_read_eof(). I've added the list while at a moment I was trying to
> keep track of every coroutine, and I kept it without thinking if it
> was really needed.
>
> I'll drop it, entering just client->recv_coroutine is it isn't NULL.
Sounds like I'll wait for the v2 before applying. But the overall
logic changes made sense to me.
> > The patch looks correct to me, though I'm not sure if yield_co_list is
> > an unnecessary complication (and if it isn't, whether that's safe).
> >
> > I would be happy enough to apply it anyway if you can explain the
> > yield_co_list thing, but I'll give Eric some time to have a look, too.
Thanks for catching my attention on this!
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org