Why The Radeon Gallium3D Performance Is Down

Written by Michael Larabel in Display Drivers on 23 December 2011 at 08:26 AM EST. Page 2 of 4. 15 Comments.
Radeon R300g Mesa Comparison

Combine the Phoronix Test Suite with a fast Intel CPU and most any change in performance can be quickly located. With the OpenArena Mesa 7.12-devel drop in frame-rate this was no different. The Radeon X1950PRO graphics card was again used from the Core i7 870 desktop, all the details are hosted on this OpenBenchmarking.org page.

So what did the Phoronix Test Suite find? The performance drop in OpenArena for the current Mesa 7.12-devel Git head is caused by ef64da8f013691c66744064769db379e57ef95de -- a.k.a. winsys/radeon: don't use the new GEM_WAIT ioctl for now -- was the biggest offender that's currently impairing the OpenArena performance for the RV570 graphics card. This change by Marek Olšák to the Radeon winsys for Gallium3D simply disables using the GEM_WAIT ioctl code-path, even when a Linux kernel is in use that supports this particular ioctl.

This commit is not too terribly surprising, since the GEM_WAIT ioctl is known to increase performance (particularly for CPU-bottlenecked graphics workloads) and is talked about in this Phoronix article. The DRM_RADEON_GEM_WAIT ioctl was only introduced a few months back, so unless using a very new Linux kernel snapshot chances are you would not have noticed the boost in performance in the first place. Here is a partial explanation of this work from when Marek was originally pushing the kernel changes:

Sometimes we want to know whether a buffer is busy and wait for it (bo_wait). However, sometimes it would be more useful to be able to query whether a buffer is busy and being either read or written, and wait until it's stopped being either read or written. The point of this is to be able to avoid unnecessary waiting, e.g. if a GPU has written something to a buffer and is now reading that buffer, and a CPU wants to map that buffer for read, it needs to only wait for the last write. If there were no write, there wouldn't be any waiting needed.

This, or course, requires user space drivers to send read/write flags with each relocation (like we have read/write domains in radeon, so we can actually use those for something useful now).

However, the DRM_RADEON_GEM_WAIT ioctl work was introduced to Mesa in August past the 7.11 release. There is another problem at hand.


Related Articles