[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-eeb60398639143c11ff2c8b509e3a471411bb5d3@git.kernel.org>
Date: Wed, 21 Feb 2018 02:28:08 -0800
From: tip-bot for Mel Gorman <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hpa@...or.com, efault@....de, matt@...eblueprint.co.uk,
torvalds@...ux-foundation.org, mingo@...nel.org,
ggherdovich@...e.cz, mgorman@...hsingularity.net,
peterz@...radead.org, linux-kernel@...r.kernel.org,
tglx@...utronix.de
Subject: [tip:sched/core] sched/fair: Defer calculation of 'prev_eff_load'
in wake_affine_weight() until needed
Commit-ID: eeb60398639143c11ff2c8b509e3a471411bb5d3
Gitweb: https://git.kernel.org/tip/eeb60398639143c11ff2c8b509e3a471411bb5d3
Author: Mel Gorman <mgorman@...hsingularity.net>
AuthorDate: Tue, 13 Feb 2018 13:37:26 +0000
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 21 Feb 2018 08:49:07 +0100
sched/fair: Defer calculation of 'prev_eff_load' in wake_affine_weight() until needed
On sync wakeups, the previous CPU effective load may not be used so delay
the calculation until it's needed.
Signed-off-by: Mel Gorman <mgorman@...hsingularity.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Giovanni Gherdovich <ggherdovich@...e.cz>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Matt Fleming <matt@...eblueprint.co.uk>
Cc: Mike Galbraith <efault@....de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/20180213133730.24064-3-mgorman@techsingularity.net
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
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 0132572..ae3e6f8 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5724,7 +5724,6 @@ wake_affine_weight(struct sched_domain *sd, struct task_struct *p,
unsigned long task_load;
this_eff_load = target_load(this_cpu, sd->wake_idx);
- prev_eff_load = source_load(prev_cpu, sd->wake_idx);
if (sync) {
unsigned long current_load = task_h_load(current);
@@ -5742,6 +5741,7 @@ wake_affine_weight(struct sched_domain *sd, struct task_struct *p,
this_eff_load *= 100;
this_eff_load *= capacity_of(prev_cpu);
+ prev_eff_load = source_load(prev_cpu, sd->wake_idx);
prev_eff_load -= task_load;
if (sched_feat(WA_BIAS))
prev_eff_load *= 100 + (sd->imbalance_pct - 100) / 2;
Powered by blists - more mailing lists