RE: After memory pressure: can't read from tape anymore

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

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux