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