|
@@ -2137,7 +2137,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p)
|
|
|
|
|
|
WARN_ON(task_rq(p) != rq);
|
|
|
|
|
|
- if (hrtick_enabled(rq) && cfs_rq->nr_running > 1) {
|
|
|
+ if (cfs_rq->nr_running > 1) {
|
|
|
u64 slice = sched_slice(cfs_rq, se);
|
|
|
u64 ran = se->sum_exec_runtime - se->prev_sum_exec_runtime;
|
|
|
s64 delta = slice - ran;
|
|
@@ -2168,7 +2168,7 @@ static void hrtick_update(struct rq *rq)
|
|
|
{
|
|
|
struct task_struct *curr = rq->curr;
|
|
|
|
|
|
- if (curr->sched_class != &fair_sched_class)
|
|
|
+ if (!hrtick_enabled(rq) || curr->sched_class != &fair_sched_class)
|
|
|
return;
|
|
|
|
|
|
if (cfs_rq_of(&curr->se)->nr_running < sched_nr_latency)
|
|
@@ -3031,7 +3031,8 @@ static struct task_struct *pick_next_task_fair(struct rq *rq)
|
|
|
} while (cfs_rq);
|
|
|
|
|
|
p = task_of(se);
|
|
|
- hrtick_start_fair(rq, p);
|
|
|
+ if (hrtick_enabled(rq))
|
|
|
+ hrtick_start_fair(rq, p);
|
|
|
|
|
|
return p;
|
|
|
}
|