[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a8a9bfc6-1574-1a75-7cae-87e5349e94e5@intel.com>
Date: Wed, 16 Aug 2023 12:07:43 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: <babu.moger@....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 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.
Reinette
Powered by blists - more mailing lists