From: Li Guanglei <guangleix.li@gmail.com>
To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org
Cc: dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de,
linux-kernel@vger.kernel.org, guangleix.li@gmail.com,
guanglei.li@unisoc.com
Subject: [PATCH v01] sched/core: uclamp: fix rq.uclamp memory size of initialization
Date: Wed, 25 Dec 2019 15:44:04 +0800 [thread overview]
Message-ID: <1577259844-12677-1-git-send-email-guangleix.li@gmail.com> (raw)
From: Li Guanglei <guanglei.li@unisoc.com>
uclamp_rq for each clamp id(UCLAMP_CNT) should be initialized when call
init_uclamp.
Signed-off-by: Li Guanglei <guanglei.li@unisoc.com>
---
kernel/sched/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 44123b4..05f870b 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1252,7 +1252,8 @@ static void __init init_uclamp(void)
mutex_init(&uclamp_mutex);
for_each_possible_cpu(cpu) {
- memset(&cpu_rq(cpu)->uclamp, 0, sizeof(struct uclamp_rq));
+ memset(&cpu_rq(cpu)->uclamp, 0,
+ sizeof(struct uclamp_rq)*UCLAMP_CNT);
cpu_rq(cpu)->uclamp_flags = 0;
}
--
2.7.4
next reply other threads:[~2019-12-25 7:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-25 7:44 Li Guanglei [this message]
2019-12-29 22:11 ` Qais Yousef
2020-01-07 9:47 ` Peter Zijlstra
2020-01-17 10:08 ` [tip: sched/core] sched/core: Fix size of rq::uclamp initialization tip-bot2 for Li Guanglei
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=1577259844-12677-1-git-send-email-guangleix.li@gmail.com \
--to=guangleix.li@gmail.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=guanglei.li@unisoc.com \
--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=vincent.guittot@linaro.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®