* [Intel-gfx] [PATCH] drm/i915/gt: Add one more rcu_barrier() after draining the ppGTT freelist
@ 2020-04-02 8:08 Chris Wilson
2020-04-02 8:44 ` Mika Kuoppala
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Chris Wilson @ 2020-04-02 8:08 UTC (permalink / raw)
To: intel-gfx; +Cc: Chris Wilson
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));
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/gt: Add one more rcu_barrier() after draining the ppGTT freelist
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
2020-04-02 8:48 ` Chris Wilson
2020-04-02 9:30 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
2020-04-02 15:50 ` [Intel-gfx] [PATCH] " kbuild test robot
2 siblings, 1 reply; 6+ messages in thread
From: Mika Kuoppala @ 2020-04-02 8:44 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: Chris Wilson
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/gt: Add one more rcu_barrier() after draining the ppGTT freelist
2020-04-02 8:44 ` Mika Kuoppala
@ 2020-04-02 8:48 ` Chris Wilson
2020-04-02 8:51 ` Chris Wilson
0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2020-04-02 8:48 UTC (permalink / raw)
To: Mika Kuoppala, intel-gfx
Quoting Mika Kuoppala (2020-04-02 09:44:33)
> 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?
Darnation. I see in i915_gem_drain_workqueue() we just did N passes :(
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/gt: Add one more rcu_barrier() after draining the ppGTT freelist
2020-04-02 8:48 ` Chris Wilson
@ 2020-04-02 8:51 ` Chris Wilson
0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2020-04-02 8:51 UTC (permalink / raw)
To: Mika Kuoppala, intel-gfx
Quoting Chris Wilson (2020-04-02 09:48:18)
> Quoting Mika Kuoppala (2020-04-02 09:44:33)
> > 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?
>
> Darnation. I see in i915_gem_drain_workqueue() we just did N passes :(
Waitasec this is i915->wq, we can just use i915_gem_drain_workqueue()
(although that's now a misnomer).
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gt: Add one more rcu_barrier() after draining the ppGTT freelist
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
@ 2020-04-02 9:30 ` Patchwork
2020-04-02 15:50 ` [Intel-gfx] [PATCH] " kbuild test robot
2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2020-04-02 9:30 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/gt: Add one more rcu_barrier() after draining the ppGTT freelist
URL : https://patchwork.freedesktop.org/series/75402/
State : failure
== Summary ==
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
DESCEND objtool
CHK include/generated/compile.h
CC [M] drivers/gpu/drm/i915/gt/intel_ggtt.o
drivers/gpu/drm/i915/gt/intel_ggtt.c: In function ‘ggtt_cleanup_hw’:
drivers/gpu/drm/i915/gt/intel_ggtt.c:688:11: error: void value not ignored as it ought to be
} while (flush_workqueue(ggtt->vm.i915->wq));
^~~~~~~~~~~~~~~
scripts/Makefile.build:267: recipe for target 'drivers/gpu/drm/i915/gt/intel_ggtt.o' failed
make[4]: *** [drivers/gpu/drm/i915/gt/intel_ggtt.o] Error 1
scripts/Makefile.build:505: recipe for target 'drivers/gpu/drm/i915' failed
make[3]: *** [drivers/gpu/drm/i915] Error 2
scripts/Makefile.build:505: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2
scripts/Makefile.build:505: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1683: recipe for target 'drivers' failed
make: *** [drivers] Error 2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/gt: Add one more rcu_barrier() after draining the ppGTT freelist
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
2020-04-02 9:30 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
@ 2020-04-02 15:50 ` kbuild test robot
2 siblings, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2020-04-02 15:50 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2409 bytes --]
Hi Chris,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip v5.6 next-20200402]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Chris-Wilson/drm-i915-gt-Add-one-more-rcu_barrier-after-draining-the-ppGTT-freelist/20200402-204936
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/gpu/drm/i915/gt/intel_ggtt.c: In function 'ggtt_cleanup_hw':
>> drivers/gpu/drm/i915/gt/intel_ggtt.c:671:11: error: void value not ignored as it ought to be
} while (flush_workqueue(ggtt->vm.i915->wq));
^~~~~~~~~~~~~~~
vim +671 drivers/gpu/drm/i915/gt/intel_ggtt.c
662
663 static void ggtt_cleanup_hw(struct i915_ggtt *ggtt)
664 {
665 struct i915_vma *vma, *vn;
666
667 atomic_set(&ggtt->vm.open, 0);
668
669 do { /* flush the RCU'ed__i915_vm_release */
670 rcu_barrier();
> 671 } while (flush_workqueue(ggtt->vm.i915->wq));
672
673 mutex_lock(&ggtt->vm.mutex);
674
675 list_for_each_entry_safe(vma, vn, &ggtt->vm.bound_list, vm_link)
676 WARN_ON(__i915_vma_unbind(vma));
677
678 if (drm_mm_node_allocated(&ggtt->error_capture))
679 drm_mm_remove_node(&ggtt->error_capture);
680 mutex_destroy(&ggtt->error_mutex);
681
682 ggtt_release_guc_top(ggtt);
683 intel_vgt_deballoon(ggtt);
684
685 ggtt->vm.cleanup(&ggtt->vm);
686
687 mutex_unlock(&ggtt->vm.mutex);
688 i915_address_space_fini(&ggtt->vm);
689
690 arch_phys_wc_del(ggtt->mtrr);
691
692 if (ggtt->iomap.size)
693 io_mapping_fini(&ggtt->iomap);
694 }
695
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 71706 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-04-02 15:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
2020-04-02 15:50 ` [Intel-gfx] [PATCH] " kbuild test robot
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.