lkml.org 
[lkml]   [2016]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sched: tweak select_idle_sibling to look for idle threads
On Tue, May 03, 2016 at 01:31:31PM +0200, Peter Zijlstra wrote:
> Then flip on the last_idle tracking in select_idle_core():
>
> root@ivb-ep:~/bench/sysbench# for i in NO_OLD_IDLE NO_ORDER_IDLE IDLE_CORE NO_FORCE_CORE IDLE IDLE_SMT IDLE_LAST NO_IDLE_FIRST ; do echo $i > /debug/sched_features ; done ; ./doit-psql 30 2 5 10 20 40 80
> 2: [30 secs] transactions: 54355 (1811.78 per sec.)
> 5: [30 secs] transactions: 122609 (4086.81 per sec.)
> 10: [30 secs] transactions: 238738 (7957.66 per sec.)
> 20: [30 secs] transactions: 354693 (11822.49 per sec.)
> 40: [30 secs] transactions: 421807 (14059.32 per sec.)
> 80: [30 secs] transactions: 427088 (14234.25 per sec.)
>
>
> And see the top end collapse..

> + if (sched_feat(IDLE_CORE)) {
> + if (test_idle_cores(target)) {
> + i = select_idle_core(p, start);
> + if ((unsigned)i < nr_cpumask_bits)
> + return i;
>
> /*
> + * Failed to find an idle core; stop looking for one.
> */
> + clear_idle_cores(target);
> + }
> }

'Obvious' bug there; if we start returning idle threads; we'll not get
to clear_idle_cores() and the thing remains active and badness happens.

\
 
 \ /
  Last update: 2016-05-03 20:41    [W:0.117 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site