Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76160
b: refs/heads/master
c: 5d2f5a6
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Adamushko authored and Ingo Molnar committed Jan 25, 2008
1 parent 8c18aee commit c244565
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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: 9ec3b77e11b9398ab40b492c4fde7d8aac04a718
refs/heads/master: 5d2f5a616d65e3c08acde3195694c4ab8afbc1b7
11 changes: 3 additions & 8 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1559,9 +1559,6 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
unsigned long flags;
long old_state;
struct rq *rq;
#ifdef CONFIG_SMP
int new_cpu;
#endif

rq = task_rq_lock(p, &flags);
old_state = p->state;
Expand All @@ -1579,9 +1576,9 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
if (unlikely(task_running(rq, p)))
goto out_activate;

new_cpu = p->sched_class->select_task_rq(p, sync);
if (new_cpu != cpu) {
set_task_cpu(p, new_cpu);
cpu = p->sched_class->select_task_rq(p, sync);
if (cpu != orig_cpu) {
set_task_cpu(p, cpu);
task_rq_unlock(rq, &flags);
/* might preempt at this point */
rq = task_rq_lock(p, &flags);
Expand All @@ -1608,10 +1605,8 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
}
}
}

#endif


out_activate:
#endif /* CONFIG_SMP */
schedstat_inc(p, se.nr_wakeups);
Expand Down

0 comments on commit c244565

Please sign in to comment.