From: Xianwei Zeng <linux.xianwei.zeng@gmail.com>
To: Karthik Singaram Lakshmanan <karthiksingaram@gmail.com>,
hancockrwd@gmail.com
Cc: linux-rt-users@vger.kernel.org
Subject: Re: [rt sched] SCHED_FIFO task of lower rt_priority blocks higher one
Date: Thu, 4 Mar 2010 14:18:55 +0900 [thread overview]
Message-ID: <ac85e7a01003032118l1bdc1d22we08f2b50626c2535@mail.gmail.com> (raw)
In-Reply-To: <1ca41c0f1003031952u7a9ea0w5adf4f0438b8fe0c@mail.gmail.com>
Hi,
Thanks for your replies.
I made a mistake about the priority inside the kernel and
sched_setscheduler system call.
I thought both of them are the same: numerically lower priority value
is higher schedule priority.
But in fact, they are opposite:
* Kernel: numerically lower value is high priority
* sched_setscheduler() and related system calls: numerically lower
value is lower priority
It is said in "man sched_get_priority_max" output:
Processes with numerically higher priority values are
scheduled before processes
with numerically lower priority values. Thus, the value
returned by sched_get_prior-
ity_max() will be greater than the value returned by
sched_get_priority_min().
Thanks.
On Thu, Mar 4, 2010 at 12:52 PM, Karthik Singaram Lakshmanan
<karthiksingaram@gmail.com> wrote:
> Hi,
> If I am not mistaken, higher value of sched_priority denotes higher
> priority.
> Therefore, looking at
> normal_prio = MAX_RT_PRIO - 1 - task->rt_priority;
> you can see that a higher task->rt_priority will translate to a
> lower value of normal_prio, thereby occupying an earlier bit.
--
Best Regards,
Zeng Xianwei
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2010-03-04 5:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-04 3:21 [rt sched] SCHED_FIFO task of lower rt_priority blocks higher one Xianwei Zeng
2010-03-04 3:54 ` Karthik Singaram Lakshmanan
2010-03-04 4:24 ` Robert Hancock
[not found] ` <1ca41c0f1003031952u7a9ea0w5adf4f0438b8fe0c@mail.gmail.com>
[not found] ` <0016e646086875cfde0480f186a0@google.com>
2010-03-04 3:53 ` Delivery Status Notification (Failure) Karthik Singaram Lakshmanan
2010-03-04 5:18 ` Xianwei Zeng [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=ac85e7a01003032118l1bdc1d22we08f2b50626c2535@mail.gmail.com \
--to=linux.xianwei.zeng@gmail.com \
--cc=hancockrwd@gmail.com \
--cc=karthiksingaram@gmail.com \
--cc=linux-rt-users@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).