From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Flush context free work on cleanup
Date: Tue, 12 Nov 2019 13:55:35 +0000 [thread overview]
Message-ID: <5a7b2d59-2ede-3b09-dbc3-c575730a28a8@linux.intel.com> (raw)
In-Reply-To: <20191112090638.31692-1-chris@chris-wilson.co.uk>
On 12/11/2019 09:06, Chris Wilson wrote:
> Throw in a flush_work() and rcu_barrier() to specifically flush the
> context cleanup work.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112248
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: a4e7ccdac38e ("drm/i915: Move context management under GEM")
? Might have gotten it wrong.. only did a quick dig.
> ---
> drivers/gpu/drm/i915/gem/i915_gem_context.c | 1 +
> drivers/gpu/drm/i915/gt/intel_engine_cs.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> index 72d389afa28a..17f395672e5e 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> @@ -776,6 +776,7 @@ int i915_gem_init_contexts(struct drm_i915_private *i915)
> void i915_gem_driver_release__contexts(struct drm_i915_private *i915)
> {
> destroy_kernel_context(&i915->kernel_context);
> + flush_work(&i915->gem.contexts.free_work);
> }
>
> static int context_idr_cleanup(int id, void *p, void *data)
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> index b9613d044393..1f68700a2311 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> @@ -402,6 +402,7 @@ void intel_engines_cleanup(struct intel_gt *gt)
> gt->engine[id] = NULL;
> gt->i915->engine[id] = NULL;
> }
> + rcu_barrier();
Why this?
> }
>
> /**
>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Flush context free work on cleanup
Date: Tue, 12 Nov 2019 13:55:35 +0000 [thread overview]
Message-ID: <5a7b2d59-2ede-3b09-dbc3-c575730a28a8@linux.intel.com> (raw)
Message-ID: <20191112135535.UmsUSL10JpqlQ_-9RaYCVC0CxebVlxS6Q9nc8p1hxiY@z> (raw)
In-Reply-To: <20191112090638.31692-1-chris@chris-wilson.co.uk>
On 12/11/2019 09:06, Chris Wilson wrote:
> Throw in a flush_work() and rcu_barrier() to specifically flush the
> context cleanup work.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112248
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: a4e7ccdac38e ("drm/i915: Move context management under GEM")
? Might have gotten it wrong.. only did a quick dig.
> ---
> drivers/gpu/drm/i915/gem/i915_gem_context.c | 1 +
> drivers/gpu/drm/i915/gt/intel_engine_cs.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> index 72d389afa28a..17f395672e5e 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> @@ -776,6 +776,7 @@ int i915_gem_init_contexts(struct drm_i915_private *i915)
> void i915_gem_driver_release__contexts(struct drm_i915_private *i915)
> {
> destroy_kernel_context(&i915->kernel_context);
> + flush_work(&i915->gem.contexts.free_work);
> }
>
> static int context_idr_cleanup(int id, void *p, void *data)
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> index b9613d044393..1f68700a2311 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> @@ -402,6 +402,7 @@ void intel_engines_cleanup(struct intel_gt *gt)
> gt->engine[id] = NULL;
> gt->i915->engine[id] = NULL;
> }
> + rcu_barrier();
Why this?
> }
>
> /**
>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-11-12 13:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 9:06 [PATCH] drm/i915: Flush context free work on cleanup Chris Wilson
2019-11-12 9:06 ` [Intel-gfx] " Chris Wilson
2019-11-12 10:15 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-11-12 10:15 ` [Intel-gfx] " Patchwork
2019-11-12 13:55 ` Tvrtko Ursulin [this message]
2019-11-12 13:55 ` [Intel-gfx] [PATCH] " Tvrtko Ursulin
2019-11-12 14:04 ` Chris Wilson
2019-11-12 14:04 ` [Intel-gfx] " Chris Wilson
2019-11-12 14:36 ` ✗ Fi.CI.IGT: failure for " Patchwork
2019-11-12 14:36 ` [Intel-gfx] " Patchwork
2019-11-12 15:00 ` [PATCH v2] " Chris Wilson
2019-11-12 15:00 ` [Intel-gfx] " Chris Wilson
2019-11-12 16:01 ` Mika Kuoppala
2019-11-12 16:01 ` [Intel-gfx] " Mika Kuoppala
2019-11-12 20:03 ` ✗ Fi.CI.BAT: failure for drm/i915: Flush context free work on cleanup (rev2) Patchwork
2019-11-12 20:03 ` [Intel-gfx] " 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=5a7b2d59-2ede-3b09-dbc3-c575730a28a8@linux.intel.com \
--to=tvrtko.ursulin@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.