Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1280496pxb; Fri, 21 Jan 2022 14:13:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJx34IHi+3V+2B51BBY2TzJ1lZlA0Fe1qZpbSQmSfrL8Y0Tiy6SUthAXuwPIsh+Brb11W6WQ X-Received: by 2002:a63:1562:: with SMTP id 34mr4237603pgv.15.1642803202471; Fri, 21 Jan 2022 14:13:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642803202; cv=none; d=google.com; s=arc-20160816; b=T0BXN/hNh1nnIJBQdupNgvp0IFus3Bos1bBEFzXnm4l+NMdV646VX6useRE4UiZmdq 1nNcHx7c9zWBkFbkvUXMoIJaVFXHorxqfhP47VbJ8kY04o2PvE0YGA9iLsAVQeVF/EoG 9XP2sf5iYuvWc73xd3mBtVXGsbIo+TLLi6HtEbY5TwU4rXK5Wpj/150uEQpddwQUjrvQ iwCvc7V1tp1izmNRqdun8KQaJIHfM1AazlmK9y8BS3olD8GOEKiuJWv90ORN99EIzyYg A6/l1PhjOD3jE8IwFPAcCIcnxoCTh5qmlPH3PE+HfQRff1ZP67QUmYfDnXMr5ByEeveo /iDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=cTzUU8K1eBG2yWWC+5e1bVd1r50HWBqaiA8mAnzZ5e0=; b=nWK0mb76Az6G5ZJDPVtHS/8uMumqccoIj3BhEHRCGMF+a7thNS2o5qG2Y+gx3TJyNZ 9bDwwIrYp1mOGcSsIro5SrdivcBGpD7en5Y1KIVU91WJ0cu7XTLysWeatSMIzMr3Gu1f P+8BvYr+w4TP0bpL2Tn6KNLSY9jVE0dB3UrS8Hky1L/R9tcVzmUwQM/PaHlmxsQwPKXQ ZH4HgQdFDsa1pVJLkQsVsRI5DQOhwTJcMilYbWJKDgc213HGE2YnThDmCWR4yy76JC55 zNqpLTATNmcIqeNwvwPPDY2MT9I87rwMkyppe5QzWnY5KIauzxrjJj6Or3CRpt7aoElJ 9PDg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pi3si15603316pjb.156.2022.01.21.14.13.10; Fri, 21 Jan 2022 14:13:22 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344170AbiATODp (ORCPT + 99 others); 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: linux-kernel@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.