Chris Wilson <[email protected]> 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 <[email protected]>

I got distracted on looking how the epoch works.

Reviewed-by: Mika Kuoppala <[email protected]>

> ---
>  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
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to