From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Seperate fence pin counting from normal bind pin counting Date: Wed, 23 Nov 2011 13:38:44 +0100 Message-ID: <20111123123844.GD3864@phenom.ffwll.local> References: <1307177743-3195-1-git-send-email-chris@chris-wilson.co.uk> <1321182022-7158-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-fx0-f49.google.com (mail-fx0-f49.google.com [209.85.161.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 54CF79E8FB for ; Wed, 23 Nov 2011 04:37:28 -0800 (PST) Received: by faar25 with SMTP id r25so2052970faa.36 for ; Wed, 23 Nov 2011 04:37:27 -0800 (PST) Content-Disposition: inline In-Reply-To: <1321182022-7158-1-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, stable@kernel.org List-Id: intel-gfx@lists.freedesktop.org On Sun, Nov 13, 2011 at 11:00:22AM +0000, Chris Wilson wrote: > In order to correctly account for reserving space in the GTT and fences > for a batch buffer, we need to independently track whether the fence is > pinned due to a fenced GPU access in the batch from from whether the > buffer is pinned in the aperture. Currently we count the fenced as > pinned if the buffer has already been seen in the execbuffer. This leads > to a false accounting of available fence registers, causing frequent > mass evictions. Worse, if coupled with the change to make > i915_gem_object_get_fence() report EDADLK upon fence starvation, the > batchbuffer can fail with only one fence required... > > Fixes intel-gpu-tools/tests/gem_fenced_exec_thrash > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38735 > Signed-off-by: Chris Wilson > Reviewed-by: Daniel Vetter > Tested-by: Paul Neumann > Cc: stable@kernel.org How embarassing, I've re-reviewed the wrong patch without noticing. Anyway, still looks good and I like the pin_count moved to the fence quite a bit more ... Reviewed-by: Daniel Vetter -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48