Posted as a request for comments this week were the initial Linux kernel patches for the Hierarchical Constant Bandwidth Server (HCBS).
The Hierarchical Constant Bandwidth Server aims to replace the Linux kernel’s existing RT_GROUP_SCHED implementation for group scheduling for real-time SCHED_RR/FIFO needs in explicity allocating CPU bandwidth to task groups.
Yuri Andriaccio who posted the RFC patches for HCBS explained of the work:
“This is the first set of patches that implements Hierarchical RT scheduling, aimed at replacing the current RT_GROUP_SCHED implementation with something more robust and theoretically sound.
…
The patchset allows to create bandwidth reservations for cgroups which run SCHED_FIFO/SCHED_RR tasks. Whenever a cgroup is created, N cgroup’s local runqueues and N dl_servers are allocated, one for each CPU. The local runqueues emulate standard scheduling for the FIFO/RR classes, as rt.c code is reused on these local runqueues without excessive modifications. Through the cgroup’s virtual files it is possible to setup the cgroup’s reservation. The dl_servers are started only when there are active tasks, and invoke the RT clasess’ scheduler when they are deemed runnable.”
This Hierarchical RT scheduling does support cgroups v2. Among the features not yet implemented are HCBS with task migration and being able to support different run times per CPU or capacity-aware bandwidth reservation.
Those wanting to learn more about HCBS can see this RFC patch series for all the details.