From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grigori Goronzy Subject: Re: [Mesa-dev] [PATCH 4/5] r600g, radeonsi: Use write-combined persistent GTT mappings Date: Fri, 18 Jul 2014 21:50:29 +0200 Message-ID: <53C97A85.2020009@chown.ath.cx> References: <1405591275-14461-1-git-send-email-michel@daenzer.net> <1405591275-14461-10-git-send-email-michel@daenzer.net> <53C89246.9070607@daenzer.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2097446076==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: =?UTF-8?B?TWFyZWsgT2zFocOhaw==?= , =?UTF-8?B?TWljaGU=?= =?UTF-8?B?bCBEw6RuemVy?= Cc: "mesa-dev@lists.freedesktop.org" , dri-devel List-Id: dri-devel@lists.freedesktop.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============2097446076== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3PCBhNnglK3E3WfLJX5L0StGGo2e7FchW" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3PCBhNnglK3E3WfLJX5L0StGGo2e7FchW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 18.07.2014 13:45, Marek Ol=C5=A1=C3=A1k wrote: > If the requirements of GL_MAP_COHERENT_BIT are satisfied, then the > patch is okay. > Apart from correctness, I still wonder how this will affect performance, most notably CPU reads. This change unconditionally uses write-combined, uncached memory for MAP_COHERENT buffers. Unless I am missing something, CPU reads will be slow, even if the buffer storage flags indicate that the buffer will be read by the CPU. Maybe it's a good idea to avoid write combined memory if the buffer storage flags include MAP_READ_BIT? Grigori > Marek >=20 >=20 > On Fri, Jul 18, 2014 at 5:19 AM, Michel D=C3=A4nzer wrote: >> On 17.07.2014 21:00, Marek Ol=C5=A1=C3=A1k wrote: >>> On Thu, Jul 17, 2014 at 12:01 PM, Michel D=C3=A4nzer wrote: >>>> From: Michel D=C3=A4nzer >>>> >>>> This is hopefully safe: The kernel makes sure writes to these mappin= gs >>>> finish before the GPU might start reading from them, and the GPU cac= hes >>>> are invalidated at the start of a command stream. >>>> >>> The resource flags actually tell you what you can do. If the COHERENT= >>> flag is set, the mapping must be cached. >> >> Why is that required? As I explain above, we should satisfy the >> requirements of the ARB_buffer_storage extension AFAICT. >> >> >> As pointed out by you and Grigori in other posts, I should probably ju= st >> drop the special treatment of persistent mappings though, so the >> placement and flags are derived from the buffer usage. >> >> >> -- >> Earthling Michel D=C3=A4nzer | http://www.= amd.com >> Libre software enthusiast | Mesa and X develop= er > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev >=20 --3PCBhNnglK3E3WfLJX5L0StGGo2e7FchW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlPJeo0ACgkQB4i2VYtEHqnDNwCg42VCMLabDVbm3tin30+eqrNO aOIAoPlIq5TtvepKXNScTpQHnpu/1Cd1 =KW56 -----END PGP SIGNATURE----- --3PCBhNnglK3E3WfLJX5L0StGGo2e7FchW-- --===============2097446076== 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 --===============2097446076==--