Re: [PATCH 2/8] sched: explicitly cpu_idle_type checking in rebalance_domains()
Hello, Peter. On Tue, Mar 19, 2013 at 03:02:21PM +0100, Peter Zijlstra wrote: > On Thu, 2013-02-14 at 14:48 +0900, Joonsoo Kim wrote: > > After commit 88b8dac0, dst-cpu can be changed in load_balance(), > > then we can't know cpu_idle_type of dst-cpu when load_balance() > > return positive. So, add explicit cpu_idle_type checking. > > No real objection I suppose, but did you actually see this go wrong? No, I found it while I review whole scheduler code. Thanks. > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/8] sched: explicitly cpu_idle_type checking in rebalance_domains()
Hello, Peter. On Tue, Mar 19, 2013 at 03:02:21PM +0100, Peter Zijlstra wrote: On Thu, 2013-02-14 at 14:48 +0900, Joonsoo Kim wrote: After commit 88b8dac0, dst-cpu can be changed in load_balance(), then we can't know cpu_idle_type of dst-cpu when load_balance() return positive. So, add explicit cpu_idle_type checking. No real objection I suppose, but did you actually see this go wrong? No, I found it while I review whole scheduler code. Thanks. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/8] sched: explicitly cpu_idle_type checking in rebalance_domains()
On Thu, 2013-02-14 at 14:48 +0900, Joonsoo Kim wrote: > After commit 88b8dac0, dst-cpu can be changed in load_balance(), > then we can't know cpu_idle_type of dst-cpu when load_balance() > return positive. So, add explicit cpu_idle_type checking. No real objection I suppose, but did you actually see this go wrong? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/8] sched: explicitly cpu_idle_type checking in rebalance_domains()
On Thu, 2013-02-14 at 14:48 +0900, Joonsoo Kim wrote: After commit 88b8dac0, dst-cpu can be changed in load_balance(), then we can't know cpu_idle_type of dst-cpu when load_balance() return positive. So, add explicit cpu_idle_type checking. No real objection I suppose, but did you actually see this go wrong? -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/8] sched: explicitly cpu_idle_type checking in rebalance_domains()
After commit 88b8dac0, dst-cpu can be changed in load_balance(), then we can't know cpu_idle_type of dst-cpu when load_balance() return positive. So, add explicit cpu_idle_type checking. Cc: Srivatsa Vaddagiri Signed-off-by: Joonsoo Kim diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6f72851..0c6aaf6 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5515,10 +5515,10 @@ static void rebalance_domains(int cpu, enum cpu_idle_type idle) if (time_after_eq(jiffies, sd->last_balance + interval)) { if (load_balance(cpu, rq, sd, idle, )) { /* -* We've pulled tasks over so either we're no -* longer idle. +* We've pulled tasks over so either we may +* be no longer idle. */ - idle = CPU_NOT_IDLE; + idle = idle_cpu(cpu) ? CPU_IDLE : CPU_NOT_IDLE; } sd->last_balance = jiffies; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/8] sched: explicitly cpu_idle_type checking in rebalance_domains()
After commit 88b8dac0, dst-cpu can be changed in load_balance(), then we can't know cpu_idle_type of dst-cpu when load_balance() return positive. So, add explicit cpu_idle_type checking. Cc: Srivatsa Vaddagiri va...@linux.vnet.ibm.com Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6f72851..0c6aaf6 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5515,10 +5515,10 @@ static void rebalance_domains(int cpu, enum cpu_idle_type idle) if (time_after_eq(jiffies, sd-last_balance + interval)) { if (load_balance(cpu, rq, sd, idle, balance)) { /* -* We've pulled tasks over so either we're no -* longer idle. +* We've pulled tasks over so either we may +* be no longer idle. */ - idle = CPU_NOT_IDLE; + idle = idle_cpu(cpu) ? CPU_IDLE : CPU_NOT_IDLE; } sd-last_balance = jiffies; } -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/