iocost: over-budget forced IOs should schedule async delay
authorTejun Heo <tj@kernel.org>
Mon, 16 Dec 2019 21:34:00 +0000 (13:34 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:46:19 +0000 (16:46 +0100)
commit377a8744c32fcf66c22b3a3dc7cfd0d4644d5bb4
tree1aa433a3b1b3ac338f6e89c52126d3e44b8e6359
parent6d71f73d93830dd2ce00ad067a66726cc6213259
iocost: over-budget forced IOs should schedule async delay

commit d7bd15a138aef3be227818aad9c501e43c89c8c5 upstream.

When over-budget IOs are force-issued through root cgroup,
iocg_kick_delay() adjusts the async delay accordingly but doesn't
actually schedule async throttle for the issuing task.  This bug is
pretty well masked because sooner or later the offending threads are
gonna get directly throttled on regular IOs or have async delay
scheduled by mem_cgroup_throttle_swaprate().

However, it can affect control quality on filesystem metadata heavy
operations.  Let's fix it by invoking blkcg_schedule_throttle() when
iocg_kick_delay() says async delay is needed.

Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost")
Cc: stable@vger.kernel.org
Reported-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/blk-iocost.c