On 8/6/24 21:21, Vlastimil Babka wrote: > On 8/6/24 20:23, Linus Torvalds wrote: >> On Tue, 6 Aug 2024 at 11:13, Guenter Roeck <linux@xxxxxxxxxxxx> wrote: >>> >>> On 8/6/24 10:49, Linus Torvalds wrote: >>> > [ Adding s390 people, this is strange ] >>> >>> Did I get lost somewhere ? I am seeing this with parisc (64 bit), not s390. >> >> Duh. Sorry for the noise. I don't know why I thought this was s390. >> >> The parisc __ffs() is also using some grotty inline asm, but I don't >> see how the compiler could make a mess of it. > > Note the alignment rules only apply to generic kmalloc-* caches, not "named" > specific caches, such as kmem_cache and kmem_cache_node. Also to clarify why objsize looks odd in the slabinfo for the kmalloc caches, e.g. kmalloc-64 has 256 etc. That's also not because of wrong alignment calculations, but because full slub_debug is enabled for everything (CONFIG_SLUB_DEBUG_ON=y) so there's lots of metadata, redzones etc. (it's also why these consistency checks are executed). The column says <objsize> but it's actually reporting the full s->size, not only the actual object... >> Linus >