All of 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
Subject: Re: [PATCH 6/9] drm/i915: Disable waitboosting for	fence_wait()
Date: Fri, 15 Jul 2016 13:49:44 +0300	[thread overview]
Message-ID: <87d1mfp453.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <1468577481-4798-7-git-send-email-chris@chris-wilson.co.uk>

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

> We want to restrict waitboosting to known process contexts, where we can
> track which clients are receiving waitboosts and prevent excessive power
> wasting. For fence_wait() we do not have any client tracking and so that
> leaves it open to abuse.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_gem_request.c | 7 ++++---
>  drivers/gpu/drm/i915/i915_gem_request.h | 1 +
>  2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
> index 6528536878f2..bfec4a88707d 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.c
> +++ b/drivers/gpu/drm/i915/i915_gem_request.c
> @@ -70,7 +70,7 @@ static signed long i915_fence_wait(struct fence *fence,
>  
>  	ret = __i915_wait_request(to_request(fence),
>  				  interruptible, timeout,
> -				  NULL);
> +				  NO_WAITBOOST);
>  	if (ret == -ETIME)
>  		return 0;
>  
> @@ -642,7 +642,7 @@ int __i915_wait_request(struct drm_i915_gem_request *req,
>  	 * forcing the clocks too high for the whole system, we only allow
>  	 * each client to waitboost once in a busy period.
>  	 */
> -	if (INTEL_GEN(req->i915) >= 6)
> +	if (!IS_ERR(rps) && INTEL_GEN(req->i915) >= 6)
>  		gen6_rps_boost(req->i915, rps, req->emitted_jiffies);
>

The intention here is to boost even if rps client is NULL?
Assuming so could you elaborate why.

Thanks,
-Mika


>  	/* Optimistic spin for the next ~jiffie before touching IRQs */
> @@ -713,7 +713,8 @@ complete:
>  			*timeout = 0;
>  	}
>  
> -	if (rps && req->fence.seqno == req->engine->last_submitted_seqno) {
> +	if (!IS_ERR_OR_NULL(rps) &&
> +	    req->fence.seqno == req->engine->last_submitted_seqno) {
>  		/* The GPU is now idle and this client has stalled.
>  		 * Since no other client has submitted a request in the
>  		 * meantime, assume that this client is the only one
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.h b/drivers/gpu/drm/i915/i915_gem_request.h
> index 6f2c820785f3..f7f497a07893 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.h
> +++ b/drivers/gpu/drm/i915/i915_gem_request.h
> @@ -206,6 +206,7 @@ void __i915_add_request(struct drm_i915_gem_request *req,
>  	__i915_add_request(req, NULL, false)
>  
>  struct intel_rps_client;
> +#define NO_WAITBOOST ERR_PTR(-1)
>  
>  int __i915_wait_request(struct drm_i915_gem_request *req,
>  			bool interruptible,
> -- 
> 2.8.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-07-15 10:50 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15 10:11 Derive requests from dma-buf fence Chris Wilson
2016-07-15 10:11 ` [PATCH 1/9] drm/i915: Flush logical context image out to memory upon suspend Chris Wilson
2016-07-15 10:41   ` Mika Kuoppala
2016-07-15 11:11     ` Chris Wilson
2016-07-15 10:11 ` [PATCH 2/9] drm/i915: Move GEM request routines to i915_gem_request.c Chris Wilson
2016-07-15 10:41   ` Joonas Lahtinen
2016-07-15 10:43   ` Mika Kuoppala
2016-07-15 10:11 ` [PATCH 3/9] drm/i915: Retire oldest completed request before allocating next Chris Wilson
2016-07-15 10:11 ` [PATCH 4/9] drm/i915: Mark all current requests as complete before resetting them Chris Wilson
2016-07-15 10:11 ` [PATCH 5/9] drm/i915: Derive GEM requests from dma-fence Chris Wilson
2016-07-15 10:11 ` [PATCH 6/9] drm/i915: Disable waitboosting for fence_wait() Chris Wilson
2016-07-15 10:47   ` Joonas Lahtinen
2016-07-15 11:08     ` Chris Wilson
2016-07-15 11:49       ` Chris Wilson
2016-07-15 12:07         ` Joonas Lahtinen
2016-07-15 10:49   ` Mika Kuoppala [this message]
2016-07-15 11:06     ` Chris Wilson
2016-07-15 11:53   ` [PATCH v2] " Chris Wilson
2016-07-15 12:25     ` Mika Kuoppala
2016-07-15 10:11 ` [PATCH 7/9] drm/i915: Disable waitboosting for mmioflips/semaphores Chris Wilson
2016-07-15 11:08   ` Mika Kuoppala
2016-07-15 12:50     ` Chris Wilson
2016-07-15 12:26   ` Mika Kuoppala
2016-07-15 10:11 ` [PATCH 8/9] drm/i915: Wait on external rendering for GEM objects Chris Wilson
2016-07-18 10:18   ` Chris Wilson
2016-07-19  6:45     ` Daniel Vetter
2016-07-15 10:11 ` [PATCH 9/9] drm/i915: Mark imported dma-buf objects as being coherent Chris Wilson
2016-07-15 11:33   ` Mika Kuoppala
2016-07-15 10:48 ` ✗ Ro.CI.BAT: failure for series starting with [1/9] drm/i915: Flush logical context image out to memory upon suspend 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=87d1mfp453.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@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.