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 v2] drm/i915/selftests: Flush the old heartbeat more gently
Date: Wed, 21 Oct 2020 20:57:35 +0300 [thread overview]
Message-ID: <87zh4fqx68.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20201019142841.32273-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> In order to test how fast the heartbeat can respond, we measure with the
> interval set to its minimum. Before we measure though, we want to be
> sure we start with a fresh pulse, and so wait until any old one is
> complete. During that wait though, we were continually flushing the
> work, and so continually re-evaluating to see if the pulse was complete,
> and each attempt would count as an unresponsive system. If the engine
> did not complete the request in the couple of busy-spins, it would flag
> an error. This is unfortunate, so let's not busy-spin waiting for the
> old heartbeat, but terminate it and start afresh.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
> index e73854dd2fe0..b88aa35ad75b 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
> @@ -215,16 +215,17 @@ static int __live_heartbeat_fast(struct intel_engine_cs *engine)
> goto err_pm;
>
> for (i = 0; i < ARRAY_SIZE(times); i++) {
> - /* Manufacture a tick */
> do {
> - while (READ_ONCE(engine->heartbeat.systole))
> - flush_delayed_work(&engine->heartbeat.work);
> + /* Manufacture a tick */
> + intel_engine_park_heartbeat(engine);
> + GEM_BUG_ON(engine->heartbeat.systole);
> + engine->serial++; /* pretend we are not idle! */
> + intel_engine_unpark_heartbeat(engine);
>
> - engine->serial++; /* quick, pretend we are not idle! */
> flush_delayed_work(&engine->heartbeat.work);
> if (!delayed_work_pending(&engine->heartbeat.work)) {
> - pr_err("%s: heartbeat did not start\n",
> - engine->name);
> + pr_err("%s: heartbeat %d did not start\n",
> + engine->name, i);
> err = -EINVAL;
> goto err_pm;
> }
> --
> 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
next prev parent reply other threads:[~2020-10-21 17:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 11:14 [Intel-gfx] [PATCH] drm/i915/selftests: Flush the old heartbeat more gently Chris Wilson
2020-10-19 12:31 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2020-10-19 14:28 ` [Intel-gfx] [PATCH v2] " Chris Wilson
2020-10-21 17:57 ` Mika Kuoppala [this message]
2020-10-19 15:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests: Flush the old heartbeat more gently (rev2) Patchwork
2020-10-19 16:25 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-10-20 12:54 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests: Flush the old heartbeat more gently (rev3) Patchwork
2020-10-20 16:31 ` [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=87zh4fqx68.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.