block: Make cfq_target_latency tunable through sysfs.
authorTao Ma <boyu.mt@taobao.com>
Sun, 1 Apr 2012 21:33:39 +0000 (14:33 -0700)
committerJens Axboe <axboe@kernel.dk>
Sun, 1 Apr 2012 21:33:39 +0000 (14:33 -0700)
commit5bf14c0727a07ded1bd9fa6d77923d7e6dc32833
treedb1c4db0ece7ec7f416c9581eef3bdf172a73864
parent8bcb6c7d48eb341b1f49f814cdcbe05eb6f15680
block: Make cfq_target_latency tunable through sysfs.

In cfq, when we calculate a time slice for a process(or a cfqq to
be precise), we have to consider the cfq_target_latency so that all the
sync request have an estimated latency(300ms) and it is controlled by
cfq_target_latency. But in some hadoop test, we have found that if
there are many processes doing sequential read(24 for example), the
throughput is bad because every process can only work for about 25ms
and the cfqq is switched. That leads to a higher disk seek. We can
achive the good throughput by setting low_latency=0, but then some
read's latency is too much for the application.

So this patch makes cfq_target_latency tunable through sysfs so that
we can tune it and find some magic number which is not bad for both
the throughput and the read latency.

Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/cfq-iosched.c