From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915/tgl: Magic interrupt shadow to relieve some random lockups
Date: Mon, 30 Sep 2019 15:02:49 +0300 [thread overview]
Message-ID: <8736gem1p2.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190930091135.11971-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> My current theory is that this masks interrupt delivery to the local CPU
> during a critical phase. Purely papering over the symptoms with a delay
> plucked out of thin air from testing on tgl1-gem, refined slightly by
> just waiting for the next ack (though technically the next CS event may
> not be the corresponding event for this submit, but an intermediate
> completion).
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Andi Shyti <andi.shyti@intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_lrc.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index ab725a6ca0ac..35410d647b52 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -1155,6 +1155,7 @@ assert_pending_valid(const struct intel_engine_execlists *execlists,
> static void execlists_submit_ports(struct intel_engine_cs *engine)
> {
> struct intel_engine_execlists *execlists = &engine->execlists;
> + unsigned int tail = READ_ONCE(*execlists->csb_write);
> unsigned int n;
>
> GEM_BUG_ON(!assert_pending_valid(execlists, "submit"));
> @@ -1186,6 +1187,14 @@ static void execlists_submit_ports(struct intel_engine_cs *engine)
> /* we need to manually load the submit queue */
> if (execlists->ctrl_reg)
> writel(EL_CTRL_LOAD, execlists->ctrl_reg);
> +
I don't doubt we forget this but a comment would still be
good that we limit the intr generation for reasons still
unknown.
> + if (IS_TIGERLAKE(engine->i915)) {
> + u64 start = local_clock();
> + do
> + cpu_relax();
> + while (tail == READ_ONCE(*execlists->csb_write) &&
> + (local_clock() - start) >> 20 == 0);
1ms..well, if it works :O
Need to track this closely and pls consider limiting this to current revid
just so that we would notice the diff immediately when we get updates.
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> + }
> }
>
> static bool ctx_single_port_submission(const struct intel_context *ce)
> --
> 2.23.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-09-30 12:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-28 10:01 [PATCH] drm/i915/tgl: Magic udelay to relieve the random lockups with multiple engines Chris Wilson
2019-09-28 10:20 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-09-28 10:43 ` ✓ Fi.CI.BAT: success " Patchwork
2019-09-28 20:03 ` ✓ Fi.CI.IGT: " Patchwork
2019-09-29 20:25 ` [PATCH] " Andi Shyti
2019-09-30 7:43 ` Chris Wilson
2019-09-30 9:11 ` [PATCH v2] drm/i915/tgl: Magic interrupt shadow to relieve some random lockups Chris Wilson
2019-09-30 12:02 ` Mika Kuoppala [this message]
2019-09-30 12:09 ` Chris Wilson
2019-09-30 9:57 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tgl: Magic udelay to relieve the random lockups with multiple engines (rev2) Patchwork
2019-09-30 10:23 ` ✓ Fi.CI.BAT: success " Patchwork
2019-09-30 12:20 ` ✓ Fi.CI.IGT: " 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=8736gem1p2.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.