[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yk1U7gpxNtlpQfmk@arm.com>
Date: Wed, 6 Apr 2022 09:53:02 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Hyeonggon Yoo <42.hyeyoo@...il.com>
Cc: Will Deacon <will@...nel.org>, Marc Zyngier <maz@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-mm@...ck.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, cl@...ux.com, vbabka@...e.cz,
iamjoonsoo.kim@....com, rientjes@...gle.com, penberg@...nel.org,
roman.gushchin@...ux.dev
Subject: Re: [PATCH 01/10] mm/slab: Decouple ARCH_KMALLOC_MINALIGN from
ARCH_DMA_MINALIGN
On Wed, Apr 06, 2022 at 08:59:18AM +0900, Hyeonggon Yoo wrote:
> On Tue, Apr 05, 2022 at 02:57:49PM +0100, Catalin Marinas wrote:
> > In preparation for supporting a dynamic kmalloc() minimum alignment,
> > allow architectures to define ARCH_KMALLOC_MINALIGN independently of
> > ARCH_DMA_MINALIGN. In addition, always define ARCH_DMA_MINALIGN even if
> > an architecture does not override it.
>
> [ +Cc slab maintainer/reviewers ]
>
> I get why you want to set minimum alignment of kmalloc() dynamically.
> That's because cache line size can be different and we cannot statically
> know that, right?
>
> But I don't get why you are trying to decouple ARCH_KMALLOC_MINALIGN
> from ARCH_DMA_MINALIGN. kmalloc'ed buffer is always supposed to be DMA-safe.
Arnd already replied. With this series, kmalloc'ed buffers are still
DMA-safe for the SoC the kernel is running on.
--
Catalin
Powered by blists - more mailing lists