[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240305140833.GC3659@lst.de>
Date: Tue, 5 Mar 2024 15:08:33 +0100
From: Christoph Hellwig <hch@....de>
To: Petr Tesařík <petr@...arici.cz>
Cc: Michael Kelley <mhklinux@...look.com>, Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>, Christoph Hellwig <hch@....de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Petr Tesarik <petr.tesarik1@...wei-partners.com>,
"kernel-team@...roid.com" <kernel-team@...roid.com>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Dexuan Cui <decui@...rosoft.com>,
Nicolin Chen <nicolinc@...dia.com>
Subject: Re: [PATCH v5 6/6] swiotlb: Remove pointless stride adjustment for
allocations >= PAGE_SIZE
On Mon, Mar 04, 2024 at 08:04:28PM +0100, Petr Tesařík wrote:
> Sure, this will solve the allocations. But my understanding of this
> same thread is that we don't need it here. The historical page order
> alignment applies ONLY to allocations, NOT to mappings. It is
> documented in Documentation/core-api/dma-api-howto.rst under Consistent
> DMA mappings, for dma_alloc_coherent(). IIUC it does not apply to the
> streaming DMA mappings. At least, it would explain why nobody
> complained that the more strict guarantee for sizes greater than
> PAGE_SIZE was not kept...
Yes. arm32 (and before the dma-direct conversion various other
architectures) have relaxed the required to a PAGE_SIZE alignment,
and at least no native dma direct has ever returned less than PAGE_SIZE
alignment even for smaller allocations (as they are all rounded up
to PAGE_SIZE). So I think the documentation could also use some
updating to match reality.
Powered by blists - more mailing lists