diff options
author | Tejun Heo <tj@kernel.org> | 2013-05-14 13:52:35 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-05-14 13:52:35 -0700 |
commit | 0e9f4164ba915052918a77ecb2a59822dbfd661c (patch) | |
tree | 3b9756ee1b216b9f8a9ed5e53623e4036971912b /fs/file_table.c | |
parent | 651930bc1c2a2550fde93a8cfa1a201c363a0ca1 (diff) | |
download | blackbird-op-linux-0e9f4164ba915052918a77ecb2a59822dbfd661c.tar.gz blackbird-op-linux-0e9f4164ba915052918a77ecb2a59822dbfd661c.zip |
blk-throttle: generalize update_disptime optimization in blk_throtl_bio()
When blk_throtl_bio() wants to queue a bio to a tg (throtl_grp), it
avoids invoking tg_update_disptime() and
throtl_schedule_next_dispatch() if the tg already has bios queued in
that direction. As a new bio is appeneded after the existing ones, it
can't change the tg's next dispatch time or the parent's dispatch
schedule.
This optimization is currently open coded in blk_throtl_bio().
Whether the target biolist was occupied was recorded in a local
variable and later used to skip disptime update. This patch moves
generalizes it so that throtl_add_bio_tg() sets a new flag
THROTL_TG_WAS_EMPTY if the biolist was empty before the new bio was
added. tg_update_disptime() clears the flag automatically.
blk_throtl_bio() is updated to simply test the flag before updating
disptime.
This patch doesn't make any functional differences now but will enable
using the same optimization for recursive dispatch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Diffstat (limited to 'fs/file_table.c')
0 files changed, 0 insertions, 0 deletions