[PATCH] drm/amdgpu: add flag for high priority contexts

Christian König deathsimple at vodafone.de
Wed Jan 4 12:56:13 UTC 2017


Am 04.01.2017 um 12:03 schrieb Sagalovitch, Serguei:
> Andres,
>
> I have on rather generic design question:
>
> Why we want to restrict it to CAP_SYS_ADMIN?
>
> +       if (priority == AMD_SCHED_PRIORITY_HIGH && !capable(CAP_SYS_ADMIN))
> +               return -EACCES;
>
> Should we make it generic? My understanding is that If we follow "nice" semantic
> then it will not require such privilege.

Well it follows the "nice" semantic, the the documentation of the nice 
system call:

        nice()  adds inc to the nice value for the calling process. (A 
higher nice value means a low priority.)  Only the superuser may specify 
a negative increment, or priority increase.  The range
        for nice values is described in getpriority(2).

Of course the nice limit is more fine grained these days. IIRC it was a 
soft resource limit now the last time I looked.

We would essentially need something similar for the GPU if we want to 
allow a regular process to get a higher priority.

Regards,
Christian.

>
> Sincerely yours,
> Serguei Sagalovitch
>
>      
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx




More information about the amd-gfx mailing list