4. Raw I/O Variable-Size Optimization Patch

This section provides information on the raw I/O variable-size optimization patch for the Linux 2.4 kernel written by Badari Pulavarty. This patch is also known as the RAW VARY or PAGESIZE_io patch.

The raw I/O variable-size patch changes the block size used for raw I/O from hardsect_size (normally 512 bytes) to 4 kilobytes (K). The patch improves I/O throughput and CPU utilization by reducing the number of buffer heads needed for raw I/O operations.

4.1. Locating the Patch

You can download the patch from one of the following locations:

4.2. Modifying Your Driver for the Raw I/O Variable-Size Optimization Patch

In previous versions of this patch, changes were enabled for all drivers. However, the 2.4.17 and later versions of the patch enable the changes only for the Adaptec, Qlogic ISP1020, and IBM ServerRAID drivers. All other drivers for version 2.4.17 and later must be modified to make use of the patch by setting the can_do_varyio bit in the Scsi_Host_Template structure.


Drivers that have the raw I/O patch enabled must support buffer heads of variable sizes (b_size) in a single I/O request because hardsect_size is used until the data buffer is aligned on a 4 K boundary.

Additional information is available on rebuilding Linux device drivers at http://www.xml.com/ldd/chapter/book/index.html.