linux/block
Paolo Valente 13c931bd9a block, bfq: update wr_busy_queues if needed on a queue split
This commit fixes a bug triggered by a non-trivial sequence of
events. These events are briefly described in the next two
paragraphs. The impatiens, or those who are familiar with queue
merging and splitting, can jump directly to the last paragraph.

On each I/O-request arrival for a shared bfq_queue, i.e., for a
bfq_queue that is the result of the merge of two or more bfq_queues,
BFQ checks whether the shared bfq_queue has become seeky (i.e., if too
many random I/O requests have arrived for the bfq_queue; if the device
is non rotational, then random requests must be also small for the
bfq_queue to be tagged as seeky). If the shared bfq_queue is actually
detected as seeky, then a split occurs: the bfq I/O context of the
process that has issued the request is redirected from the shared
bfq_queue to a new non-shared bfq_queue. As a degenerate case, if the
shared bfq_queue actually happens to be shared only by one process
(because of previous splits), then no new bfq_queue is created: the
state of the shared bfq_queue is just changed from shared to non
shared.

Regardless of whether a brand new non-shared bfq_queue is created, or
the pre-existing shared bfq_queue is just turned into a non-shared
bfq_queue, several parameters of the non-shared bfq_queue are set
(restored) to the original values they had when the bfq_queue
associated with the bfq I/O context of the process (that has just
issued an I/O request) was merged with the shared bfq_queue. One of
these parameters is the weight-raising state.

If, on the split of a shared bfq_queue,
1) a pre-existing shared bfq_queue is turned into a non-shared
bfq_queue;
2) the previously shared bfq_queue happens to be busy;
3) the weight-raising state of the previously shared bfq_queue happens
to change;
the number of weight-raised busy queues changes. The field
wr_busy_queues must then be updated accordingly, but such an update
was missing. This commit adds the missing update.

Reported-by: Luca Miccio <lucmiccio@gmail.com>
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2017-06-27 12:30:47 -06:00
..
partitions
badblocks.c block: Add fallthrough markers to switch statements 2017-06-21 11:46:07 -06:00
bfq-cgroup.c
bfq-iosched.c block, bfq: update wr_busy_queues if needed on a queue split 2017-06-27 12:30:47 -06:00
bfq-iosched.h
bfq-wf2q.c
bio-integrity.c
bio.c block: add support for write hints in a bio 2017-06-27 12:05:27 -06:00
blk-cgroup.c
blk-core.c block: don't set bounce limit in blk_init_queue 2017-06-27 12:13:45 -06:00
blk-exec.c
blk-flush.c block: Check locking assumptions at runtime 2017-06-20 19:27:14 -06:00
blk-integrity.c
blk-ioc.c
blk-lib.c
blk-map.c blk-map: call blk_queue_bounce from blk_rq_append_bio 2017-06-27 12:13:21 -06:00
blk-merge.c block: add support for write hints in a bio 2017-06-27 12:05:27 -06:00
blk-mq-cpumap.c
blk-mq-debugfs.c blk-mq: expose write hints through debugfs 2017-06-27 12:05:31 -06:00
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-sched.c Merge commit '8e8320c9315c' into for-4.13/block 2017-06-22 21:55:24 -06:00
blk-mq-sched.h Merge commit '8e8320c9315c' into for-4.13/block 2017-06-22 21:55:24 -06:00
blk-mq-sysfs.c
blk-mq-tag.c
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c blk-mq: don't bounce by default 2017-06-27 12:13:45 -06:00
blk-mq.h blk-mq: remove __blk_mq_alloc_request 2017-06-18 10:08:55 -06:00
blk-settings.c block: don't bother with bounce limits for make_request drivers 2017-06-27 12:13:45 -06:00
blk-softirq.c
blk-stat.c
blk-stat.h
blk-sysfs.c
blk-tag.c block: Check locking assumptions at runtime 2017-06-20 19:27:14 -06:00
blk-throttle.c
blk-timeout.c block: Check locking assumptions at runtime 2017-06-20 19:27:14 -06:00
blk-wbt.c
blk-wbt.h
blk-zoned.c
blk.h block: move bounce declarations to block/blk.h 2017-06-27 12:13:45 -06:00
bounce.c block: remove the queue_bounce_pfn helper 2017-06-27 12:13:45 -06:00
bsg-lib.c
bsg.c block: Make most scsi_req_init() calls implicit 2017-06-20 19:27:14 -06:00
cfq-iosched.c
cmdline-parser.c
compat_ioctl.c
deadline-iosched.c
elevator.c block: Add fallthrough markers to switch statements 2017-06-21 11:46:07 -06:00
genhd.c block: Constify disk_type 2017-06-20 19:27:14 -06:00
ioctl.c
ioprio.c block: Add fallthrough markers to switch statements 2017-06-21 11:46:07 -06:00
Kconfig
Kconfig.iosched
kyber-iosched.c
Makefile
mq-deadline.c
noop-iosched.c
opal_proto.h
partition-generic.c
scsi_ioctl.c block: Change argument type of scsi_req_init() 2017-06-20 19:27:14 -06:00
sed-opal.c
t10-pi.c