From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 1/3] drm/i915: Only bind each object rather than for every execbuffer Date: Wed, 8 Jan 2014 11:38:21 +0100 Message-ID: <20140108103821.GP4770@phenom.ffwll.local> References: <1388584856-9100-1-git-send-email-chris@chris-wilson.co.uk> <20140107074328.GB4770@phenom.ffwll.local> <20140108103016.GH8991@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f182.google.com (mail-ea0-f182.google.com [209.85.215.182]) by gabe.freedesktop.org (Postfix) with ESMTP id BFA2AFB03F for ; Wed, 8 Jan 2014 02:37:06 -0800 (PST) Received: by mail-ea0-f182.google.com with SMTP id a15so728578eae.27 for ; Wed, 08 Jan 2014 02:37:04 -0800 (PST) Content-Disposition: inline In-Reply-To: <20140108103016.GH8991@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Chris Wilson , Daniel Vetter , intel-gfx@lists.freedesktop.org, Ben Widawsky , Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org On Wed, Jan 08, 2014 at 10:30:16AM +0000, Chris Wilson wrote: > On Tue, Jan 07, 2014 at 08:43:28AM +0100, Daniel Vetter wrote: > > On Wed, Jan 01, 2014 at 02:00:54PM +0000, Chris Wilson wrote: > > > One side-effect of the introduction of ppgtt was that we needed to > > > rebind the object into the appropriate vm (and global gtt in some > > > peculiar cases). For simplicity this was done twice for every object on > > > every call to execbuffer. However, that adds a tremendous amount of CPU > > > overhead (rewriting all the PTE for all objects into WC memory) per > > > draw. The fix is to push all the decision about which vm to bind into > > > and when down into the low-level bind routines through hints rather than > > > inside the execbuffer routine. > > > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72906 > > > Tested-by: jianx.zhou@intel.com > > > Signed-off-by: Chris Wilson > > > Cc: Ben Widawsky > > > Cc: Daniel Vetter > > > > Can you please split out the code cleanups into a separate patch? I like > > them, but as is they're hiding the actual bugfix in the diff quite badly > > imo. > > Which part of this is cleanup? Coalescing the two boolean parameters mappable and nonblocking into the flags parameter in a bunch of bind/pin functions and the return value change for bind_to_vm look like prep cleanup. And there's 1-2 whitespace fixup hunks in there. Splitting that out as a prep patch will make the actual fix stick out much more I think. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch