From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/6] drm/i915: Set our shrinker->batch to 4096 (~16MiB)
Date: Wed, 20 Sep 2017 16:28:40 +0300 [thread overview]
Message-ID: <1505914120.8291.35.camel@linux.intel.com> (raw)
In-Reply-To: <150289170455.16279.246822248429488685@mail.alporthouse.com>
On Wed, 2017-08-16 at 14:55 +0100, Chris Wilson wrote:
> Quoting Joonas Lahtinen (2017-08-16 14:39:00)
> > On Sat, 2017-08-12 at 12:51 +0100, Chris Wilson wrote:
> > > Prefer to defer activating our GEM shrinker until we have a few
> > > megabytes to free; or we have accumulated sufficient mempressure by
> > > deferring the reclaim to force a shrink. The intent is that because our
> > > objects may typically be large, we are too effective at shrinking and
> > > are not rewarded for freeing more pages than the batch. It will also
> > > defer the initial shrinking to hopefully put it at a lower priority than
> > > say the buffer cache (although it will balance out over a number of
> > > reclaims, with GEM being more bursty).
> > >
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > ---
> > > drivers/gpu/drm/i915/i915_gem_shrinker.c | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/gpu/drm/i915/i915_gem_shrinker.c b/drivers/gpu/drm/i915/i915_gem_shrinker.c
> > > index 5b8bc0e4f336..8bb17e9a52de 100644
> > > --- a/drivers/gpu/drm/i915/i915_gem_shrinker.c
> > > +++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c
> > > @@ -461,6 +461,7 @@ void i915_gem_shrinker_init(struct drm_i915_private *dev_priv)
> > > dev_priv->mm.shrinker.scan_objects = i915_gem_shrinker_scan;
> > > dev_priv->mm.shrinker.count_objects = i915_gem_shrinker_count;
> > > dev_priv->mm.shrinker.seeks = DEFAULT_SEEKS;
> > > + dev_priv->mm.shrinker.batch = 4096;
> >
> > Did you try how this alone effects the runtime of two consequtive
> > gem.testlist runs? Is there some specific test/usecase that benefits
> > from this. We'd be the first one to set this, md/raid5.c sets it to 128
> > which is the default (0).
>
> My testing was trying to play a game that was hitting swap on an old
> hdd. So not very quantifiable, and vmscan is very unintuitive.
>
> Note also that we are special in that we don't report objects but pages.
> Not that it makes any difference, upon reclaim every slab is basically
> asked to give up some %% of what it reports, with some hysteresis thrown
> in on top.
>
> The only way we can do anything here is to throw it at lots of systems
> and see how that helps. My gut feeling says that the batch size should
> be approximately the typical object size in the freeable list, to try to
> reduce the amount of inefficient work. Now, the value is read before
> scan->count is called, but we can always improve the estimate for the
> next pass.
For documentation purposes, from IRC, this 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-09-20 13:29 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-12 11:51 [PATCH 1/6] drm/i915: Refactor testing obj->mm.pages Chris Wilson
2017-08-12 11:51 ` [PATCH 2/6] drm/i915: Remove walk over obj->vma_list for the shrinker Chris Wilson
2017-08-15 14:56 ` Joonas Lahtinen
2017-08-15 15:05 ` Chris Wilson
2017-08-15 16:17 ` [PATCH 1/2] drm/i915: Rename obj->pin_display to obj->pin_global Chris Wilson
2017-08-15 16:17 ` [PATCH 2/2] drm/i915: Drop debugfs/i915_gem_pin_display Chris Wilson
2017-08-12 11:51 ` [PATCH 3/6] drm/i915: Move dev_priv->mm.[un]bound_list to its own lock Chris Wilson
2017-08-16 13:13 ` Joonas Lahtinen
2017-08-12 11:51 ` [PATCH 4/6] drm/i915: Set our shrinker->batch to 4096 (~16MiB) Chris Wilson
2017-08-16 13:39 ` Joonas Lahtinen
2017-08-16 13:55 ` Chris Wilson
2017-08-16 14:23 ` [PATCH v2] " Chris Wilson
2017-08-18 12:56 ` Chris Wilson
2017-08-18 22:48 ` Chris Wilson
2017-09-20 13:28 ` Joonas Lahtinen [this message]
2017-09-26 15:02 ` [PATCH 4/6] " Chris Wilson
2017-09-27 8:38 ` Joonas Lahtinen
2017-09-27 8:54 ` Chris Wilson
2017-08-12 11:51 ` [PATCH 5/6] drm/i915: Trim struct_mutex hold duration for i915_gem_free_objects Chris Wilson
2017-08-12 11:51 ` [PATCH 6/6] drm/i915: Only free the oldest stale object before a fresh allocation Chris Wilson
2017-08-16 13:53 ` Joonas Lahtinen
2017-08-12 12:09 ` ✓ Fi.CI.BAT: success for series starting with [1/6] drm/i915: Refactor testing obj->mm.pages Patchwork
2017-08-15 16:46 ` ✗ Fi.CI.BAT: failure for series starting with [1/6] drm/i915: Refactor testing obj->mm.pages (rev3) Patchwork
2017-08-16 14:54 ` ✓ Fi.CI.BAT: success for series starting with [1/6] drm/i915: Refactor testing obj->mm.pages (rev4) Patchwork
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=1505914120.8291.35.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--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.