Re: [PATCH 2/3] x86/topology: Fix AMD core count
From: Peter Zijlstra
Date: Mon Mar 21 2016 - 04:23:09 EST
On Mon, Mar 21, 2016 at 11:07:46AM +0800, Huang Rui wrote:
> > > The issue is that Linux assumes:
> > >
> > > nr_logical_cpus = nr_cores * nr_siblings
> > >
> > > But AMD reports its CU unit as 2 cores, but then sets num_smp_siblings
> > > to 2 as well.
> But I am confused with c->x86_max_cores /= smp_num_siblings, what is
> the real meaning of c->x86_max_cores here for AMD, the whole compute
> unit numbers per socket?
Yes, with the whole Compute Unit being the Core, each logical CPU
becomes a Thread. This is the direct consequence of using the SMT
topology to model the CU thing.