Mesa Fixes A Large Performance Regression For Systems Using HPET
The High Precision Event Timer (HPET) has long been a source of issues for Linux developers and it turns out systems relying on HPET rather than the CPU's TSC have in recent months suffered significant performance degradation with the Mesa OpenGL driver code.
Opened back in April was this Mesa bug report around a "huge performance regression". and was tracked to being due to a Mesa OpenGL threading "glthread" change. The performance could be as much as halved since the regression was introduced.
The problem was ultimately found to be when using Mesa OpenGL threading while making use of the High Precision Event Timer (HPET) rather than the CPU's Timestamp Counter (TSC) for hardware timing.
This merge to fix the regression will now determine global locking once every 64 patches in order to call the get time function less frequently.
By making the calls less frequent, the performance impact is lessened as a simple workaround but hopefully most users are relying on TSC rather than HPET. Reading /sys/devices/system/clocksource/clocksource0/current_clocksource will confirm your system's current clock source.
Opened back in April was this Mesa bug report around a "huge performance regression". and was tracked to being due to a Mesa OpenGL threading "glthread" change. The performance could be as much as halved since the regression was introduced.
The problem was ultimately found to be when using Mesa OpenGL threading while making use of the High Precision Event Timer (HPET) rather than the CPU's Timestamp Counter (TSC) for hardware timing.
This merge to fix the regression will now determine global locking once every 64 patches in order to call the get time function less frequently.
By making the calls less frequent, the performance impact is lessened as a simple workaround but hopefully most users are relying on TSC rather than HPET. Reading /sys/devices/system/clocksource/clocksource0/current_clocksource will confirm your system's current clock source.
27 Comments