Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 04/54] drm/i915: Mark up protected uses of 'i915_request_completed'
Date: Tue, 29 Dec 2020 14:17:08 +0200	[thread overview]
Message-ID: <X+sY3mt1mLT8hFvc@intel.intel> (raw)
In-Reply-To: <20201228155229.9516-4-chris@chris-wilson.co.uk>

Hi Chris,

> When we know that we are inside the timeline mutex, or inside the
> submission flow (under active.lock or the holder's rcu lock), we know
> that the rq->hwsp is stable and we can use the simpler direct version.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_context.c     |  2 +-
>  drivers/gpu/drm/i915/gt/intel_breadcrumbs.c     |  4 ++--
>  drivers/gpu/drm/i915/gt/intel_engine_cs.c       |  2 +-
>  drivers/gpu/drm/i915/gt/intel_reset.c           |  3 +--
>  drivers/gpu/drm/i915/gt/intel_ring_submission.c |  4 +++-
>  drivers/gpu/drm/i915/gt/intel_timeline.c        |  4 ++--
>  drivers/gpu/drm/i915/i915_request.c             | 15 +++++++--------
>  7 files changed, 17 insertions(+), 17 deletions(-)

have you also missed a couple of cases in
intel_execlists_submission.c and i915_scheduler.c?

[...]

> diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
> index b85b6f3dcd60..e0b4291393ec 100644
> --- a/drivers/gpu/drm/i915/gt/intel_reset.c
> +++ b/drivers/gpu/drm/i915/gt/intel_reset.c
> @@ -151,8 +151,7 @@ static void mark_innocent(struct i915_request *rq)
>  void __i915_request_reset(struct i915_request *rq, bool guilty)
>  {
>  	RQ_TRACE(rq, "guilty? %s\n", yesno(guilty));
> -
> -	GEM_BUG_ON(i915_request_completed(rq));
> +	GEM_BUG_ON(__i915_request_is_complete(rq));

aren't you outside the lock here?

Andi

>  
>  	rcu_read_lock(); /* protect the GEM context */
>  	if (guilty) {
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-12-29 12:17 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-28 15:51 [Intel-gfx] [PATCH 01/54] drm/i915/gt: Cancel submitted requests upon context reset Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 02/54] drm/i915/gt: Pull context closure check from request submit to schedule-in Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 03/54] drm/i915/gem: Peek at the inflight context Chris Wilson
2020-12-29 12:18   ` Andi Shyti
2020-12-28 15:51 ` [Intel-gfx] [PATCH 04/54] drm/i915: Mark up protected uses of 'i915_request_completed' Chris Wilson
2020-12-29 12:17   ` Andi Shyti [this message]
2020-12-29 12:23     ` Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 05/54] drm/i915: Drop i915_request.lock serialisation around await_start Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 06/54] drm/i915: Drop i915_request.lock requirement for intel_rps_boost() Chris Wilson
2020-12-30 14:22   ` Mika Kuoppala
2020-12-28 15:51 ` [Intel-gfx] [PATCH 07/54] drm/i915/gem: Reduce ctx->engine_mutex for reading the clone source Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 08/54] drm/i915/gem: Reduce ctx->engines_mutex for get_engines() Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 09/54] drm/i915: Reduce test_and_set_bit to set_bit in i915_request_submit() Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 10/54] drm/i915/gt: Drop atomic for engine->fw_active tracking Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 11/54] drm/i915/gt: Extract busy-stats for ring-scheduler Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 12/54] drm/i915/gt: Convert stats.active to plain unsigned int Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 13/54] drm/i915/gt: Do not suspend bonded requests if one hangs Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 14/54] drm/i915/gt: Remove timeslice suppression Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 15/54] drm/i915/gt: Skip over completed active execlists, again Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 16/54] drm/i915: Strip out internal priorities Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 17/54] drm/i915: Remove I915_USER_PRIORITY_SHIFT Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 18/54] drm/i915: Replace engine->schedule() with a known request operation Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 19/54] drm/i915: Teach the i915_dependency to use a double-lock Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 20/54] drm/i915: Restructure priority inheritance Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 21/54] drm/i915/selftests: Measure set-priority duration Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 22/54] drm/i915/selftests: Exercise priority inheritance around an engine loop Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 23/54] drm/i915: Improve DFS for priority inheritance Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 24/54] drm/i915: Extract request submission from execlists Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 25/54] drm/i915: Extract request rewinding " Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 26/54] drm/i915: Extract request suspension from the execlists backend Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 27/54] drm/i915: Extract the ability to defer and rerun a request later Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 28/54] drm/i915: Fix the iterative dfs for defering requests Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 29/54] drm/i915: Move common active lists from engine to i915_scheduler Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 30/54] drm/i915: Move scheduler queue Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 31/54] drm/i915: Move tasklet from execlists to sched Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 32/54] drm/i915: Replace priolist rbtree with a skiplist Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 33/54] drm/i915: Wrap cmpxchg64 with try_cmpxchg64() helper Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 34/54] drm/i915: Fair low-latency scheduling Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 35/54] drm/i915/gt: Specify a deadline for the heartbeat Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 36/54] drm/i915: Extend the priority boosting for the display with a deadline Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 37/54] drm/i915/gt: Support virtual engine queues Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 38/54] drm/i915: Move saturated workload detection back to the context Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 39/54] drm/i915: Bump default timeslicing quantum to 5ms Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 40/54] drm/i915/gt: Wrap intel_timeline.has_initial_breadcrumb Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 41/54] drm/i915/gt: Track timeline GGTT offset separately from subpage offset Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 42/54] drm/i915/gt: Add timeline "mode" Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 43/54] drm/i915/gt: Use indices for writing into relative timelines Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 44/54] drm/i915/selftests: Exercise relative timeline modes Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 45/54] drm/i915/gt: Use ppHWSP for unshared non-semaphore related timelines Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 46/54] Restore "drm/i915: drop engine_pin/unpin_breadcrumbs_irq" Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 47/54] drm/i915/gt: Couple tasklet scheduling for all CS interrupts Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 48/54] drm/i915/gt: Support creation of 'internal' rings Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 49/54] drm/i915/gt: Use client timeline address for seqno writes Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 50/54] drm/i915/gt: Infrastructure for ring scheduling Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 51/54] drm/i915/gt: Enable busy-stats for ring-scheduler Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 52/54] drm/i915/gt: Implement ring scheduler for gen6/7 Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 53/54] drm/i915/gt: Enable ring scheduling " Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 54/54] drm/i915/gt: Limit C-states while waiting for requests Chris Wilson
2020-12-29  9:39 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/54] drm/i915/gt: Cancel submitted requests upon context reset Patchwork
2020-12-29  9:41 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-12-29 10:27 ` [Intel-gfx] ✗ Fi.CI.BAT: 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=X+sY3mt1mLT8hFvc@intel.intel \
    --to=andi.shyti@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox