Compiler-Assisted Operating-System Scheduler for Simultaneous Multithreading
Abstract
Simultaneous multithreading (SMT) improves physical-core throughput by allowing multiple hardware threads to share an out-of-order backend, but its benefit depends strongly on which tasks are paired on sibling hardware threads. Existing OS schedulers are topology-aware, yet they lack task-specific microarchitectural information such as pipeline bottlenecks and backend execution-resource pressure, so SMT pairing can create avoidable contention and run-to-run performance variation. This paper presents Kuki, a compiler-assisted operating-system scheduler for SMT co-runner selection. Kuki represents each task entry with a compiler-generated resource signature, emits the signatures as binary metadata, and uses a sched_ext-based eBPF scheduler to choose low-contention sibling pairs on the wakeup path. Kuki preserves the existing scheduler’s fairness, load-balancing, and topology-aware placement policies, and optional offline PMU calibration can refine the same metadata. On Intel Coffee Lake-H, Intel Comet Lake, and AMD Zen 5 running SPEC CPU 2017 speed workloads, the profiling-free compile-only configuration improves throughput on the Intel platforms and in the isolated Zen 5 SMT setting. With optional PMU calibration, Kuki achieves speedups of up to 1.157× over Linux EEVDF in single-core mode and 1.121× in multi-core mode, while reducing pairing-induced variation. Its runtime overhead is only 11.8,ms (0.002%) for a roughly 600,s run and 0.10% for the 30,000 thread suite.