aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index f61837ad336d..613c1c749677 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -2014,21 +2014,17 @@ static void moved_group_fair(struct task_struct *p)
2014} 2014}
2015#endif 2015#endif
2016 2016
2017unsigned int get_rr_interval_fair(struct task_struct *task) 2017unsigned int get_rr_interval_fair(struct rq *rq, struct task_struct *task)
2018{ 2018{
2019 struct sched_entity *se = &task->se; 2019 struct sched_entity *se = &task->se;
2020 unsigned long flags;
2021 struct rq *rq;
2022 unsigned int rr_interval = 0; 2020 unsigned int rr_interval = 0;
2023 2021
2024 /* 2022 /*
2025 * Time slice is 0 for SCHED_OTHER tasks that are on an otherwise 2023 * Time slice is 0 for SCHED_OTHER tasks that are on an otherwise
2026 * idle runqueue: 2024 * idle runqueue:
2027 */ 2025 */
2028 rq = task_rq_lock(task, &flags);
2029 if (rq->cfs.load.weight) 2026 if (rq->cfs.load.weight)
2030 rr_interval = NS_TO_JIFFIES(sched_slice(&rq->cfs, se)); 2027 rr_interval = NS_TO_JIFFIES(sched_slice(&rq->cfs, se));
2031 task_rq_unlock(rq, &flags);
2032 2028
2033 return rr_interval; 2029 return rr_interval;
2034} 2030}