lkml.org 
[lkml]   [2014]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 06/22] [SCSI] mpt2sas, mpt3sas: Removing uppper boundary restriction for the module parameter max_sgl_entries
From
Date
>>>>> "Sreekanth" == Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

@@ -2486,9 +2486,13 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)

/* command line tunables for max sgl entries */
if (max_sgl_entries != -1) {
- ioc->shost->sg_tablesize = (max_sgl_entries <
- MPT2SAS_SG_DEPTH) ? max_sgl_entries :
- MPT2SAS_SG_DEPTH;
+ if (max_sgl_entries > MPT2SAS_SG_DEPTH)
+ printk(MPT2SAS_WARN_FMT
+ "setting max_sgl_entries(%d), overriding kernel"
+ " defined SCSI_MAX_SG_SEGMENTS(%d)\n", ioc->name,
+ max_sgl_entries, MPT2SAS_SG_DEPTH);
+ ioc->shost->sg_tablesize = min_t(unsigned short,
+ max_sgl_entries, SCSI_MAX_SG_CHAIN_SEGMENTS);
} else {
ioc->shost->sg_tablesize = MPT2SAS_SG_DEPTH;
}

Wouldn't it be better to print the new scatterlist limit after it has
been clamped to reflect what it's actually being set to?

--
Martin K. Petersen Oracle Linux Engineering


\
 
 \ /
  Last update: 2014-12-10 22:01    [W:0.064 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site