From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
Tomas Glozar <tglozar@redhat.com>,
Michael Jeanson <mjeanson@efficios.com>,
Dmitrii Dolgov <9erthalion6@gmail.com>,
Alexandre Chartre <alexandre.chartre@oracle.com>,
Yuzhuo Jing <yuzhuo@google.com>, Leo Yan <leo.yan@arm.com>,
German Gomez <german.gomez@arm.com>,
Anubhav Shelat <ashelat@redhat.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH v1 0/3] perf pmu: Add tool-provided NVMe PMU
Date: Wed, 24 Jun 2026 12:58:42 -0700 [thread overview]
Message-ID: <ajw28nITeOgtH0GF@google.com> (raw)
In-Reply-To: <20260609070348.541964-1-irogers@google.com>
On Tue, Jun 09, 2026 at 12:03:45AM -0700, Ian Rogers wrote:
> This patch series introduces a tool-provided PMU for NVMe devices to expose
> various hardware logs as perf events.
>
> Using libnvme, the new nvme_pmu extracts metrics from standard NVMe log pages
> including:
> - SMART / Health Information (e.g. data units read/written, power cycles,
> temperature)
> - Endurance Group Information
> - FDP (Flexible Data Placement) Statistics
> - Error Information
> - Zoned Namespaces (ZNS) Changed Zones
>
> Key features:
> - Dynamic probing of supported log pages on /dev/nvmeX. Unsupported events
> are marked as deprecated and hidden from `perf list` by default.
> - Generic configuration encoding where the log type, size, and offset are
> encoded directly into the event configuration.
> - Correct interval delta tracking using baseline offset snapshots. This mimics
> the behavior of the hwmon PMU, allowing gauges like Temperature to be
> reported instantaneously in `perf stat -I`, while standard counters
> correctly accumulate deltas.
> - Robust handling of cross-architecture endianness when reading 128-bit and
> 64-bit fields from the NVMe specification.
Can you please show actual output so that we can understand what you're
doing?
Thanks,
Namhyung
>
> The series is broken down into:
> 1. Adding the libnvme feature detection via pkg-config in tools/build.
> 2. The core implementation of the NVMe tool PMU.
> 3. A unit test suite verifying the parsing and encoding of the NVMe PMU
> events using a mocked device.
>
> Ian Rogers (3):
> perf build: Add libnvme feature detection
> perf pmu: Implement tool-provided NVMe PMU
> perf tests: Add NVMe PMU event parsing test
>
> tools/build/Makefile.feature | 2 +
> tools/build/feature/Makefile | 3 +
> tools/build/feature/test-libnvme.c | 11 +
> tools/perf/Makefile.config | 12 +
> tools/perf/tests/Build | 1 +
> tools/perf/tests/builtin-test.c | 1 +
> tools/perf/tests/nvme_pmu.c | 176 ++++++++++
> tools/perf/tests/tests.h | 1 +
> tools/perf/util/Build | 1 +
> tools/perf/util/evsel.c | 11 +-
> tools/perf/util/nvme_pmu.c | 535 +++++++++++++++++++++++++++++
> tools/perf/util/nvme_pmu.h | 143 ++++++++
> tools/perf/util/pmu.c | 15 +
> tools/perf/util/pmu.h | 8 +-
> tools/perf/util/pmus.c | 31 +-
> tools/perf/util/pmus.h | 1 +
> 16 files changed, 945 insertions(+), 7 deletions(-)
> create mode 100644 tools/build/feature/test-libnvme.c
> create mode 100644 tools/perf/tests/nvme_pmu.c
> create mode 100644 tools/perf/util/nvme_pmu.c
> create mode 100644 tools/perf/util/nvme_pmu.h
>
> --
> 2.54.0.1064.gd145956f57-goog
>
prev parent reply other threads:[~2026-06-24 19:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 7:03 [PATCH v1 0/3] perf pmu: Add tool-provided NVMe PMU Ian Rogers
2026-06-09 7:03 ` [PATCH v1 1/3] perf build: Add libnvme feature detection Ian Rogers
2026-06-10 6:17 ` Christoph Hellwig
2026-06-09 7:03 ` [PATCH v1 2/3] perf pmu: Implement tool-provided NVMe PMU Ian Rogers
2026-06-10 6:18 ` Christoph Hellwig
2026-06-09 7:03 ` [PATCH v1 3/3] perf tests: Add NVMe PMU event parsing test Ian Rogers
2026-06-09 16:57 ` [PATCH v2 0/3] perf pmu: Add tool-provided NVMe PMU Ian Rogers
2026-06-09 16:57 ` [PATCH v2 1/3] perf build: Add libnvme feature detection Ian Rogers
2026-06-09 16:57 ` [PATCH v2 2/3] perf pmu: Implement tool-provided NVMe PMU Ian Rogers
2026-06-09 16:57 ` [PATCH v2 3/3] perf tests: Add NVMe PMU event parsing test Ian Rogers
2026-06-24 19:58 ` Namhyung Kim [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=ajw28nITeOgtH0GF@google.com \
--to=namhyung@kernel.org \
--cc=9erthalion6@gmail.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexandre.chartre@oracle.com \
--cc=ashelat@redhat.com \
--cc=german.gomez@arm.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=leo.yan@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mjeanson@efficios.com \
--cc=peterz@infradead.org \
--cc=tglozar@redhat.com \
--cc=yuzhuo@google.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