Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1687429

[PATCH 3/7] sched/fair: fix definitions of effective load

From Josef Bacik <josef@toxicpanda.com>
Newsgroups linux.kernel
Subject [PATCH 3/7] sched/fair: fix definitions of effective load
Date 2017-07-14 15:30 +0200
Message-ID <u38Pq-413-55@gated-at.bofh.it> (permalink)
References <u38Po-413-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Josef Bacik <jbacik@fb.com>

It appears as though we've reversed the definitions of 'this_effective_load' and
'prev_effective_load'.  We seem to be using the wrong CPU capacity for both of
these parameters, and we want to add the imbalance percentage to the current CPU
to make sure we're meeting a high enough load imbalance threshold to justify
moving the task.

Signed-off-by: Josef Bacik <jbacik@fb.com>
---
 kernel/sched/fair.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 5d4489e..d958634 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5679,11 +5679,11 @@ static int wake_affine(struct sched_domain *sd, struct task_struct *p,
 	 * Otherwise check if either cpus are near enough in load to allow this
 	 * task to be woken on this_cpu.
 	 */
-	this_eff_load = 100;
-	this_eff_load *= capacity_of(prev_cpu);
+	prev_eff_load = 100;
+	prev_eff_load *= capacity_of(prev_cpu);
 
-	prev_eff_load = 100 + (sd->imbalance_pct - 100) / 2;
-	prev_eff_load *= capacity_of(this_cpu);
+	this_eff_load = 100 + (sd->imbalance_pct - 100) / 2;
+	this_eff_load *= capacity_of(this_cpu);
 
 	if (this_load > 0) {
 		this_eff_load *= this_load +
-- 
2.9.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7][RESEND] Fix cpu imbalance with equal weighted groups Josef Bacik <josef@toxicpanda.com> - 2017-07-14 15:30 +0200
  [PATCH 3/7] sched/fair: fix definitions of effective load Josef Bacik <josef@toxicpanda.com> - 2017-07-14 15:30 +0200
  [PATCH 7/7] sched/fair: don't wake affine recently load balanced tasks Josef Bacik <josef@toxicpanda.com> - 2017-07-14 15:30 +0200
  [PATCH 1/7] sched/fair: use reweight_entity to reweight tasks Josef Bacik <josef@toxicpanda.com> - 2017-07-14 15:30 +0200

csiph-web