Mesa Gets Testing Patches For New Zen Optimization Around Thread Pinning
It was just yesterday that the AMD Zen L3 thread pinning was dropped from Mesa due to that optimization not panning out as intended for benefiting the new AMD processors with the open-source Linux graphics driver stack. Lead Mesa hacker Marek Olšák is already out with a new Zen tuning implementation that may deliver on the original optimization goal.
The first patch posted by Marek as part of his new tuning effort is to regularly re-pin the driver threads to the core complex (CCX) where the application thread is. Basically, when Mesa is being used without the glthread (OpenGL threading) behavior, keep chasing the application/game thread on the processor so it will be part of the same CCX and share a cache. This chasing is done rather than explicitly pinning the application thread.
The second proposed patch is the pinning of the driver threads to a specific CCX in cases where OpenGL threading is in use. Those driver threads include all three RadeonSI threads: the Gallium thread, the Winsys tasks, and glthread. Those driver threads are being pinned to a "random" CCX regardless of the application thread's position on the CPU.
These patches are currently on Mesa-dev for testing. Hopefully in the days ahead I'll have the time to try out these patches for their performance impact when running the open-source OpenGL stack on Ryzen CPUs.
The first patch posted by Marek as part of his new tuning effort is to regularly re-pin the driver threads to the core complex (CCX) where the application thread is. Basically, when Mesa is being used without the glthread (OpenGL threading) behavior, keep chasing the application/game thread on the processor so it will be part of the same CCX and share a cache. This chasing is done rather than explicitly pinning the application thread.
The second proposed patch is the pinning of the driver threads to a specific CCX in cases where OpenGL threading is in use. Those driver threads include all three RadeonSI threads: the Gallium thread, the Winsys tasks, and glthread. Those driver threads are being pinned to a "random" CCX regardless of the application thread's position on the CPU.
These patches are currently on Mesa-dev for testing. Hopefully in the days ahead I'll have the time to try out these patches for their performance impact when running the open-source OpenGL stack on Ryzen CPUs.
8 Comments