mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-06 23:57:22 +02:00

This commit adds a simple heuristic to auto detect whether to use SCHED_ISO or not. It does this by looking at the number of cores: According to some reports by users of SCHED_ISO and an explanation by Con Kolivas, games running busy loops and running on too few cores might start fighting with scheduling of the graphic driver, leading to priority inversion. This results in actually lower performance. So let's only enable SCHED_ISO on at least four cores. The user can still force SCHED_ISO on or off by setting the configuration value. All other values (or none) will apply heuristics. Signed-off-by: Kai Krakow <kai@kaishome.de>