All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	eesposit@redhat.com, Peter Lieven <pl@kamp.de>,
	Hanna Reitz <hreitz@redhat.com>
Subject: Re: [PATCH] block/nfs: avoid BDRV_POLL_WHILE() in nfs_co_get_allocated_file_size()
Date: Thu, 27 Apr 2023 14:54:43 +0200	[thread overview]
Message-ID: <ZEpwk91dGJ4wnDV9@redhat.com> (raw)
In-Reply-To: <20230403233033.408120-1-stefanha@redhat.com>

Am 04.04.2023 um 01:30 hat Stefan Hajnoczi geschrieben:
> Commit 82618d7bc341 ("block: Convert bdrv_get_allocated_file_size() to
> co_wrapper") made nfs_get_allocated_file_size() a coroutine. The
> coroutine still uses BDRV_POLL_WHILE() to wait for the NFS RPC to
> complete.
> 
> Take it a step further and yield the coroutine until the RPC completes.
> This avoids the blocking, nested event loop and unifies
> nfs_co_get_allocated_file_size() with the other coroutine functions that
> send RPCs:
> - Use nfs_co_init_task() to set up a coroutine NFSRPC task.
> - Take client->mutex to protect fd handler state since we're in IO_CODE.
> - Use nfs_co_generic_cb() instead of a specialized callback function.
> - Yield until the task completes.
> 
> Getting rid of BDRV_POLL_WHILE() helps with the multi-queue block layer
> effort where we don't want to take the AioContext lock.
> 
> This commit passes qemu-iotests/check -nfs, except inactivate-failure,
> which also fails before this commit.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

This conflicts with Paolo's commit 3fe64abc, which seems to address the
same bug. Your patch does some more cleanup like removing
nfs_get_allocated_file_size_cb() in favour of nfs_co_generic_cb().

Do you want to rebase and send the remaining pieces as a cleanup patch?

Kevin



      reply	other threads:[~2023-04-27 12:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-03 23:30 [PATCH] block/nfs: avoid BDRV_POLL_WHILE() in nfs_co_get_allocated_file_size() Stefan Hajnoczi
2023-04-27 12:54 ` Kevin Wolf [this message]

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=ZEpwk91dGJ4wnDV9@redhat.com \
    --to=kwolf@redhat.com \
    --cc=eesposit@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.