Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934536AbdDSWgu (ORCPT ); Wed, 19 Apr 2017 18:36:50 -0400 Received: from mga11.intel.com ([192.55.52.93]:49050 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764090AbdDSWgt (ORCPT ); Wed, 19 Apr 2017 18:36:49 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,222,1488873600"; d="scan'208";a="958924611" Date: Wed, 19 Apr 2017 18:45:56 -0400 From: Keith Busch To: Andrei Vagin Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Xiaolong Ye Subject: Re: irq/affinity: Fix extra vecs calculation Message-ID: <20170419224555.GA21311@localhost.localdomain> References: <1492104492-19943-1-git-send-email-keith.busch@intel.com> <20170419162027.GA7428@outlook.office365.com> <20170419170359.GE16224@localhost.localdomain> <20170419195343.GA24395@outlook.office365.com> <20170419215308.GF16224@localhost.localdomain> <20170419223205.GA29640@outlook.office365.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170419223205.GA29640@outlook.office365.com> User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 970 Lines: 25 On Wed, Apr 19, 2017 at 03:32:06PM -0700, Andrei Vagin wrote: > This patch works for me. Awesome, thank you much for confirming, and again, sorry for the breakage. I see virtio-scsi is one reliable way to have reproduced this, so I'll incorporate that into tests before posting future kernel core patches. I'll send this fix with change log shortly. > > --- > > diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c > > index d052947..eb8b689 100644 > > --- a/kernel/irq/affinity.c > > +++ b/kernel/irq/affinity.c > > @@ -98,13 +98,16 @@ irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd) > > int ncpus, v, vecs_to_assign, vecs_per_node; > > > > /* Spread the vectors per node */ > > - vecs_per_node = (affv - curvec) / nodes; > > + vecs_per_node = (affv - (curvec - affd->pre_vectors)) / nodes; > > > > /* Get the cpus on this node which are in the mask */ > > cpumask_and(nmsk, cpu_online_mask, cpumask_of_node(n)); > > --