sched-ext / scx

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

scx_rusty: Make load balancing decision executed reliably #611

Open htejun opened 1 month ago

htejun commented 1 month ago

Right now, after the userland loadbalancer makes migration decisions (move task X to domain N), the decision is recorded in the lb_data map which is a map from pid_t to destination domain number. Then, on the enqueue path, rusty_enqueue() checks whether the task has a matching entry in lb_data and if so executes the requested migration. This means that the application of LB decisions isn't reliable - it depends on the task being migrated running in the following period. Otherwise, the decision is ignored.

While this works okay in practice as the LB just keep retrying until the domains are balanced, this makes the behavior less predictable. It'd be great to make the load balancing decisions executed reliably. Maybe test_run can be used to execute migrations immediately - see set_power_profile() in scx_lavd for an example.

vax-r commented 1 week ago

Is it still available ? If so I would love to help