From: Eric Anholt Subject: Re: Why the memcpy from a mapped GPU memory is so slow on Intel Bay Trail? Date: Wed, 21 May 2014 11:25:24 -0700 Message-ID: <87vbszkmzv.fsf@eliezer.anholt.net> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0945020970==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: =?utf-8?B?5LiJ5pyI77yB?= , intel-gfx List-Id: intel-gfx@lists.freedesktop.org --===============0945020970== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =E4=B8=89=E6=9C=88=EF=BC=81 writes: > Hello! I'm developing some openCL application with Beignet in Ubuntu > 14.04 x64 Desktop upon Bay Trail E3825. And I found that reading data > from GPU memory through whatever drm_intel gem_bo_map or > drm_intel_gem_bo_get subdata cost about 0.002 ~ 0.003 second to fetch > a 7MiB array, which is not quite satisfing. Could anybody help solve > this problem? GPUs (except in the case of SNB/IVB/HSW where the CPU is coherent with the GPU other than the GPU's L1/2 caches) are extremely slow to read From=20because write-combining memory is effectively uncached performance for reads. You can get better streaming read performance using the movntdqa instruction, and you can see an example of code using it in streaming-load-memcpy.c in mesa (though it looks like that code is missing an mfence, which iirc is required). --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJTfO+UAAoJELXWKTbR/J7oGF4P/10TabddW0vf/17JFomz8oXD IWFHeayJqO3zQ3gFoUkn08v+WogphgTwYDWVZEh/DJ4LB6R1TboevzXaNsmV53P8 G1t8Zha9iGH/ZERAsxllVqRN4/FWhScK09Rt8smTTmA71NWlbgK2NBx9dyEJ7Rim h+XN4rD7cpVWTj9OqDeM5Wn7NFJjrHzaXY0mVklRsTWmOGjXABnnv9MJsiaKXJaD Wggp45+55h+XeQuMkqnDcXL2AiHwzDgkWnkJibYdRrv2m+ZdbaTZf3pobr6I3Czh Vty8qDV/RtNcj5pSrKvFs6ekbPnHVt7wv+ak2sOdrnXyFBJsH/H7UlMn4ELRjZbh Bqy8zEbv9riey6Em52jbcnPe9sD0r3eW93hZjVODUMif8UUe6O85sm1jvY4fn9zf ZAANWkHHhE249DBD4BEsldh8lgAGNDkdFXP6KqSNaXRvMCkVTyUR5iI8v6651Sc9 H6w69NYlm8XCyDPYVwnhto9BNERE4rZy2a21qHCrA7XhnYZbJSmoaXTpsj9b/8DK zewV82K+5x4mBZZ2dQ1k4oyLIa2wjn+QyEwlkWdYYk7eRl8GQ//mttimhcQbihfm DmD/vKMF+IXfUWbvVkPWKpEKyOzX37SEGT+zF2dmaiymUSyumbb4DZDQxzf27s6y H4dcyq/8IujjMImvi2t7 =o427 -----END PGP SIGNATURE----- --=-=-=-- --===============0945020970== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0945020970==--