Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3110667imm; Mon, 10 Sep 2018 11:11:54 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbrVItY4HtfqcAYab2EVyWpY0Ie6ywrFXe963NxiflDj2S2HoUXrqHsYG6FsxLzyaNAli0o X-Received: by 2002:a17:902:8d95:: with SMTP id v21-v6mr22229716plo.213.1536603114312; Mon, 10 Sep 2018 11:11:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536603114; cv=none; d=google.com; s=arc-20160816; b=AYCt0n/5a69oEjm5t6Cy9GzhgvfioNanV/oFG+wmVAxoQhHSzn01HNpxDpeWyHmttm pDtw9/YQp2hHcWA3NT7P1ZAXSBzBhw81ClXNlxFkWBiGa7+vVNRbKFKePH6Zpoag1kar sGB7fZhMPEZHBHtL8lFTGaM/fF2mgi0EfLIf+gia5k22LfPwH/RVPQVu28AQJFIliMl3 wn8dTrDRLQLXQ8GIHqj4RemU8W4YOgSe84W9+9ZVE8qBD3X3BxTwC/qWo5Q4VbXTtajO o2VTYL1FkFwjiO0Ll2RVK3mWxyDc/tjik0bDzBlCtuOYPX4/XmAtNthHihjcevML8guY GqGQ== 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=UA5K84w7NWrqEtFxBZir+Q53HiggDZcIgC8EuzzFhMg=; b=yuY8VJf+wl0uZ+ZsOj207nTz6JfBPHcDCjc5dasvF7VQW9qq4ckNbFtd7brcmwPVGL M4t8ifzk0/CrS7cm36lqXd3yUa6iB+bCL9EaTnV4fMzR8Us6RTiU/xXnEQbfpSWgE3v1 pwHMk76ynC7i8sV69er0Yi6fW9246iRIGd3zReU7nGzu6au0oflPqmDMeyxWBwXrr00q Zuv19uYCrbQVHXxo3b/OsF7eS6XLuR245pFZPg08Zx7tQQbRgELnCfz/GKGWF3QcwI8D iW1LAxbHMCZJXzsJtoJRL2tqrFLdy8og68esHqHxfo0WTrg+JkT8myyKISF+J0MTb2Vj +8kA== 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 o20-v6si17848358pgk.120.2018.09.10.11.11.38; Mon, 10 Sep 2018 11:11:54 -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 S1728020AbeIJXGu (ORCPT + 99 others); Mon, 10 Sep 2018 19:06:50 -0400 Received: from ale.deltatee.com ([207.54.116.67]:49796 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726657AbeIJXGu (ORCPT ); Mon, 10 Sep 2018 19:06:50 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1fzQeR-0002BG-NJ; Mon, 10 Sep 2018 12:11:08 -0600 To: Christoph Hellwig Cc: Jens Axboe , 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: <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> <20180910164144.GA24591@lst.de> From: Logan Gunthorpe Message-ID: Date: Mon, 10 Sep 2018 12:11:01 -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: <20180910164144.GA24591@lst.de> 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, axboe@kernel.dk, hch@lst.de 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=-7.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,LR_URI_NUMERIC_ENDING 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 10/09/18 10:41 AM, Christoph Hellwig wrote: > On Wed, Sep 05, 2018 at 03:03:18PM -0600, Logan Gunthorpe wrote: >> 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. > > I just saw you added that "helper" in your tree. Please don't, it is > a negative value add as it doesn't help anything with the checking. Alright, so what's the consensus then? Just have a check in nvmet_bdev_execute_rw() to add REQ_NOMERGE when appropriate? Jens is pretty dead set against adding to the common path. Logan P.S. Here's the commit in question for anyone else on the list: https://github.com/sbates130272/linux-p2pmem/commit/eeabe0bc94491d3eec4fe872274a9e3b4cdea538