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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <197a12a9ad3.fd934d491886677.9127792630090954752@linux.beauty>
Date: Tue, 24 Jun 2025 17:00:13 +0800
From: Li Chen <me@...ux.beauty>
To: "Thomas Gleixner" <tglx@...utronix.de>
Cc: "Ingo Molnar" <mingo@...hat.com>, "Borislav Petkov" <bp@...en8.de>,
	"Dave Hansen" <dave.hansen@...ux.intel.com>, "x86" <x86@...nel.org>,
	"linux-kernel" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RESEND] x86/smpboot: avoid SMT domain attach/destroy if
 SMT is not enabled

Hi Thomas,

 ---- On Fri, 20 Jun 2025 21:54:27 +0800  Thomas Gleixner <tglx@...utronix.de> wrote --- 
 > On Tue, Apr 22 2025 at 16:47, Li Chen wrote:
 > > Currently, the SMT domain is added into sched_domain_topology
 > > by default if CONFIG_SCHED_SMT is enabled.
 > >
 > > If cpu_attach_domain finds that the CPU SMT domain’s cpumask_weight
 > > is just 1, it will destroy_sched_domain it.
 > 
 > If cpu_attach_domain() ..., it will destroy it.
 > 
 > > On a large machine, such as one with 512 cores, this results in
 > > 512 redundant domain attach/destroy operations.
 > >
 > > We can avoid these unnecessary operations by simply checking
 > 
 > s/We can avoid/Avoid/
 > 
 > > cpu_smt_num_threads and not inserting SMT domain into x86_topology if SMT
 > 
 > the SMT domain 
 > 
 > > is not enabled.
 > >
 > > #ifdef CONFIG_SCHED_SMT
 > > -    x86_topology[i++] = (struct sched_domain_topology_level){
 > > -        cpu_smt_mask, cpu_smt_flags, SD_INIT_NAME(SMT)
 > > -    };
 > > +    if (cpu_smt_num_threads > 1) {
 > > +        x86_topology[i++] = (struct sched_domain_topology_level){
 > > +            cpu_smt_mask, cpu_smt_flags, SD_INIT_NAME(SMT)
 > > +        };
 > > +    }
 > 
 > Looks about right, though I really detest this coding style. I'm not
 > blaming you, as you just followed the already existing bad taste...
 > 
 > Thanks,
 > 
 >         tglx
 > 

Thanks for your review, I have fixed the wording issues here: https://lore.kernel.org/all/20250624085559.69436-1-me@linux.beauty/T/#t

Regards,
Li

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ