Re: [PATCH 4/6] drm/i915: Add bannable context parameter

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

 



On Tue, Nov 15, 2016 at 04:36:34PM +0200, Mika Kuoppala wrote:
> Now when driver has per context scoring of 'hanging badness'
> and also subsequent hangs during short windows are allowed,
> if there is progress made in between, it does not make sense
> to expose a ban timing window as a context parameter anymore.
> 
> Let the scoring be the sole indicator for ban policy and substitute
> ban period context parameter as a boolean to get/set context
> bannable property.
> 
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Suggested-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>

> @@ -1156,6 +1153,14 @@ int i915_gem_context_setparam_ioctl(struct drm_device *dev, void *data,
>  				ctx->flags &= ~CONTEXT_NO_ERROR_CAPTURE;
>  		}
>  		break;
> +	case I915_CONTEXT_PARAM_BANNABLE:
> +		if (args->size)
> +			ret = -EINVAL;
> +		else if (!capable(CAP_SYS_ADMIN))

You can allow non-root to opt into being banned.

else if (!capable(CAP_SYS_ADMIN) && !args->value)

Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux