Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions srcpkgs/scx-loader/template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Template file for 'scx-loader'
pkgname=scx-loader
version=1.0.20
version=1.1.0
revision=1
archs="x86_64* aarch64*"
conf_files=/etc/scx_loader.toml
Expand All @@ -11,7 +11,7 @@ maintainer="Chloé Vulquin <code@toast.bunkerlabs.net>"
license="GPL-2.0-only"
homepage="https://github.com/sched-ext/scx-loader"
distfiles="https://github.com/sched-ext/scx-loader/archive/refs/tags/v${version}.tar.gz"
checksum=24ba8ef16504b74f7d0c0e6d5da21d3dce146ece1e6cf5ba3f6f9085c6c383b3
checksum=14f23108f95126958c4c54be9a02f0d1cc746b0e8a0e6572123cdf48f6c98100

pre_build() {
# workaround the cc-rs mixing CFLAGS for host and target.
Expand Down
106 changes: 106 additions & 0 deletions srcpkgs/scx/patches/scx_cake-musl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
From 20372b530839da46a9afbeb34dc37f8239ce6145 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Chlo=C3=A9=20Vulquin?= <code@toast.bunkerlabs.net>
Date: Mon, 13 Apr 2026 18:28:41 +0200
Subject: [PATCH] scx_cake: fix build error with musl

see also: 4503c7080acbaba6a005009b74a16a5b29e5c70c
---
scheds/rust/scx_cake/src/calibrate.rs | 60 +++++++++++++++++++++++++++
1 file changed, 60 insertions(+)

diff --git a/scheds/rust/scx_cake/src/calibrate.rs b/scheds/rust/scx_cake/src/calibrate.rs
index c2b459d92d..96c35d4687 100644
--- a/scheds/rust/scx_cake/src/calibrate.rs
+++ b/scheds/rust/scx_cake/src/calibrate.rs
@@ -84,7 +84,22 @@ fn measure_pair(cpu_a: usize, cpu_b: usize, config: &EtdConfig) -> Option<Vec<f6

// Set real-time priority to minimize preemption jitter
unsafe {
+ #[cfg(target_env = "gnu")]
let param = libc::sched_param { sched_priority: 99 };
+ #[cfg(target_env = "musl")]
+ let param = libc::sched_param {
+ sched_priority: 99,
+ sched_ss_low_priority: 0,
+ sched_ss_repl_period: libc::timespec {
+ tv_sec: 0,
+ tv_nsec: 0,
+ },
+ sched_ss_init_budget: libc::timespec {
+ tv_sec: 0,
+ tv_nsec: 0,
+ },
+ sched_ss_max_repl: 0,
+ };
libc::sched_setscheduler(0, libc::SCHED_FIFO, &param);
}

@@ -116,7 +131,22 @@ fn measure_pair(cpu_a: usize, cpu_b: usize, config: &EtdConfig) -> Option<Vec<f6

// Reset to normal priority before thread exit
unsafe {
+ #[cfg(target_env = "gnu")]
let param = libc::sched_param { sched_priority: 0 };
+ #[cfg(target_env = "musl")]
+ let param = libc::sched_param {
+ sched_priority: 0,
+ sched_ss_low_priority: 0,
+ sched_ss_repl_period: libc::timespec {
+ tv_sec: 0,
+ tv_nsec: 0,
+ },
+ sched_ss_init_budget: libc::timespec {
+ tv_sec: 0,
+ tv_nsec: 0,
+ },
+ sched_ss_max_repl: 0,
+ };
libc::sched_setscheduler(0, libc::SCHED_OTHER, &param);
}
});
@@ -130,7 +160,22 @@ fn measure_pair(cpu_a: usize, cpu_b: usize, config: &EtdConfig) -> Option<Vec<f6

// Set real-time priority to minimize preemption jitter
unsafe {
+ #[cfg(target_env = "gnu")]
let param = libc::sched_param { sched_priority: 99 };
+ #[cfg(target_env = "musl")]
+ let param = libc::sched_param {
+ sched_priority: 99,
+ sched_ss_low_priority: 0,
+ sched_ss_repl_period: libc::timespec {
+ tv_sec: 0,
+ tv_nsec: 0,
+ },
+ sched_ss_init_budget: libc::timespec {
+ tv_sec: 0,
+ tv_nsec: 0,
+ },
+ sched_ss_max_repl: 0,
+ };
libc::sched_setscheduler(0, libc::SCHED_FIFO, &param);
}

@@ -173,7 +218,22 @@ fn measure_pair(cpu_a: usize, cpu_b: usize, config: &EtdConfig) -> Option<Vec<f6

// Reset to normal priority before thread exit
unsafe {
+ #[cfg(target_env = "gnu")]
let param = libc::sched_param { sched_priority: 0 };
+ #[cfg(target_env = "musl")]
+ let param = libc::sched_param {
+ sched_priority: 0,
+ sched_ss_low_priority: 0,
+ sched_ss_repl_period: libc::timespec {
+ tv_sec: 0,
+ tv_nsec: 0,
+ },
+ sched_ss_init_budget: libc::timespec {
+ tv_sec: 0,
+ tv_nsec: 0,
+ },
+ sched_ss_max_repl: 0,
+ };
libc::sched_setscheduler(0, libc::SCHED_OTHER, &param);
}

15 changes: 11 additions & 4 deletions srcpkgs/scx/template
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
# Template file for 'scx'
pkgname=scx
version=1.0.20
version=1.1.0
revision=1
archs="x86_64* aarch64*"
build_style=cargo
# fails because it tries to read procfs dynamically
# test_thread_operations: tries to read procfs dynamically
# cpuset tests are odd on my system, I'm planning to investigate them later
# with bwrap containment even more fail
make_check_args="-- --skip test_thread_operations"
_skip_tests="test_thread_operations
test_borrowable_cpumasks_respects_cpuset
test_cpuset_parsing_from_file
test_deficit_all_cells_exceed_target
test_symmetric_pairwise_overlap_produces_equal_cells
test_to_cpulist_roundtrip"
make_check_args="-- --skip ${_skip_tests// / --skip }"
hostmakedepends="clang pkg-config elfutils-devel libseccomp-devel"
makedepends="libbpf-devel zlib-devel libzstd-devel libseccomp-devel"
short_desc="Sched_ext schedulers and tools"
maintainer="Chloé Vulquin <code@toast.bunkerlabs.net>"
license="GPL-2.0-only"
homepage="https://github.com/sched-ext/scx"
distfiles="https://github.com/sched-ext/scx/archive/refs/tags/v${version}.tar.gz"
checksum=d9c6b3230915dafe21556da28c6ef2a11f272770f12912842ae1ad23b54d963e
checksum=80ce590601780013cdd9ad44b1338475649a1b69358c65c4a8066a34efc34fc1

pre_build() {
# workaround the cc-rs mixing CFLAGS for host and target.
Expand Down