Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp251237imm; Sat, 1 Sep 2018 01:26:30 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda2R3px19wwnEntMs0lz91v7JtRAhu6OwpS02+qCFmZRYyu49ucGjQk2YNJ5Sn9gk+mbnwP X-Received: by 2002:a17:902:543:: with SMTP id 61-v6mr19369157plf.126.1535790389995; Sat, 01 Sep 2018 01:26:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535790389; cv=none; d=google.com; s=arc-20160816; b=NVjYCIuHZdiAiAkH046tnCZ/MWocvSKG+bSaZNn+E1ekLUHUVRtzLsH2ZAOV6fl5p+ 3CVOJmgab1YYYmxvugrHgqM8vma0gQAOzaewYPJ289lMFL4qKgSIhJFI4G/Ra6vNhU73 PFkgcCzzPQEbAHirAjsCntGNWkQI7vtG1Slz81EXO9Vuyq76WQqHuxWvOMN9se6dyKCx nzZHQmSo2xYncAhPzCFczrjcnltxg4/NmwDEE4BgyBD32bGx+kDqmP78ikvPA7721/pm WeddAEn3z7LNQyuwKv6s9qeb6Z/TH/JpxWl1qF2A1/6dGE9RhQU1hOf/SQxtv29bgJxh 9m8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=4IP6Ol/QN8x3mgprWrVqzOyUAZh7KgNQ9atjFoLUTyI=; b=AahG1/vKxD9wvcelJ4csmtrQIzWyNhhaKD1GAOEPArueQwHJCBkPqWVX8Y3OhWGTPN G44IIZgEq6AMgBcfHesiGZAGkm/PNqi5Ubj79Ikhgl3Sbm4ZO3w0T1XOJAqJAF8Yy19D 4Mxf5141WyflTEjGvowQ3fGQOJPLxyhi0VhvcCo5GHKCjdbQebmNUuFBoZ3vnpzjy2C8 foPVltPSwZ4psgNdiSHqwzzvCEQbdjySmjMXVP93bZ/am8AHrNK2t6R+/H4rN2kJDU1o p1cOMR4OtCcDseLsSMWIXs5cc97IdMt/EKzjMayz60PqNw1wvFzKgWX6WCCr/s7K4OXV bWmA== 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 p82-v6si12504473pfi.345.2018.09.01.01.26.15; Sat, 01 Sep 2018 01:26:29 -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 S1727394AbeIAMgW (ORCPT + 99 others); Sat, 1 Sep 2018 08:36:22 -0400 Received: from verein.lst.de ([213.95.11.211]:56610 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725973AbeIAMgW (ORCPT ); Sat, 1 Sep 2018 08:36:22 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 20D1268D00; Sat, 1 Sep 2018 10:28:12 +0200 (CEST) Date: Sat, 1 Sep 2018 10:28:12 +0200 From: Christoph Hellwig To: Jens Axboe Cc: Logan Gunthorpe , 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 , Christoph Hellwig , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?iso-8859-1?B?Suly9G1l?= Glisse , Benjamin Herrenschmidt , Alex Williamson , Christian =?iso-8859-1?Q?K=F6nig?= Subject: Re: [PATCH v5 07/13] block: Add PCI P2P flag for request queue and check support for requests Message-ID: <20180901082812.GB670@lst.de> References: <20180830185352.3369-1-logang@deltatee.com> <20180830185352.3369-8-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.