Subject: Re: Changing the I/O scheduler on-the-fly
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Juan RP <juan@xtrarom.org>
List: tech-kern
Date: 09/19/2005 11:33:52
On Fri, 09 Sep 2005 12:51:04 +0900
YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp> wrote:

> as you are going to make them by-name,
> you don't need to expose them to userland anymore, right?

Yes, and I have new patch ready for review at
http://www.xtrarom.org/disk_scheduler.diff

I've changed my previous patch to pass strings instead of
bits as you (and blymn & cube) suggested me in the past, also it is
possible to specify the sort method, a new file was created to
add the three functions I've added (sys/kern/subr_disk_sched.c).

By default it will use BUFQ_SORT_RAWBLOCK if it's not specified (it will
be the same than BUFQ_DISK_DEFAULT_STRAT()|BUFQ_SORT_RAWBLOCK).

I haven't removed the ioctl to list the available schedulers built in
the kernel, because in the future (as cube pointed out) we could
specify add/remove strategies for some drivers.

Is this ok? is there something wrong?

Examples:

$ dkctl wd0 scheduler
/dev/rwd0d: priocscan (sortblk)
$

$ dkctl wd0 scheduler readprio sortcyl
/dev/rwd0d: priocscan -> readprio (sortcyl)
$

$ dkctl wd0 scheduler                 
/dev/rwd0d: readprio (sortcyl)
$

$ dkctl wd0 scheduler list
/dev/rwd0d: disksort fcfs priocscan readprio 
$