From: Mukesh Ojha <quic_mojha@quicinc.com>
To: Daniel Vacek <neelx@redhat.com>, Waiman Long <longman@redhat.com>,
Zefan Li <lizefan.x@bytedance.com>, Tejun Heo <tj@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>
Cc: <cgroups@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cgroup/cpuset: no need to explicitly init a global static variable
Date: Wed, 21 Dec 2022 11:49:55 +0530 [thread overview]
Message-ID: <f4c63e18-9666-b1db-8474-ea32da9daccb@quicinc.com> (raw)
In-Reply-To: <20221220151415.856093-1-neelx@redhat.com>
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
next prev parent reply other threads:[~2022-12-21 6:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-20 15:14 Daniel Vacek
2022-12-20 16:59 ` Waiman Long
2022-12-21 8:49 ` Daniel Vacek
2022-12-20 17:32 ` Aaron Tomlin
2022-12-21 6:19 ` Mukesh Ojha [this message]
2023-01-04 22:21 ` Tejun Heo
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=f4c63e18-9666-b1db-8474-ea32da9daccb@quicinc.com \
--to=quic_mojha@quicinc.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=longman@redhat.com \
--cc=neelx@redhat.com \
--cc=tj@kernel.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®