From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 2/2] drm/i915: optimize the shmem_pwrite slowpath handling Date: Thu, 15 Nov 2012 15:02:05 +0000 Message-ID: References: <1352990406-3039-1-git-send-email-daniel.vetter@ffwll.ch> <1352990406-3039-2-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id D35B79EB40 for ; Thu, 15 Nov 2012 07:02:09 -0800 (PST) In-Reply-To: <1352990406-3039-2-git-send-email-daniel.vetter@ffwll.ch> 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: Intel Graphics Development Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org On Thu, 15 Nov 2012 15:40:06 +0100, Daniel Vetter wrote: > Since we drop dev->struct_mutex when going through the slowpath, the > object might have been moved out of the cpu domain. Hence we need to > clflush the entire object to ensure that after the ioctl returns, > everything is coherent again (interwoven writes are ill-defined > anyway). > > But we only need to do this if we start in the cpu domain and the > object requires flushing for coherency. So don't do the flushing if > the object is coherent anyway or if we've done in-line clfushing > already. > > Signed-off-by: Daniel Vetter Technically true, but we do we care enough to add the extra line of confusion? Not sold on this one yet, maybe it will be neater in future? -Chris -- Chris Wilson, Intel Open Source Technology Centre