[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <612ea03c-b8b5-427d-a810-8c2c291ca062@intel.com>
Date: Thu, 19 Sep 2024 09:51:52 -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 10/24] x86/resctrl: Introduce mbm_total_cfg and
mbm_local_cfg in struct rdt_hw_mon_domain
Hi Babu,
On 9/4/24 3:21 PM, Babu Moger wrote:
> If the BMEC (Bandwidth Monitoring Event Configuration) feature is
> supported, the bandwidth events can be configured to track specific
> events. The event configuration is domain specific. ABMC (Assignable
> Bandwidth Monitoring Counters) feature needs event configuration
> information to assign hardware counter to an RMID. Event configurations
"to assign hardware counter" -> "to assign a hardware counter"?
> are not stored in resctrl but instead always read from or written to
> hardware directly when prompted by user space.
>
> Read the event configuration from the hardware during the domain
> initialization. Save the configuration value in rdt_hw_mon_domain,
"rdt_hw_mon_domain" -> "struct rdt_hw_mon_domain"
> so it can be used for counter assignment.
>
> Signed-off-by: Babu Moger <babu.moger@....com>
> ---
> v7: Fixed initializing INVALID_CONFIG_VALUE to mbm_local_cfg in case of error.
>
> v6: Renamed resctrl_arch_mbm_evt_config -> resctrl_mbm_evt_config_init
> Initialized value to INVALID_CONFIG_VALUE if it is not configurable.
> Minor commit message update.
>
> v5: Exported mon_event_config_index_get.
> Renamed arch_domain_mbm_evt_config to resctrl_arch_mbm_evt_config.
>
> v4: Read the configuration information from the hardware to initialize.
> Added few commit messages.
> Fixed the tab spaces.
>
> v3: Minor changes related to rebase in mbm_config_write_domain.
>
> v2: No changes.
> ---
> arch/x86/kernel/cpu/resctrl/core.c | 2 ++
> arch/x86/kernel/cpu/resctrl/internal.h | 9 +++++++++
> arch/x86/kernel/cpu/resctrl/monitor.c | 26 ++++++++++++++++++++++++++
> arch/x86/kernel/cpu/resctrl/rdtgroup.c | 4 +---
> 4 files changed, 38 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
> index 00ad00258df2..2a4be004a2df 100644
> --- a/arch/x86/kernel/cpu/resctrl/core.c
> +++ b/arch/x86/kernel/cpu/resctrl/core.c
> @@ -632,6 +632,8 @@ static void domain_add_cpu_mon(int cpu, struct rdt_resource *r)
>
> arch_mon_domain_online(r, d);
>
> + resctrl_mbm_evt_config_init(hw_dom);
Now that the arch and fs separate becomes clear I wonder if it may help to understand
this work if we start using clear namespaces to help this distinction. Surely the
arch code is very inconsistent in this regard (thus this function fits in), but
resctrl_ has to be the prefix for fs code.
Reinette
Powered by blists - more mailing lists