Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175580
b: refs/heads/master
c: 970b13b
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Dec 9, 2009
1 parent 2c60fb9 commit 4ff4010
Show file tree
Hide file tree
Showing 2 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: 6b314d0e11924c803bf8cd944e87fd58cdb5088c
refs/heads/master: 970b13bacba14a8cef6f642861947df1d175b0b3
14 changes: 11 additions & 3 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2323,6 +2323,14 @@ void task_oncpu_function_call(struct task_struct *p,
preempt_enable();
}

#ifdef CONFIG_SMP
static inline
int select_task_rq(struct task_struct *p, int sd_flags, int wake_flags)
{
return p->sched_class->select_task_rq(p, sd_flags, wake_flags);
}
#endif

/***
* try_to_wake_up - wake up a thread
* @p: the to-be-woken-up thread
Expand Down Expand Up @@ -2376,7 +2384,7 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
p->state = TASK_WAKING;
task_rq_unlock(rq, &flags);

cpu = p->sched_class->select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
cpu = select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
if (cpu != orig_cpu) {
local_irq_save(flags);
rq = cpu_rq(cpu);
Expand Down Expand Up @@ -2593,7 +2601,7 @@ void sched_fork(struct task_struct *p, int clone_flags)
p->sched_class = &fair_sched_class;

#ifdef CONFIG_SMP
cpu = p->sched_class->select_task_rq(p, SD_BALANCE_FORK, 0);
cpu = select_task_rq(p, SD_BALANCE_FORK, 0);
#endif
local_irq_save(flags);
update_rq_clock(cpu_rq(cpu));
Expand Down Expand Up @@ -3156,7 +3164,7 @@ static void sched_migrate_task(struct task_struct *p, int dest_cpu)
void sched_exec(void)
{
int new_cpu, this_cpu = get_cpu();
new_cpu = current->sched_class->select_task_rq(current, SD_BALANCE_EXEC, 0);
new_cpu = select_task_rq(current, SD_BALANCE_EXEC, 0);
put_cpu();
if (new_cpu != this_cpu)
sched_migrate_task(current, new_cpu);
Expand Down

0 comments on commit 4ff4010

Please sign in to comment.