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 7CE0A93CF; Thu, 06 Aug 2026 01:20:22 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 4ACF59427; Thu, 06 Aug 2026 01:20:19 +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-xb12f.google.com (mail-yx1-xb12f.google.com [IPv6:2607:f8b0:4864:20::b12f]) by atuin.qyliss.net (Postfix) with ESMTPS id B8CD6937A for ; Thu, 06 Aug 2026 01:20:17 +0000 (UTC) Received: by mail-yx1-xb12f.google.com with SMTP id 956f58d0204a3-668432fe416so2336292d50.0 for ; Wed, 05 Aug 2026 18:20:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785979216; x=1786584016; 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=rEm+m0BujtDt1uBav3yZDZT0FQOb7tQjtydZMWu6okZWMsirFNXS1hToO74i7BtRcE sl8lCndDzRRmfU653M8SgbqT53KUC3zd3485IKPPS3AW87fJJ8KC1gLNAf62aBsqDJnY dU5f/Ib+nIfAIst+LptKgMlYcfRb/9mBxum3MDnZdUtNFqsS+5OdOk/5uHMvyebnHMjl K0Cm4aDYsDtijyorTkITk2Ls84+7yPrf6U4KinvbtsbcWezW4LZ38lb50+7B36v0ivPf BpaHXtSjYwmbtBdzKaIDDngnTNSiwVWFYjiW84g9yLk+XHNNQVlRMbfe7ov0Ffdu/sjE E/qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785979216; x=1786584016; 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=sjLjknWqMf/f1BmtZhI3+22LGIjMCc0hnDaCPMlLTw9UAm2xtu8xjYU573AfWVa30G 9353X6rZexKIFPdjtd4sOmxl6oS41v3Gx/+Jog9PZZ1+kD4aFU0BNAA+BMSCzN1z3Sia MJZ9Y7AHGFejlnfEcPzYaQ2geJK0Piwi0b2HL21vNjg5EKv+ovi1BRsdPE9f0NxeVgYc Lneum/EG5Dn/UVSBJeq6PP1Qma18XOTxT7uWZ0VuZHqpIcRRppJmNPk5S/zmATiQy2lm Z80U+irMHjDKP/uCaMQpEDSRMuLhnbCgpcHhFqhZr6DE4AcGLMwIpcmsGBd9WWJapaCO S8sg== X-Gm-Message-State: AOJu0YyWyFGo/uWgea5KziAPh3drb/ThkICMFCWRbgp6eRBjj0LOB6DJ 0shhP5tEsSKSlonO1l4WYLa7CBn1SO5qkHXDfaMGKBp3A9Obz6sKfouMsxAHMg== X-Gm-Gg: AR+sD12u6EmFhpA5Jvcv4/yjq5bBC4a8AUsZIU4nQJ08l0+2slS6W74qYk3t/a60SU8 y5H6Fdd9p0L75G6tgyXWAttOKYlhny6WSQbTQYJ64BMYsVmDc19ldDHm270+HIMm4/ADPgkiw0U Tcc4lTGvtba3sjhY8SsC7k3sDdzdDu9/T4s+ITHCPaJBo+H0MEOi+ROWYopRMT3H8ag3dptrWKq MxnukyVdvgRi7k+U/hYicaFeeuyONI1W5j985TyGNwwgtj9vC5u/YTEKlpcSTcYGXI1IAVSgHjC sYstS4TMNxEwmcn0xwv0cfCLJhj0D71tlAfwu1R5ihl1Qd5Bdc+k6uMf4aF/JsHevHk5HNz4ETN 6Kz21S3tpbhGkEiV7I7cnmJNifdc/3RqtK7cB+yvdcR4OUTyQy6x5KV/UkgpUm4wmyDIy/3FyMi VeKmVMNl8lF8dvw6cC5RSrxCsOZAI+YUh5dyHoIMaUipjCuQGKqzu2MbjOGqFkFX5jsXVNkgnEd Q== X-Received: by 2002:a53:b20e:0:b0:669:2f26:3828 with SMTP id 956f58d0204a3-6699aa3e7bdmr5519901d50.8.1785979216476; Wed, 05 Aug 2026 18:20:16 -0700 (PDT) Received: from localhost.localdomain ([185.98.168.14]) by smtp.gmail.com with UTF8SMTPSA id 956f58d0204a3-6699136a3d5sm4147079d50.1.2026.08.05.18.20.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2026 18:20:15 -0700 (PDT) From: Demi Marie Obenour Date: Wed, 05 Aug 2026 21:16:18 -0400 Subject: [PATCH v6 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: <20260805-cgroups-v6-11-086c0f00f55f@gmail.com> References: <20260805-cgroups-v6-0-086c0f00f55f@gmail.com> In-Reply-To: <20260805-cgroups-v6-0-086c0f00f55f@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1785978967; l=2652; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=9jpCM+NUHrO9osGpuXi0SMo/LXy8TXrSzzWTbC0Gb44=; b=G+Tf1qn7PkzDljDD1ZX6Bl/C36t45GZ8ZTTBxNGrSmFo37GG2bn18Ub8qm7t12FCurF98+cBf M5+0v8WiYO2AJfli8nqc7CuOKKF2vxpgn+JACKGyh2Z96qGuKtreRhc X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: 7CUBGBKJG7D62YMEZ2DBL5E3ASM7E2W3 X-Message-ID-Hash: 7CUBGBKJG7D62YMEZ2DBL5E3ASM7E2W3 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