From: "Michal Koutný" <mkoutny@suse.com>
To: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Cc: "Tejun Heo" <tj@kernel.org>, "Zefan Li" <lizefan.x@bytedance.com>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
"Michal Hocko" <mhocko@kernel.org>,
"Roman Gushchin" <roman.gushchin@linux.dev>,
"Shakeel Butt" <shakeel.butt@linux.dev>,
"Muchun Song" <muchun.song@linux.dev>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Chen Ridong" <chenridong@huawei.com>
Subject: [PATCH 2/4] cgroup/cpuset: Expose cpuset filesystem with cpuset v1 only
Date: Mon, 9 Sep 2024 18:32:21 +0200 [thread overview]
Message-ID: <20240909163223.3693529-3-mkoutny@suse.com> (raw)
In-Reply-To: <20240909163223.3693529-1-mkoutny@suse.com>
The cpuset filesystem is a legacy interface to cpuset controller with
(pre-)v1 features. It makes little sense to co-mount it on systems
without cpuset v1, so do no build it when cpuset v1 is not built
neither.
Signed-off-by: Michal Koutný <mkoutny@suse.com>
---
kernel/cgroup/cgroup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index c72e18ffbfd82..90e50d6d3cf39 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -2331,7 +2331,7 @@ static struct file_system_type cgroup2_fs_type = {
.fs_flags = FS_USERNS_MOUNT,
};
-#ifdef CONFIG_CPUSETS
+#ifdef CONFIG_CPUSETS_V1
static const struct fs_context_operations cpuset_fs_context_ops = {
.get_tree = cgroup1_get_tree,
.free = cgroup_fs_context_free,
@@ -6236,7 +6236,7 @@ int __init cgroup_init(void)
WARN_ON(register_filesystem(&cgroup_fs_type));
WARN_ON(register_filesystem(&cgroup2_fs_type));
WARN_ON(!proc_create_single("cgroups", 0, NULL, proc_cgroupstats_show));
-#ifdef CONFIG_CPUSETS
+#ifdef CONFIG_CPUSETS_V1
WARN_ON(register_filesystem(&cpuset_fs_type));
#endif
--
2.46.0
next prev parent reply other threads:[~2024-09-09 16:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 16:32 [PATCH 0/4] Followups to controllers' v1 compilation Michal Koutný
2024-09-09 16:32 ` [PATCH 1/4] memcg: Cleanup with !CONFIG_MEMCG_V1 Michal Koutný
2024-09-09 17:35 ` Shakeel Butt
2024-09-10 20:05 ` Tejun Heo
2024-09-10 20:19 ` Andrew Morton
2024-09-10 20:40 ` Tejun Heo
2024-09-09 16:32 ` Michal Koutný [this message]
2024-09-09 17:07 ` [PATCH 2/4] cgroup/cpuset: Expose cpuset filesystem with cpuset v1 only Waiman Long
2024-09-10 20:02 ` Tejun Heo
2024-09-09 16:32 ` [PATCH 3/4] cgroup: Disallow mounting v1 hierarchies without controller implementation Michal Koutný
2024-09-10 20:03 ` Tejun Heo
2024-09-09 16:32 ` [PATCH 4/4] cgroup: Do not report unavailable v1 controllers in /proc/cgroups Michal Koutný
2024-09-09 17:11 ` Waiman Long
2024-09-10 20:04 ` Tejun Heo
2025-07-09 18:22 ` Ben Hutchings
2025-07-11 13:10 ` Michal Koutný
2025-07-11 22:15 ` Tejun Heo
2025-07-18 9:18 ` Michal Koutný
2025-07-19 16:18 ` Tejun Heo
2025-07-12 9:28 ` Ben Hutchings
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=20240909163223.3693529-3-mkoutny@suse.com \
--to=mkoutny@suse.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@huawei.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan.x@bytedance.com \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--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®