Commit 15b467e
BACKPORT: 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().
Change-Id: I9842308cab00dc9cd6c513fc38c609089a1aaaaf
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>
(reworked for eas/cas schedstats added in Android)
(cherry-picked commit 18bd1b4bd53a from tip:sched/core)
Signed-off-by: Chris Redpath <chris.redpath@arm.com>1 parent 1e00040 commit 15b467e
1 file changed
Lines changed: 62 additions & 52 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6072 | 6072 | | |
6073 | 6073 | | |
6074 | 6074 | | |
6075 | | - | |
| 6075 | + | |
6076 | 6076 | | |
6077 | 6077 | | |
6078 | | - | |
| 6078 | + | |
6079 | 6079 | | |
6080 | 6080 | | |
6081 | 6081 | | |
| |||
6122 | 6122 | | |
6123 | 6123 | | |
6124 | 6124 | | |
| 6125 | + | |
| 6126 | + | |
| 6127 | + | |
| 6128 | + | |
| 6129 | + | |
| 6130 | + | |
| 6131 | + | |
| 6132 | + | |
| 6133 | + | |
| 6134 | + | |
| 6135 | + | |
| 6136 | + | |
| 6137 | + | |
| 6138 | + | |
| 6139 | + | |
| 6140 | + | |
| 6141 | + | |
| 6142 | + | |
| 6143 | + | |
| 6144 | + | |
| 6145 | + | |
| 6146 | + | |
| 6147 | + | |
| 6148 | + | |
| 6149 | + | |
| 6150 | + | |
| 6151 | + | |
| 6152 | + | |
| 6153 | + | |
| 6154 | + | |
| 6155 | + | |
| 6156 | + | |
| 6157 | + | |
| 6158 | + | |
| 6159 | + | |
| 6160 | + | |
| 6161 | + | |
| 6162 | + | |
| 6163 | + | |
| 6164 | + | |
| 6165 | + | |
| 6166 | + | |
| 6167 | + | |
| 6168 | + | |
| 6169 | + | |
| 6170 | + | |
| 6171 | + | |
| 6172 | + | |
| 6173 | + | |
| 6174 | + | |
| 6175 | + | |
| 6176 | + | |
| 6177 | + | |
| 6178 | + | |
| 6179 | + | |
| 6180 | + | |
| 6181 | + | |
| 6182 | + | |
| 6183 | + | |
6125 | 6184 | | |
6126 | 6185 | | |
6127 | 6186 | | |
| |||
6698 | 6757 | | |
6699 | 6758 | | |
6700 | 6759 | | |
6701 | | - | |
6702 | | - | |
6703 | | - | |
6704 | | - | |
6705 | | - | |
6706 | | - | |
6707 | | - | |
6708 | | - | |
6709 | | - | |
6710 | | - | |
6711 | | - | |
6712 | | - | |
6713 | | - | |
6714 | | - | |
6715 | | - | |
6716 | | - | |
6717 | | - | |
6718 | | - | |
6719 | | - | |
6720 | | - | |
6721 | | - | |
6722 | | - | |
6723 | | - | |
6724 | | - | |
6725 | | - | |
6726 | | - | |
6727 | | - | |
6728 | | - | |
6729 | | - | |
6730 | | - | |
6731 | | - | |
6732 | | - | |
6733 | | - | |
6734 | | - | |
6735 | | - | |
6736 | | - | |
6737 | | - | |
6738 | | - | |
6739 | | - | |
6740 | | - | |
6741 | | - | |
6742 | | - | |
6743 | | - | |
6744 | | - | |
6745 | | - | |
6746 | | - | |
6747 | | - | |
6748 | | - | |
6749 | | - | |
6750 | | - | |
| 6760 | + | |
6751 | 6761 | | |
6752 | 6762 | | |
6753 | 6763 | | |
| |||
0 commit comments