All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915: Suppress oom warning for shmemfs object allocation failure
@ 2022-07-20 12:23 Nirmoy Das
  2022-07-20 12:39 ` Andrzej Hajda
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Nirmoy Das @ 2022-07-20 12:23 UTC (permalink / raw)
  To: intel-gfx; +Cc: chris.p.wilson, matthew.auld, andrzej.hajda

From: Chris Wilson <chris@chris-wilson.co.uk>

We report object allocation failures to userspace with ENOMEM, yet we
still show the memory warning after failing to shrink device allocated
pages. While this warning is similar to other system page allocation
failures, it is superfluous to the ENOMEM provided directly to
userspace.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4936
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
index 4eed3dd90ba8..4466173e1bcc 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
@@ -137,7 +137,7 @@ int shmem_sg_alloc_table(struct drm_i915_private *i915, struct sg_table *st,
 				 * trigger the out-of-memory killer and for
 				 * this we want __GFP_RETRY_MAYFAIL.
 				 */
-				gfp |= __GFP_RETRY_MAYFAIL;
+				gfp |= __GFP_RETRY_MAYFAIL | __GFP_NOWARN;
 			}
 		} while (1);
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [Intel-gfx] [PATCH] drm/i915: Suppress oom warning for shmemfs object allocation failure
@ 2022-07-26 14:47 Nirmoy Das
  2022-07-26 14:49 ` Das, Nirmoy
  0 siblings, 1 reply; 14+ messages in thread
From: Nirmoy Das @ 2022-07-26 14:47 UTC (permalink / raw)
  To: intel-gfx; +Cc: matthew.auld, chris.p.wilson

From: Chris Wilson <chris@chris-wilson.co.uk>

We report object allocation failures to userspace with ENOMEM, yet we
still show the memory warning after failing to shrink device allocated
pages. While this warning is similar to other system page allocation
failures, it is superfluous to the ENOMEM provided directly to
userspace.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4936
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
index 4eed3dd90ba8..4466173e1bcc 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
@@ -137,7 +137,7 @@ int shmem_sg_alloc_table(struct drm_i915_private *i915, struct sg_table *st,
 				 * trigger the out-of-memory killer and for
 				 * this we want __GFP_RETRY_MAYFAIL.
 				 */
-				gfp |= __GFP_RETRY_MAYFAIL;
+				gfp |= __GFP_RETRY_MAYFAIL | __GFP_NOWARN;
 			}
 		} while (1);
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [Intel-gfx] [PATCH] drm/i915: Suppress oom warning for shmemfs object allocation failure
@ 2022-07-27 17:40 Nirmoy Das
  2022-07-27 20:36 ` Andi Shyti
  0 siblings, 1 reply; 14+ messages in thread
From: Nirmoy Das @ 2022-07-27 17:40 UTC (permalink / raw)
  To: intel-gfx; +Cc: chris.p.wilson, matthew.auld, andrzej.hajda

From: Chris Wilson <chris@chris-wilson.co.uk>

We report object allocation failures to userspace with ENOMEM, yet we
still show the memory warning after failing to shrink device allocated
pages. While this warning is similar to other system page allocation
failures, it is superfluous to the ENOMEM provided directly to
userspace.

v2: Add NOWARN in few more places from where we might return
    ENOMEM to userspace.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4936
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Co-developed-by: Nirmoy Das <nirmoy.das@intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
index 4eed3dd90ba8..f42ca1179f37 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
@@ -75,7 +75,7 @@ int shmem_sg_alloc_table(struct drm_i915_private *i915, struct sg_table *st,
 	if (size > resource_size(&mr->region))
 		return -ENOMEM;
 
-	if (sg_alloc_table(st, page_count, GFP_KERNEL))
+	if (sg_alloc_table(st, page_count, GFP_KERNEL | __GFP_NOWARN))
 		return -ENOMEM;
 
 	/*
@@ -137,7 +137,7 @@ int shmem_sg_alloc_table(struct drm_i915_private *i915, struct sg_table *st,
 				 * trigger the out-of-memory killer and for
 				 * this we want __GFP_RETRY_MAYFAIL.
 				 */
-				gfp |= __GFP_RETRY_MAYFAIL;
+				gfp |= __GFP_RETRY_MAYFAIL | __GFP_NOWARN;
 			}
 		} while (1);
 
@@ -209,7 +209,7 @@ static int shmem_get_pages(struct drm_i915_gem_object *obj)
 	GEM_BUG_ON(obj->write_domain & I915_GEM_GPU_DOMAINS);
 
 rebuild_st:
-	st = kmalloc(sizeof(*st), GFP_KERNEL);
+	st = kmalloc(sizeof(*st), GFP_KERNEL | __GFP_NOWARN);
 	if (!st)
 		return -ENOMEM;
 
-- 
2.35.1


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

end of thread, other threads:[~2022-07-27 20:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-20 12:23 [Intel-gfx] [PATCH] drm/i915: Suppress oom warning for shmemfs object allocation failure Nirmoy Das
2022-07-20 12:39 ` Andrzej Hajda
2022-07-20 13:41 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for " Patchwork
2022-07-20 14:11 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-07-20 16:47 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Suppress oom warning for shmemfs object allocation failure (rev2) Patchwork
2022-07-20 17:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-07-21  2:32 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-07-21  8:09   ` Das, Nirmoy
2022-07-21  9:49 ` [Intel-gfx] [PATCH] drm/i915: Suppress oom warning for shmemfs object allocation failure Matthew Auld
2022-07-21 12:21   ` Das, Nirmoy
  -- strict thread matches above, loose matches on Subject: below --
2022-07-26 14:47 Nirmoy Das
2022-07-26 14:49 ` Das, Nirmoy
2022-07-27 17:40 Nirmoy Das
2022-07-27 20:36 ` Andi Shyti

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.