Re: [PATCH] drm/i915/gt: Taint the reset mutex with the shrinker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes:

> Declare that, under extreme circumstances, the shrinker may need to wait
> upon a request, in which case reset must not itself deadlock in order to
> ensure forward progress of the driver. That is since the shrinker may
> depend upon a reset, any reset cannot touch the shrinker.
>
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>

Reviewed-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/gt/intel_reset.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
> index b85b6f3dcd60..e14b23c3b1cb 100644
> --- a/drivers/gpu/drm/i915/gt/intel_reset.c
> +++ b/drivers/gpu/drm/i915/gt/intel_reset.c
> @@ -1394,6 +1394,9 @@ void intel_gt_init_reset(struct intel_gt *gt)
>  	mutex_init(&gt->reset.mutex);
>  	init_srcu_struct(&gt->reset.backoff_srcu);
>  
> +	/* While undesirable to wait inside the shrinker, complain anyway */
> +	i915_gem_shrinker_taints_mutex(gt->i915, &gt->reset.mutex);
> +
>  	/* no GPU until we are ready! */
>  	__set_bit(I915_WEDGED, &gt->reset.flags);
>  }
> -- 
> 2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux