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-Url: https://git.stricted.de/?a=commitdiff_plain;h=1868f958eb56fc41c5985c8732e564a400c5fdf5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 63a469f8853d..5b13e4b0e009 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;