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


Groups > linux.kernel > #1647083

Re: [PATCH V3 0/2] load_balance() fixes for affinity

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH V3 0/2] load_balance() fixes for affinity
Date 2017-05-22 18:00 +0200
Message-ID <tJXUw-7yP-67@gated-at.bofh.it> (permalink)
References <tIzrc-7No-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, May 18, 2017 at 01:36:01PM -0600, Jeffrey Hugo wrote:

> The group_imbalance path correctly sets the flag
> to indicate the group can not be properly balanced due to affinity, but the
> redo condition right after this branch incorrectly assumes that there may
> be other cores with work to be pulled by considering cores outside of the
> scheduling domain in question.

So its been a while since I looked at any of this, but from a quick
look, env->cpus appears to only be applied to group/balance masks.

In which case, we can easily do something like the below. Did I miss
something?

---
 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 219fe58e3023..1724e4433f89 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8104,7 +8104,7 @@ static int load_balance(int this_cpu, struct rq *this_rq,
 	if (idle == CPU_NEWLY_IDLE)
 		env.dst_grpmask = NULL;
 
-	cpumask_copy(cpus, cpu_active_mask);
+	cpumask_and(cpus, sched_domain_span(sd), cpu_active_mask);
 
 	schedstat_inc(sd->lb_count[idle]);
 

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


Thread

[PATCH V3 0/2] load_balance() fixes for affinity Jeffrey Hugo <jhugo@codeaurora.org> - 2017-05-18 21:40 +0200
  Re: [PATCH V3 0/2] load_balance() fixes for affinity Peter Zijlstra <peterz@infradead.org> - 2017-05-22 18:00 +0200
    Re: [PATCH V3 0/2] load_balance() fixes for affinity "Christ, Austin" <austinwc@codeaurora.org> - 2017-05-22 22:20 +0200

csiph-web