[PATCH v2 4/6] powerpc/smp: Disable MC domain for shared processor

Srikar Dronamraju srikar at linux.vnet.ibm.com
Fri Oct 20 00:16:55 AEDT 2023


* Michael Ellerman <mpe at ellerman.id.au> [2023-10-19 15:48:48]:

> Srikar Dronamraju <srikar at linux.vnet.ibm.com> writes:
> > Like L2-cache info, coregroup information which is used to determine MC
> > sched domains is only present on dedicated LPARs. i.e PowerVM doesn't
> > export coregroup information for shared processor LPARs. Hence disable
> > creating MC domains on shared LPAR Systems.
> >
> > Signed-off-by: Srikar Dronamraju <srikar at linux.vnet.ibm.com>
> > ---
> >  arch/powerpc/kernel/smp.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> > index 498c2d51fc20..29da9262cb17 100644
> > --- a/arch/powerpc/kernel/smp.c
> > +++ b/arch/powerpc/kernel/smp.c
> > @@ -1046,6 +1046,10 @@ static struct cpumask *cpu_coregroup_mask(int cpu)
> >  
> >  static bool has_coregroup_support(void)
> >  {
> > +	/* Coregroup identification not available on shared systems */
> > +	if (is_shared_processor())
> > +		return 0;
> 
> That will catch guests running under KVM too right? Do we want that?
> 

Only dedicated LPARS on PowerVM expose coregroup or Hemisphere information.
Currently other systems including KVMs don't expose this information to the
OS.

> >  	return coregroup_enabled;
> 
> What does coregroup_enabled mean now?
> 
> I'd rather this was actually checking the presence of something, rather
> than just hard coding that shared processor means no coregroup support.
> 

On a shared LPAR, the Hypervisors would like to have the flexibility to
schedule LPAR on any core within the DIE without having to further think
about the Hemisphere locality of the core.

> cheers

-- 
Thanks and Regards
Srikar Dronamraju


More information about the Linuxppc-dev mailing list