Re: [RFC][PATCH 5/7] sched: Rewrite select_idle_siblings()

2016-05-11 Thread Mike Galbraith
On Wed, 2016-05-11 at 07:42 +0800, Yuyang Du wrote: > Do you have any suggestion about doing other part of > select_task_rq_fair? Conjure up a decent metric for placing tasks in tasty hot L2? That would be really lovely to have (/me pondering page faults..). We used to have an avg_overlap

Re: [RFC][PATCH 5/7] sched: Rewrite select_idle_siblings()

2016-05-11 Thread Mike Galbraith
On Wed, 2016-05-11 at 07:42 +0800, Yuyang Du wrote: > Do you have any suggestion about doing other part of > select_task_rq_fair? Conjure up a decent metric for placing tasks in tasty hot L2? That would be really lovely to have (/me pondering page faults..). We used to have an avg_overlap

Re: [RFC][PATCH 5/7] sched: Rewrite select_idle_siblings()

2016-05-11 Thread Yuyang Du
On Wed, May 11, 2016 at 09:00:29AM +0200, Peter Zijlstra wrote: > On Wed, May 11, 2016 at 05:05:50AM +0800, Yuyang Du wrote: > > On Mon, May 09, 2016 at 12:48:12PM +0200, Peter Zijlstra wrote: > > > + i = select_idle_core(p, sd, target); > > > + if ((unsigned)i < nr_cpumask_bits) > > > +

Re: [RFC][PATCH 5/7] sched: Rewrite select_idle_siblings()

2016-05-11 Thread Yuyang Du
On Wed, May 11, 2016 at 09:00:29AM +0200, Peter Zijlstra wrote: > On Wed, May 11, 2016 at 05:05:50AM +0800, Yuyang Du wrote: > > On Mon, May 09, 2016 at 12:48:12PM +0200, Peter Zijlstra wrote: > > > + i = select_idle_core(p, sd, target); > > > + if ((unsigned)i < nr_cpumask_bits) > > > +

Re: [RFC][PATCH 5/7] sched: Rewrite select_idle_siblings()

2016-05-11 Thread Peter Zijlstra
On Wed, May 11, 2016 at 05:05:50AM +0800, Yuyang Du wrote: > On Mon, May 09, 2016 at 12:48:12PM +0200, Peter Zijlstra wrote: > > + i = select_idle_core(p, sd, target); > > + if ((unsigned)i < nr_cpumask_bits) > > + return i; > > + > > + i = select_idle_cpu(p, sd, target); > > +

Re: [RFC][PATCH 5/7] sched: Rewrite select_idle_siblings()

2016-05-11 Thread Peter Zijlstra
On Wed, May 11, 2016 at 05:05:50AM +0800, Yuyang Du wrote: > On Mon, May 09, 2016 at 12:48:12PM +0200, Peter Zijlstra wrote: > > + i = select_idle_core(p, sd, target); > > + if ((unsigned)i < nr_cpumask_bits) > > + return i; > > + > > + i = select_idle_cpu(p, sd, target); > > +

Re: [RFC][PATCH 5/7] sched: Rewrite select_idle_siblings()

2016-05-10 Thread Yuyang Du
On Mon, May 09, 2016 at 12:48:12PM +0200, Peter Zijlstra wrote: > +/* > + * Scan the LLC domain for idle CPUs; this is dynamically regulated by > + * comparing the average scan cost (tracked in sd->avg_scan_cost) against the tracked in this_sd->avg_scan_cost

Re: [RFC][PATCH 5/7] sched: Rewrite select_idle_siblings()

2016-05-10 Thread Yuyang Du
On Mon, May 09, 2016 at 12:48:12PM +0200, Peter Zijlstra wrote: > +/* > + * Scan the LLC domain for idle CPUs; this is dynamically regulated by > + * comparing the average scan cost (tracked in sd->avg_scan_cost) against the tracked in this_sd->avg_scan_cost

[RFC][PATCH 5/7] sched: Rewrite select_idle_siblings()

2016-05-09 Thread Peter Zijlstra
select_idle_siblings() is a known pain point for a number of workloads; it either does too much or not enough and sometimes just does plain wrong. This rewrite attempts to address a number of issues (but sadly not all). The current code does an unconditional sched_domain iteration; with the

[RFC][PATCH 5/7] sched: Rewrite select_idle_siblings()

2016-05-09 Thread Peter Zijlstra
select_idle_siblings() is a known pain point for a number of workloads; it either does too much or not enough and sometimes just does plain wrong. This rewrite attempts to address a number of issues (but sadly not all). The current code does an unconditional sched_domain iteration; with the