Messages in this thread | | | From | bsegall@google ... | Subject | Re: [PATCH] sched: put rq's sched_avg under CONFIG_FAIR_GROUP_SCHED | Date | Wed, 26 Feb 2014 09:53:09 -0800 |
| |
Dietmar Eggemann <dietmar.eggemann@arm.com> writes:
> On 25/02/14 20:52, Peter Zijlstra wrote: >> On Tue, Feb 25, 2014 at 11:47:42AM +0000, Dietmar Eggemann wrote: >>> +++ b/kernel/sched/sched.h >>> @@ -630,7 +630,9 @@ struct rq { >>> struct llist_head wake_list; >>> #endif >>> >>> +#ifdef CONFIG_FAIR_GROUP_SCHED >>> struct sched_avg avg; >>> +#endif >>> }; >> >> There is already a CONFIG_FAIR_GROUP_SCHED #ifdef in that structure; >> does it make sense to move this variable in there instead of adding yet >> another #ifdef? >> > > I changed the patch accordingly. > > -- >8 -- > Subject: [PATCH] sched: put rq's sched_avg under CONFIG_FAIR_GROUP_SCHED > > 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. > > There is an extra empty definition for update_rq_runnable_avg() > necessary for the !CONFIG_FAIR_GROUP_SCHED && CONFIG_SMP case. > > The function print_cfs_group_stats() which prints out struct sched_avg > of struct rq is already guarded with CONFIG_FAIR_GROUP_SCHED. > > Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Reviewed-by: Ben Segall <bsegall@google.com>
| |