]> git.baikalelectronics.ru Git - kernel.git/commit
block cfq: make queue preempt work for queues from different workload
authorShaohua Li <shaohua.li@intel.com>
Fri, 14 Jan 2011 07:41:02 +0000 (08:41 +0100)
committerJens Axboe <jaxboe@fusionio.com>
Fri, 14 Jan 2011 07:41:02 +0000 (08:41 +0100)
commit9669155a2760bab8845ee4b2cb2404f9e5bbe262
tree50b096572a4f8e7992e7e7e2e599e77d334c2b5b
parent1c98f16667204e95767d4e36f2c8fb0964e2cac4
block cfq: make queue preempt work for queues from different workload

I got this:
             fio-874   [007]  2157.724514:   8,32   m   N cfq874 preempt
             fio-874   [007]  2157.724519:   8,32   m   N cfq830 slice expired t=1
             fio-874   [007]  2157.724520:   8,32   m   N cfq830 sl_used=1 disp=0 charge=1 iops=0 sect=0
             fio-874   [007]  2157.724521:   8,32   m   N cfq830 set_active wl_prio:0 wl_type:0
             fio-874   [007]  2157.724522:   8,32   m   N cfq830 Not idling. st->count:1

cfq830 is an async queue, and preempted by a sync queue cfq874. But since we
have cfqg->saved_workload_slice mechanism, the preempt is a nop.
Looks currently our preempt is totally broken if the two queues are not from
the same workload type.
Below patch fixes it. This will might make async queue starvation, but it's
what our old code does before cgroup is added.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/cfq-iosched.c