Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp902165pxb; Tue, 1 Feb 2022 12:48:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5rODoOsJ31t5YX0ojeh1QKHzW0qtwqBHDVAPCtkePxud79zSGXhUs3F8wIn+5GgL+Fb1A X-Received: by 2002:a17:90b:2243:: with SMTP id hk3mr4375982pjb.181.1643748507459; Tue, 01 Feb 2022 12:48:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643748507; cv=none; d=google.com; s=arc-20160816; b=Wq4IQ/o1MChnXmyfVBNJNGb4DZ8Aj1J+jWinF795e5SZg0DTLy8CvR3ZPu8Va+7VkN eOqfxLg+uLM9GtLZxPoBihQJecVRfKM9S45ZMoanFXNBZ7gU3w0DWJz4kMM+Ms5hw5MP 2RjewkCrE9udS54QX7zSQxTFYqDMDABOi3t+/BGitWp7VqRngvC8iESQygwg/TmxiSp1 Y1Sk1yMhCDCuDmxUdVff29I5rScFkYs1AxOxBLQuE01g1+Nf9awGLE5EfSJSPVHr4BM5 Y03sxQsJsr0WZmO65UKOl/493dKI2ZJy0NOSU+l36mpWkimDnNEdBJp4aPDjFhX+iYYH Y4pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:dkim-signature; bh=JfiBWAhkX1yHT92Ca969hKJaoVoe9ZEugeTA+o2gzlk=; b=qWQ2zjnFsy4CtI7fryTwQlaQEhDi1w+54SPFNqRD9nEZBHHBqRn2UWCWcwAOlbF+aT hcgL69ToolX/4C8+yukPVlycGC8eDKW6yfyOvrDcqxGBYBDXgzlE/LpbQw9Dqh/DB8oo 5zhVvhZcLLNV+0KlzisnJvONHSv+kj20V7N8j323nIaUUFK4dl8/WiSzMJI3DNcSmdDJ onGbMmPoSLEfUQSmyAO5rUvNyZB+QacGFA2M/wGNYxNZUWzVG/edPOa6wI8X4VZg9I/E zQvevdv6NHuE/pIQ7/DVGjcjw+d+fTktArbBphLBIfIT5srNlSuzrzFxvRLT7NVpRFPT tyMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=l8gfX2gi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s206si6083861pgs.442.2022.02.01.12.48.13; Tue, 01 Feb 2022 12:48:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=l8gfX2gi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358827AbiAaTA4 (ORCPT + 99 others); Mon, 31 Jan 2022 14:00:56 -0500 Received: from ale.deltatee.com ([204.191.154.188]:36660 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244293AbiAaTAy (ORCPT ); Mon, 31 Jan 2022 14:00:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:content-disposition; bh=JfiBWAhkX1yHT92Ca969hKJaoVoe9ZEugeTA+o2gzlk=; b=l8gfX2giRWGgLu5RJY5tnXex3G naOg0DFHyGRH+WLiZNH6sHyFr4bWsG1rAvdlZ1fmScq1SMfZDFIEnUYH8VczuVNJAw9nbR2ZHg/oq yJTHQQQl/ejTUOl5M+8lgqwY+8MnixFCjR2Spi6TJ1qAU3tOAr6Zvchw6CRPXgL437qt1wS6Z172Y dkvB2bUHt9IHazdxNJlQRzlYq1Zun08wMxYQTlew19LVw6U3nB3ecjgtyBQp29pl1CavUC8RSaymJ GqmzMSm6w+nK1bSbSduZGxfQ/6O6c76ZYO2FoIihh1jEypL8oHnl8n01OJnsZT5sASWHH3nFELW0W Q3IdSFGw==; Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1nEbuV-008jbJ-R5; Mon, 31 Jan 2022 12:00:20 -0700 To: Jonathan Derrick , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org Cc: Stephen Bates , Christoph Hellwig , Dan Williams , Jason Gunthorpe , =?UTF-8?Q?Christian_K=c3=b6nig?= , John Hubbard , Don Dutile , Matthew Wilcox , Daniel Vetter , Jakowski Andrzej , Minturn Dave B , Jason Ekstrand , Dave Hansen , Xiong Jianxin , Bjorn Helgaas , Ira Weiny , Robin Murphy , Martin Oliveira , Chaitanya Kulkarni , Ralph Campbell References: <20220128002614.6136-1-logang@deltatee.com> From: Logan Gunthorpe Message-ID: <08564685-e027-30b2-2c6e-9faf1d95dc7a@deltatee.com> Date: Mon, 31 Jan 2022 12:00:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: rcampbell@nvidia.com, ckulkarnilinux@gmail.com, martin.oliveira@eideticom.com, robin.murphy@arm.com, ira.weiny@intel.com, helgaas@kernel.org, jianxin.xiong@intel.com, dave.hansen@linux.intel.com, jason@jlekstrand.net, dave.b.minturn@intel.com, andrzej.jakowski@intel.com, daniel.vetter@ffwll.ch, willy@infradead.org, ddutile@redhat.com, jhubbard@nvidia.com, christian.koenig@amd.com, jgg@ziepe.ca, dan.j.williams@intel.com, hch@lst.de, sbates@raithlin.com, iommu@lists.linux-foundation.org, linux-mm@kvack.org, linux-pci@vger.kernel.org, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, jonathan.derrick@linux.dev X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Subject: Re: [PATCH v5 00/24] Userspace P2PDMA with O_DIRECT NVMe devices X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-01-31 11:56 a.m., Jonathan Derrick wrote: >> This is relatively straightforward, however the one significant >> problem is that, presently, pci_p2pdma_map_sg() requires a homogeneous >> SGL with all P2PDMA pages or all regular pages. Enhancing GUP to >> support enforcing this rule would require a huge hack that I don't >> expect would be all that pallatable. So patches 3 to 16 add >> support for P2PDMA pages to dma_map_sg[table]() to the dma-direct >> and dma-iommu implementations. Thus systems without an IOMMU plus >> Intel and AMD IOMMUs are supported. (Other IOMMU implementations would >> then be unsupported, notably ARM and PowerPC but support would be added >> when they convert to dma-iommu). > Am I understanding that an IO may use a mix of p2pdma and system pages? > Would that cause inconsistent latencies? Yes, that certainly would be a possibility. People developing applications that do such mixing would have to weight that issue if latency is something they care about. But it's counter productive and causes other difficulties for the kernel to enforce only homogenous IO. Logan