aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 1b900fb1c6e1..830967e18285 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6819,23 +6819,8 @@ SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid,
6819 if (retval) 6819 if (retval)
6820 goto out_unlock; 6820 goto out_unlock;
6821 6821
6822 /* 6822 time_slice = p->sched_class->get_rr_interval(p);
6823 * Time slice is 0 for SCHED_FIFO tasks and for SCHED_OTHER
6824 * tasks that are on an otherwise idle runqueue:
6825 */
6826 time_slice = 0;
6827 if (p->policy == SCHED_RR) {
6828 time_slice = DEF_TIMESLICE;
6829 } else if (p->policy != SCHED_FIFO) {
6830 struct sched_entity *se = &p->se;
6831 unsigned long flags;
6832 struct rq *rq;
6833 6823
6834 rq = task_rq_lock(p, &flags);
6835 if (rq->cfs.load.weight)
6836 time_slice = NS_TO_JIFFIES(sched_slice(&rq->cfs, se));
6837 task_rq_unlock(rq, &flags);
6838 }
6839 read_unlock(&tasklist_lock); 6824 read_unlock(&tasklist_lock);
6840 jiffies_to_timespec(time_slice, &t); 6825 jiffies_to_timespec(time_slice, &t);
6841 retval = copy_to_user(interval, &t, sizeof(t)) ? -EFAULT : 0; 6826 retval = copy_to_user(interval, &t, sizeof(t)) ? -EFAULT : 0;