]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
cgroup/cpuset: introduce cpuset-v1.c
authorChen Ridong <chenridong@huawei.com>
Fri, 30 Aug 2024 10:02:18 +0000 (10:02 +0000)
committerTejun Heo <tj@kernel.org>
Fri, 30 Aug 2024 20:00:15 +0000 (10:00 -1000)
This patch introduces the cgroup/cpuset-v1.c source file which will be
used for all legacy (cgroup v1) cpuset cgroup code. It also introduces
cgroup/cpuset-internal.h to keep declarations shared between
cgroup/cpuset.c and cpuset/cpuset-v1.c.

As of now, let's compile it if CONFIG_CPUSET is set. Later on it can be
switched to use a separate config option, so that the legacy code won't be
compiled if not required.

Signed-off-by: Chen Ridong <chenridong@huawei.com>
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
MAINTAINERS
kernel/cgroup/Makefile
kernel/cgroup/cpuset-internal.h [new file with mode: 0644]
kernel/cgroup/cpuset-v1.c [new file with mode: 0644]

index 82e3924816d2c42dd3d79b6fe87373e21a9d3a6f..3b5ec1cafd958323fc7bb591fcfdb2f734c2ec41 100644 (file)
@@ -5698,6 +5698,8 @@ S:        Maintained
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
 F:     Documentation/admin-guide/cgroup-v1/cpusets.rst
 F:     include/linux/cpuset.h
+F:     kernel/cgroup/cpuset-internal.h
+F:     kernel/cgroup/cpuset-v1.c
 F:     kernel/cgroup/cpuset.c
 F:     tools/testing/selftests/cgroup/test_cpuset.c
 F:     tools/testing/selftests/cgroup/test_cpuset_prs.sh
index 12f8457ad1f90f8dfa5bdd87b8ff8237f63bc0a2..005ac4c675cb1fffc04da3c9176badcf2f78c735 100644 (file)
@@ -4,6 +4,6 @@ obj-y := cgroup.o rstat.o namespace.o cgroup-v1.o freezer.o
 obj-$(CONFIG_CGROUP_FREEZER) += legacy_freezer.o
 obj-$(CONFIG_CGROUP_PIDS) += pids.o
 obj-$(CONFIG_CGROUP_RDMA) += rdma.o
-obj-$(CONFIG_CPUSETS) += cpuset.o
+obj-$(CONFIG_CPUSETS) += cpuset.o cpuset-v1.o
 obj-$(CONFIG_CGROUP_MISC) += misc.o
 obj-$(CONFIG_CGROUP_DEBUG) += debug.o
diff --git a/kernel/cgroup/cpuset-internal.h b/kernel/cgroup/cpuset-internal.h
new file mode 100644 (file)
index 0000000..034de3c
--- /dev/null
@@ -0,0 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef __CPUSET_INTERNAL_H
+#define __CPUSET_INTERNAL_H
+
+#endif /* __CPUSET_INTERNAL_H */
diff --git a/kernel/cgroup/cpuset-v1.c b/kernel/cgroup/cpuset-v1.c
new file mode 100644 (file)
index 0000000..bdec4b1
--- /dev/null
@@ -0,0 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "cpuset-internal.h"