[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] linux-iscsi bug fix

[For information, submitted as a bug report to linux-iscsi
sourceforge project]

A number of people have reported problems running the iscsi
driver in linux 2.4 and 2.6 when running over the Xen Virtual
Machine Monitor. We've investigated and tracked it down to an
easy to fix issue within the iscsi driver.

Briefly, the problem occurs when the iscsi driver is passed
scatter-gather elements that span multiple memory pages. The
driver assumes that, because the pages are physically contiguous
that they are also virtually contiguous. Although this is true
for low memory (no CONFIG_HIGHMEM) pages in native Linux, it 
is not necessarily the case when running Xen/Linux. This 
assumption is also wrong when running with CONFIG_HIGHMEM when 
each page must be separately kmap'ed.

The simple fix is to prevent multi-page merging in the generic
blkdev code by specifying DISABLE_CLUSTERING in the
use_clustering flag of the scsi_host_template.

i.e. in driver/iscsi-initiator.c:
      .use_clustering = DISABLE_CLUSTERING,

We have measured no degradation in performance talking to a
decent hardware target over gigabit ethernet, and indeed you
wouldn't expect this to have any measurable effect as the cost 
of iterating over a slightly longer sg_list is insignificant. 
If you read the comment in include/scsi/scsi_ho2st.h the
ENABLE_CLUSTERING mode is intended only to work around an 
issue with brain-dead obsolete hardware host adaptors such as
the BusLogic.

Would you accept this patch into the 4.0.1 code base?

Ian Pratt, Keir Fraser

SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.