remove patches for cpu / cpuacct cgroup mount
should place those instructions under vendor impl
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
From 7a3d9447f2c12e00b07acafacdabe798edf351eb Mon Sep 17 00:00:00 2001
|
||||
From: John Tung <watchnight@163.com>
|
||||
Date: Sun, 21 Aug 2022 11:22:48 +0800
|
||||
Subject: [PATCH 7/7] fix cpu cgroup mount
|
||||
|
||||
---
|
||||
libprocessgroup/setup/cgroup_map_write.cpp | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/libprocessgroup/setup/cgroup_map_write.cpp b/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
index 17ea06e09..c25bf302a 100644
|
||||
--- a/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
+++ b/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
@@ -217,6 +217,11 @@ static bool SetupCgroup(const CgroupDescriptor& descriptor) {
|
||||
result = mount("none", controller->path(), "cgroup", MS_NODEV | MS_NOEXEC | MS_NOSUID,
|
||||
controller->name());
|
||||
}
|
||||
+ if (result < 0 && (!strcmp(controller->name(), "cpu")
|
||||
+ || !strcmp(controller->name(), "cpuacct"))) {
|
||||
+ result = mount("none", controller->path(), "cgroup", MS_NODEV | MS_NOEXEC | MS_NOSUID,
|
||||
+ "cpu,cpuacct");
|
||||
+ }
|
||||
}
|
||||
|
||||
if (result < 0) {
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
From 17a19be89f85e2d03123f9eb5661b397a78a1a63 Mon Sep 17 00:00:00 2001
|
||||
From: Tung <john@example.com>
|
||||
Date: Fri, 19 Aug 2022 10:07:23 +0800
|
||||
Subject: [PATCH 6/7] mount cpuacct and cpu together
|
||||
|
||||
---
|
||||
libprocessgroup/setup/cgroup_map_write.cpp | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/libprocessgroup/setup/cgroup_map_write.cpp b/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
index 25f16a6e9..9ef9c1105 100644
|
||||
--- a/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
+++ b/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
@@ -291,6 +291,11 @@ static bool SetupCgroup(const CgroupDescriptor& descriptor) {
|
||||
result = mount("none", controller->path(), "cgroup", MS_NODEV | MS_NOEXEC | MS_NOSUID,
|
||||
controller->name());
|
||||
}
|
||||
+ if (result < 0 && (!strcmp(controller->name(), "cpu")
|
||||
+ || !strcmp(controller->name(), "cpuacct"))) {
|
||||
+ result = mount("none", controller->path(), "cgroup", MS_NODEV | MS_NOEXEC | MS_NOSUID,
|
||||
+ "cpu,cpuacct");
|
||||
+ }
|
||||
}
|
||||
|
||||
if (result < 0) {
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
From b142c7c0ce2d63422932b7d9bf912c7240f8a025 Mon Sep 17 00:00:00 2001
|
||||
From: John Tung <watchnight@163.com>
|
||||
Date: Sun, 21 Aug 2022 11:23:33 +0800
|
||||
Subject: [PATCH 7/8] fix cpu cgroup mount
|
||||
|
||||
---
|
||||
libprocessgroup/setup/cgroup_map_write.cpp | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/libprocessgroup/setup/cgroup_map_write.cpp b/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
index 3121d244b..bb15e4f6d 100644
|
||||
--- a/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
+++ b/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
@@ -309,6 +309,11 @@ static bool SetupCgroup(const CgroupDescriptor& descriptor) {
|
||||
result = mount("none", controller->path(), "cgroup", MS_NODEV | MS_NOEXEC | MS_NOSUID,
|
||||
controller->name());
|
||||
}
|
||||
+ if (result < 0 && (!strcmp(controller->name(), "cpu")
|
||||
+ || !strcmp(controller->name(), "cpuacct"))) {
|
||||
+ result = mount("none", controller->path(), "cgroup", MS_NODEV | MS_NOEXEC | MS_NOSUID,
|
||||
+ "cpu,cpuacct");
|
||||
+ }
|
||||
}
|
||||
|
||||
if (result < 0) {
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
From 034e45234b3ad1e44ac4f23314e0ef36b67e36bd Mon Sep 17 00:00:00 2001
|
||||
From: John Tung <watchnight@163.com>
|
||||
Date: Sun, 21 Aug 2022 11:24:11 +0800
|
||||
Subject: [PATCH 7/8] fix cpu cgroup mount, possible need mount cpuacct and cpu
|
||||
together
|
||||
|
||||
---
|
||||
libprocessgroup/setup/cgroup_map_write.cpp | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/libprocessgroup/setup/cgroup_map_write.cpp b/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
index 3831ef20a..80fa6a157 100644
|
||||
--- a/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
+++ b/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
@@ -324,6 +324,11 @@ static bool SetupCgroup(const CgroupDescriptor& descriptor) {
|
||||
result = mount("none", controller->path(), "cgroup", MS_NODEV | MS_NOEXEC | MS_NOSUID,
|
||||
controller->name());
|
||||
}
|
||||
+ if (result < 0 && (!strcmp(controller->name(), "cpu")
|
||||
+ || !strcmp(controller->name(), "cpuacct"))) {
|
||||
+ result = mount("none", controller->path(), "cgroup", MS_NODEV | MS_NOEXEC | MS_NOSUID,
|
||||
+ "cpu,cpuacct");
|
||||
+ }
|
||||
}
|
||||
|
||||
if (result < 0) {
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From e7d905b53f72bceafeffd5e7e3948f25bc313038 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Sun, 21 Aug 2022 11:24:11 +0800
|
||||
Subject: [PATCH 6/6] fix cpu cgroup mount
|
||||
|
||||
---
|
||||
rootdir/init.rc | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/rootdir/init.rc b/rootdir/init.rc
|
||||
index c46190d1f..fef98f000 100644
|
||||
--- a/rootdir/init.rc
|
||||
+++ b/rootdir/init.rc
|
||||
@@ -29,6 +29,7 @@ on early-init
|
||||
|
||||
# Mount cgroup mount point for cpu accounting
|
||||
mount cgroup none /acct cpuacct
|
||||
+ mount cgroup none /acct cpu,cpuacct
|
||||
mkdir /acct/uid
|
||||
|
||||
# root memory control cgroup, used by lmkd
|
||||
@@ -155,6 +156,7 @@ on init
|
||||
# Create cgroup mount points for process groups
|
||||
mkdir /dev/cpuctl
|
||||
mount cgroup none /dev/cpuctl cpu
|
||||
+ mount cgroup none /dev/cpuctl cpu,cpuacct
|
||||
chown system system /dev/cpuctl
|
||||
chown system system /dev/cpuctl/tasks
|
||||
chmod 0666 /dev/cpuctl/tasks
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From 2f606701c475ea3a40776e3760e5824a3e6d7de6 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Sun, 21 Aug 2022 11:24:11 +0800
|
||||
Subject: [PATCH 7/7] fix cpu cgroup mount
|
||||
|
||||
---
|
||||
rootdir/init.rc | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/rootdir/init.rc b/rootdir/init.rc
|
||||
index a9d5fc02c..e28d3ea8e 100644
|
||||
--- a/rootdir/init.rc
|
||||
+++ b/rootdir/init.rc
|
||||
@@ -26,6 +26,7 @@ on early-init
|
||||
|
||||
# Mount cgroup mount point for cpu accounting
|
||||
mount cgroup none /acct nodev noexec nosuid cpuacct
|
||||
+ mount cgroup none /acct nodev noexec nosuid cpu,cpuacct
|
||||
mkdir /acct/uid
|
||||
|
||||
# root memory control cgroup, used by lmkd
|
||||
@@ -151,6 +152,7 @@ on init
|
||||
# Create cgroup mount points for process groups
|
||||
mkdir /dev/cpuctl
|
||||
mount cgroup none /dev/cpuctl nodev noexec nosuid cpu
|
||||
+ mount cgroup none /dev/cpuctl nodev noexec nosuid cpu,cpuacct
|
||||
chown system system /dev/cpuctl
|
||||
chown system system /dev/cpuctl/tasks
|
||||
chmod 0666 /dev/cpuctl/tasks
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Reference in New Issue
Block a user