All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
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	[thread overview]
Message-ID: <d08817$2eldgk@azsmga001.ch.intel.com> (raw)
In-Reply-To: <1323121255-3967-2-git-send-email-daniel.vetter@ffwll.ch>

On Mon,  5 Dec 2011 22:40:53 +0100, Daniel Vetter <daniel.vetter@ffwll.ch> 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 <daniel.vetter@ffwll.ch>

For the series, Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
(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

  reply	other threads:[~2011-12-05 23:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-05 21:40 [PATCH 0/3] pwrite patches to handle GTT userspace pointers Daniel Vetter
2011-12-05 21:40 ` [PATCH 1/3] drm/i915: fall through pwrite_gtt_slow to the shmem slow path Daniel Vetter
2011-12-05 23:01   ` Chris Wilson [this message]
2011-12-05 21:40 ` [PATCH 2/3] drm/i915: rewrite shmem_pwrite_slow to use copy_from_user Daniel Vetter
2011-12-05 21:40 ` [PATCH 3/3] drm/i915: rewrite shmem_pread_slow to use copy_to_user Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='d08817$2eldgk@azsmga001.ch.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.