io-controller: Add a new interface "weight_device" for IO-Controller
authorGui Jianfeng <guijianfeng@cn.fujitsu.com>
Tue, 13 Apr 2010 08:05:49 +0000 (16:05 +0800)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 13 Apr 2010 08:14:20 +0000 (10:14 +0200)
commit34d0f179d6dd711d3fc13c0820a456c59aae8048
tree0e3d533e16cd7d99b0d28ec13353862f1da96dfd
parent812df48d127365ffd0869aa139738f572a86759c
io-controller: Add a new interface "weight_device" for IO-Controller

Currently, IO Controller makes use of blkio.weight to assign weight for
all devices. Here a new user interface "blkio.weight_device" is introduced to
assign different weights for different devices. blkio.weight becomes the
default value for devices which are not configured by "blkio.weight_device"

You can use the following format to assigned specific weight for a given
device:
#echo "major:minor weight" > blkio.weight_device

major:minor represents device number.

And you can remove weight for a given device as following:
#echo "major:minor 0" > blkio.weight_device

V1->V2 changes:
- use user interface "weight_device" instead of "policy" suggested by Vivek
- rename some struct suggested by Vivek
- rebase to 2.6-block "for-linus" branch
- remove an useless list_empty check pointed out by Li Zefan
- some trivial typo fix

V2->V3 changes:
- Move policy_*_node() functions up to get rid of forward declarations
- rename related functions by adding prefix "blkio_"

Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/blk-cgroup.c
block/blk-cgroup.h
block/cfq-iosched.c