From: Markus Armbruster <armbru@redhat.com>
To: Hanna Czenczek <hreitz@redhat.com>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org,
Kevin Wolf <kwolf@redhat.com>, John Snow <jsnow@redhat.com>,
"Denis V . Lunev" <den@openvz.org>,
Eric Blake <eblake@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v2 06/12] qapi/block: Add BLOCK_IO_DELAY event
Date: Tue, 20 Oct 2026 08:49:30 +0200 [thread overview]
Message-ID: <87a4o8sw79.fsf@pond.sub.org> (raw)
In-Reply-To: <20261019182028.45305-7-hreitz@redhat.com> (Hanna Czenczek's message of "Mon, 19 Oct 2026 20:20:22 +0200")
Hanna Czenczek <hreitz@redhat.com> writes:
> This event will be emitted when a disk operation takes longer than a
> pre-defined threshold (as set on the block device).
>
> Note that the description refers to the "delay-report-ns" and
> "delay-stop-ns" block device properties, which are not yet available.
> A future commit in this series will add them.
>
> Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
> ---
> qapi/block.json | 37 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 37 insertions(+)
>
> diff --git a/qapi/block.json b/qapi/block.json
> index 8f4a71733c1..5f9f5c28050 100644
> --- a/qapi/block.json
> +++ b/qapi/block.json
> @@ -649,3 +649,40 @@
> ##
> { 'enum': 'IoAccountingOperation',
> 'data': [ 'read', 'write', 'flush', 'zone-append', 'unmap' ] }
> +
> +##
> +# @BLOCK_IO_DELAY:
> +#
> +# Emitted when a disk operation takes longer than the pre-defined
> +# threshold (as set via the "delay-report-ns" / "delay-stop-ns"
> +# properties on the block device).
As in PATCH 01, "block device" could be confusing, because we use the
term both for frontends and backends. I believe "delay-report-ns" and
"delay-stop-ns" are the qdev properties every block device model will
have [PATCH 11].
> +#
> +# Note that delays deliberately incurred by throttling do count
> +# towards the operation duration.
> +#
Please use the revised syntax for introductions, like you did in PATCH
01:
# @name: introduction, best to keep it brief, but you may continue it
# like this if necessary. If your text need to refer to
# arguments, it's almost certainly not brief introduction
# anymore.
#
# Additional text can go here for now.
I apologize for the inconvenience. We need this to eliminate certain
syntactic ambiguities that plagued the doc generator. We'll need it
some more for the doc inliner.
> +# @qom-path: path to the block device object in the QOM tree
> +#
> +# @operation: I/O operation
> +#
> +# @latency-ns: Ongoing duration of the operation (in nanoseconds)
> +#
> +# @action: Action that has been taken ("report" for "delay-report-ns"
> +# or "stop" for "delay-stop-ns"). A "stop" action means the VM
> +# will be stopped with the "io-hang" `RunState`, which does not
> +# drain the block devices attached to the VM, because draining
> +# would be counterproductive in case of a hanging I/O request.
This feels less than clear. What exactly happens? My best guess:
* When an operation takes longer than delay-report-ns, BLOCK_IO_DELAY is
emitted with "action": "report" (but only once for this operation).
* When an operation takes longer than delay-stop-ns, the guest is
stopped (run state becomes io-hang), and BLOCK_IO_DELAY is emitted
with "action": "stop".
Say we continue the guest. Can the even be triggered again for this
operation?
The three possible values are ignore, report, and stop. You cover
report and stop. Can ignore happen?
We should use ``literal`` markup for literal values.
> +#
> +# @offset: Request offset in the guest disk (in bytes), if available
> +#
> +# @bytes: Request length
> +#
> +# Since: 11.2
> +##
> +{ 'event': 'BLOCK_IO_DELAY',
> + 'data': {
> + 'qom-path': 'str',
> + 'operation': 'IoAccountingOperation',
> + 'latency-ns': 'uint64',
> + 'action': 'BlockErrorAction',
> + '*offset': 'uint64',
> + 'bytes': 'uint64' } }
next prev parent reply other threads:[~2026-10-20 6:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 18:20 [PATCH v2 00/12] block: BLOCK_IO_DELAY event Hanna Czenczek
2026-10-19 18:20 ` [PATCH v2 01/12] qapi/common: Clarify what IoOperationType is for Hanna Czenczek
2026-10-20 5:58 ` Markus Armbruster
2026-10-19 18:20 ` [PATCH v2 02/12] qapi/block: Add IoAccountingOperation enum Hanna Czenczek
2026-10-20 5:59 ` Markus Armbruster
2026-10-19 18:20 ` [PATCH v2 03/12] runstate: Allow IO_ERROR/SUSPENDED transitions Hanna Czenczek
2026-10-19 18:20 ` [PATCH v2 04/12] iotests: PC-only test for I/O errors during suspend Hanna Czenczek
2026-10-19 18:20 ` [PATCH v2 05/12] qapi/run-state: Add io-hang state Hanna Czenczek
2026-10-20 6:02 ` Markus Armbruster
2026-10-19 18:20 ` [PATCH v2 06/12] qapi/block: Add BLOCK_IO_DELAY event Hanna Czenczek
2026-10-20 6:49 ` Markus Armbruster [this message]
2026-10-19 18:20 ` [PATCH v2 07/12] qapi/block: Add BLOCK_IO_DONE event Hanna Czenczek
2026-10-20 6:55 ` Markus Armbruster
2026-10-19 18:20 ` [PATCH v2 08/12] block-backend: Public blk_get_attached_dev_path() Hanna Czenczek
2026-10-19 18:20 ` [PATCH v2 09/12] host-utils: Add u{add,sub}{32,64}_saturate() Hanna Czenczek
2026-10-19 18:20 ` [PATCH v2 10/12] block: Per-request delay tracker Hanna Czenczek
2026-10-19 18:20 ` [PATCH v2 11/12] block: Add delay-report-ns and delay-stop-ns props Hanna Czenczek
2026-10-19 18:20 ` [PATCH v2 12/12] iotests: Add io-delay-reporting test Hanna Czenczek
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=87a4o8sw79.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=den@openvz.org \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--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.