On 06/06/16 03:59, Leo Yan wrote:
> On Wed, Jun 01, 2016 at 08:39:21PM +0100, Dietmar Eggemann wrote:

[...]

>> @@ -2995,8 +2997,16 @@ static void attach_entity_load_avg(struct cfs_rq 
>> *cfs_rq, struct sched_entity *s
>>      if (!entity_is_task(se))
>>              return;
>>  
>> -    rq_of(cfs_rq)->cfs.avg.util_avg += se->avg.util_avg;
>> -    rq_of(cfs_rq)->cfs.avg.util_sum += se->avg.util_sum;
>> +    root_cfs_rq = &rq_of(cfs_rq)->cfs;
>> +
>> +    if (parent_entity(se))
>> +            __update_load_avg(cfs_rq_clock_task(root_cfs_rq),
>> +                              cpu_of(rq_of(root_cfs_rq)), &root_cfs_rq->avg,
>> +                              scale_load_down(root_cfs_rq->load.weight),
>> +                              upd_util_cfs_rq(root_cfs_rq), root_cfs_rq);
> 
> Maybe add below macro in this patch for more readable:
> #define upd_util_cfs_rq(cfs_rq) XXX

Sorry, this doesn't belong here since the macro is only introduced in
3/3. Should be 'root_cfs_rq->curr != NULL' here instead.

[...]

Reply via email to