From: "tip-bot2 for Vincent Guittot" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Odin Ugedal <odin@uged.al>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/core] sched/pelt: Check that *_avg are null when *_sum are
Date: Fri, 18 Jun 2021 08:46:07 -0000 [thread overview]
Message-ID: <162400596764.19906.16000251209838889232.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20210601155328.19487-1-vincent.guittot@linaro.org>
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 9e077b52d86ac364a295b05c916c7478a16865b2
Gitweb: https://git.kernel.org/tip/9e077b52d86ac364a295b05c916c7478a16865b2
Author: Vincent Guittot <vincent.guittot@linaro.org>
AuthorDate: Tue, 01 Jun 2021 17:53:28 +02:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 17 Jun 2021 14:11:42 +02:00
sched/pelt: Check that *_avg are null when *_sum are
Check that we never break the rule that pelt's avg values are null if
pelt's sum are.
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Acked-by: Odin Ugedal <odin@uged.al>
Link: https://lore.kernel.org/r/20210601155328.19487-1-vincent.guittot@linaro.org
---
kernel/sched/fair.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ce625bf..198514d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8026,6 +8026,15 @@ static inline bool cfs_rq_is_decayed(struct cfs_rq *cfs_rq)
if (cfs_rq->avg.runnable_sum)
return false;
+ /*
+ * _avg must be null when _sum are null because _avg = _sum / divider
+ * Make sure that rounding and/or propagation of PELT values never
+ * break this.
+ */
+ SCHED_WARN_ON(cfs_rq->avg.load_avg ||
+ cfs_rq->avg.util_avg ||
+ cfs_rq->avg.runnable_avg);
+
return true;
}
prev parent reply other threads:[~2021-06-18 8:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-01 15:53 [PATCH] sched/pelt: check " Vincent Guittot
2021-06-02 6:45 ` [sched/pelt] e906550aca: WARNING:at_kernel/sched/fair.c:#update_blocked_averages kernel test robot
2021-06-03 10:50 ` Dietmar Eggemann
2021-06-03 10:59 ` Vincent Guittot
2021-06-03 10:42 ` [PATCH] sched/pelt: check that *_avg are null when *_sum are Dietmar Eggemann
2021-06-03 11:06 ` Odin Ugedal
2021-06-03 12:47 ` Vincent Guittot
2021-06-03 14:32 ` Odin Ugedal
2021-06-18 8:46 ` tip-bot2 for Vincent Guittot [this message]
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=162400596764.19906.16000251209838889232.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=odin@uged.al \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.org \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®