Paolo Valente
06666a19d5
block, bfq: fix in-service-queue check for queue merging
...
[ Upstream commit 058fdecc6de7cdecbf4c59b851e80eb2d6c5295f ]
When a new I/O request arrives for a bfq_queue, say Q, bfq checks
whether that request is close to
(a) the head request of some other queue waiting to be served, or
(b) the last request dispatched for the in-service queue (in case Q
itself is not the in-service queue)
If a queue, say Q2, is found for which the above condition holds, then
bfq merges Q and Q2, to hopefully get a more sequential I/O in the
resulting merged queue, and thus a possibly higher throughput.
Case (b) is checked by comparing the new request for Q with the last
request dispatched, assuming that the latter necessarily belonged to the
in-service queue. Unfortunately, this assumption is no longer always
correct, since commit d0edc2473be9 ("block, bfq: inject other-queue I/O
into seeky idle queues on NCQ flash").
When the assumption does not hold, queues that must not be merged may be
merged, causing unexpected loss of control on per-queue service
guarantees.
This commit solves this problem by adding an extra field, which stores
the actual last request dispatched for the in-service queue, and by
using this new field to correctly check case (b).
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-04-05 22:33:12 +02:00
..
partitions
partitions/aix: append null character to print data from disk
2018-07-27 09:17:41 -06:00
badblocks.c
badblocks: fix wrong return value in badblocks_set if badblocks are disabled
2017-11-03 11:29:50 -07:00
bfq-cgroup.c
block: bfq: swap puts in bfqg_and_blkg_put
2018-09-06 11:32:58 -06:00
bfq-iosched.c
block, bfq: fix in-service-queue check for queue merging
2019-04-05 22:33:12 +02:00
bfq-iosched.h
block, bfq: fix in-service-queue check for queue merging
2019-04-05 22:33:12 +02:00
bfq-wf2q.c
block, bfq: correctly charge and reset entity service in all cases
2018-11-13 11:08:28 -08:00
bio-integrity.c
block: move bio_integrity_{intervals,bytes} into blkdev.h
2018-07-26 15:49:41 -06:00
bio.c
block/bio: Do not zero user pages
2018-12-19 19:19:50 +01:00
blk-cgroup.c
blk-cgroup: increase number of supported policies
2018-09-11 10:59:53 -06:00
blk-core.c
SCSI: fix queue cleanup race before queue initialization is done
2018-11-21 09:19:18 +01:00
blk-exec.c
blk-mq-sched: remove unused 'can_block' arg from blk_mq_sched_insert_request
2018-01-17 09:49:21 -07:00
blk-flush.c
blk-mq: fix a hung issue when fsync
2019-02-20 10:25:36 +01:00
blk-integrity.c
block drivers/block: Use octal not symbolic permissions
2018-05-24 13:38:59 -06:00
blk-ioc.c
block, mm: remove unnecessary __GFP_HIGH flag
2018-07-09 09:07:54 -06:00
blk-iolatency.c
blk-iolatency: fix IO hang due to negative inflight counter
2019-03-13 14:02:38 -07:00
blk-lib.c
block: make sure writesame bio is aligned with logical block size
2018-11-13 11:08:16 -08:00
blk-map.c
Merge branch 'for-4.16/block' of git://git.kernel.dk/linux-block
2018-01-29 11:51:49 -08:00
blk-merge.c
block: make sure discard bio is aligned with logical block size
2018-11-13 11:08:16 -08:00
blk-mq-cpumap.c
blk-mq: don't keep offline CPUs mapped to hctx 0
2018-04-10 08:38:46 -06:00
blk-mq-debugfs-zoned.c
block: Make struct request_queue smaller for CONFIG_BLK_DEV_ZONED=n
2018-07-09 09:07:52 -06:00
blk-mq-debugfs.c
blk-mq: dequeue request one by one from sw queue if hctx is busy
2018-07-09 09:07:53 -06:00
blk-mq-debugfs.h
block: Make struct request_queue smaller for CONFIG_BLK_DEV_ZONED=n
2018-07-09 09:07:52 -06:00
blk-mq-pci.c
blk-mq: code clean-up by adding an API to clear set->mq_map
2018-07-09 09:07:53 -06:00
blk-mq-rdma.c
block: Add rdma affinity based queue mapping helper
2017-08-08 14:58:03 -04:00
blk-mq-sched.c
block: mq-deadline: Fix write completion handling
2019-01-13 09:51:07 +01:00
blk-mq-sched.h
block: mq-deadline: Fix write completion handling
2019-01-13 09:51:07 +01:00
blk-mq-sysfs.c
block drivers/block: Use octal not symbolic permissions
2018-05-24 13:38:59 -06:00
blk-mq-tag.c
blk-mq: Allow blocking queue tag iter callbacks
2018-09-25 20:17:59 -06:00
blk-mq-tag.h
Merge branch 'for-4.15/block' of git://git.kernel.dk/linux-block
2017-11-14 15:32:19 -08:00
blk-mq-virtio.c
blk-mq: provide a default queue mapping for virtio device
2017-02-27 20:54:05 +02:00
blk-mq.c
blk-mq: insert rq with DONTPREP to hctx dispatch list when requeue
2019-03-23 20:09:45 +01:00
blk-mq.h
blk-mq: issue directly if hw queue isn't busy in case of 'none'
2018-07-17 16:04:00 -06:00
blk-rq-qos.c
blk-rq-qos: make depth comparisons unsigned
2018-07-22 11:30:53 -06:00
blk-rq-qos.h
blk-rq-qos: make depth comparisons unsigned
2018-07-22 11:30:53 -06:00
blk-settings.c
block: allow max_discard_segments to be stacked
2018-07-24 14:46:39 -06:00
blk-softirq.c
block: fix timeout changes for legacy request drivers
2018-06-19 11:27:18 -06:00
blk-stat.c
blk-stat: export helpers for modifying blk_rq_stat
2018-07-09 09:07:54 -06:00
blk-stat.h
block: deactivate blk_stat timer in wbt_disable_default()
2019-01-13 09:51:06 +01:00
blk-sysfs.c
blk-wbt: don't maintain inflight counts if disabled
2018-08-23 09:34:46 -06:00
blk-tag.c
for-linus-20180616
2018-06-17 05:37:55 +09:00
blk-throttle.c
blkcg: use tryget logic when associating a blkg with a bio
2018-08-31 14:48:58 -06:00
blk-timeout.c
blk-mq: Fix timeout handling in case the timeout handler returns BLK_EH_DONE
2018-06-23 10:25:45 -06:00
blk-wbt.c
block: deactivate blk_stat timer in wbt_disable_default()
2019-01-13 09:51:06 +01:00
blk-wbt.h
block: remove external dependency on wbt_flags
2018-07-09 09:07:54 -06:00
blk-zoned.c
block: Remove a superfluous cast from blkdev_report_zones()
2018-07-09 09:07:52 -06:00
blk.h
block: make sure discard bio is aligned with logical block size
2018-11-13 11:08:16 -08:00
bounce.c
block: copy ioprio in __bio_clone_fast() and bounce
2018-12-01 09:37:32 +01:00
bsg-lib.c
block/bsg-lib: use PTR_ERR_OR_ZERO to simplify the flow path
2018-08-01 09:13:03 -06:00
bsg.c
block: bsg: move atomic_t ref_count variable to refcount API
2018-08-27 19:17:02 -06:00
cfq-iosched.c
cfq: Suppress compiler warnings about comparisons
2018-08-07 17:57:13 -06:00
cmdline-parser.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
compat_ioctl.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
deadline-iosched.c
block drivers/block: Use octal not symbolic permissions
2018-05-24 13:38:59 -06:00
elevator.c
block: fix deadline elevator drain for zoned block devices
2018-09-26 19:57:24 -06:00
genhd.c
block: use nanosecond resolution for iostat
2018-09-21 20:26:59 -06:00
ioctl.c
block: pass inclusive 'lend' parameter to truncate_inode_pages_range
2018-02-23 15:20:19 -07:00
ioprio.c
block: add ioprio_check_cap function
2018-05-31 10:50:54 -04:00
Kconfig
block: introduce blk-iolatency io controller
2018-07-09 09:07:54 -06:00
Kconfig.iosched
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
kyber-iosched.c
block: kyber: make kyber more friendly with merging
2018-05-30 10:47:40 -06:00
Makefile
block: introduce blk-iolatency io controller
2018-07-09 09:07:54 -06:00
mq-deadline.c
block: mq-deadline: Fix write completion handling
2019-01-13 09:51:07 +01:00
noop-iosched.c
block: move existing elevator ops to union
2017-01-17 10:03:33 -07:00
opal_proto.h
block: sed-opal: Set MBRDone on S3 resume path if TPER is MBREnabled
2017-09-11 09:45:52 -06:00
partition-generic.c
block: use rcu_work instead of call_rcu to avoid sleep in softirq
2019-01-22 21:40:35 +01:00
scsi_ioctl.c
block: consistently use GFP_NOIO instead of __GFP_NORECLAIM
2018-05-14 08:55:18 -06:00
sed-opal.c
block: sed-opal: Fix a couple off by one bugs
2018-06-20 12:04:06 -06:00
t10-pi.c
block: move dif_prepare/dif_complete functions to block layer
2018-07-30 08:27:02 -06:00