Re: [PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-20 Thread Peter Zijlstra
On Thu, Feb 20, 2014 at 05:17:04PM +0800, Lei Wen wrote: > +++ b/kernel/sched/fair.c > @@ -6883,6 +6883,13 @@ void nohz_balance_enter_idle(int cpu) > if (!cpu_active(cpu)) > return; > > + /* > + * If this cpu is kept outside of root domain, we don't bother > + *

Re: [PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-20 Thread Peter Zijlstra
On Thu, Feb 20, 2014 at 05:17:04PM +0800, Lei Wen wrote: > Cpu which is put into quiescent mode, would remove itself > from kernel's sched_domain, and want others not disturb its > task running. But current scheduler would not checking whether > that cpu is setting in such mode, and still insist

[PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-20 Thread Lei Wen
Cpu which is put into quiescent mode, would remove itself from kernel's sched_domain, and want others not disturb its task running. But current scheduler would not checking whether that cpu is setting in such mode, and still insist the quiescent cpu to response the nohz load balance. Fix it by

Re: [PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-20 Thread Lei Wen
On Thu, Feb 20, 2014 at 4:50 PM, Peter Zijlstra wrote: > On Thu, Feb 20, 2014 at 10:42:51AM +0800, Lei Wen wrote: >> >> - int ilb = cpumask_first(nohz.idle_cpus_mask); >> >> + int ilb; >> >> + int cpu = smp_processor_id(); >> >> + struct sched_domain *tmp; >> >> >> >> - if

Re: [PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-20 Thread Peter Zijlstra
On Thu, Feb 20, 2014 at 10:42:51AM +0800, Lei Wen wrote: > >> - int ilb = cpumask_first(nohz.idle_cpus_mask); > >> + int ilb; > >> + int cpu = smp_processor_id(); > >> + struct sched_domain *tmp; > >> > >> - if (ilb < nr_cpu_ids && idle_cpu(ilb)) > >> - return ilb;

Re: [PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-20 Thread Peter Zijlstra
On Thu, Feb 20, 2014 at 10:42:51AM +0800, Lei Wen wrote: - int ilb = cpumask_first(nohz.idle_cpus_mask); + int ilb; + int cpu = smp_processor_id(); + struct sched_domain *tmp; - if (ilb nr_cpu_ids idle_cpu(ilb)) - return ilb; +

Re: [PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-20 Thread Lei Wen
On Thu, Feb 20, 2014 at 4:50 PM, Peter Zijlstra pet...@infradead.org wrote: On Thu, Feb 20, 2014 at 10:42:51AM +0800, Lei Wen wrote: - int ilb = cpumask_first(nohz.idle_cpus_mask); + int ilb; + int cpu = smp_processor_id(); + struct sched_domain *tmp; - if (ilb

[PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-20 Thread Lei Wen
Cpu which is put into quiescent mode, would remove itself from kernel's sched_domain, and want others not disturb its task running. But current scheduler would not checking whether that cpu is setting in such mode, and still insist the quiescent cpu to response the nohz load balance. Fix it by

Re: [PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-20 Thread Peter Zijlstra
On Thu, Feb 20, 2014 at 05:17:04PM +0800, Lei Wen wrote: Cpu which is put into quiescent mode, would remove itself from kernel's sched_domain, and want others not disturb its task running. But current scheduler would not checking whether that cpu is setting in such mode, and still insist the

Re: [PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-20 Thread Peter Zijlstra
On Thu, Feb 20, 2014 at 05:17:04PM +0800, Lei Wen wrote: +++ b/kernel/sched/fair.c @@ -6883,6 +6883,13 @@ void nohz_balance_enter_idle(int cpu) if (!cpu_active(cpu)) return; + /* + * If this cpu is kept outside of root domain, we don't bother + * to ask

Re: [PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-19 Thread Lei Wen
On Wed, Feb 19, 2014 at 5:04 PM, Peter Zijlstra wrote: > On Wed, Feb 19, 2014 at 01:20:30PM +0800, Lei Wen wrote: >> Since cpu which is put into quiescent mode, would remove itself >> from kernel's sched_domain. So we could use search sched_domain >> method to check whether this cpu don't want to

Re: [PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-19 Thread Peter Zijlstra
On Wed, Feb 19, 2014 at 01:20:30PM +0800, Lei Wen wrote: > Since cpu which is put into quiescent mode, would remove itself > from kernel's sched_domain. So we could use search sched_domain > method to check whether this cpu don't want to be disturbed as > idle load balance would send IPI to it. >

Re: [PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-19 Thread Peter Zijlstra
On Wed, Feb 19, 2014 at 01:20:30PM +0800, Lei Wen wrote: Since cpu which is put into quiescent mode, would remove itself from kernel's sched_domain. So we could use search sched_domain method to check whether this cpu don't want to be disturbed as idle load balance would send IPI to it.

Re: [PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-19 Thread Lei Wen
On Wed, Feb 19, 2014 at 5:04 PM, Peter Zijlstra pet...@infradead.org wrote: On Wed, Feb 19, 2014 at 01:20:30PM +0800, Lei Wen wrote: Since cpu which is put into quiescent mode, would remove itself from kernel's sched_domain. So we could use search sched_domain method to check whether this cpu

[PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-18 Thread Lei Wen
Since cpu which is put into quiescent mode, would remove itself from kernel's sched_domain. So we could use search sched_domain method to check whether this cpu don't want to be disturbed as idle load balance would send IPI to it. Signed-off-by: Lei Wen --- kernel/sched/fair.c | 14

[PATCH] sched: keep quiescent cpu out of idle balance loop

2014-02-18 Thread Lei Wen
Since cpu which is put into quiescent mode, would remove itself from kernel's sched_domain. So we could use search sched_domain method to check whether this cpu don't want to be disturbed as idle load balance would send IPI to it. Signed-off-by: Lei Wen lei...@marvell.com --- kernel/sched/fair.c