Skip to content

Commit

Permalink
drm/i915: Actually pass the reclaim gfp_t along to shmemfs!
Browse files Browse the repository at this point in the history
Words cannot describe the embarrassment at creating a new gfp_t relaim to
only prevent the oomkiller but allow direct|kswapd reclaim, and then not
use it in the shmem_read_mapping_page_gfp().

Fixes: 24f8e00 ("drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170322223447.7493-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
  • Loading branch information
Chris Wilson committed Mar 23, 2017
1 parent aa18bc8 commit 40149f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2343,7 +2343,7 @@ i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
reclaim = mapping_gfp_constraint(mapping, 0);
reclaim |= __GFP_NORETRY; /* reclaim, but no oom */

page = shmem_read_mapping_page_gfp(mapping, i, gfp);
page = shmem_read_mapping_page_gfp(mapping, i, reclaim);
if (IS_ERR(page)) {
ret = PTR_ERR(page);
goto err_sg;
Expand Down

0 comments on commit 40149f0

Please sign in to comment.