public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 03/11] drm/i915: Move the ban period onto the	context
Date: Wed, 07 Jan 2015 13:07:14 +0200	[thread overview]
Message-ID: <87mw5u4zod.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <1419437627-8670-4-git-send-email-rodrigo.vivi@intel.com>

Rodrigo Vivi <rodrigo.vivi@intel.com> writes:

> From: Chris Wilson <chris@chris-wilson.co.uk>
>
> This will allow us to set per-file, or even per-context, periods in the
> future.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_drv.h         | 5 +++++
>  drivers/gpu/drm/i915/i915_gem.c         | 3 ++-
>  drivers/gpu/drm/i915/i915_gem_context.c | 2 ++
>  3 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 921e4c5..3749415 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -678,6 +678,11 @@ struct i915_ctx_hang_stats {
>  	/* Time when this context was last blamed for a GPU reset */
>  	unsigned long guilty_ts;
>  
> +	/* If the contexts causes a second GPU hang within this time,
> +	 * it is permanently banned from submitting any more work.
> +	 */
> +	unsigned long ban_period_seconds;
> +
>  	/* This context is banned to submit more work */
>  	bool banned;
>  };
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 2b6ecfd..67e9100 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2547,7 +2547,8 @@ static bool i915_context_is_banned(struct drm_i915_private *dev_priv,
>  	if (ctx->hang_stats.banned)
>  		return true;
>  
> -	if (elapsed <= DRM_I915_CTX_BAN_PERIOD) {
> +	if (ctx->hang_stats.ban_period_seconds &&
> +	    elapsed <= ctx->hang_stats.ban_period_seconds) {
>  		if (!i915_gem_context_is_default(ctx)) {
>  			DRM_DEBUG("context hanging too fast, banning!\n");
>  			return true;
> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> index 9b23fb1..bf9778e 100644
> --- a/drivers/gpu/drm/i915/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> @@ -222,6 +222,8 @@ __create_hw_context(struct drm_device *dev,
>  	 * is no remap info, it will be a NOP. */
>  	ctx->remap_slice = (1 << NUM_L3_SLICES(dev)) - 1;
>  
> +	ctx->hang_stats.ban_period_seconds = DRM_I915_CTX_BAN_PERIOD;
> +
>  	return ctx;
>  
>  err_out:
> -- 
> 1.9.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-01-07 11:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-24 16:13 [PATCH 00/11] drm-intel-collector - update Rodrigo Vivi
2014-12-24 16:13 ` [PATCH 01/11] drm/i915: Specify bsd rings through exec flag Rodrigo Vivi
2014-12-24 16:13 ` [PATCH 02/11] drm/i915: add I915_PARAM_HAS_BSD2 to i915_getparam Rodrigo Vivi
2014-12-24 16:13 ` [PATCH 03/11] drm/i915: Move the ban period onto the context Rodrigo Vivi
2015-01-07 11:07   ` Mika Kuoppala [this message]
2014-12-24 16:13 ` [PATCH 04/11] drm/i915: Add ioctl to set per-context parameters Rodrigo Vivi
2015-01-07 11:57   ` Mika Kuoppala
2015-01-07 13:08     ` Daniel Vetter
2015-01-07 13:18       ` Chris Wilson
2015-01-07 14:13         ` Mika Kuoppala
2015-01-07 14:21           ` [PATCH] tests/gem_reset_stats: add tests for ban period ioctl Mika Kuoppala
2015-01-07 14:21             ` Chris Wilson
2015-01-07 16:49               ` Daniel Vetter
2014-12-24 16:13 ` [PATCH 05/11] drm/i915: Put logical pipe_control emission into a helper Rodrigo Vivi
2014-12-24 16:13 ` [PATCH 06/11] drm/i915: Add WaCsStallBeforeStateCacheInvalidate:bdw, chv to logical ring Rodrigo Vivi
2014-12-24 16:13 ` [PATCH 07/11] drm/i915: Remove pinned check from madvise_ioctl Rodrigo Vivi
2014-12-24 16:13 ` [PATCH 08/11] drm/i915: Extend GET_APERTURE ioctl to report available map space Rodrigo Vivi
2014-12-24 16:13 ` [PATCH 09/11] drm/i915: Display current hangcheck status in debugfs Rodrigo Vivi
2014-12-24 16:13 ` [PATCH 10/11] drm/i915/vlv: check port in infoframe_enabled v2 Rodrigo Vivi
2014-12-24 16:13 ` [PATCH 11/11] drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg Rodrigo Vivi

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=87mw5u4zod.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@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