All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 3/3] drm/i915/gt: Apply the CSB w/a for all
Date: Fri, 14 Aug 2020 20:41:32 +0100	[thread overview]
Message-ID: <159743409290.31882.4297809836771338545@build.alporthouse.com> (raw)
In-Reply-To: <87ft8p135h.fsf@gaia.fi.intel.com>

Quoting Mika Kuoppala (2020-08-14 19:41:14)
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > Since we expect to inline the csb_parse() routines, the w/a for the
> > stale CSB data on Tigerlake will be pulled into process_csb(), and so we
> > might as well simply reuse the logic for all, and so will hopefully
> > avoid any strange behaviour on Icelake that was not covered by our
> > previous w/a.
> >
> > References: d8f505311717 ("drm/i915/icl: Forcibly evict stale csb entries")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> > Cc: Bruce Chang <yu.bruce.chang@intel.com>
> > ---
> >  drivers/gpu/drm/i915/gt/intel_lrc.c | 70 +++++++++++++++++------------
> >  1 file changed, 42 insertions(+), 28 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> > index 3b8161c6b601..c176a029f27b 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> > @@ -2496,25 +2496,11 @@ invalidate_csb_entries(const u64 *first, const u64 *last)
> >   *     bits 47-57: sw context id of the lrc the GT switched away from
> >   *     bits 58-63: sw counter of the lrc the GT switched away from
> >   */
> > -static inline bool gen12_csb_parse(const u64 *csb)
> > +static inline bool gen12_csb_parse(const u64 csb)
> >  {
> > -     bool ctx_away_valid;
> > -     bool new_queue;
> > -     u64 entry;
> > -
> > -     /* XXX HSD */
> > -     entry = READ_ONCE(*csb);
> > -     if (unlikely(entry == -1)) {
> > -             preempt_disable();
> > -             if (wait_for_atomic_us((entry = READ_ONCE(*csb)) != -1, 50))
> 
> If we get this deep into desperation, should we start to apply more
> pressure. Ie, rmb instead of just instructing the compiler. And could also
> start to invalidate the entry which obviously if of no use.

I had a rmb() here; removing it did not appear to make any difference
whatsoever to the average delay. The extreme case would be a full
mb(); clflush(); mb() read. I haven't timed the average for that....
 
> It could even be that the invalidate pays out as the correct value
> bubbles throught hierarchy faster?

I had the same thought... But atm my feeling is the issue is not on the
CPU side (or at least controllable from our code on the CPU).
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-08-14 19:41 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14 15:57 [Intel-gfx] [PATCH 1/3] drm/i915/gt: Widen CSB pointer to u64 for the parsers Chris Wilson
2020-08-14 15:57 ` [PATCH 2/3] drm/i915/gt: Wait for CSB entries on Tigerlake Chris Wilson
2020-08-14 15:57   ` [Intel-gfx] " Chris Wilson
2020-08-14 18:07   ` Chang, Bruce
2020-08-14 18:07     ` [Intel-gfx] " Chang, Bruce
2020-08-14 18:38     ` Chris Wilson
2020-08-14 18:38       ` Chris Wilson
2020-08-15  0:36       ` Chang, Bruce
2020-08-15  0:36         ` Chang, Bruce
2020-08-15  2:16         ` Chang, Bruce
2020-08-15  2:16           ` Chang, Bruce
2020-08-15  9:59           ` Chris Wilson
2020-08-15  9:59             ` Chris Wilson
2020-08-15  9:53         ` Chris Wilson
2020-08-15  9:53           ` Chris Wilson
2020-08-14 15:57 ` [Intel-gfx] [PATCH 3/3] drm/i915/gt: Apply the CSB w/a for all Chris Wilson
2020-08-14 18:18   ` Chang, Bruce
2020-08-14 18:41   ` Mika Kuoppala
2020-08-14 19:41     ` Chris Wilson [this message]
2020-08-14 20:18       ` Chris Wilson
2020-08-17  9:02         ` Mika Kuoppala
2020-08-14 16:15 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915/gt: Widen CSB pointer to u64 for the parsers Patchwork
2020-08-14 16:16 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-08-14 16:34 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-08-14 18:07 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-08-14 18:29 ` [Intel-gfx] [PATCH 1/3] " Mika Kuoppala
2020-08-14 19:43   ` Chris Wilson

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=159743409290.31882.4297809836771338545@build.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@linux.intel.com \
    /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.