From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37219C433EF for ; Thu, 20 Jan 2022 17:54:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 965326B00A1; Thu, 20 Jan 2022 12:54:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8ED7B6B00A4; Thu, 20 Jan 2022 12:54:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7B45A6B00A5; Thu, 20 Jan 2022 12:54:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0232.hostedemail.com [216.40.44.232]) by kanga.kvack.org (Postfix) with ESMTP id 682EE6B00A1 for ; Thu, 20 Jan 2022 12:54:39 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 1894A95CB6 for ; Thu, 20 Jan 2022 17:54:39 +0000 (UTC) X-FDA: 79051415478.29.B86606B Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf22.hostedemail.com (Postfix) with ESMTP id 500ECC0009 for ; Thu, 20 Jan 2022 17:54:38 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3F09FED1; Thu, 20 Jan 2022 09:54:37 -0800 (PST) Received: from [10.57.68.26] (unknown [10.57.68.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0213C3F774; Thu, 20 Jan 2022 09:54:34 -0800 (PST) Message-ID: <744d247c-bbb5-80aa-f774-c65791cb0766@arm.com> Date: Thu, 20 Jan 2022 17:54:30 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Phyr Starter Content-Language: en-GB To: Keith Busch , Christoph Hellwig Cc: nvdimm@lists.linux.dev, linux-rdma@vger.kernel.org, John Hubbard , linux-kernel@vger.kernel.org, Matthew Wilcox , Ming Lei , linux-block@vger.kernel.org, linux-mm@kvack.org, dri-devel@lists.freedesktop.org, Jason Gunthorpe , netdev@vger.kernel.org, Joao Martins , Logan Gunthorpe References: <20220111004126.GJ2328285@nvidia.com> <20220120135602.GA11223@lst.de> <20220120152736.GB383746@dhcp-10-100-145-180.wdc.com> From: Robin Murphy In-Reply-To: <20220120152736.GB383746@dhcp-10-100-145-180.wdc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 500ECC0009 X-Stat-Signature: j3z7nonrmx7q1frixfn61448fqg4sgfq Authentication-Results: imf22.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf22.hostedemail.com: domain of robin.murphy@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=robin.murphy@arm.com X-HE-Tag: 1642701278-367354 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2022-01-20 15:27, Keith Busch wrote: > On Thu, Jan 20, 2022 at 02:56:02PM +0100, Christoph Hellwig wrote: >> - on the input side to dma mapping the bio_vecs (or phyrs) are chained >> as bios or whatever the containing structure is. These already exist >> and have infrastructure at least in the block layer >> - on the output side I plan for two options: >> >> 1) we have a sane IOMMU and everyting will be coalesced into a >> single dma_range. This requires setting the block layer >> merge boundary to match the IOMMU page size, but that is >> a very good thing to do anyway. > > It doesn't look like IOMMU page sizes are exported, or even necessarily > consistently sized on at least one arch (power). FWIW POWER does its own thing separate from the IOMMU API. For all the regular IOMMU API players, page sizes are published in the iommu_domain that the common iommu-dma layer operates on. In fact it already uses them to pick chunk sizes for composing large buffer allocations. Robin.