mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Swapnil Sapkal <swapnil.sapkal@amd.com>
To: <tony.luck@intel.com>, <reinette.chatre@intel.com>,
	<babu.moger@amd.com>, <fenghua.yu@intel.com>, <shuah@kernel.org>
Cc: <Dave.Martin@arm.com>, <james.morse@arm.com>,
	<peternewman@google.com>, <eranian@google.com>,
	<tan.shaopeng@fujitsu.com>, <linux-kernel@vger.kernel.org>,
	<linux-kselftest@vger.kernel.org>, <x86@kernel.org>
Subject: Re: [PATCH v4 0/5] selftests/resctrl: Add MBM and MBA test support for AMD
Date: Mon, 28 Sep 2026 21:53:36 +0530	[thread overview]
Message-ID: <3bd1195d-35fb-44b4-bc96-4ec32c70e3d1@amd.com> (raw)
In-Reply-To: <20260810184806.1089507-1-swapnil.sapkal@amd.com>

Gentle Ping

On 11-08-2026 00:18, Swapnil Sapkal wrote:
> The MBM (Memory Bandwidth Monitoring) and MBA (Memory Bandwidth
> Allocation) resctrl selftests validate the bandwidth numbers reported by
> resctrl against the memory controller performance counters. Today this
> only works on Intel, where the counters are the iMC (Integrated Memory
> Controller) PMUs and the tests are gated behind an ARCH_INTEL vendor
> check.
> 
> This series teaches the tests about the AMD UMC (Unified Memory
> Controller) PMUs and enables MBM and MBA on AMD.
> 
> The work is done in a few steps:
> 
>    1. Rename the Intel specific imc/IMC identifiers to the generic
>       mc/MC so the code can serve both vendors.
> 
>    2. Detect the vendor and select the memory controller PMU sysfs name
>       accordingly, keeping the rest of the code generic.
> 
>    3. Add the AMD UMC support. Unlike Intel, the UMC PMU does not expose
>       the CAS command events via sysfs, so the read event is programmed
>       directly (EventCode 0x0a, umask 0x1). All vendor detection is
>       contained in num_of_mem_controllers() and dispatched to per-vendor
>       routines. On AMD each UMC is a per-NUMA-node PMU, so only the UMCs
>       local to the benchmark CPU are opened; remote-node UMCs would
>       otherwise fail perf_event_open() with -ENODEV.
> 
>    4. Sweep the AMD MBA schemata using absolute bandwidth values (4 GB/s
>       to 40 GB/s) instead of the Intel style percentages (10% to 100%).
> 
>    5. Extend the vendor_specific gate of the tests to Intel and AMD so
>       they run on AMD as well. The gate is kept (rather than removed)
>       so vendors that num_of_mem_controllers() does not know about are
>       skipped instead of reported as a failure.
> 
> Testing
> -------
> Tested on AMD Zen4 and Zen5 (multi-NUMA) system
> 
> History
> -------
> This series continues the work Babu Moger started; v1-v3 were posted by
> Babu. I have taken it over, rebased it onto v7.2-rc7, addressed
> Reinette's review feedback and added the AMD MBA bandwidth-value patch.
> 
> v3: https://lore.kernel.org/all/cover.1718385426.git.babu.moger@amd.com/
> 
> Changes since v3 (per patch changelog is present in each patch):
> - Rebased onto v7.2-rc7 and reworked for the upstream resctrl_val.c
>    refactor.
> - Contained all vendor detection in num_of_mem_controllers() with a
>    shared helper for the common counter "type" read. (Reinette)
> - Fixed remaining Intel specific naming and the ksft diagnostics.
>    (Reinette)
> - Handled the AMD per-node UMC PMU topology (skip remote-node UMCs) to
>    fix perf_event_open() -ENODEV on multi-node systems.
> - New patch: use absolute bandwidth values for the AMD MBA schemata,
>    with build-time checks that the sweep count matches the result arrays.
> - Kept the vendor gate at Intel | AMD so unsupported vendors are skipped
>    rather than failed.
> 
> Babu Moger (4):
>    selftests/resctrl: Rename variables and functions to generic names
>    selftests/resctrl: Detect vendor to select memory controller sysfs
>      name
>    selftests/resctrl: Add support for MBM and MBA tests on AMD
>    selftests/resctrl: Enable MBM and MBA tests on AMD
> 
> Swapnil Sapkal (1):
>    selftests/resctrl: Use bandwidth values for AMD MBA schemata
> 
>   tools/testing/selftests/resctrl/mba_test.c    | 105 +++--
>   tools/testing/selftests/resctrl/mbm_test.c    |  24 +-
>   tools/testing/selftests/resctrl/resctrl.h     |   4 +-
>   tools/testing/selftests/resctrl/resctrl_val.c | 366 +++++++++++-------
>   4 files changed, 320 insertions(+), 179 deletions(-)
> 


  parent reply	other threads:[~2026-09-28 16:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10 18:48 Swapnil Sapkal
2026-08-10 18:48 ` [PATCH v4 1/5] selftests/resctrl: Rename variables and functions to generic names Swapnil Sapkal
2026-08-10 18:48 ` [PATCH v4 2/5] selftests/resctrl: Detect vendor to select memory controller sysfs name Swapnil Sapkal
2026-08-10 18:48 ` [PATCH v4 3/5] selftests/resctrl: Add support for MBM and MBA tests on AMD Swapnil Sapkal
2026-08-10 18:48 ` [PATCH v4 4/5] selftests/resctrl: Use bandwidth values for AMD MBA schemata Swapnil Sapkal
2026-08-10 18:48 ` [PATCH v4 5/5] selftests/resctrl: Enable MBM and MBA tests on AMD Swapnil Sapkal
2026-09-28 16:23 ` Swapnil Sapkal [this message]
2026-09-29 18:40   ` [PATCH v4 0/5] selftests/resctrl: Add MBM and MBA test support for AMD Reinette Chatre

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=3bd1195d-35fb-44b4-bc96-4ec32c70e3d1@amd.com \
    --to=swapnil.sapkal@amd.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=eranian@google.com \
    --cc=fenghua.yu@intel.com \
    --cc=james.morse@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=peternewman@google.com \
    --cc=reinette.chatre@intel.com \
    --cc=shuah@kernel.org \
    --cc=tan.shaopeng@fujitsu.com \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®