History

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; }'

Dietmar Eggemann committed 5 years ago

Commit c541bb71 parent 9d061ba1 file · +6 −2Browse files

Unified · Split

kernel/sched/core.c+6−2
@@ -5616,8 +5616,12 @@ SYSCALL_DEFINE1(nice, int, increment) · 5615 unmodified lines
56165616 * @p: the task in question.
56175617 *
56185618 * Return: The priority value as seen by users in /proc.
5619− * RT tasks are offset by -200. Normal tasks are centered
5620− * around 0, value goes from -16 to +15.
5619+ *
5620+ * sched policy return value kernel prio user prio/nice
5621+ *
5622+ * normal, batch, idle [0 ... 39] [100 ... 139] 0/[-20 ... 19]
5623+ * fifo, rr [-2 ... -100] [98 ... 0] [1 ... 99]
5624+ * deadline -101 -1 0
56215625 */
56225626 int task_prio(const struct task_struct *p)
56235627 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t