]> www.infradead.org Git - users/jedix/linux-maple.git/commit
[SCSI] mpt2sas : Fix for memory allocation error for large host credits
authornagalakshmi.nandigama@lsi.com <nagalakshmi.nandigama@lsi.com>
Thu, 1 Dec 2011 02:23:08 +0000 (07:53 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 16 Dec 2011 16:49:32 +0000 (11:49 -0500)
commita09b1aeefd27dfdb9ec0863f46f89040839f4e86
treeb80bc83ead8d95a89b2f2ee6d95bf5d068a79c6f
parent465babf5228838bb21b0e52178fd35773ebd870e
[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>
drivers/scsi/mpt2sas/mpt2sas_base.c
drivers/scsi/mpt2sas/mpt2sas_scsih.c