[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46e6c50e-ab7d-49c0-b06f-aec51558af70@intel.com>
Date: Wed, 30 Jul 2025 13:11:03 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Babu Moger <babu.moger@....com>, <corbet@....net>, <tony.luck@...el.com>,
<james.morse@....com>, <tglx@...utronix.de>, <mingo@...hat.com>,
<bp@...en8.de>, <dave.hansen@...ux.intel.com>
CC: <Dave.Martin@....com>, <x86@...nel.org>, <hpa@...or.com>,
<akpm@...ux-foundation.org>, <paulmck@...nel.org>, <rostedt@...dmis.org>,
<Neeraj.Upadhyay@....com>, <david@...hat.com>, <arnd@...db.de>,
<fvdl@...gle.com>, <seanjc@...gle.com>, <jpoimboe@...nel.org>,
<pawan.kumar.gupta@...ux.intel.com>, <xin@...or.com>,
<manali.shukla@....com>, <tao1.su@...ux.intel.com>, <sohil.mehta@...el.com>,
<kai.huang@...el.com>, <xiaoyao.li@...el.com>, <peterz@...radead.org>,
<xin3.li@...el.com>, <kan.liang@...ux.intel.com>,
<mario.limonciello@....com>, <thomas.lendacky@....com>, <perry.yuan@....com>,
<gautham.shenoy@....com>, <chang.seok.bae@...el.com>,
<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<peternewman@...gle.com>, <eranian@...gle.com>
Subject: Re: [PATCH v16 31/34] fs/resctrl: Disable BMEC event configuration
when mbm_event mode is enabled
Hi Babu,
On 7/25/25 11:29 AM, Babu Moger wrote:
> @@ -1799,6 +1800,41 @@ static ssize_t mbm_local_bytes_config_write(struct kernfs_open_file *of,
> return ret ?: nbytes;
> }
>
> +/*
> + * resctrl_bmec_files_show() — Controls the visibility of BMEC-related resctrl
> + * files. When @show is true, the files are displayed; when false, the files
> + * are hidden.
> + * Don't treat kernfs_find_and_get failure as an error, since this function may
> + * be called regardless of whether BMEC is supported or the event is enabled.
> + */
> +static void resctrl_bmec_files_show(struct rdt_resource *r, struct kernfs_node *l3_mon_kn,
> + bool show)
> +{
> + struct kernfs_node *kn_config;
> + char name[32];
> +
> + if (!l3_mon_kn) {
> + sprintf(name, "%s_MON", r->name);
> + l3_mon_kn = kernfs_find_and_get(kn_info, name);
> + if (!l3_mon_kn)
> + return;
> + }
> +
> + kn_config = kernfs_find_and_get(l3_mon_kn, "mbm_total_bytes_config");
> + if (kn_config) {
> + kernfs_show(kn_config, show);
> + kernfs_put(kn_config);
> + }
> +
> + kn_config = kernfs_find_and_get(l3_mon_kn, "mbm_local_bytes_config");
> + if (kn_config) {
> + kernfs_show(kn_config, show);
> + kernfs_put(kn_config);
> + }
> +
> + kernfs_put(l3_mon_kn);
Looks like this will drop an extra reference if l3_mon_kn was provided as parameter.
Reinette
Powered by blists - more mailing lists