From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 1/3] drm/i915: fall through pwrite_gtt_slow to the shmem slow path Date: Mon, 05 Dec 2011 23:01:37 +0000 Message-ID: References: <1323121255-3967-1-git-send-email-daniel.vetter@ffwll.ch> <1323121255-3967-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 DE7739E79C for ; Mon, 5 Dec 2011 15:03:43 -0800 (PST) In-Reply-To: <1323121255-3967-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-gfx Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org On Mon, 5 Dec 2011 22:40:53 +0100, Daniel Vetter wrote: > The gtt_pwrite slowpath grabs the userspace memory with > get_user_pages. This will not work for non-page backed memory, like a > gtt mmapped gem object. Hence fall throuh to the shmem paths if we hit > -EFAULT in the gtt paths. > > Now the shmem paths have exactly the same problem, but this way we > only need to rearrange the code in one write path. > > v2: v1 accidentaly falls back to shmem pwrite for phys objects. Fixed. > > v3: Make the codeflow around phys_pwrite clearer as suggested by Chris > Wilson. > > Signed-Off-by: Daniel Vetter For the series, Reviewed-by: Chris Wilson (Just a shame about the alignment of the if() ;-) We've discussed this series (of which these are the pure bug fixes) a lot over IRC and the extra complication of dropping the lock during the slow copy does seem to be the simplest approach. And with the prefault patch, we can ignore the extra complication almost all the time. -Chris -- Chris Wilson, Intel Open Source Technology Centre