lkml.org 
[lkml]   [2017]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] sched/fair: Introduce scaled capacity awareness in wake_affine_idle code path
Date
wake_affine_idle returns true if the CPU can run the task. Since it is
ignoring capacity, adding that check there to only return true if the
CPU is full_capacity.

Signed-off-by: Rohit Jain <rohit.k.jain@oracle.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 5b1f7b9..f4761f2 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5660,7 +5660,7 @@ static bool
wake_affine_idle(struct sched_domain *sd, struct task_struct *p,
int this_cpu, int prev_cpu, int sync)
{
- if (idle_cpu(this_cpu))
+ if (idle_cpu(this_cpu) && full_capacity(this_cpu))
return true;

if (sync && cpu_rq(this_cpu)->nr_running == 1)
--
2.7.4
\
 
 \ /
  Last update: 2017-10-08 01:46    [W:0.106 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site