From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Avoid using mappable space for relocation processing through the CPU Date: Tue, 29 Nov 2011 18:21:03 +0100 Message-ID: <20111129172103.GC11090@phenom.ffwll.local> References: <1322579560-15548-1-git-send-email-chris@chris-wilson.co.uk> <20111129153441.GC5667@phenom.ffwll.local> <20111129170353.GA11090@phenom.ffwll.local> <20111129171721.GB11090@phenom.ffwll.local> 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 7F9CF9E775 for ; Tue, 29 Nov 2011 09:19:40 -0800 (PST) Received: by faan17 with SMTP id n17so1368127faa.36 for ; Tue, 29 Nov 2011 09:19:39 -0800 (PST) Content-Disposition: inline In-Reply-To: <20111129171721.GB11090@phenom.ffwll.local> 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 List-Id: intel-gfx@lists.freedesktop.org On Tue, Nov 29, 2011 at 06:17:21PM +0100, Daniel Vetter wrote: > On Tue, Nov 29, 2011 at 06:03:53PM +0100, Daniel Vetter wrote: > > On Tue, Nov 29, 2011 at 04:48:15PM +0000, Chris Wilson wrote: > > > On Tue, 29 Nov 2011 16:34:41 +0100, Daniel Vetter wrote: > > > > On Tue, Nov 29, 2011 at 03:12:40PM +0000, Chris Wilson wrote: > > > > > We try to avoid writing the relocations through the uncached GTT, if the > > > > > buffer is currently in the CPU write domain and so will be flushed out to > > > > > main memory afterwards anyway. Also on SandyBridge we can safely write > > > > > to the pages in cacheable memory, so long as the buffer is LLC mapped. > > > > > In either of these caches, we therefore do not need to force the > > > > > reallocation of the buffer into the mappable region of the GTT, reducing > > > > > the aperture pressure. > > > > > > > > > > Signed-off-by: Chris Wilson > > > > > > > > The error_state capture currently relies on us pinning buffers as mappable > > > > when they contain relocations (and userspace always submitting a > > > > batchbuffers containing relocations). You break that guarantee without > > > > fixing up the error capture code. Otherwise I like this. > > > > > > I may have sent that patch a little earlier. ;-) > > > > Yes, I know. My gripe is that this will reduce our chances of successfully > > capturing the error_state, because now we expect to hit that case in the > > error capture code whereas up to now it would have been a bug somewhere. > > So either > > - fixup the error_capture to fall back to cpu reads (needs the usual > > clflush dance if the object is not llc cached) > > - or drop the pin mappable change in this patch. > > After some irc discussion with Dave Airlie I think a simple wmb() to flush > the wc buffer might make more sense. I'll try to run that past testers and > gather results. Will take at least a week to get anything conclusive. Meh, replied to the wrong mail ... -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48