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]
Date: Fri, 26 Jan 2024 07:07:06 +0000
From: "Zhang, Rui" <rui.zhang@...el.com>
To: "tglx@...utronix.de" <tglx@...utronix.de>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
CC: "Raj, Ashok" <ashok.raj@...el.com>, "mhklinux@...look.com"
	<mhklinux@...look.com>, "arjan@...ux.intel.com" <arjan@...ux.intel.com>,
	"ray.huang@....com" <ray.huang@....com>, "thomas.lendacky@....com"
	<thomas.lendacky@....com>, "andrew.cooper3@...rix.com"
	<andrew.cooper3@...rix.com>, "Sivanich, Dimitri" <dimitri.sivanich@....com>,
	"Tang, Feng" <feng.tang@...el.com>, "kan.liang@...ux.intel.com"
	<kan.liang@...ux.intel.com>, "Mehta, Sohil" <sohil.mehta@...el.com>,
	"peterz@...radead.org" <peterz@...radead.org>, "paulmck@...nel.org"
	<paulmck@...nel.org>, "kprateek.nayak@....com" <kprateek.nayak@....com>,
	"jgross@...e.com" <jgross@...e.com>, "andy@...radead.org"
	<andy@...radead.org>, "x86@...nel.org" <x86@...nel.org>
Subject: Re: [patch v2 21/30] x86/cpu/topology: Use topology bitmaps for
 sizing


> >  
> > +       cnta = domain_weight(TOPO_PKG_DOMAIN);
> > +       cntb = domain_weight(TOPO_DIE_DOMAIN);
> > +       __max_logical_packages = cnta;
> > +       __max_dies_per_package = 1U << (get_count_order(cntb) - >
> > get_count_order(cnta));
> > +
> > +       pr_info("Max. logical packages: %3u\n", cnta);
> > +       pr_info("Max. logical dies:     %3u\n", cntb);
> > +       pr_info("Max. dies per package: %3u\n", >
> > __max_dies_per_package);
> > +
> > +       cnta = domain_weight(TOPO_CORE_DOMAIN);
> > +       cntb = domain_weight(TOPO_SMT_DOMAIN);
> > +       smp_num_siblings = 1U << (get_count_order(cntb) - >
> > get_count_order(cnta));
> > +       pr_info("Max. threads per core: %3u\n", smp_num_siblings);
> > +

I missed this but Ashok catches it.

Say, on my Adlerlake platform, which has 4 Pcores with HT + 8 Ecores,
cnta is 12, cntb is 16, and smp_num_siblings is set to 1 erroneously.

I think we should use
	smp_num_siblings = DIV_ROUND_UP(cntb, cnta);
here.
Or even check each core to get the maximum value (in case there are
more than 2 siblings in a core some day).

thanks,
rui


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ