Skip to content

Linux: Change minimum priority threads from SCHED_IDLE to nice 19 SCHED_BATCH.

Con Kolivas requested to merge ckolivas/mesa:noidle into master

SCHED_IDLE on linux can lead to extraordinarily long periods of no scheduling leading to starvation of minimum priority threads for such an extended period that it can eventually lead to GUI stalls. Switch to renicing the threads to the lowest priority and use the SCHED_BATCH scheduling policy which is a hint to the scheduler that this is latency insensitive thread instead. This change has been confirmed to address unexpected GUI related stalls in mesa applications across a range of different linux kernels.

Signed-off-by: Con Kolivas kernel@kolivas.org

Merge request reports