diff options
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 65a6f8b1bf14..4174338ffa36 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -2137,7 +2137,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p) | |||
2137 | 2137 | ||
2138 | WARN_ON(task_rq(p) != rq); | 2138 | WARN_ON(task_rq(p) != rq); |
2139 | 2139 | ||
2140 | if (hrtick_enabled(rq) && cfs_rq->nr_running > 1) { | 2140 | if (cfs_rq->nr_running > 1) { |
2141 | u64 slice = sched_slice(cfs_rq, se); | 2141 | u64 slice = sched_slice(cfs_rq, se); |
2142 | u64 ran = se->sum_exec_runtime - se->prev_sum_exec_runtime; | 2142 | u64 ran = se->sum_exec_runtime - se->prev_sum_exec_runtime; |
2143 | s64 delta = slice - ran; | 2143 | s64 delta = slice - ran; |
@@ -2168,7 +2168,7 @@ static void hrtick_update(struct rq *rq) | |||
2168 | { | 2168 | { |
2169 | struct task_struct *curr = rq->curr; | 2169 | struct task_struct *curr = rq->curr; |
2170 | 2170 | ||
2171 | if (curr->sched_class != &fair_sched_class) | 2171 | if (!hrtick_enabled(rq) || curr->sched_class != &fair_sched_class) |
2172 | return; | 2172 | return; |
2173 | 2173 | ||
2174 | if (cfs_rq_of(&curr->se)->nr_running < sched_nr_latency) | 2174 | 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) | |||
3031 | } while (cfs_rq); | 3031 | } while (cfs_rq); |
3032 | 3032 | ||
3033 | p = task_of(se); | 3033 | p = task_of(se); |
3034 | hrtick_start_fair(rq, p); | 3034 | if (hrtick_enabled(rq)) |
3035 | hrtick_start_fair(rq, p); | ||
3035 | 3036 | ||
3036 | return p; | 3037 | return p; |
3037 | } | 3038 | } |