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 BA78767EE; Wed, 22 Jul 2026 02:17:12 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 28F8A67A8; Wed, 22 Jul 2026 02:17:10 +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-xb134.google.com (mail-yx1-xb134.google.com [IPv6:2607:f8b0:4864:20::b134]) by atuin.qyliss.net (Postfix) with ESMTPS id B49C6678D for ; Wed, 22 Jul 2026 02:17:08 +0000 (UTC) Received: by mail-yx1-xb134.google.com with SMTP id 956f58d0204a3-6679d88abdcso8619864d50.2 for ; Tue, 21 Jul 2026 19:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784686627; x=1785291427; 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=TsN/JwwVvVhduSCw06afbIRYTrBPvY5bmV/eul38X3U=; b=hu3mAP1hSQ95Iy9h8eBqp58NJp1wmXbBYuqgLsGIi2bicSP1iNFI/XOl80zfZO36Pa HE2kKFI40wV700NFLhyUPhLoetHAe8fopzVedj9G8WnM3wld0LEllpkQv3fudGY0fiuu MD9GPiizYezTrw7wfvOt3Hyj9pAGxjFWeudiNzdY9NBFozozOFQF3nkDBVk5AByZVEEs mghIfrTKakose3GFsj03KWHNBLUP0qXhRjSe9gJ5dZyxLlGiJpiQ2N/khje1Kqx4Q02Z BFCdMmemIBVo1znbQraWbJwed+DDInLLy08Shn7WZLvucxZjXvUBO+iZQ+VfSLxWWrDU ifOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784686627; x=1785291427; 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=TsN/JwwVvVhduSCw06afbIRYTrBPvY5bmV/eul38X3U=; b=cRxqv2H5S26893WRWm0e27t7wqCE+SXnSw5hXvwjEBYdvQXjPbnYtMu3BfR9Cy7LTL xCfJ3vOsIoh3BaU6TG62J5rUtzZlqEWMjVEYY4fuVoMsOuEiMLby5/egqAwiLbYrXHww 0MraeOUP/S3gZsi2kpcg50e7dKROmwnVoPHsSqzbTW03b8iznRKwFFw020L/bMhUv2WC tQSsE43yLvevfNKSlZArRbJHHUqp6qpfm+n0Ms1Ba2nF9UQECSnx5dsx6OiafD0BMuXP UcVxvy4tgf3oAvumhbYnBbAAxtPi7MfqTZxnPJRHUBuABAp3hT/BMCR2FMft+RXw9BR1 wBOg== X-Gm-Message-State: AOJu0Yx6SoxSigcf+En9Ra7TARPDd1Gz8tW4sj7sLFCSxVTKkeQI6AGr eO8NAE6EBY0TW9QVikaf69u8d9xAiwX5hGeDEVnZ/+q2X0NBpuzd44juwRo0xQ== X-Gm-Gg: AR+sD10/aI9uEmiuRDA4kh4JXlBoIVX+Pnlxt/am8IbaxKaamsWfaoxAwj2mCwtNcQ3 hClGDE5ULp5SCYYogn1scFFSoT54IaQXEPY1gp/6Or2w6EWSJvo0oIi106dNkZTObXB5G1CgM4/ mihqT7GVHACQGJ6XCQV4YQGVs0oV3xIX9my7VisfHJvTximwmr7T1AyGX4DiAuB6WD9wRNREr6f y/SUzFg5b6wcOSXzeNjnghFufBA2h0up64YsUcV+fYv2L3J+uYlNqyzaF0cF01j7hA4Uzxch5Q5 8ouHeb4nlS3e5wubdOScrN46rV3oHEotgkrZbDS2f0beZps6ICAFbmtRCLurJTSMQS1KSgq1/yl SZ3zt/FVd+tCjX4eqIvXHA/7rZkkV/oqb1xw1v/5nDL0ExFe6iDBZeFM8vSvM2BWl8tMcEUG4A7 P0lbU8wnkVqukmf96oKreBFM129g== X-Received: by 2002:a05:690e:4513:10b0:664:ae6a:f06 with SMTP id 956f58d0204a3-6683bda2c5bmr4253621d50.80.1784686627135; Tue, 21 Jul 2026 19:17:07 -0700 (PDT) Received: from localhost.localdomain ([185.98.168.14]) by smtp.gmail.com with UTF8SMTPSA id 956f58d0204a3-6689071c1ffsm565127d50.16.2026.07.21.19.17.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2026 19:17:06 -0700 (PDT) From: Demi Marie Obenour Date: Tue, 21 Jul 2026 21:59:15 -0400 Subject: [PATCH v4 10/20] 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: <20260721-cgroups-v4-10-46b2e5fff7b6@gmail.com> References: <20260721-cgroups-v4-0-46b2e5fff7b6@gmail.com> In-Reply-To: <20260721-cgroups-v4-0-46b2e5fff7b6@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784685545; l=2629; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=4DorNNEVfZoaj8JbqqalU1t2JNzUsPT/vh4DdIADNd8=; b=B36iUhLS0CgIovm23LCHeV0BITdh0NaYu817MMzWO5SNSJ6n3eTsmG441leJEBuB6AFbGF8fW tr/0K9CoOTBCc71Y+BEXL3b5usfNAreOY3/rFiuHndYjKYhJt0QN85m X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: PZ6ACDMHGM2XRN24FB24EO5VRDRMECZJ X-Message-ID-Hash: PZ6ACDMHGM2XRN24FB24EO5VRDRMECZJ 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 b899b4356d73d73ad0fc4ecd3837b7a3525d6f5a..498c699c459515c1c7b6139aa07a89fd904509b3 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..4d5b454e97c3584d0644c2d738514f13b1c53957 --- /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-License-Identifier: EUPL-1.2+ +# SPDX-FileCopyrightText: 2026 Demi Marie Obenour + +cgroup-s6-finish $@ 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