kernel_optimize_test/block
Shaohua Li 111be88398 block-throttle: avoid double charge
If a bio is throttled and split after throttling, the bio could be
resubmited and enters the throttling again. This will cause part of the
bio to be charged multiple times. If the cgroup has an IO limit, the
double charge will significantly harm the performance. The bio split
becomes quite common after arbitrary bio size change.

To fix this, we always set the BIO_THROTTLED flag if a bio is throttled.
If the bio is cloned/split, we copy the flag to new bio too to avoid a
double charge. However, cloned bio could be directed to a new disk,
keeping the flag be a problem. The observation is we always set new disk
for the bio in this case, so we can clear the flag in bio_set_dev().

This issue exists for a long time, arbitrary bio size change just makes
it worse, so this should go into stable at least since v4.2.

V1-> V2: Not add extra field in bio based on discussion with Tejun

Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: stable@vger.kernel.org
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2017-12-20 11:10:17 -07:00
..
partitions
badblocks.c
bfq-cgroup.c block, bfq: move debug blkio stats behind CONFIG_DEBUG_BLK_CGROUP 2017-11-14 20:13:33 -07:00
bfq-iosched.c block, bfq: move debug blkio stats behind CONFIG_DEBUG_BLK_CGROUP 2017-11-14 20:13:33 -07:00
bfq-iosched.h block, bfq: move debug blkio stats behind CONFIG_DEBUG_BLK_CGROUP 2017-11-14 20:13:33 -07:00
bfq-wf2q.c block, bfq: update blkio stats outside the scheduler lock 2017-11-14 20:13:33 -07:00
bio-integrity.c
bio.c block-throttle: avoid double charge 2017-12-20 11:10:17 -07:00
blk-cgroup.c
blk-core.c block/laptop_mode: Convert timers to use timer_setup() 2017-11-21 15:46:44 -08:00
blk-exec.c
blk-flush.c
blk-integrity.c
blk-ioc.c
blk-lib.c
blk-map.c block: fix blk_rq_append_bio 2017-12-18 13:55:43 -07:00
blk-merge.c
blk-mq-cpumap.c
blk-mq-debugfs.c
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-rdma.c
blk-mq-sched.c
blk-mq-sched.h
blk-mq-sysfs.c
blk-mq-tag.c
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c block/blk-mq.c: use kmalloc_array_node() 2017-11-15 18:21:02 -08:00
blk-mq.h
blk-settings.c
blk-softirq.c
blk-stat.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
blk-stat.h
blk-sysfs.c blk-sysfs: remove NULL pointer checking in queue_wb_lat_store 2017-11-23 22:00:17 -07:00
blk-tag.c
blk-throttle.c block-throttle: avoid double charge 2017-12-20 11:10:17 -07:00
blk-timeout.c
blk-wbt.c blk-wbt: fix comments typo 2017-11-23 22:00:20 -07:00
blk-wbt.h
blk-zoned.c
blk.h
bounce.c block: don't let passthrough IO go into .make_request_fn() 2017-12-18 13:55:43 -07:00
bsg-lib.c
bsg.c
cfq-iosched.c
cmdline-parser.c
compat_ioctl.c
deadline-iosched.c
elevator.c
genhd.c block: genhd.c: fix message typo 2017-11-19 11:02:19 -07:00
ioctl.c
ioprio.c
Kconfig
Kconfig.iosched
kyber-iosched.c kyber: fix another domain token wait queue hang 2017-12-06 12:33:07 -07:00
Makefile
mq-deadline.c
noop-iosched.c
opal_proto.h
partition-generic.c
scsi_ioctl.c
sed-opal.c
t10-pi.c