[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e0ac8b22-ba7e-4a99-8cc7-9a324f05ebcd@arm.com>
Date: Fri, 28 Feb 2025 19:57:26 +0000
From: James Morse <james.morse@....com>
To: Reinette Chatre <reinette.chatre@...el.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, H Peter Anvin <hpa@...or.com>,
Babu Moger <Babu.Moger@....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 41/42] x86/resctrl: Move the filesystem bits to headers
visible to fs/resctrl
Hi Reinette,
On 20/02/2025 06:00, Reinette Chatre wrote:
> On 2/7/25 10:18 AM, James Morse wrote:
>> Once the filesystem parts of resctrl move to fs/resctrl, it cannot rely
>> on definitions in x86's internal.h.
>>
>> Move definitions in internal.h that need to be shared between the
>> filesystem and architecture code to header files that fs/resctrl can
>> include.
>>
>> Doing this separately means the filesystem code only moves between files
>> of the same name, instead of having these changes mixed in too.
>> diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
>> index 6303c0ee0ae2..f2cd7ba39fcc 100644
>> --- a/arch/x86/kernel/cpu/resctrl/core.c
>> +++ b/arch/x86/kernel/cpu/resctrl/core.c
>> @@ -288,6 +288,11 @@ static void rdt_get_cdp_l2_config(void)
>> rdt_get_cdp_config(RDT_RESOURCE_L2);
>> }
>>
>> +bool resctrl_arch_get_cdp_enabled(enum resctrl_res_level l)
>> +{
>> + return rdt_resources_all[l].cdp_enabled;
>> +}
>> +
>
> This moves resctrl_arch_get_cdp_enabled() to arch/x86/kernel/cpu/resctrl/core.c
> while resctrl_arch_set_cdp_enabled() is already in arch/x86/kernel/cpu/resctrl/rdtgroup.c.
> Most of resctrl_arch_get_cdp_enabled()'s callers are
> in arch/x86/kernel/cpu/resctrl/rdtgroup.c so it seems appropriate to keep it with
> its partner resctrl_arch_set_cdp_enabled()?
Yup - that would make more sense.
(This will date back to when I was moving the code around by hand every release!)
Thanks,
James
Powered by blists - more mailing lists