summaryrefslogtreecommitdiffstats
path: root/kernel/sched/core.c
diff options
context:
space:
mode:
authorTejun Heo2013-12-05 18:28:01 +0100
committerTejun Heo2013-12-05 18:28:01 +0100
commit44ffc75ba9a63f972dbebd4fab6888db5fcd3b0e (patch)
tree74e59dc41c550c3013e4ed1ec651557f8acfceee /kernel/sched/core.c
parentcgroup: don't guarantee cgroup.procs is sorted if sane_behavior (diff)
downloadkernel-qcow2-linux-44ffc75ba9a63f972dbebd4fab6888db5fcd3b0e.tar.gz
kernel-qcow2-linux-44ffc75ba9a63f972dbebd4fab6888db5fcd3b0e.tar.xz
kernel-qcow2-linux-44ffc75ba9a63f972dbebd4fab6888db5fcd3b0e.zip
cgroup, sched: convert away from cftype->read_map()
In preparation of conversion to kernfs, cgroup file handling is being consolidated so that it can be easily mapped to the seq_file based interface of kernfs. cftype->read_map() doesn't add any value and being replaced with ->read_seq_string(). Update cpu_stats_show() and cpuacct_stats_show() accordingly. This patch doesn't make any visible behavior changes. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r--kernel/sched/core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index c1808606ee5f..f28ec6722f0b 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7257,14 +7257,14 @@ static int __cfs_schedulable(struct task_group *tg, u64 period, u64 quota)
}
static int cpu_stats_show(struct cgroup_subsys_state *css, struct cftype *cft,
- struct cgroup_map_cb *cb)
+ struct seq_file *sf)
{
struct task_group *tg = css_tg(css);
struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth;
- cb->fill(cb, "nr_periods", cfs_b->nr_periods);
- cb->fill(cb, "nr_throttled", cfs_b->nr_throttled);
- cb->fill(cb, "throttled_time", cfs_b->throttled_time);
+ seq_printf(sf, "nr_periods %d\n", cfs_b->nr_periods);
+ seq_printf(sf, "nr_throttled %d\n", cfs_b->nr_throttled);
+ seq_printf(sf, "throttled_time %llu\n", cfs_b->throttled_time);
return 0;
}
@@ -7318,7 +7318,7 @@ static struct cftype cpu_files[] = {
},
{
.name = "stat",
- .read_map = cpu_stats_show,
+ .read_seq_string = cpu_stats_show,
},
#endif
#ifdef CONFIG_RT_GROUP_SCHED