All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Clayton <andrew-gyMb1R/nBgN3uBD2Ct+Y/qxOck334EZe@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-man <linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] getpriority.2: Adjust the process priority range
Date: Wed, 5 Mar 2014 14:50:20 +0000	[thread overview]
Message-ID: <20140305145020.7801daa2@omega.digital-domain.net> (raw)
In-Reply-To: <CAKgNAkjkmf94mp05Gqnh8SD2PnGvCZJcYwTS9mBDF9RYuDn75w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Wed, 5 Mar 2014 15:17:46 +0100, Michael Kerrisk (man-pages) wrote:

> Andrew,
> 
> On Wed, Mar 5, 2014 at 5:07 AM, Andrew Clayton
> <andrew-gyMb1R/nBgN3uBD2Ct+Y/qxOck334EZe@public.gmane.org> wrote:
> > The {get,set}priority man pages currently lists the process's
> > priority range as being from 40..1 however it should be 40..0 as 0
> > would be for a nice of -20.
> 
> 
> I don't think this is correct. Without actually re-checking the kernel
> source, this is what I think is correct:
> 
> k-nice (the internal kernel value) has the range 40..1.
> u-nice (the user-space value) has the range -20..+19
> 
> and u-nice = 20 - k-nice
> 
> (In fact, looking further down the man page, I see this is all
> explained. Note that there is no +20 nice value on Linux.)
> 
> Cheers,
> 
> Michael

Ok, thanks for the explanation. I was just confused by the above
because what user space seems to see is 39..0 (e,g the PRI column in
top, the 18th field in /proc/self/stat). Which is perhaps not really the
same thing were talking about here, which looking at a rt task has a
value of -100.

Cheers,
Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2014-03-05 14:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05  4:07 [PATCH] getpriority.2: Adjust the process priority range Andrew Clayton
     [not found] ` <1393992460-29062-1-git-send-email-andrew-gyMb1R/nBgN3uBD2Ct+Y/qxOck334EZe@public.gmane.org>
2014-03-05 14:17   ` Michael Kerrisk (man-pages)
     [not found]     ` <CAKgNAkjkmf94mp05Gqnh8SD2PnGvCZJcYwTS9mBDF9RYuDn75w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-05 14:50       ` Andrew Clayton [this message]

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=20140305145020.7801daa2@omega.digital-domain.net \
    --to=andrew-gymb1r/nbgn3ubd2ct+y/qxock334eze@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.