From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vk1-f182.google.com (mail-vk1-f182.google.com [209.85.221.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68F4F2DC792 for ; Sat, 25 Jul 2026 14:32:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784989961; cv=none; b=izFz02qAJMAqx+rLQbENtvUM3a35ib8mgOEFk1dGYdjMat/ede7o8Xt1VXfnZRHxkzXNMjlE2cOeqcacYjWZk4bLcYYWUAu7rxc2TAVcHTw4b/ULufu+Fnb2MRa9LvgLe3v9qKqDOuvf79sw/okzmCQM8E9kUHYC5HPQLbVUSAc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784989961; c=relaxed/simple; bh=S27wxW5RiXGSWAyfDHFRMon4Va9e0JZw9F8o+Hg7Llk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QnqXidPTTnny7KJawQwWPxmM8WiNJLKbOt3hjmJqQwedAuAQ5AVua9RoIGv5ZHD+uGjUZQ5sxFzTQLehy1d2wMmT/6iOrvbC2T84kKYh0Y1+em5Xty1dnXn840f0pG71WW94/77UTS+wHKaSFL7J4yIoqbShxpAGT4mJ35bsIS4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=od6f7N5+; arc=none smtp.client-ip=209.85.221.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="od6f7N5+" Received: by mail-vk1-f182.google.com with SMTP id 71dfb90a1353d-5bdff8c02b2so467553e0c.3 for ; Sat, 25 Jul 2026 07:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1784989958; x=1785594758; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=MDjgTbE6npl3ZujjcO5BO0pJ+G7Th/Ah/Rj5MPFfgH0=; b=od6f7N5+c/puL96q6ep+Pcv/AjWLRZdlfywunb5GfkKpEdmOM0WWGWaG4tfpu54Jpf zYYOZhS/SWBerpTP40Y7TGtfsGi2t3FzQnRPFYc7LxKWIkmMq/xvzdcaRHiQYALGigsu u4V+EMZvlMD0Qub9q/lNRghHipTNlxa4HAsnIwjMovH8ec3S/mhVckUo2ItkNadubPvQ r4Xjy5Z5eGAXSpsUyrL4taf3u8QXIVidiyG8i04qpAYyf5K5vtYywdoFE5sd7ybdyx8M 3wjeBErlr1fYyxC5CdlxDVEnb5CAW4DCcxwD2CSB0Ty61Ovv3kfHEkYQa0ZXLSbyt1AV iXfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784989958; x=1785594758; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=MDjgTbE6npl3ZujjcO5BO0pJ+G7Th/Ah/Rj5MPFfgH0=; b=mcvSEhRH4zlCxyhbMH4C4SszH+A+/wMgOQvSjFiNVUlc6sDvaUp3ZkNySJE8b5AE7A tC54dTUTiuGf5l0lXZ4npXzj5YREV5Dm5PdZbDmoxBG+TyoqJAusz5pT9CYFeCGY08iU 8aNwf8QPFJjxKLjbLWT/x5rI2z+CnjToD9mF7niHJfKqdReabMfrPNaUnMhI5vNNq1XJ 0W1IUZJ1JL2GyfFdDdDM1LGhXbzbRvMnqOiK+E8LHVtk50trNRUJ6JVbJZO8G5OEOGBo 1Zzfrp7Zpr3GeC2PnZyGA7Rz6hoMVUBEJfa+AU9htJvlvUodZ2eJGOLJ6PD0XcxrJYdm wL5Q== X-Forwarded-Encrypted: i=1; AHgh+RoN/hj8AOSoIbgL8bi9gL4h0Bi7Sth0cpLYlJTdhEf8TDAFkyZjURcEfBIjaLLrgUrNkfMeNtNnZ2+oKtM=@vger.kernel.org X-Gm-Message-State: AOJu0YyGh8W/ZpKQ/MFMFtAtDVphGc8zWxL7ASioOiytsoDEvcHQFTr/ gtK3UBXay4fv2NzHt/uo2mA2SzBlBvRllccvbC6TOsCXe66x+7TG1HEMmPfig4hsNm0= X-Gm-Gg: AR+sD11rKEAh2OPwEUQt4RO1WHu3GqN3KTpb3m2FX3lM9YyvS0Ek5bkjbqFZFA8LI5M DFt4IGkwcmcgKNTKw3T3sn37vF5kwRNYg9qDLvJ/4ptN3o0SGDjrNRv1Durc9L11P9rZtMoSDnM a7bq9qEGuKFiX5hHwV8LhnQo8QKJzIUNn2oDqutF1X5+Fis2HQqqFdHkGzkAn6f8oK4WfamPwpT siBFjRAKEmDfpvN37Da1QSgT3qKHiuBJR44THGRoBXcoNEyPAUdTYGUimR1rUg1M5tvtAgtCURE drmz3gxGH2G5tqbi9HsN1vbexLmCHx0t2xkTNLmQVJR96VNG0qiy5kp0oP841mArtF/akLdxCAT M4JGBLYM1YYLqWad8o7S8ts3QZ3PnNgGvZY+V2L9Ya0xRQNzNDRaJGHdW6JG5jbM= X-Received: by 2002:a05:6102:5794:b0:74a:b5e3:e96f with SMTP id ada2fe7eead31-7503e26761cmr1503853137.7.1784989958188; Sat, 25 Jul 2026 07:32:38 -0700 (PDT) Received: from ziepe.ca ([12.18.163.234]) by smtp.gmail.com with ESMTPSA id ada2fe7eead31-750362e67cfsm1546647137.8.2026.07.25.07.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jul 2026 07:32:37 -0700 (PDT) Received: from jgg by NV-9X0Z6D3.localdomain with local (Exim 4.97) (envelope-from ) id 1wndQX-000000000hB-3EP5; Sat, 25 Jul 2026 11:32:33 -0300 Date: Sat, 25 Jul 2026 11:32:33 -0300 From: Jason Gunthorpe To: Leon Romanovsky Cc: "Aneesh Kumar K.V (Arm)" , Marek Szyprowski , iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev, Robin Murphy , Will Deacon , Marc Zyngier , Steven Price , Suzuki K Poulose , Catalin Marinas , Jiri Pirko , Mostafa Saleh , Petr Tesarik , Alexey Kardashevskiy , Dan Williams , Xu Yilun , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , x86@kernel.org Subject: Re: [PATCH v8 00/23] dma-mapping: Track shared DMA state through direct, pool and swiotlb paths Message-ID: References: <20260717180442.110954-1-aneesh.kumar@kernel.org> <20260721124056.GK110966@unreal> <20260723075108.GB110966@unreal> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260723075108.GB110966@unreal> On Thu, Jul 23, 2026 at 10:51:08AM +0300, Leon Romanovsky wrote: > On Wed, Jul 22, 2026 at 04:57:09PM -0300, Jason Gunthorpe wrote: > > On Tue, Jul 21, 2026 at 03:40:56PM +0300, Leon Romanovsky wrote: > > > > > Why don't we continue the effort to remove "struct page" entirely > > > from the DMA API internals? > > > > > > IMHO, everything not exposed to DMA API users should use > > > phys_addr_t, including the DMA address pool. > > > > The alloc interfaces return a struct page, that is why this stuff is > > organized like this. Look at dma_alloc_pages() > > And I didn't say that we should change dma_alloc_pages(). It is external > API, which needs to be struct *page. I'm talking about internals. > > Even dma_alloc_pages() flow shows how convoluted and non-uniform > the code underneath which performs translations all the time. Yeah, but I don't really want to go from phys/virt to page, I'd rather see the other direction that is easier to reason about Maybe some small wrapper that returned phys or whatever would clean this up Jason