Re: [PATCH] sched/fair: Consider RT/IRQ pressure in capacity_spare_wake

From: Dietmar Eggemann
Date: Mon Nov 20 2017 - 06:43:21 EST


On 11/09/2017 06:52 PM, Joel Fernandes wrote:

[...]

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 56f343b8e749..ba9609407cb9 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5724,7 +5724,7 @@ static int cpu_util_wake(int cpu, struct task_struct *p);
static unsigned long capacity_spare_wake(int cpu, struct task_struct *p)
{
- return capacity_orig_of(cpu) - cpu_util_wake(cpu, p);
+ return max_t(long, capacity_of(cpu) - cpu_util_wake(cpu, p), 0);
}
/*


Looks good to me. Maybe you could mention in the patch header that you switch capacity_orig_of() for capacity_of() since its only a tiny diff in the hunk.

Reviewed-by: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>