From patchwork Fri Sep 23 22:21:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 9348961 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C81A3607F2 for ; Fri, 23 Sep 2016 22:21:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5C472ACAD for ; Fri, 23 Sep 2016 22:21:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A650F2ADAB; Fri, 23 Sep 2016 22:21:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 477952AC68 for ; Fri, 23 Sep 2016 22:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966074AbcIWWVR (ORCPT ); Fri, 23 Sep 2016 18:21:17 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:33042 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966025AbcIWWVQ (ORCPT ); Fri, 23 Sep 2016 18:21:16 -0400 Received: by mail-pa0-f66.google.com with SMTP id oz2so5566982pac.0; Fri, 23 Sep 2016 15:21:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=lbjqVw6wqacXBGBiSHK6f2ijTaE1irVHGzuPjErSQns=; b=fQ87b8Vil9RUKVKvcE59ZvdZ1jiSLQFpKB8hdPK7IGL7frHAXJwkMLdiJwDEsVHJIJ EpOLa/oAMYRvxNONyqyeYjYbjFxPHuadXpCzkCpYQRPGEikV6h+RW0krGm0Y/ewL5TWD 4BXjIcPl6+CVjeXQU7kDQRkEKhDAg/uxtvG5bgTFV1Dk8/xCjnD6sBw0CNV08JX8NLiw 6JfBC8LGyxVJwziIYNFbWMcwFEIyM0uJzRSCoqC1vtAOiXP6jEY+njvtGF+vE/PK6t6a zvhncefI4ypdGKyM9E9o9jSNhzSyH5ah6aK6DP5kxqpZQjIX9U4n7aWz5Nl6C9mWNDej uQgw== X-Gm-Message-State: AE9vXwOJUVeR+KKX2HhmBqMjAY8gHOeYGRUuPW+AeYt0mhnKskolu112Gq5dz5OmgF4l7Q== X-Received: by 10.66.132.100 with SMTP id ot4mr16525959pab.84.1474669274655; Fri, 23 Sep 2016 15:21:14 -0700 (PDT) Received: from [10.0.233.242] (205.158.164.101.ptr.us.xo.net. [205.158.164.101]) by smtp.gmail.com with ESMTPSA id q8sm13731437pac.32.2016.09.23.15.21.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Sep 2016 15:21:13 -0700 (PDT) Subject: Re: [PATCH 11/13] nvme: switch to use pci_alloc_irq_vectors To: Christoph Hellwig , axboe@fb.com, tglx@linutronix.de References: <1473862739-15032-1-git-send-email-hch@lst.de> <1473862739-15032-12-git-send-email-hch@lst.de> Cc: agordeev@redhat.com, keith.busch@intel.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org From: Sagi Grimberg Message-ID: Date: Fri, 23 Sep 2016 15:21:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1473862739-15032-12-git-send-email-hch@lst.de> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 14/09/16 07:18, Christoph Hellwig wrote: > Use the new helper to automatically select the right interrupt type, as > well as to use the automatic interupt affinity assignment. Patch title and the change description are a little short IMO to describe what is going on here (need the blk-mq side too). I'd also think it would be better to split this to 2 patches but really not a must... > +static int nvme_pci_map_queues(struct blk_mq_tag_set *set) > +{ > + struct nvme_dev *dev = set->driver_data; > + > + return blk_mq_pci_map_queues(set, to_pci_dev(dev->dev)); > +} > + Question: is using pci_alloc_irq_vectors() obligated for supplying blk-mq with the device affinity mask? If I do this completely-untested [1] what will happen? [1]: --- -- -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 8d2875b4c56d..76693d406efe 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -1518,6 +1518,14 @@ static void nvme_rdma_complete_rq(struct request *rq) blk_mq_end_request(rq, error); } +static int nvme_rdma_map_queues(struct blk_mq_tag_set *set) +{ + struct nvme_rdma_ctrl *ctrl = set->driver_data; + struct device *dev = ctrl->device->dev.dma_device; + + return blk_mq_pci_map_queues(set, to_pci_dev(dev)); +} + static struct blk_mq_ops nvme_rdma_mq_ops = { .queue_rq = nvme_rdma_queue_rq, .complete = nvme_rdma_complete_rq, @@ -1528,6 +1536,7 @@ static struct blk_mq_ops nvme_rdma_mq_ops = { .init_hctx = nvme_rdma_init_hctx, .poll = nvme_rdma_poll, .timeout = nvme_rdma_timeout, + .map_queues = nvme_rdma_map_queues, }; static struct blk_mq_ops nvme_rdma_admin_mq_ops = {