drm/i915: Mark a temporary allocation for copy-from-user as such
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 8 Jan 2013 10:53:13 +0000 (10:53 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 17 Jan 2013 21:08:00 +0000 (22:08 +0100)
The difference is that the kernel will then know that this memory will
be reclaimable in the near future.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_execbuffer.c

index 163bb52bd3b3b0b168fec9cd097655c003d5ba33..986eb98f0d253c8f13d23a236e50b323a7e90bc0 100644 (file)
@@ -1113,7 +1113,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,
        }
 
        exec2_list = kmalloc(sizeof(*exec2_list)*args->buffer_count,
-                            GFP_KERNEL | __GFP_NOWARN | __GFP_NORETRY);
+                            GFP_TEMPORARY | __GFP_NOWARN | __GFP_NORETRY);
        if (exec2_list == NULL)
                exec2_list = drm_malloc_ab(sizeof(*exec2_list),
                                           args->buffer_count);