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: <d29a28c8-1180-45ec-bd87-d2e8a8124c42@intel.com>
Date: Tue, 5 Mar 2024 09:12:03 -0800
From: Reinette Chatre <reinette.chatre@...el.com>
To: <babu.moger@....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 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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ