On Fri, 3 Dec 2010 16:15:34 +0530 "Desai, Kashyap" <Kashyap.Desai@xxxxxxx> wrote: > But I see maximum value for " CONFIG_FUSION_MAX_SGE" is 128 only and we can not go beyond this. > I see scsi_alloc_queue below lines > > blk_queue_max_hw_segments(q, shost->sg_tablesize); > blk_queue_max_phys_segments(q, SCSI_MAX_SG_CHAIN_SEGMENTS); > > both the values play role while selecting max scatter gather elements.. > Where max_hw_segements are equal to value of " CONFIG_FUSION_MAX_SGE", but max_phys_segements are limited to below value > #define SCSI_MAX_SG_SEGMENTS 128 (defined in scsi.h) Hmm, max_phys_segements is set to SCSI_MAX_SG_CHAIN_SEGMENTS (not SCSI_MAX_SG_SEGMENTS). SCSI_MAX_SG_CHAIN_SEGMENTS can be larger: #ifdef ARCH_HAS_SG_CHAIN #define SCSI_MAX_SG_CHAIN_SEGMENTS 2048 #else #define SCSI_MAX_SG_CHAIN_SEGMENTS SCSI_MAX_SG_SEGMENTS #endif So shost->sg_tablesize (SCSI_MPT2SAS_MAX_SGE) sets the limit here. btw, max_hw_segments and max_phys_segments were consolidated. With newer kernels, you can find the following in __scsi_alloc_queue(): blk_queue_max_segments(q, min_t(unsigned short, shost->sg_tablesize, SCSI_MAX_SG_CHAIN_SEGMENTS)); -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html