public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2]sched:add check of shallowest_idle_cpu before search for least_loaded_cpu
@ 2014-10-27  9:41 Yao Dongdong
  2014-10-27 12:30 ` Peter Zijlstra
  0 siblings, 1 reply; 3+ messages in thread
From: Yao Dongdong @ 2014-10-27  9:41 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra; +Cc: LKML, Srikar Dronamraju, yaodongdong

Idle cpu is idler than non-idle cpu, so we needn't search for least_loaded_cpu
after we have found an idle cpu.

Signed-off-by:yaodongdong@huawei.com
Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
 ---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 0b069bf..2445a23 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4446,7 +4446,7 @@ find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu)
                                latest_idle_timestamp = rq->idle_stamp;
                                shallowest_idle_cpu = i;
                        }
-               } else {
+               } else if (shallowest_idle_cpu == -1) {
                        load = weighted_cpuload(i);
                        if (load < min_load || (load == min_load && i == this_cpu)) {
                                min_load = load;
--
1.8.0.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2]sched:add check of shallowest_idle_cpu before search for least_loaded_cpu
  2014-10-27  9:41 [PATCH v2]sched:add check of shallowest_idle_cpu before search for least_loaded_cpu Yao Dongdong
@ 2014-10-27 12:30 ` Peter Zijlstra
  2014-10-28  1:47   ` Yao Dongdong
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2014-10-27 12:30 UTC (permalink / raw)
  To: Yao Dongdong; +Cc: Ingo Molnar, LKML, Srikar Dronamraju


Please as to try again:

Applying patch patches/yao_dongdong-sched_add_check_of_shallowest_idle_cpu_before_search_for_least_loaded_cpu.patch
patching file kernel/sched/fair.c
Hunk #1 FAILED at 4446.
1 out of 1 hunk FAILED -- rejects in file kernel/sched/fair.c
Patch patches/yao_dongdong-sched_add_check_of_shallowest_idle_cpu_before_search_for_least_loaded_cpu.patch does not apply (enforce with -f)
quilt returned 1, with 0 fuzz and 1 rejects
use quilt -f? y/n [y]: y
Applying patch patches/yao_dongdong-sched_add_check_of_shallowest_idle_cpu_before_search_for_least_loaded_cpu.patch
patching file kernel/sched/fair.c
Hunk #1 FAILED at 4446.
1 out of 1 hunk FAILED -- saving rejects to file kernel/sched/fair.c.rej
Applied patch patches/yao_dongdong-sched_add_check_of_shallowest_idle_cpu_before_search_for_least_loaded_cpu.patch (forced; needs refresh)
reject patch patches/yao_dongdong-sched_add_check_of_shallowest_idle_cpu_before_search_for_least_loaded_cpu.patch file kernel/sched/fair.c hunk 1 line 4
[a]uto[m]erge,edit [f]ile [p]atch [r]ej,[n]ext,[d]elete: [amfdprn]: m
rej started:
[a]uto[m]erge,edit [f]ile [p]atch [r]ej,[n]ext,[d]elete: [amfdprn]:     kernel/sched/fair.c: 1 matched, 0 conflicts remain
n
patches/yao_dongdong-sched_add_check_of_shallowest_idle_cpu_before_search_for_least_loaded_cpu.patch done [s]top, [n]ext, [r]efresh [snr]: r
WARNING: Use a single space after Signed-off-by:
#13: 
Signed-off-by:yaodongdong@huawei.com

ERROR: code indent should use tabs where possible
#25: FILE: kernel/sched/fair.c:4644:
+               } else if (shallowest_idle_cpu == -1) {$

WARNING: please, no spaces at the start of a line
#25: FILE: kernel/sched/fair.c:4644:
+               } else if (shallowest_idle_cpu == -1) {$

total: 1 errors, 2 warnings, 8 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
      scripts/cleanfile

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2]sched:add check of shallowest_idle_cpu before search for least_loaded_cpu
  2014-10-27 12:30 ` Peter Zijlstra
@ 2014-10-28  1:47   ` Yao Dongdong
  0 siblings, 0 replies; 3+ messages in thread
From: Yao Dongdong @ 2014-10-28  1:47 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Ingo Molnar, LKML, Srikar Dronamraju

On 2014/10/27 20:30, Peter Zijlstra wrote:
> Please as to try again:
>
> Applying patch patches/yao_dongdong-sched_add_check_of_shallowest_idle_cpu_before_search_for_least_loaded_cpu.patch
> patching file kernel/sched/fair.c
> Hunk #1 FAILED at 4446.
> 1 out of 1 hunk FAILED -- rejects in file kernel/sched/fair.c
> Patch patches/yao_dongdong-sched_add_check_of_shallowest_idle_cpu_before_search_for_least_loaded_cpu.patch does not apply (enforce with -f)
> quilt returned 1, with 0 fuzz and 1 rejects
> use quilt -f? y/n [y]: y
> Applying patch patches/yao_dongdong-sched_add_check_of_shallowest_idle_cpu_before_search_for_least_loaded_cpu.patch
> patching file kernel/sched/fair.c
> Hunk #1 FAILED at 4446.
> 1 out of 1 hunk FAILED -- saving rejects to file kernel/sched/fair.c.rej
> Applied patch patches/yao_dongdong-sched_add_check_of_shallowest_idle_cpu_before_search_for_least_loaded_cpu.patch (forced; needs refresh)
> reject patch patches/yao_dongdong-sched_add_check_of_shallowest_idle_cpu_before_search_for_least_loaded_cpu.patch file kernel/sched/fair.c hunk 1 line 4
> [a]uto[m]erge,edit [f]ile [p]atch [r]ej,[n]ext,[d]elete: [amfdprn]: m
> rej started:
> [a]uto[m]erge,edit [f]ile [p]atch [r]ej,[n]ext,[d]elete: [amfdprn]:     kernel/sched/fair.c: 1 matched, 0 conflicts remain
> n
> patches/yao_dongdong-sched_add_check_of_shallowest_idle_cpu_before_search_for_least_loaded_cpu.patch done [s]top, [n]ext, [r]efresh [snr]: r
> WARNING: Use a single space after Signed-off-by:
> #13: 
> Signed-off-by:yaodongdong@huawei.com
>
> ERROR: code indent should use tabs where possible
> #25: FILE: kernel/sched/fair.c:4644:
> +               } else if (shallowest_idle_cpu == -1) {$
>
> WARNING: please, no spaces at the start of a line
> #25: FILE: kernel/sched/fair.c:4644:
> +               } else if (shallowest_idle_cpu == -1) {$
>
> total: 1 errors, 2 warnings, 8 lines checked
>
> NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
>       scripts/cleanfile
>
> .
>
I 'm sorry, and i will fix and resend another one.

Thanks,
Yao Dongdong


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-28  1:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-27  9:41 [PATCH v2]sched:add check of shallowest_idle_cpu before search for least_loaded_cpu Yao Dongdong
2014-10-27 12:30 ` Peter Zijlstra
2014-10-28  1:47   ` Yao Dongdong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox