mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Con Kolivas <kernel@kolivas.org>
To: Albert Cahalan <albert@users.sourceforge.net>
Cc: Con Kolivas <kernel@kolivas.org>,
	Albert Cahalan <albert@users.sourceforge.net>,
	linux-kernel mailing list <linux-kernel@vger.kernel.org>,
	ankitjain1580@yahoo.com, mingo@elte.hu, rml@tech9.net
Subject: Re: Difference in priority
Date: Wed, 13 Oct 2004 11:26:46 +1000	[thread overview]
Message-ID: <cone.1097630806.503792.12364.502@pc.kolivas.org> (raw)
In-Reply-To: <1097630263.2674.9508.camel@cube>

Albert Cahalan writes:

> On Tue, 2004-10-12 at 20:15, Con Kolivas wrote:
>> Albert Cahalan writes:
>> 
>> > Con Kolivas writes:
>> >> Ankit Jain wrote:
>> > 
>> >>> if somebody knows the difference b/w /PRI of both
>> >>> these commands because both give different results
>> >>>
>> >>> ps -Al
>> >>> & top
>> >>>
>> >>> as per priority rule we can set priority upto 0-99
>> >>> but top never shows this high priority
>> >>
>> >> Priority values 0-99 are real time ones and 100-139 are normal 
>> >> scheduling ones. RT scheduling does not change dynamic priority while 
>> >> running wheras normal scheduling does (between 100-139). top shows the 
>> >> value of the current dynamic priority in the PRI column as the current 
>> >> dynamic priority-100. If you have a real time task in top it shows as a 
>> >> -ve value. ps -Al seems to show the current dynamic priority+60.
>> > 
>> > What would you like to see? There are numerous
>> > competing ideas of reality. There's also the matter
>> > of history and standards. I'd gladly "fix" ps, if
>> > people could agree on what "fix" would mean.
>> > 
>> > Various desirable but conflicting traits include:
>> > 
>> > a. for normal idle processes, PRI matches NI
>> > b. for RT processes, PRI matches RT priority
>> > c. for RT processes, PRI is negative of RT priority
>> > d. PRI is the unmodified value seen in /proc
>> > e. PRI is never negative
>> > f. low PRI is low priority (SysV "pri" keyword)
>> > g. low PRI is high priority (UNIX "PRI", SysV "opri")
>> > h. PRI matches some kernel-internal value
>> > i. PRI is in the range -99 to 999 (not too wide)
>> 
>> I can't say I've ever felt strongly about it. Wish I knew what was the best 
>> way. If we change the range of RT priority range by increasing it from 100 
>> to say 1000 then any arbitrary value to subtract will be wrong. How about 
>> just leaving the absolute dynamic priority value? Then we don't have any 
>> negative values confusing it, it isn't affected by increasing the range of 
>> RT priorities, and better priority values still are lower in value.
> 
> That's not convincing enough to overcome inertia.
> 
> I can't see why the RT priority range would be increased.
> It's overkill already, especially since Linux doesn't have
> priority inheritance. Since POSIX requires 32 levels, that
> is the right number. Actually using more than one level
> (remember: NO priority inheritance) might not be wise.
> If we stuck to 32 levels, RT and non-RT could both fit
> within a 2-digit positive number. Also, there'd be fewer
> bits for the scheduler to examine.

As I said; I don't feel strongly. There was an option to change the range of 
real time priorities in 2.4 which is why I mention it. Let others speak 
cause I care not what you do as long as we understand it. I'm not changing 
the scheduler to suit userspace tools.

Cheers,
Con

  reply	other threads:[~2004-10-13  1:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-12  0:57 Albert Cahalan
2004-10-13  0:15 ` Con Kolivas
2004-10-13  1:17   ` Albert Cahalan
2004-10-13  1:26     ` Con Kolivas [this message]
2004-10-13  4:58     ` Lee Revell
2004-10-13  5:08       ` Randy.Dunlap
2004-10-13  5:39         ` Lee Revell
  -- strict thread matches above, loose matches on Subject: below --
2004-10-11 12:17 Ankit Jain
2004-10-11 12:35 ` Con Kolivas
2004-10-11 12:43   ` Con Kolivas
2004-10-12  9:28     ` Ankit Jain
2004-10-12 10:40       ` Con Kolivas

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=cone.1097630806.503792.12364.502@pc.kolivas.org \
    --to=kernel@kolivas.org \
    --cc=albert@users.sourceforge.net \
    --cc=ankitjain1580@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rml@tech9.net \
    /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®