From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 1/2] drm/i915: Prefault all pages for pread and pwrite Date: Sat, 09 Jul 2011 21:31:17 +0100 Message-ID: References: <1310200731-18086-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 mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 82B8E9F077 for ; Sat, 9 Jul 2011 13:31:20 -0700 (PDT) In-Reply-To: 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: Keith Packard , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sat, 09 Jul 2011 13:21:48 -0700, Keith Packard wrote: > On Sat, 9 Jul 2011 09:38:50 +0100, Chris Wilson wrote: > > > +static int prefault_writeable(unsigned long uaddr, unsigned long len) > > > +static int prefault_readable(unsigned long uaddr, unsigned long len) > > These seems like a functions which belongs alongside (or in place of) the > existing fault_in_pages_writable and fault_in_pages_readable functions. > > I think, in fact, that one could convincingly argue that the existing > functions are misleadingly named (or just broken). I agree that I was indeed misled by the description of those two functions! However, I don't like why this appears to fix the issue of get_user_pages() failing on the non-prefaulted address. -Chris -- Chris Wilson, Intel Open Source Technology Centre