Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux...
[firefly-linux-kernel-4.4.55.git] / kernel / sched / fair.c
index 30d76a18ae1a7fe9c939f4501e9dea65aed3493b..f03f54704c6d6036ec7f73b065c5675a32dbbb2b 100644 (file)
@@ -2757,6 +2757,10 @@ static inline int update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq)
        cfs_rq->load_last_update_time_copy = sa->last_update_time;
 #endif
 
+       /* Trace CPU load, unless cfs_rq belongs to a non-root task_group */
+       if (cfs_rq == &rq_of(cfs_rq)->cfs)
+               trace_sched_load_avg_cpu(cpu_of(rq_of(cfs_rq)), cfs_rq);
+
        return decayed || removed;
 }
 
@@ -2780,7 +2784,6 @@ static inline void update_load_avg(struct sched_entity *se, int update_tg)
 
        if (entity_is_task(se))
                trace_sched_load_avg_task(task_of(se), &se->avg);
-       trace_sched_load_avg_cpu(cpu, cfs_rq);
 }
 
 static void attach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se)
@@ -7125,8 +7128,10 @@ static void update_cpu_capacity(struct sched_domain *sd, int cpu)
                mcc->cpu = cpu;
 #ifdef CONFIG_SCHED_DEBUG
                raw_spin_unlock_irqrestore(&mcc->lock, flags);
+/*
                printk_deferred(KERN_INFO "CPU%d: update max cpu_capacity %lu\n",
                                cpu, capacity);
+*/
                goto skip_unlock;
 #endif
        }