Whamcloud - gitweb
LU-3567 kernel: kernel update [SLES11 SP3]
[fs/lustre-release.git] / lustre / kernel_patches / patches / blkdev_tunables-3.0-sles11sp3.patch
1 Index: linux-3.0.82-0.7.9/block/blk-settings.c
2 ===================================================================
3 --- linux-3.0.82-0.7.9.orig/block/blk-settings.c
4 +++ linux-3.0.82-0.7.9/block/blk-settings.c
5 @@ -19,6 +19,12 @@ EXPORT_SYMBOL(blk_max_low_pfn);
6  
7  unsigned long blk_max_pfn;
8  
9 +int default_max_sectors = BLK_DEF_MAX_SECTORS;
10 +module_param(default_max_sectors, int, 0);
11 +
12 +int default_max_segments = BLK_MAX_SEGMENTS;
13 +module_param(default_max_segments, int, 0);
14 +
15  /**
16   * blk_queue_prep_rq - set a prepare_request function for queue
17   * @q:         queue
18 @@ -108,7 +114,7 @@ EXPORT_SYMBOL_GPL(blk_queue_lld_busy);
19   */
20  void blk_set_default_limits(struct queue_limits *lim)
21  {
22 -       lim->max_segments = BLK_MAX_SEGMENTS;
23 +       lim->max_segments = default_max_segments;
24         lim->max_integrity_segments = 0;
25         lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK;
26         lim->max_segment_size = BLK_MAX_SEGMENT_SIZE;
27 @@ -255,7 +261,7 @@ void blk_limits_max_hw_sectors(struct qu
28  
29         limits->max_hw_sectors = max_hw_sectors;
30         limits->max_sectors = min_t(unsigned int, max_hw_sectors,
31 -                                   BLK_DEF_MAX_SECTORS);
32 +                                   default_max_sectors);
33  }
34  EXPORT_SYMBOL(blk_limits_max_hw_sectors);
35  
36 Index: linux-3.0.82-0.7.9/drivers/scsi/Kconfig
37 ===================================================================
38 --- linux-3.0.82-0.7.9.orig/drivers/scsi/Kconfig
39 +++ linux-3.0.82-0.7.9/drivers/scsi/Kconfig
40 @@ -245,6 +245,15 @@ config SCSI_LOGGING
41           there should be no noticeable performance impact as long as you have
42           logging turned off.
43  
44 +config SCSI_MAX_SG_SEGMENTS
45 +       int "Maximum SCSI scatter gather segment size"
46 +       range 32 256 
47 +       default "128"
48 +       depends on SCSI
49 +       help
50 +         Control the maximum limit for scatter gather buffers for the
51 +         SCSI device.
52 +
53  config SCSI_SCAN_ASYNC
54         bool "Asynchronous SCSI scanning"
55         depends on SCSI
56 Index: linux-3.0.82-0.7.9/include/scsi/scsi.h
57 ===================================================================
58 --- linux-3.0.82-0.7.9.orig/include/scsi/scsi.h
59 +++ linux-3.0.82-0.7.9/include/scsi/scsi.h
60 @@ -20,7 +20,7 @@ struct scsi_cmnd;
61   * to SG_MAX_SINGLE_ALLOC to pack correctly at the highest order.  The
62   * minimum value is 32
63   */
64 -#define SCSI_MAX_SG_SEGMENTS   128
65 +#define SCSI_MAX_SG_SEGMENTS   CONFIG_SCSI_MAX_SG_SEGMENTS
66  
67  /*
68   * Like SCSI_MAX_SG_SEGMENTS, but for archs that have sg chaining. This limit
69 Index: linux-3.0.82-0.7.9/drivers/scsi/isci/init.c
70 ===================================================================
71 --- linux-3.0.82-0.7.9.orig/drivers/scsi/isci/init.c
72 +++ linux-3.0.82-0.7.9/drivers/scsi/isci/init.c
73 @@ -119,6 +119,10 @@ unsigned char phy_gen = SCIC_SDS_PARM_GE
74  module_param(phy_gen, byte, 0);
75  MODULE_PARM_DESC(phy_gen, "PHY generation (1: 1.5Gbps 2: 3.0Gbps 3: 6.0Gbps)");
76  
77 +u16 sg_table_size = SG_ALL;
78 +module_param(sg_table_size, ushort, 0);
79 +MODULE_PARM_DESC(sg_table_size, "Size in KB of scatter gather table");
80 +
81  unsigned char max_concurr_spinup;
82  module_param(max_concurr_spinup, byte, 0);
83  MODULE_PARM_DESC(max_concurr_spinup, "Max concurrent device spinup");
84 @@ -163,7 +167,6 @@ static struct scsi_host_template isci_sh
85         .can_queue                      = ISCI_CAN_QUEUE_VAL,
86         .cmd_per_lun                    = 1,
87         .this_id                        = -1,
88 -       .sg_tablesize                   = SG_ALL,
89         .max_sectors                    = SCSI_DEFAULT_MAX_SECTORS,
90         .use_clustering                 = ENABLE_CLUSTERING,
91         .eh_abort_handler               = sas_eh_abort_handler,
92 @@ -574,6 +577,7 @@ static struct isci_host *isci_host_alloc
93                 INIT_LIST_HEAD(&idev->node);
94         }
95  
96 +       isci_sht.sg_tablesize = sg_table_size;
97         shost = scsi_host_alloc(&isci_sht, sizeof(void *));
98         if (!shost)
99                 return NULL;
100 Index: linux-3.0.82-0.7.9/drivers/message/fusion/Kconfig
101 ===================================================================
102 --- linux-3.0.82-0.7.9.orig/drivers/message/fusion/Kconfig
103 +++ linux-3.0.82-0.7.9/drivers/message/fusion/Kconfig
104 @@ -61,9 +61,9 @@ config FUSION_SAS
105           LSISAS1078
106  
107  config FUSION_MAX_SGE
108 -       int "Maximum number of scatter gather entries for SAS and SPI (16 - 128)"
109 -       default "128"
110 -       range 16 128
111 +       int "Maximum number of scatter gather entries for SAS and SPI (16 - 256)"
112 +       default "256"
113 +       range 16 256 
114         help
115           This option allows you to specify the maximum number of scatter-
116           gather entries per I/O. The driver default is 128, which matches
117 Index: linux-3.0.82-0.7.9/drivers/message/fusion/mptbase.h
118 ===================================================================
119 --- linux-3.0.82-0.7.9.orig/drivers/message/fusion/mptbase.h
120 +++ linux-3.0.82-0.7.9/drivers/message/fusion/mptbase.h
121 @@ -168,8 +168,8 @@
122  #ifdef  CONFIG_FUSION_MAX_SGE
123  #if     CONFIG_FUSION_MAX_SGE  < 16
124  #define MPT_SCSI_SG_DEPTH      16
125 -#elif   CONFIG_FUSION_MAX_SGE  > 128
126 -#define MPT_SCSI_SG_DEPTH      128
127 +#elif   CONFIG_FUSION_MAX_SGE  > 256
128 +#define MPT_SCSI_SG_DEPTH      256
129  #else
130  #define MPT_SCSI_SG_DEPTH      CONFIG_FUSION_MAX_SGE
131  #endif