Adding a new I/O scheduler to your Kernel

In my continuing effort to learn about kernel modification, I was blessed to be able to add a new I/O scheduler to my kernel. To be honest, the ArcTeam kernel that I started with was already well equiped in the I/O scheduler department, but as this is a learning experience, I just had to add one more!

The kernel already included noop, deadline, row, cfq, fiops, sio, and bfq. There really were not many options left of what to add, and of the few that remained there was some ambiguity of quality. However, I chose the VR I/O scheduler, and got to work.

First, I added the new I/O scheduler to block/Kconfig.iosched, like so:

tristate “VR I/O scheduler”
default y
The VR I/O scheduler gives the best benchmark readings, but is
somewhat unstable/unreliable for daily use.

This makes it an option that can be selected when you are compiling the kernel, such as when using

[CODE]$ make menuconfig[/CODE]


Next on the agenda was adding it into the block/Makefile:

+obj-$(CONFIG_IOSCHED_VR) += vr-iosched.o

Note that the file here is an .o (object file) but the actual file we will add is the block/vr-iosched.c file. That is because the makefile needs the object made FROM the c file, not the c file itself.

Finally, we copy our block/vr-iosched.c file into the block directory. It is over 400 lines long, or I would post it here. Surprisingly simple! I like to keep things simple!

You can even check it out on my github at:

Linux – keep it simple.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s