Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277393
b: refs/heads/master
c: b39e66e
h: refs/heads/master
i:
  277391: f0cd61c
v: v3
  • Loading branch information
Mike Galbraith authored and Ingo Molnar committed Dec 6, 2011
1 parent ec132f8 commit 4ed5f36
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fdaabd800bdd60652a448994eeb77442180db6c0
refs/heads/master: b39e66eaf9c573f38133e894256caeaf9fd2a528
7 changes: 4 additions & 3 deletions trunk/kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}
Expand Down
7 changes: 7 additions & 0 deletions trunk/kernel/sched/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,13 @@ static inline int hrtick_enabled(struct rq *rq)

void hrtick_start(struct rq *rq, u64 delay);

#else

static inline int hrtick_enabled(struct rq *rq)
{
return 0;
}

#endif /* CONFIG_SCHED_HRTICK */

#ifdef CONFIG_SMP
Expand Down

0 comments on commit 4ed5f36

Please sign in to comment.