lkml.org 
[lkml]   [2014]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] sched: put rq's sched_avg under CONFIG_FAIR_GROUP_SCHED
Date
Dietmar Eggemann <dietmar.eggemann@arm.com> writes:

> On 25/02/14 13:16, Srikar Dronamraju wrote:
>>> The struct sched_avg of struct rq is only used in case group
>>> scheduling is enabled inside __update_tg_runnable_avg() to update
>>> per-cpu representation of a task group. I.e. that there is no need to
>>> maintain the runnable avg of a rq in the !CONFIG_FAIR_GROUP_SCHED case.
>>>
>>> This patch guards struct sched_avg of struct rq and
>>> update_rq_runnable_avg() with CONFIG_FAIR_GROUP_SCHED.
>>>

Reviewed-by: Ben Segall <bsegall@google.com>

If we ever decide to use runnable_avg_sum/period in balance or
something, it's trivial enough to move it back, and there is no point in
calculating unusued stats until then.

>>
>> While this patch looks good, I see fields in sched_avg viz decay_count,
>> last_runnable_update, load_avg_contrib only relevant to sched_entity.
>> i.e they don't seem to be updated or used for rq->avg. Should we look at
>> splitting sched_avg so that rq->avg doesn't have unwanted fields?
>
> Yes, AFAICS at least load_avg_contrib and decay_count are only relevant
> for struct sched_entity whereas last_runnable_update is used in
> __update_entity_runnable_avg() itself.
>
> By having struct sched_avg embedded into struct sched_entity and struct
> rq, __update_entity_runnable_avg() and __update_tg_runnable_avg() can be
> used on both and moreover, all current members of struct sched_avg
> belong logically together.
>
> With this patch I was more interested in the fact that we do not have to
> maintain the load avg for struct rq in a !CONFIG_FAIR_GROUP_SCHED system.
>

Yeah, last_runnable_update and runnable_avg_sum/period are used,
decay_count and load_avg_contrib could be moved to the se just fine, and
won't cause any problems.


\
 
 \ /
  Last update: 2014-02-25 21:41    [W:0.052 / U:6.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site