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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 460D8C433FE for ; Thu, 20 Jan 2022 14:03:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343833AbiATODp (ORCPT ); Thu, 20 Jan 2022 09:03:45 -0500 Received: from verein.lst.de ([213.95.11.211]:44751 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235542AbiATODo (ORCPT ); Thu, 20 Jan 2022 09:03:44 -0500 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) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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.