lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6898bb1e-311f-4a71-aef0-e15e75c43b50@amd.com>
Date: Mon, 1 Sep 2025 08:35:43 +0530
From: K Prateek Nayak <kprateek.nayak@....com>
To: Christophe Leroy <christophe.leroy@...roup.eu>, Madhavan Srinivasan
	<maddy@...ux.ibm.com>, Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin
	<npiggin@...il.com>, Heiko Carstens <hca@...ux.ibm.com>, Vasily Gorbik
	<gor@...ux.ibm.com>, Alexander Gordeev <agordeev@...ux.ibm.com>, "Christian
 Borntraeger" <borntraeger@...ux.ibm.com>, Sven Schnelle
	<svens@...ux.ibm.com>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar
	<mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, Dave Hansen
	<dave.hansen@...ux.intel.com>, <x86@...nel.org>, "H. Peter Anvin"
	<hpa@...or.com>, Peter Zijlstra <peterz@...radead.org>, Juri Lelli
	<juri.lelli@...hat.com>, Vincent Guittot <vincent.guittot@...aro.org>,
	<linuxppc-dev@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>,
	<linux-s390@...r.kernel.org>
CC: Dietmar Eggemann <dietmar.eggemann@....com>, Steven Rostedt
	<rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>, Mel Gorman
	<mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>,
	<thomas.weissschuh@...utronix.de>, Li Chen <chenl311@...natelecom.cn>, "Bibo
 Mao" <maobibo@...ngson.cn>, Mete Durlu <meted@...ux.ibm.com>, Tobias Huschle
	<huschle@...ux.ibm.com>, Easwar Hariharan
	<easwar.hariharan@...ux.microsoft.com>, Guo Weikang
	<guoweikang.kernel@...il.com>, "Rafael J. Wysocki"
	<rafael.j.wysocki@...el.com>, Brian Gerst <brgerst@...il.com>, Patryk Wlazlyn
	<patryk.wlazlyn@...ux.intel.com>, Swapnil Sapkal <swapnil.sapkal@....com>,
	"Yury Norov [NVIDIA]" <yury.norov@...il.com>, Sudeep Holla
	<sudeep.holla@....com>, Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	Andrea Righi <arighi@...dia.com>, Yicong Yang <yangyicong@...ilicon.com>,
	Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>, Tim Chen
	<tim.c.chen@...ux.intel.com>, Vinicius Costa Gomes <vinicius.gomes@...el.com>
Subject: Re: [PATCH v7 2/8] powerpc/smp: Rename cpu_corgroup_* to cpu_corgrp_*

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ