Re: [BUG] SLOB breaks Crypto
From: Matt Mackall
Date: Tue May 18 2010 - 19:16:26 EST
On Tue, 2010-05-18 at 15:40 -0700, David Miller wrote:
> All of the CPP tests like the one used by linux/crypto.h are
> ludicrious. It should absolutely be not necessary for any code to
> duplicate this kind of calculation.
>
> Instead, this sequence should be in linux/slab.h, and be used
> universally by slab, slub, slob and anything that wants to know the
> allocators alignment guarentees.
Agreed. However, every arch should -also- set ARCH_KMALLOC_MINALIGN
appropriately so that we have documentation of the hardware requirements
on each platform.
> I don't even know of a 32-bit chip outside of x86 that doesn't
> potentially emit alignment requiring 64-bit memory operations for
> 64-bit objects. So what SLOB is doing with a different default is
> even more strange. And I bet you that even without the requirement,
> x86 runs faster with 64-bit alignment of 64-bit objects.
No doubt but SLOB explicitly trades faster for smaller.
--
Mathematics is the supreme nostalgia of our time.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/