From: Ben Horgan <ben.horgan@arm.com>
To: Reinette Chatre <reinette.chatre@intel.com>
Cc: linux-kernel@vger.kernel.org, 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: Thu, 5 Mar 2026 17:34:21 +0000 [thread overview]
Message-ID: <62d38819-e43c-47c0-af4c-033bfe448912@arm.com> (raw)
In-Reply-To: <940210db-1447-4a0e-8605-a3e83989afb2@intel.com>
Hi Reinette,
On 3/5/26 17:22, Reinette Chatre wrote:
> Hi Ben,
>
> On 3/5/26 2:01 AM, Ben Horgan wrote:
>> On 3/4/26 22:50, Reinette Chatre wrote:
>>> On 3/4/26 1:01 PM, Ben Horgan wrote:
>
>>>> So, to try and bring this back to what we can be done now for MPAM to
>>>> fit into the counter mode assignment interface. Just support
>>>> mbm_total_bytes and then num_mbm_cntrs is correct (nothing to do). Make
>>>> the event_filter file always display all the bandwidth types and make
>>>> that the only value that be the only value it accepts (instead of hiding
>>>> the event_filter file). If you agree I'll respin with that.
>>>
>>> From resctrl side this sounds fine. I don't have any insight into what, if any,
>>> kind of gymnastics the MPAM driver needs to do to make the discovered MSCs with
>>> their varying scope and internal vs external counts fit into this. If initial
>>> implementation indeed forces some components into categories that are not a good
>>> match then when resctrl later does get support for diverse components there may
>>> be surprises to user space along the way. For example, user space may not see the
>>> same memory bandwidth numbers reported by the same events on the same system as
>>> the interface evolves.
>>
>> Indeed, we have already weeded a few things out of the MPAM driver for
>> similar reasons. If we start with mpam only supporting a
>> non-configurable mbm_total_bytes with ABMC I think we're ok. I'll drop
>> the non-ABMC bandwidth counter support from the MPAM driver as even if
>> we've got enough counters, one per (CTRL_MON/MON, evt), we can use ABMC.
>
> It sounds like the expectation is that when there are enough counters the user
> will then run with "mbm_assign_on_mkdir" set so that counters are always dynamically
> assigned and thus essentially be "non-ABMC bandwidth counter support"?
Yes, that's the intent.
> Since "mbm_assign_on_mkdir" is set by default then user space should get sane
> behavior by default.
>
> Alternatively, a user space would just always run with "mbm_assign_on_mkdir"
> off and have full control over monitor assignment even when it is not necessary.
>
> Sounds good to me.
>
>> Also, when event configuration (read/write filtering) using user defined
>> (or new) events is added this will mean that enough counters becomes a
>> higher limit. That will mean that the software controller is not usable
>> but for now I think we can just fail when that mount option, mba_MBps,
>> is used. Later we can consider using non-ABMC bandwidth counters when
>> the software controller is requested.
>
> ok. Since info/last_cmd_status is not available to to user when mount fail,
> please do add a message to kernel log to help diagnose resctrl mount failure.
>
Yep, patch 3 does this.
>
>>
>>>
>>> "make that the only value that be the only value it accepts" - are you saying that
>>> whatever is displayed when user views the "event_filter" file is what the
>>> user can write to the "event_filter" file? I find this a challenging interface
>>> for user space to use. The expectation is that the user can write any supported
>>> memory transaction to that file and when writing fails it can only be because
>>> of an invalid memory transaction. How can user space know that events are not
>>> configurable at all? It sounds as though user space is expected to try configuring
>>> the event with a memory transaction and then, presumably, check last_cmd_status?
>>>
>>> Could this not be simplified by making the "event_filter" file read-only on
>>> MPAM systems?
>>
>> Yes, we'll need some finer grained control for which sets of bandwidth
>> types can be configured further down the line but going with read-only
>> for when there is only one fixed set seems good to me.
>
> Thank you very much.
>
> Reinette
>
Sounds like we've got a plan :) Thanks!
Ben
next prev parent reply other threads:[~2026-03-05 17:34 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
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 [this message]
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=62d38819-e43c-47c0-af4c-033bfe448912@arm.com \
--to=ben.horgan@arm.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.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=reinette.chatre@intel.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