]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit - kernel/sched/fair.c
sched: Put rq's sched_avg under CONFIG_FAIR_GROUP_SCHED
authorDietmar Eggemann <dietmar.eggemann@arm.com>
Wed, 26 Feb 2014 11:19:33 +0000 (11:19 +0000)
committerIngo Molnar <mingo@kernel.org>
Thu, 27 Feb 2014 11:41:00 +0000 (12:41 +0100)
commitf5f9739d7a0ccbdcf913a0b3604b134129d14f7e
tree0a9052c1fb1f503114acb18ebde3669a6be0701d
parent6990566b535908905b4eccda7cc9e09c2db52187
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.

Reviewed-by: Ben Segall <bsegall@google.com>
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/530DCDC5.1060406@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c
kernel/sched/sched.h