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: <20160502150156.GX3408@twins.programming.kicks-ass.net>
Date:	Mon, 2 May 2016 17:01:56 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Mike Galbraith <mgalbraith@...e.de>
Cc:	Chris Mason <clm@...com>, Ingo Molnar <mingo@...nel.org>,
	Matt Fleming <matt@...eblueprint.co.uk>,
	linux-kernel@...r.kernel.org
Subject: Re: sched: tweak select_idle_sibling to look for idle threads

On Mon, May 02, 2016 at 04:50:04PM +0200, Mike Galbraith wrote:
> On Mon, 2016-05-02 at 10:46 +0200, Peter Zijlstra wrote:
> 5226         /*
> 5227          * If there are idle cores to be had, go find one.
> 5228          */
> 5229         if (sched_feat(IDLE_CORE) && test_idle_cores(target)) {
> 5230                 i = select_idle_core(p, target);
> 5231                 if ((unsigned)i < nr_cpumask_bits)
> 5232                         return i;
> 5233  
> 5234                 /*
> 5235                  * Failed to find an idle core; stop looking for one.
> 5236                  */
> 5237                 clear_idle_cores(target);
> 5238         }
> 5239 #if 1
> 5240         for_each_cpu(i, cpu_smt_mask(target)) {
> 5241                 if (idle_cpu(i))
> 5242                         return i;
> 5243         }
> 5244  
> 5245         return target;
> 5246 #endif

And yes, I have a variant of that, that does indeed work way better than
scanning the whole LLC domain for idle threads.

If you want a laugh, modify select_idle_core() to remember the last idle
thread it encounters and have it return that when it fails to find an
idle core.. I'm still stumped to explain why it behaves the way it does.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ