aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_scsih.c
diff options
context:
space:
mode:
authornagalakshmi.nandigama@lsi.com <nagalakshmi.nandigama@lsi.com>2011-11-30 21:23:08 -0500
committerJames Bottomley <JBottomley@Parallels.com>2011-12-15 01:57:39 -0500
commitaff132d95ffe14eca96cab90597cdd010b457af7 (patch)
tree652c0f0babc3c70fd6f91962318ff96e5bd0034d /drivers/scsi/mpt2sas/mpt2sas_scsih.c
parent4da7af9494b2f98a1503a2634059300c3e4615e6 (diff)
[SCSI] mpt2sas : Fix for memory allocation error for large host credits
The amount of memory required for tracking chain buffers is rather large, and when the host credit count is big, memory allocation failure occurs inside __get_free_pages. The fix is to limit the number of chains to 100,000. In addition, the number of host credits is limited to 30,000 IOs. However this limitation can be overridden this using the command line option max_queue_depth. The algorithm for calculating the reply_post_queue_depth is changed so that it is equal to (reply_free_queue_depth + 16), previously it was (reply_free_queue_depth * 2). Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> Cc: stable@kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_scsih.c')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index fd1ba744b423..8cd4ebb9349f 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -1011,8 +1011,8 @@ _scsih_get_chain_buffer_tracker(struct MPT2SAS_ADAPTER *ioc, u16 smid)
1011 spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); 1011 spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
1012 if (list_empty(&ioc->free_chain_list)) { 1012 if (list_empty(&ioc->free_chain_list)) {
1013 spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); 1013 spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags);
1014 printk(MPT2SAS_WARN_FMT "chain buffers not available\n", 1014 dfailprintk(ioc, printk(MPT2SAS_WARN_FMT "chain buffers not "
1015 ioc->name); 1015 "available\n", ioc->name));
1016 return NULL; 1016 return NULL;
1017 } 1017 }
1018 chain_req = list_entry(ioc->free_chain_list.next, 1018 chain_req = list_entry(ioc->free_chain_list.next,