]> git.baikalelectronics.ru Git - kernel.git/commit
cfq-iosched: Fix the incorrect timeslice accounting with forced_dispatch
authorDivyesh Shah <dpshah@google.com>
Fri, 9 Apr 2010 07:29:57 +0000 (09:29 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 9 Apr 2010 07:29:57 +0000 (09:29 +0200)
commit317dba34261fedd69f8699f96a08684fe9a6a450
tree62afdbc8eb90393e768d0770c20fc9b2c7e8e042
parentb1e2d3b714feb3cd34f83c348984fab7bcea1a96
cfq-iosched: Fix the incorrect timeslice accounting with forced_dispatch

When CFQ dispatches requests forcefully due to a barrier or changing iosched,
it runs through all cfqq's dispatching requests and then expires each queue.
However, it does not activate a cfqq before flushing its IOs resulting in
using stale values for computing slice_used.
This patch fixes it by calling activate queue before flushing reuqests from
each queue.

This is useful mostly for barrier requests because when the iosched is changing
it really doesnt matter if we have incorrect accounting since we're going to
break down all structures anyway.

We also now expire the current timeslice before moving on with the dispatch
to accurately account slice used for that cfqq.

Signed-off-by: Divyesh Shah<dpshah@google.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/cfq-iosched.c