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 7B2851D37; Sat, 11 Jul 2026 20:14:37 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id D013F1CBF; Sat, 11 Jul 2026 20:14: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-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by atuin.qyliss.net (Postfix) with ESMTPS id B13E61C3A for ; Sat, 11 Jul 2026 20:14:31 +0000 (UTC) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-8114a4542b2so25581377b3.1 for ; Sat, 11 Jul 2026 13:14:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783800870; x=1784405670; 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=4nub3Fc0JS4n1bOczVvc21Sqh7vlZgPwFUJ3IIlHBOc=; b=e8uQBlLCELhfQncafFKNJ/qk5vsezxO5rNRnbZuHCz9rgmcBSjkmipV94YNHyphrNR ZAnxShB39cFYvYx8tn1ehKIhfnJyldeoxeB3uNPFQUlmAXLTmldsO0gdDYuwIMYKtdle xGROB/qNBR5xNWx3/P2JE0tluBo3SrQP/58MV3qyPN1PyWfIIEU8slKagHl2dZxtv46q JPIOLyjpxdX6O9/OLp2qikBpOeJPBb58USIk+fo/Rbl6liXJ3zXWM9zdd+MWNpsE+Jlk Z8eDgCo1Jv/jhfiagLoHDIXxagFRA0TGFBgFrk9/bXdMe3vPUvnsFjUtoYy/7QD1kXSx aMBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783800870; x=1784405670; 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=4nub3Fc0JS4n1bOczVvc21Sqh7vlZgPwFUJ3IIlHBOc=; b=okquYJWAsdvtKiINK6/hOfa54MiGDM/B/zQ54heyNYCYotIKh3r1Cji8E6NitbmkQd CCYp+AeMY7SzOmIqWE/4jW5pO2krOMqez98nHxHD676A/y99LLb+/ao7azEMdWFZ1Ht4 gR363+tU3jRvFKs+UDhRtszN2mQRgu+CQ1mzPcPfGULwh3We6o8aHyjEfHB/l/iHQgiT dp5G131diaDUtHESLJKaltj4p8BgmpfL/nGIJ9Mtnd4Rar/H1l+Aqcqc4+m2E+MnKS3n JCO4czADKRsIjky7PtrMZDiBDYm6ZWjbuaPOBZu8ZB8USxpE3leWQHElszHyTaA3fBHw r5Pg== X-Gm-Message-State: AOJu0Yzj2Dj1Je/6/TxkCsghaam5j4uqHbYJDhZ63XbQo8tXqMh/Kfac ylwZp5vpAETHXHqgHXP/IfhoT72sWIbkDczjNdlzxedtACzFLi4b6Oel5ICgZQ== X-Gm-Gg: AfdE7cmgXxUV09KuRbFqlUNX170bdUiMYwF7ya+MVmm2ueFrvZd2RjcyjufOEjAaf67 kSGxJx0p29oSy1VcInXWG6L2RwDotgywQi1G7tdHCoA+f8l8fMT0IG0IcadondYWNYhhTCK4GkB Se/0RswvqhD/KwY5OQSKPOeuhNrbPwxg0+7oSXLNYYzLBoxNVLVU8b9HgS09l2bVjzo72U2iW+a /umAuCSIoIWpzxLwl/UlMbtCJj3tMli61Y3x+Bgxc8CQ8CoLx7LCDyzlFYbL5OSTF2yFKL+o0jJ yxrSEHVj85xZveao+92dkIKxOKJG47tqc3981uPaeTf/wB6nedXJG/PabKOdHXoikyAN3uV0XeZ Dnq3uVcgBhYWVgY4tDdTBo6uAQseYfnbwNnwlZ6BGZLqB4QOSgkQ894mnxaTGC9HmKLHX89djRr lQheArWz986hk+j0LTs8cIfnDiww== X-Received: by 2002:a05:690c:660f:b0:812:99ef:513e with SMTP id 00721157ae682-81e901b323bmr27654967b3.52.1783800870420; Sat, 11 Jul 2026 13:14:30 -0700 (PDT) Received: from localhost.localdomain ([185.98.168.14]) by smtp.gmail.com with UTF8SMTPSA id 00721157ae682-81e6bf80574sm77930187b3.22.2026.07.11.13.14.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jul 2026 13:14:29 -0700 (PDT) From: Demi Marie Obenour Date: Sat, 11 Jul 2026 16:12:15 -0400 Subject: [PATCH v3 11/22] 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: <20260711-cgroups-v3-11-5cba61a20cba@gmail.com> References: <20260711-cgroups-v3-0-5cba61a20cba@gmail.com> In-Reply-To: <20260711-cgroups-v3-0-5cba61a20cba@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783800724; l=2186; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=uTrBcehh0/YqHH73AMC1UyHgzeZM0qEWXMMUsJU1CZM=; b=dIF97FONsqK+nO/PQrtKVL6BhHjQm/hEI2YPHMCipXSXLIjYyWlcCnK0EDjyMv+TJDoQJ/iLG lRerrglLm/CChCYhfbAb4svjcgcYNq++r+1xU5llyEOzf/Cw+1RMpzv X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: 4KWIIIJ4GDXBWTLT3MXFX4XT5AM6XHOE X-Message-ID-Hash: 4KWIIIJ4GDXBWTLT3MXFX4XT5AM6XHOE 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 | 1 + .../etc/s6-linux-init/run-image/service/vm-services/template/run | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/host/rootfs/file-list.mk b/host/rootfs/file-list.mk index 6144ca829abe4f561b95504b9f77a893c30a37cb..2b0a254ab1be1dcd7bcaafcffdb0b8aebb5b3697 100644 --- a/host/rootfs/file-list.mk +++ b/host/rootfs/file-list.mk @@ -78,6 +78,7 @@ LINKS = \ image/etc/passwd \ image/etc/s6-linux-init/run-image/opengl-driver \ image/etc/s6-linux-init/run-image/service/serial-getty-generator/finish \ + image/etc/s6-linux-init/run-image/service/vm-services/template/finish \ image/etc/s6-linux-init/run-image/service/vmm/template/run \ image/lib \ image/sbin \ 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 120000 index 0000000000000000000000000000000000000000..9e39002e3ae4063bdef05676efb55416020cf7aa --- /dev/null +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/finish @@ -0,0 +1 @@ +/usr/bin/cgroup-setup \ No newline at end of file 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..d3a5f3490e447448929383a6b5d36dcef723712a 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