From: "Albert D. Cahalan" <acahalan@cs.uml.edu>
To: mlev@despammed.com (Lev Makhlis)
Cc: linux-kernel@vger.kernel.org
Subject: Re: Bug or feature? Priority in /proc/<pid>/stat for RT processes
Date: Mon, 19 Nov 2001 01:01:06 -0500 (EST) [thread overview]
Message-ID: <200111190601.fAJ616Q32518@saturn.cs.uml.edu> (raw)
In-Reply-To: <01101314091204.09135@portent.dyndns.org> from "Lev Makhlis" at Oct 13, 2001 02:09:12 PM
Lev Makhlis writes:
> I have noticed that when the scheduling policy of a process is SCHED_FIFO
> or SCHED_RR, proc_pid_stat() in fs/proc/array.c still uses the counter field
> in the task structure to calculate the priority in /proc/<pid>/stat.
> For such processes, the counter field is ignored by the scheduler in favour
> of the rt_priority field. Thus, even though the actual priority is available
> via sched_getparam(2), the priority in /proc/<pid>/stat -- and, consequently,
> in the output of ps(1) and top(1) -- seems to be, for SCHED_FIFO/SCHED_RR
> processes, a value that is not representative at all of how the process is
> scheduled.
>
> I have thrown together a patch to address this, but I can't say I feel
> entirely comfortable about scaling from 1..99 to -20..20.
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.
next prev parent reply other threads:[~2001-11-19 6:01 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 [this message]
2001-11-19 7:31 ` Lev Makhlis
2001-11-19 11:31 ` Albert D. Cahalan
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=200111190601.fAJ616Q32518@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®