sched-ext / scx

sched_ext schedulers and tools
https://bit.ly/scx_slack
GNU General Public License v2.0
692 stars 48 forks source link

scheds: Add scx_mitosis scheduler #339

Closed dschatzberg closed 4 weeks ago

dschatzberg commented 1 month ago

scx_mitosis is a dynamic affinity scheduler which assigns cgroups to Cells and Cells to discrete sets of CPUs. The number of cells is dynamic as is the CPU assignment. BPF mostly just does vtime scheduling for each cell, tracks load, and responds to reconfiguration from userspace. Userspace makes decisions about how to assign cgroups to cells and cells to cpus.

This is not yet a complete scheduler, much of the userspace logic is a placeholder as I experiment with better logic. I also want to add richer scheduling semantics to userspace, e.g. so that cells can do more "soft-affinity" rather than the strict partitioning implemented currently.

sirlucjan commented 4 weeks ago
==> Entering fakeroot environment...
==> Starting package()...
ninja: Entering directory `/home/lucjan/Pobrane/src/scx/build'
[10/10] Generating scheds/rust/rust_scheds with a custom command
Installing scheds/c/scx_simple to /home/lucjan/Pobrane/pkg/scx-scheds-git/usr/bin
Installing scheds/c/scx_qmap to /home/lucjan/Pobrane/pkg/scx-scheds-git/usr/bin
Installing scheds/c/scx_central to /home/lucjan/Pobrane/pkg/scx-scheds-git/usr/bin
Installing scheds/c/scx_pair to /home/lucjan/Pobrane/pkg/scx-scheds-git/usr/bin
Installing scheds/c/scx_flatcg to /home/lucjan/Pobrane/pkg/scx-scheds-git/usr/bin
Installing scheds/c/scx_userland to /home/lucjan/Pobrane/pkg/scx-scheds-git/usr/bin
Installing scheds/c/scx_nest to /home/lucjan/Pobrane/pkg/scx-scheds-git/usr/bin
Installing /home/lucjan/Pobrane/src/scx/services/systemd/scx.service to /home/lucjan/Pobrane/pkg/scx-scheds-git/usr/lib/systemd/system
Installing /home/lucjan/Pobrane/src/scx/services/systemd/journald@sched-ext.conf to /home/lucjan/Pobrane/pkg/scx-scheds-git/etc/systemd
Installing /home/lucjan/Pobrane/src/scx/services/systemd/../scx to /home/lucjan/Pobrane/pkg/scx-scheds-git/etc/default
Installing /home/lucjan/Pobrane/src/scx/libalpm/systemd/scx-systemd-restart to /home/lucjan/Pobrane/pkg/scx-scheds-git/usr/share/libalpm/scripts
Installing /home/lucjan/Pobrane/src/scx/libalpm/systemd/90-scx-scheds-upgrade.hook to /home/lucjan/Pobrane/pkg/scx-scheds-git/usr/share/libalpm/hooks
Running custom install script '/home/lucjan/Pobrane/src/scx/meson-scripts/install_rust_user_scheds'
ls: cannot access '/home/lucjan/Pobrane/src/scx/build/scheds/rust/scx_mitosis/*/scx_mitosis': No such file or directory
FAILED: install script '/home/lucjan/Pobrane/src/scx/meson-scripts/install_rust_user_scheds' failed with exit code 2.

I wanted to test it and give some feedback, but unfortunately I am not able to package it for Arch Linux

dschatzberg commented 4 weeks ago

@sirlucjan I'll take a look at the install failure, but right now this scheduler is not really in a condition to be tested, I'm missing a lot of performance optimizations and need to do some more rigorous correctness testing.

dschatzberg commented 4 weeks ago

I'm going to merge this now and iterate in-tree