[PATCH 18/22] sched: Rename ttwu_post_activation

Peter Zijlstra
2011-03-02T17:46:40Z

[-- Attachment #1: sched-ttwu_do_wakeup.patch --]
[-- Type: text/plain, Size: 1400 bytes --]

The ttwu_post_activation() does the core wakeup, it sets TASK_RUNNING
and performs wakeup-preemption, so give is a more descriptive name.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
---
kernel/sched.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

Index: linux-2.6/kernel/sched.c
===================================================================
--- linux-2.6.orig/kernel/sched.c
+++ linux-2.6/kernel/sched.c
@@ -2399,8 +2399,11 @@ ttwu_stat(struct task_struct *p, int cpu
#endif /* CONFIG_SCHEDSTATS */
}

+/*
+ * Mark the task runnable and perform wakeup-preemption.
+ */
static void
-ttwu_post_activation(struct task_struct *p, struct rq *rq, int wake_flags)
+ttwu_do_wakeup(struct rq *rq, struct task_struct *p, int wake_flags)
{
trace_sched_wakeup(p, true);
check_preempt_curr(rq, p, wake_flags);
@@ -2492,7 +2495,7 @@ try_to_wake_up(struct task_struct *p, un

activate_task(rq, p, ENQUEUE_WAKEUP | ENQUEUE_WAKING);
out_running:
- ttwu_post_activation(p, rq, wake_flags);
+ ttwu_do_wakeup(rq, p, wake_flags);
success = 1;
__task_rq_unlock(rq);

@@ -2529,7 +2532,7 @@ static void try_to_wake_up_local(struct
if (!p->on_rq)
activate_task(rq, p, ENQUEUE_WAKEUP);

- ttwu_post_activation(p, rq, 0);
+ ttwu_do_wakeup(rq, p, 0);
ttwu_stat(p, smp_processor_id(), 0);
out:
raw_spin_unlock(&p->pi_lock);