From: "Chris Friesen" <cfriesen@nortel.com>
To: Ingo Molnar <mingo@elte.hu>, Linux kernel <linux-kernel@vger.kernel.org>
Subject: resend: KERNEL BUG: nice level should not affect SCHED_RR timeslice
Date: Tue, 06 Mar 2007 09:43:15 -0600 [thread overview]
Message-ID: <45ED8C13.5020401@nortel.com> (raw)
Apparently the timeslice of the SCHED_RR process varies with nice level
the same way that it does for SCHED_OTHER. So while niceness doesn't
affect the priority of a SCHED_RR task, it does impact how much cpu it gets.
SUSv3 indicates, "Any processes or threads using SCHED_FIFO or SCHED_RR
shall be unaffected by a call to setpriority()."
The code in set_user_nice() has a comment that leads me to believe the
current behaviour is accidental (although I think the "not" in the last
line isn't meant to be there):
/*
* The RT priorities are set via sched_setscheduler(), but we still
* allow the 'normal' nice value to be set - but as expected
* it wont have any effect on scheduling until the task is
* not SCHED_NORMAL/SCHED_BATCH:
*/
It appears that the desired behaviour is to allow setting the nice level
of a realtime task, but to not have it affect anything until (and
unless) it drops that realtime status. Is this correct?
Chris
next reply other threads:[~2007-03-06 15:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 15:43 Chris Friesen [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-03-07 23:19 resend: KERNEL BUG: nice level should not affect SCHED_RR timeslice Chris Friesen
2007-03-12 9:27 ` Con Kolivas
2007-03-12 15:18 ` Chris Friesen
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=45ED8C13.5020401@nortel.com \
--to=cfriesen@nortel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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