aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-04-01 17:38:44 -0400
committerTejun Heo <tj@kernel.org>2012-04-01 17:38:44 -0400
commit41b38b6d540f951c49315d8573e6f6195a6e736d (patch)
treee667cec0bba6e7678810ff0087c96547a21a45c7 /block/blk-cgroup.h
parent629ed0b10209ffc4e1d439e5508d52d5e3a090b8 (diff)
blkcg: cfq doesn't need per-cpu dispatch stats
blkio_group_stats_cpu is used to count dispatch stats using per-cpu counters. This is used by both blk-throtl and cfq-iosched but the sharing is rather silly. * cfq-iosched doesn't need per-cpu dispatch stats. cfq always updates those stats while holding queue_lock. * blk-throtl needs per-cpu dispatch stats but only service_bytes and serviced. It doesn't make use of sectors. This patch makes cfq add and use global stats for service_bytes, serviced and sectors, removes per-cpu sectors counter and moves per-cpu stat printing code to blk-throttle.c. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r--block/blk-cgroup.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index 0b0a176ee007..c82de47ae69f 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -65,6 +65,10 @@ struct blkg_rwstat {
65}; 65};
66 66
67struct blkio_group_stats { 67struct blkio_group_stats {
68 /* total bytes transferred */
69 struct blkg_rwstat service_bytes;
70 /* total IOs serviced, post merge */
71 struct blkg_rwstat serviced;
68 /* number of ios merged */ 72 /* number of ios merged */
69 struct blkg_rwstat merged; 73 struct blkg_rwstat merged;
70 /* total time spent on device in ns, may not be accurate w/ queueing */ 74 /* total time spent on device in ns, may not be accurate w/ queueing */
@@ -73,6 +77,8 @@ struct blkio_group_stats {
73 struct blkg_rwstat wait_time; 77 struct blkg_rwstat wait_time;
74 /* number of IOs queued up */ 78 /* number of IOs queued up */
75 struct blkg_rwstat queued; 79 struct blkg_rwstat queued;
80 /* total sectors transferred */
81 struct blkg_stat sectors;
76 /* total disk time and nr sectors dispatched by this group */ 82 /* total disk time and nr sectors dispatched by this group */
77 struct blkg_stat time; 83 struct blkg_stat time;
78#ifdef CONFIG_DEBUG_BLK_CGROUP 84#ifdef CONFIG_DEBUG_BLK_CGROUP
@@ -104,8 +110,6 @@ struct blkio_group_stats_cpu {
104 struct blkg_rwstat service_bytes; 110 struct blkg_rwstat service_bytes;
105 /* total IOs serviced, post merge */ 111 /* total IOs serviced, post merge */
106 struct blkg_rwstat serviced; 112 struct blkg_rwstat serviced;
107 /* total sectors transferred */
108 struct blkg_stat sectors;
109}; 113};
110 114
111struct blkio_group_conf { 115struct blkio_group_conf {
@@ -183,10 +187,6 @@ int blkcg_print_stat(struct cgroup *cgrp, struct cftype *cft,
183 struct seq_file *sf); 187 struct seq_file *sf);
184int blkcg_print_rwstat(struct cgroup *cgrp, struct cftype *cft, 188int blkcg_print_rwstat(struct cgroup *cgrp, struct cftype *cft,
185 struct seq_file *sf); 189 struct seq_file *sf);
186int blkcg_print_cpu_stat(struct cgroup *cgrp, struct cftype *cft,
187 struct seq_file *sf);
188int blkcg_print_cpu_rwstat(struct cgroup *cgrp, struct cftype *cft,
189 struct seq_file *sf);
190 190
191struct blkg_conf_ctx { 191struct blkg_conf_ctx {
192 struct gendisk *disk; 192 struct gendisk *disk;