All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Initialise the obj->rcu head
@ 2018-11-08  9:21 Chris Wilson
  2018-11-08  9:21 ` [PATCH 2/2] drm/i915: Track rcu_head for our idle worker Chris Wilson
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Chris Wilson @ 2018-11-08  9:21 UTC (permalink / raw)
  To: intel-gfx

Make the rcu_head known to the system, in particular for debugobjects.
And having declared it for debugobjects, we need to tidy up afterwards.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108691
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 5b80b0c14aed..24f126ccf21e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4739,6 +4739,8 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
 	INIT_LIST_HEAD(&obj->lut_list);
 	INIT_LIST_HEAD(&obj->batch_pool_link);
 
+	init_rcu_head(&obj->rcu);
+
 	obj->ops = ops;
 
 	reservation_object_init(&obj->__builtin_resv);
@@ -4941,6 +4943,8 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915,
 		drm_gem_object_release(&obj->base);
 		i915_gem_info_remove_obj(i915, obj->base.size);
 
+		destroy_rcu_head(&obj->rcu);
+
 		kfree(obj->bit_17);
 		i915_gem_object_free(obj);
 
-- 
2.19.1

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] drm/i915: Track rcu_head for our idle worker
  2018-11-08  9:21 [PATCH 1/2] drm/i915: Initialise the obj->rcu head Chris Wilson
@ 2018-11-08  9:21 ` Chris Wilson
  2018-11-09 11:25   ` Mika Kuoppala
  2018-11-08 10:01 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Initialise the obj->rcu head Patchwork
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Chris Wilson @ 2018-11-08  9:21 UTC (permalink / raw)
  To: intel-gfx

While our little rcu worker might be able to be replaced now by the
dedicated rcu_work, in the meantime we should mark up the rcu_head for
correct debugobjects tracking.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 24f126ccf21e..5537f4030717 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3557,6 +3557,8 @@ static void __sleep_rcu(struct rcu_head *rcu)
 	struct sleep_rcu_work *s = container_of(rcu, typeof(*s), rcu);
 	struct drm_i915_private *i915 = s->i915;
 
+	destroy_rcu_head(&s->rcu);
+
 	if (same_epoch(i915, s->epoch)) {
 		INIT_WORK(&s->work, __sleep_work);
 		queue_work(i915->wq, &s->work);
@@ -3673,6 +3675,7 @@ i915_gem_idle_work_handler(struct work_struct *work)
 	if (same_epoch(dev_priv, epoch)) {
 		struct sleep_rcu_work *s = kmalloc(sizeof(*s), GFP_KERNEL);
 		if (s) {
+			init_rcu_head(&s->rcu);
 			s->i915 = dev_priv;
 			s->epoch = epoch;
 			call_rcu(&s->rcu, __sleep_rcu);
-- 
2.19.1

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Initialise the obj->rcu head
  2018-11-08  9:21 [PATCH 1/2] drm/i915: Initialise the obj->rcu head Chris Wilson
  2018-11-08  9:21 ` [PATCH 2/2] drm/i915: Track rcu_head for our idle worker Chris Wilson
@ 2018-11-08 10:01 ` Patchwork
  2018-11-09  8:40 ` [PATCH 1/2] " Mika Kuoppala
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-11-08 10:01 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Initialise the obj->rcu head
URL   : https://patchwork.freedesktop.org/series/52215/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_5103 -> Patchwork_10771 =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_10771 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10771, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/52215/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10771:

  === IGT changes ===

    ==== Possible regressions ====

    igt@drv_selftest@live_contexts:
      fi-kbl-7560u:       PASS -> INCOMPLETE

    
== Known issues ==

  Here are the changes found in Patchwork_10771 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_frontbuffer_tracking@basic:
      fi-icl-u:           PASS -> FAIL (fdo#103167)
      fi-icl-u2:          PASS -> FAIL (fdo#103167)

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
      fi-byt-clapper:     PASS -> FAIL (fdo#107362)

    
    ==== Possible fixes ====

    igt@gem_ctx_create@basic-files:
      fi-icl-u2:          DMESG-WARN (fdo#107724) -> PASS

    igt@kms_flip@basic-flip-vs-modeset:
      fi-hsw-4770r:       DMESG-WARN (fdo#105602) -> PASS

    igt@kms_pipe_crc_basic@read-crc-pipe-b:
      fi-byt-clapper:     FAIL (fdo#107362) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-byt-clapper:     FAIL (fdo#103191, fdo#107362) -> PASS

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         FAIL (fdo#104008) -> PASS

    
    ==== Warnings ====

    igt@drv_selftest@live_contexts:
      fi-icl-u2:          DMESG-FAIL (fdo#108569) -> INCOMPLETE (fdo#108315)

    
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107724 https://bugs.freedesktop.org/show_bug.cgi?id=107724
  fdo#108315 https://bugs.freedesktop.org/show_bug.cgi?id=108315
  fdo#108569 https://bugs.freedesktop.org/show_bug.cgi?id=108569


== Participating hosts (54 -> 47) ==

  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-snb-2520m fi-ctg-p8600 


== Build changes ==

    * Linux: CI_DRM_5103 -> Patchwork_10771

  CI_DRM_5103: 23c1138030ad65402f698ab0b356e2f55722bc77 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4712: a3ede1b535ac8137f6949c468edd7054453d5dae @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10771: 83a90a262ed2a7cd643b18e4f3fed02703155c55 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

83a90a262ed2 drm/i915: Track rcu_head for our idle worker
88b24fd717d8 drm/i915: Initialise the obj->rcu head

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10771/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] drm/i915: Initialise the obj->rcu head
  2018-11-08  9:21 [PATCH 1/2] drm/i915: Initialise the obj->rcu head Chris Wilson
  2018-11-08  9:21 ` [PATCH 2/2] drm/i915: Track rcu_head for our idle worker Chris Wilson
  2018-11-08 10:01 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Initialise the obj->rcu head Patchwork
@ 2018-11-09  8:40 ` Mika Kuoppala
  2018-11-09  9:00   ` Chris Wilson
  2018-11-09  9:03 ` [PATCH] " Chris Wilson
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Mika Kuoppala @ 2018-11-09  8:40 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Make the rcu_head known to the system, in particular for debugobjects.
> And having declared it for debugobjects, we need to tidy up afterwards.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108691
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 5b80b0c14aed..24f126ccf21e 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4739,6 +4739,8 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
>  	INIT_LIST_HEAD(&obj->lut_list);
>  	INIT_LIST_HEAD(&obj->batch_pool_link);
>  
> +	init_rcu_head(&obj->rcu);
> +
>  	obj->ops = ops;
>  
>  	reservation_object_init(&obj->__builtin_resv);
> @@ -4941,6 +4943,8 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915,
>  		drm_gem_object_release(&obj->base);
>  		i915_gem_info_remove_obj(i915, obj->base.size);
>  
> +		destroy_rcu_head(&obj->rcu);
> +

It looks like you need to break the union in struct drm_i915_gem_object
for this to work. Or did I get the ordering of events wrong?
-Mika

>  		kfree(obj->bit_17);
>  		i915_gem_object_free(obj);
>  
> -- 
> 2.19.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] 11+ messages in thread

* Re: [PATCH 1/2] drm/i915: Initialise the obj->rcu head
  2018-11-09  8:40 ` [PATCH 1/2] " Mika Kuoppala
@ 2018-11-09  9:00   ` Chris Wilson
  0 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2018-11-09  9:00 UTC (permalink / raw)
  To: Mika Kuoppala, intel-gfx

Quoting Mika Kuoppala (2018-11-09 08:40:56)
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > Make the rcu_head known to the system, in particular for debugobjects.
> > And having declared it for debugobjects, we need to tidy up afterwards.
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108691
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >  drivers/gpu/drm/i915/i915_gem.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> > index 5b80b0c14aed..24f126ccf21e 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -4739,6 +4739,8 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
> >       INIT_LIST_HEAD(&obj->lut_list);
> >       INIT_LIST_HEAD(&obj->batch_pool_link);
> >  
> > +     init_rcu_head(&obj->rcu);
> > +
> >       obj->ops = ops;
> >  
> >       reservation_object_init(&obj->__builtin_resv);
> > @@ -4941,6 +4943,8 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915,
> >               drm_gem_object_release(&obj->base);
> >               i915_gem_info_remove_obj(i915, obj->base.size);
> >  
> > +             destroy_rcu_head(&obj->rcu);
> > +
> 
> It looks like you need to break the union in struct drm_i915_gem_object
> for this to work. Or did I get the ordering of events wrong?

Not the ordering of events, just the insensitivity of debugobjects. All
we are saying here is to remove the hash of this pointer from the set
of debugobjects so that when this memory block is freed we do not
complain that the debugobject still exists. To address the complaint, we
can just move to where the rcu transitions to being the llist, which I
had forgotten about.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] drm/i915: Initialise the obj->rcu head
  2018-11-08  9:21 [PATCH 1/2] drm/i915: Initialise the obj->rcu head Chris Wilson
                   ` (2 preceding siblings ...)
  2018-11-09  8:40 ` [PATCH 1/2] " Mika Kuoppala
@ 2018-11-09  9:03 ` Chris Wilson
  2018-11-09 10:32   ` Mika Kuoppala
  2018-11-09  9:47 ` ✓ Fi.CI.BAT: success for series starting with drm/i915: Initialise the obj->rcu head (rev2) Patchwork
  2018-11-09 13:51 ` ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 1 reply; 11+ messages in thread
From: Chris Wilson @ 2018-11-09  9:03 UTC (permalink / raw)
  To: intel-gfx

Make the rcu_head known to the system, in particular for debugobjects.
And having declared it for debugobjects, we need to tidy up afterwards.

v2: mark the obj->rcu as being destroy when we reuse its location for
the freed list.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108691
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index dc120b5d8e05..1c9a41ea6834 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4739,6 +4739,8 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
 	INIT_LIST_HEAD(&obj->lut_list);
 	INIT_LIST_HEAD(&obj->batch_pool_link);
 
+	init_rcu_head(&obj->rcu);
+
 	obj->ops = ops;
 
 	reservation_object_init(&obj->__builtin_resv);
@@ -5005,6 +5007,13 @@ static void __i915_gem_free_object_rcu(struct rcu_head *head)
 		container_of(head, typeof(*obj), rcu);
 	struct drm_i915_private *i915 = to_i915(obj->base.dev);
 
+	/*
+	 * We reuse obj->rcu for the freed list, so we had better not treat
+	 * is like a rcu_head from this point forwards. And we expect all
+	 * objects to be freed via this path.
+	 */
+	destroy_rcu_head(&obj->rcu);
+
 	/*
 	 * Since we require blocking on struct_mutex to unbind the freed
 	 * object from the GPU before releasing resources back to the
-- 
2.19.1

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* ✓ Fi.CI.BAT: success for series starting with drm/i915: Initialise the obj->rcu head (rev2)
  2018-11-08  9:21 [PATCH 1/2] drm/i915: Initialise the obj->rcu head Chris Wilson
                   ` (3 preceding siblings ...)
  2018-11-09  9:03 ` [PATCH] " Chris Wilson
@ 2018-11-09  9:47 ` Patchwork
  2018-11-09 13:51 ` ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-11-09  9:47 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with drm/i915: Initialise the obj->rcu head (rev2)
URL   : https://patchwork.freedesktop.org/series/52215/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_5109 -> Patchwork_10789 =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_10789 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10789, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/52215/revisions/2/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10789:

  === IGT changes ===

    ==== Warnings ====

    igt@prime_vgem@basic-fence-flip:
      fi-ivb-3520m:       SKIP -> PASS

    
== Known issues ==

  Here are the changes found in Patchwork_10789 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_hangcheck:
      fi-icl-u2:          PASS -> INCOMPLETE (fdo#108315)

    igt@gem_exec_suspend@basic-s4-devices:
      fi-blb-e6850:       NOTRUN -> INCOMPLETE (fdo#107718)

    igt@kms_frontbuffer_tracking@basic:
      fi-icl-u2:          PASS -> FAIL (fdo#103167)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_contexts:
      fi-bsw-n3050:       DMESG-FAIL (fdo#108626) -> PASS

    igt@gem_ctx_create@basic-files:
      fi-icl-u2:          DMESG-WARN (fdo#107724) -> PASS

    igt@gem_exec_suspend@basic-s3:
      fi-blb-e6850:       INCOMPLETE (fdo#107718) -> PASS

    igt@kms_chamelium@common-hpd-after-suspend:
      fi-skl-6700k2:      WARN (fdo#108680) -> PASS

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
      fi-byt-clapper:     FAIL (fdo#107362, fdo#103191) -> PASS

    
    ==== Warnings ====

    igt@drv_selftest@live_contexts:
      fi-icl-u2:          DMESG-FAIL (fdo#108569) -> INCOMPLETE (fdo#108315)

    
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
  fdo#107724 https://bugs.freedesktop.org/show_bug.cgi?id=107724
  fdo#108315 https://bugs.freedesktop.org/show_bug.cgi?id=108315
  fdo#108569 https://bugs.freedesktop.org/show_bug.cgi?id=108569
  fdo#108626 https://bugs.freedesktop.org/show_bug.cgi?id=108626
  fdo#108680 https://bugs.freedesktop.org/show_bug.cgi?id=108680


== Participating hosts (53 -> 46) ==

  Additional (1): fi-pnv-d510 
  Missing    (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-snb-2520m fi-ctg-p8600 fi-icl-u 


== Build changes ==

    * Linux: CI_DRM_5109 -> Patchwork_10789

  CI_DRM_5109: fd007cc63a9d60ac2a6f966a3c790e710aa8ca94 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4714: cab148ca3ec904a94d0cd43476cf7e1f8663f906 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10789: 4a9b9fbd2a9a370107c4b7f2de4345662ef74ba3 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

4a9b9fbd2a9a drm/i915: Track rcu_head for our idle worker
31751eadbb09 drm/i915: Initialise the obj->rcu head

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10789/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] drm/i915: Initialise the obj->rcu head
  2018-11-09  9:03 ` [PATCH] " Chris Wilson
@ 2018-11-09 10:32   ` Mika Kuoppala
  2018-11-09 10:49     ` Chris Wilson
  0 siblings, 1 reply; 11+ messages in thread
From: Mika Kuoppala @ 2018-11-09 10:32 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Make the rcu_head known to the system, in particular for debugobjects.
> And having declared it for debugobjects, we need to tidy up afterwards.
>
> v2: mark the obj->rcu as being destroy when we reuse its location for
> the freed list.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108691
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index dc120b5d8e05..1c9a41ea6834 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4739,6 +4739,8 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
>  	INIT_LIST_HEAD(&obj->lut_list);
>  	INIT_LIST_HEAD(&obj->batch_pool_link);
>  
> +	init_rcu_head(&obj->rcu);
> +
>  	obj->ops = ops;
>  
>  	reservation_object_init(&obj->__builtin_resv);
> @@ -5005,6 +5007,13 @@ static void __i915_gem_free_object_rcu(struct rcu_head *head)
>  		container_of(head, typeof(*obj), rcu);
>  	struct drm_i915_private *i915 = to_i915(obj->base.dev);
>  
> +	/*
> +	 * We reuse obj->rcu for the freed list, so we had better not treat
> +	 * is like a rcu_head from this point forwards. And we expect all
> +	 * objects to be freed via this path.
> +	 */
> +	destroy_rcu_head(&obj->rcu);
> +
>  	/*
>  	 * Since we require blocking on struct_mutex to unbind the freed
>  	 * object from the GPU before releasing resources back to the
> -- 
> 2.19.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] 11+ messages in thread

* Re: [PATCH] drm/i915: Initialise the obj->rcu head
  2018-11-09 10:32   ` Mika Kuoppala
@ 2018-11-09 10:49     ` Chris Wilson
  0 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2018-11-09 10:49 UTC (permalink / raw)
  To: Mika Kuoppala, intel-gfx

Quoting Mika Kuoppala (2018-11-09 10:32:30)
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > Make the rcu_head known to the system, in particular for debugobjects.
> > And having declared it for debugobjects, we need to tidy up afterwards.
> >
> > v2: mark the obj->rcu as being destroy when we reuse its location for
> > the freed list.
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108691
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> 
> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

Merged the first as it will close a couple of bugs, care to check over
the second? :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] drm/i915: Track rcu_head for our idle worker
  2018-11-08  9:21 ` [PATCH 2/2] drm/i915: Track rcu_head for our idle worker Chris Wilson
@ 2018-11-09 11:25   ` Mika Kuoppala
  0 siblings, 0 replies; 11+ messages in thread
From: Mika Kuoppala @ 2018-11-09 11:25 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

Chris Wilson <chris@chris-wilson.co.uk> writes:

> While our little rcu worker might be able to be replaced now by the
> dedicated rcu_work, in the meantime we should mark up the rcu_head for
> correct debugobjects tracking.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

I got distracted on looking how the epoch works.

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 24f126ccf21e..5537f4030717 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3557,6 +3557,8 @@ static void __sleep_rcu(struct rcu_head *rcu)
>  	struct sleep_rcu_work *s = container_of(rcu, typeof(*s), rcu);
>  	struct drm_i915_private *i915 = s->i915;
>  
> +	destroy_rcu_head(&s->rcu);
> +
>  	if (same_epoch(i915, s->epoch)) {
>  		INIT_WORK(&s->work, __sleep_work);
>  		queue_work(i915->wq, &s->work);
> @@ -3673,6 +3675,7 @@ i915_gem_idle_work_handler(struct work_struct *work)
>  	if (same_epoch(dev_priv, epoch)) {
>  		struct sleep_rcu_work *s = kmalloc(sizeof(*s), GFP_KERNEL);
>  		if (s) {
> +			init_rcu_head(&s->rcu);
>  			s->i915 = dev_priv;
>  			s->epoch = epoch;
>  			call_rcu(&s->rcu, __sleep_rcu);
> -- 
> 2.19.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] 11+ messages in thread

* ✓ Fi.CI.IGT: success for series starting with drm/i915: Initialise the obj->rcu head (rev2)
  2018-11-08  9:21 [PATCH 1/2] drm/i915: Initialise the obj->rcu head Chris Wilson
                   ` (4 preceding siblings ...)
  2018-11-09  9:47 ` ✓ Fi.CI.BAT: success for series starting with drm/i915: Initialise the obj->rcu head (rev2) Patchwork
@ 2018-11-09 13:51 ` Patchwork
  5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-11-09 13:51 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with drm/i915: Initialise the obj->rcu head (rev2)
URL   : https://patchwork.freedesktop.org/series/52215/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_5109_full -> Patchwork_10789_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_10789_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10789_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10789_full:

  === IGT changes ===

    ==== Warnings ====

    igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-untiled:
      shard-snb:          PASS -> SKIP

    
== Known issues ==

  Here are the changes found in Patchwork_10789_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
      shard-glk:          NOTRUN -> DMESG-WARN (fdo#107956) +3

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a:
      shard-hsw:          PASS -> DMESG-WARN (fdo#107956)

    igt@kms_color@pipe-c-legacy-gamma:
      shard-apl:          PASS -> FAIL (fdo#104782)

    igt@kms_cursor_crc@cursor-256x256-suspend:
      shard-apl:          PASS -> FAIL (fdo#103191, fdo#103232)

    igt@kms_cursor_crc@cursor-256x85-onscreen:
      shard-glk:          NOTRUN -> FAIL (fdo#103232) +1

    igt@kms_cursor_crc@cursor-64x21-random:
      shard-apl:          PASS -> FAIL (fdo#103232) +2

    igt@kms_flip@2x-flip-vs-expired-vblank:
      shard-glk:          PASS -> FAIL (fdo#105363)

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
      shard-apl:          PASS -> FAIL (fdo#103167) +1

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-render:
      shard-glk:          PASS -> FAIL (fdo#103167)

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
      shard-glk:          NOTRUN -> FAIL (fdo#103167) +3

    igt@kms_plane_alpha_blend@pipe-c-alpha-transparant-fb:
      shard-glk:          NOTRUN -> FAIL (fdo#108145) +4

    igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
      shard-apl:          PASS -> FAIL (fdo#103166) +1

    igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
      shard-glk:          NOTRUN -> FAIL (fdo#103166) +1

    igt@prime_vgem@basic-fence-flip:
      shard-kbl:          PASS -> FAIL (fdo#104008)

    
    ==== Possible fixes ====

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a:
      shard-kbl:          DMESG-WARN (fdo#107956) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite:
      shard-apl:          FAIL (fdo#103167) -> PASS +2

    igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
      shard-apl:          FAIL (fdo#103166) -> PASS

    
  fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#104782 https://bugs.freedesktop.org/show_bug.cgi?id=104782
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
  fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145


== Participating hosts (6 -> 5) ==

  Missing    (1): shard-skl 


== Build changes ==

    * Linux: CI_DRM_5109 -> Patchwork_10789

  CI_DRM_5109: fd007cc63a9d60ac2a6f966a3c790e710aa8ca94 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4714: cab148ca3ec904a94d0cd43476cf7e1f8663f906 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10789: 4a9b9fbd2a9a370107c4b7f2de4345662ef74ba3 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10789/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-11-09 13:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-08  9:21 [PATCH 1/2] drm/i915: Initialise the obj->rcu head Chris Wilson
2018-11-08  9:21 ` [PATCH 2/2] drm/i915: Track rcu_head for our idle worker Chris Wilson
2018-11-09 11:25   ` Mika Kuoppala
2018-11-08 10:01 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Initialise the obj->rcu head Patchwork
2018-11-09  8:40 ` [PATCH 1/2] " Mika Kuoppala
2018-11-09  9:00   ` Chris Wilson
2018-11-09  9:03 ` [PATCH] " Chris Wilson
2018-11-09 10:32   ` Mika Kuoppala
2018-11-09 10:49     ` Chris Wilson
2018-11-09  9:47 ` ✓ Fi.CI.BAT: success for series starting with drm/i915: Initialise the obj->rcu head (rev2) Patchwork
2018-11-09 13:51 ` ✓ Fi.CI.IGT: " Patchwork

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.