|
|
df9c27 |
From 5fc2d94fbf8271bb340e834f832af5d890c267bf Mon Sep 17 00:00:00 2001
|
|
|
df9c27 |
From: =?UTF-8?q?Michal=20Sekleta=CC=81r?= <msekleta@redhat.com>
|
|
|
df9c27 |
Date: Tue, 3 Mar 2020 11:45:00 +0100
|
|
|
df9c27 |
Subject: [PATCH 332/341] cgroup: make sure that cpuset is supported on cgroup
|
|
|
df9c27 |
v2 and disabled with v1
|
|
|
df9c27 |
|
|
|
df9c27 |
Resolves: #1808940
|
|
|
df9c27 |
|
|
|
df9c27 |
(rhel-only)
|
|
|
df9c27 |
---
|
|
|
df9c27 |
src/basic/cgroup-util.c | 7 +++++--
|
|
|
df9c27 |
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
df9c27 |
|
|
|
df9c27 |
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
|
|
|
df9c27 |
index 6f47c3aacb..92bc1f2543 100644
|
|
|
df9c27 |
--- a/src/basic/cgroup-util.c
|
|
|
df9c27 |
+++ b/src/basic/cgroup-util.c
|
|
|
df9c27 |
@@ -2353,10 +2353,10 @@ int cg_mask_supported(CGroupMask *ret) {
|
|
|
df9c27 |
if (r < 0)
|
|
|
df9c27 |
return r;
|
|
|
df9c27 |
|
|
|
df9c27 |
- /* Currently, we support the cpu, memory, io and pids
|
|
|
df9c27 |
+ /* Currently, we support the cpu, memory, io, pids and cpuset
|
|
|
df9c27 |
* controller in the unified hierarchy, mask
|
|
|
df9c27 |
* everything else off. */
|
|
|
df9c27 |
- mask &= CGROUP_MASK_CPU | CGROUP_MASK_MEMORY | CGROUP_MASK_IO | CGROUP_MASK_PIDS;
|
|
|
df9c27 |
+ mask &= CGROUP_MASK_CPU | CGROUP_MASK_MEMORY | CGROUP_MASK_IO | CGROUP_MASK_PIDS | CGROUP_MASK_CPUSET;
|
|
|
df9c27 |
|
|
|
df9c27 |
} else {
|
|
|
df9c27 |
CGroupController c;
|
|
|
df9c27 |
@@ -2367,6 +2367,9 @@ int cg_mask_supported(CGroupMask *ret) {
|
|
|
df9c27 |
for (c = 0; c < _CGROUP_CONTROLLER_MAX; c++) {
|
|
|
df9c27 |
const char *n;
|
|
|
df9c27 |
|
|
|
df9c27 |
+ if (c == CGROUP_CONTROLLER_CPUSET)
|
|
|
df9c27 |
+ continue;
|
|
|
df9c27 |
+
|
|
|
df9c27 |
n = cgroup_controller_to_string(c);
|
|
|
df9c27 |
if (controller_is_accessible(n) >= 0)
|
|
|
df9c27 |
mask |= CGROUP_CONTROLLER_TO_MASK(c);
|
|
|
df9c27 |
--
|
|
|
df9c27 |
2.21.1
|
|
|
df9c27 |
|