diff options
author | Vivek Goyal <vgoyal@redhat.com> | 2016-09-19 15:12:41 -0600 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-09-19 15:12:41 -0600 |
commit | 164c80ed84a7669114869d9347c0f3ea7f56ea89 (patch) | |
tree | cc7a1df35a2c6127a49b279d87020cf8e8503113 /fs/timerfd.c | |
parent | 3be7988674ab33565700a37b210f502563d932e6 (diff) | |
download | linux-164c80ed84a7669114869d9347c0f3ea7f56ea89.tar.bz2 |
blk-throttle: Extend slice if throttle group is not empty
Right now, if slice is expired, we start a new slice. If a bio is
queued, we keep on extending slice by throtle_slice interval (100ms).
This worked well as long as pending timer function got executed with-in
few milli seconds of scheduled time. But looks like with recent changes
in timer subsystem, slack can be much longer depending on the expiry time
of the scheduled timer.
commit 500462a9de65 ("timers: Switch to a non-cascading wheel")
This means, by the time timer function gets executed, it is possible the
delay from scheduled time is more than 100ms. That means current code
will conclude that existing slice has expired and a new one needs to
be started. New slice will be 100ms by default and that will not be
sufficient to meet rate requirement of group given the bio size and
bio will not be dispatched and we will start a new timer function to
wait. And when that timer expires, same process will repeat and we
will wait again and this can easily be an infinite loop.
Solve this issue by starting a new slice only if throttle gropup is
empty. If it is not empty, that means there should be an active slice
going on. Ideally it should not be expired but given the slack, it is
possible that it has expired.
Reported-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/timerfd.c')
0 files changed, 0 insertions, 0 deletions