From: Markus Armbruster <armbru@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Fam Zheng <fam@euphon.net>, Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [PATCH v2] block/nvme: Add driver statistics for access alignment and hw errors
Date: Fri, 02 Oct 2020 07:14:40 +0200 [thread overview]
Message-ID: <87ft6xtdj3.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20201001162939.1567915-1-philmd@redhat.com> ("Philippe Mathieu-Daudé"'s message of "Thu, 1 Oct 2020 18:29:39 +0200")
Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> Keep statistics of some hardware errors, and number of
> aligned/unaligned I/O accesses.
>
> QMP example booting a full RHEL 8.3 aarch64 guest:
>
> { "execute": "query-blockstats" }
> {
> "return": [
> {
> "device": "",
> "node-name": "drive0",
> "stats": {
> "flush_total_time_ns": 6026948,
> "wr_highest_offset": 3383991230464,
> "wr_total_time_ns": 807450995,
> "failed_wr_operations": 0,
> "failed_rd_operations": 0,
> "wr_merged": 3,
> "wr_bytes": 50133504,
> "failed_unmap_operations": 0,
> "failed_flush_operations": 0,
> "account_invalid": false,
> "rd_total_time_ns": 1846979900,
> "flush_operations": 130,
> "wr_operations": 659,
> "rd_merged": 1192,
> "rd_bytes": 218244096,
> "account_failed": false,
> "idle_time_ns": 2678641497,
> "rd_operations": 7406,
> },
> "driver-specific": {
> "driver": "nvme",
> "completion-errors": 0,
> "unaligned-accesses": 2959,
> "aligned-accesses": 4477
> },
> "qdev": "/machine/peripheral-anon/device[0]/virtio-backend"
> }
> ]
> }
>
> Suggested-by: Stefan Hajnoczi <stefanha@gmail.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> v2: 'access-nb' -> 'accesses' (Stefan)
> ---
> qapi/block-core.json | 24 +++++++++++++++++++++++-
> block/nvme.c | 27 +++++++++++++++++++++++++++
> 2 files changed, 50 insertions(+), 1 deletion(-)
>
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 86ed72ef9f..dec17e3036 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -941,6 +941,27 @@
> 'discard-nb-failed': 'uint64',
> 'discard-bytes-ok': 'uint64' } }
>
> +##
> +# @BlockStatsSpecificNvme:
> +#
> +# NVMe driver statistics
> +#
> +# @completion-errors: The number of completion errors.
> +#
> +# @aligned-accesses: The number of aligned accesses performed by
> +# the driver.
> +#
> +# @unaligned-accesses: The number of unaligned accesses performed by
> +# the driver.
> +#
> +# Since: 5.2
> +##
> +{ 'struct': 'BlockStatsSpecificNvme',
> + 'data': {
> + 'completion-errors': 'uint64',
> + 'aligned-accesses': 'uint64',
> + 'unaligned-accesses': 'uint64' } }
> +
> ##
> # @BlockStatsSpecific:
> #
> @@ -953,7 +974,8 @@
> 'discriminator': 'driver',
> 'data': {
> 'file': 'BlockStatsSpecificFile',
> - 'host_device': 'BlockStatsSpecificFile' } }
> + 'host_device': 'BlockStatsSpecificFile',
> + 'nvme': 'BlockStatsSpecificNvme' } }
>
> ##
> # @BlockStats:
Acked-by: Markus Armbruster <armbru@redhat.com>
next prev parent reply other threads:[~2020-10-02 5:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 16:29 [PATCH v2] block/nvme: Add driver statistics for access alignment and hw errors Philippe Mathieu-Daudé
2020-10-02 5:14 ` Markus Armbruster [this message]
2020-10-08 10:18 ` Stefan Hajnoczi
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=87ft6xtdj3.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=fam@euphon.net \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--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.