r600g: Trying to remove the busywait for fence completion, but hitting inexplicable behaviour

Simon Farnsworth simon.farnsworth at onelan.co.uk
Tue Jan 31 07:54:37 PST 2012


On Tuesday 31 January 2012, Alan Swanson <swanson at ukfsn.org> wrote:
> On Tue, 2012-01-31 at 13:16 +0000, Simon Farnsworth wrote:
> > Hello,
> > 
> > When profiling my workload on an AMD E-350 (PALM GPU) to see why it still
> > wasn't performing well with Jerome's WIP macrotiling patches, I noticed that
> > r600_fence_finish was taking 10% of my CPU time. I determined experimentally
> > that changing from sched_yield() to os_time_sleep(10) fixed this and
> > resolved my last performance issue on AMD Fusion as compared to Intel Atom,
> > but felt that this was hacky.
> 
> No, you were right the first time, sched_yield should definitely not be
> being used in this busy wait under Linux (even with its preceding few
> spins).
>
Given that I can get the hardware to raise an interrupt when the fence
finishes, I think the sleep is hacky - I should not be spinning under normal
circumstances.

I'm preparing patches that remove the sleep completely if you have new
enough kernel, libdrm and Mesa. If someone else prepares patches to remove
the sched_yield usage completely, I'll happily test them on my Radeon hardware.
-- 
Simon Farnsworth
Software Engineer
ONELAN Limited
http://www.onelan.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20120131/17f2538e/attachment.pgp>


More information about the dri-devel mailing list