lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5dec29f9-fe1c-4155-b745-d6a76592dbf3@amd.com>
Date: Tue, 5 Mar 2024 13:35:08 -0600
From: "Moger, Babu" <babu.moger@....com>
To: Reinette Chatre <reinette.chatre@...el.com>,
 James Morse <james.morse@....com>, corbet@....net, fenghua.yu@...el.com,
 tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
 dave.hansen@...ux.intel.com, Peter Newman <peternewman@...gle.com>
Cc: x86@...nel.org, hpa@...or.com, paulmck@...nel.org, rdunlap@...radead.org,
 tj@...nel.org, peterz@...radead.org, yanjiewtw@...il.com,
 kim.phillips@....com, lukas.bulwahn@...il.com, seanjc@...gle.com,
 jmattson@...gle.com, leitao@...ian.org, jpoimboe@...nel.org,
 rick.p.edgecombe@...el.com, kirill.shutemov@...ux.intel.com,
 jithu.joseph@...el.com, kai.huang@...el.com, kan.liang@...ux.intel.com,
 daniel.sneddon@...ux.intel.com, pbonzini@...hat.com, sandipan.das@....com,
 ilpo.jarvinen@...ux.intel.com, maciej.wieczor-retman@...el.com,
 linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org, eranian@...gle.com
Subject: Re: [PATCH v2 00/17] x86/resctrl : Support AMD Assignable Bandwidth
 Monitoring Counters (ABMC)

Hi Reinette,

On 3/5/24 11:12, Reinette Chatre wrote:
> Hi Babu,
> 
> On 3/4/2024 2:24 PM, Moger, Babu wrote:
> 
>> Based on our discussion, I am listing few examples here. Let me know if I missed something.
>>
>>   mount  -t resctrl resctrl /sys/fs/resctrl/
> 
> When creating examples it may help to accompany it with an overview of
> which groups exist.

Ok. I can add a line about types of groups before the examples.

> 
>>
>> 1. Assign both local and total counters to default group on domain 0 and 1.
>>    $echo "//00=lt;01=lt" > /sys/fs/resctrl/info/L3_MON/mbm_assign_control
>>
>>    $cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control
>>    //00=lt;01=lt
> 
> I also think it will be useful to always print a small header that guides
> the interpretation. For example,
> 
> $ cat mbm_assign_control 
> #control_group/monitor_group/flags
> ...

Ok. Sure

> 
>>
>> 2. Assign a total event to mon group inside the default group for both domain 0 and 1.
>>
>>    $mkdir /sys/fs/resctrl/mon_groups/mon_a
>>    $echo "/mon_a/00+t;01+t" > /sys/fs/resctrl/info/L3_MON/mbm_assign_control
>>
>>    $cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control
>>    //00=lt;01=lt
>>    /mon_a/00=t;01=t
> 
> For an example of "+" I think understanding the output will be easier if the "before" view with
> existing flags is available. For example,
> if it was
>    $cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control
>    #control_group/monitor_group/flags
>    /mon_a/00=l;01=l
> 
> then
>    $echo "/mon_a/00+t;01+t" > /sys/fs/resctrl/info/L3_MON/mbm_assign_control

Yes. Makes Sense.
> 
> would result in:
>    $cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control
>    #control_group/monitor_group/flags
>    /mon_a/00=lt;01=lt
> 
> An example like above would make it easier to understand how it is different
> from using "=" like in example 1.

Yes. Sure.
> 
>>
>> 3. Assign a local event to non-default control mon group both domain 0 and 1.
>>    $mkdir /sys/fs/resctrl/ctrl_a
>>    $echo "/ctrl_a/00=l;01=l"  > /sys/fs/resctrl/info/L3_MON/mbm_assign_control
> 
> I think this should be:
> 	$echo "ctrl_a//00=l;01=l"  > /sys/fs/resctrl/info/L3_MON/mbm_assign_control

Ok.

> 
>>
>>    $cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control
>>    //00=lt;01=lt
>>    /mon_a/00=t;01=t
>>    /ctrl_a/00=l;01=l
> 
>      ctrl_a//00=l;01=l

Yes.
> 
>>
>> 4. Assign a both counters to mon group inside another control group(non-default).
>>    $mkdir /sys/fs/resctrl/ctrl_a/mon_ab/
> 
> Above will not work.

Yes. Missed that.
> 
>      $ mkdir /sys/fs/resctrl/ctrl_a
>      $ mkdir /sys/fs/resctrl/ctrl_a/mon_groups/mon_ab
> 
>>    $echo "ctrl_a/mon_ab/00=lt;01=lt" > /sys/fs/resctrl/nfo/L3_MON/mbm_assign_contro
> 
> (watch out for typos in examples)

Sure.
> 
>>
>>    $cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control
>>    //00=lt;01=lt
>>    /mon_a/00=t;01=t
>>    /ctrl_a/00=l;01=l
>>    ctrl_a/mon_ab/00=lt;01=lt
>>
>> 5. Unassign a counter to mon group inside another control group(non-default).
>>    $echo "ctrl_a/mon_ab/00-l;01-l" > /sys/fs/resctrl/nfo/L3_MON/mbm_assign_control
>>
>>   $cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control
>>   //00=lt;01=lt
>>   /mon_a/00=t;01=t
>>   /ctrl_a/00=l;01=l
>>   ctrl_a/mon_ab/00=t;01=t
> 
> ack.
> 
>>
>> 6. Unassign all the counters on a specific group.
>>    $echo "ctrl_a/mon_ab/00=_" > /sys/fs/resctrl/nfo/L3_MON/mbm_assign_control
> 
> (watch for typos)
> 
> Note that this only did unassign on domain 0.

Yes.
> 
>>
>>    $cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control
>>    //00=lt;01=lt
>>    /mon_a/00=t;01=t
>>    /ctrl_a/00=l;01=l
>>    ctrl_a/mon_ab/00=_;01=_
> 
>      ctrl_a/mon_ab/00=_;01=t
> 
> To address some earlier requirements I think it will be helpful to also
> show an example of multiple groups changed with a single write.

oh.. ok. Two groups delimeted by "\n".

-- 
Thanks
Babu Moger

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ