All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser
@ 2017-11-10 22:58 Chris Wilson
  2017-11-10 23:18 ` Matthew Auld
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Chris Wilson @ 2017-11-10 22:58 UTC (permalink / raw)
  To: intel-gfx; +Cc: Matthew Auld

Move all of the i915->mm initialisation to a private function that can
be reused by the mock i915 device to save forgetting any more steps.

For example,
<7>[ 1542.046332] [IGT] drv_selftest: starting subtest mock_objects
<4>[ 1542.123924] Setting dangerous option mock_selftests - tainting kernel
<6>[ 1542.167941] i915: Performing mock selftests with st_random_seed=0x246f5ab5 st_timeout=1000
<4>[ 1542.178012] INFO: trying to register non-static key.
<4>[ 1542.178027] the code is fine but needs lockdep annotation.
<4>[ 1542.178032] turning off the locking correctness validator.
<4>[ 1542.178041] CPU: 3 PID: 6008 Comm: kworker/3:7 Tainted: G     U          4.14.0-rc8-CI-CI_DRM_3332+ #1
<4>[ 1542.178049] Hardware name:                  /NUC6CAYB, BIOS AYAPLCEL.86A.0040.2017.0619.1722 06/19/2017
<4>[ 1542.178144] Workqueue: events __i915_gem_free_work [i915]
<4>[ 1542.178152] Call Trace:
<4>[ 1542.178163]  dump_stack+0x68/0x9f
<4>[ 1542.178170]  register_lock_class+0x3fd/0x580
<4>[ 1542.178177]  ? unwind_next_frame+0x14/0x20
<4>[ 1542.178184]  ? __save_stack_trace+0x73/0xd0
<4>[ 1542.178191]  __lock_acquire+0xa4/0x1b00
<4>[ 1542.178254]  ? __i915_gem_free_work+0x28/0xa0 [i915]
<4>[ 1542.178261]  ? __lock_acquire+0x4ab/0x1b00
<4>[ 1542.178268]  lock_acquire+0xb0/0x200
<4>[ 1542.178273]  ? lock_acquire+0xb0/0x200
<4>[ 1542.178336]  ? __i915_gem_free_work+0x28/0xa0 [i915]
<4>[ 1542.178344]  _raw_spin_lock+0x32/0x50
<4>[ 1542.178405]  ? __i915_gem_free_work+0x28/0xa0 [i915]
<4>[ 1542.178468]  __i915_gem_free_work+0x28/0xa0 [i915]
<4>[ 1542.178476]  process_one_work+0x221/0x650
<4>[ 1542.178483]  worker_thread+0x4e/0x3c0
<4>[ 1542.178489]  kthread+0x114/0x150
<4>[ 1542.178494]  ? process_one_work+0x650/0x650
<4>[ 1542.178499]  ? kthread_create_on_node+0x40/0x40
<4>[ 1542.178506]  ret_from_fork+0x27/0x40

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c                  | 25 +++++++++++++++---------
 drivers/gpu/drm/i915/selftests/mock_gem_device.c |  8 +-------
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 80963c81c2ca..351247b49c79 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5233,6 +5233,21 @@ i915_gem_load_init_fences(struct drm_i915_private *dev_priv)
 	i915_gem_detect_bit_6_swizzle(dev_priv);
 }
 
+static void i915_gem_init_mm(struct drm_i915_private *i915)
+{
+	spin_lock_init(&i915->mm.obj_lock);
+	spin_lock_init(&i915->mm.free_lock);
+
+	init_llist_head(&i915->mm.free_list);
+
+	INIT_LIST_HEAD(&i915->mm.unbound_list);
+	INIT_LIST_HEAD(&i915->mm.bound_list);
+	INIT_LIST_HEAD(&i915->mm.fence_list);
+	INIT_LIST_HEAD(&i915->mm.userfault_list);
+
+	INIT_WORK(&i915->mm.free_work, __i915_gem_free_work);
+}
+
 int
 i915_gem_load_init(struct drm_i915_private *dev_priv)
 {
@@ -5274,15 +5289,7 @@ i915_gem_load_init(struct drm_i915_private *dev_priv)
 	if (err)
 		goto err_priorities;
 
-	INIT_WORK(&dev_priv->mm.free_work, __i915_gem_free_work);
-
-	spin_lock_init(&dev_priv->mm.obj_lock);
-	spin_lock_init(&dev_priv->mm.free_lock);
-	init_llist_head(&dev_priv->mm.free_list);
-	INIT_LIST_HEAD(&dev_priv->mm.unbound_list);
-	INIT_LIST_HEAD(&dev_priv->mm.bound_list);
-	INIT_LIST_HEAD(&dev_priv->mm.fence_list);
-	INIT_LIST_HEAD(&dev_priv->mm.userfault_list);
+	i915_gem_init_mm(dev_priv);
 
 	INIT_DELAYED_WORK(&dev_priv->gt.retire_work,
 			  i915_gem_retire_work_handler);
diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index d2bf2729c331..2df47239e8a0 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@ -179,9 +179,8 @@ struct drm_i915_private *mock_gem_device(void)
 		I915_GTT_PAGE_SIZE_64K |
 		I915_GTT_PAGE_SIZE_2M;
 
-	spin_lock_init(&i915->mm.object_stat_lock);
-	spin_lock_init(&i915->mm.obj_lock);
 	mock_uncore_init(i915);
+	i915_gem_init_mm(i915);
 
 	init_waitqueue_head(&i915->gpu_error.wait_queue);
 	init_waitqueue_head(&i915->gpu_error.reset_queue);
@@ -190,11 +189,6 @@ struct drm_i915_private *mock_gem_device(void)
 	if (!i915->wq)
 		goto put_device;
 
-	INIT_WORK(&i915->mm.free_work, __i915_gem_free_work);
-	init_llist_head(&i915->mm.free_list);
-	INIT_LIST_HEAD(&i915->mm.unbound_list);
-	INIT_LIST_HEAD(&i915->mm.bound_list);
-
 	mock_init_contexts(i915);
 
 	INIT_DELAYED_WORK(&i915->gt.retire_work, mock_retire_work_handler);
-- 
2.15.0

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

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

* Re: [PATCH] drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser
  2017-11-10 22:58 [PATCH] drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser Chris Wilson
@ 2017-11-10 23:18 ` Matthew Auld
  2017-11-10 23:22   ` Chris Wilson
  2017-11-10 23:24 ` [PATCH v2] " Chris Wilson
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Matthew Auld @ 2017-11-10 23:18 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Intel Graphics Development, Matthew Auld

On 10 November 2017 at 22:58, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Move all of the i915->mm initialisation to a private function that can
> be reused by the mock i915 device to save forgetting any more steps.
>
> For example,
> <7>[ 1542.046332] [IGT] drv_selftest: starting subtest mock_objects
> <4>[ 1542.123924] Setting dangerous option mock_selftests - tainting kernel
> <6>[ 1542.167941] i915: Performing mock selftests with st_random_seed=0x246f5ab5 st_timeout=1000
> <4>[ 1542.178012] INFO: trying to register non-static key.
> <4>[ 1542.178027] the code is fine but needs lockdep annotation.
> <4>[ 1542.178032] turning off the locking correctness validator.
> <4>[ 1542.178041] CPU: 3 PID: 6008 Comm: kworker/3:7 Tainted: G     U          4.14.0-rc8-CI-CI_DRM_3332+ #1
> <4>[ 1542.178049] Hardware name:                  /NUC6CAYB, BIOS AYAPLCEL.86A.0040.2017.0619.1722 06/19/2017
> <4>[ 1542.178144] Workqueue: events __i915_gem_free_work [i915]
> <4>[ 1542.178152] Call Trace:
> <4>[ 1542.178163]  dump_stack+0x68/0x9f
> <4>[ 1542.178170]  register_lock_class+0x3fd/0x580
> <4>[ 1542.178177]  ? unwind_next_frame+0x14/0x20
> <4>[ 1542.178184]  ? __save_stack_trace+0x73/0xd0
> <4>[ 1542.178191]  __lock_acquire+0xa4/0x1b00
> <4>[ 1542.178254]  ? __i915_gem_free_work+0x28/0xa0 [i915]
> <4>[ 1542.178261]  ? __lock_acquire+0x4ab/0x1b00
> <4>[ 1542.178268]  lock_acquire+0xb0/0x200
> <4>[ 1542.178273]  ? lock_acquire+0xb0/0x200
> <4>[ 1542.178336]  ? __i915_gem_free_work+0x28/0xa0 [i915]
> <4>[ 1542.178344]  _raw_spin_lock+0x32/0x50
> <4>[ 1542.178405]  ? __i915_gem_free_work+0x28/0xa0 [i915]
> <4>[ 1542.178468]  __i915_gem_free_work+0x28/0xa0 [i915]
> <4>[ 1542.178476]  process_one_work+0x221/0x650
> <4>[ 1542.178483]  worker_thread+0x4e/0x3c0
> <4>[ 1542.178489]  kthread+0x114/0x150
> <4>[ 1542.178494]  ? process_one_work+0x650/0x650
> <4>[ 1542.178499]  ? kthread_create_on_node+0x40/0x40
> <4>[ 1542.178506]  ret_from_fork+0x27/0x40
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Matthew Auld <matthew.auld@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c                  | 25 +++++++++++++++---------
>  drivers/gpu/drm/i915/selftests/mock_gem_device.c |  8 +-------
>  2 files changed, 17 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 80963c81c2ca..351247b49c79 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -5233,6 +5233,21 @@ i915_gem_load_init_fences(struct drm_i915_private *dev_priv)
>         i915_gem_detect_bit_6_swizzle(dev_priv);
>  }
>
> +static void i915_gem_init_mm(struct drm_i915_private *i915)
> +{
> +       spin_lock_init(&i915->mm.obj_lock);
> +       spin_lock_init(&i915->mm.free_lock);
> +
> +       init_llist_head(&i915->mm.free_list);
> +
> +       INIT_LIST_HEAD(&i915->mm.unbound_list);
> +       INIT_LIST_HEAD(&i915->mm.bound_list);
> +       INIT_LIST_HEAD(&i915->mm.fence_list);
> +       INIT_LIST_HEAD(&i915->mm.userfault_list);
> +
> +       INIT_WORK(&i915->mm.free_work, __i915_gem_free_work);
> +}
> +
>  int
>  i915_gem_load_init(struct drm_i915_private *dev_priv)
>  {
> @@ -5274,15 +5289,7 @@ i915_gem_load_init(struct drm_i915_private *dev_priv)
>         if (err)
>                 goto err_priorities;
>
> -       INIT_WORK(&dev_priv->mm.free_work, __i915_gem_free_work);
> -
> -       spin_lock_init(&dev_priv->mm.obj_lock);
> -       spin_lock_init(&dev_priv->mm.free_lock);
> -       init_llist_head(&dev_priv->mm.free_list);
> -       INIT_LIST_HEAD(&dev_priv->mm.unbound_list);
> -       INIT_LIST_HEAD(&dev_priv->mm.bound_list);
> -       INIT_LIST_HEAD(&dev_priv->mm.fence_list);
> -       INIT_LIST_HEAD(&dev_priv->mm.userfault_list);
> +       i915_gem_init_mm(dev_priv);
>
>         INIT_DELAYED_WORK(&dev_priv->gt.retire_work,
>                           i915_gem_retire_work_handler);
> diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> index d2bf2729c331..2df47239e8a0 100644
> --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> @@ -179,9 +179,8 @@ struct drm_i915_private *mock_gem_device(void)
>                 I915_GTT_PAGE_SIZE_64K |
>                 I915_GTT_PAGE_SIZE_2M;
>
> -       spin_lock_init(&i915->mm.object_stat_lock);
I think we still need this, no?
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser
  2017-11-10 23:18 ` Matthew Auld
@ 2017-11-10 23:22   ` Chris Wilson
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Wilson @ 2017-11-10 23:22 UTC (permalink / raw)
  To: Matthew Auld; +Cc: Intel Graphics Development, Matthew Auld

Quoting Matthew Auld (2017-11-10 23:18:41)
> On 10 November 2017 at 22:58, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> > index d2bf2729c331..2df47239e8a0 100644
> > --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> > +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> > @@ -179,9 +179,8 @@ struct drm_i915_private *mock_gem_device(void)
> >                 I915_GTT_PAGE_SIZE_64K |
> >                 I915_GTT_PAGE_SIZE_2M;
> >
> > -       spin_lock_init(&i915->mm.object_stat_lock);
> I think we still need this, no?

Sounds useful. Apparently we init that over in i915_drv.c.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH v2] drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser
  2017-11-10 22:58 [PATCH] drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser Chris Wilson
  2017-11-10 23:18 ` Matthew Auld
@ 2017-11-10 23:24 ` Chris Wilson
  2017-11-10 23:40   ` Matthew Auld
  2017-11-10 23:52 ` ✓ Fi.CI.BAT: success for drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser (rev2) Patchwork
  2017-11-11  1:55 ` ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 1 reply; 8+ messages in thread
From: Chris Wilson @ 2017-11-10 23:24 UTC (permalink / raw)
  To: intel-gfx; +Cc: Matthew Auld

Move all of the i915->mm initialisation to a private function that can
be reused by the mock i915 device to save forgetting any more steps.

For example,
<7>[ 1542.046332] [IGT] drv_selftest: starting subtest mock_objects
<4>[ 1542.123924] Setting dangerous option mock_selftests - tainting kernel
<6>[ 1542.167941] i915: Performing mock selftests with st_random_seed=0x246f5ab5 st_timeout=1000
<4>[ 1542.178012] INFO: trying to register non-static key.
<4>[ 1542.178027] the code is fine but needs lockdep annotation.
<4>[ 1542.178032] turning off the locking correctness validator.
<4>[ 1542.178041] CPU: 3 PID: 6008 Comm: kworker/3:7 Tainted: G     U          4.14.0-rc8-CI-CI_DRM_3332+ #1
<4>[ 1542.178049] Hardware name:                  /NUC6CAYB, BIOS AYAPLCEL.86A.0040.2017.0619.1722 06/19/2017
<4>[ 1542.178144] Workqueue: events __i915_gem_free_work [i915]
<4>[ 1542.178152] Call Trace:
<4>[ 1542.178163]  dump_stack+0x68/0x9f
<4>[ 1542.178170]  register_lock_class+0x3fd/0x580
<4>[ 1542.178177]  ? unwind_next_frame+0x14/0x20
<4>[ 1542.178184]  ? __save_stack_trace+0x73/0xd0
<4>[ 1542.178191]  __lock_acquire+0xa4/0x1b00
<4>[ 1542.178254]  ? __i915_gem_free_work+0x28/0xa0 [i915]
<4>[ 1542.178261]  ? __lock_acquire+0x4ab/0x1b00
<4>[ 1542.178268]  lock_acquire+0xb0/0x200
<4>[ 1542.178273]  ? lock_acquire+0xb0/0x200
<4>[ 1542.178336]  ? __i915_gem_free_work+0x28/0xa0 [i915]
<4>[ 1542.178344]  _raw_spin_lock+0x32/0x50
<4>[ 1542.178405]  ? __i915_gem_free_work+0x28/0xa0 [i915]
<4>[ 1542.178468]  __i915_gem_free_work+0x28/0xa0 [i915]
<4>[ 1542.178476]  process_one_work+0x221/0x650
<4>[ 1542.178483]  worker_thread+0x4e/0x3c0
<4>[ 1542.178489]  kthread+0x114/0x150
<4>[ 1542.178494]  ? process_one_work+0x650/0x650
<4>[ 1542.178499]  ? kthread_create_on_node+0x40/0x40
<4>[ 1542.178506]  ret_from_fork+0x27/0x40

v2: Fish out i915->mm.object_stat_lock which was being inited over in
i915_drv.c (Matthew)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c                  |  1 -
 drivers/gpu/drm/i915/i915_gem.c                  | 26 ++++++++++++++++--------
 drivers/gpu/drm/i915/selftests/mock_gem_device.c |  8 +-------
 3 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index d97fe9c9439a..f8600cc96f2a 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -894,7 +894,6 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv,
 	mutex_init(&dev_priv->backlight_lock);
 	spin_lock_init(&dev_priv->uncore.lock);
 
-	spin_lock_init(&dev_priv->mm.object_stat_lock);
 	mutex_init(&dev_priv->sb_lock);
 	mutex_init(&dev_priv->modeset_restore_lock);
 	mutex_init(&dev_priv->av_mutex);
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a2e5a54128c1..82e6e69c222c 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5218,6 +5218,22 @@ i915_gem_load_init_fences(struct drm_i915_private *dev_priv)
 	i915_gem_detect_bit_6_swizzle(dev_priv);
 }
 
+static void i915_gem_init__mm(struct drm_i915_private *i915)
+{
+	spin_lock_init(&i915->mm.object_stat_lock);
+	spin_lock_init(&i915->mm.obj_lock);
+	spin_lock_init(&i915->mm.free_lock);
+
+	init_llist_head(&i915->mm.free_list);
+
+	INIT_LIST_HEAD(&i915->mm.unbound_list);
+	INIT_LIST_HEAD(&i915->mm.bound_list);
+	INIT_LIST_HEAD(&i915->mm.fence_list);
+	INIT_LIST_HEAD(&i915->mm.userfault_list);
+
+	INIT_WORK(&i915->mm.free_work, __i915_gem_free_work);
+}
+
 int
 i915_gem_load_init(struct drm_i915_private *dev_priv)
 {
@@ -5259,15 +5275,7 @@ i915_gem_load_init(struct drm_i915_private *dev_priv)
 	if (err)
 		goto err_priorities;
 
-	INIT_WORK(&dev_priv->mm.free_work, __i915_gem_free_work);
-
-	spin_lock_init(&dev_priv->mm.obj_lock);
-	spin_lock_init(&dev_priv->mm.free_lock);
-	init_llist_head(&dev_priv->mm.free_list);
-	INIT_LIST_HEAD(&dev_priv->mm.unbound_list);
-	INIT_LIST_HEAD(&dev_priv->mm.bound_list);
-	INIT_LIST_HEAD(&dev_priv->mm.fence_list);
-	INIT_LIST_HEAD(&dev_priv->mm.userfault_list);
+	i915_gem_init__mm(dev_priv);
 
 	INIT_DELAYED_WORK(&dev_priv->gt.retire_work,
 			  i915_gem_retire_work_handler);
diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index d2bf2729c331..80f152aaedf9 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@ -179,9 +179,8 @@ struct drm_i915_private *mock_gem_device(void)
 		I915_GTT_PAGE_SIZE_64K |
 		I915_GTT_PAGE_SIZE_2M;
 
-	spin_lock_init(&i915->mm.object_stat_lock);
-	spin_lock_init(&i915->mm.obj_lock);
 	mock_uncore_init(i915);
+	i915_gem_init__mm(i915);
 
 	init_waitqueue_head(&i915->gpu_error.wait_queue);
 	init_waitqueue_head(&i915->gpu_error.reset_queue);
@@ -190,11 +189,6 @@ struct drm_i915_private *mock_gem_device(void)
 	if (!i915->wq)
 		goto put_device;
 
-	INIT_WORK(&i915->mm.free_work, __i915_gem_free_work);
-	init_llist_head(&i915->mm.free_list);
-	INIT_LIST_HEAD(&i915->mm.unbound_list);
-	INIT_LIST_HEAD(&i915->mm.bound_list);
-
 	mock_init_contexts(i915);
 
 	INIT_DELAYED_WORK(&i915->gt.retire_work, mock_retire_work_handler);
-- 
2.15.0

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

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

* Re: [PATCH v2] drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser
  2017-11-10 23:24 ` [PATCH v2] " Chris Wilson
@ 2017-11-10 23:40   ` Matthew Auld
  2017-11-11  0:54     ` Chris Wilson
  0 siblings, 1 reply; 8+ messages in thread
From: Matthew Auld @ 2017-11-10 23:40 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Intel Graphics Development, Matthew Auld

On 10 November 2017 at 23:24, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Move all of the i915->mm initialisation to a private function that can
> be reused by the mock i915 device to save forgetting any more steps.
>
> For example,
> <7>[ 1542.046332] [IGT] drv_selftest: starting subtest mock_objects
> <4>[ 1542.123924] Setting dangerous option mock_selftests - tainting kernel
> <6>[ 1542.167941] i915: Performing mock selftests with st_random_seed=0x246f5ab5 st_timeout=1000
> <4>[ 1542.178012] INFO: trying to register non-static key.
> <4>[ 1542.178027] the code is fine but needs lockdep annotation.
> <4>[ 1542.178032] turning off the locking correctness validator.
> <4>[ 1542.178041] CPU: 3 PID: 6008 Comm: kworker/3:7 Tainted: G     U          4.14.0-rc8-CI-CI_DRM_3332+ #1
> <4>[ 1542.178049] Hardware name:                  /NUC6CAYB, BIOS AYAPLCEL.86A.0040.2017.0619.1722 06/19/2017
> <4>[ 1542.178144] Workqueue: events __i915_gem_free_work [i915]
> <4>[ 1542.178152] Call Trace:
> <4>[ 1542.178163]  dump_stack+0x68/0x9f
> <4>[ 1542.178170]  register_lock_class+0x3fd/0x580
> <4>[ 1542.178177]  ? unwind_next_frame+0x14/0x20
> <4>[ 1542.178184]  ? __save_stack_trace+0x73/0xd0
> <4>[ 1542.178191]  __lock_acquire+0xa4/0x1b00
> <4>[ 1542.178254]  ? __i915_gem_free_work+0x28/0xa0 [i915]
> <4>[ 1542.178261]  ? __lock_acquire+0x4ab/0x1b00
> <4>[ 1542.178268]  lock_acquire+0xb0/0x200
> <4>[ 1542.178273]  ? lock_acquire+0xb0/0x200
> <4>[ 1542.178336]  ? __i915_gem_free_work+0x28/0xa0 [i915]
> <4>[ 1542.178344]  _raw_spin_lock+0x32/0x50
> <4>[ 1542.178405]  ? __i915_gem_free_work+0x28/0xa0 [i915]
> <4>[ 1542.178468]  __i915_gem_free_work+0x28/0xa0 [i915]
> <4>[ 1542.178476]  process_one_work+0x221/0x650
> <4>[ 1542.178483]  worker_thread+0x4e/0x3c0
> <4>[ 1542.178489]  kthread+0x114/0x150
> <4>[ 1542.178494]  ? process_one_work+0x650/0x650
> <4>[ 1542.178499]  ? kthread_create_on_node+0x40/0x40
> <4>[ 1542.178506]  ret_from_fork+0x27/0x40
>
> v2: Fish out i915->mm.object_stat_lock which was being inited over in
> i915_drv.c (Matthew)
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.BAT: success for drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser (rev2)
  2017-11-10 22:58 [PATCH] drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser Chris Wilson
  2017-11-10 23:18 ` Matthew Auld
  2017-11-10 23:24 ` [PATCH v2] " Chris Wilson
@ 2017-11-10 23:52 ` Patchwork
  2017-11-11  1:55 ` ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2017-11-10 23:52 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser (rev2)
URL   : https://patchwork.freedesktop.org/series/33645/
State : success

== Summary ==

Series 33645v2 drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser
https://patchwork.freedesktop.org/api/1.0/series/33645/revisions/2/mbox/

Test chamelium:
        Subgroup dp-crc-fast:
                pass       -> FAIL       (fi-kbl-7500u) fdo#102514
Test gem_exec_reloc:
        Subgroup basic-gtt-read-active:
                fail       -> PASS       (fi-gdg-551) fdo#102582
Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-legacy:
                pass       -> FAIL       (fi-gdg-551) fdo#102618

fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#102582 https://bugs.freedesktop.org/show_bug.cgi?id=102582
fdo#102618 https://bugs.freedesktop.org/show_bug.cgi?id=102618

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:442s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:455s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:380s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:546s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:274s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:504s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:508s
fi-byt-j1900     total:289  pass:254  dwarn:0   dfail:0   fail:0   skip:35  time:496s
fi-byt-n2820     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:489s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:427s
fi-gdg-551       total:289  pass:177  dwarn:1   dfail:0   fail:2   skip:109 time:273s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:539s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:430s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:443s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:425s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:483s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:461s
fi-kbl-7500u     total:289  pass:263  dwarn:1   dfail:0   fail:1   skip:24  time:476s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:525s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:474s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:537s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:457s
fi-skl-6600u     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:543s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:565s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:516s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:493s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:459s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:560s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:421s
Blacklisted hosts:
fi-cfl-s         total:289  pass:254  dwarn:3   dfail:0   fail:0   skip:32  time:523s
fi-cnl-y         total:289  pass:261  dwarn:0   dfail:0   fail:1   skip:27  time:559s
fi-glk-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:496s

1342299348dec3bd4890284390a2209a00beafce drm-tip: 2017y-11m-10d-18h-11m-22s UTC integration manifest
e6f82dde7d8b drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser

== Logs ==

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

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

* Re: [PATCH v2] drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser
  2017-11-10 23:40   ` Matthew Auld
@ 2017-11-11  0:54     ` Chris Wilson
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Wilson @ 2017-11-11  0:54 UTC (permalink / raw)
  To: Matthew Auld; +Cc: Intel Graphics Development, Matthew Auld

Quoting Matthew Auld (2017-11-10 23:40:07)
> On 10 November 2017 at 23:24, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > Move all of the i915->mm initialisation to a private function that can
> > be reused by the mock i915 device to save forgetting any more steps.
> >
> > For example,
> > <7>[ 1542.046332] [IGT] drv_selftest: starting subtest mock_objects
> > <4>[ 1542.123924] Setting dangerous option mock_selftests - tainting kernel
> > <6>[ 1542.167941] i915: Performing mock selftests with st_random_seed=0x246f5ab5 st_timeout=1000
> > <4>[ 1542.178012] INFO: trying to register non-static key.
> > <4>[ 1542.178027] the code is fine but needs lockdep annotation.
> > <4>[ 1542.178032] turning off the locking correctness validator.
> > <4>[ 1542.178041] CPU: 3 PID: 6008 Comm: kworker/3:7 Tainted: G     U          4.14.0-rc8-CI-CI_DRM_3332+ #1
> > <4>[ 1542.178049] Hardware name:                  /NUC6CAYB, BIOS AYAPLCEL.86A.0040.2017.0619.1722 06/19/2017
> > <4>[ 1542.178144] Workqueue: events __i915_gem_free_work [i915]
> > <4>[ 1542.178152] Call Trace:
> > <4>[ 1542.178163]  dump_stack+0x68/0x9f
> > <4>[ 1542.178170]  register_lock_class+0x3fd/0x580
> > <4>[ 1542.178177]  ? unwind_next_frame+0x14/0x20
> > <4>[ 1542.178184]  ? __save_stack_trace+0x73/0xd0
> > <4>[ 1542.178191]  __lock_acquire+0xa4/0x1b00
> > <4>[ 1542.178254]  ? __i915_gem_free_work+0x28/0xa0 [i915]
> > <4>[ 1542.178261]  ? __lock_acquire+0x4ab/0x1b00
> > <4>[ 1542.178268]  lock_acquire+0xb0/0x200
> > <4>[ 1542.178273]  ? lock_acquire+0xb0/0x200
> > <4>[ 1542.178336]  ? __i915_gem_free_work+0x28/0xa0 [i915]
> > <4>[ 1542.178344]  _raw_spin_lock+0x32/0x50
> > <4>[ 1542.178405]  ? __i915_gem_free_work+0x28/0xa0 [i915]
> > <4>[ 1542.178468]  __i915_gem_free_work+0x28/0xa0 [i915]
> > <4>[ 1542.178476]  process_one_work+0x221/0x650
> > <4>[ 1542.178483]  worker_thread+0x4e/0x3c0
> > <4>[ 1542.178489]  kthread+0x114/0x150
> > <4>[ 1542.178494]  ? process_one_work+0x650/0x650
> > <4>[ 1542.178499]  ? kthread_create_on_node+0x40/0x40
> > <4>[ 1542.178506]  ret_from_fork+0x27/0x40
> >
> > v2: Fish out i915->mm.object_stat_lock which was being inited over in
> > i915_drv.c (Matthew)
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Matthew Auld <matthew.auld@intel.com>
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>

Thanks, and pushed. One thing we to consider is how to reign
live_hugepages in a bit or complain about the owatch timeout being too
short. And if you have a moment to spare, the shards suggest that there
is a kernel memory leak but not being reported by the standard mm checks
on unload.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser (rev2)
  2017-11-10 22:58 [PATCH] drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser Chris Wilson
                   ` (2 preceding siblings ...)
  2017-11-10 23:52 ` ✓ Fi.CI.BAT: success for drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser (rev2) Patchwork
@ 2017-11-11  1:55 ` Patchwork
  3 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2017-11-11  1:55 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser (rev2)
URL   : https://patchwork.freedesktop.org/series/33645/
State : success

== Summary ==

Test kms_flip:
        Subgroup dpms-vs-vblank-race:
                pass       -> FAIL       (shard-hsw) fdo#103060

fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060

shard-hsw        total:2584 pass:1470 dwarn:3   dfail:2   fail:10  skip:1099 time:9458s
Blacklisted hosts:
shard-apl        total:2565 pass:1602 dwarn:2   dfail:0   fail:23  skip:936 time:12845s
shard-kbl        total:2495 pass:1664 dwarn:5   dfail:1   fail:23  skip:800 time:10259s
shard-snb        total:2584 pass:1210 dwarn:2   dfail:2   fail:11  skip:1359 time:7781s

== Logs ==

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

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

end of thread, other threads:[~2017-11-11  1:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-10 22:58 [PATCH] drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser Chris Wilson
2017-11-10 23:18 ` Matthew Auld
2017-11-10 23:22   ` Chris Wilson
2017-11-10 23:24 ` [PATCH v2] " Chris Wilson
2017-11-10 23:40   ` Matthew Auld
2017-11-11  0:54     ` Chris Wilson
2017-11-10 23:52 ` ✓ Fi.CI.BAT: success for drm/i915/selftests: Yet another forgotten mock_i915->mm initialiser (rev2) Patchwork
2017-11-11  1:55 ` ✓ 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.