Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245573
b: refs/heads/master
c: 8936338
h: refs/heads/master
i:
  245571: 0089441
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Apr 14, 2011
1 parent 55d8210 commit 0ad21f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 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: c2f7115e2e52a6c187b8c1f54f0e4970bb677be0
refs/heads/master: 893633817f5b58f5227365d74344e0170a718213
16 changes: 7 additions & 9 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2427,10 +2427,10 @@ static inline void ttwu_activate(struct task_struct *p, struct rq *rq,
wq_worker_waking_up(p, cpu_of(rq));
}

static inline void ttwu_post_activation(struct task_struct *p, struct rq *rq,
int wake_flags, bool success)
static void
ttwu_post_activation(struct task_struct *p, struct rq *rq, int wake_flags)
{
trace_sched_wakeup(p, success);
trace_sched_wakeup(p, true);
check_preempt_curr(rq, p, wake_flags);

p->state = TASK_RUNNING;
Expand Down Expand Up @@ -2546,9 +2546,9 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
#endif /* CONFIG_SMP */
ttwu_activate(p, rq, wake_flags & WF_SYNC, orig_cpu != cpu,
cpu == this_cpu, en_flags);
success = 1;
out_running:
ttwu_post_activation(p, rq, wake_flags, success);
ttwu_post_activation(p, rq, wake_flags);
success = 1;
out:
task_rq_unlock(rq, &flags);
put_cpu();
Expand All @@ -2567,7 +2567,6 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
static void try_to_wake_up_local(struct task_struct *p)
{
struct rq *rq = task_rq(p);
bool success = false;

BUG_ON(rq != this_rq());
BUG_ON(p == current);
Expand All @@ -2582,9 +2581,8 @@ static void try_to_wake_up_local(struct task_struct *p)
schedstat_inc(rq, ttwu_local);
}
ttwu_activate(p, rq, false, false, true, ENQUEUE_WAKEUP);
success = true;
}
ttwu_post_activation(p, rq, 0, success);
ttwu_post_activation(p, rq, 0);
}

/**
Expand Down Expand Up @@ -2747,7 +2745,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags)

rq = task_rq_lock(p, &flags);
activate_task(rq, p, 0);
trace_sched_wakeup_new(p, 1);
trace_sched_wakeup_new(p, true);
check_preempt_curr(rq, p, WF_FORK);
#ifdef CONFIG_SMP
if (p->sched_class->task_woken)
Expand Down

0 comments on commit 0ad21f6

Please sign in to comment.