From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 8EC3054E6; Fri, 21 Aug 2026 06:54:04 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id D4AB554CA; Fri, 21 Aug 2026 06:54:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_PASS,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by atuin.qyliss.net (Postfix) with ESMTPS id B507F54C5 for ; Fri, 21 Aug 2026 06:54:01 +0000 (UTC) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-81dfdbd86d1so10191647b3.1 for ; Thu, 20 Aug 2026 23:54:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787295240; x=1787900040; darn=spectrum-os.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=jyXKdNjC4PPKvj1d0BWldbb2E4KiQ3LNGLjuWDZLh1A=; b=ReJzX+muL3lqsp+Uu6FHtc/nqbJL9hF2xZVKoSAqTyP8hkTFf72KCqnyxz3cEfagar UrACN3N8zavIc2SHcSHp33FmFDhTD4R3KRMpO7OAcINjy6l74QgTxay7mi1W2VgCq0bd EydU1cqUa3msaqkDj97Z0mv5g1Va09q0WLQ6AXcoFV18ohVU0LSah+D4hOkAgPRl6tZB JVFK1vR9MfMWKECt3W9oPX3+LZVkzO59SH1E9IVl6nk5bzhVYZpg/z8hNIfnLGEdGwDm LcoGmpnOLhv/JoqkvjIvYi9sLLYDnUbs6zOVW9zCGXA7VLN7FAD4rpBJkC4zgvz1Ymx6 rBog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787295240; x=1787900040; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=jyXKdNjC4PPKvj1d0BWldbb2E4KiQ3LNGLjuWDZLh1A=; b=a0ba2zbiWlsw1798w6KD6JuEyfW/AISnjK8VNMYZyR0M88cX4YK7rlyUK8tHO/9ffp 4n2HNWpdpe/ArO0cM8OeAreYw+NW4caKAhw1BB2aCK6zhRmRtASEXolqTf4LrSyqSX04 nTIo2hV2G56n3JuhLs/2rmIsAU1EaLgvI/UU0nzy81u2gVs97iWUb+XgyvhKXb078PKN EWXwD195xzaafxSI8Sn4cNTnEsyy8l7+2CPgss3tQfsjTc/v1A6cPqbI92Akz2KJ0TYU jx2Ftd9dg8fUvDAGM4BPvXqnCfRRsVpZtnfb9UoQilxepgltowIeup4lTkRv3eaJmHGC K2Hg== X-Gm-Message-State: AFuF++m+CVaJcRALLEcivpZn3XCcH0nIQ9rUS8E9iqJrIE6VgTiQTIv3 l0YW/zNkiKeqoTsRs3BKqFvS7M8el/H15dzuSMPPEZZb4ECQXrW2oxl5q3ERT7FI X-Gm-Gg: AR+sD11PnF9AiQv5ULbDOU9b8PJbrcE+SdDP4gKwj8CbuBwG9v5pxR+Stavc+EA+V45 DIJ8bzA5J0CdvRGZ9Lh6/YYyDbtjeuFsZeq5O8Synmz+qUnYzhO1vFwCWIucoY/GNVQP14Vs+C4 +jj8HvSgzI0Bob5/Rxz2ySudm2m155o3r341xls5GT+OYLo5rhURk02KHvkAN6KG0GGdCKP1oM8 98SZdFWrYrLqjD5fVaAQQrkRwM5hhl9OF+Hr6OB7gc/YoZKs1/M4uDn97FBvukAT6vOTM5tvwAx YtAYLpovdrUP+lkLYh+8v4K5T4Qi32kvEw3JtCvM9tqx8M1cQXTz/KecfCGThAExFiHEG6C/IcB /am0MArrc5w+PnPOGmK0amrTXCe7s+G7qQ8xvrv+ZYFBbie4sDbA5g5S4CxKAOk5o2GsdhXVWsw 4PbNLvlaSyyj53W1EkpCpKttQbNoQkx0+g5aTORnhfQB1eHWJDpO4LRSAGXhPpKScvWGOR5X77+ l1jhbHwhbw3 X-Received: by 2002:a05:690c:63ca:b0:80e:5236:b944 with SMTP id 00721157ae682-849f2a39745mr15112137b3.10.1787295240077; Thu, 20 Aug 2026 23:54:00 -0700 (PDT) Received: from localhost.localdomain ([185.98.168.14]) by smtp.gmail.com with UTF8SMTPSA id 00721157ae682-84511abc117sm35653997b3.3.2026.08.20.23.53.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2026 23:53:58 -0700 (PDT) From: Demi Marie Obenour Date: Fri, 21 Aug 2026 02:51:54 -0400 Subject: [PATCH v7 11/19] host/rootfs: Create per-VM cgroup for all of the VM's services MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260821-cgroups-v7-11-7f1870dedefc@gmail.com> References: <20260821-cgroups-v7-0-7f1870dedefc@gmail.com> In-Reply-To: <20260821-cgroups-v7-0-7f1870dedefc@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1787295104; l=2652; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=9jpCM+NUHrO9osGpuXi0SMo/LXy8TXrSzzWTbC0Gb44=; b=t1ZH6FVfLb4Qwufj9sS9M09V90BLqonFzzXR/dTxXAgjNCcPaUDnrDEujqqVQ2yAQCPxHxCIc hfL5i86dVyhABlvxh6CIiqjYczWYrbBk/iNiBbwWuQW1QQC+Ht7Tcf1 X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: 6BAIOTGGTJYUX5E5O4JUV7LTCNWMAGHF X-Message-ID-Hash: 6BAIOTGGTJYUX5E5O4JUV7LTCNWMAGHF X-MailFrom: demiobenour@gmail.com X-Mailman-Rule-Hits: member-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; emergency CC: Demi Marie Obenour , Alyssa Ross X-Mailman-Version: 3.3.10 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Demi Marie Obenour --- host/rootfs/file-list.mk | 1 + .../etc/s6-linux-init/run-image/service/vm-services/template/finish | 5 +++++ .../etc/s6-linux-init/run-image/service/vm-services/template/run | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/host/rootfs/file-list.mk b/host/rootfs/file-list.mk index 2b76b31dad7f73dd83c6a24f94f3ed946988bbea..36f508962c0515b2132aa9ab30cde929e2de100e 100644 --- a/host/rootfs/file-list.mk +++ b/host/rootfs/file-list.mk @@ -39,6 +39,7 @@ FILES = \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/xdg-desktop-portal-spectrum-host/notification-fd \ image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/xdg-desktop-portal-spectrum-host/run \ + image/etc/s6-linux-init/run-image/service/vm-services/template/finish \ image/etc/s6-linux-init/run-image/service/vm-services/template/notification-fd \ image/etc/s6-linux-init/run-image/service/vm-services/template/run \ image/etc/s6-linux-init/run-image/service/vmm/notification-fd \ diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/finish b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/finish new file mode 100755 index 0000000000000000000000000000000000000000..4448c811de5d382347b470afa07f7c90b0b08acc --- /dev/null +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/finish @@ -0,0 +1,5 @@ +#!/usr/bin/execlineb -WS3 +# SPDX-FileCopyrightText: 2026 Demi Marie Obenour +# SPDX-License-Identifier: EUPL-1.2+ + +cgroup-purge /vm-services.slice/vm-${3}.slice diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/run b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/run index bf90e99eef4106a9ad17dfba310b6edb3eaa64a3..7b1f20d6ffe826f92806c601572a11bac3fc5fca 100755 --- a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/run +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/run @@ -2,6 +2,10 @@ # SPDX-License-Identifier: EUPL-1.2+ # SPDX-FileCopyrightText: 2025 Alyssa Ross +# Move into the cgroup with all per-VM services +# Do not wait for the existing processes in the slice to finish. +cgroup-setup --no-wait /vm-services.slice/vm-${1}.slice + export VM $1 s6-svscan -d3 data/service -- 2.55.0