From 14b3114d940cdc4fea8afdab8e23508361db027f Mon Sep 17 00:00:00 2001 From: Sreekanth Reddy Date: Mon, 12 Jan 2015 11:39:03 +0530 Subject: mpt2sas, mpt3sas: set cpu affinity for each MSIX vectors Added a support to set cpu affinity mask for each MSIX vector enabled by the HBA. So that, running the irqbalancer will balance interrupts among the cpus. Change_set: 1. Added affinity_hint varable of type cpumask_var_t in adapter_reply_queue structure. And allocated a memory for this varable by calling alloc_cpumask_var. 2. Call the API irq_set_affinity_hint for each MSIx vector to affiniate it with calculated cpus at driver inilization time. 3. While freeing the MSIX vector, call this same API to release the cpu affinity mask for each MSIx vector by providing the NULL value in cpumask argument. 4. then call the free_cpumask_var API to free the memory allocated in step 2. Signed-off-by: Sreekanth Reddy Reviewed-by: Martin K. Petersen Signed-off-by: Christoph Hellwig --- drivers/scsi/mpt2sas/mpt2sas_base.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/scsi/mpt2sas/mpt2sas_base.h') diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.h b/drivers/scsi/mpt2sas/mpt2sas_base.h index 72bffec..46e8d51 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.h +++ b/drivers/scsi/mpt2sas/mpt2sas_base.h @@ -587,6 +587,7 @@ struct adapter_reply_queue { Mpi2ReplyDescriptorsUnion_t *reply_post_free; char name[MPT_NAME_LENGTH]; atomic_t busy; + cpumask_var_t affinity_hint; struct list_head list; }; -- cgit v1.1