* [PATCH -next] sched/uclamp: kill unnecessary mutex_init()
@ 2020-07-25 8:56 Qinglang Miao
2020-07-25 10:13 ` [tip: sched/core] sched/uclamp: Remove " tip-bot2 for Qinglang Miao
2020-07-31 2:57 ` [PATCH -next] sched/uclamp: kill " Steven Rostedt
0 siblings, 2 replies; 3+ messages in thread
From: Qinglang Miao @ 2020-07-25 8:56 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
Greg Kroah-Hartman
Cc: linux-kernel
The mutex uclamp_mutex is initialized statically. It is
unnecessary to initialize by mutex_init().
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
kernel/sched/core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 29d557c1f..9a8b7ed3a 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1331,8 +1331,6 @@ static void __init init_uclamp(void)
enum uclamp_id clamp_id;
int cpu;
- mutex_init(&uclamp_mutex);
-
for_each_possible_cpu(cpu)
init_uclamp_rq(cpu_rq(cpu));
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [tip: sched/core] sched/uclamp: Remove unnecessary mutex_init()
2020-07-25 8:56 [PATCH -next] sched/uclamp: kill unnecessary mutex_init() Qinglang Miao
@ 2020-07-25 10:13 ` tip-bot2 for Qinglang Miao
2020-07-31 2:57 ` [PATCH -next] sched/uclamp: kill " Steven Rostedt
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Qinglang Miao @ 2020-07-25 10:13 UTC (permalink / raw)
To: linux-tip-commits
Cc: Qinglang Miao, Ingo Molnar, Patrick Bellasi, Peter Zijlstra,
Vincent Guittot, Dietmar Eggemann, x86, LKML
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 13efa616124f7eec7d6a58adeeef31864aa03879
Gitweb: https://git.kernel.org/tip/13efa616124f7eec7d6a58adeeef31864aa03879
Author: Qinglang Miao <miaoqinglang@huawei.com>
AuthorDate: Sat, 25 Jul 2020 16:56:29 +08:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Sat, 25 Jul 2020 12:10:36 +02:00
sched/uclamp: Remove unnecessary mutex_init()
The uclamp_mutex lock is initialized statically via DEFINE_MUTEX(),
it is unnecessary to initialize it runtime via mutex_init().
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Patrick Bellasi <patrick.bellasi@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Link: https://lore.kernel.org/r/20200725085629.98292-1-miaoqinglang@huawei.com
---
kernel/sched/core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index bd8e521..6782534 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1425,8 +1425,6 @@ static void __init init_uclamp(void)
enum uclamp_id clamp_id;
int cpu;
- mutex_init(&uclamp_mutex);
-
for_each_possible_cpu(cpu)
init_uclamp_rq(cpu_rq(cpu));
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] sched/uclamp: kill unnecessary mutex_init()
2020-07-25 8:56 [PATCH -next] sched/uclamp: kill unnecessary mutex_init() Qinglang Miao
2020-07-25 10:13 ` [tip: sched/core] sched/uclamp: Remove " tip-bot2 for Qinglang Miao
@ 2020-07-31 2:57 ` Steven Rostedt
1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2020-07-31 2:57 UTC (permalink / raw)
To: Qinglang Miao
Cc: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Ben Segall, Mel Gorman, Greg Kroah-Hartman,
linux-kernel
On Sat, 25 Jul 2020 16:56:29 +0800
Qinglang Miao <miaoqinglang@huawei.com> wrote:
> The mutex uclamp_mutex is initialized statically. It is
> unnecessary to initialize by mutex_init().
>
Seems reasonable.
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-- Steve
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
> kernel/sched/core.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 29d557c1f..9a8b7ed3a 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -1331,8 +1331,6 @@ static void __init init_uclamp(void)
> enum uclamp_id clamp_id;
> int cpu;
>
> - mutex_init(&uclamp_mutex);
> -
> for_each_possible_cpu(cpu)
> init_uclamp_rq(cpu_rq(cpu));
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-31 2:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25 8:56 [PATCH -next] sched/uclamp: kill unnecessary mutex_init() Qinglang Miao
2020-07-25 10:13 ` [tip: sched/core] sched/uclamp: Remove " tip-bot2 for Qinglang Miao
2020-07-31 2:57 ` [PATCH -next] sched/uclamp: kill " Steven Rostedt
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).