mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
blk-cgroup: cgroup changes for IOPS limit support
o cgroup changes for IOPS throttling rules. Signed-off-by: Vivek Goyal <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
e43473b7f2
commit
7702e8f45b
2 changed files with 135 additions and 17 deletions
|
|
@ -93,6 +93,8 @@ enum blkcg_file_name_prop {
|
|||
enum blkcg_file_name_throtl {
|
||||
BLKIO_THROTL_read_bps_device,
|
||||
BLKIO_THROTL_write_bps_device,
|
||||
BLKIO_THROTL_read_iops_device,
|
||||
BLKIO_THROTL_write_iops_device,
|
||||
BLKIO_THROTL_io_service_bytes,
|
||||
BLKIO_THROTL_io_serviced,
|
||||
};
|
||||
|
|
@ -168,6 +170,7 @@ struct blkio_policy_node {
|
|||
* by file type "fileid".
|
||||
*/
|
||||
u64 bps;
|
||||
unsigned int iops;
|
||||
} val;
|
||||
};
|
||||
|
||||
|
|
@ -177,6 +180,10 @@ extern uint64_t blkcg_get_read_bps(struct blkio_cgroup *blkcg,
|
|||
dev_t dev);
|
||||
extern uint64_t blkcg_get_write_bps(struct blkio_cgroup *blkcg,
|
||||
dev_t dev);
|
||||
extern unsigned int blkcg_get_read_iops(struct blkio_cgroup *blkcg,
|
||||
dev_t dev);
|
||||
extern unsigned int blkcg_get_write_iops(struct blkio_cgroup *blkcg,
|
||||
dev_t dev);
|
||||
|
||||
typedef void (blkio_unlink_group_fn) (void *key, struct blkio_group *blkg);
|
||||
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,
|
|||
u64 read_bps);
|
||||
typedef void (blkio_update_group_write_bps_fn) (struct blkio_group *blkg,
|
||||
u64 write_bps);
|
||||
typedef void (blkio_update_group_read_iops_fn) (struct blkio_group *blkg,
|
||||
unsigned int read_iops);
|
||||
typedef void (blkio_update_group_write_iops_fn) (struct blkio_group *blkg,
|
||||
unsigned int write_iops);
|
||||
|
||||
struct blkio_policy_ops {
|
||||
blkio_unlink_group_fn *blkio_unlink_group_fn;
|
||||
blkio_update_group_weight_fn *blkio_update_group_weight_fn;
|
||||
blkio_update_group_read_bps_fn *blkio_update_group_read_bps_fn;
|
||||
blkio_update_group_write_bps_fn *blkio_update_group_write_bps_fn;
|
||||
blkio_update_group_read_iops_fn *blkio_update_group_read_iops_fn;
|
||||
blkio_update_group_write_iops_fn *blkio_update_group_write_iops_fn;
|
||||
};
|
||||
|
||||
struct blkio_policy_type {
|
||||
|
|
|
|||
Loading…
Reference in a new issue