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: revising tunables for less-preemptive games #383

Closed multics69 closed 1 week ago

multics69 commented 1 week ago

In some games (e.g., Elden Ring), it was observed that preemption happens much less frequently. The reason is that tasks' runtime per schedule is similar, so it does not meet the existing criteria. To alleviate the problem, the following three tunables are revised:

1) Smaller LAVD_PREEMPT_KICK_MARGIN and LAVD_PREEMPT_TICK_MARGIN help to trigger more preemption.

2) Smaller LAVD_SLICE_MAX_NS works better, especially in 250 or 300Hz kernels.

3) Longer LAVD_ELIGIBLE_TIME_MAX purturbes timelines less frequently.

This PR should close the problem in scx_lavd in https://github.com/sched-ext/scx/issues/376