From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_SBL,URIBL_SBL_A,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7E1AC33CB3 for ; Tue, 28 Jan 2020 12:08:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C800D24681 for ; Tue, 28 Jan 2020 12:08:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726072AbgA1MIP (ORCPT ); Tue, 28 Jan 2020 07:08:15 -0500 Received: from 22.17.110.36.static.bjtelecom.net ([36.110.17.22]:23088 "HELO bsf01.didichuxing.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with SMTP id S1726057AbgA1MIP (ORCPT ); Tue, 28 Jan 2020 07:08:15 -0500 X-ASG-Debug-ID: 1580212421-0e40884f7314c6d30001-Cu09wu Received: from mail.didiglobal.com (localhost [172.20.36.207]) by bsf01.didichuxing.com with ESMTP id WvI5Fr8csBiVuXnK; Tue, 28 Jan 2020 19:53:41 +0800 (CST) X-Barracuda-Envelope-From: zhangweiping@didiglobal.com Received: from 192.168.3.9 (172.22.50.20) by BJSGEXMBX03.didichuxing.com (172.20.15.133) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 28 Jan 2020 19:53:41 +0800 Date: Tue, 28 Jan 2020 19:53:40 +0800 From: Weiping Zhang To: , , , , , , , CC: , , Subject: [PATCH v4 4/5] genirq/affinity: allow driver's discontigous affinity set Message-ID: X-ASG-Orig-Subj: [PATCH v4 4/5] genirq/affinity: allow driver's discontigous affinity set Mail-Followup-To: axboe@kernel.dk, tj@kernel.org, hch@lst.de, bvanassche@acm.org, keith.busch@intel.com, minwoo.im.dev@gmail.com, tglx@linutronix.de, edmund.nadolski@intel.com, linux-block@vger.kernel.org, cgroups@vger.kernel.org, linux-nvme@lists.infradead.org References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [172.22.50.20] X-ClientProxiedBy: BJEXCAS01.didichuxing.com (172.20.36.235) To BJSGEXMBX03.didichuxing.com (172.20.15.133) X-Barracuda-Connect: localhost[172.20.36.207] X-Barracuda-Start-Time: 1580212421 X-Barracuda-URL: https://bsf01.didichuxing.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at didichuxing.com X-Barracuda-Scan-Msg-Size: 977 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.79617 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org nvme driver will add 4 sets for supporting NVMe weighted round robin, and some of these sets may be empty(depends on user configuration), so each particular set is assigned one static index for avoiding the management trouble, then the empty set will be been by irq_create_affinity_masks(). This patch make API more compatible. Signed-off-by: Weiping Zhang --- kernel/irq/affinity.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c index 4d89ad4fae3b..83154615cc9d 100644 --- a/kernel/irq/affinity.c +++ b/kernel/irq/affinity.c @@ -462,6 +462,10 @@ irq_create_affinity_masks(unsigned int nvecs, struct irq_affinity *affd) unsigned int this_vecs = affd->set_size[i]; int ret; + /* skip empty affinity set */ + if (this_vecs == 0) + continue; + ret = irq_build_affinity_masks(curvec, this_vecs, curvec, masks); if (ret) { -- 2.14.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_DBL_ABUSE_MALW,URIBL_SBL, URIBL_SBL_A,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1A55C33C9E for ; Tue, 28 Jan 2020 11:53:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B626824687 for ; Tue, 28 Jan 2020 11:53:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JI/XJ6Wh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B626824687 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=didiglobal.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nDv/UtpF8bMxhQ8UMGV/6P/yJQ1ak46yKNuC0N1NELk=; b=JI/XJ6Whqw5kz3 dfOpP0EIkrktDAmNqS5kTbdEJWWBErNqIUq4ND4fBZ+vVc4m8eYbnGbX8JwgVowTb/e8q8nz2L4VI dwtVoCdH9fpYymZs1VrP47SOFLyaNDOGFbCILbPk6XnmAjmfhx3tlN3P3y8UgINkwcrtHmrFWLd9e M1DVNp4UDQdfqcOM0JkUOPO0ZnwEQKCbSEiHClIQgga6yZOi1TtUqJ+PiYliQxMyLnoIoztf0aVOS SAhgAZiWQXCEbsy5nETzi2gKBalcaSd26cJvwKC9FMspnyASMGm8IVxzeNlR7VBD2BLov1f7V7lQd pdt63D/TV2ahVOcYHwjw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iwPRJ-0002Vf-S0; Tue, 28 Jan 2020 11:53:53 +0000 Received: from mx2.didichuxing.com ([36.110.17.22] helo=bsf01.didichuxing.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iwPRE-0002PX-GK for linux-nvme@lists.infradead.org; Tue, 28 Jan 2020 11:53:51 +0000 X-ASG-Debug-ID: 1580212421-0e40884f7314c6d30001-VMfPqL Received: from mail.didiglobal.com (localhost [172.20.36.207]) by bsf01.didichuxing.com with ESMTP id WvI5Fr8csBiVuXnK; Tue, 28 Jan 2020 19:53:41 +0800 (CST) X-Barracuda-Envelope-From: zhangweiping@didiglobal.com Received: from 192.168.3.9 (172.22.50.20) by BJSGEXMBX03.didichuxing.com (172.20.15.133) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 28 Jan 2020 19:53:41 +0800 Date: Tue, 28 Jan 2020 19:53:40 +0800 From: Weiping Zhang To: , , , , , , , Subject: [PATCH v4 4/5] genirq/affinity: allow driver's discontigous affinity set Message-ID: X-ASG-Orig-Subj: [PATCH v4 4/5] genirq/affinity: allow driver's discontigous affinity set Mail-Followup-To: axboe@kernel.dk, tj@kernel.org, hch@lst.de, bvanassche@acm.org, keith.busch@intel.com, minwoo.im.dev@gmail.com, tglx@linutronix.de, edmund.nadolski@intel.com, linux-block@vger.kernel.org, cgroups@vger.kernel.org, linux-nvme@lists.infradead.org References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [172.22.50.20] X-ClientProxiedBy: BJEXCAS01.didichuxing.com (172.20.36.235) To BJSGEXMBX03.didichuxing.com (172.20.15.133) X-Barracuda-Connect: localhost[172.20.36.207] X-Barracuda-Start-Time: 1580212421 X-Barracuda-URL: https://bsf01.didichuxing.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at didichuxing.com X-Barracuda-Scan-Msg-Size: 977 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1000.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.79617 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200128_035348_718526_4D042C76 X-CRM114-Status: UNSURE ( 7.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-block@vger.kernel.org, cgroups@vger.kernel.org, linux-nvme@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org nvme driver will add 4 sets for supporting NVMe weighted round robin, and some of these sets may be empty(depends on user configuration), so each particular set is assigned one static index for avoiding the management trouble, then the empty set will be been by irq_create_affinity_masks(). This patch make API more compatible. Signed-off-by: Weiping Zhang --- kernel/irq/affinity.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c index 4d89ad4fae3b..83154615cc9d 100644 --- a/kernel/irq/affinity.c +++ b/kernel/irq/affinity.c @@ -462,6 +462,10 @@ irq_create_affinity_masks(unsigned int nvecs, struct irq_affinity *affd) unsigned int this_vecs = affd->set_size[i]; int ret; + /* skip empty affinity set */ + if (this_vecs == 0) + continue; + ret = irq_build_affinity_masks(curvec, this_vecs, curvec, masks); if (ret) { -- 2.14.1 _______________________________________________ linux-nvme mailing list linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme From mboxrd@z Thu Jan 1 00:00:00 1970 From: Weiping Zhang Subject: [PATCH v4 4/5] genirq/affinity: allow driver's discontigous affinity set Date: Tue, 28 Jan 2020 19:53:40 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-block-owner@vger.kernel.org List-ID: Content-Transfer-Encoding: 7bit To: axboe@kernel.dk, tj@kernel.org, hch@lst.de, bvanassche@acm.org, keith.busch@intel.com, minwoo.im.dev@gmail.com, tglx@linutronix.de, edmund.nadolski@intel.com Cc: linux-block@vger.kernel.org, cgroups@vger.kernel.org, linux-nvme@lists.infradead.org nvme driver will add 4 sets for supporting NVMe weighted round robin, and some of these sets may be empty(depends on user configuration), so each particular set is assigned one static index for avoiding the management trouble, then the empty set will be been by irq_create_affinity_masks(). This patch make API more compatible. Signed-off-by: Weiping Zhang --- kernel/irq/affinity.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c index 4d89ad4fae3b..83154615cc9d 100644 --- a/kernel/irq/affinity.c +++ b/kernel/irq/affinity.c @@ -462,6 +462,10 @@ irq_create_affinity_masks(unsigned int nvecs, struct irq_affinity *affd) unsigned int this_vecs = affd->set_size[i]; int ret; + /* skip empty affinity set */ + if (this_vecs == 0) + continue; + ret = irq_build_affinity_masks(curvec, this_vecs, curvec, masks); if (ret) { -- 2.14.1