Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gt: Wait for RCUs frees before asserting idle on unload
Date: Fri, 13 Mar 2020 12:08:03 +0100	[thread overview]
Message-ID: <418fcb31-0c49-4205-1164-3e2078cd8b4e@linux.intel.com> (raw)
In-Reply-To: <20200312115307.16460-1-chris@chris-wilson.co.uk>

Op 12-03-2020 om 12:53 schreef Chris Wilson:
> During driver unload, we have many asserts that we have released our
> bookkeeping structs and are idle. In some cases, these struct are
> protected by RCU and we do not release them until after an RCU grace
> period.
>
> Reported-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Fixes: 130a95e9098e ("drm/i915/gem: Consolidate ctx->engines[] release")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_gt.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
> index 3dea8881e915..d09f7596cb98 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt.c
> @@ -667,6 +667,9 @@ void intel_gt_driver_release(struct intel_gt *gt)
>  
>  void intel_gt_driver_late_release(struct intel_gt *gt)
>  {
> +	/* We need to wait for inflight RCU frees to release their grip */
> +	rcu_barrier();
> +
>  	intel_uc_driver_late_release(&gt->uc);
>  	intel_gt_fini_requests(gt);
>  	intel_gt_fini_reset(gt);

Is it possible this is causing a hang on exit in gem_exec_parallel when I have an extra bunch of debug options enabled?

Also potentially seems to break selftests on cml :)

otherwise looks sane,

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2020-03-13 11:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 11:53 [Intel-gfx] [PATCH] drm/i915/gt: Wait for RCUs frees before asserting idle on unload Chris Wilson
2020-03-12 13:38 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2020-03-12 14:18 ` [Intel-gfx] [PATCH] " Tvrtko Ursulin
2020-03-12 16:16   ` [Intel-gfx] ***UNCHECKED*** " Chris Wilson
2020-03-12 15:53 ` [Intel-gfx] " Mika Kuoppala
2020-03-13 11:08 ` Maarten Lankhorst [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=418fcb31-0c49-4205-1164-3e2078cd8b4e@linux.intel.com \
    --to=maarten.lankhorst@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox