Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/964079/?format=api
{ "id": 964079, "url": "http://patchwork.ozlabs.org/api/patches/964079/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20180830185352.3369-8-logang@deltatee.com/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20180830185352.3369-8-logang@deltatee.com>", "list_archive_url": null, "date": "2018-08-30T18:53:46", "name": "[v5,07/13] block: Add PCI P2P flag for request queue and check support for requests", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "ffb29426a8598452827ab9af578b797215ddc6cf", "submitter": { "id": 70191, "url": "http://patchwork.ozlabs.org/api/people/70191/?format=api", "name": "Logan Gunthorpe", "email": "logang@deltatee.com" }, "delegate": { "id": 6763, "url": "http://patchwork.ozlabs.org/api/users/6763/?format=api", "username": "bhelgaas", "first_name": "Bjorn", "last_name": "Helgaas", "email": "bhelgaas@google.com" }, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20180830185352.3369-8-logang@deltatee.com/mbox/", "series": [ { "id": 63352, "url": "http://patchwork.ozlabs.org/api/series/63352/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=63352", "date": "2018-08-30T18:53:41", "name": "Copy Offload in NVMe Fabrics with P2P PCI Memory", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/63352/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/964079/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/964079/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-pci-owner@vger.kernel.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-pci-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=deltatee.com" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 421WsH4Rs7z9s1x\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 31 Aug 2018 04:55:31 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1728116AbeH3W66 (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tThu, 30 Aug 2018 18:58:58 -0400", "from ale.deltatee.com ([207.54.116.67]:40048 \"EHLO\n\tale.deltatee.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1727387AbeH3W5l (ORCPT <rfc822;linux-pci@vger.kernel.org>);\n\tThu, 30 Aug 2018 18:57:41 -0400", "from cgy1-donard.priv.deltatee.com ([172.16.1.31])\n\tby ale.deltatee.com with esmtps\n\t(TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89)\n\t(envelope-from <gunthorp@deltatee.com>)\n\tid 1fvS4t-0006Om-Nd; Thu, 30 Aug 2018 12:54:01 -0600", "from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim\n\t4.89) (envelope-from <gunthorp@deltatee.com>)\n\tid 1fvS4o-0000tZ-RG; Thu, 30 Aug 2018 12:53:54 -0600" ], "From": "Logan Gunthorpe <logang@deltatee.com>", "To": "linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,\n\tlinux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org,\n\tlinux-nvdimm@lists.01.org, linux-block@vger.kernel.org", "Cc": "Stephen Bates <sbates@raithlin.com>, Christoph Hellwig <hch@lst.de>,\n\tKeith Busch <keith.busch@intel.com>, Sagi Grimberg <sagi@grimberg.me>,\n\tBjorn Helgaas <bhelgaas@google.com>, Jason Gunthorpe <jgg@mellanox.com>, \n\tMax Gurtovoy <maxg@mellanox.com>,\n\tDan Williams <dan.j.williams@intel.com>, =?utf-8?b?SsOpcsO0bWUgR2xp?=\n\t=?utf-8?q?sse?= <jglisse@redhat.com>,\n\tBenjamin Herrenschmidt <benh@kernel.crashing.org>, Alex Williamson\n\t<alex.williamson@redhat.com>, =?utf-8?q?Christian_K=C3=B6nig?=\n\t<christian.koenig@amd.com>, Logan Gunthorpe <logang@deltatee.com>", "Date": "Thu, 30 Aug 2018 12:53:46 -0600", "Message-Id": "<20180830185352.3369-8-logang@deltatee.com>", "X-Mailer": "git-send-email 2.11.0", "In-Reply-To": "<20180830185352.3369-1-logang@deltatee.com>", "References": "<20180830185352.3369-1-logang@deltatee.com>", "X-SA-Exim-Connect-IP": "172.16.1.31", "X-SA-Exim-Rcpt-To": "linux-nvme@lists.infradead.org, linux-nvdimm@lists.01.org,\n\tlinux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,\n\tlinux-rdma@vger.kernel.org, linux-block@vger.kernel.org,\n\tsbates@raithlin.com, hch@lst.de, sagi@grimberg.me,\n\tbhelgaas@google.com, jgg@mellanox.com, maxg@mellanox.com,\n\tkeith.busch@intel.com, dan.j.williams@intel.com,\n\tbenh@kernel.crashing.org, jglisse@redhat.com,\n\talex.williamson@redhat.com, christian.koenig@amd.com,\n\tlogang@deltatee.com", "X-SA-Exim-Mail-From": "gunthorp@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.7 required=5.0 tests=ALL_TRUSTED,BAYES_00,\n\tGREYLIST_ISWHITE,MYRULES_NO_TEXT autolearn=ham autolearn_force=no\n\tversion=3.4.1", "Subject": "[PATCH v5 07/13] block: Add PCI P2P flag for request queue and\n\tcheck 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-pci-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-pci.vger.kernel.org>", "X-Mailing-List": "linux-pci@vger.kernel.org" }, "content": "QUEUE_FLAG_PCI_P2P is introduced meaning a driver's request queue\nsupports targeting P2P memory.\n\nWhen a request is submitted we check if PCI P2PDMA memory is assigned\nto the first page in the bio. If it is, we ensure the queue it's\nsubmitted to supports it, and enforce REQ_NOMERGE.\n\nSigned-off-by: Logan Gunthorpe <logang@deltatee.com>\n---\n block/blk-core.c | 14 ++++++++++++++\n include/linux/blkdev.h | 3 +++\n 2 files changed, 17 insertions(+)", "diff": "diff --git a/block/blk-core.c b/block/blk-core.c\nindex dee56c282efb..cc0289c7b983 100644\n--- a/block/blk-core.c\n+++ b/block/blk-core.c\n@@ -2264,6 +2264,20 @@ generic_make_request_checks(struct bio *bio)\n \tif ((bio->bi_opf & REQ_NOWAIT) && !queue_is_rq_based(q))\n \t\tgoto not_supported;\n \n+\t/*\n+\t * Ensure PCI P2PDMA memory is not used in requests to queues that\n+\t * have no support. This should never happen if the higher layers using\n+\t * P2PDMA do the right thing and use the proper P2PDMA client\n+\t * infrastructure. Also, ensure such requests use REQ_NOMERGE\n+\t * seeing requests can not mix P2PDMA and non-P2PDMA memory at\n+\t * this time.\n+\t */\n+\tif (bio->bi_vcnt && is_pci_p2pdma_page(bio->bi_io_vec->bv_page)) {\n+\t\tif (WARN_ON_ONCE(!blk_queue_pci_p2pdma(q)))\n+\t\t\tgoto not_supported;\n+\t\tbio->bi_opf |= REQ_NOMERGE;\n+\t}\n+\n \tif (should_fail_bio(bio))\n \t\tgoto end_io;\n \ndiff --git a/include/linux/blkdev.h b/include/linux/blkdev.h\nindex d6869e0e2b64..7bf80ca802e1 100644\n--- a/include/linux/blkdev.h\n+++ b/include/linux/blkdev.h\n@@ -699,6 +699,7 @@ struct request_queue {\n #define QUEUE_FLAG_SCSI_PASSTHROUGH 27\t/* queue supports SCSI commands */\n #define QUEUE_FLAG_QUIESCED 28\t/* queue has been quiesced */\n #define QUEUE_FLAG_PREEMPT_ONLY\t29\t/* only process REQ_PREEMPT requests */\n+#define QUEUE_FLAG_PCI_P2PDMA 30\t/* device supports pci p2p requests */\n \n #define QUEUE_FLAG_DEFAULT\t((1 << QUEUE_FLAG_IO_STAT) |\t\t\\\n \t\t\t\t (1 << QUEUE_FLAG_SAME_COMP)\t|\t\\\n@@ -731,6 +732,8 @@ bool blk_queue_flag_test_and_clear(unsigned int flag, struct request_queue *q);\n #define blk_queue_dax(q)\ttest_bit(QUEUE_FLAG_DAX, &(q)->queue_flags)\n #define blk_queue_scsi_passthrough(q)\t\\\n \ttest_bit(QUEUE_FLAG_SCSI_PASSTHROUGH, &(q)->queue_flags)\n+#define blk_queue_pci_p2pdma(q)\t\\\n+\ttest_bit(QUEUE_FLAG_PCI_P2PDMA, &(q)->queue_flags)\n \n #define blk_noretry_request(rq) \\\n \t((rq)->cmd_flags & (REQ_FAILFAST_DEV|REQ_FAILFAST_TRANSPORT| \\\n", "prefixes": [ "v5", "07/13" ] }