--- kernel/sched.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) Index: kernel/sched.c =================================================================== --- kernel/sched.c.orig +++ kernel/sched.c @@ -8607,6 +8607,21 @@ static u64 cpu_shares_read_u64(struct cg return (u64) tg->shares; } + +static u64 cpu_issued_shares_read_u64(struct cgroup *cgrp, struct cftype *cft) +{ + struct task_group *tg = cgroup_tg(cgrp); + u64 result = 0; + int i; + + if (!tg->se[0]) + return 0; + + for_each_online_cpu(i) + result += tg->se[i]->load.weight; + + return result; +} #endif /* CONFIG_FAIR_GROUP_SCHED */ #ifdef CONFIG_RT_GROUP_SCHED @@ -8640,6 +8655,10 @@ static struct cftype cpu_files[] = { .read_u64 = cpu_shares_read_u64, .write_u64 = cpu_shares_write_u64, }, + { + .name = "issued_shares", + .read_u64 = cpu_issued_shares_read_u64, + }, #endif #ifdef CONFIG_RT_GROUP_SCHED { -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/