229 lines
4.3 KiB
HTML
229 lines
4.3 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>I/O Request Lock Patch</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
|
"><LINK
|
|
REL="HOME"
|
|
TITLE="I/O Performance HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Raw I/O Variable-Size Optimization Patch"
|
|
HREF="x159.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Additional Resources"
|
|
HREF="x216.html"></HEAD
|
|
><BODY
|
|
CLASS="sect1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>I/O Performance HOWTO</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x159.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x216.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="AEN191">5. I/O Request Lock Patch</H1
|
|
><P
|
|
>This section provides information on the I/O request lock patch, also known as the scsi concurrent queuing patch (sior1), written by Johnathan Lahr. </P
|
|
><P
|
|
>The I/O request lock patch improves SCSI I/O performance on Linux 2.4 multi-processor systems by providing concurrent I/O request queuing. There are significant I/O performance and CPU utilization improvements possible by enabling multi-processors to concurrently drive multiple block devices.</P
|
|
><P
|
|
>Before the patch is applied block I/O requests are queued one at a time holding the global spin lock, <TT
|
|
CLASS="structfield"
|
|
><I
|
|
> io_request_lock</I
|
|
></TT
|
|
>. Once the patch is applied, SCSI requests are queued while holding the lock specific to the queue associated with the request. Requests that are made to different devices are queued concurrently, and requests that are made to the same device are queued serially.</P
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="AEN197">5.1. Locating the Patch</H2
|
|
><P
|
|
>You can download the I/O request patch from Sourceforge at <A
|
|
HREF="http://sourceforge.net/projects/lse/io"
|
|
TARGET="_top"
|
|
>http://sourceforge.net/projects/lse/io</A
|
|
>. The latest version is <EM
|
|
>sior1-v1.2416</EM
|
|
>. Patches that enable concurrent queuing for specific drivers are also available at SourceForge. The patch for the Emulex SCSI/FC is <EM
|
|
>lpfc_sior1-v0.249</EM
|
|
> and the patch for Adaptec SCSI is <EM
|
|
>aic_sior1-v0.249</EM
|
|
>.</P
|
|
><P
|
|
></P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="AEN205">5.2. Modifying Your Driver for the I/O Request Lock Patch</H2
|
|
><P
|
|
>The I/O request lock patch installs concurrent queuing capability into the SCSI midlayer. Concurrent queuing is
|
|
activated for each SCSI adapter device driver. To activate the driver, the <TT
|
|
CLASS="structfield"
|
|
><I
|
|
>concurrent_queue</I
|
|
></TT
|
|
> field in the <TT
|
|
CLASS="structfield"
|
|
><I
|
|
>Scsi_Host_Template</I
|
|
></TT
|
|
> structure must be set when the driver is registered.</P
|
|
><DIV
|
|
CLASS="note"
|
|
><P
|
|
></P
|
|
><TABLE
|
|
CLASS="note"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="25"
|
|
ALIGN="CENTER"
|
|
VALIGN="TOP"
|
|
><IMG
|
|
SRC="../images/note.gif"
|
|
HSPACE="5"
|
|
ALT="Note"></TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
><P
|
|
>Drivers that activate concurrent queuing must ensure that any access of the <TT
|
|
CLASS="structfield"
|
|
><I
|
|
>request_queue</I
|
|
></TT
|
|
> by the driver is protected by the <TT
|
|
CLASS="structfield"
|
|
><I
|
|
>request_queue.queue_lock</I
|
|
></TT
|
|
>.</P
|
|
><P
|
|
>Additional information is available on rebuilding device drivers at <A
|
|
HREF="http://www.xml.com/ldd/chapter/book/index.html"
|
|
TARGET="_top"
|
|
>http://www.xml.com/ldd/chapter/book/index.html</A
|
|
>.</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x159.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x216.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Raw I/O Variable-Size Optimization Patch</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Additional Resources</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |