From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH] drm/i915: Encourage our shrinker more when our shmemfs allocations fails
Date: Mon, 22 May 2017 11:23:58 +0300 [thread overview]
Message-ID: <1495441438.8642.2.camel@linux.intel.com> (raw)
In-Reply-To: <20170520093318.26674-1-chris@chris-wilson.co.uk>
On la, 2017-05-20 at 10:33 +0100, Chris Wilson wrote:
> Commit 24f8e00a8a2e ("drm/i915: Prefer to report ENOMEM rather than
> incur the oom for gfx allocations") made the bold decision to try and
> avoid the oomkiller by reporting -ENOMEM to userspace if our allocation
> failed after attempting to free enough buffer objects. In short, it
> appears we were giving up too easily (even before we start wondering if
> one pass of reclaim is as strong as we would like). Part of the problem
> is that if we only shrink just enough pages for our expected allocation,
> the likelihood of those pages becoming available to us is less than 100%
> To counter-act that we ask for twice the number of pages to be made
> available. Furthermore, we allow the shrinker to pull pages from the
> active list in later passes.
>
> 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>
2x factor seems like it might backfire in the future, I think I'd be
more comfortable with some fixed amount.
I'm also not sure if this logic should be outside of i915 module, needs
some A-b at least.
Code itself is,
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-05-22 8:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-20 9:33 [PATCH] drm/i915: Encourage our shrinker more when our shmemfs allocations fails Chris Wilson
2017-05-20 9:53 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-05-22 8:23 ` Joonas Lahtinen [this message]
2017-05-22 8:46 ` [PATCH] " Chris Wilson
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=1495441438.8642.2.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
/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.