Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4208459imm; Wed, 5 Sep 2018 12:29:02 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbACv0W8c1NpxmOCBrCngT3HP73a+58+vUboVX4+FAIp7RQ5PQexneYh3EEmbCu+Jzl7e/B X-Received: by 2002:a17:902:528a:: with SMTP id a10-v6mr3378696pli.199.1536175742207; Wed, 05 Sep 2018 12:29:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536175742; cv=none; d=google.com; s=arc-20160816; b=npeMpreCtJA8n0LgLuXB5zU8FlxrL8Dv0q13wLT99S9j7lInxLRV2pdfm83eEPnQh3 4FADVUapbUN4WQb/SL4a7Ys7TdJFT27190hu38ubHZxP5hS93MUitDL488wcm3s0uuOR 2eg+eDwfBWuTlirdxFfHP/fwME2n0UUAByky8d3K0bzQDXOiHmldCqVSSWnE2IY8eZqZ aXTfvExqXP+aor+D79pnfeD9/flJy0R/CBvWKx9UmkXjc+m5pJ13HwhMal0+q2Wu8CnH 3yOJN3OD+qf4ScRjthvJ8hWLkaVmOFFTExEfyEf4vyMZGnTBBooRbF7OqFyoQpi9vIE2 MD4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=hQCQhTXw4V+d8atsoQwkUG9QlqO6wLo/3cSY1ircY4U=; b=Aj/8mJ3+00mccLVggYOmek2Jw5QksIRpg5KUcZRD7XyJnN13btli1CVZ3z35jU85R3 rnlJzD0YNjhid+XfWRFV5s4V63dLmU9sJjaalC5jDg1BtFETpfq6dN24k3pNTn1z1QxJ yH9pmggCFWGgdcADV90pgjGEt5iaxzV12uhT6toIpKWJohlYBQMXKw+bSC2ZymA3khYl WKMHCjVxshNF561kWr+EPadl8HUsvkTIAWpCKfJ0Sw6cSb7h0Qm92FkQDqNqhJCy0OlE nnvqOvQ95Iak2sYFPIjrTvkTVn8JnxctyPFay8OCk3gEbFYIiO+PNhznWbe7lw1aQ7Um MTwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=A9rhysN9; 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 bg2-v6si2579842plb.243.2018.09.05.12.28.45; Wed, 05 Sep 2018 12:29:02 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=A9rhysN9; 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 S1727859AbeIEX6b (ORCPT + 99 others); Wed, 5 Sep 2018 19:58:31 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:50204 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727823AbeIEX6a (ORCPT ); Wed, 5 Sep 2018 19:58:30 -0400 Received: by mail-it0-f66.google.com with SMTP id j81-v6so11530231ite.0 for ; Wed, 05 Sep 2018 12:26:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hQCQhTXw4V+d8atsoQwkUG9QlqO6wLo/3cSY1ircY4U=; b=A9rhysN9fbBL1LBne6JNLTqJg1JYq7llU1Vpo0xV3DW5lMF0v4qfWsGnJ0qxHMQ+Z4 MdwiuGwAaD6t4kjGjOz4akpWfI4yL3KNEtltbxHgu9bPnUrb7XV/yb17kRJZ6F275bZn 0bCHNCQ8T+mCvB5/gUdd8gS8LPuj/Z9JUU8+dXBV8y9hbWLqnLWrc+7P0q6pgrrAySB3 shAsy6TPkQw9qIrfXocRiuQyVTYapZmDaLKHFFT1HTNKvCLDSMvTpZFsYGv2z0WRUI6I bFIJtdOINhsVpjvvP8kMmqc0WqBlUYsNhPZ3KVr/dbgk3cc7d7vWM+oBERd9+MrgHSQb 7G9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hQCQhTXw4V+d8atsoQwkUG9QlqO6wLo/3cSY1ircY4U=; b=UKIK1nCFpsLD6g9Qx5ahtRGZCr56DOdjy+IvHEdPo+o4/EuTs4233hy+u6YXBUco6h 69EFgtaX37UXIxS6AuYh6iGSrnDzg9jwwy2yGSJD7cj4XEZ0u6psWg2TILMphWb3xoI4 XuLuQqZHdwPzehqDigaPkSCSps28eJhzuYp7yZvxURDsSeONSUKGga0/F6V3WTcOVWdy LtjuX3SR+vVeEfEceqGxQkrorQMbVlxK7+ehgUp/dJkRv5SOES3dK+feFe9q0wlRkQ/F kHI3sbGrhr4ND7G/opUrXqozVr308Vg+Ylj2wT4bYhMqKZwn/PwCEqEENsdH0DckoOx7 RHxw== X-Gm-Message-State: APzg51DRKGGkaZYGfwK0l5yX8B2Qc2jKbb4bmVQFKtKHncosGF5kWqAo j766T4vSX+2J/8XCrt6girNNMw== X-Received: by 2002:a24:2552:: with SMTP id g79-v6mr1625767itg.84.1536175615162; Wed, 05 Sep 2018 12:26:55 -0700 (PDT) Received: from [192.168.1.56] ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id 84-v6sm1297805ita.35.2018.09.05.12.26.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:26:53 -0700 (PDT) Subject: Re: [PATCH v5 07/13] block: Add PCI P2P flag for request queue and check support for requests To: Logan Gunthorpe , 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> From: Jens Axboe Message-ID: <59b28977-8f2a-6228-2050-03fae6bdbedd@kernel.dk> Date: Wed, 5 Sep 2018 13:26:51 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <5f79c012-c6e1-56bb-62fd-0689181fb2c9@deltatee.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/3/18 4:26 PM, Logan Gunthorpe wrote: > > > On 01/09/18 02:28 AM, Christoph Hellwig wrote: >> On Thu, Aug 30, 2018 at 01:11:18PM -0600, Jens Axboe wrote: >>> I think this belongs in the caller - both the validity check, and >>> passing in NOMERGE for this type of request. I don't want to impose >>> this overhead on everything, for a pretty niche case. >> >> It is just a single branch, which will be predicted as not taken >> for non-P2P users. The benefit is that we get proper error checking >> by doing it in the block code. > > I personally agree with Christoph. But if there's consensus in the other > direction or this is a real blocker moving this forward, I can remove it > for the next version. It's a simple branch because the check isn't exhaustive. It just checks the first page. At that point you may as well just require the caller to flag the bio/rq as being P2P, and then do a check for P2P compatibility with the queue. -- Jens Axboe