From: Stefan Hajnoczi <stefanha@redhat.com>
To: zoudongjie <zoudongjie@huawei.com>
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, fam@euphon.net,
hreitz@redhat.com, alex.chen@huawei.com, chenjianfei3@huawei.com,
eric.fangyi@huawei.com, luolongmin@huawei.com,
mujinsheng@huawei.com, qemu-block@nongnu.org,
qemu-stable@nongnu.org, renxuming@huawei.com,
suxiaodong1@huawei.com, wangjian161@huawei.com,
wangyan122@huawei.com, yebiaoxiang@huawei.com,
zhuyangyang14@huawei.com
Subject: Re: [PATCH v3 0/2] qapi/throttle: Fix qmp_block_set_io_throttle blocked for too long
Date: Wed, 26 Mar 2025 11:06:20 -0400 [thread overview]
Message-ID: <20250326150620.GF783416@fedora> (raw)
In-Reply-To: <20250326092634.1691355-1-zoudongjie@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 2110 bytes --]
On Wed, Mar 26, 2025 at 05:26:32PM +0800, zoudongjie wrote:
> From: Zhu Yangyang <zhuyangyang14@huawei.com>
>
> Calling qmp_block_set_io_throttle() will be blocked for a long time
> when a network disk is configured and the network failure is just about
> to occur.
>
> This series add a timeout parameter for qmp_block_set_io_throttle to control
> its execution duration.
>
> Changelog
> v3 ---
> Unify AIO_WAIT_WHILE_{TIMEOUT/INTERNAL} by replacing AIO_WAIT_WHILE_INTERNAL() with
> AIO_WAIT_WHILE_TIMEOUT(..., 0).
>
> v2 ----
> 1. Support 0 in BDRV_POLL_WHILE_TIMEOUT(), 0 means infinite.
> 2. Use uint64_t timeout_ns instead of int64 timeout to name variables.
> 3. Use timer_pending() to check for expiry instead of explicitly checking
> against the deadline for BDRV_POLL_WHILE_TIMEOUT().
> 4. Add documentation for bdrv_drained_begin_timeout(), note that bdrv_drained_end()
> must be called when -ETIMEDOUT is returned.
> 5. Add a timeout parameter to the qmp_block_set_io_throttle() instead of hardcoding
> the timeout, and the default value is 0, mean an infinite timeout.
>
> v1 patch link:
> https://lore.kernel.org/qemu-devel/20250308101618.721954-1-zoudongjie@huawei.com/
>
> Zhu Yangyang (2):
> io/block: Refactoring the bdrv_drained_begin() function and implement
> a timeout mechanism.
> qapi/throttle: add timeout parameter for qmp_block_set_io_throttle()
>
> block/block-backend.c | 14 ++++-
> block/io.c | 58 +++++++++++++++++----
> block/qapi-system.c | 10 +++-
> include/block/aio-wait.h | 47 ++++++++++++-----
> include/block/block-io.h | 22 +++++++-
> include/system/block-backend-global-state.h | 1 +
> qapi/block-core.json | 5 +-
> util/aio-wait.c | 5 ++
> 8 files changed, 135 insertions(+), 27 deletions(-)
>
> --
> 2.33.0
>
Aside from Markus' comments:
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-03-26 15:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 9:26 [PATCH v3 0/2] qapi/throttle: Fix qmp_block_set_io_throttle blocked for too long zoudongjie via
2025-03-26 9:26 ` [PATCH v3 1/2] io/block: Refactoring the bdrv_drained_begin() function and implement a timeout mechanism zoudongjie via
2025-03-26 9:26 ` [PATCH v3 2/2] qapi/throttle: add timeout parameter for qmp_block_set_io_throttle() zoudongjie via
2025-03-26 9:53 ` Markus Armbruster
2025-03-27 7:56 ` zoudongjie via
2025-03-27 8:04 ` Markus Armbruster
2025-03-27 12:34 ` zoudongjie via
2025-03-27 13:43 ` Markus Armbruster
2025-04-01 8:15 ` zoudongjie via
2025-04-01 7:21 ` zoudongjie via
2025-03-26 15:06 ` Stefan Hajnoczi [this message]
2025-05-12 9:40 ` [PATCH v3 0/2] qapi/throttle: Fix qmp_block_set_io_throttle blocked for too long Michael Tokarev
2025-05-12 10:31 ` Markus Armbruster
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=20250326150620.GF783416@fedora \
--to=stefanha@redhat.com \
--cc=alex.chen@huawei.com \
--cc=chenjianfei3@huawei.com \
--cc=eric.fangyi@huawei.com \
--cc=fam@euphon.net \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=luolongmin@huawei.com \
--cc=mujinsheng@huawei.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=renxuming@huawei.com \
--cc=suxiaodong1@huawei.com \
--cc=wangjian161@huawei.com \
--cc=wangyan122@huawei.com \
--cc=yebiaoxiang@huawei.com \
--cc=zhuyangyang14@huawei.com \
--cc=zoudongjie@huawei.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.