mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
blk-throttle: pass the I/O counts of a dead group on
The recursive io_service_bytes and io_serviced files sum up the online groups plus what dead descendants left in aux_cnt. That worked while the counters lived in the blkg. Since commit7ca464383athey're in the throtl_grp and nobody passes them up, so the files go backwards when a child is removed. Add them to the parent in throtl_pd_offline(). Fixes:7ca464383a("blk-throtl: stop using blkg->stat_bytes and ->stat_ios") Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Acked-by: Tejun Heo <tj@kernel.org> Link: https://patch.msgid.link/20261028164415.1262013-26-axboe@kernel.dk Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
020f61242d
commit
587edb931f
|
|
@ -1670,7 +1670,18 @@ static void tg_flush_bios(struct throtl_grp *tg)
|
|||
|
||||
static void throtl_pd_offline(struct blkg_policy_data *pd)
|
||||
{
|
||||
tg_flush_bios(pd_to_tg(pd));
|
||||
struct throtl_grp *tg = pd_to_tg(pd);
|
||||
struct throtl_grp *parent = blkg_to_tg(tg_to_blkg(tg)->parent);
|
||||
|
||||
tg_flush_bios(tg);
|
||||
|
||||
/* the recursive files of the ancestors go on counting what it did */
|
||||
if (parent) {
|
||||
blkg_rwstat_add_aux(&parent->stat_bytes, &tg->stat_bytes);
|
||||
blkg_rwstat_add_aux(&parent->stat_ios, &tg->stat_ios);
|
||||
blkg_rwstat_reset(&tg->stat_bytes);
|
||||
blkg_rwstat_reset(&tg->stat_ios);
|
||||
}
|
||||
}
|
||||
|
||||
struct blkcg_policy blkcg_policy_throtl = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user