Re: [PATCH v2 00/17] x86/resctrl : Support AMD Assignable Bandwidth Monitoring Counters (ABMC)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

> 
> 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
...

> 
> 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

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.

> 
> 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

> 
>    $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

> 
> 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.

     $ 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)

> 
>    $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.

> 
>    $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.

Reinette





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux