lkml.org 
[lkml]   [2022]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] cgroup/cpuset: no need to explicitly init a global static variable
From
Hi,

On 12/20/2022 8:44 PM, Daniel Vacek wrote:
> cpuset_rwsem is a static variable. It's initialized at build time and so
> there's no need for explicit runtime init leaking one percpu int.
>
> Signed-off-by: Daniel Vacek <neelx@redhat.com>
> ---
> kernel/cgroup/cpuset.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index a29c0b13706bb..87fe410361b3d 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -3281,8 +3281,6 @@ struct cgroup_subsys cpuset_cgrp_subsys = {
>
> int __init cpuset_init(void)
> {
> - BUG_ON(percpu_init_rwsem(&cpuset_rwsem));
> -
> BUG_ON(!alloc_cpumask_var(&top_cpuset.cpus_allowed, GFP_KERNEL));
> BUG_ON(!alloc_cpumask_var(&top_cpuset.effective_cpus, GFP_KERNEL));
> BUG_ON(!zalloc_cpumask_var(&top_cpuset.subparts_cpus, GFP_KERNEL));

Acked-by: Mukesh Ojha <quic_mojha@quicinc.com>

-Mukesh

\
 
 \ /
  Last update: 2023-03-26 23:16    [W:0.064 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site