<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Struct_ops on Shai Asher</title><link>https://slow-is-smooth.io/tags/struct_ops/</link><description>Recent content in Struct_ops on Shai Asher</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 15 Dec 2024 09:00:00 +0200</lastBuildDate><atom:link href="https://slow-is-smooth.io/tags/struct_ops/index.xml" rel="self" type="application/rss+xml"/><item><title>A CPU Scheduler Written in BPF</title><link>https://slow-is-smooth.io/blog/a-cpu-scheduler-written-in-bpf/</link><pubDate>Sun, 15 Dec 2024 09:00:00 +0200</pubDate><guid>https://slow-is-smooth.io/blog/a-cpu-scheduler-written-in-bpf/</guid><description>&lt;p&gt;On Linux 6.12, a scheduler of 156 lines of C, compiled to BPF, took over every ordinary task on an&#10;eight-CPU machine without a reboot, and one kill signal to its loader handed them all straight back. A&#10;36-line scheduler that deliberately never ran one shell script was thrown out by the kernel&amp;rsquo;s own&#10;watchdog after 5.02 seconds, and the script carried on as if nothing had happened. Measured against&#10;the kernel&amp;rsquo;s default scheduler, the simple one kept up on throughput and lost a hundredfold on&#10;wakeup latency under load: 15.7 milliseconds at the 99th percentile, against 165 microseconds.&lt;/p&gt;</description></item></channel></rss>