[PATCH v3 00/13] mm, dma, arm64: Reduce ARCH_KMALLOC_MINALIGN to 8

Isaac Manjarres isaacmanjarres at google.com
Mon May 15 12:09:12 PDT 2023


On Wed, Apr 19, 2023 at 05:06:04PM +0100, Catalin Marinas wrote:
> I rebased it locally but the last stumbling block is sorting out the
> iommu bouncing. I was hoping Robin Murphy can lend a hand but he's been
> busy with other bits. I'll repost the series at 6.4-rc1.
Hey Catalin, just following up on this. I think it might be worthwhile
to split this series into two series:

Series 1: Decouple ARCH_KMALLOC_MINALIGN from ARCH_DMA_MINALIGN,
and use the cacheline size to determine the minimum kmalloc
alignment.

Series 2: Lower the minimum kmalloc alignment to 8 bytes by adding
support for using SWIOTLB to bounce unaligned kmalloc buffers for DMA
transactions.

Dividing the patches as such has the advantage of lowering the minimum
kmalloc alignment to 64 bytes on many ARM64 systems while the work for
lowering the minimum alignment to 8 bytes proceeds. This provides a
noticeable decrease in the slab memory footprint (e.g. I observed a 15
MB decrease in slab usage on a device I was using).

What are your thoughts on this?

--Isaac



More information about the linux-arm-kernel mailing list