Subject: RFC: patch to change the disk I/O scheduler via dkctl(8)
To: None <tech-kern@netbsd.org>
From: Juan RP <juan@xtrarom.org>
List: tech-kern
Date: 09/21/2005 20:27:35
Hi, 

This is a request for comments about my patch (on which I've been
working for the past weeks) that allows you to change the disk
I/O scheduler on the fly and per-drive via dkctl(8). 

I've added an option to make this feature conditional, if you want
to test my patch, please do the following steps:

1. Apply the patch:

$ ftp ftp://ftp.netbsd.org/pub/NetBSD/misc/xtraeme/disk_scheduler.diff
$ cd src && patch < /path/to/disk_scheduler.diff

2. Build a new kernel with "options DISK_SCHEDULER_CUSTOM".
3. Reboot
4. Rebuild dkctl(8) and copy the modified disk.h file.

$ cp /usr/src/sys/sys/disk.h /usr/include/sys/
$ cd /usr/src/sbin/dkctl && make USETOOLS=no dependall install

You should be able now to change the disk scheduler (and the sort
method) on the wd (4) driver:

$ dkctl wd0 scheduler <strategy> <sortmethod>

Where <sortmethod> can be "sortcyl" or "sortblk", by default it
will use "sortblk" if it's not defined.

You also can to list the strategies built in the kernel:

$ dkctl wd0 scheduler list

I would like to have this committed before 2006, if you think my patch
is incomplete, please tell me what's wrong and I'll try to fix it.

Thanks.