[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10e7de42-d0c4-45d8-a9f8-bd8e9d4b84db@intel.com>
Date: Tue, 5 Mar 2024 08:48:51 -0800
From: Reinette Chatre <reinette.chatre@...el.com>
To: "Luck, Tony" <tony.luck@...el.com>, "Yu, Fenghua" <fenghua.yu@...el.com>,
Peter Newman <peternewman@...gle.com>, Jonathan Corbet <corbet@....net>,
Shuah Khan <skhan@...uxfoundation.org>, "x86@...nel.org" <x86@...nel.org>
CC: Shaopeng Tan <tan.shaopeng@...itsu.com>, James Morse
<james.morse@....com>, Jamie Iles <quic_jiles@...cinc.com>, Babu Moger
<babu.moger@....com>, Randy Dunlap <rdunlap@...radead.org>, Drew Fustini
<dfustini@...libre.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-doc@...r.kernel.org"
<linux-doc@...r.kernel.org>, "patches@...ts.linux.dev"
<patches@...ts.linux.dev>
Subject: Re: [PATCH v4 1/2] x86/resctrl: Pass domain to target CPU
Hi Tony,
On 3/5/2024 8:37 AM, Luck, Tony wrote:
>> If I understand correctly that would always look for a valid "cpu"
>> even when none is needed. Not quite what I proposed but should
>> work. Just some wasted cycles in a non critical path.
>
> Reinette,
>
> Sorry for misunderstanding. You are right. Assignment to msr_param.dom
> can also be deferred to the same point. Like this:
>
> list_for_each_entry(d, &r->domains, list) {
> hw_dom = resctrl_to_arch_dom(d);
> msr_param.res = NULL;
> for (t = 0; t < CDP_NUM_TYPES; t++) {
> cfg = &hw_dom->d_resctrl.staged_config[t];
> if (!cfg->have_new_ctrl)
> continue;
>
> idx = get_config_index(closid, t);
> if (cfg->new_ctrl == hw_dom->ctrl_val[idx])
> continue;
> hw_dom->ctrl_val[idx] = cfg->new_ctrl;
>
> if (!msr_param.res) {
> msr_param.low = idx;
> msr_param.high = msr_param.low + 1;
> msr_param.res = r;
> msr_param.dom = d;
> cpu = cpumask_any(&d->cpu_mask);
> } else {
> msr_param.low = min(msr_param.low, idx);
> msr_param.high = max(msr_param.high, idx + 1);
> }
> }
> if (msr_param.res)
> smp_call_function_single(cpu, rdt_ctrl_update, &msr_param, 1);
> }
This looks good to me.
Thank you very much.
Reinette
Powered by blists - more mailing lists