[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d4c39495-aafa-43dc-b5a9-d36c22ae4db2@amd.com>
Date: Thu, 17 Oct 2024 12:59:11 -0500
From: "Moger, Babu" <babu.moger@....com>
To: Reinette Chatre <reinette.chatre@...el.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 v8 12/25] x86/resctrl: Remove MSR reading of event
configuration value
Hi Reinette,
On 10/15/24 22:16, Reinette Chatre wrote:
> Hi Babu,
>
> On 10/9/24 10:39 AM, Babu Moger wrote:
>> The event configuration is domain specific and initialized during domain
>> initialization. The values are stored in struct rdt_hw_mon_domain.
>>
>> It is not required to read the configuration register every time user asks
>> for it. Use the value stored in struct rdt_hw_mon_domain instead.
>>
>> Introduce resctrl_arch_mon_event_config_get() and
>> resctrl_arch_mon_event_config_set() to get/set architecture domain specific
>> mbm_total_cfg/mbm_local_cfg values.
>>
>> Signed-off-by: Babu Moger <babu.moger@....com>
>> ---
> ...
>
>
>> +void resctrl_arch_mon_event_config_set(void *info)
>> +{
>> + struct mon_config_info *mon_info = info;
>> + struct rdt_hw_mon_domain *hw_dom;
>> + unsigned int index;
>> +
>> + index = mon_event_config_index_get(mon_info->evtid);
>> + if (index == INVALID_CONFIG_INDEX)
>> + return;
>> +
>> + wrmsr(MSR_IA32_EVT_CFG_BASE + index, mon_info->mon_config, 0);
>> +
>> + hw_dom = resctrl_to_arch_mon_dom(mon_info->d);
>> +
>> + switch (mon_info->evtid) {
>> + case QOS_L3_OCCUP_EVENT_ID:
>> + break;
>
> This check does no harm but I do not think it is necessary since earlier
> mon_event_config_index_get() would return INVALID_CONFIG_INDEX if the
> evtid is QOS_L3_OCCUP_EVENT_ID.
Sure. Will remove it.
>
>> + case QOS_L3_MBM_TOTAL_EVENT_ID:
>> + hw_dom->mbm_total_cfg = mon_info->mon_config;
>> + break;
>> + case QOS_L3_MBM_LOCAL_EVENT_ID:
>> + hw_dom->mbm_local_cfg = mon_info->mon_config;
>
> nit: unnecessary space
Sure.
>
>> + break;
>> + }
>> +}
>> +
>
> Reinette
>
>
--
Thanks
Babu Moger
Powered by blists - more mailing lists