From: Simon Farnsworth Subject: Re: r600g: Trying to remove the busywait for fence completion, but hitting inexplicable behaviour Date: Tue, 31 Jan 2012 15:54:37 +0000 Message-ID: <201201311554.40840.simon.farnsworth@onelan.co.uk> References: <201201311316.46745.simon.farnsworth@onelan.co.uk> <1328024332.7997.13.camel@trillian.infiniteimprobability.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0391047928==" Return-path: Received: from claranet-outbound-smtp04.uk.clara.net (claranet-outbound-smtp04.uk.clara.net [195.8.89.37]) by gabe.freedesktop.org (Postfix) with ESMTP id F36689EAF7 for ; Tue, 31 Jan 2012 07:54:42 -0800 (PST) In-Reply-To: <1328024332.7997.13.camel@trillian.infiniteimprobability.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Alan Swanson Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0391047928== Content-Type: multipart/signed; boundary="nextPart2073283.0Xd2Ye2u16"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart2073283.0Xd2Ye2u16 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Tuesday 31 January 2012, Alan Swanson wrote: > On Tue, 2012-01-31 at 13:16 +0000, Simon Farnsworth wrote: > > Hello, > >=20 > > When profiling my workload on an AMD E-350 (PALM GPU) to see why it sti= ll > > 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 experimen= tally > > 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 A= tom, > > but felt that this was hacky. >=20 > 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 hardw= are. =2D-=20 Simon Farnsworth Software Engineer ONELAN Limited http://www.onelan.com/ --nextPart2073283.0Xd2Ye2u16 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iQEcBAABAgAGBQJPKA7AAAoJEIKsye9/dtRWRusH/jEKdm2z4vfy33MwlEgEaNpt Tkqf2pPA0a/OJz5nnKyKW5x5KNpANtU4LhWfNMCUWL45C8pzaNIOeBabFqlhE788 AyAe5LeviyF6GsNqM9WhAqU40SVzSrLLFyneKj1eTUW25OiVL16p0SIy5rpt8UWp CwXwLZAhFmwTPF++UdBEi2fduKvJuq+qspEyK9hBV45YV43yGFIeQyJXrBl9GKIE zUboIcHUsiF48C40w9vGaD2b0WLBLfFk6KmOusuDbUktGc1cXtie+2wxfExTUPm9 bZZKmgGUA7YwQAnfTvVk6RCJ7frZQyNAj7GVO4wkYEl/Dyz07conbS3bUVSCaNg= =gDrg -----END PGP SIGNATURE----- --nextPart2073283.0Xd2Ye2u16-- --===============0391047928== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0391047928==--