dsched - Add the FQ policy
authorAlex Hornung <ahornung@gmail.com>
Thu, 25 Feb 2010 08:55:55 +0000 (08:55 +0000)
committerAlex Hornung <ahornung@gmail.com>
Thu, 15 Apr 2010 20:24:46 +0000 (20:24 +0000)
commit74ce043bc42e99a210c8ddff089908a80e6401ba
treee7fe6a082ce09abb98a00fbd0cd5c914dee6cf70
parent8c72e3d5eb98215e26f57511bee19cbaa1c44dd1
dsched - Add the FQ policy

* Add the FQ (fair queueing) policy for the dsched I/O scheduler
  framework.

* Right now, this is at best experimental; it only starts rate limiting
  when the disk is busy. Each process is allocated an equal fair amount
  of disk time, based on the average request latency and tps.
  If the disk is busy and one process exceeeds its fair share, its bios
  are queued for later dispatch.
  To avoid starvation of heavy write processes, heavy writes are
  interleaved once every 3 scheduler rebalances. The scheduler rebalance
  time is currently set to 1s, so that exceeding processes will be
  limited after this period.

* While I've done some limited testing on switching policies at runtime
  and even under heavy I/O going on, it is not recommended to do this,
  as some problems will crop up.

* Future work to do:
- stabilization pass
- adding bucket support (i.e. having different priority buckets
  for groups of processes, so that for example processes A,B and
  C get a total aggregate of 80% disk time, while processes D
  and E get a total aggregate of 20%, instead of each process
  getting 20%)
- adding an "ionice" userland tool to allow to change the
  bucket/priority of a process
sys/dsched/fq/dsched_fq.h [new file with mode: 0644]
sys/dsched/fq/dsched_fq_core.c [new file with mode: 0644]
sys/dsched/fq/dsched_fq_diskops.c [new file with mode: 0644]
sys/dsched/fq/dsched_fq_procops.c [new file with mode: 0644]
sys/dsched/fq/flow.txt [new file with mode: 0644]
test/dsched_fq/Makefile [new file with mode: 0644]
test/dsched_fq/fqstats.c [new file with mode: 0644]