All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Actually pass the reclaim gfp_t along to shmemfs!
@ 2017-03-22 22:34 Chris Wilson
  2017-03-23  7:29 ` Joonas Lahtinen
  2017-03-23  9:54 ` ✓ Fi.CI.BAT: success for " Patchwork
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Wilson @ 2017-03-22 22:34 UTC (permalink / raw)
  To: intel-gfx; +Cc: Daniel Vetter

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: 24f8e00a8a2e ("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>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 96fc76d44145..174c85618450 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2312,7 +2312,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;
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-23 12:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-22 22:34 [PATCH] drm/i915: Actually pass the reclaim gfp_t along to shmemfs! Chris Wilson
2017-03-23  7:29 ` Joonas Lahtinen
2017-03-23 10:00   ` Chris Wilson
2017-03-23 12:37     ` Jani Nikula
2017-03-23  9:54 ` ✓ Fi.CI.BAT: success for " Patchwork

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.