From: Miao Xie Date: Fri, 7 Mar 2008 01:35:06 +0000 (+0800) Subject: sched: fix the wrong time slice value for SCHED_FIFO tasks X-Git-Tag: v2.6.25-rc5~13^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1868f958eb56fc41c5985c8732e564a400c5fdf5;p=linux-2.6 sched: fix the wrong time slice value for SCHED_FIFO tasks 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 Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched.c b/kernel/sched.c index 63a469f885..5b13e4b0e0 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;