Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752417AbcKIHtj (ORCPT ); Wed, 9 Nov 2016 02:49:39 -0500 Received: from terminus.zytor.com ([198.137.202.10]:38374 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752103AbcKIHtg (ORCPT ); Wed, 9 Nov 2016 02:49:36 -0500 Date: Tue, 8 Nov 2016 23:48:47 -0800 From: tip-bot for Christoph Hellwig Message-ID: Cc: tglx@linutronix.de, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, hch@lst.de, axboe@kernel.dk, hare@suse.com, jthumshirn@suse.de Reply-To: tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, hare@suse.com, hch@lst.de, axboe@kernel.dk, jthumshirn@suse.de In-Reply-To: <1478654107-7384-2-git-send-email-hch@lst.de> References: <1478654107-7384-2-git-send-email-hch@lst.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] genirq/affinity: Introduce struct irq_affinity Git-Commit-ID: 20e407e195b29a4f5a18d713a61f54a75f992bd5 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2133 Lines: 56 Commit-ID: 20e407e195b29a4f5a18d713a61f54a75f992bd5 Gitweb: http://git.kernel.org/tip/20e407e195b29a4f5a18d713a61f54a75f992bd5 Author: Christoph Hellwig AuthorDate: Tue, 8 Nov 2016 17:15:01 -0800 Committer: Thomas Gleixner CommitDate: Wed, 9 Nov 2016 08:25:08 +0100 genirq/affinity: Introduce struct irq_affinity Some drivers (various network and RDMA adapter for example) have a MSI-X vector layout where most of the vectors are used for I/O queues and should have CPU affinity assigned to them, but some (usually 1 but sometimes more) at the beginning or end are used for low-performance admin or configuration work and should not have any explicit affinity assigned to them. Add a new irq_affinity structure, which will be passed through a variant of pci_irq_alloc_vectors that allows to specify these requirements (and is extensible to any future quirks in that area) so that the core IRQ affinity algorithm can take this quirks into account. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Acked-by: Jens Axboe Cc: linux-block@vger.kernel.org Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/1478654107-7384-2-git-send-email-hch@lst.de Signed-off-by: Thomas Gleixner --- include/linux/interrupt.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 72f0721..6b52686 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -232,6 +232,18 @@ struct irq_affinity_notify { void (*release)(struct kref *ref); }; +/** + * struct irq_affinity - Description for automatic irq affinity assignements + * @pre_vectors: Don't apply affinity to @pre_vectors at beginning of + * the MSI(-X) vector space + * @post_vectors: Don't apply affinity to @post_vectors at end of + * the MSI(-X) vector space + */ +struct irq_affinity { + int pre_vectors; + int post_vectors; +}; + #if defined(CONFIG_SMP) extern cpumask_var_t irq_default_affinity;