From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Volkin, Bradley D" Subject: Re: [PATCH 1/2] drm/i915: Process page flags once rather than per pwrite/pread Date: Fri, 7 Mar 2014 10:14:24 -0800 Message-ID: <20140307181424.GA7286@bdvolkin-ubuntu-desktop> References: <1394181037-30480-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 mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 948F3FB5BC for ; Fri, 7 Mar 2014 10:15:04 -0800 (PST) Content-Disposition: inline In-Reply-To: <1394181037-30480-1-git-send-email-chris@chris-wilson.co.uk> 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 Cc: "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org Reviewed-by: Brad Volkin On Fri, Mar 07, 2014 at 12:30:36AM -0800, Chris Wilson wrote: > We used to lock individual pages inside the buffer object and so needed > to update the page flags every time. However, we now pin the pages into > the object for the duration of the pwrite/pread (and hopefully much > longer) and so we can forgo the flag updates until we release all the > pages. > > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/i915_gem.c | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index ba7dc4868066..877afb2c576d 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -627,12 +627,10 @@ i915_gem_shmem_pread(struct drm_device *dev, > > mutex_lock(&dev->struct_mutex); > > -next_page: > - mark_page_accessed(page); > - > if (ret) > goto out; > > +next_page: > remain -= page_length; > user_data += page_length; > offset += page_length; > @@ -950,13 +948,10 @@ i915_gem_shmem_pwrite(struct drm_device *dev, > > mutex_lock(&dev->struct_mutex); > > -next_page: > - set_page_dirty(page); > - mark_page_accessed(page); > - > if (ret) > goto out; > > +next_page: > remain -= page_length; > user_data += page_length; > offset += page_length; > -- > 1.9.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx