All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Das, Nirmoy" <nirmoy.das@intel.com>
To: Matthew Auld <matthew.auld@intel.com>, <intel-gfx@lists.freedesktop.org>
Cc: chris.p.wilson@intel.com, andrzej.hajda@intel.com
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Suppress oom warning for shmemfs object allocation failure
Date: Thu, 21 Jul 2022 14:21:29 +0200	[thread overview]
Message-ID: <68b2ab4a-b671-d3ff-43cf-5abfc2cf00ef@intel.com> (raw)
In-Reply-To: <31613498-5b96-766a-f9e8-8a73f0022089@intel.com>


On 7/21/2022 11:49 AM, Matthew Auld wrote:
> On 20/07/2022 13:23, Nirmoy Das wrote:
>> 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
>
> Is it not possible that this triggers OOM warning when calling 
> sg_alloc_table() or similar?


I haven't observed any after running the test for a while but I think it 
might be possible, Do you think I should add __GFP_NOWARN for that too ?


Nirmoy


> I guess shmem_read_mapping_page_gfp() is the most likely spot where 
> this triggers OOM, but that doesn't have to be the case?
>
>> 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);

  reply	other threads:[~2022-07-21 12:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
  -- 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=68b2ab4a-b671-d3ff-43cf-5abfc2cf00ef@intel.com \
    --to=nirmoy.das@intel.com \
    --cc=andrzej.hajda@intel.com \
    --cc=chris.p.wilson@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.