[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9aeff0c8-d207-42e8-a678-e6d10356d189@arm.com>
Date: Fri, 28 Feb 2025 19:54:06 +0000
From: James Morse <james.morse@....com>
To: babu.moger@....com, x86@...nel.org, linux-kernel@...r.kernel.org
Cc: Reinette Chatre <reinette.chatre@...el.com>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, H Peter Anvin <hpa@...or.com>,
shameerali.kolothum.thodi@...wei.com,
D Scott Phillips OS <scott@...amperecomputing.com>,
carl@...amperecomputing.com, lcherian@...vell.com,
bobo.shaobowang@...wei.com, tan.shaopeng@...itsu.com,
baolin.wang@...ux.alibaba.com, Jamie Iles <quic_jiles@...cinc.com>,
Xin Hao <xhao@...ux.alibaba.com>, peternewman@...gle.com,
dfustini@...libre.com, amitsinght@...vell.com,
David Hildenbrand <david@...hat.com>, Rex Nie <rex.nie@...uarmicro.com>,
Dave Martin <dave.martin@....com>, Koba Ko <kobak@...dia.com>,
Shanker Donthineni <sdonthineni@...dia.com>,
Shaopeng Tan <tan.shaopeng@...fujitsu.com>, Tony Luck <tony.luck@...el.com>
Subject: Re: [PATCH v6 10/42] x86/resctrl: Remove rdtgroup from
update_cpu_closid_rmid()
Hi Babu,
On 27/02/2025 20:25, Moger, Babu wrote:
> On 2/7/25 12:17, James Morse wrote:
>> update_cpu_closid_rmid() takes a struct rdtgroup as an argument, which
>> it uses to update the local CPUs default pqr values. This is a problem
>> once the resctrl parts move out to /fs/, as the arch code cannot
>> poke around inside struct rdtgroup.
>>
>> Rename update_cpu_closid_rmid() as resctrl_arch_sync_cpus_defaults()
>> to be used as the target of an IPI, and pass the effective CLOSID
>> and RMID in a new struct.
>> diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
>> index a939c0cec7fe..da3b344d06d3 100644
>> --- a/include/linux/resctrl.h
>> +++ b/include/linux/resctrl.h
>> @@ -266,6 +266,28 @@ struct resctrl_schema {
>> u32 num_closid;
>> };
>>
>> +struct resctrl_cpu_defaults {
>> + u32 closid;
>> + u32 rmid;
>> +};
>> +
>
> Can you please explain why this is part of resctrl.h?
>
> Isn't this part of architecture specific definition?
update_closid_rmid() builds an on-stack copy of this, then IPIs each CPU to call
resctrl_arch_sync_cpu_closid_rmid(). Because of the IPI resctrl would need to invent an
identical structure.
If the filesystem and arch code use of this diverge it may be necessary to duplicate them,
(or declare one inside another), but its not needed today.
Thanks,
James
Powered by blists - more mailing lists