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: [Intel-gfx] [PATCH] drm/i915/selftests: Rearrange ktime_get to reduce latency against CS
Date: Wed, 13 Jan 2021 12:52:40 +0200	[thread overview]
Message-ID: <87ft35kt1j.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <161048398029.9280.6299529944985317684@build.alporthouse.com>

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

> Quoting Mika Kuoppala (2021-01-12 19:19:34)
>> Chris Wilson <chris@chris-wilson.co.uk> writes:
>> 
>> > In our tests where we measure the elapsed time on both the CPU and CS
>> > using a udelay, our CS results match the udelay much more accurately
>> > than the ktime (even when using ktime_get_fast_ns). With preemption
>> > disabled, we can go one step lower than ktime and use local_clock.
>> >
>> > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2919
>> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> > ---
>> >  drivers/gpu/drm/i915/gt/selftest_engine_pm.c | 4 ++--
>> >  1 file changed, 2 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_pm.c b/drivers/gpu/drm/i915/gt/selftest_engine_pm.c
>> > index ca080445695e..c3d965279fc3 100644
>> > --- a/drivers/gpu/drm/i915/gt/selftest_engine_pm.c
>> > +++ b/drivers/gpu/drm/i915/gt/selftest_engine_pm.c
>> > @@ -112,11 +112,11 @@ static int __measure_timestamps(struct intel_context *ce,
>> >  
>> >       /* Run the request for a 100us, sampling timestamps before/after */
>> >       preempt_disable();
>> 
>> Do you need to promote this to local_irq_disable() ?
>
> Good suggestion. Will try to remember if we still see discrepancies...
>
> Interrupt handlers are meant to <5us, right???

With both test types, we might sometimes find out what they are :)

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

> -Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2021-01-13 10:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08 10:56 [Intel-gfx] [PATCH] drm/i915/selftests: Rearrange ktime_get to reduce latency against CS Chris Wilson
2021-01-08 12:46 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-01-08 15:32 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-01-12 19:19 ` [Intel-gfx] [PATCH] " Mika Kuoppala
2021-01-12 20:39   ` Chris Wilson
2021-01-13 10:52     ` Mika Kuoppala [this message]

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=87ft35kt1j.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.