From: Eric Anholt Subject: Re: [RFC] drm/i915 : Reduce the shmem page allocation time by using blitter engines for clearing pages. Date: Wed, 07 May 2014 12:44:31 -0700 Message-ID: <87wqdxxtk0.fsf@eliezer.anholt.net> References: <1399374658-19525-1-git-send-email-sourab.gupta@intel.com> <8761li94fu.fsf@eliezer.anholt.net> <1399457064.9396.52.camel@sourabgu-desktop> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0300983834==" Return-path: In-Reply-To: <1399457064.9396.52.camel@sourabgu-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "Gupta, Sourab" Cc: "intel-gfx@lists.freedesktop.org" , "Goel, Akash" List-Id: intel-gfx@lists.freedesktop.org --===============0300983834== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable "Gupta, Sourab" writes: > On Tue, 2014-05-06 at 17:56 +0000, Eric Anholt wrote: >> sourab.gupta@intel.com writes: >>=20 >> > From: Sourab Gupta >> > >> > This patch is in continuation of and is dependent on earlier patch >> > series to 'reduce the time for which device mutex is kept locked'. >> > (http://lists.freedesktop.org/archives/intel-gfx/2014-May/044596.html) >>=20 >> One of userspace's assumptions is that when you allocate a new BO, you >> can map it and start writing data into it without needing to wait on the >> GPU. I expect this patch to mostly hurt performance on apps (and I note >> that the patch doesn't come with any actual performance data) that get >> more stalls as a result. >>=20 > Hi Eric, > Yes, it may hurt the performance on apps, in case of small buffers and=20 > if blitter engine is busy as there is a synchronous wait for rendering=20 > in the gem_fault handler. If that is the case, we can drop this from the= =20 > gem_fault routine and employ it only in the do_execbuffer routine. Its=20 > useful there because there is no synchronous wait required in sw, due=20 > to cross ring synchronization. > We'll gather the numbers to quantify the performance benefit we have > while using blitter engines in this way for different buffer sizes. > >> More importantly, though, it breaks existing userspace that relies on >> buffers being idle on allocation, for the unsychronized maps used in >> intel_bufferobj_subdata() and >> intel_bufferobj_map_range(GL_INVALIDATE_BUFFER_BIT | >> GL_UNSYNCHRONIZED_BIT) > > Sorry, I miss your point here. It may not break this assumption due to > the fact that we employ this method only in case of the preallocate > routine, which will be called in the first page fault of the object > (gem_fault handler) resulting in fresh allocation of pages.=20 > > > So, in case of unsynchronized maps, there may be a wait involved in the > first page fault. Also, that wait time may be lesser than the time > required for CPU memset (resulting in no performance hit). > There won't be any subsequent waits afterwards for that buffer object. > > Though, we'll have performance hit in the case when blitter engine is > already busy and may not be available to immediately start the memset of > freshly allocated mmaped buffers. > > Am I missing something here? Does the userspace requirement for > unsynchronized mapped objects involve complete idleness of object on gpu > even when object page faults for the first time? Oh, I mised how this works. So at pagefault time, you're firing off the blit, then immediately stalling on it? This sounds even less like a possible performance win than I was initially thinking. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJTao0gAAoJELXWKTbR/J7oiuIP/igypIAFP8G02RriEqL9dFfa uptf90QJ/YuMLNYuObNc0og7PuxYLBTsHxNqsY1TyByUBr596ozW1D2C3U4joNEw sfHIy7tDr8z/fhQGFmqRwd5tlWeycpb1ei9sHnPO9O7qI+aW4qlzuQrxsTWEz2g2 phw2Ae+yI4D7pFjsq/YmX+9WAYQtCgfmpDOwQSZNAwa6KAmGb6q+x1T2LDAV1NwD mx0IrpbKbHTmHPnz73KOYpwMPoUSYWE+8SkQXG1e0GDt3ig6ZP41PHRRBgvEae/z pdV1rLz8bNFIgGoNuCtW29r76eRZoqL9yIxZBnFvkB5m2UxxiZwQ2kfH7HzKjWpW 2a80Cmp6YNCZWoJUkXYCBDSq+f5oFdfP8Col5jRBmZo21V0mxfbZwntiHhYTkU/r GlZAzbHt3kUkNnQA9MAWDbZaA6PDHeSIKaF7Xs4KvkhsiuyUWRF0jv8WGDUji5qC UFK+h2HuZq0xlyuPYNO0K4XTGl5yoz3TtlLQ2WBd3viXztOd8P0qJf8tJHb1+435 Rlgd4tjFcIsBZhMq/fYhVKWcrWxOp8pZPgnWs7eQHT33xyhJaGv21P6pzwmGWwwo 5yrLtohMGAanpyxtS4KBzYU6Sz5bOuRNFIINdxB3hj1G8ljq40wIRpbvLpjd/p+P QjwyeBgfZgpfgrEcjtA+ =1qXC -----END PGP SIGNATURE----- --=-=-=-- --===============0300983834== 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 --===============0300983834==--