Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796134335; b=sdyCDsUO7z99Lg4z5/+J+6TcomlYQcvtpB9mlVmdUNPYkFb7KhYEXainFlqRzsF9Xw+G eea9CHlDBVdIDucwgkFWZeja6Jx5ssScbAuaezhbJ4Rk9r95hS90czUWclu095Uz7fe5M pfETTqhxW9uGYS8C4lLMJpbllyZLOX+fttwCu/MPu0Fxr3PADgP9QVQUgRE9YKi4bMAHY 7GM3EBDXgImCTKvOUs3wvc+6D3g9g5adcxClJ8c8+G6HyAqv7EJvEiDJBLLU4C3NxLKif iJCqmL8BLMT8F53Mr5zYqqH29J/0sQenohQyeXMeI+wCX9MR0gO3+uiE5e8gtJXS6Kw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796134335; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding; bh=jrvqwPKrotnusXBfa4gaXWCA9se4SFbvKaQx2HZsL0k=; b=1mbt7x4GcPwNQlqMxD710cD1DprYR3ioO7PZEgVyg91ZCNh8t0LdJQ7nb2UAiHlb12pl th6loeC0NKtlEEWBSD7rwMvoWLcLTASUEI63UKu22GmeGgYDR1qhfRZ7NXmodDDwzn47s bdKCkF/L1V+EZVcKdxASPAvAulVxNu1toDy5/ps3KQUGCyzrNvOggDOCSbuOoS8fhvfzp BDqBdlwjPgGH1zXb2j50CPe3O26LXCtlz3JCpqRSgJ/uLawJ9Bp9hzVznJzNpyvaRLZL+ XRhwPsvoL4LtROK1jKy/A9Y9vSiC6sy3KLGjqRzjJ7nuZ9Qtqbr400aThb8nWlDdsjw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MGVx00bz; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DCF2606A31A for ; Tue, 1 Dec 2026 14:12:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MGVx00bz Received: by smtp.kernel.org (Postfix) with ESMTPSA id E82861F0089F; Tue, 1 Dec 2026 14:12:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796134334; bh=jrvqwPKrotnusXBfa4gaXWCA9se4SFbvKaQx2HZsL0k=; h=From:To:Cc:Subject:Date; b=MGVx00bzO7NCyHd7XcCNnE1plpLZXoqG8EvZgzFi5UREXCVb5lHeKpZCZMjc7+Ly8 8u93FceWVZxBnt8tAmTPNn0iRCS5Kmia6bOnf3uzjS/kJctHUwgLiuza4TdqcBFDjk QqbSRfUDH1FB/zWzZEYcSCqsdJOj8rAExv0P4JjAmE/WbkGlbhVDXcbOIWZUSq4G+F BwkIn4vBtNRFMN0hJdX5W/2BgpepIXY5F1WV3SzEVjXX/689Ip84j7vQemNTfKlj12 4Hi9HylNrPS3qV9XHPcxg/hTPVB8omqXTTK2zOzBuo84Rh61nlK5IL5x6EbP+wofZn 3TP5m1nP4wZEw== From: "Richard Weinberger (sigma star gmbh)" To: xenomai@lists.linux.dev Cc: upstream+xenomai@sigma-star.at, Richard Weinberger Subject: [RFC PATCH 0/5] RT throttling Date: Tue, 1 Dec 2026 15:12:02 +0100 Message-ID: <20261201141207.2876277-1-rw@kernel.org> X-Mailer: git-send-email 2.55.0 X-Mailing-List: xenomai@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Richard Weinberger This patch series implements an RT throttle like Linux has. It allows limiting the total CPU time used by Cobalt threads, if the limit is reached, Linux gets the CPU. That way, misbehaving applications won't kill the system and will only get throttled instead of killed by the Xenomai runaway thread detection. The main reason I need this feature is because for a rather specific use case, I need to limit the total available CPU time for all userspace, so Xenomai plus Linux. I'm curious to read how much you'll hate this. ;-) Thanks, //richard Richard Weinberger (5): cobalt/trace: add cobalt_sched_throttle tracepoint cobalt/sched: add RT throttling cobalt/sched-sporadic: stop budget accounting on RT throttling cobalt/sched-quota: charge the running group on RT throttling testsuite/smokey: add sched-throttle test configure.ac | 1 + doc/asciidoc/README.INSTALL.adoc | 12 + include/cobalt/kernel/sched-throttle.h | 92 ++++++ include/cobalt/kernel/sched.h | 25 +- kernel/cobalt/Kconfig | 26 ++ kernel/cobalt/Makefile | 1 + kernel/cobalt/sched-quota.c | 39 ++- kernel/cobalt/sched-sporadic.c | 7 + kernel/cobalt/sched-throttle.c | 266 ++++++++++++++++++ kernel/cobalt/sched.c | 31 +- kernel/cobalt/trace/cobalt-core.h | 17 ++ testsuite/smokey/Makefile.am | 2 + testsuite/smokey/sched-throttle/Makefile.am | 8 + .../smokey/sched-throttle/sched-throttle.c | 251 +++++++++++++++++ 14 files changed, 763 insertions(+), 15 deletions(-) create mode 100644 include/cobalt/kernel/sched-throttle.h create mode 100644 kernel/cobalt/sched-throttle.c create mode 100644 testsuite/smokey/sched-throttle/Makefile.am create mode 100644 testsuite/smokey/sched-throttle/sched-throttle.c -- 2.56.1