diff options
author | Tejun Heo <tj@kernel.org> | 2012-04-01 17:38:44 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-04-01 17:38:44 -0400 |
commit | 8a3d26151f24e2a2ffa550890144c3d54d2edb15 (patch) | |
tree | b99f5cf8db0abc02e39e5c5107f8d4342f81effa /block/blk-cgroup.h | |
parent | 155fead9b6347ead90e0b0396cb108a6ba6126c6 (diff) |
blkcg: move blkio_group_stats_cpu and friends to blk-throttle.c
blkio_group_stats_cpu is used only by blk-throtl and has no reason to
be defined in blkcg core.
* Move blkio_group_stats_cpu to blk-throttle.c and rename it to
tg_stats_cpu.
* blkg_policy_data->stats_cpu is replaced with throtl_grp->stats_cpu.
prfill functions updated accordingly.
* All related macros / functions are renamed so that they have tg_
prefix and the unnecessary @pol arguments are dropped.
* Per-cpu stats allocation code is also moved from blk-cgroup.c to
blk-throttle.c and gets simplified to only deal with
BLKIO_POLICY_THROTL. percpu stat free is performed by the exit
method throtl_exit_blkio_group().
* throtl_reset_group_stats() implemented for
blkio_reset_group_stats_fn method so that tg->stats_cpu can be
reset.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 791570394e87..e368dd00b8cf 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h | |||
@@ -64,14 +64,6 @@ struct blkg_rwstat { | |||
64 | uint64_t cnt[BLKG_RWSTAT_NR]; | 64 | uint64_t cnt[BLKG_RWSTAT_NR]; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | /* Per cpu blkio group stats */ | ||
68 | struct blkio_group_stats_cpu { | ||
69 | /* total bytes transferred */ | ||
70 | struct blkg_rwstat service_bytes; | ||
71 | /* total IOs serviced, post merge */ | ||
72 | struct blkg_rwstat serviced; | ||
73 | }; | ||
74 | |||
75 | struct blkio_group_conf { | 67 | struct blkio_group_conf { |
76 | unsigned int weight; | 68 | unsigned int weight; |
77 | u64 iops[2]; | 69 | u64 iops[2]; |
@@ -86,9 +78,6 @@ struct blkg_policy_data { | |||
86 | /* Configuration */ | 78 | /* Configuration */ |
87 | struct blkio_group_conf conf; | 79 | struct blkio_group_conf conf; |
88 | 80 | ||
89 | /* Per cpu stats pointer */ | ||
90 | struct blkio_group_stats_cpu __percpu *stats_cpu; | ||
91 | |||
92 | /* pol->pdata_size bytes of private data used by policy impl */ | 81 | /* pol->pdata_size bytes of private data used by policy impl */ |
93 | char pdata[] __aligned(__alignof__(unsigned long long)); | 82 | char pdata[] __aligned(__alignof__(unsigned long long)); |
94 | }; | 83 | }; |
@@ -106,8 +95,6 @@ struct blkio_group { | |||
106 | 95 | ||
107 | struct blkg_policy_data *pd[BLKIO_NR_POLICIES]; | 96 | struct blkg_policy_data *pd[BLKIO_NR_POLICIES]; |
108 | 97 | ||
109 | /* List of blkg waiting for per cpu stats memory to be allocated */ | ||
110 | struct list_head alloc_node; | ||
111 | struct rcu_head rcu_head; | 98 | struct rcu_head rcu_head; |
112 | }; | 99 | }; |
113 | 100 | ||