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: Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gt: Include a few tracek for timeslicing
Date: Tue, 31 Mar 2020 16:06:41 +0300	[thread overview]
Message-ID: <87lfngptb2.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20200331120502.14713-1-chris@chris-wilson.co.uk>

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

> Add a few telltales to see when timeslicing is being enabled.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

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

> ---
>  drivers/gpu/drm/i915/gt/intel_lrc.c   | 20 +++++++++++++++++---
>  drivers/gpu/drm/i915/i915_scheduler.c |  6 ++++++
>  2 files changed, 23 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 744737e57d1d..55bf3cdf3b38 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -1814,16 +1814,25 @@ active_timeslice(const struct intel_engine_cs *engine)
>  
>  static void set_timeslice(struct intel_engine_cs *engine)
>  {
> +	unsigned long duration;
> +
>  	if (!intel_engine_has_timeslices(engine))
>  		return;
>  
> -	set_timer_ms(&engine->execlists.timer, active_timeslice(engine));
> +	duration = active_timeslice(engine);
> +	ENGINE_TRACE(engine, "bump timeslicing, interval:%lu", duration);
> +
> +	set_timer_ms(&engine->execlists.timer, duration);
>  }
>  
>  static void start_timeslice(struct intel_engine_cs *engine)
>  {
>  	struct intel_engine_execlists *execlists = &engine->execlists;
> -	int prio = queue_prio(execlists);
> +	const int prio = queue_prio(execlists);
> +	unsigned long duration;
> +
> +	if (!intel_engine_has_timeslices(engine))
> +		return;
>  
>  	WRITE_ONCE(execlists->switch_priority_hint, prio);
>  	if (prio == INT_MIN)
> @@ -1832,7 +1841,12 @@ static void start_timeslice(struct intel_engine_cs *engine)
>  	if (timer_pending(&execlists->timer))
>  		return;
>  
> -	set_timer_ms(&execlists->timer, timeslice(engine));
> +	duration = timeslice(engine);
> +	ENGINE_TRACE(engine,
> +		     "start timeslicing, prio:%d, interval:%lu",
> +		     prio, duration);
> +
> +	set_timer_ms(&execlists->timer, duration);
>  }
>  
>  static void record_preemption(struct intel_engine_execlists *execlists)
> diff --git a/drivers/gpu/drm/i915/i915_scheduler.c b/drivers/gpu/drm/i915/i915_scheduler.c
> index 68b06a7ba667..065176cb0258 100644
> --- a/drivers/gpu/drm/i915/i915_scheduler.c
> +++ b/drivers/gpu/drm/i915/i915_scheduler.c
> @@ -209,6 +209,12 @@ static void kick_submission(struct intel_engine_cs *engine,
>  	if (!inflight)
>  		goto unlock;
>  
> +	ENGINE_TRACE(engine,
> +		     "bumping queue-priority-hint:%d for rq:%llx:%lld, inflight:%llx:%lld prio %d\n",
> +		     prio,
> +		     rq->fence.context, rq->fence.seqno,
> +		     inflight->fence.context, inflight->fence.seqno,
> +		     inflight->sched.attr.priority);
>  	engine->execlists.queue_priority_hint = prio;
>  
>  	/*
> -- 
> 2.20.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

  reply	other threads:[~2020-03-31 13:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 12:05 [Intel-gfx] [PATCH] drm/i915/gt: Include a few tracek for timeslicing Chris Wilson
2020-03-31 13:06 ` Mika Kuoppala [this message]
2020-03-31 20:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-04-01 15:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=87lfngptb2.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox