]> git.baikalelectronics.ru Git - kernel.git/commit
cfq-iosched: Fix regression in bonnie++ rewrite performance
authorJan Kara <jack@suse.cz>
Tue, 28 Jun 2016 07:04:01 +0000 (09:04 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 28 Jun 2016 14:21:48 +0000 (08:21 -0600)
commit9c50d72599d87ac877fc09ed434ac66e616cd365
tree55b2dcd151cd40b622c2c5e41d29d6cb1f38960e
parentdad61d5bec47931d8b3d853532cf3c96f9709b4a
cfq-iosched: Fix regression in bonnie++ rewrite performance

Commit bc5240ca5bc (cfq-iosched: Convert from jiffies to nanoseconds)
broke the condition for detecting starved sync IO in
cfq_completed_request() because rq->start_time remained in jiffies but
we compared it with nanosecond values. This manifested as a regression
in bonnie++ rewrite performance because we always ended up considering
sync IO starved and thus never increased async IO queue depth.

Since rq->start_time is used in a lot of places, converting it to ns
values would be non-trivial. So just revert the condition in CFQ to use
comparison with jiffies. This will lead to suboptimal results if
cfq_fifo_expire[1] will ever come close to 1 jiffie but so far we are
relatively far from that with the storage used with CFQ (the default
value is 128 ms).

Fixes: bc5240ca5bc1c224de225212da9f8378fd604e99
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/cfq-iosched.c