]> www.infradead.org Git - users/hch/misc.git/commit
blk-throttle: carry over directly
authorMing Lei <ming.lei@redhat.com>
Wed, 5 Mar 2025 04:31:21 +0000 (12:31 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 5 Mar 2025 23:24:40 +0000 (16:24 -0700)
commit6cc477c36875ea5329b8bfbdf4d91f83dc653c91
treee070e9d38774aa1ec20702ab03e05d5dd16b8880
parenta9fc8868b350cbf4ff730a4ea9651319cc669516
blk-throttle: carry over directly

Now ->carryover_bytes[] and ->carryover_ios[] only covers limit/config
update.

Actually the carryover bytes/ios can be carried to ->bytes_disp[] and
->io_disp[] directly, since the carryover is one-shot thing and only valid
in current slice.

Then we can remove the two fields and simplify code much.

Type of ->bytes_disp[] and ->io_disp[] has to change as signed because the
two fields may become negative when updating limits or config, but both are
big enough for holding bytes/ios dispatched in single slice

Cc: Tejun Heo <tj@kernel.org>
Cc: Josef Bacik <josef@toxicpanda.com>
Cc: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20250305043123.3938491-4-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-throttle.c
block/blk-throttle.h