summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorChen Ridong <chenridong@huawei.com>2024-08-30 12:02:18 +0200
committerTejun Heo <tj@kernel.org>2024-08-30 22:00:15 +0200
commit71e934a80863c2a9f4d27ee3360dc17e0a609aa6 (patch)
tree6c50902abd94ae798788b1f35f5e843230a06502 /kernel
parentselftest/cgroup: Make test_cpuset_prs.sh deal with pre-isolated CPUs (diff)
downloadlinux-71e934a80863c2a9f4d27ee3360dc17e0a609aa6.tar.xz
linux-71e934a80863c2a9f4d27ee3360dc17e0a609aa6.zip
cgroup/cpuset: introduce cpuset-v1.c
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>
Diffstat (limited to '')
-rw-r--r--kernel/cgroup/Makefile2
-rw-r--r--kernel/cgroup/cpuset-internal.h6
-rw-r--r--kernel/cgroup/cpuset-v1.c3
3 files changed, 10 insertions, 1 deletions
diff --git a/kernel/cgroup/Makefile b/kernel/cgroup/Makefile
index 12f8457ad1f9..005ac4c675cb 100644
--- a/kernel/cgroup/Makefile
+++ b/kernel/cgroup/Makefile
@@ -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
index 000000000000..034de3cbf3ad
--- /dev/null
+++ b/kernel/cgroup/cpuset-internal.h
@@ -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
index 000000000000..bdec4b196986
--- /dev/null
+++ b/kernel/cgroup/cpuset-v1.c
@@ -0,0 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "cpuset-internal.h"