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 1/5] drm/i915/execlist: Mark up racy read of execlists->pending[0]
Date: Wed, 29 Jan 2020 15:11:10 +0200 [thread overview]
Message-ID: <87eevi9zm9.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20200128204318.4182039-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> We write to execlists->pending[0] in process_csb() to acknowledge the
> completion of the ESLP update, outside of the main spinlock. When we
> check the current status of the previous submission in
> __execlists_submission_tasklet() we should therefore use READ_ONCE() to
> reflect and document the unsynchronized read.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
From other thread so also in here,
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_lrc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index cf6c43bd540a..058484958e87 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -2347,7 +2347,7 @@ static void process_csb(struct intel_engine_cs *engine)
> static void __execlists_submission_tasklet(struct intel_engine_cs *const engine)
> {
> lockdep_assert_held(&engine->active.lock);
> - if (!engine->execlists.pending[0]) {
> + if (!READ_ONCE(engine->execlists.pending[0])) {
> rcu_read_lock(); /* protect peeking at execlists->active */
> execlists_dequeue(engine);
> rcu_read_unlock();
> --
> 2.25.0
>
> _______________________________________________
> 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-01-29 13:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 20:43 [Intel-gfx] [PATCH 1/5] drm/i915/execlist: Mark up racy read of execlists->pending[0] Chris Wilson
2020-01-28 20:43 ` [Intel-gfx] [PATCH 2/5] drm/i915/gt: Hook up CS_MASTER_ERROR_INTERRUPT Chris Wilson
2020-01-28 20:43 ` [Intel-gfx] [PATCH 3/5] drm/i915/gt: Yield the timeslice if caught waiting on a user semaphore Chris Wilson
2020-01-28 20:43 ` [Intel-gfx] [PATCH 4/5] drm/i915/gt: Rename lrc.c to execlists_submission.c Chris Wilson
2020-01-28 21:37 ` Daniele Ceraolo Spurio
2020-01-28 20:43 ` [Intel-gfx] [PATCH 5/5] drm/i915/gt: Split logical ring context manipulation into intel_lrc.c Chris Wilson
2020-01-28 21:55 ` Daniele Ceraolo Spurio
2020-01-28 22:08 ` Chris Wilson
2020-01-28 22:44 ` Daniele Ceraolo Spurio
2020-01-28 23:50 ` Daniele Ceraolo Spurio
2020-01-29 2:10 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915/execlist: Mark up racy read of execlists->pending[0] Patchwork
2020-01-29 2:29 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-01-29 13:11 ` Mika Kuoppala [this message]
2020-01-31 2:30 ` [Intel-gfx] ✓ 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=87eevi9zm9.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.