sched/tg: Use 'unsigned long' for load variable in task group

Since tg->load_avg is smaller than tg->load_weight, we don't need a
atomic64_t variable for load_avg in 32 bit machine.
The same reason for cfs_rq->tg_load_contrib.

The atomic_long_t/unsigned long variable type are more efficient and
convenience for them.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Tested-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1371694737-29336-11-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Alex Shi
2013-06-20 10:18:54 +08:00
committed by Ingo Molnar
parent 72a4cf20cb
commit bf5b986ed4
3 changed files with 11 additions and 11 deletions

View File

@@ -150,7 +150,7 @@ struct task_group {
atomic_t load_weight;
#ifdef CONFIG_SMP
atomic64_t load_avg;
atomic_long_t load_avg;
atomic_t runnable_avg;
#endif
#endif
@@ -284,7 +284,7 @@ struct cfs_rq {
#ifdef CONFIG_FAIR_GROUP_SCHED
/* Required to track per-cpu representation of a task_group */
u32 tg_runnable_contrib;
u64 tg_load_contrib;
unsigned long tg_load_contrib;
#endif /* CONFIG_FAIR_GROUP_SCHED */
/*