[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-892d59c22208be820a5463b5f74eb7f0b7f2b03a@git.kernel.org>
Date: Mon, 11 Feb 2019 02:51:12 -0800
From: tip-bot for Valentin Schneider <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...nel.org,
hpa@...or.com, peterz@...radead.org, torvalds@...ux-foundation.org,
valentin.schneider@....com
Subject: [tip:sched/core] sched/fair: Explain LLC nohz kick condition
Commit-ID: 892d59c22208be820a5463b5f74eb7f0b7f2b03a
Gitweb: https://git.kernel.org/tip/892d59c22208be820a5463b5f74eb7f0b7f2b03a
Author: Valentin Schneider <valentin.schneider@....com>
AuthorDate: Thu, 17 Jan 2019 15:34:08 +0000
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 11 Feb 2019 08:02:17 +0100
sched/fair: Explain LLC nohz kick condition
Provide a comment explaining the LLC related nohz kick in
nohz_balancer_kick().
Signed-off-by: Valentin Schneider <valentin.schneider@....com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Dietmar.Eggemann@....com
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: morten.rasmussen@....com
Cc: vincent.guittot@...aro.org
Link: https://lkml.kernel.org/r/20190117153411.2390-3-valentin.schneider@arm.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/sched/fair.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 0692c8ff6ff6..ac6b52d8c79e 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9601,8 +9601,13 @@ static void nohz_balancer_kick(struct rq *rq)
sds = rcu_dereference(per_cpu(sd_llc_shared, cpu));
if (sds) {
/*
- * XXX: write a coherent comment on why we do this.
- * See also: http://lkml.kernel.org/r/20111202010832.602203411@sbsiddha-desk.sc.intel.com
+ * If there is an imbalance between LLC domains (IOW we could
+ * increase the overall cache use), we need some less-loaded LLC
+ * domain to pull some load. Likewise, we may need to spread
+ * load within the current LLC domain (e.g. packed SMT cores but
+ * other CPUs are idle). We can't really know from here how busy
+ * the others are - so just get a nohz balance going if it looks
+ * like this LLC domain has tasks we could move.
*/
nr_busy = atomic_read(&sds->nr_busy_cpus);
if (nr_busy > 1) {
Powered by blists - more mailing lists