Re: [PATCH 6.10 000/809] 6.10.3-rc3 review

From: Linus Torvalds
Date: Tue Aug 06 2024 - 13:35:29 EST


On Tue, 6 Aug 2024 at 10:20, Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
>
> kmem_cache_node 197 210 192 21 1 : tunables 0 0 0 : slabdata 10 10 0
> kmem_cache 197 200 320 25 2 : tunables 0 0 0 : slabdata 8 8 0

Hmm. Do we have some alignment confusion?

The alignment rules for 192 are to align it to 64-byte boundaries
(because that's the largest power of two that divides it), and that
means it stays at 192, and that would give 21 objects per 4kB page.

But if we use the "align up to next power of two", you get 256 bytes,
and 16 objects per page.

And that 21-vs-16 confusion would seem to match this pretty well:

[ 0.000000] BUG kmem_cache_node (Not tainted): objects 21 > max 16

which makes me wonder...

Linus