From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 01/19] drm/i915/execlists: Always clear ring_pause if we do not submit
Date: Mon, 24 Jun 2019 13:23:08 +0300 [thread overview]
Message-ID: <87k1db5lkj.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <156136787988.15678.9866740483242300072@skylake-alporthouse-com>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Quoting Mika Kuoppala (2019-06-24 10:03:48)
>> Chris Wilson <chris@chris-wilson.co.uk> writes:
>>
>> > In the unlikely case (thank you CI!), we may find ourselves wanting to
>> > issue a preemption but having no runnable requests left. In this case,
>> > we set the semaphore before computing the preemption and so must unset
>> > it before forgetting (or else we leave the machine busywaiting until the
>> > next request comes along and so likely hang).
>> >
>> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> > ---
>> > drivers/gpu/drm/i915/gt/intel_lrc.c | 9 ++++++++-
>> > 1 file changed, 8 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
>> > index c8a0c9b32764..efccc31887de 100644
>> > --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
>> > +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
>> > @@ -233,13 +233,18 @@ static inline u32 intel_hws_preempt_address(struct intel_engine_cs *engine)
>> > static inline void
>> > ring_set_paused(const struct intel_engine_cs *engine, int state)
>> > {
>> > + u32 *sema = &engine->status_page.addr[I915_GEM_HWS_PREEMPT];
>> > +
>> > + if (*sema == state)
>> > + return;
>> > +
>>
>> So you want to avoid useless wmb, as I don't see other
>> benefit. Makes this look suspiciously racy but seems
>> to be just my usual paranoia.
>
> Instead of the readback,
> if (state)
> wmb();
> would also work, if we ditch one half the paranoia. That's better.
Ok, as unpausing should not be so critical. So both forms
of paranoia is fine with me.
For wmb one can think of it as a paranoia or one can think it of as
documentation. Or both.
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
prev parent reply other threads:[~2019-06-24 10:23 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-24 5:42 [PATCH 01/19] drm/i915/execlists: Always clear ring_pause if we do not submit Chris Wilson
2019-06-24 5:42 ` [PATCH 02/19] drm/i915/execlists: Convert recursive defer_request() into an iteractive Chris Wilson
2019-06-24 5:42 ` [PATCH 03/19] drm/i915/gt: Pass intel_gt to pm routines Chris Wilson
2019-06-24 5:43 ` [PATCH 04/19] drm/i915/selftests: Serialise nop reset with retirement Chris Wilson
2019-06-24 5:43 ` [PATCH 05/19] drm/i915/selftest: Drop manual request wakerefs around hangcheck Chris Wilson
2019-06-24 5:43 ` [PATCH 06/19] drm/i915/selftests: Fixup atomic reset checking Chris Wilson
2019-06-24 5:43 ` [PATCH 07/19] drm/i915: Rename intel_wakeref_[is]_active Chris Wilson
2019-06-25 18:31 ` Matthew Auld
2019-06-24 5:43 ` [PATCH 08/19] drm/i915: Add a wakeref getter for iff the wakeref is already active Chris Wilson
2019-06-24 5:43 ` [PATCH 09/19] drm/i915: Only recover active engines Chris Wilson
2019-06-24 5:43 ` [PATCH 10/19] drm/i915: Lift intel_engines_resume() to callers Chris Wilson
2019-06-24 5:43 ` [PATCH 11/19] drm/i915: Teach execbuffer to take the engine wakeref not GT Chris Wilson
2019-06-24 5:43 ` [PATCH 12/19] drm/i915/gt: Track timeline activeness in enter/exit Chris Wilson
2019-06-24 5:43 ` [PATCH 13/19] drm/i915/gt: Convert timeline tracking to spinlock Chris Wilson
2019-06-24 5:43 ` [PATCH 14/19] drm/i915/gt: Guard timeline pinning with its own mutex Chris Wilson
2019-06-24 5:43 ` [PATCH 15/19] drm/i915/selftests: Hold ref on request across waits Chris Wilson
2019-06-24 5:43 ` [PATCH 16/19] drm/i915/gt: Always call kref_init for the timeline Chris Wilson
2019-06-24 5:43 ` [PATCH 17/19] drm/i915/gt: Drop stale commentary for timeline density Chris Wilson
2019-06-24 5:43 ` [PATCH 18/19] drm/i915: Protect request retirement with timeline->mutex Chris Wilson
2019-06-24 5:43 ` [PATCH 19/19] drm/i915: Replace struct_mutex for batch pool serialisation Chris Wilson
2019-06-24 19:36 ` Matthew Auld
2019-06-24 6:32 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/19] drm/i915/execlists: Always clear ring_pause if we do not submit Patchwork
2019-06-24 6:39 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-06-24 6:51 ` ✓ Fi.CI.BAT: success " Patchwork
2019-06-24 8:55 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-06-24 12:34 ` Chris Wilson
2019-06-24 9:03 ` [PATCH 01/19] " Mika Kuoppala
2019-06-24 9:09 ` Chris Wilson
2019-06-24 9:17 ` Chris Wilson
2019-06-24 10:23 ` 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=87k1db5lkj.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.