Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753994AbaLKLvi (ORCPT ); Thu, 11 Dec 2014 06:51:38 -0500 Received: from exprod7og120.obsmtp.com ([64.18.2.18]:36907 "EHLO exprod7og120.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953AbaLKLvg (ORCPT ); Thu, 11 Dec 2014 06:51:36 -0500 MIME-Version: 1.0 In-Reply-To: References: <1418127401-10090-1-git-send-email-Sreekanth.Reddy@avagotech.com> Date: Thu, 11 Dec 2014 17:21:33 +0530 Message-ID: Subject: Re: [PATCH 09/22] [SCSI] mpt2sas, mpt3sas: Added a support to set cpu affinity for each MSIX vector enabled by the HBA From: Sreekanth Reddy To: "Martin K. Petersen" Cc: jejb@kernel.org, Christoph Hellwig , linux-scsi@vger.kernel.org, "James E.J. Bottomley" , Sathya Prakash , Nagalakshmi Nandigama , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > @@ -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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/