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] [day] [month] [year] [list]
Message-ID: <ZxKhxaM8Wv8EEXMd@gpd3>
Date: Fri, 18 Oct 2024 19:58:29 +0200
From: Andrea Righi <andrea.righi@...ux.dev>
To: Tejun Heo <tj@...nel.org>
Cc: David Vernet <void@...ifault.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched_ext: improve WAKE_SYNC behavior for default idle
 CPU selection

On Fri, Oct 18, 2024 at 07:38:10AM -1000, Tejun Heo wrote:
> Hello,
> 
> On Fri, Oct 18, 2024 at 11:40:33AM +0200, Andrea Righi wrote:
> ...
> > +	 * If WAKE_SYNC, try to migrate the wakee to the waker's CPU.
> > +	 */
> > +	if (wake_flags & SCX_WAKE_SYNC) {
> > +		cpu = smp_processor_id();
> > +
> > +		/*
> > +		 * If the waker's CPU is cache affine and prev_cpu is idle,
> > +		 * then avoid a migration.
> > +		 */
> > +		if (cpus_share_cache(cpu, prev_cpu) &&
> > +		    test_and_clear_cpu_idle(prev_cpu))
> >  			goto cpu_found;
> 
> Shouldn't this do set cpu to prev_cpu before jumping to cpu_found?

Ah! You're absolutely right!

Let me send a v2 (and test it).

Thanks,
-Andrea

> 
> Thanks.
> 
> -- 
> tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ