Subject: Changing the I/O scheduler on-the-fly
To: None <tech-kern@netbsd.org>
From: Juan RP <juan@xtrarom.org>
List: tech-kern
Date: 09/07/2005 05:48:21
Hi,

I'm trying to implement this feature... anyway I'm in the point that
I don't know how to fix the current problem:

It won't free the remaining buffers before switching to the new
scheduler (a big problem!).

Please take a look at my unfinished patch:

ftp://ftp.NetBSD.org/pub/NetBSD/misc/xtraeme/disk_scheduler_dkctl.diff

I would like to know how to flush all buffers on the disk queue before
switching to the new scheduler.

The following operations are supported right now:

To list all I/O schedulers built in the kernel:

[juan@Nocturno][~]> sudo dkctl wd0 listschedulers
Available I/O disk schedulers:
/dev/rwd0d: Scheduler fcfs (First Come First Serve)
/dev/rwd0d: Scheduler disksort (Min Seek Sort)
/dev/rwd0d: Scheduler readprio (Min Seek Sort with read priority)
/dev/rwd0d: Scheduler priocscan (Per Priority Ciclycal Scan)
[juan@Nocturno][~]>

To switch to another I/O scheduler:

[juan@Nocturno][~]> sudo dkctl wd0 setscheduler readprio
/dev/rwd0d: using readprio scheduler
[juan@Nocturno][~]>

Thanks.