Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1341326imm; Wed, 10 Oct 2018 12:59:42 -0700 (PDT) X-Google-Smtp-Source: ACcGV63JHUwE5mqdrO1BEvNg46zFbi/q7lDb9aQEKv27d7YlBnfq4zsNV3HUmN1fcOhZMDz6J0jO X-Received: by 2002:a17:902:b907:: with SMTP id bf7-v6mr862598plb.127.1539201582105; Wed, 10 Oct 2018 12:59:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539201582; cv=none; d=google.com; s=arc-20160816; b=aGhKjhDhzC+tfk0xg1FpXnKD69EJFW40CEhFUH30KjdsyRsS69fXFdd68YLawBok5T Q/+lB6mQxTLi1a6lk8eYGtRoKn0qDm/Igczo5g91v2pi5ox6kvSZ/gcO6hd0zUCIR6ta FmTV+Hse7lDdmHwVEEk1FR4AhdjbYsfqwYgNcetxYWz5f++MeDeeMp0Jy7opX9MEBOyr iUvVedkl30C7vrxz+6/yFa4y7YOYyK/XBdtkOVJgUCXnish6NwNNRXXwJECUHBmjkZW0 KCdqvzgpZD0gceyCHEG6n23wm27WHktODD5WzcMUMrYoxC2bNWlU1Gqgu94WLL7hTqhv VkUw== 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:dkim-signature; bh=W+Oo9yTZvrfu2k1PR/EkiLa2dFzEYQkgL6IIdppHCfo=; b=uWcCLOLVM2/hTBvrQZkVEEab/TezOSjQ/E6YY6T2td391OiLSuNyDbsfPScVCIWyjv yDJDxJDutS2H/UmLetVj40r5N+qr+OmK4qvgThNo3aZMVVJMe3uUqnW7xLcO4ebXDkpE OYAY/3p9uWKDvlbFgynDcj1+m45X9Ck6tUfi8PDzdkjSwWRyvXe0E+mi2emHzw/3O89P qvwowgXFSf6PYUzqbITynvBcQZ1lVyUifPS3/Vr6MCbiqKLrNiekQip32Q1GyXYi3F+p n2p1O1SE5MREeqArGNCCFt3y838Dbh803DPyjNkuDyuepnXcZrC/s+SRoMIvi0f1x9bs tOoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gosbco6X; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7-v6si24852051plo.109.2018.10.10.12.59.26; Wed, 10 Oct 2018 12:59:42 -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.org header.s=default header.b=gosbco6X; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727579AbeJKDWo (ORCPT + 99 others); Wed, 10 Oct 2018 23:22:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:50930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727348AbeJKDWo (ORCPT ); Wed, 10 Oct 2018 23:22:44 -0400 Received: from localhost (unknown [64.22.249.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4D5BB206B2; Wed, 10 Oct 2018 19:59:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539201542; bh=rE5Q1ersntdIliySO1U91em+crnfT7kdOeF5NBNzzdU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gosbco6X2S1gVGZ1nMqlh26yQdKFXQbe5hlP7tAjX2Ui3jiXKm62/j3qGE5U6pvpf S/f5JFIF6GWaK7d6MPa2SO79idi9B0Tavcnz3k04XjHYm11OiuUytxRT7myRFF8zDV v9lLdcv8VWOK/sJIOavbmiQ7d+2LE1oTQEN4tEms= Date: Wed, 10 Oct 2018 14:59:01 -0500 From: Bjorn Helgaas 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, Sagi Grimberg , Christian =?iso-8859-1?Q?K=F6nig?= , Benjamin Herrenschmidt , Alex Williamson , Stephen Bates , Keith Busch , =?iso-8859-1?B?Suly9G1l?= Glisse , Jason Gunthorpe , Bjorn Helgaas , Max Gurtovoy , Dan Williams , Christoph Hellwig Subject: Re: [PATCH v9 07/13] block: Add PCI P2P flag for request queue and check support for requests Message-ID: <20181010195901.GE5906@bhelgaas-glaptop.roam.corp.google.com> References: <20181004212747.6301-1-logang@deltatee.com> <20181004212747.6301-8-logang@deltatee.com> <485de371-0e84-6f20-7f3b-cec5635b87fe@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <485de371-0e84-6f20-7f3b-cec5635b87fe@kernel.dk> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 05, 2018 at 07:16:04PM -0600, Jens Axboe wrote: > On 10/4/18 3:27 PM, Logan Gunthorpe wrote: > > QUEUE_FLAG_PCI_P2P is introduced meaning a driver's request queue > > supports targeting P2P memory. This will be used by P2P providers and > > orchestrators (in subsequent patches) to ensure block devices can > > support P2P memory before submitting P2P backed pages to submit_bio(). > > Nit pick, but the subject line still says that it checks support > for requests. This patch just adds the ability to flag support > in the queue. What about the following? MAINTAINERS doesn't list a specific maintainer for include/linux/blkdev.h (maybe the "BLOCK LAYER" entry should have an F: pattern for it?), but I'd really like your ack before merging this. commit 7e647ae1eda290786851c3dff4f38189b982386d Author: Logan Gunthorpe Date: Thu Oct 4 15:27:41 2018 -0600 block: Add PCI P2P flag for request queue Add QUEUE_FLAG_PCI_P2P, meaning a driver's request queue supports targeting P2P memory. This will be used by P2P providers and orchestrators (in subsequent patches) to ensure block devices can support P2P memory before submitting P2P-backed pages to submit_bio(). Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 6980014357d4..c32f7171899b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -699,6 +699,7 @@ struct request_queue { #define QUEUE_FLAG_SCSI_PASSTHROUGH 27 /* queue supports SCSI commands */ #define QUEUE_FLAG_QUIESCED 28 /* queue has been quiesced */ #define QUEUE_FLAG_PREEMPT_ONLY 29 /* only process REQ_PREEMPT requests */ +#define QUEUE_FLAG_PCI_P2PDMA 30 /* device supports PCI p2p requests */ #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ (1 << QUEUE_FLAG_SAME_COMP) | \ @@ -731,6 +732,8 @@ bool blk_queue_flag_test_and_clear(unsigned int flag, struct request_queue *q); #define blk_queue_dax(q) test_bit(QUEUE_FLAG_DAX, &(q)->queue_flags) #define blk_queue_scsi_passthrough(q) \ test_bit(QUEUE_FLAG_SCSI_PASSTHROUGH, &(q)->queue_flags) +#define blk_queue_pci_p2pdma(q) \ + test_bit(QUEUE_FLAG_PCI_P2PDMA, &(q)->queue_flags) #define blk_noretry_request(rq) \ ((rq)->cmd_flags & (REQ_FAILFAST_DEV|REQ_FAILFAST_TRANSPORT| \