[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fd370cfa-cee7-4b3a-8a95-b6047794d475@intel.com>
Date: Thu, 19 Sep 2024 10:53:03 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Babu Moger <babu.moger@....com>, <corbet@....net>, <fenghua.yu@...el.com>,
<tglx@...utronix.de>, <mingo@...hat.com>, <bp@...en8.de>,
<dave.hansen@...ux.intel.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>,
<peternewman@...gle.com>, <maciej.wieczor-retman@...el.com>,
<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<eranian@...gle.com>, <james.morse@....com>
Subject: Re: [PATCH v7 23/24] x86/resctrl: Introduce interface to list
assignment states of all the groups
Hi Babu,
On 9/4/24 3:21 PM, Babu Moger wrote:
> Provide the interface to list the assignment states of all the resctrl
> groups in mbm_cntr_assign mode.
>
> Example:
> $cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control
It is not clear what is intended with above example, was it intended to
have some output?
>
> List follows the following format:
>
> "<CTRL_MON group>/<MON group>/<domain_id>=<flags>"
>
> Format for specific type of groups:
>
> - Default CTRL_MON group:
> "//<domain_id>=<flags>"
>
> - Non-default CTRL_MON group:
> "<CTRL_MON group>//<domain_id>=<flags>"
>
> - Child MON group of default CTRL_MON group:
> "/<MON group>/<domain_id>=<flags>"
>
> - Child MON group of non-default CTRL_MON group:
> "<CTRL_MON group>/<MON group>/<domain_id>=<flags>"
>
> Flags can be one of the following:
> t MBM total event is enabled
> l MBM local event is enabled
> tl Both total and local MBM events are enabled
> _ None of the MBM events are enabled
>
> Signed-off-by: Babu Moger <babu.moger@....com>
> ---
> +"mbm_assign_control":
> + Reports the resctrl group and monitor status of each group.
> +
> + List follows the following format:
> + "<CTRL_MON group>/<MON group>/<domain_id>=<flags>"
> +
> + Format for specific type of groups:
> +
> + * Default CTRL_MON group:
> + "//<domain_id>=<flags>"
> +
> + * Non-default CTRL_MON group:
> + "<CTRL_MON group>//<domain_id>=<flags>"
> +
> + * Child MON group of default CTRL_MON group:
> + "/<MON group>/<domain_id>=<flags>"
> +
> + * Child MON group of non-default CTRL_MON group:
> + "<CTRL_MON group>/<MON group>/<domain_id>=<flags>"
> +
> + Flags can be one of the following:
> + ::
> +
> + t MBM total event is assigned.
> + l MBM local event is assigned.
> + tl Both total and local MBM events are assigned.
> + _ None of the MBM events are assigned.
> +
> + Examples:
> + ::
> +
> + # mkdir /sys/fs/resctrl/mon_groups/child_default_mon_grp
> + # mkdir /sys/fs/resctrl/non_default_ctrl_mon_grp
> + # mkdir /sys/fs/resctrl/non_default_ctrl_mon_grp/mon_groups/child_non_default_mon_grp
> +
> + # cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control
> + non_default_ctrl_mon_grp//0=tl;1=tl;
> + non_default_ctrl_mon_grp/child_non_default_mon_grp/0=tl;1=tl;
> + //0=tl;1=tl;
> + /child_default_mon_grp/0=tl;1=tl;
> +
> + There are four resctrl groups. All the groups have total and local MBM events
> + assigned on domain 0 and 1.
> +
Please create the docs in chosen format, like htmldocs, and see how it ends up being formatted.
For example, above seems to be intended to be a code sample but the description ("There are
four resctrl ...") appears as part of the code sample.
> "max_threshold_occupancy":
> Read/write file provides the largest value (in
> bytes) at which a previously used LLC_occupancy
...
> +static int rdtgroup_mbm_assign_control_show(struct kernfs_open_file *of,
> + struct seq_file *s, void *v)
> +{
> + struct rdt_resource *r = of->kn->parent->priv;
> + struct rdt_mon_domain *dom;
> + struct rdtgroup *rdtg;
> + char str[10];
> +
> + mutex_lock(&rdtgroup_mutex);
> +
> + if (!resctrl_arch_mbm_cntr_assign_enabled(r)) {
> + rdt_last_cmd_puts("mbm_cntr_assign mode is not enabled\n");
> + mutex_unlock(&rdtgroup_mutex);
> + return -EINVAL;
> + }
> +
> + rdt_last_cmd_clear();
This should be done before any attempt to write to the buffer.
Reinette
Powered by blists - more mailing lists