Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1084070imj; Thu, 14 Feb 2019 00:41:06 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibg3BE/a8fjZ2HQK//P8eXFLtT5DwQ6q6oGQ57jVpwQEIwQn+oeuv5k8SBWmpZddmELJV23 X-Received: by 2002:a65:620a:: with SMTP id d10mr2590630pgv.75.1550133666749; Thu, 14 Feb 2019 00:41:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550133666; cv=none; d=google.com; s=arc-20160816; b=lHp/f5YYJtQCALjMnfWOKW2s8xUvVBC7y4RtWsCZepHrmvbgFhRmBNfV9igW1+qdOs TJvLB83FIl1jxHLDrIbMHLJiltdWuU4LXAICrRsNtvzHBRQ5+1Vas7Nl0CovQxznsbWx pXiUTWgShQVCJbP051+mcYX+Sv3mzYo7BqUjln76eqZ3FxHC7HxQ26kNyA4htSha6OvT 5Xs3OEC+XpTTbFheSmV8x0eIc38LgfWTVOC1NaDSKvYPYlHjakrLPW+qy3zx8mPI9jU9 zxQ2vpdcN9/yTjKR8aqCzKqePdBAjSSdNS49E0QvHoAlyadjAwvK2XTFGW3+SXvZxqjH Iy2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4tgm/9i7DhV7YUSOeU9NL9lwbldcYXAFKzDu0K0419o=; b=S/HyrBHGpwYqYXwy2jlOlkLe4sxUQnMAMDCaW3pio8qnVNWFM0pQXEuCc5EXgdDaVo zBaUT5qQ52S55nHm2oJBvoQt+3UUaqwbHLxOda4dHyQilFS4X19/+MMIECIlAm1WKINg +vWsTjBuOAdtt2OunYmZ2mVGY/x5j19LVSlxoGbqxHIYWr9nDL/JGsiK/nWfJcg6qGrW E2RdJ00jE+KzZ4lHDnydA/hWQAN7Toh806tz3jJoDKV7W4103V+alRTXAZurACFc72kR 01/Jg8ETd2OqL6Fbw9IJGPyuoxq9oZvCLHCMkNHc4N+OmFLX+1iqxiv2sIP4koLVnPwU EuGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k22si1851518pls.14.2019.02.14.00.40.50; Thu, 14 Feb 2019 00:41:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732147AbfBMVcH (ORCPT + 99 others); Wed, 13 Feb 2019 16:32:07 -0500 Received: from mga07.intel.com ([134.134.136.100]:37158 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725838AbfBMVcG (ORCPT ); Wed, 13 Feb 2019 16:32:06 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2019 13:32:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,366,1544515200"; d="scan'208";a="126250644" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by orsmga003.jf.intel.com with ESMTP; 13 Feb 2019 13:32:04 -0800 Date: Wed, 13 Feb 2019 14:31:49 -0700 From: Keith Busch To: Thomas Gleixner Cc: Bjorn Helgaas , Jens Axboe , Sagi Grimberg , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, Ming Lei , linux-block@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH V3 1/5] genirq/affinity: don't mark 'affd' as const Message-ID: <20190213213149.GB8027@localhost.localdomain> References: <20190213105041.13537-1-ming.lei@redhat.com> <20190213105041.13537-2-ming.lei@redhat.com> <20190213150407.GB96272@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 13, 2019 at 09:56:36PM +0100, Thomas Gleixner wrote: > On Wed, 13 Feb 2019, Bjorn Helgaas wrote: > > On Wed, Feb 13, 2019 at 06:50:37PM +0800, Ming Lei wrote: > > > We have to ask driver to re-caculate set vectors after the whole IRQ > > > vectors are allocated later, and the result needs to be stored in 'affd'. > > > Also both the two interfaces are core APIs, which should be trusted. > > > > s/re-caculate/recalculate/ > > s/stored in 'affd'/stored in '*affd'/ > > s/both the two/both/ > > > > This is a little confusing because you're talking about both "IRQ > > vectors" and these other "set vectors", which I think are different > > things. I assume the "set vectors" are cpumasks showing the affinity > > of the IRQ vectors with some CPUs? > > I think we should drop the whole vector wording completely. > > The driver does not care about vectors, it only cares about a block of > interrupt numbers. These numbers are kernel managed and the interrupts just > happen to have a CPU vector assigned at some point. Depending on the CPU > architecture the underlying mechanism might not even be named vector. Perhaps longer term we could move affinity mask creation from the irq subsystem into a more generic library. Interrupts aren't the only resource that want to spread across CPUs. For example, blk-mq has it's own implementation to for polled queues, so I think a non-irq specific implementation would be a nice addition to the kernel lib.