From: Paul Menzel Subject: Re: [PATCH] intel: Track whether a buffer is idle to avoid trips to the kernel. Date: Mon, 20 Jan 2014 23:08:03 +0100 Message-ID: <1390255683.15480.13.camel@mattotaupa> References: <1389775119-26051-1-git-send-email-eric@anholt.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1460596718==" Return-path: Received: from mail.gw90.de (mail.gw90.de [188.40.100.199]) by gabe.freedesktop.org (Postfix) with ESMTP id 423DAFAA1A for ; Mon, 20 Jan 2014 14:08:23 -0800 (PST) In-Reply-To: <1389775119-26051-1-git-send-email-eric@anholt.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: Eric Anholt Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1460596718== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-wKeNL/xxQdjDScLz2NjZ" --=-wKeNL/xxQdjDScLz2NjZ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Eric, thank you for the patch. I noticed one typo. Am Mittwoch, den 15.01.2014, 00:38 -0800 schrieb Eric Anholt: > I've seen a number of apps spending unreasonable amounts of time in > drm_intel_bo_busy during the buffer mapping process. >=20 > We can't track idleness in general, in the case of buffers shared > across processes. But this should significantly reduce our overhead > for checking for busy on things like VBOs. >=20 > Improves (unoptimized) glamor x11perf -f8text by 0.243334% +/- > 0.161498% (n=3D1549), which has formerly been spending about .5% of its > time hitting the kernel for drm_intel_gem_bo_busy(). > --- >=20 > I've still got a patch outstanding on the list for valgrind-cleaning > the modesetting paths. Since we're probably rolling a release soon, > that might be nice to get in. >=20 > intel/intel_bufmgr_gem.c | 23 ++++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) >=20 > diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c > index 75e95e6..27ad576 100644 > --- a/intel/intel_bufmgr_gem.c > +++ b/intel/intel_bufmgr_gem.c > @@ -212,6 +212,15 @@ struct _drm_intel_bo_gem { > bool reusable; > =20 > /** > + * Boolean of whether the GPU is definitely not accessing the buffer. > + * > + * This is only valid when reusable, since non-reusable > + * buffers are those that have been shared wth other w*i*th > + * processes, so we don't know their state. > + */ > + bool idle; > + > + /** > * Size in bytes of this buffer and its relocation descendents. > * > * Used to avoid costly tree walking in The rest looks fine. Thanks, Paul --=-wKeNL/xxQdjDScLz2NjZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlLdnkMACgkQPX1aK2wOHVjCSQCdH6/o1+p/7Qb1LgRmbq8IFrJd 6fMAnRHRq5vXl0086t9W/dkBBMOv8LKo =U3Fq -----END PGP SIGNATURE----- --=-wKeNL/xxQdjDScLz2NjZ-- --===============1460596718== 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 --===============1460596718==--