Hello Christophe,

On 8/26/2025 10:32 AM, Christophe Leroy wrote:
> 
> 
> Le 26/08/2025 à 06:13, K Prateek Nayak a écrit :
>> Rename cpu_corgroup_{map,mask} to cpu_corgrp_{map,mask} to free up the
>> cpu_corgroup_* namespace. cpu_corgroup_mask() will be added back in the
>> subsequent commit for CONFIG_SCHED_MC enablement.
> 
> This renaming seems odd and uncomplete. For instance update_coregroup_mask() 
> should probably be renamed as well shoudln't it ?

So this was a bad copypasta on my part! It should have been
s/cpu_coregroup_*/cpu_coregrp_*/

> 
> When you say cpu_corgroup_mask() will be added back, you mean the same 
> function or a completely different function but with the same name ?
> 
> What's really the difference between corgrp and coregroup ?
> 
> Shouldn't also has_coregroup_support() now be renamed has_corgrp_support() ?


The main intention was that kernel/sched/topology.c uses the
cpu_coregroup_mask() as the default function for to derive the mask for
MC domain in the default topology and PPC uses it internally for this
file only.

Peter just exposed the cpu_coregroup_mask() as is in
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?h=sched/core&id=6e890353ce7e983a621d30413d4fc6d228ae1b4f
which should be fine too since the PPC side overrides the default
topology and can decide to add or ommit the MC bits.

I was erring on the side of caution and allowing cpu_coregroup_mask() to
return the node mask if has_coregroup_support() returns false but given
the MC domain is never added when has_coregroup_support() returns false,
we don't need all this.

-- 
Thanks and Regards,
Prateek


Reply via email to