* [PATCH v01] sched/core: uclamp: fix rq.uclamp memory size of initialization
@ 2019-12-25 7:44 Li Guanglei
2019-12-29 22:11 ` Qais Yousef
2020-01-17 10:08 ` [tip: sched/core] sched/core: Fix size of rq::uclamp initialization tip-bot2 for Li Guanglei
0 siblings, 2 replies; 4+ messages in thread
From: Li Guanglei @ 2019-12-25 7:44 UTC (permalink / raw)
To: mingo, peterz, juri.lelli, vincent.guittot
Cc: dietmar.eggemann, rostedt, bsegall, mgorman, linux-kernel,
guangleix.li, guanglei.li
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v01] sched/core: uclamp: fix rq.uclamp memory size of initialization
2019-12-25 7:44 [PATCH v01] sched/core: uclamp: fix rq.uclamp memory size of initialization Li Guanglei
@ 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
1 sibling, 1 reply; 4+ messages in thread
From: Qais Yousef @ 2019-12-29 22:11 UTC (permalink / raw)
To: Li Guanglei
Cc: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
rostedt, bsegall, mgorman, linux-kernel, guanglei.li
On 12/25/19 15:44, Li Guanglei wrote:
> From: Li Guanglei <guanglei.li@unisoc.com>
>
> uclamp_rq for each clamp id(UCLAMP_CNT) should be initialized when call
s/clamp id(UCLAMP_CNT)/UCLAMP_CNT/
> init_uclamp.
>
> Signed-off-by: Li Guanglei <guanglei.li@unisoc.com>
This need fixes tag
Fixes: 69842cba9ace ("sched/uclamp: Add CPU's clamp buckets refcountinga")
Otherwise this looks good to me.
Reviewed-by: Qais Yousef <qais.yousef@arm.com>
Thanks
--
Qais Yousef
> ---
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v01] sched/core: uclamp: fix rq.uclamp memory size of initialization
2019-12-29 22:11 ` Qais Yousef
@ 2020-01-07 9:47 ` Peter Zijlstra
0 siblings, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2020-01-07 9:47 UTC (permalink / raw)
To: Qais Yousef
Cc: Li Guanglei, mingo, juri.lelli, vincent.guittot,
dietmar.eggemann, rostedt, bsegall, mgorman, linux-kernel,
guanglei.li
On Sun, Dec 29, 2019 at 10:11:20PM +0000, Qais Yousef wrote:
> On 12/25/19 15:44, Li Guanglei wrote:
> > From: Li Guanglei <guanglei.li@unisoc.com>
> >
> > uclamp_rq for each clamp id(UCLAMP_CNT) should be initialized when call
>
> s/clamp id(UCLAMP_CNT)/UCLAMP_CNT/
>
> > init_uclamp.
> >
> > Signed-off-by: Li Guanglei <guanglei.li@unisoc.com>
>
> This need fixes tag
>
> Fixes: 69842cba9ace ("sched/uclamp: Add CPU's clamp buckets refcountinga")
>
> Otherwise this looks good to me.
>
> Reviewed-by: Qais Yousef <qais.yousef@arm.com>
Thanks! It now looks something like so:
---
Subject: sched/core: Fix size of rq::uclamp initialization
From: Li Guanglei <guanglei.li@unisoc.com>
Date: Wed, 25 Dec 2019 15:44:04 +0800
rq::uclamp is an array of struct uclamp_rq, make sure we clear the
whole thing.
Fixes: 69842cba9ace ("sched/uclamp: Add CPU's clamp buckets refcountinga")
Signed-off-by: Li Guanglei <guanglei.li@unisoc.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Qais Yousef <qais.yousef@arm.com>
Link: https://lkml.kernel.org/r/1577259844-12677-1-git-send-email-guangleix.li@gmail.com
---
kernel/sched/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1253,7 +1253,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;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip: sched/core] sched/core: Fix size of rq::uclamp initialization
2019-12-25 7:44 [PATCH v01] sched/core: uclamp: fix rq.uclamp memory size of initialization Li Guanglei
2019-12-29 22:11 ` Qais Yousef
@ 2020-01-17 10:08 ` tip-bot2 for Li Guanglei
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Li Guanglei @ 2020-01-17 10:08 UTC (permalink / raw)
To: linux-tip-commits
Cc: Li Guanglei, Peter Zijlstra (Intel), Qais Yousef, x86, LKML
The following commit has been merged into the sched/core branch of tip:
Commit-ID: dcd6dffb0a75741471297724640733fa4e958d72
Gitweb: https://git.kernel.org/tip/dcd6dffb0a75741471297724640733fa4e958d72
Author: Li Guanglei <guanglei.li@unisoc.com>
AuthorDate: Wed, 25 Dec 2019 15:44:04 +08:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Fri, 17 Jan 2020 10:19:20 +01:00
sched/core: Fix size of rq::uclamp initialization
rq::uclamp is an array of struct uclamp_rq, make sure we clear the
whole thing.
Fixes: 69842cba9ace ("sched/uclamp: Add CPU's clamp buckets refcountinga")
Signed-off-by: Li Guanglei <guanglei.li@unisoc.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Qais Yousef <qais.yousef@arm.com>
Link: https://lkml.kernel.org/r/1577259844-12677-1-git-send-email-guangleix.li@gmail.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 d0270b1..fc1dfc0 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1253,7 +1253,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;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-17 10:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-25 7:44 [PATCH v01] sched/core: uclamp: fix rq.uclamp memory size of initialization Li Guanglei
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
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).