aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 871dd9e147a6..5ec2e8b4b01a 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2410,9 +2410,11 @@ static void update_avg(u64 *avg, u64 sample)
2410#endif 2410#endif
2411 2411
2412static void 2412static void
2413ttwu_stat(struct rq *rq, struct task_struct *p, int cpu, int wake_flags) 2413ttwu_stat(struct task_struct *p, int cpu, int wake_flags)
2414{ 2414{
2415#ifdef CONFIG_SCHEDSTATS 2415#ifdef CONFIG_SCHEDSTATS
2416 struct rq *rq = this_rq();
2417
2416#ifdef CONFIG_SMP 2418#ifdef CONFIG_SMP
2417 int this_cpu = smp_processor_id(); 2419 int this_cpu = smp_processor_id();
2418 2420
@@ -2561,9 +2563,10 @@ out_activate:
2561 ttwu_activate(rq, p, ENQUEUE_WAKEUP | ENQUEUE_WAKING); 2563 ttwu_activate(rq, p, ENQUEUE_WAKEUP | ENQUEUE_WAKING);
2562out_running: 2564out_running:
2563 ttwu_post_activation(p, rq, wake_flags); 2565 ttwu_post_activation(p, rq, wake_flags);
2564 ttwu_stat(rq, p, cpu, wake_flags);
2565 success = 1; 2566 success = 1;
2566 __task_rq_unlock(rq); 2567 __task_rq_unlock(rq);
2568
2569 ttwu_stat(p, cpu, wake_flags);
2567out: 2570out:
2568 raw_spin_unlock_irqrestore(&p->pi_lock, flags); 2571 raw_spin_unlock_irqrestore(&p->pi_lock, flags);
2569 put_cpu(); 2572 put_cpu();
@@ -2600,7 +2603,7 @@ static void try_to_wake_up_local(struct task_struct *p)
2600 ttwu_activate(rq, p, ENQUEUE_WAKEUP); 2603 ttwu_activate(rq, p, ENQUEUE_WAKEUP);
2601 2604
2602 ttwu_post_activation(p, rq, 0); 2605 ttwu_post_activation(p, rq, 0);
2603 ttwu_stat(rq, p, smp_processor_id(), 0); 2606 ttwu_stat(p, smp_processor_id(), 0);
2604out: 2607out:
2605 raw_spin_unlock(&p->pi_lock); 2608 raw_spin_unlock(&p->pi_lock);
2606} 2609}