mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Antoine Busque <abusque@efficios.com>
To: mingo@redhat.com
Cc: peterz@infradead.com, linux-kernel@vger.kernel.org
Subject: [PATCH] sched: fix outdated comment on task_prio() return value
Date: Sat, 28 Nov 2015 21:46:10 -0500	[thread overview]
Message-ID: <1448765170-16483-1-git-send-email-abusque@efficios.com> (raw)

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


                 reply	other threads:[~2015-11-29  2:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1448765170-16483-1-git-send-email-abusque@efficios.com \
    --to=abusque@efficios.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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