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 2F760C433F5 for ; Thu, 20 Jan 2022 14:03:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 907526B0098; Thu, 20 Jan 2022 09:03:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B6DE6B009D; Thu, 20 Jan 2022 09:03:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 77EFC6B009F; Thu, 20 Jan 2022 09:03:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0137.hostedemail.com [216.40.44.137]) by kanga.kvack.org (Postfix) with ESMTP id 65B016B0098 for ; Thu, 20 Jan 2022 09:03:44 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 1DEEF7F4F5 for ; Thu, 20 Jan 2022 14:03:44 +0000 (UTC) X-FDA: 79050833568.15.DD34E5D Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf21.hostedemail.com (Postfix) with ESMTP id 7D8101C0019 for ; Thu, 20 Jan 2022 14:03:43 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 4A34668BEB; Thu, 20 Jan 2022 15:03:40 +0100 (CET) Date: Thu, 20 Jan 2022 15:03:40 +0100 From: Christoph Hellwig To: Matthew Wilcox Cc: Jason Gunthorpe , linux-kernel@vger.kernel.org, Christoph Hellwig , Joao Martins , John Hubbard , Logan Gunthorpe , Ming Lei , linux-block@vger.kernel.org, netdev@vger.kernel.org, linux-mm@kvack.org, linux-rdma@vger.kernel.org, dri-devel@lists.freedesktop.org, nvdimm@lists.linux.dev Subject: Re: Phyr Starter Message-ID: <20220120140340.GC11223@lst.de> References: <20220111004126.GJ2328285@nvidia.com> <20220111150142.GL2328285@nvidia.com> <20220111202159.GO2328285@nvidia.com> <20220111225306.GR2328285@nvidia.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) X-Rspamd-Queue-Id: 7D8101C0019 X-Stat-Signature: ap7b6b49cdizjabjsr95gamq69au3kmq Authentication-Results: imf21.hostedemail.com; dkim=none; spf=none (imf21.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de; dmarc=none X-Rspamd-Server: rspam03 X-HE-Tag: 1642687423-186883 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 Wed, Jan 12, 2022 at 06:37:03PM +0000, Matthew Wilcox wrote: > But let's go further than that (which only brings us to 32 bytes per > range). For the systems you care about which use an identity mapping, > and have sizeof(dma_addr_t) == sizeof(phys_addr_t), we can simply > point the dma_range pointer to the same memory as the phyr. We just > have to not free it too early. That gets us down to 16 bytes per range, > a saving of 33%. Even without an IOMMU the dma_addr_t can have offsets vs the actual physical address. Not on x86 except for a weirdo SOC, but just about everywhere else.