Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Matthew Auld <matthew.auld@intel.com>
Subject: Re: [PATCH] drm/i915/selftests: Disable shrinker across mmap-exhaustion
Date: Thu, 11 Oct 2018 16:56:42 +0300	[thread overview]
Message-ID: <87zhvkio2t.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20181011103748.18387-1-chris@chris-wilson.co.uk>

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

> For mmap-exhaustion, we deliberately put the system under a large amount
> of pressure to ensure that we are able to reap mmap-offsets from dead
> objects. If background activity does that reaping for us, that defeats
> the purpose of the test and in some cases will fail our sanity checks
> (because of the fake activity we use to prevent the idle worker).
>

mark_obj_busy will both pin and mark the object as active. And we
have disabled the retire worker. So how can an active object
end up being purged?

-Mika

> Fixes: 932cac10c8fb ("drm/i915/selftests: Prevent background reaping of acti
> ve objects")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> ---
>  drivers/gpu/drm/i915/selftests/i915_gem_object.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_object.c b/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> index 6d3516d5bff9..c3999dd2021e 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> @@ -501,6 +501,8 @@ static bool assert_mmap_offset(struct drm_i915_private *i915,
>  
>  static void disable_retire_worker(struct drm_i915_private *i915)
>  {
> +	i915_gem_shrinker_unregister(i915);
> +
>  	mutex_lock(&i915->drm.struct_mutex);
>  	if (!i915->gt.active_requests++) {
>  		intel_runtime_pm_get(i915);
> @@ -613,6 +615,7 @@ static int igt_mmap_offset_exhaustion(void *arg)
>  	else
>  		queue_delayed_work(i915->wq, &i915->gt.idle_work, 0);
>  	mutex_unlock(&i915->drm.struct_mutex);
> +	i915_gem_shrinker_register(i915);
>  	return err;
>  err_obj:
>  	i915_gem_object_put(obj);
> -- 
> 2.19.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-10-11 13:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-11 10:37 [PATCH] drm/i915/selftests: Disable shrinker across mmap-exhaustion Chris Wilson
2018-10-11 11:22 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-10-11 13:56 ` Mika Kuoppala [this message]
2018-10-11 14:37   ` [PATCH] " Chris Wilson
2018-10-11 14:47     ` Mika Kuoppala
2018-10-11 15:51 ` ✓ Fi.CI.IGT: success for " 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=87zhvkio2t.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox