sched-ext / scx

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

scx_lavd: optimization for communicaiton-intensive workloads and heavily-overloaded cases #395

Closed multics69 closed 1 week ago

multics69 commented 1 week ago

This PR contains three tunings for

  1. When a system is heavily overloaded
  2. When a workload is very communication-intensive.

It changes three things:

  1. Stretch the time-space more aggressively (lat_prio^2) if the task's latency priority is low (i.e., high value). This prioritizes latency-critical tasks more and gives bounded delay to throughput-oriented tasks.
  2. Avoid the active/overflow CPU mask check when all CPUs are using.
  3. Tighten the competition window to avoid unnecessary tasks that are competing with each other in the timeline.

In result, it improves:

  1. The communication-intensive benchmark (e.g., perf bench sched messaging)
  2. Interactive tasks when heavy compilation + stress-ng -c