Re: [PATCH 04/16] drm/i915/userptr: Remove superfluous interruptible=false on waiting

Joonas Lahtinen
2016-08-03T13:43:50Z

On ma, 2016-08-01 at 19:22 +0100, Chris Wilson wrote:
> Inside the kthread context, we can't be interrupted by signals so
> touching the mm.interruptible flag is pointless and wait-request now
> consumes EIO itself.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_gem_userptr.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c
> index 96ab6161903a..57218cca7e05 100644
> --- a/drivers/gpu/drm/i915/i915_gem_userptr.c
> +++ b/drivers/gpu/drm/i915/i915_gem_userptr.c
> @@ -84,16 +84,9 @@ static void cancel_userptr(struct work_struct *work)
>   obj->userptr.work = NULL;
>
>   if (obj->pages != NULL) {
> - struct drm_i915_private *dev_priv = to_i915(dev);
> - bool was_interruptible;
> -
> - was_interruptible = dev_priv->mm.interruptible;
> - dev_priv->mm.interruptible = false;
> -

GEM_BUG_ON(dev_priv->mm.interruptible) too much paranoia?

> + /* We are inside a kthread context and can't be interrupted */
>   WARN_ON(i915_gem_object_unbind(obj));
>   WARN_ON(i915_gem_object_put_pages(obj));
> -
> - dev_priv->mm.interruptible = was_interruptible;
>   }
>
>   i915_gem_object_put(obj);
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation