From a3e878ca276bed9121e09e68d13fbe56467c3a8b Mon Sep 17 00:00:00 2001
From: johann <johann>
Date: Fri, 25 Apr 2008 14:45:45 +0000
Subject: [PATCH] Branch HEAD b=14410 i=bzzz i=kalpak

Force q->max_phys_segments to MAX_PHYS_SEGMENTS on SLES10 to be
sure that 1MB requests are not fragmented by the block layer.
---
 lustre/ChangeLog                               | 16 +++++++++++-----
 .../patches/blkdev_tunables-2.6-sles10.patch   | 18 +++++++++++++++---
 2 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/lustre/ChangeLog b/lustre/ChangeLog
index 09be0432d7..acf8c590eb 100644
--- a/lustre/ChangeLog
+++ b/lustre/ChangeLog
@@ -16,7 +16,7 @@ Severity   : normal
 Bugzilla   : 15069
 Description: don't put request into delay list while invalidate in flight.
 Details    : ptlrpc_delay_request sometimes put in delay list while invalidate
-             import in flight. this produce timeout for invalidate and sometimes
+	     import in flight. this produce timeout for invalidate and sometimes
 	     can cause stale data.
 
 Severity   : minor
@@ -528,10 +528,10 @@ Description: when mds and osts use different quota unit(32bit and 64bit),
 Details    : void sending multiple quota reqs to mds, which will keep the
 	     status between the reqs.
 
-Severity   : normal 
+Severity   : normal
 Bugzilla   : 13125
 Description: osts not allocated evenly to files
-Details    : change the condition to increase offset_idx 
+Details    : change the condition to increase offset_idx
 
 Severity   : critical
 Frequency  : Always for filesystems larger than 2TB on 32-bit systems.
@@ -880,8 +880,14 @@ Severity   : normal
 Bugzilla   : 15188
 Description: MDS deadlock with many ll_sync_lov threads and I/O stalled
 Details    : Use fsfilt_sync() for both the whole filesystem sync and
-             individual file sync to eliminate dangerous inode locking
-             with I_LOCK that can lead to a deadlock.
+	     individual file sync to eliminate dangerous inode locking
+	     with I_LOCK that can lead to a deadlock.
+
+Severity   : normal
+Bugzilla   : 14410
+Description: performance in 1.6.3
+Details    : Force q->max_phys_segments to MAX_PHYS_SEGMENTS on SLES10 to be
+	     sure that 1MB requests are not fragmented by the block layer.
 
 --------------------------------------------------------------------------------
 
diff --git a/lustre/kernel_patches/patches/blkdev_tunables-2.6-sles10.patch b/lustre/kernel_patches/patches/blkdev_tunables-2.6-sles10.patch
index a2d7da22a7..5fbc8abf6d 100644
--- a/lustre/kernel_patches/patches/blkdev_tunables-2.6-sles10.patch
+++ b/lustre/kernel_patches/patches/blkdev_tunables-2.6-sles10.patch
@@ -1,7 +1,7 @@
-Index: linux-2616-46014/include/scsi/scsi_host.h
+Index: linux-2.6.16.54-0.2.3/include/scsi/scsi_host.h
 ===================================================================
---- linux-2616-46014.orig/include/scsi/scsi_host.h
-+++ linux-2616-46014/include/scsi/scsi_host.h
+--- linux-2.6.16.54-0.2.3.orig/include/scsi/scsi_host.h
++++ linux-2.6.16.54-0.2.3/include/scsi/scsi_host.h
 @@ -28,7 +28,7 @@ struct scsi_transport_template;
   *	 used in one scatter-gather request.
   */
@@ -11,3 +11,15 @@ Index: linux-2616-46014/include/scsi/scsi_host.h
  
  
  #define DISABLE_CLUSTERING 0
+Index: linux-2.6.16.54-0.2.3/drivers/scsi/scsi_lib.c
+===================================================================
+--- linux-2.6.16.54-0.2.3.orig/drivers/scsi/scsi_lib.c
++++ linux-2.6.16.54-0.2.3/drivers/scsi/scsi_lib.c
+@@ -1573,6 +1573,7 @@ struct request_queue *scsi_alloc_queue(s
+ 
+ 	blk_queue_prep_rq(q, scsi_prep_fn);
+ 
++	blk_queue_max_phys_segments(q, SCSI_MAX_PHYS_SEGMENTS);
+ 	blk_queue_max_hw_segments(q, shost->sg_tablesize);
+ 	blk_queue_max_sectors(q, shost->max_sectors);
+ 	blk_queue_bounce_limit(q, scsi_calculate_bounce_limit(shost));
-- 
GitLab