diff options
author | Vivek Goyal <vgoyal@redhat.com> | 2010-09-15 17:06:36 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-09-16 02:42:58 -0400 |
commit | 7702e8f45b0a3bb262b9366c60beb5445758d94c (patch) | |
tree | bd61754827def804fe5a1f790f3eb303154df63d /block/blk-cgroup.h | |
parent | e43473b7f223ec866f7db273697e76c337c390f9 (diff) |
blk-cgroup: cgroup changes for IOPS limit support
o cgroup changes for IOPS throttling rules.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 1b738827b2f6..2070053a30b1 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h | |||
@@ -93,6 +93,8 @@ enum blkcg_file_name_prop { | |||
93 | enum blkcg_file_name_throtl { | 93 | enum blkcg_file_name_throtl { |
94 | BLKIO_THROTL_read_bps_device, | 94 | BLKIO_THROTL_read_bps_device, |
95 | BLKIO_THROTL_write_bps_device, | 95 | BLKIO_THROTL_write_bps_device, |
96 | BLKIO_THROTL_read_iops_device, | ||
97 | BLKIO_THROTL_write_iops_device, | ||
96 | BLKIO_THROTL_io_service_bytes, | 98 | BLKIO_THROTL_io_service_bytes, |
97 | BLKIO_THROTL_io_serviced, | 99 | BLKIO_THROTL_io_serviced, |
98 | }; | 100 | }; |
@@ -168,6 +170,7 @@ struct blkio_policy_node { | |||
168 | * by file type "fileid". | 170 | * by file type "fileid". |
169 | */ | 171 | */ |
170 | u64 bps; | 172 | u64 bps; |
173 | unsigned int iops; | ||
171 | } val; | 174 | } val; |
172 | }; | 175 | }; |
173 | 176 | ||
@@ -177,6 +180,10 @@ extern uint64_t blkcg_get_read_bps(struct blkio_cgroup *blkcg, | |||
177 | dev_t dev); | 180 | dev_t dev); |
178 | extern uint64_t blkcg_get_write_bps(struct blkio_cgroup *blkcg, | 181 | extern uint64_t blkcg_get_write_bps(struct blkio_cgroup *blkcg, |
179 | dev_t dev); | 182 | dev_t dev); |
183 | extern unsigned int blkcg_get_read_iops(struct blkio_cgroup *blkcg, | ||
184 | dev_t dev); | ||
185 | extern unsigned int blkcg_get_write_iops(struct blkio_cgroup *blkcg, | ||
186 | dev_t dev); | ||
180 | 187 | ||
181 | typedef void (blkio_unlink_group_fn) (void *key, struct blkio_group *blkg); | 188 | typedef void (blkio_unlink_group_fn) (void *key, struct blkio_group *blkg); |
182 | typedef void (blkio_update_group_weight_fn) (struct blkio_group *blkg, | 189 | typedef void (blkio_update_group_weight_fn) (struct blkio_group *blkg, |
@@ -185,12 +192,18 @@ typedef void (blkio_update_group_read_bps_fn) (struct blkio_group *blkg, | |||
185 | u64 read_bps); | 192 | u64 read_bps); |
186 | typedef void (blkio_update_group_write_bps_fn) (struct blkio_group *blkg, | 193 | typedef void (blkio_update_group_write_bps_fn) (struct blkio_group *blkg, |
187 | u64 write_bps); | 194 | u64 write_bps); |
195 | typedef void (blkio_update_group_read_iops_fn) (struct blkio_group *blkg, | ||
196 | unsigned int read_iops); | ||
197 | typedef void (blkio_update_group_write_iops_fn) (struct blkio_group *blkg, | ||
198 | unsigned int write_iops); | ||
188 | 199 | ||
189 | struct blkio_policy_ops { | 200 | struct blkio_policy_ops { |
190 | blkio_unlink_group_fn *blkio_unlink_group_fn; | 201 | blkio_unlink_group_fn *blkio_unlink_group_fn; |
191 | blkio_update_group_weight_fn *blkio_update_group_weight_fn; | 202 | blkio_update_group_weight_fn *blkio_update_group_weight_fn; |
192 | blkio_update_group_read_bps_fn *blkio_update_group_read_bps_fn; | 203 | blkio_update_group_read_bps_fn *blkio_update_group_read_bps_fn; |
193 | blkio_update_group_write_bps_fn *blkio_update_group_write_bps_fn; | 204 | blkio_update_group_write_bps_fn *blkio_update_group_write_bps_fn; |
205 | blkio_update_group_read_iops_fn *blkio_update_group_read_iops_fn; | ||
206 | blkio_update_group_write_iops_fn *blkio_update_group_write_iops_fn; | ||
194 | }; | 207 | }; |
195 | 208 | ||
196 | struct blkio_policy_type { | 209 | struct blkio_policy_type { |