Re: [PATCH v12 20/26] x86/resctrl: Provide interface to update the event configurations

Moger, Babu
2025-04-17T14:34:52Z

Hi Reinette,

On 4/16/25 13:52, Reinette Chatre wrote:
> Hi Babu,
>
> On 4/15/25 1:37 PM, Moger, Babu wrote:
>> Hi Reinette,
>>
>> On 4/11/25 17:07, Reinette Chatre wrote:
>>> Hi Babu,
>>>
>>> On 4/3/25 5:18 PM, Babu Moger wrote:
>>>> Users can modify the event configuration by writing to the event_filter
>>>> interface file. The event configurations for mbm_cntr_assign mode are
>>>> located in /sys/fs/resctrl/info/event_configs/.
>>>>
>>>> Update the assignments of all groups when the event configuration is
>>>> modified.
>>>>
>>>> Example:
>>>> $ cd /sys/fs/resctrl/
>>>> $ echo "local_reads, local_non_temporal_writes" >
>>>> info/L3_MON/counter_configs/mbm_total_bytes/event_filter
>>>>
>>>> $ cat info/L3_MON/counter_configs/mbm_total_bytes/event_filter
>>>> local_reads, local_non_temporal_writes
>>>>
>>>> Signed-off-by: Babu Moger <babu.moger@amd.com>
>>>> ---
>>>> v12: New patch to modify event configurations.
>>>> ---
>>>> Documentation/arch/x86/resctrl.rst | 10 +++
>>>> arch/x86/kernel/cpu/resctrl/rdtgroup.c | 115 ++++++++++++++++++++++++-
>>>> 2 files changed, 124 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst
>>>> index 99f9f4b9b501..4e6feba6fb08 100644
>>>> --- a/Documentation/arch/x86/resctrl.rst
>>>> +++ b/Documentation/arch/x86/resctrl.rst
>>>> @@ -335,6 +335,16 @@ with the following files:
>>>> # cat /sys/fs/resctrl/info/L3_MON/counter_configs/mbm_local_bytes/event_filter
>>>> local_reads, local_non_temporal_writes, local_reads_slow_memory
>>>>
>>>> + The event configuration can be modified by writing to the event_filter file within
>>>> + the configuration directory.
>>>
>>> Please use imperative tone.
>>
>> Sure.
>>
>> Basic question - Should the user doc also be in imperative mode? I thought
>> it only applies to commit log.
>
> I am not aware of a documented rule that user doc should be in imperative mode. I
> requested imperative tone here because writing in this way helps to remove ambiguity
> and fits with how the rest of the resctrl files are described.
>
> Looking at this specific addition I realized that there is no initial description of
> what "event_filter" contains and to make things more confusing the term "event" is
> used for both the individual "events" being counted (remote_reads, local_reads, etc.) as
> well as the (what will eventually be dynamic) name for collection of "events" being counted,
> mbm_total_bytes and mbm_local_bytes.
>
> Since "event" have been used for mbm_total_bytes and mbm_local_bytes since beginning we
> should try to come up with term that can describe what they are configured with.
>
> Below is a start of trying to address this but I think more refinement is needed (other
> possible terms for "transactions" could perhaps be "data sources"? ... what do you think?):
>
> "The read/write event_filter file contains the configuration of the event
> that reflects which transactions(?) are being counted by it."
>

How about?

"The read/write event_filter file contains the configuration of the event
that reflects which memory transactions are being counted by it."

--
Thanks
Babu Moger