Commit c541bb78 authored by Dietmar Eggemann's avatar Dietmar Eggemann Committed by Ingo Molnar

sched/core: Update task_prio() function header

The description of the RT offset and the values for 'normal' tasks needs
update. Moreover there are DL tasks now.
task_prio() has to stay like it is to guarantee compatibility with the
/proc/<pid>/stat priority field:

  # cat /proc/<pid>/stat | awk '{ print $18; }'
Signed-off-by: default avatarDietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20210128131040.296856-4-dietmar.eggemann@arm.com
parent 9d061ba6
...@@ -5616,8 +5616,12 @@ SYSCALL_DEFINE1(nice, int, increment) ...@@ -5616,8 +5616,12 @@ SYSCALL_DEFINE1(nice, int, increment)
* @p: the task in question. * @p: the task in question.
* *
* Return: The priority value as seen by users in /proc. * Return: The priority value as seen by users in /proc.
* RT tasks are offset by -200. Normal tasks are centered *
* around 0, value goes from -16 to +15. * sched policy return value kernel prio user prio/nice
*
* normal, batch, idle [0 ... 39] [100 ... 139] 0/[-20 ... 19]
* fifo, rr [-2 ... -100] [98 ... 0] [1 ... 99]
* deadline -101 -1 0
*/ */
int task_prio(const struct task_struct *p) int task_prio(const struct task_struct *p)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment