From: Reinette Chatre <reinette.chatre@intel.com>
To: <babu.moger@amd.com>, "Moger, Babu" <bmoger@amd.com>,
"Luck, Tony" <tony.luck@intel.com>
Cc: Peter Newman <peternewman@google.com>,
Dave Martin <Dave.Martin@arm.com>, <corbet@lwn.net>,
<tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de>,
<dave.hansen@linux.intel.com>, <x86@kernel.org>, <hpa@zytor.com>,
<paulmck@kernel.org>, <akpm@linux-foundation.org>,
<thuth@redhat.com>, <rostedt@goodmis.org>,
<xiongwei.song@windriver.com>,
<pawan.kumar.gupta@linux.intel.com>,
<daniel.sneddon@linux.intel.com>, <jpoimboe@kernel.org>,
<perry.yuan@amd.com>, <sandipan.das@amd.com>,
<kai.huang@intel.com>, <xiaoyao.li@intel.com>,
<seanjc@google.com>, <xin3.li@intel.com>,
<andrew.cooper3@citrix.com>, <ebiggers@google.com>,
<mario.limonciello@amd.com>, <james.morse@arm.com>,
<tan.shaopeng@fujitsu.com>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <maciej.wieczor-retman@intel.com>,
<eranian@google.com>
Subject: Re: [PATCH v11 00/23] x86/resctrl : Support AMD Assignable Bandwidth Monitoring Counters (ABMC)
Date: Thu, 13 Mar 2025 14:21:52 -0700 [thread overview]
Message-ID: <7f54f9aa-1102-49ed-b830-6facb6f48366@intel.com> (raw)
In-Reply-To: <be6d23c8-3e93-4bdc-8b33-d3af7df7cc94@amd.com>
Hi Babu,
On 3/13/25 1:13 PM, Moger, Babu wrote:
> On 3/13/25 11:08, Reinette Chatre wrote:
>> On 3/12/25 11:14 AM, Moger, Babu wrote:
>>> On 3/12/25 12:14, Reinette Chatre wrote:
>>>> On 3/12/25 9:03 AM, Moger, Babu wrote:
>>>>> On 3/12/25 10:07, Reinette Chatre wrote:
> Here are the steps. Just copying steps from Peters proposal.
> https://lore.kernel.org/lkml/CALPaoCiii0vXOF06mfV=kVLBzhfNo0SFqt4kQGwGSGVUqvr2Dg@mail.gmail.com/
Thank you very much for detailing the steps. It is starting the fall into place
for me.
>
>
> 1. Mount the resctrl
> mount -t resctrl resctrl /sys/fs/resctrl
I assume that on ABMC system the plan remains to have ABMC enabled by default, which
will continue to depend on BMEC.
How would the existing BMEC implementation be impacted in this case?
Without any changes to BMEC support the mbm_total_bytes_config and mbm_local_bytes_config
files will remain and user space may continue to use them to change the event
configurations with confusing expecations/results on an ABMC system.
One possibility may be that a user may see below on ABMC system even if BMEC is supported:
# cat /sys/fs/resctrl/info/L3_MON/mon_features
llc_occupancy
mbm_total_bytes
mbm_local_bytes
With the above a user cannot be expected to want to interact with mbm_total_bytes_config
and mbm_local_bytes_config, which may be the simplest to do.
To follow that, we should also consider how "mon_features" will change with this
implementation.
>
> 2. When ABMC is supported two default configurations will be created.
>
> a. info/L3_MON/counter_configs/mbm_total_bytes/event_filter
> b. info/L3_MON/counter_configs/mbm_local_bytes/event_filter
>
> These files will be populated with default total and local events
> # cat info/L3_MON/counter_configs/mbm_total_bytes/event_filter
> VictimBW
> RmtSlowFill
> RmtNTWr
> RmtFill
> LclFill
> LclNTWr
> LclSlowFill
Looks good. Here we could perhaps start nitpicking about naming and line separation.
I think it may be easier if the fields are separated by comma, but more on that
below ...
>
> # cat info/L3_MON/counter_configs/mbm_local_bytes/event_filter
> LclFill,
> LclNTWr
> LclSlowFill
>
> 3. Users will have options to update the event configuration.
> echo LclFill > info/L3_MON/counter_configs/mbm_local_bytes/event_filter
We need to be clear on how user space interacts with this file. For example,
can user space "append" configurations? Specifically, if the file has
contents like your earlier example:
# cat info/L3_MON/counter_configs/mbm_local_bytes/event_filter
LclFill
LclNTWr
LclSlowFill
Should above be created with (note "append" needed for second and third):
echo LclFill > info/L3_MON/counter_configs/mbm_local_bytes/event_filter
echo LclNTWr >> info/L3_MON/counter_configs/mbm_local_bytes/event_filter
echo LclSlowFill >> info/L3_MON/counter_configs/mbm_local_bytes/event_filter
Is it possible to set multiple configurations in one write like below?
echo "LclFill,LclNTWr,LclSlowFill" > info/L3_MON/counter_configs/mbm_local_bytes/event_filter
(note above where it may be easier for user space to use comma (or some other field separator)
when providing multiple configurations at a time, with this, to match, having output in
commas may be easier since it makes user interface copy&paste easier)
If file has content like:
# cat info/L3_MON/counter_configs/mbm_local_bytes/event_filter
LclNTWr
LclSlowFill
What is impact of the following:
echo LclFill > info/L3_MON/counter_configs/mbm_local_bytes/event_filter
Is it (append):
# cat info/L3_MON/counter_configs/mbm_local_bytes/event_filter
LclFill
LclNTWr
LclSlowFill
or (overwrite):
# cat info/L3_MON/counter_configs/mbm_local_bytes/event_filter
LclFill
I do think the interface will be more intuitive it if follows regular file
operations wrt "append" and such. I have not looked into how kernfs supports
"append".
As alternative, we can try to work the previous mbm_assign_control syntax in here (use + and -).
For example:
# cat info/L3_MON/counter_configs/mbm_local_bytes/event_filter
LclNTWr
# echo "+LclFill,-LclNTWr,+LclSlowFill" > info/L3_MON/counter_configs/mbm_local_bytes/event_filter
# cat info/L3_MON/counter_configs/mbm_local_bytes/event_filter
LclFill,LclSlowFill
With something like above resctrl just deals with file writes as before.
>
> 4. As usual the events can be read from the mon_data directories.
> #mkdir /sys/fs/resctrl/test
> #cd /sys/fs/resctr/test
> #cat test/mon_data/mon_data/mon_L3_00/mbm_tota_bytes
> 101010
> #cat test/mon_data/mon_data/mon_L3_00/mbm_local_bytes
> 32323
>
> 5. There will be 3 files created in each group's mon_data directory when
> ABMC is supported.
>
> a. test/mon_data/mon_L3_00/assign_exclusive
> b. test/mon_data/mon_L3_00/assign_shared
> c. test/mon_data/mon_L3_00/unassign
>
>
> 6. Events can be assigned/unassigned by these commands
>
> # echo mbm_total_bytes > test/mon_data/mon_L3_00/assign_exclusive
> # echo mbm_local_bytes > test/mon_data/mon_L3_01/assign_exclusive
> # echo mbm_local_bytes > test/mon_data/mon_L3_01/unassign
>
>
> Note:
> I feel 3 files are excessive here. We can probably achieve everything in
> just one file.
Could you please elaborate what your concern is? You mention that it is
excessive but it is not clear to me what issues may arise by
having three files instead of one.
I do think, and Peter also mentioned [1] this, that it may be useful,
to "put a group/resource-scoped assign_* file higher in the hierarchy
to make it easier for users who want to configure all domains the
same for a group."
Placing *additional* files higher in hierarchy (used to manage counters in all
domains) may be more useful that trying to provide the shared/exclusive/unassign
in one file per domain.
>
> Not sure about mbm_assign_control interface as there are concerns with
> group listing holding the lock for long.
>
> -----------------------------------------------------------------------
> Second phase, we can add support for "mkdir"
>
> 1. mkdir info/L3_MON/counter_configs/mbm_read_only
>
> 2. mkdir option will create "event_filter" file.
> info/L3_MON/counter_configs/mbm_read_only/event_filter
>
Got it!
> 3. Users can modify event configuration.
> echo LclFill > info/L3_MON/counter_configs/mbm_read_only/event_filter
>
> 4. Users can assign the events
>
> echo mbm_read_only > test/mon_data/mon_L3_00/assign_exclusive
>
> 5. Events can be read in
>
> test/mon_data/mon_data/mon_L3_00/mbm_read_only
>
Related to comment from Tony [2] about rmdir, please also consider that
original mbm_local_bytes/mbm_total_bytes could also be removed because at this
point they should not appear different from other counter configurations ... apart
from being pre-populated for backward compatibility.
Thank you.
Reinette
[1] https://lore.kernel.org/lkml/CALPaoCiii0vXOF06mfV=kVLBzhfNo0SFqt4kQGwGSGVUqvr2Dg@mail.gmail.com/
[2] https://lore.kernel.org/lkml/Z9NB0wd8ZewLjNAd@agluck-desk3/
next prev parent reply other threads:[~2025-03-13 21:22 UTC|newest]
Thread overview: 209+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-22 20:20 [PATCH v11 00/23] x86/resctrl : Support AMD Assignable Bandwidth Monitoring Counters (ABMC) Babu Moger
2025-01-22 20:20 ` [PATCH v11 01/23] x86/resctrl: Add __init attribute to functions called from resctrl_late_init() Babu Moger
2025-02-05 22:22 ` Reinette Chatre
2025-02-19 13:28 ` Dave Martin
2025-02-19 16:53 ` Moger, Babu
2025-02-20 13:29 ` Dave Martin
2025-01-22 20:20 ` [PATCH v11 02/23] x86/cpufeatures: Add support for Assignable Bandwidth Monitoring Counters (ABMC) Babu Moger
2025-01-22 20:20 ` [PATCH v11 03/23] x86/resctrl: Add ABMC feature in the command line options Babu Moger
2025-01-22 20:20 ` [PATCH v11 04/23] x86/resctrl: Consolidate monitoring related data from rdt_resource Babu Moger
2025-01-22 20:20 ` [PATCH v11 05/23] x86/resctrl: Detect Assignable Bandwidth Monitoring feature details Babu Moger
2025-01-22 20:20 ` [PATCH v11 06/23] x86/resctrl: Add support to enable/disable AMD ABMC feature Babu Moger
2025-02-05 22:49 ` Reinette Chatre
2025-02-06 16:15 ` Moger, Babu
2025-02-06 18:42 ` Reinette Chatre
2025-02-06 22:57 ` Moger, Babu
2025-02-06 23:28 ` Reinette Chatre
2025-02-21 18:05 ` James Morse
2025-02-21 18:25 ` Reinette Chatre
2025-01-22 20:20 ` [PATCH v11 07/23] x86/resctrl: Introduce the interface to display monitor mode Babu Moger
2025-02-06 18:01 ` Reinette Chatre
2025-02-06 23:41 ` Moger, Babu
2025-02-21 18:06 ` James Morse
2025-02-21 19:44 ` Moger, Babu
2025-01-22 20:20 ` [PATCH v11 08/23] x86/resctrl: Introduce interface to display number of monitoring counters Babu Moger
2025-02-05 23:17 ` Reinette Chatre
2025-02-07 17:18 ` Moger, Babu
2025-02-07 18:52 ` Moger, Babu
2025-02-10 18:08 ` Reinette Chatre
2025-02-10 20:26 ` Moger, Babu
2025-01-22 20:20 ` [PATCH v11 09/23] x86/resctrl: Introduce mbm_total_cfg and mbm_local_cfg in struct rdt_hw_mon_domain Babu Moger
2025-01-22 20:20 ` [PATCH v11 10/23] x86/resctrl: Remove MSR reading of event configuration value Babu Moger
2025-02-05 23:58 ` Reinette Chatre
2025-02-06 0:51 ` Luck, Tony
2025-02-06 1:41 ` Reinette Chatre
2025-02-06 15:56 ` Luck, Tony
2025-02-21 18:08 ` James Morse
2025-02-19 13:28 ` Dave Martin
2025-02-21 18:08 ` James Morse
2025-02-07 17:30 ` Moger, Babu
2025-02-06 6:24 ` Xin Li
2025-02-06 16:17 ` Reinette Chatre
2025-02-07 10:07 ` Xin Li
2025-02-11 19:44 ` Moger, Babu
2025-02-12 8:33 ` Xin Li
2025-01-22 20:20 ` [PATCH v11 11/23] x86/resctrl: Introduce mbm_cntr_cfg to track assignable counters at domain Babu Moger
2025-02-05 23:57 ` Reinette Chatre
2025-02-07 18:23 ` Moger, Babu
2025-02-10 18:10 ` Reinette Chatre
2025-02-19 13:30 ` Dave Martin
2025-02-19 18:07 ` Moger, Babu
2025-02-20 13:33 ` Dave Martin
2025-02-21 18:07 ` James Morse
2025-02-21 18:35 ` Reinette Chatre
2025-02-21 20:10 ` Moger, Babu
2025-01-22 20:20 ` [PATCH v11 12/23] x86/resctrl: Introduce interface to display number of free counters Babu Moger
2025-02-06 0:19 ` Reinette Chatre
2025-02-07 18:59 ` Moger, Babu
2025-02-19 13:31 ` Dave Martin
2025-01-22 20:20 ` [PATCH v11 13/23] x86/resctrl: Add data structures and definitions for ABMC assignment Babu Moger
2025-01-22 20:20 ` [PATCH v11 14/23] x86/resctrl: Implement resctrl_arch_config_cntr() to assign a counter with ABMC Babu Moger
2025-02-19 13:32 ` Dave Martin
2025-02-19 21:00 ` Moger, Babu
2025-02-21 18:06 ` James Morse
2025-02-21 22:24 ` Moger, Babu
2025-01-22 20:20 ` [PATCH v11 15/23] x86/resctrl: Add the functionality to assigm MBM events Babu Moger
2025-02-06 1:05 ` Reinette Chatre
2025-02-07 21:10 ` Moger, Babu
2025-02-10 18:25 ` Reinette Chatre
2025-01-22 20:20 ` [PATCH v11 16/23] x86/resctrl: Add the functionality to unassigm " Babu Moger
2025-02-06 3:54 ` Reinette Chatre
2025-02-10 16:23 ` Moger, Babu
2025-02-10 18:30 ` Reinette Chatre
2025-02-22 0:36 ` Moger, Babu
2025-01-22 20:20 ` [PATCH v11 17/23] x86/resctrl: Auto assign/unassign counters when mbm_cntr_assign is enabled Babu Moger
2025-02-06 18:03 ` Reinette Chatre
2025-02-10 17:27 ` Moger, Babu
2025-02-10 18:34 ` Reinette Chatre
2025-02-19 13:41 ` Dave Martin
2025-02-19 14:09 ` Peter Newman
2025-02-19 17:55 ` Reinette Chatre
2025-02-20 10:35 ` Peter Newman
2025-02-20 13:40 ` Dave Martin
2025-02-20 17:08 ` Reinette Chatre
2025-02-21 17:14 ` Dave Martin
2025-02-21 18:23 ` Moger, Babu
2025-02-21 22:48 ` Reinette Chatre
2025-02-21 23:42 ` Moger, Babu
2025-02-27 11:07 ` Peter Newman
2025-01-22 20:20 ` [PATCH v11 18/23] x86/resctrl: Report "Unassigned" for MBM events in mbm_cntr_assign mode Babu Moger
2025-02-06 18:04 ` Reinette Chatre
2025-02-10 17:39 ` Moger, Babu
2025-01-22 20:20 ` [PATCH v11 19/23] x86/resctrl: Introduce the interface to switch between monitor modes Babu Moger
2025-02-06 18:05 ` Reinette Chatre
2025-02-10 18:54 ` Moger, Babu
2025-01-22 20:20 ` [PATCH v11 20/23] x86/resctrl: Configure mbm_cntr_assign mode if supported Babu Moger
2025-02-21 18:06 ` James Morse
2025-02-24 15:49 ` Moger, Babu
2025-02-24 17:01 ` Reinette Chatre
2025-02-24 21:18 ` Moger, Babu
2025-02-24 22:20 ` Reinette Chatre
2025-01-22 20:20 ` [PATCH v11 21/23] x86/resctrl: Update assignments on event configuration changes Babu Moger
2025-01-22 20:20 ` [PATCH v11 22/23] x86/resctrl: Introduce interface to list assignment states of all the groups Babu Moger
2025-02-19 13:53 ` Dave Martin
2025-02-19 21:09 ` Moger, Babu
2025-02-20 15:44 ` Dave Martin
2025-02-20 21:29 ` Moger, Babu
2025-02-21 16:00 ` Dave Martin
2025-02-21 20:10 ` Reinette Chatre
2025-02-24 17:17 ` Dave Martin
2025-02-24 17:23 ` Luck, Tony
2025-02-28 17:50 ` Dave Martin
2025-03-03 19:30 ` Luck, Tony
2025-03-05 18:06 ` Dave Martin
2025-01-22 20:20 ` [PATCH v11 23/23] x86/resctrl: Introduce interface to modify assignment states of " Babu Moger
2025-02-06 18:48 ` Reinette Chatre
2025-02-10 19:46 ` Moger, Babu
2025-02-19 16:07 ` Dave Martin
2025-02-19 17:43 ` Luck, Tony
2025-02-20 14:57 ` Dave Martin
2025-02-20 0:34 ` Moger, Babu
2025-02-20 15:21 ` Dave Martin
2025-02-20 20:57 ` Moger, Babu
2025-02-21 15:53 ` Dave Martin
2025-02-21 20:16 ` Reinette Chatre
2025-02-21 18:07 ` James Morse
2025-02-24 20:49 ` Moger, Babu
2025-02-03 14:54 ` [PATCH v11 00/23] x86/resctrl : Support AMD Assignable Bandwidth Monitoring Counters (ABMC) Peter Newman
2025-02-03 20:49 ` Moger, Babu
2025-02-13 17:51 ` Dave Martin
2025-02-13 18:08 ` Luck, Tony
2025-02-12 17:46 ` Dave Martin
2025-02-12 23:33 ` Reinette Chatre
2025-02-12 23:40 ` Reinette Chatre
2025-02-13 0:11 ` Luck, Tony
2025-02-13 17:56 ` Dave Martin
2025-02-13 17:37 ` Dave Martin
2025-02-14 6:26 ` Reinette Chatre
2025-02-14 18:31 ` Moger, Babu
2025-02-14 19:18 ` Reinette Chatre
2025-02-14 19:51 ` Moger, Babu
2025-02-17 10:26 ` Peter Newman
2025-02-17 16:45 ` Moger, Babu
2025-02-18 12:30 ` Dave Martin
2025-02-18 15:39 ` Moger, Babu
2025-02-18 18:14 ` Reinette Chatre
2025-02-18 19:32 ` Moger, Babu
2025-02-18 21:29 ` Reinette Chatre
2025-02-19 12:26 ` Dave Martin
2025-02-19 12:24 ` Dave Martin
2025-02-18 16:51 ` Luck, Tony
2025-02-18 18:27 ` Reinette Chatre
2025-02-18 19:08 ` Luck, Tony
2025-02-18 21:32 ` Reinette Chatre
2025-02-18 17:49 ` Reinette Chatre
2025-02-19 11:28 ` Peter Newman
2025-02-19 12:26 ` Dave Martin
2025-02-19 17:56 ` Reinette Chatre
2025-02-20 14:53 ` Peter Newman
2025-02-20 18:36 ` Reinette Chatre
2025-02-21 13:12 ` Peter Newman
2025-02-21 22:43 ` Reinette Chatre
2025-02-25 17:11 ` Peter Newman
2025-02-25 21:31 ` Moger, Babu
2025-02-26 13:27 ` Peter Newman
2025-02-26 16:25 ` Reinette Chatre
2025-02-26 17:12 ` Moger, Babu
2025-03-03 19:16 ` Moger, Babu
2025-03-04 16:44 ` Peter Newman
2025-03-04 21:49 ` Moger, Babu
2025-03-05 10:40 ` Peter Newman
2025-03-05 19:34 ` Moger, Babu
2025-03-10 22:48 ` Moger, Babu
2025-03-10 23:22 ` Luck, Tony
2025-03-11 1:44 ` Moger, Babu
2025-03-11 3:51 ` Reinette Chatre
2025-03-11 20:35 ` Moger, Babu
2025-03-11 20:53 ` Luck, Tony
2025-03-12 15:14 ` Moger, Babu
2025-03-12 15:15 ` Reinette Chatre
2025-03-12 15:07 ` Reinette Chatre
2025-03-12 16:03 ` Moger, Babu
2025-03-12 17:14 ` Reinette Chatre
2025-03-12 18:14 ` Moger, Babu
2025-03-13 16:08 ` Reinette Chatre
2025-03-13 20:13 ` Moger, Babu
2025-03-13 20:36 ` Luck, Tony
2025-03-14 14:49 ` Moger, Babu
2025-03-13 21:21 ` Reinette Chatre [this message]
2025-03-14 16:18 ` Moger, Babu
2025-03-19 18:36 ` Reinette Chatre
2025-03-20 18:12 ` Moger, Babu
2025-03-20 22:35 ` Reinette Chatre
2025-03-21 0:35 ` Moger, Babu
2025-03-17 16:27 ` Peter Newman
2025-03-17 23:00 ` Moger, Babu
2025-03-19 20:53 ` Reinette Chatre
2025-03-20 20:29 ` Moger, Babu
2025-02-25 21:41 ` Reinette Chatre
2025-02-20 16:46 ` Dave Martin
2025-02-20 17:46 ` Dave Martin
2025-02-20 18:36 ` Reinette Chatre
2025-02-21 16:47 ` Dave Martin
2025-02-21 22:43 ` Reinette Chatre
2025-02-13 16:19 ` Moger, Babu
2025-02-13 18:18 ` Dave Martin
2025-02-13 18:39 ` Luck, Tony
2025-02-14 6:34 ` Reinette Chatre
2025-02-14 7:23 ` Reinette Chatre
2025-02-21 18:07 ` James Morse
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=7f54f9aa-1102-49ed-b830-6facb6f48366@intel.com \
--to=reinette.chatre@intel.com \
--cc=Dave.Martin@arm.com \
--cc=akpm@linux-foundation.org \
--cc=andrew.cooper3@citrix.com \
--cc=babu.moger@amd.com \
--cc=bmoger@amd.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=daniel.sneddon@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=ebiggers@google.com \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=jpoimboe@kernel.org \
--cc=kai.huang@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.wieczor-retman@intel.com \
--cc=mario.limonciello@amd.com \
--cc=mingo@redhat.com \
--cc=paulmck@kernel.org \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=perry.yuan@amd.com \
--cc=peternewman@google.com \
--cc=rostedt@goodmis.org \
--cc=sandipan.das@amd.com \
--cc=seanjc@google.com \
--cc=tan.shaopeng@fujitsu.com \
--cc=tglx@linutronix.de \
--cc=thuth@redhat.com \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=xiaoyao.li@intel.com \
--cc=xin3.li@intel.com \
--cc=xiongwei.song@windriver.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;
as well as URLs for NNTP newsgroup(s).