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 AFFA2A4F0; Sun, 30 Aug 2026 06:45:34 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 785D7A4CB; Sun, 30 Aug 2026 06:45:32 +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-yx1-xb133.google.com (mail-yx1-xb133.google.com [IPv6:2607:f8b0:4864:20::b133]) by atuin.qyliss.net (Postfix) with ESMTPS id 95127A4BA for ; Sun, 30 Aug 2026 06:45:31 +0000 (UTC) Received: by mail-yx1-xb133.google.com with SMTP id 956f58d0204a3-66c7e3a2332so2251721d50.2 for ; Sat, 29 Aug 2026 23:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788072330; x=1788677130; 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=lJzRICCUcrt9wXg9zlABc4vdhYmcflELZxW+1ykvvcj+IrwAMZM8kG2hrFjjaO82Kw 7sIO4zAt3d0i8MGwwHN/iueZySeBueJrdBzLG9yI98SRHDBYPRn29/XveUwvcc5plixm p2q0GKFgPuTY60KYlM79BaIyGpGSkmaCQ3t601d6NnZbTY+ehYRmaXIrphYNqtQUYEaj JamogsPaacufwvXW5h+CIbV4Y3g68fAPLSdVgE4gn93gB0Nr0F9XY31GC07ab9X8XAOH mIy3MlQvBOoKia/loH+C0qjm4flWfdQudfBlduRdKUE6U86Sql/DHHD/BuGFYFI5uaqN vNOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788072330; x=1788677130; 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=DJvvH7XqLJJ8NeKiNbgmnEynEqS93iidOpB0UM+u78jgQPn1pW63qMm/muFWJnln4n cUUcdJxAuWgzTJCG++uNC4ykGlILNhDyP8byBIauuljqzLdYSDNjt4Va+vXy3wTjtne0 zaRMKF6ZrrlesyrnbzZ5tO/0NlFVMYJvEb4pUkn8QyynxUtKUGcrueq06Fo+w4ZQn35C nekjf9rBIq7Eb4DrVI8weYJNliS/LlB067hFgLNhTYvF+24JaVhCfPK35DDwPYpcrIDc ndQPcbwk5Gw7/aWYt0hcE0qOBIwKN+a6IK8HYRNXp+lZDOpaaQaOIrU7dJSOou3Bb5sh zotQ== X-Gm-Message-State: AFuF++nGGasS5//7kpu1SoWPlFBoT1BVFFx5okAjjiPUbLiOwKG28r9i P7/3kMm4JxsFGWGP+NqGz5iZLg0ap01reJ6+b1jIwpMQN3JSuQ1eZqYtOThDtQ== X-Gm-Gg: AYBFou1KCPMOH1HcdBDcVKWIMWinwzcohusiN+BgH9qpbCaTOs09kihBcb6PfQn6Szz EAQ+runHZC8kMfp+UM5pb04LNzMUTxswmwyMe66cgf49DpCu23b3+Ii4Vvrf4VVoAMmkwcMth4c noiUxTe3gxzxIazFJCTb3tqB454cF64SGGlusHhc5NyFi9YTcEybpPDJ9v5GHoyTC0URkTMbYZi qIcOhI4hVDDXciymuGtYJ1Txhn296a3vz9U8LPmwjdiXKVo9K0R2Nk/GSiLvwI+lGBR399Z9fdu pqnmsue1cuSCmTnq/3VUQwOUW3pRCXymm5B4Z8XxQG+ekJNS/9VzPXcQHmlMqR7GrpCzh4VrpiA 0oGIeZ++xhYhl+luaLUhQ76hYIrxjUYVGuU/12lmq4zJU2Rux+LW1lqkA0IkpKEyztskEyPbQcM mxoPadUMwzXpt3LdfQF4D4G/LCiLXggTh+ZM0Vd8WjVsFjPnb1wzFGe0GTEE7xsy3wWkGaqrSFd iY= X-Received: by 2002:a53:e049:0:b0:66c:e9fb:d09a with SMTP id 956f58d0204a3-66e4c731ac4mr4435385d50.25.1788072330328; Sat, 29 Aug 2026 23:45:30 -0700 (PDT) Received: from localhost.localdomain ([185.98.168.14]) by smtp.gmail.com with UTF8SMTPSA id 956f58d0204a3-66e4eb3de46sm3666660d50.3.2026.08.29.23.45.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Aug 2026 23:45:28 -0700 (PDT) From: Demi Marie Obenour Date: Sun, 30 Aug 2026 02:06:44 -0400 Subject: [PATCH v8 10/18] 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: <20260830-cgroups-v8-10-239b09ba7013@gmail.com> References: <20260830-cgroups-v8-0-239b09ba7013@gmail.com> In-Reply-To: <20260830-cgroups-v8-0-239b09ba7013@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1788069995; l=2652; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=9jpCM+NUHrO9osGpuXi0SMo/LXy8TXrSzzWTbC0Gb44=; b=nKuGeVvWtCwlgOddQdDLBas/OzZr7T50Dy1/moIzn9an8Xluu9NkdZfWzQWqmBgbFks2dXJxZ qwcvMGHVgpgBlWrCzyeGnB3Ia0CZ8shPKwaBSJDdePuZWeWTPYAt5tH X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: 53KLI5CNKESYPVGT5DEXRSUUQGOF4IH2 X-Message-ID-Hash: 53KLI5CNKESYPVGT5DEXRSUUQGOF4IH2 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