Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp6750452imm; Mon, 27 Aug 2018 23:49:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaA5J72BxE0Is7xzRtaRDUlXOs4x0kLgCU1xh09pClAgKUwwOrJTtvmThKGndoc8qeTogGC X-Received: by 2002:a63:7d48:: with SMTP id m8-v6mr263602pgn.0.1535438987584; Mon, 27 Aug 2018 23:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535438987; cv=none; d=google.com; s=arc-20160816; b=m1NVDDnllagIAck44LHSFJ1UXxGDZeEzUaVbKjkCOTre6UOfxAKmkhLjro+BSF1qLb W+IfSaCRZE2gRdY5nPtJ5DR03QzuBIIJ7WmDcLoW2ZCYD26SjTlyht1gLzCI6x7wEgFg 8k+8fkpgM8fD2IoDfcceTA+zAzZfQ3faKx2/jWVY/DFEpqDnWNoXl1oYLBuEzrcNHJL1 nMkL0AyQ/IW/EbnpIIvH6R3Ep+/ZCtN5BUBV/4BZCi9xO0I+/mnAQ0y8Lf35ai3g6lr9 u5vXR/Z2xmWXTm/FGSb19Wg6N+OvZmw3hpZAjuVDzxXE11goGrQoFmLw9fjTNvHEK9Su 6X3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date :thread-index:mime-version:from:dkim-signature :arc-authentication-results; bh=qu2vyL1J9ZOyYa2iMrvTGdovkv9TEWup7sxfj4Kv52A=; b=SbiFskhhQd4P+TbT6vQtIa30IDKE8OxYID2oC7UcyqHQNexFEb2Gn/mA8hCg72YF9g FDEYD8j7ze5idrJFAsgd0G4uRHmE43o95657osEFg+cXkuIErHaIX4yj2ROSGOORB43h DW1dLEPRamsRWES+PJx5R/WFo6g+etghB8mknU1fqtSid8itRv1YRGtH+fP6Kc9UVgrH R/Ofwy6tBr+z/W4kM20VBTzwSoIVwg/5UiP0GUrcKRWOVbJXLZDABUky9UGXDoX994XU sQFYS4U2vEcP81SqOujcdiScAjUxvdd/OMHOKl2xenXJGXL8TxwdL2VFtOUlMd+j9GaI 2kMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=YJkcRigO; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l64-v6si251039pge.420.2018.08.27.23.49.21; Mon, 27 Aug 2018 23:49:47 -0700 (PDT) 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; dkim=pass header.i=@broadcom.com header.s=google header.b=YJkcRigO; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727061AbeH1Khq (ORCPT + 99 others); Tue, 28 Aug 2018 06:37:46 -0400 Received: from mail-ed1-f54.google.com ([209.85.208.54]:45682 "EHLO mail-ed1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726567AbeH1Khq (ORCPT ); Tue, 28 Aug 2018 06:37:46 -0400 Received: by mail-ed1-f54.google.com with SMTP id p52-v6so522838eda.12 for ; Mon, 27 Aug 2018 23:47:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:mime-version:thread-index:date:message-id:subject:to:cc; bh=qu2vyL1J9ZOyYa2iMrvTGdovkv9TEWup7sxfj4Kv52A=; b=YJkcRigOIgDpSO+Pc10MVogrlHfKYupLA9qXAlk3lNwLQl2qjyEIz9NvX1ZrMkoDtF nzLXPEmBBUF3LXg13vTlJBG6FvYha36tUef2hRw51MYVvMy0eODsL+6K5K5m/5QoMuwT BdE9e6RgR/P01ookH2McBpNi0zn/CEKr0PEo8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:thread-index:date:message-id :subject:to:cc; bh=qu2vyL1J9ZOyYa2iMrvTGdovkv9TEWup7sxfj4Kv52A=; b=I/p8FNVpIFvfe3hlO4/xYBiIH+gEabriysIrutxrZqf/IAWAkltNJ21Mdje+XIuJYN B0QLM3X80nfJYSNYQzQL3moc4F5El2oeWvUm60mE8CY6oDGkQhjeXPvCP/5HHeFv4ptI kYYPIbdPqr+VMAoUypScGTBjSsu7NAgFtkn7E53il9mv7EbgTyiMy50Dp1H5m2ag3elQ IECxQ5R4b/uH+armXOKblET8peJgcf+6uacQygIUkXw3ftNMdCyxNK5U2LnBBBgVtCyu NS9zQh9WEdMoT8ZqoG4Z2uMEOWI56bXjc2y7rWgeJlnw+GIhADH6rR5Opq+5pyvFd6Uz Y1lQ== X-Gm-Message-State: APzg51DWW8dDN77Qi94TAMXW2+JW0nRXyGcVUAnHUWBNHTCxuc6YmqsO 2LL51OSp9BERb+exM9P6HmhhndUpKSsgeymrob4Ejw== X-Received: by 2002:a50:d75d:: with SMTP id i29-v6mr818080edj.17.1535438855326; Mon, 27 Aug 2018 23:47:35 -0700 (PDT) From: Sumit Saxena MIME-Version: 1.0 X-Mailer: Microsoft Outlook 15.0 Thread-Index: AdQ+miVPsihcmATkRfqx0GqsuSXgZg== Date: Tue, 28 Aug 2018 12:17:33 +0530 Message-ID: <453338ab43d43c0bf24acf1aeba95251@mail.gmail.com> Subject: Affinity managed interrupts vs non-managed interrupts To: tglx@linutronix.de Cc: Ming Lei , hch@lst.de, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, We are working on next generation MegaRAID product where requirement is- to allocate additional 16 MSI-x vectors in addition to number of MSI-x vectors megaraid_sas driver usually allocates. MegaRAID adapter supports 128 MSI-x vectors. To explain the requirement and solution, consider that we have 2 socket system (each socket having 36 logical CPUs). Current driver will allocate total 72 MSI-x vectors by calling API- pci_alloc_irq_vectors(with flag- PCI_IRQ_AFFINITY). All 72 MSI-x vectors will have affinity across NUMA nodes and interrupts are affinity managed. If driver calls- pci_alloc_irq_vectors_affinity() with pre_vectors = 16 and, driver can allocate 16 + 72 MSI-x vectors. All pre_vectors (16) will be mapped to all available online CPUs but effective affinity of each vector is to CPU 0. Our requirement is to have pre_vectors 16 reply queues to be mapped to local NUMA node with effective CPU should be spread within local node cpu mask. Without changing kernel code, we can achieve this by driver calling pci_enable_msix_range() (requesting to allocate 16 + 72 MSI-x vectors) instead of pci_alloc_irq_vectors() API. If we use pci_enable_msix_range(), it also requires MSI-x to CPU affinity handled by driver and these interrupts will be non-managed. Question is- Is there any restriction or preference of using pci_alloc_irq_vectors{/_affinity} vs pci_enable_msix_range in low level driver? If driver uses non-managed interrupt, all cases are handled correctly through irqbalancer. Is there any plan in future to migrate to managed interrupts entirely or it is a choice based call for driver maintainers? Thanks, Sumit