From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gt: Add one more rcu_barrier() after draining the ppGTT freelist
Date: Thu, 02 Apr 2020 11:44:33 +0300 [thread overview]
Message-ID: <878sjep98u.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20200402080805.20292-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Since gen7 full-ppgtt uses nested vm references (the ppGTT is a slot
> within the global GTT and so has a buried i915_ggtt) we may need to go
> through a couple of RCU barriers before we have freed all the structs.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/gt/intel_ggtt.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c b/drivers/gpu/drm/i915/gt/intel_ggtt.c
> index 894d08e5a21f..cb31ed712db3 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ggtt.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c
> @@ -684,8 +684,9 @@ static void ggtt_cleanup_hw(struct i915_ggtt *ggtt)
>
> atomic_set(&ggtt->vm.open, 0);
>
> - rcu_barrier(); /* flush the RCU'ed__i915_vm_release */
> - flush_workqueue(ggtt->vm.i915->wq);
> + do { /* flush the RCU'ed__i915_vm_release */
> + rcu_barrier();
> + } while (flush_workqueue(ggtt->vm.i915->wq));
flush_workqueue returns void. you want flush_work?
-Mika
>
> mutex_lock(&ggtt->vm.mutex);
>
> --
> 2.20.1
>
> _______________________________________________
> 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-04-02 8:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-02 8:08 [Intel-gfx] [PATCH] drm/i915/gt: Add one more rcu_barrier() after draining the ppGTT freelist Chris Wilson
2020-04-02 8:44 ` Mika Kuoppala [this message]
2020-04-02 8:48 ` Chris Wilson
2020-04-02 8:51 ` Chris Wilson
2020-04-02 9:30 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " 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=878sjep98u.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox