From 24a12aeb91082fc6d01de1c64a3a3bac15a02f3a Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Mon, 6 Jan 2025 22:05:52 +0100 Subject: [PATCH] services: rootless-podman: Enable I/O delegation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on https://rootlesscontaine.rs/getting-started/common/cgroup2/#enabling-cpu-cpuset-and-io-delegation , this patch enables I/O delegation for cgroups v2 enabled users. * gnu/services/containers.scm (cgroups-limits-entrypoint): Enable I/O controller delegation. * gnu/tests/containers.scm: Test it. Change-Id: I7caba33695f11830bea477c4ab3afb89cfaa2fa5 Signed-off-by: Ludovic Courtès --- gnu/services/containers.scm | 2 +- gnu/tests/containers.scm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/services/containers.scm b/gnu/services/containers.scm index a82fb64db3..19d35ccbcb 100644 --- a/gnu/services/containers.scm +++ b/gnu/services/containers.scm @@ -174,7 +174,7 @@ (define cgroups-limits-entrypoint #~(system* (string-append #+bash-minimal "/bin/bash") "-c" (string-append "echo Setting cgroups v2 limits && " - "echo +cpu +cpuset +memory +pids" + "echo +cpu +cpuset +io +memory +pids" " >> /sys/fs/cgroup/cgroup.subtree_control")))) (define (rootless-podman-cgroups-limits-service config) diff --git a/gnu/tests/containers.scm b/gnu/tests/containers.scm index 69cd311c82..0ecc8ddb12 100644 --- a/gnu/tests/containers.scm +++ b/gnu/tests/containers.scm @@ -158,7 +158,7 @@ (define slurp (loop (+ 1 attempts)))))))) (test-equal "/sys/fs/cgroup/cgroup.subtree_control content is sound" - (list "cpu" "cpuset" "memory" "pids") + (list "cpu" "cpuset" "io" "memory" "pids") (marionette-eval `(begin (use-modules (srfi srfi-1)