Commit 1868f958 authored by Miao Xie's avatar Miao Xie Committed by Ingo Molnar

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: default avatarMiao Xie <miaox@cn.fujitsu.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 150d8bed
...@@ -5100,7 +5100,7 @@ long sys_sched_rr_get_interval(pid_t pid, struct timespec __user *interval) ...@@ -5100,7 +5100,7 @@ long sys_sched_rr_get_interval(pid_t pid, struct timespec __user *interval)
time_slice = 0; time_slice = 0;
if (p->policy == SCHED_RR) { if (p->policy == SCHED_RR) {
time_slice = DEF_TIMESLICE; time_slice = DEF_TIMESLICE;
} else { } else if (p->policy != SCHED_FIFO) {
struct sched_entity *se = &p->se; struct sched_entity *se = &p->se;
unsigned long flags; unsigned long flags;
struct rq *rq; struct rq *rq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment