* [RESEND][PATCH 01/10][SCSI]mpt2sas: Added driver module parameter max_msix_vectors
@ 2014-06-25 10:30 Reddy, Sreekanth
2014-07-13 14:52 ` Martin K. Petersen
2014-07-13 14:54 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Reddy, Sreekanth @ 2014-06-25 10:30 UTC (permalink / raw)
To: jejb, JBottomley
Cc: linux-scsi, Sathya.Prakash, Nagalakshmi.Nandigama,
sreekanth.reddy, linux-kernel, hch, martin.petersen
Added driver module parameter max_msix_vectors. Using this
module parameter the maximum number of MSI-X vectors could be set.
The number of MSI-X vectors used would be the minimum of MSI-X vectors
supported by the HBA, the number of CPU cores and the value set to
max_msix_vectors module parameters.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
drivers/scsi/mpt2sas/mpt2sas_base.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
index bde63f7..ed810fb 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -80,6 +80,10 @@ static int msix_disable = -1;
module_param(msix_disable, int, 0);
MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
+static int max_msix_vectors = -1;
+module_param(max_msix_vectors, int, 0);
+MODULE_PARM_DESC(max_msix_vectors, " max msix vectors ");
+
static int mpt2sas_fwfault_debug;
MODULE_PARM_DESC(mpt2sas_fwfault_debug, " enable detection of firmware fault "
"and halt firmware - (default=0)");
@@ -1420,6 +1424,16 @@ _base_enable_msix(struct MPT2SAS_ADAPTER *ioc)
ioc->reply_queue_count = min_t(int, ioc->cpu_count,
ioc->msix_vector_count);
+ if (max_msix_vectors > 0) {
+ ioc->reply_queue_count = min_t(int, max_msix_vectors,
+ ioc->reply_queue_count);
+ ioc->msix_vector_count = ioc->reply_queue_count;
+ }
+
+ printk(MPT2SAS_INFO_FMT
+ "MSI-X vectors supported: %d, no of cores: %d, max_msix_vectors: %d\n",
+ ioc->name, ioc->msix_vector_count, ioc->cpu_count, max_msix_vectors);
+
entries = kcalloc(ioc->reply_queue_count, sizeof(struct msix_entry),
GFP_KERNEL);
if (!entries) {
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RESEND][PATCH 01/10][SCSI]mpt2sas: Added driver module parameter max_msix_vectors
2014-06-25 10:30 [RESEND][PATCH 01/10][SCSI]mpt2sas: Added driver module parameter max_msix_vectors Reddy, Sreekanth
@ 2014-07-13 14:52 ` Martin K. Petersen
2014-07-13 14:54 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2014-07-13 14:52 UTC (permalink / raw)
To: Reddy, Sreekanth
Cc: jejb, JBottomley, linux-scsi, Sathya.Prakash,
Nagalakshmi.Nandigama, linux-kernel, hch, martin.petersen
>>>>> "Sreekanth" == Reddy, Sreekanth <Sreekanth.Reddy@avagotech.com> writes:
Sreekanth> Added driver module parameter max_msix_vectors. Using this
Sreekanth> module parameter the maximum number of MSI-X vectors could be
Sreekanth> set.
Sreekanth> The number of MSI-X vectors used would be the minimum of
Sreekanth> MSI-X vectors supported by the HBA, the number of CPU cores
Sreekanth> and the value set to max_msix_vectors module parameters.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RESEND][PATCH 01/10][SCSI]mpt2sas: Added driver module parameter max_msix_vectors
2014-06-25 10:30 [RESEND][PATCH 01/10][SCSI]mpt2sas: Added driver module parameter max_msix_vectors Reddy, Sreekanth
2014-07-13 14:52 ` Martin K. Petersen
@ 2014-07-13 14:54 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2014-07-13 14:54 UTC (permalink / raw)
To: Reddy, Sreekanth
Cc: jejb, JBottomley, linux-scsi, Sathya.Prakash,
Nagalakshmi.Nandigama, linux-kernel, hch, martin.petersen
>>>>> "Sreekanth" == Reddy, Sreekanth <Sreekanth.Reddy@avagotech.com> writes:
Sreekanth> Added driver module parameter max_msix_vectors. Using this
Sreekanth> module parameter the maximum number of MSI-X vectors could be
Sreekanth> set.
Sreekanth> The number of MSI-X vectors used would be the minimum of
Sreekanth> MSI-X vectors supported by the HBA, the number of CPU cores
Sreekanth> and the value set to max_msix_vectors module parameters.
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-13 14:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-25 10:30 [RESEND][PATCH 01/10][SCSI]mpt2sas: Added driver module parameter max_msix_vectors Reddy, Sreekanth
2014-07-13 14:52 ` Martin K. Petersen
2014-07-13 14:54 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).