Speaker
Description
All sched_ext schedulers currently use kfuncs to manage their idle cpumask using a hardcoded policy provided by the kernel. This lack of configurability of the current cpumask requires us to add policy through explicit masking operations directly in the scheduler code. This in turn leads to duplicating idle CPU selection logic across schedulers as it is difficult to factor it out.
This session discusses a new BPF-based subsystem for idle CPU mask selection. This subsystem abstracts the representation of the idle CPU set behind a common API that exposes explicit alternative policies to the user. The API is portable between schedulers and requires little code to adopt. Internally, the subsystem stores idle CPU information in arena-based data structures. Different structures (e.g., radix trees) provide different performance/scalability tradeoffs and can be tailored to different idle CPU selection policies.
Topics for this session:
- Overview of the idle CPU selection subsystem
- Data structures for representing the idle CPU set, tradeoffs for each
- Representing policy in a flexible, extensible fashion through the idle selection API
- Using alternative CPU selection strategies as part of load balancing