WSL2-Linux-Kernel/block
Josef Bacik d09d8df3a2 blkcg: add generic throttling mechanism
Since IO can be issued from literally anywhere it's almost impossible to
do throttling without having some sort of adverse effect somewhere else
in the system because of locking or other dependencies.  The best way to
solve this is to do the throttling when we know we aren't holding any
other kernel resources.  Do this by tracking throttling in a per-blkg
basis, and if we require throttling flag the task that it needs to check
before it returns to user space and possibly sleep there.

This is to address the case where a process is doing work that is
generating IO that can't be throttled, whether that is directly with a
lot of REQ_META IO, or indirectly by allocating so much memory that it
is swamping the disk with REQ_SWAP.  We can't use task_add_work as we
don't want to induce a memory allocation in the IO path, so simply
saving the request queue in the task and flagging it to do the
notify_resume thing achieves the same result without the overhead of a
memory allocation.

Signed-off-by: Josef Bacik <jbacik@fb.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-07-09 09:07:54 -06:00
..
partitions partitions/ldm: remove redundant pointer dgrp 2018-07-09 09:07:53 -06:00
Kconfig block: Make struct request_queue smaller for CONFIG_BLK_DEV_ZONED=n 2018-07-09 09:07:52 -06:00
Kconfig.iosched
Makefile block: Make struct request_queue smaller for CONFIG_BLK_DEV_ZONED=n 2018-07-09 09:07:52 -06:00
badblocks.c
bfq-cgroup.c
bfq-iosched.c block, bfq: give a better name to bfq_bfqq_may_idle 2018-07-09 09:07:52 -06:00
bfq-iosched.h block, bfq: add/remove entity weights correctly 2018-07-09 09:07:52 -06:00
bfq-wf2q.c block, bfq: fix service being wrongly set to zero in case of preemption 2018-07-09 09:07:52 -06:00
bio-integrity.c
bio.c swap,blkcg: issue swap io with the appropriate context 2018-07-09 09:07:54 -06:00
blk-cgroup.c blkcg: add generic throttling mechanism 2018-07-09 09:07:54 -06:00
blk-core.c block: Document how blk_update_request() handles RQF_SPECIAL_PAYLOAD requests 2018-07-09 09:07:52 -06:00
blk-exec.c
blk-flush.c block: fix use-after-free in block flush handling 2018-06-09 06:37:14 -06:00
blk-integrity.c
blk-ioc.c
blk-lib.c
blk-map.c
blk-merge.c
blk-mq-cpumap.c
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
blk-mq-sched.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-sched.h
blk-mq-sysfs.c
blk-mq-tag.c blk-mq: remove blk_mq_tagset_iter 2018-06-14 17:01:45 +02:00
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.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.h blk-mq: code clean-up by adding an API to clear set->mq_map 2018-07-09 09:07:53 -06:00
blk-settings.c
blk-softirq.c block: fix timeout changes for legacy request drivers 2018-06-19 11:27:18 -06:00
blk-stat.c
blk-stat.h
blk-sysfs.c
blk-tag.c for-linus-20180616 2018-06-17 05:37:55 +09:00
blk-throttle.c block: add bi_blkg to the bio for cgroups 2018-07-09 09:07:53 -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
blk-wbt.h
blk-zoned.c block: Remove a superfluous cast from blkdev_report_zones() 2018-07-09 09:07:52 -06:00
blk.h
bounce.c
bsg-lib.c
bsg.c bsg: fix race of bsg_open and bsg_unregister 2018-06-15 08:15:37 -06:00
cfq-iosched.c
cmdline-parser.c
compat_ioctl.c
deadline-iosched.c
elevator.c
genhd.c
ioctl.c
ioprio.c
kyber-iosched.c
mq-deadline.c
noop-iosched.c
opal_proto.h
partition-generic.c
scsi_ioctl.c
sed-opal.c block: sed-opal: Fix a couple off by one bugs 2018-06-20 12:04:06 -06:00
t10-pi.c