Android Android Kernel Optimization I/O Schedulers


Example

You can enhance your kernel by adding new I/O schedulers if needed. Globally, governors and schedulers are the same; they both provide a way how the system should work. However, for the schedulers it is all about the input/output datastream except for the CPU settings. I/O schedulers decide how an upcoming I/O activity will be scheduled. The standard schedulers such as noop or cfq are performing very reasonably.

I/O schedulers can be found in kernel_source/block.

  1. Copy your I/O scheduler file (for example, sio-iosched.c) and browse to kernel_source/block. Paste the scheduler file there.

  2. Now open Kconfig.iosched and add your choice to the Kconfig, for example for SIO:

    config IOSCHED_SIO
      tristate "Simple I/O scheduler"
      default y
      ---help---
        The Simple I/O scheduler is an extremely simple scheduler,
        based on noop and deadline, that relies on deadlines to
        ensure fairness. The algorithm does not do any sorting but
        basic merging, trying to keep a minimum overhead. It is aimed
        mainly for aleatory access devices (eg: flash devices).
    
  3. Then set the default choice option as follows:

    default "sio" if DEFAULT_SIO
    

    Save the file.

  4. Open the Makefile in kernel_source/block/ and simply add the following line for SIO:

    obj-$(CONFIG_IOSCHED_SIO)    += sio-iosched.o
    

    Save the file and you are done! The I/O schedulers should now pop up at the menu config.

Similar commit on GitHub: added Simple I/O scheduler.