[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200107094756.GW2844@hirez.programming.kicks-ass.net>
Date: Tue, 7 Jan 2020 10:47:56 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Qais Yousef <qais.yousef@....com>
Cc: Li Guanglei <guangleix.li@...il.com>, mingo@...hat.com,
juri.lelli@...hat.com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, linux-kernel@...r.kernel.org,
guanglei.li@...soc.com
Subject: Re: [PATCH v01] sched/core: uclamp: fix rq.uclamp memory size of
initialization
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@...soc.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@...soc.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@....com>
Thanks! It now looks something like so:
---
Subject: sched/core: Fix size of rq::uclamp initialization
From: Li Guanglei <guanglei.li@...soc.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@...soc.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Qais Yousef <qais.yousef@....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;
}
Powered by blists - more mailing lists