Linux Kernel "Zen" Downstream Pulls In A MuQSS Fix To Help Gaming Performance

Written by Michael Larabel in Linux Gaming on 7 January 2020 at 09:00 AM EST. 22 Comments
LINUX GAMING
This weekend I posted some fresh benchmarks of the Liquorix kernel against upstream Linux 5.4 and found the gaming performance to be rather disappointing for that kernel flavor derived from the "Zen" patches and more. Fortunately, the Zen kernel patches now include a fix that should make their gaming performance more competitive.

A Phoronix reader pointed out to us this commit made shortly after our article went live. The patch corrects the MuQSS scheduler's __read_mostly tunable and should help restore/improve the Linux gaming competitiveness compared to upstream.
Turns out when I investigated performance issues with RPCS3 on Linux with MuQSS, my choice to set yield_type to 2 was flawed since I didn't benchmark or any other applications that cared about it.

Phoronix wrote an article measure performance of Liquorix against a stock 5.4 configuration here: https://www.phoronix.com/vr.php?view=28750

All the benchmarks measured framerate and Liquorix for the most part got up to 20% less FPS than stock CFS, depending on the game. Turns out some of it had to do with yield_type, and always yielding when requested dropped minimum frame times quite a bit. Disabling yield entirely raised the average frame rate a bit and the minimum frametimes on Deus Ex: Mankind Divided by nearly 10%.

Also, Linus Torvalds wrote in a forum about sched_yield. He indicated that yield used to make sense on uniprocessor configurations, but now with multi-core being the norm, yield almost always causes performance issues due to cache thrashing and thread/process migration on multicore systems: https://www.realworldtech.com/forum/?threadid=189711&curpostid=189752

And finally, even if we don't yield, MuQSS will reschedule the thread that's spinning anyway. All setting yield_type to 2 did was reschedule the thread sooner. Lets let MuQSS decide when a thread needs to be rescheduled, not the program.

I'll have some fresh benchmarks up soon. Over the past few days I also have been running some Xanmod kernel tests, various Arch Linux kernel options, and also some Clear Linux kernel configuration tests. Enjoy my relentless Linux benchmarking? Show your support by going premium.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week