From: Eric Blake <eblake@redhat.com>
To: Sergio Lopez <slp@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org,
Max Reitz <mreitz@redhat.com>, Nir Soffer <nsoffer@redhat.com>
Subject: Re: [PATCH 2/2] nbd/server: Use drained block ops to quiesce the server
Date: Tue, 1 Jun 2021 16:31:01 -0500 [thread overview]
Message-ID: <20210601213101.xqz7os5kje56vi3i@redhat.com> (raw)
In-Reply-To: <20210601163129.wcx5li7lkdvxrxgi@mhamilton>
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
next prev parent reply other threads:[~2021-06-01 21:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-01 5:57 [PATCH 0/2] nbd/server: Quiesce server on drained section Sergio Lopez
2021-06-01 5:57 ` [PATCH 1/2] block-backend: add drained_poll Sergio Lopez
2021-06-01 15:59 ` Kevin Wolf
2021-06-01 16:32 ` Sergio Lopez
2021-06-01 21:24 ` Eric Blake
2021-06-01 5:57 ` [PATCH 2/2] nbd/server: Use drained block ops to quiesce the server Sergio Lopez
2021-06-01 16:08 ` Kevin Wolf
2021-06-01 16:31 ` Sergio Lopez
2021-06-01 21:31 ` Eric Blake [this message]
2021-06-01 21:29 ` Eric Blake
2021-06-02 5:52 ` Sergio Lopez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210601213101.xqz7os5kje56vi3i@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=nsoffer@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=slp@redhat.com \
--cc=vsementsov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).