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, 15 Mar 2024 21:51:32 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Dave Hansen <dave.hansen@...el.com>, Feng Tang <feng.tang@...el.com>,
 Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, "H . Peter
 Anvin" <hpa@...or.com>, Peter Zijlstra <peterz@...radead.org>,
 x86@...nel.org, paulmck@...nel.org, rui.zhang@...el.com, Waiman Long
 <longman@...hat.com>, linux-kernel@...r.kernel.org
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH] x86/tsc: Use topology_max_packages() to get package number

On Fri, Mar 15 2024 at 10:58, Dave Hansen wrote:
> On 3/15/24 04:26, Feng Tang wrote:
>>         /*
>>          * Today neither Intel nor AMD support heterogeneous systems so
>>          * extrapolate the boot cpu's data to all packages.
>>          */
>>         ncpus = cpu_data(0).booted_cores * topology_max_smt_threads();
>>         __max_logical_packages = DIV_ROUND_UP(total_cpus, ncpus);
>
> Because Intel obviously has heterogeneous systems today.

Hybrid is a per package property. 

But neither Intel nor AMD support populating multi socket systems with
random packages, where socket 0 has less cores than socket 1 or socket 0
is hybrid and socket 1 is not.

> So I'll buy that removing 'nr_online_nodes' takes NUMA out of the
> picture (which is good), but I want to hear more about why
> topology_max_packages() and '4' are the right things to be checking.
>
> I suspect the real reason '4' was picked was to give the calculation
> some wiggle room because it's not actually all that precise.

IIRC the TSC is only guaranteed to be synchronized up to 4 sockets, but
my memory might be wrong as usual.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ