rue/io: fix child blkcg of hier buffered write can not exceed 2MB
When using hierarchy buffered_write_bps function, unless explictly
set 0 or a higher value of buffered_write_bps in child blkcg. The
child group can't exceed 2MB by default.
--story=132623821 "child cgroup can not exceed 2MB"
Fixes: f630af7168
("rue/io: buffered_write_bps hierarchy support")
Reported-by: Zhijian Xu <zhijianxu@tencent.com>
Signed-off-by: Haisu Wang <haisuwang@tencent.com>
This commit is contained in:
parent
20c44f01ec
commit
a31f981ddb
|
@ -1984,6 +1984,7 @@ blkcg_css_alloc(struct cgroup_subsys_state *parent_css)
|
|||
#endif
|
||||
#ifdef CONFIG_BLK_DEV_THROTTLING_CGROUP_V1
|
||||
percpu_counter_init(&blkcg->nr_dirtied, 0, GFP_KERNEL);
|
||||
blkcg->dirty_ratelimit = INIT_DIRTY_BW;
|
||||
#endif
|
||||
list_add_tail(&blkcg->all_blkcgs_node, &all_blkcgs);
|
||||
|
||||
|
|
|
@ -1507,12 +1507,6 @@ static int tg_print_rwstat_recursive(struct seq_file *sf, void *v)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_THROTTLING_CGROUP_V1
|
||||
/*
|
||||
* Initial write bandwidth: 1000 MB/s (wb_init is 100 MB/s)
|
||||
* The bandwidth will be updated via blkcg_update_bandwidth()
|
||||
*/
|
||||
#define INIT_DIRTY_BW (1000 << (20 - PAGE_SHIFT))
|
||||
|
||||
static int tg_set_buffered_write_bps(struct cgroup_subsys_state *css,
|
||||
struct cftype *cft,
|
||||
u64 val)
|
||||
|
|
|
@ -221,6 +221,15 @@ struct throtl_grp {
|
|||
};
|
||||
|
||||
#ifdef CONFIG_BLK_CGROUP
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_THROTTLING_CGROUP_V1
|
||||
/*
|
||||
* Initial write bandwidth: 1000 MB/s (wb_init is 100 MB/s)
|
||||
* The bandwidth will be updated via blkcg_update_bandwidth()
|
||||
*/
|
||||
#define INIT_DIRTY_BW (1000 << (20 - PAGE_SHIFT))
|
||||
#endif
|
||||
|
||||
extern struct cgroup_subsys_state * const blkcg_root_css;
|
||||
|
||||
void blkcg_schedule_throttle(struct gendisk *disk, bool use_memdelay);
|
||||
|
|
Loading…
Reference in New Issue