> @@ -1373,20 +1380,30 @@ _base_assign_reply_queues(struct MPT2SAS_ADAPTER *ioc) > > cpu = cpumask_first(cpu_online_mask); > > - do { > + list_for_each_entry(reply_q, &ioc->reply_queue_list, list) { > + > > Why are you reverting to iterating over the queues? A while back I fixed > this up so it wouldn't fail when nr_cpus > the number of reply queues. > I have kept yours CPUs affinity with reply queues logic as it is. This patch doesn't break any of it's original CPUs affinity with reply queues calculation even when nr_cpus > the number of reply queues. since below loop will help us to calculate CPU groups which needs to affinity to particular reply queue when nr_cpus > the number of reply queues for (i = 0 ; i < group ; i++) { ioc->cpu_msix_table[cpu] = index; + cpumask_or(reply_q->affinity_hint, + reply_q->affinity_hint, get_cpu_mask(cpu)); cpu = cpumask_next(cpu, cpu_online_mask); } I am iterating over the queues to get the MSIX vector number easily, while calling irq_set_affinity_hint() API for setting CPUs affinity hint for that MSIX vector. Regards, Sreekanth -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html