[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <812de9fa-ad55-2d5c-6d15-a95bfd0181ae@amd.com>
Date: Thu, 17 Aug 2023 09:22:34 -0500
From: "Moger, Babu" <babu.moger@....com>
To: Reinette Chatre <reinette.chatre@...el.com>, corbet@....net,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de
Cc: fenghua.yu@...el.com, dave.hansen@...ux.intel.com, x86@...nel.org,
hpa@...or.com, paulmck@...nel.org, akpm@...ux-foundation.org,
quic_neeraju@...cinc.com, rdunlap@...radead.org,
damien.lemoal@...nsource.wdc.com, songmuchun@...edance.com,
peterz@...radead.org, jpoimboe@...nel.org, pbonzini@...hat.com,
chang.seok.bae@...el.com, pawan.kumar.gupta@...ux.intel.com,
jmattson@...gle.com, daniel.sneddon@...ux.intel.com,
sandipan.das@....com, tony.luck@...el.com, james.morse@....com,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
bagasdotme@...il.com, eranian@...gle.com,
christophe.leroy@...roup.eu, jarkko@...nel.org,
adrian.hunter@...el.com, quic_jiles@...cinc.com,
peternewman@...gle.com
Subject: Re: [PATCH v7 5/8] x86/resctrl: Unwind the errors inside
rdt_enable_ctx()
Hi Reinette,
On 8/16/23 14:07, Reinette Chatre wrote:
> Hi Babu,
>
> On 8/16/2023 11:17 AM, Moger, Babu wrote:
>> At rdt_kill_sb() the fs context is already freed. But, we can call
>> rdt_disable_ctx() with no parameter. We will have to depend on other
>> parameters to free the enabled features. We can use the same call both in
>> rdt_get_tree() (the failure path above) and in rdt_kill_sb().
>>
>> The function rdt_disable_ctx will look like this.
>>
>> +static void rdt_disable_ctx(void)
>> +{
>> + if (resctrl_arch_get_cdp_enabled(RDT_RESOURCE_L3))
>> + resctrl_arch_set_cdp_enabled(RDT_RESOURCE_L3, false);
>> +
>> + if (resctrl_arch_get_cdp_enabled(RDT_RESOURCE_L2))
>> + resctrl_arch_set_cdp_enabled(RDT_RESOURCE_L2, false);
>> +
>> + if (is_mba_sc(&rdt_resources_all[RDT_RESOURCE_MBA].r_resctrl))
>> + set_mba_sc(false);
>> +}
>>
>>
>
> This looks good to me. I think this will end up making
> cdp_disable_all() unused so it may be candidate for removal as part
> of this change.
Yes. We can remove cdp_disable_all() at part of this patch.
--
Thanks
Babu Moger
Powered by blists - more mailing lists