From da7b3b8c80ebd46ed7bc22f7bc0aec3b0d0c739b Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Tue, 5 Apr 2011 17:23:55 +0200 Subject: [PATCH] --- yaml --- r: 245586 b: refs/heads/master c: b84cb5df1f9ad6da3f214c638d5fb08d0c99de1f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/sched.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index aa75a6fd7d1a..22e6a43899f3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e4a52bcb9a18142d79e231b6733cabdbf2e67c1f +refs/heads/master: b84cb5df1f9ad6da3f214c638d5fb08d0c99de1f diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index 871dd9e147a6..5ec2e8b4b01a 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -2410,9 +2410,11 @@ static void update_avg(u64 *avg, u64 sample) #endif static void -ttwu_stat(struct rq *rq, struct task_struct *p, int cpu, int wake_flags) +ttwu_stat(struct task_struct *p, int cpu, int wake_flags) { #ifdef CONFIG_SCHEDSTATS + struct rq *rq = this_rq(); + #ifdef CONFIG_SMP int this_cpu = smp_processor_id(); @@ -2561,9 +2563,10 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags) ttwu_activate(rq, p, ENQUEUE_WAKEUP | ENQUEUE_WAKING); out_running: ttwu_post_activation(p, rq, wake_flags); - ttwu_stat(rq, p, cpu, wake_flags); success = 1; __task_rq_unlock(rq); + + ttwu_stat(p, cpu, wake_flags); out: raw_spin_unlock_irqrestore(&p->pi_lock, flags); put_cpu(); @@ -2600,7 +2603,7 @@ static void try_to_wake_up_local(struct task_struct *p) ttwu_activate(rq, p, ENQUEUE_WAKEUP); ttwu_post_activation(p, rq, 0); - ttwu_stat(rq, p, smp_processor_id(), 0); + ttwu_stat(p, smp_processor_id(), 0); out: raw_spin_unlock(&p->pi_lock); }