diff options
author | 2013-05-14 13:52:35 -0700 | |
---|---|---|
committer | 2013-05-14 13:52:35 -0700 | |
commit | 0e9f4164ba915052918a77ecb2a59822dbfd661c (patch) | |
tree | 3b9756ee1b216b9f8a9ed5e53623e4036971912b /tools/perf/scripts/python/export-to-postgresql.py | |
parent | blk-throttle: dispatch to throtl_data->service_queue.bio_lists[] (diff) | |
download | linux-dev-0e9f4164ba915052918a77ecb2a59822dbfd661c.tar.xz linux-dev-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 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions