* [PATCH] sched: fix outdated comment on task_prio() return value
@ 2015-11-29 2:46 Antoine Busque
0 siblings, 0 replies; only message in thread
From: Antoine Busque @ 2015-11-29 2:46 UTC (permalink / raw)
To: mingo; +Cc: peterz, linux-kernel
The comment describing the possible return values of the task_prio()
function, having not been updated in many years, was misleading. It
indicated an offset of -200 for RT tasks, and normal tasks having 32
possible priority values centered around 0. This is no longer the
case, as the values it returns will be in the range [-100..39]. The
new comment reflects the current behaviour.
Signed-off-by: Antoine Busque <abusque@efficios.com>
---
kernel/sched/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index bbe9577..b9e5f4a 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3106,8 +3106,8 @@ SYSCALL_DEFINE1(nice, int, increment)
* @p: the task in question.
*
* 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.
+ * Values range from -100 to to -2 for RT tasks, and from
+ * 0 to 39 for normal tasks.
*/
int task_prio(const struct task_struct *p)
{
--
2.6.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-29 2:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-29 2:46 [PATCH] sched: fix outdated comment on task_prio() return value Antoine Busque
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome