[Intel-gfx] [PATCH 24/30] drm/i915: Refactor pwrite/pread to use single copy of get_user_pages

Daniel Vetter daniel at ffwll.ch
Wed Apr 13 21:26:24 CEST 2011


On Tue, Apr 12, 2011 at 09:31:52PM +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.

One tiny nitpick: Perhaps put an api comment at the top of
gem_get_user_pages that this function drops the struct_mutex. That's not
something we normally do and could cause endless amounts of fun if
neglected.

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list