On Fri, Sep 18, 2020 at 08:21:44AM +0000, Van Leeuwen, Pascal wrote: > > > Can this alignment exceed ARCH_DMA_MINALIGN? If not then the > > macro CRYPTO_MINALIGN should cover it. > > I don't know. I'm not familiar with that macro and I have not been able to dig up any > clear description on what it should convey. I'm pretty sure it is because that's the reason kmalloc uses it as its minimum as otherwise memory returned by kmalloc may cross cache-lines. > In any case, aligning to the worst cache cacheline for a CPU architecture may mean > you end up wasting a lot of space on a system with a much smaller cacheline. It won't waste any memory because kmalloc is already using it as a minimum. Cheers, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt