OSDN Git Service

UPSTREAM: sched/fair: Move select_task_rq_fair() slow-path into its own function
authorBrendan Jackman <brendan.jackman@arm.com>
Thu, 5 Oct 2017 11:45:12 +0000 (12:45 +0100)
committerChris Redpath <chris.redpath@arm.com>
Tue, 19 Dec 2017 16:50:57 +0000 (16:50 +0000)
commit926b2e9840b9b9cda85aec132b7ae1f940776b47
treeb4a9d0f918e05d2695835f8483359aa3c7d399dc
parent8e3019ac45de42ea78c12649031998c19d27d623
UPSTREAM: sched/fair: Move select_task_rq_fair() slow-path into its own function

In preparation for changes that would otherwise require adding a new
level of indentation to the while(sd) loop, create a new function
find_idlest_cpu() which contains this loop, and rename the existing
find_idlest_cpu() to find_idlest_group_cpu().

Code inside the while(sd) loop is unchanged. @new_cpu is added as a
variable in the new function, with the same initial value as the
@new_cpu in select_task_rq_fair().

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Josef Bacik <josef@toxicpanda.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Morten Rasmussen <morten.rasmussen@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20171005114516.18617-2-brendan.jackman@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Change-Id: Ic94a5165e85b6ae254b36cd7891001a45b5be756
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
kernel/sched/fair.c