From: Reinette Chatre <reinette.chatre@intel.com>
To: Ben Horgan <ben.horgan@arm.com>, <linux-kernel@vger.kernel.org>
Cc: <tony.luck@intel.com>, <Dave.Martin@arm.com>,
<james.morse@arm.com>, <babu.moger@amd.com>, <tglx@kernel.org>,
<mingo@redhat.com>, <bp@alien8.de>, <dave.hansen@linux.intel.com>,
<x86@kernel.org>, <hpa@zytor.com>, <fenghuay@nvidia.com>,
<tan.shaopeng@fujitsu.com>
Subject: Re: [PATCH v1 1/4] x86,fs/resctrl: Make resctrl_arch_is_evt_configurable() aware of mbm_assign_mode
Date: Mon, 2 Mar 2026 15:11:48 -0800 [thread overview]
Message-ID: <d9c04234-83f1-4a63-ba8c-a267f6479d7e@intel.com> (raw)
In-Reply-To: <20260225201905.3568624-2-ben.horgan@arm.com>
Hi Ben,
On 2/25/26 12:19 PM, Ben Horgan wrote:
> The features BMEC and ABMC provide separate interfaces to configuring which
> bandwidth types a counter tracks. Currently
> resctrl_arch_is_evt_configurable() only ever returns true if BMEC is
> supported.
>
> ABMC is useful even when BMEC is supported as it also provides counter
> assignment which reduces the number of hardware monitors a system
> requires. It is an architectural detail that ABMC provides counter
Since the goal is to support MPAM I'd suggest that the first focus be on what
resctrl fs supports and exposes and how it does or does not work for MPAM.
> configurability without requiring the prior feature, BMEC. On MPAM systems
> these two features are independent and the bandwidth types are limited to a
> choice of only read or write.
Does MPAM support exactly these two features? Specifically, does MPAM support
a feature that allows user to configure events globally per domain and another
feature that allows user to configure events per PMG?
These different features are how I understand assignable counters and BMEC to
be and to support both at the same time requires a user interface that is
confusing since the user can concurrently configure events globally per-domain
and per resource group.
Could you please elaborate how event configuration work on MPAM? If find this
series quite cryptic. I think it will help if you could elaborate what MPAM
capabilities are and how you expect resctrl fs to expose these features to
an MPAM user and how said used is expected to interact with resctrl fs to use
the features.
>
> In order to give resctrl the information to support these features
> independently extend resctrl_arch_is_evt_configurable() to report whether
> events are configurable when using the mbm_event counter assignment mode.
>
> Signed-off-by: Ben Horgan <ben.horgan@arm.com>
> ---
> arch/x86/kernel/cpu/resctrl/core.c | 12 ++++++++++--
> fs/resctrl/monitor.c | 4 ++--
> include/linux/resctrl.h | 2 +-
> 3 files changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
> index 7667cf7c4e94..d35f4417d55e 100644
> --- a/arch/x86/kernel/cpu/resctrl/core.c
> +++ b/arch/x86/kernel/cpu/resctrl/core.c
> @@ -877,11 +877,19 @@ bool rdt_cpu_has(int flag)
> return ret;
> }
>
> -bool resctrl_arch_is_evt_configurable(enum resctrl_event_id evt)
> +bool resctrl_arch_is_evt_configurable(enum resctrl_event_id evt, bool assignable)
> {
> - if (!rdt_cpu_has(X86_FEATURE_BMEC))
> + if (!assignable && !rdt_cpu_has(X86_FEATURE_BMEC))
> return false;
>
> + if (assignable && !rdt_cpu_has(X86_FEATURE_ABMC))
> + return false;
> +
I find this very confusing.
> + /*
> + * When ABMC is used the mbm_local and mbm_total events are enabled
> + * based on the equivalently named cpu features. (In order to allow
> + * fallback to the default counter assignment mode).
> + */
> switch (evt) {
> case QOS_L3_MBM_TOTAL_EVENT_ID:
> return rdt_cpu_has(X86_FEATURE_CQM_MBM_TOTAL);
Reinette
next prev parent reply other threads:[~2026-03-02 23:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 20:19 [PATCH v1 0/4] x86,fs/resctrl: Pave the way for MPAM counter assignment Ben Horgan
2026-02-25 20:19 ` [PATCH v1 1/4] x86,fs/resctrl: Make resctrl_arch_is_evt_configurable() aware of mbm_assign_mode Ben Horgan
2026-03-02 23:11 ` Reinette Chatre [this message]
2026-03-03 12:29 ` Ben Horgan
2026-03-03 18:09 ` Reinette Chatre
2026-03-04 11:07 ` Ben Horgan
2026-03-04 17:02 ` Reinette Chatre
2026-03-04 17:37 ` Ben Horgan
2026-03-04 19:23 ` Reinette Chatre
2026-03-04 21:01 ` Ben Horgan
2026-03-04 22:50 ` Reinette Chatre
2026-03-05 10:01 ` Ben Horgan
2026-03-05 17:22 ` Reinette Chatre
2026-03-05 17:34 ` Ben Horgan
2026-02-25 20:19 ` [PATCH v1 2/4] fs/resctrl: Only show 'event_filter' files if events are configurable Ben Horgan
2026-03-02 23:12 ` Reinette Chatre
2026-03-03 14:00 ` Ben Horgan
2026-03-03 18:14 ` Reinette Chatre
2026-03-04 11:31 ` Ben Horgan
2026-03-04 17:03 ` Reinette Chatre
2026-03-04 17:53 ` Ben Horgan
2026-02-25 20:19 ` [PATCH v1 3/4] fs/resctrl: Disallow the software controller when mbm counters are assignable Ben Horgan
2026-02-25 20:19 ` [PATCH v1 4/4] arm_mpam: resctrl: Use new signature for resctrl_arch_is_evt_configurable() Ben Horgan
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=d9c04234-83f1-4a63-ba8c-a267f6479d7e@intel.com \
--to=reinette.chatre@intel.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.com \
--cc=ben.horgan@arm.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=fenghuay@nvidia.com \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tan.shaopeng@fujitsu.com \
--cc=tglx@kernel.org \
--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®