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 <[email protected]> -- Daniel Vetter Mail: [email protected] Mobile: +41 (0)79 365 57 48 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
