From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 24/30] drm/i915: Refactor pwrite/pread to use single copy of get_user_pages Date: Wed, 13 Apr 2011 18:24:36 +0100 Message-ID: References: <1302640318-23165-1-git-send-email-chris@chris-wilson.co.uk> <1302640318-23165-25-git-send-email-chris@chris-wilson.co.uk> <87mxjui1l0.fsf@pollan.anholt.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A1429ECE0 for ; Wed, 13 Apr 2011 10:24:40 -0700 (PDT) In-Reply-To: <87mxjui1l0.fsf@pollan.anholt.net> 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: Eric Anholt , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, 13 Apr 2011 08:59:55 -0700, Eric Anholt wrote: > On Tue, 12 Apr 2011 21:31:52 +0100, Chris Wilson wrote: > > Replace the three nearly identical copies of the code with a single > > function. And take advantage of the opportunity to do some > > micro-optimisation: avoid the vmalloc if at all possible and also avoid > > dropping the lock unless we are forced to acquire the mm semaphore. > > Could we get some performance numbers in patches that add code for > performance? For myself, this was justified by simply refactoring the common code. However, x11perf -aa10text on pnv: before: 1.28 Mglyph/sec after: 1.45 Mglyph/sec I have my SNB box doing a more thorough analysis of the difference for various pwrite sizes (assuming that the likelihood of faulting is not totally workload dependent.) -Chris -- Chris Wilson, Intel Open Source Technology Centre