From: Aubrey Li <aubrey.li@intel.com>
To: vincent.guittot@linaro.org, mingo@redhat.com,
peterz@infradead.org, juri.lelli@redhat.com,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de,
linux-kernel@vger.kernel.org
Cc: tim.c.chen@linux.intel.com, vpillai@digitalocean.com,
joel@joelfernandes.org, Aubrey Li <aubrey.li@intel.com>,
Aubrey Li <aubrey.li@linux.intel.com>
Subject: [PATCH] sched/fair: Don't pull task if local group is more loaded than busiest group
Date: Wed, 25 Mar 2020 20:46:28 +0800 [thread overview]
Message-ID: <1585140388-61802-1-git-send-email-aubrey.li@intel.com> (raw)
A huge number of load imbalance was observed when the local group
type is group_fully_busy, and the average load of local group is
greater than the selected busiest group, so the imbalance calculation
returns a negative value actually. Fix this problem by comparing the
average load before local group type check.
Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
---
kernel/sched/fair.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index c1217bf..c524369 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8862,17 +8862,17 @@ static struct sched_group *find_busiest_group(struct lb_env *env)
goto out_balanced;
/*
+ * If the local group is more loaded than the selected
+ * busiest group don't try to pull any tasks.
+ */
+ if (local->avg_load >= busiest->avg_load)
+ goto out_balanced;
+
+ /*
* When groups are overloaded, use the avg_load to ensure fairness
* between tasks.
*/
if (local->group_type == group_overloaded) {
- /*
- * If the local group is more loaded than the selected
- * busiest group don't try to pull any tasks.
- */
- if (local->avg_load >= busiest->avg_load)
- goto out_balanced;
-
/* XXX broken for overlapping NUMA groups */
sds.avg_load = (sds.total_load * SCHED_CAPACITY_SCALE) /
sds.total_capacity;
--
2.7.4
next reply other threads:[~2020-03-25 12:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 12:46 Aubrey Li [this message]
2020-03-25 13:43 ` Phil Auld
2020-03-26 1:51 ` Li, Aubrey
2020-03-25 13:58 ` Vincent Guittot
2020-03-26 1:57 ` Li, Aubrey
2020-03-28 13:23 ` [sched/fair] 59901cb452: netperf.Throughput_Mbps -27.3% regression kernel test robot
2020-03-29 4:26 ` Aubrey Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1585140388-61802-1-git-send-email-aubrey.li@intel.com \
--to=aubrey.li@intel.com \
--cc=aubrey.li@linux.intel.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=joel@joelfernandes.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tim.c.chen@linux.intel.com \
--cc=vincent.guittot@linaro.org \
--cc=vpillai@digitalocean.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome