From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 2/2] drm/i915: properly prefault for pread/pwrite Date: Sun, 23 Oct 2011 12:19:57 +0200 Message-ID: <20111023101957.GF2953@phenom.ffwll.local> References: <1317203844-2930-1-git-send-email-daniel.vetter@ffwll.ch> <1317203844-2930-2-git-send-email-daniel.vetter@ffwll.ch> <20111023101830.GE2953@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wy0-f177.google.com (mail-wy0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 54C2B9E78B for ; Sun, 23 Oct 2011 03:19:07 -0700 (PDT) Received: by wyg8 with SMTP id 8so6540939wyg.36 for ; Sun, 23 Oct 2011 03:19:06 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20111023101830.GE2953@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 , Keith Packard Cc: Daniel Vetter , intel-gfx , stable@kernel.org List-Id: intel-gfx@lists.freedesktop.org Oosp, forgotten to actually put Keith on the To: ... not enough coffee, yet. -Daniel On Sun, Oct 23, 2011 at 12:18:30PM +0200, Daniel Vetter wrote: > Hi Keith, > > This patch isn't in your -next pull. This papers over a spurious -EFAULT > in the pwrite/pread paths that actually gets hit in the wild. The real fix > in the form of a almost complete rewrite of the pwrite/pread paths won't > be ready for 3.2. > > Do you want me to implement Chris' beautification suggestion? The code > as-is is copied over from the pagecache prefault helper. Otherwise please > consider merging for 3.2. > > Yours, Daniel > > On Wed, Sep 28, 2011 at 12:24:04PM +0100, Chris Wilson wrote: > > > + if (ret == 0) { > > > + if (((unsigned long)uaddr & PAGE_MASK) != > > > + ((unsigned long)end & PAGE_MASK)) > > This is a little ugly. Perhaps, > > > > #define page_align(addr) ((unsigned long)addr & PAGE_MASK) > > if (page_align(uaddr) != page_align(end)) > > > > Otherwise, both are > > Reviewed-by: Chris Wilson > > -Chris > > > > -- > > Chris Wilson, Intel Open Source Technology Centre > > -- > Daniel Vetter > Mail: daniel@ffwll.ch > Mobile: +41 (0)79 365 57 48 -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48