linux/block
Paolo Valente 63f42809f0 block, bfq: do not insert oom queue into position tree
[ Upstream commit 32c59e3a9a ]

BFQ maintains an ordered list, implemented with an RB tree, of
head-request positions of non-empty bfq_queues. This position tree,
inherited from CFQ, is used to find bfq_queues that contain I/O close
to each other. BFQ merges these bfq_queues into a single shared queue,
if this boosts throughput on the device at hand.

There is however a special-purpose bfq_queue that does not participate
in queue merging, the oom bfq_queue. Yet, also this bfq_queue could be
wrongly added to the position tree. So bfqq_find_close() could return
the oom bfq_queue, which is a source of further troubles in an
out-of-memory situation. This commit prevents the oom bfq_queue from
being inserted into the position tree.

Tested-by: Patrick Dung <patdung100@gmail.com>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
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>
2020-03-12 13:00:08 +01:00
..
partitions
Kconfig
Kconfig.iosched
Makefile
badblocks.c
bfq-cgroup.c block, bfq: get extra ref to prevent a queue from being freed during a group move 2020-03-12 13:00:08 +01:00
bfq-iosched.c block, bfq: do not insert oom queue into position tree 2020-03-12 13:00:08 +01:00
bfq-iosched.h
bfq-wf2q.c
bio-integrity.c block: fix memleak of bio integrity data 2020-01-26 10:01:09 +01:00
bio.c block: fix memleak of bio integrity data 2020-01-26 10:01:09 +01:00
blk-cgroup.c
blk-core.c block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT 2020-01-12 12:21:37 +01:00
blk-exec.c
blk-flush.c block: Fix a lockdep complaint triggered by request queue flushing 2020-01-12 12:21:42 +01:00
blk-integrity.c
blk-ioc.c
blk-iocost.c iocost: over-budget forced IOs should schedule async delay 2019-12-31 16:46:19 +01:00
blk-iolatency.c
blk-lib.c
blk-map.c block: fix memleak when __blk_rq_map_user_iov() is failed 2020-01-12 12:21:43 +01:00
blk-merge.c
blk-mq-cpumap.c
blk-mq-debugfs-zoned.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
blk-mq.h
blk-pm.c
blk-pm.h
blk-rq-qos.c
blk-rq-qos.h
blk-settings.c block: fix an integer overflow in logical block size 2020-01-23 08:22:32 +01:00
blk-softirq.c
blk-stat.c
blk-stat.h
blk-sysfs.c
blk-throttle.c
blk-timeout.c
blk-wbt.c
blk-wbt.h
blk-zoned.c
blk.h block: fix memleak of bio integrity data 2020-01-26 10:01:09 +01:00
bounce.c
bsg-lib.c block: Fix the type of 'sts' in bsg_queue_rq() 2020-01-23 08:22:44 +01:00
bsg.c
cmdline-parser.c
compat_ioctl.c compat_ioctl: block: handle BLKGETZONESZ/BLKGETNRZONES 2020-01-09 10:19:58 +01:00
elevator.c
genhd.c
ioctl.c
ioprio.c
kyber-iosched.c
mq-deadline.c
opal_proto.h
partition-generic.c
scsi_ioctl.c
sed-opal.c
t10-pi.c