Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234564
b: refs/heads/master
c: a2f5c9a
h: refs/heads/master
v: v3
  • Loading branch information
Darren Hart authored and Ingo Molnar committed Mar 4, 2011
1 parent 9062b8c commit a6a2d20
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: e0a92c17470775cd85bac52f5372ccc3dc58254a
refs/heads/master: a2f5c9ab79f78e8b91ac993e0543d65b661dd19b
12 changes: 7 additions & 5 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1870,16 +1870,18 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_
if (test_tsk_need_resched(curr))
return;

/* Idle tasks are by definition preempted by non-idle tasks. */
if (unlikely(curr->policy == SCHED_IDLE) &&
likely(p->policy != SCHED_IDLE))
goto preempt;

/*
* Batch and idle tasks do not preempt (their preemption is driven by
* the tick):
* Batch and idle tasks do not preempt non-idle tasks (their preemption
* is driven by the tick):
*/
if (unlikely(p->policy != SCHED_NORMAL))
return;

/* Idle tasks are by definition preempted by everybody. */
if (unlikely(curr->policy == SCHED_IDLE))
goto preempt;

if (!sched_feat(WAKEUP_PREEMPT))
return;
Expand Down

0 comments on commit a6a2d20

Please sign in to comment.