Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1673391
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 5/6] drm/i915: use __GFP_RETRY_MAYFAIL |
| Date | 2017-06-23 11:00 +0200 |
| Message-ID | <tVsBA-8nM-17@gated-at.bofh.it> (permalink) |
| References | <tVsBz-8nM-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Michal Hocko <mhocko@suse.com>
24f8e00a8a2e ("drm/i915: Prefer to report ENOMEM rather than incur the
oom for gfx allocations") has tried to remove disruptive OOM killer
because the userspace should be able to cope with allocation failures.
At the time only __GFP_NORETRY could achieve that and it turned out
that this would fail the allocations just too easily. So "drm/i915:
Remove __GFP_NORETRY from our buffer allocator" removed it and hoped
for a better solution. __GFP_RETRY_MAYFAIL is that solution. It will
keep retrying the allocation until there is no more progress and we
would go OOM. Instead we fail the allocation and let the caller to deal
with it.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Michal Hocko <mhocko@suse.com>
---
drivers/gpu/drm/i915/i915_gem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index ae3ce1314bd1..eb193f27c8b7 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2434,8 +2434,9 @@ i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
* again with !__GFP_NORETRY. However, we still
* want to fail this allocation rather than
* trigger the out-of-memory killer and for
- * this we want the future __GFP_MAYFAIL.
+ * this we want __GFP_RETRY_MAYFAIL.
*/
+ gfp |= __GFP_RETRY_MAYFAIL;
}
} while (1);
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] mm: give __GFP_REPEAT a better semantic Michal Hocko <mhocko@kernel.org> - 2017-06-23 11:00 +0200
[PATCH 1/6] MIPS: do not use __GFP_REPEAT for order-0 request Michal Hocko <mhocko@kernel.org> - 2017-06-23 11:00 +0200
Re: [PATCH 1/6] MIPS: do not use __GFP_REPEAT for order-0 request Ralf Baechle <ralf@linux-mips.org> - 2017-06-23 12:30 +0200
Re: [PATCH 1/6] MIPS: do not use __GFP_REPEAT for order-0 request Vlastimil Babka <vbabka@suse.cz> - 2017-06-26 11:40 +0200
[PATCH 5/6] drm/i915: use __GFP_RETRY_MAYFAIL Michal Hocko <mhocko@kernel.org> - 2017-06-23 11:00 +0200
[PATCH 6/6] mm, migration: do not trigger OOM killer when migrating memory Michal Hocko <mhocko@kernel.org> - 2017-06-23 11:00 +0200
Re: [PATCH 6/6] mm, migration: do not trigger OOM killer when migrating memory Andrew Morton <akpm@linux-foundation.org> - 2017-06-23 22:50 +0200
Re: [PATCH 6/6] mm, migration: do not trigger OOM killer when migrating memory Michal Hocko <mhocko@kernel.org> - 2017-06-26 07:30 +0200
Re: [PATCH 6/6] mm, migration: do not trigger OOM killer when migrating memory Vlastimil Babka <vbabka@suse.cz> - 2017-06-26 14:20 +0200
[PATCH 4/6] mm: kvmalloc support __GFP_RETRY_MAYFAIL for all sizes Michal Hocko <mhocko@kernel.org> - 2017-06-23 11:00 +0200
Re: [PATCH 4/6] mm: kvmalloc support __GFP_RETRY_MAYFAIL for all sizes Vlastimil Babka <vbabka@suse.cz> - 2017-06-26 14:10 +0200
Re: [PATCH 4/6] mm: kvmalloc support __GFP_RETRY_MAYFAIL for all sizes Michal Hocko <mhocko@kernel.org> - 2017-06-26 14:20 +0200
[PATCH 2/6] mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic Michal Hocko <mhocko@kernel.org> - 2017-06-23 11:00 +0200
Re: [PATCH 2/6] mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic Vlastimil Babka <vbabka@suse.cz> - 2017-06-26 13:50 +0200
Re: [PATCH 2/6] mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic Vlastimil Babka <vbabka@suse.cz> - 2017-06-26 14:20 +0200
Re: [PATCH 2/6] mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic Michal Hocko <mhocko@kernel.org> - 2017-06-26 14:40 +0200
Re: [PATCH 2/6] mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic Michal Hocko <mhocko@kernel.org> - 2017-06-26 14:50 +0200
Re: [PATCH 2/6] mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic Michal Hocko <mhocko@kernel.org> - 2017-06-26 14:20 +0200
Re: [PATCH 2/6] mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic Vlastimil Babka <vbabka@suse.cz> - 2017-06-26 14:00 +0200
csiph-web