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: <aa5c745686127c5d1ff2496fcecc3ebf0839443c.camel@intel.com>
Date:   Tue, 11 Oct 2022 21:33:26 +0800
From:   Zhang Rui <rui.zhang@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>,
        Dave Hansen <dave.hansen@...el.com>
Cc:     Feng Tang <feng.tang@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org, tim.c.chen@...el.com,
        Xiongfeng Wang <wangxiongfeng2@...wei.com>,
        Yu Liao <liaoyu15@...wei.com>
Subject: Re: [PATCH] x86/tsc: Extend the watchdog check exemption to 4S/8S
 machine

On Tue, 2022-10-11 at 09:52 +0200, Peter Zijlstra wrote:
> On Mon, Oct 10, 2022 at 07:23:10AM -0700, Dave Hansen wrote:
> > On 10/9/22 18:23, Feng Tang wrote:
> > > > > diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
> > > > > index cafacb2e58cc..b4ea79cb1d1a 100644
> > > > > --- a/arch/x86/kernel/tsc.c
> > > > > +++ b/arch/x86/kernel/tsc.c
> > > > > @@ -1217,7 +1217,7 @@ static void __init
> > > > > check_system_tsc_reliable(void)
> > > > >  	if (boot_cpu_has(X86_FEATURE_CONSTANT_TSC) &&
> > > > >  	    boot_cpu_has(X86_FEATURE_NONSTOP_TSC) &&
> > > > >  	    boot_cpu_has(X86_FEATURE_TSC_ADJUST) &&
> > > > > -	    nr_online_nodes <= 2)
> > > > > +	    nr_online_nodes <= 8)
> > > > So you're saying all 8 socket systems since Broadwell (?) are
> > > > TSC
> > > > sync'ed ?
> > > No, I didn't mean that. I haven't got chance to any 8 sockets
> > > machine, and I got a report last month that on one 8S machine,
> > > the TSC was judged 'unstable' by HPET as watchdog.
> > 
> > That's not a great check.  Think about numa=fake=4U, for
> > instance.  Or a
> > single-socket system with persistent memory and high bandwidth
> > memory.
> > 
> > Basically 'nr_online_nodes' is a software construct.  It's going to
> > be
> > really hard to infer anything from it about what the _hardware_ is.
> 
> We have both c->phys_proc_id and c->logical_proc_id along with
> logical_packages.
> 
> I'm thinking you want something like max(c->phys_proc_id) <= 4.
> Because
> even if you only populate 4 sockets of an 8 socket server you're up a
> creek without no paddles.
> 
> But it all comes down to how much drugs the firmware teams have had
> :/
> It is entirely possible to enumerate with phys_proc_id==42 on a 2
> socket
> system.

topology_max_packages() or variable logical_packages can tell the
maximum packages.
But this check_system_tsc_reliable() is done in early boot phase where
we have boot cpu only. And the cpu topology is not built up at this
stage.

thanks,
rui

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ