Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932874AbdC2Ru0 (ORCPT ); Wed, 29 Mar 2017 13:50:26 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34661 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932149AbdC2RuY (ORCPT ); Wed, 29 Mar 2017 13:50:24 -0400 Subject: Re: [PATCH] irq/affinity: Assign all CPUs a vector To: Keith Busch References: <1490743277-14139-1-git-send-email-keith.busch@intel.com> <6e7a93a7-b0bb-8835-6c49-3eaa3203e1d8@grimberg.me> <20170329175415.GD20181@localhost.localdomain> Cc: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, Thomas Gleixner , Christoph Hellwig From: Sagi Grimberg Message-ID: <3129d8ee-4942-cf6a-8089-15ef5a838f21@grimberg.me> Date: Wed, 29 Mar 2017 20:50:14 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170329175415.GD20181@localhost.localdomain> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 828 Lines: 22 > Sure, I have a 2-socket server with 16 threads each. I take one CPU > offline in socket 2, so I've 16 threads on socket 1, 15 in socket 2. In > total, 31 threads so requesting 31 vectors. > > Currently, vecs_per_node is calculated in the first iteration as 31 / 2, so 15. > > ncpus of socket 1 is 16. cpus_per_vec = 16 / 15, so 1 CPU per vector > with one extra. > > When iterating the second socket, though, vecs_per_node is incremented > from 15 to 16 (to account for the "extra" from before). However, the > ncpus is only 15, so that iteration calculates: > > cpus_per_vec = 15 / 16 > > And since that's zero, the remaining 16 vectors are not assigned to any > CPU, and the second socket has no vectors assigned to their CPUs. Thanks for the clarification, makes sense... Reviewed-by: Sagi Grimberg