mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Albert D. Cahalan" <acahalan@cs.uml.edu>
To: mlev@despammed.com (Lev Makhlis)
Cc: acahalan@cs.uml.edu (Albert D. Cahalan), linux-kernel@vger.kernel.org
Subject: Re: Bug or feature? Priority in /proc/<pid>/stat for RT processes
Date: Mon, 19 Nov 2001 06:31:12 -0500 (EST)	[thread overview]
Message-ID: <200111191131.fAJBVC058828@saturn.cs.uml.edu> (raw)
In-Reply-To: <200111190731.fAJ7VUs21238@portent.dyndns.org> from "Lev Makhlis" at Nov 19, 2001 02:31:30 AM

Anton Altaparmakov writes:
> On Monday 19 November 2001 01:01 am, Albert D. Cahalan wrote:

>> Do not do this. Just supply the raw value for ps(1) and top(1) to use.
>> Also supply the scheduling policy type. You can tack this on the end
>> of /proc/<pid>/stat and tell me when Linus accepts it so that I can
>> make ps(1) and top(1) support the new info.
>
> I agree scaling from 1.99 to 20..-20 wasn't a good idea, but I don't think
> supplying the raw (1..99) value without any transformation at all would be
> right either -- I think we need to reverse its sign, for the following
> reason: 
> 
> If you look at what happens on other Unix platforms, the "direction"
> of priority values can vary: usually, higher values mean lower priority,
> but, for example, on Solaris, higher values mean higher priority.
> But on any specific platform, the "direction" is consistent across
> the different scheduling policies.  On Linux, it's "higher value = lower
> priority" for the default timesharing policy, and therefore I think it should
> be the same for the RT priorities.
> 
> I think the Right Thing would be to use a f(x) = c - x transormation,
> where c could be 100, or 0, or -20, or -100, or something else.
> -20 or -100 have the advantage of preserving the order relationship
> between priorities across the scheduling policies.
> 
> The patch below uses c=-100 -- as an example.

I can tell you what procps will do. The very first thing is
to undo your transformation. Don't bother having the kernel
muck with the numbers. The procps code will transform the
numbers as needed to match UNIX convention and/or the tools
which users run to set these values.

  reply	other threads:[~2001-11-19 11:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-13 18:09 Lev Makhlis
2001-11-19  6:01 ` Albert D. Cahalan
2001-11-19  7:31   ` Lev Makhlis
2001-11-19 11:31     ` Albert D. Cahalan [this message]
2001-11-20  4:43       ` Lev Makhlis
2001-11-20  5:51         ` Albert D. Cahalan
2001-11-21  7:36           ` Lev Makhlis

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=200111191131.fAJBVC058828@saturn.cs.uml.edu \
    --to=acahalan@cs.uml.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlev@despammed.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

all inboxes | Powered by JetHome®