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.
You can download the patch from one of the following locations:
Andrea Arcangeli has made the patch available at http://www.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.18pre7aa2/. The name of the file is 10_rawio-vary-io-1.
Alan Cox has included the patch in the 2.4.18pre9-ac2 kernel patch. The patch is available at http://www.kernel.org/pub/linux/kernel/people/alan/linux-2.4/2.4.18/.
The patch is available from SourceForge at http://sourceforge.net/projects/lse/io. The latest version is PAGESIZE_io-2.4.17.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.