Linux 6.5 Scheduler Patch Will To Help AMD Systems With Multiple LLCs Per Die

Written by Michael Larabel in AMD on 1 June 2023 at 09:02 AM EDT. Add A Comment
AMD
There is a Linux kernel scheduler patch now queued via TIP's sched/core branch that can help with task scheduling on AMD processors sporting multiple last-level caches (LLCs / L3 cache) per die. This minor improvement came after a discovery by a Linux kernel developer on his AMD Zen 2 desktop.

This change that should be merged for Linux 6.5 now that it's in tip/tip.git's sched/core branch is a multi-LLC-aware select_idle_sibling() implementation. Currently when the scheduler looks for an idle CPU in the scheduler domain, it wouldn't look outside of the current group of cores sharing an LLC. But now with this multi-LLC version it will consider other LLCs should the local LLC come up empty.

AMD Ryzen and EPYC CPUs


The patch by longtime Linux kernel engineer Peter Zijlstra explains:
sched/fair: Multi-LLC select_idle_sibling()

[Linux developer Tejun Heo] reported that when he targets workqueues towards a specific LLC on his Zen2 machine with 3 cores / LLC and 4 LLCs in total, he gets significant idle time.

This is, of course, because of how select_idle_sibling() will not consider anything outside of the local LLC, and since all these tasks are short running the periodic idle load balancer is ineffective.

And while it is good to keep work cache local, it is better to not have significant idle time. Therefore, have select_idle_sibling() try other LLCs inside the same node when the local one comes up empty.

Those with modern AMD systems in particular and wanting to test out this patch prior to the expected Linux 6.5 merge window can find it via the sched/core branch.
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