LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] sched: fix the wrong time slice value for SCHED_FIFO tasks
@ 2008-03-07  1:35 Miao Xie
  2008-03-07 10:00 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Miao Xie @ 2008-03-07  1:35 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel

Function sys_sched_rr_get_interval returns wrong time slice value for
SCHED_FIFO tasks. The time slice for SCHED_FIFO tasks should be 0.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>

---
 kernel/sched.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index dcd553c..870044d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5100,7 +5100,7 @@ long sys_sched_rr_get_interval(pid_t pid, struct timespec __user *interval)
 	time_slice = 0;
 	if (p->policy == SCHED_RR) {
 		time_slice = DEF_TIMESLICE;
-	} else {
+	} else if (p->policy != SCHED_FIFO) {
 		struct sched_entity *se = &p->se;
 		unsigned long flags;
 		struct rq *rq;
-- 
1.5.4.rc3



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-07 10:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-07  1:35 [PATCH] sched: fix the wrong time slice value for SCHED_FIFO tasks Miao Xie
2008-03-07 10:00 ` Ingo Molnar

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).