[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <999360e5-8b55-49e1-8615-b92397e5f38d@arm.com>
Date: Fri, 7 Feb 2025 15:42:29 +0000
From: James Morse <james.morse@....com>
To: Reinette Chatre <reinette.chatre@...el.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Cc: Fenghua Yu <fenghua.yu@...el.com>, 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>, Shaopeng Tan <tan.shaopeng@...fujitsu.com>
Subject: Re: [PATCH v5 12/40] x86/resctrl: Wrap resctrl_arch_find_domain()
around rdt_find_domain()
Hi Reinette,
On 23/10/2024 22:16, Reinette Chatre wrote:
> On 10/4/24 11:03 AM, James Morse wrote:
>> rdt_find_domain() finds a domain given a resource and a cache-id.
>> It's not quite right for the resctrl arch API as it also returns the
>> position to insert a new domain, which is needed when bringing a
>> domain online in the arch code.
>>
>> Wrap rdt_find_domain() in another function resctrl_arch_find_domain()
>> in order to avoid the unnecessary argument outside the arch code.
>
> I do not understand the motivation for this split. There does not seem to be
> anything arch specific about rdt_find_domain().
Not arch specific, but behaviour only the arch code could use - returning the position to
insert a new domain, which only the arch code will ever do.
> Why does this need to
> be arch API? Why can resctrl and all archs not use rdt_find_domain()?
Just to remove the extra boiler plate caused by the ability to insert an entry - which the
filesystem never does.
If no-one cares, I'll just move it to a header file as-is.
Thanks,
James
Powered by blists - more mailing lists