From: Dave Chiluk <chiluk+linux@indeed.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ben Segall <bsegall@google.com>, Phil Auld <pauld@redhat.com>,
stable@vger.kernel.org, Sasha Levin <sashal@kernel.org>,
Ingo Molnar <mingo@redhat.com>, Qian Cai <cai@lca.pw>
Subject: [PATCH v4.14.y 2/2] sched/fair: Fix -Wunused-but-set-variable warnings
Date: Fri, 8 Nov 2019 14:15:57 -0600 [thread overview]
Message-ID: <1573244157-28339-3-git-send-email-chiluk+linux@indeed.com> (raw)
In-Reply-To: <1573244157-28339-1-git-send-email-chiluk+linux@indeed.com>
From: Qian Cai <cai@lca.pw>
[ Upstream commit 763a9ec06c409dcde2a761aac4bb83ff3938e0b3 ]
Commit:
de53fd7aedb1 ("sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices")
introduced a few compilation warnings:
kernel/sched/fair.c: In function '__refill_cfs_bandwidth_runtime':
kernel/sched/fair.c:4365:6: warning: variable 'now' set but not used [-Wunused-but-set-variable]
kernel/sched/fair.c: In function 'start_cfs_bandwidth':
kernel/sched/fair.c:4992:6: warning: variable 'overrun' set but not used [-Wunused-but-set-variable]
Also, __refill_cfs_bandwidth_runtime() does no longer update the
expiration time, so fix the comments accordingly.
Signed-off-by: Qian Cai <cai@lca.pw>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Ben Segall <bsegall@google.com>
Reviewed-by: Dave Chiluk <chiluk+linux@indeed.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: pauld@redhat.com
Fixes: de53fd7aedb1 ("sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices")
Link: https://lkml.kernel.org/r/1566326455-8038-1-git-send-email-cai@lca.pw
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/fair.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d5c032e..feeb528 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4091,21 +4091,16 @@ static inline u64 sched_cfs_bandwidth_slice(void)
}
/*
- * Replenish runtime according to assigned quota and update expiration time.
- * We use sched_clock_cpu directly instead of rq->clock to avoid adding
- * additional synchronization around rq->lock.
+ * Replenish runtime according to assigned quota. We use sched_clock_cpu
+ * directly instead of rq->clock to avoid adding additional synchronization
+ * around rq->lock.
*
* requires cfs_b->lock
*/
void __refill_cfs_bandwidth_runtime(struct cfs_bandwidth *cfs_b)
{
- u64 now;
-
- if (cfs_b->quota == RUNTIME_INF)
- return;
-
- now = sched_clock_cpu(smp_processor_id());
- cfs_b->runtime = cfs_b->quota;
+ if (cfs_b->quota != RUNTIME_INF)
+ cfs_b->runtime = cfs_b->quota;
}
static inline struct cfs_bandwidth *tg_cfs_bandwidth(struct task_group *tg)
--
1.8.3.1
next prev parent reply other threads:[~2019-11-08 20:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 5:53 Please backport de53fd7aedb1 : sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices Dave Chiluk
2019-09-25 6:44 ` Greg KH
2019-09-27 6:12 ` Dave Chiluk
2019-09-27 6:24 ` Greg KH
2019-09-27 13:13 ` Sasha Levin
2019-10-03 5:15 ` Dave Chiluk
2019-10-03 6:51 ` Greg KH
2019-10-18 20:23 ` Dave Chiluk
2019-10-18 20:53 ` Peter Zijlstra
2019-10-22 14:55 ` Dave Chiluk
2019-11-04 11:08 ` Greg KH
2019-11-08 18:06 ` [PATCH v4.14.y 1/2] " Dave Chiluk
2019-11-08 20:15 ` [PATCH v4.14.y 0/2] Please backport de53fd7aedb1 : " Dave Chiluk
2019-11-08 20:15 ` [PATCH v4.14.y 1/2] " Dave Chiluk
2019-11-08 20:15 ` Dave Chiluk [this message]
2019-11-11 9:18 ` [PATCH v4.14.y 0/2] Please backport de53fd7aedb1 : " Greg KH
2019-11-08 20:20 ` [PATCH v4.19.y " Dave Chiluk
2019-11-08 20:20 ` [PATCH v4.19.y 1/2] " Dave Chiluk
2019-11-08 20:20 ` [PATCH v4.19.y 2/2] sched/fair: Fix -Wunused-but-set-variable warnings Dave Chiluk
2019-11-11 9:19 ` [PATCH v4.19.y 0/2] Please backport de53fd7aedb1 : sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices Greg KH
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=1573244157-28339-3-git-send-email-chiluk+linux@indeed.com \
--to=chiluk+linux@indeed.com \
--cc=bsegall@google.com \
--cc=cai@lca.pw \
--cc=gregkh@linuxfoundation.org \
--cc=mingo@redhat.com \
--cc=pauld@redhat.com \
--cc=peterz@infradead.org \
--cc=sashal@kernel.org \
--cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).