Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp15609imm; Wed, 5 Sep 2018 14:06:13 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZmN+ojcSwc0/8sr+R8tV1lbbHJ+yZq+ZpE94C80Qd+fzDLxSQC4fIfBQKo8ZQBgwmmiqYw X-Received: by 2002:a63:7d48:: with SMTP id m8-v6mr39092031pgn.0.1536181573077; Wed, 05 Sep 2018 14:06:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536181573; cv=none; d=google.com; s=arc-20160816; b=YYk3SACnvGHqtTBFA1Dfs+hdt2976LyyzL2sqfCukf662wiOwMu+C9kPkwVuiQjcSV OdqciAQch08d+2qNIA1KSavo/X/3JRCi7uyNp0kg08QNRFB/FV8SDjYQErgIIKemyutn TZpfiK9TPVv4XKUnb0E9vOe9+iUi0sy83ircv3IW49VxrM/xLYeqnI3lwWDbzzVR9Kil G1HR0uv3Vjk/B+SUHMxgbWQZrH9D9kY3tsMuTr4EEVibDhiCqkU+RCisfeZRR1MscaPr L5hHzk7Md3/uOqjmnhypo4asPUpvrpFd9K/DSKHdBFpjEgv1b5WwS3LaLOjKQlN/YeJC D7Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to; bh=8cwWQuyXG42GPvQMM+D6AqIF201Ym7CbStztWV8ivmQ=; b=ix9f6EH0X+bandkKY40MKcoBgi7u+NF+Ta8Im0s1LgpSkM36YkjuCSpLCzd8iaI1s2 Yot11KP5HYockJPc3MKIzkhqcomEmyVUI2oOFaLaP4TylUBY+G/YlUs5SAVdTcUgsq+x 8jpcmud4H/p+cSNJGU5tkhmxu+kpN/5srkpqSjv+lt95N/Z0fBGKINKwiyE9Kg1TrUVB T9rV5MVOTTRzKIDo19mcqsayCZJFA6I1M5BSp2vyT9bKcgy7ksJPQb01DdkKDcWqS9k/ i9ayqB0k4oksrVFhJOC++TKpwDybpRRDwyh2/pjX18Nkyi9jpfFfMSI2KhFtSNwmf9x5 x93w== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b124-v6si3137228pgc.620.2018.09.05.14.05.53; Wed, 05 Sep 2018 14:06:13 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727689AbeIFBfg (ORCPT + 99 others); Wed, 5 Sep 2018 21:35:36 -0400 Received: from ale.deltatee.com ([207.54.116.67]:54260 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727669AbeIFBfg (ORCPT ); Wed, 5 Sep 2018 21:35:36 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1fxexN-0006AE-HK; Wed, 05 Sep 2018 15:03:22 -0600 To: Jens Axboe , Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org, Stephen Bates , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Benjamin Herrenschmidt , Alex Williamson , =?UTF-8?Q?Christian_K=c3=b6nig?= References: <20180830185352.3369-1-logang@deltatee.com> <20180830185352.3369-8-logang@deltatee.com> <20180901082812.GB670@lst.de> <5f79c012-c6e1-56bb-62fd-0689181fb2c9@deltatee.com> <59b28977-8f2a-6228-2050-03fae6bdbedd@kernel.dk> <1b4283da-44df-4a02-3167-e295243cef78@deltatee.com> <09258b9b-3aed-9890-b31a-bd70a133966c@kernel.dk> <20180905195647.GA1626@lst.de> <20180905201152.GA1893@lst.de> <2a3394bd-5f13-4818-43f4-dfc61f501e05@kernel.dk> <3af4d1d4-da07-c0a6-8464-9ddc1378f2f4@kernel.dk> <34d9b2f7-9e6d-4a0a-77e5-ec0e99610f5c@kernel.dk> From: Logan Gunthorpe Message-ID: Date: Wed, 5 Sep 2018 15:03:18 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <34d9b2f7-9e6d-4a0a-77e5-ec0e99610f5c@kernel.dk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: christian.koenig@amd.com, alex.williamson@redhat.com, benh@kernel.crashing.org, jglisse@redhat.com, dan.j.williams@intel.com, maxg@mellanox.com, jgg@mellanox.com, bhelgaas@google.com, sagi@grimberg.me, keith.busch@intel.com, sbates@raithlin.com, linux-block@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, hch@lst.de, axboe@kernel.dk X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH v5 07/13] block: Add PCI P2P flag for request queue and check support for requests X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/09/18 02:36 PM, Jens Axboe wrote: > On 9/5/18 2:32 PM, Logan Gunthorpe wrote: >> >> >> On 05/09/18 02:19 PM, Jens Axboe wrote: >>> On 9/5/18 2:18 PM, Logan Gunthorpe wrote: >>>> >>>> >>>> On 05/09/18 02:14 PM, Jens Axboe wrote: >>>>> But if the caller must absolutely know where the bio will end up, then >>>>> it seems super redundant. So I'd vote for killing this check, it buys >>>>> us absolutely nothing and isn't even exhaustive in its current form. >>>> >>>> >>>> Ok, I'll remove it for v6. >>> >>> Since the drivers needs to know it's doing it right, it might not >>> hurt to add a sanity check helper for that. Just have the driver >>> call it, and don't add it in the normal IO submission path. >> >> I'm not sure I really see the value in that. It's the same principle in >> asking the driver to do the WARN: if the developer knew enough to use >> the special helper, they probably knew well enough to do the rest correctly. > > I don't agree with that at all. It's a "is my request valid" helper, > it's not some obscure and rarely used functionality. You're making up > this API right now, if you really want it done for every IO, make it > part of the p2p submission process. You could even hide it behind a > debug thing, if you like. There is no special p2p submission process. In the nvme-of case we are using the existing process and with the code in blk-core it didn't change it's process at all. Creating a helper will create one and I can look at making a pci_p2pdma_submit_bio() for v6; but if the developer screws up and still calls the regular submit_bio() things will only be very subtly broken and that won't be obvious. Logan