Re: [PATCH 6.10 000/809] 6.10.3-rc3 review
From: Thomas Gleixner
Date: Wed Aug 07 2024 - 08:46:02 EST
On Tue, Aug 06 2024 at 20:49, James Bottomley wrote:
> On Wed, 2024-08-07 at 01:24 +0200, Thomas Gleixner wrote:
>> static int check_slab(struct kmem_cache *s, struct slab *slab)
>> {
>> int maxobj;
>> @@ -1386,8 +1388,10 @@ static int check_slab(struct kmem_cache
>>
>> maxobj = order_objects(slab_order(slab), s->size);
>> if (slab->objects > maxobj) {
>> - slab_err(s, slab, "objects %u > max %u",
>> - slab->objects, maxobj);
>> + testme();
>> + slab_err(s, slab, "objects %u > max %u size %u sorder
>> %u %u",
>> + slab->objects, maxobj, s->size,
>> slab_order(slab),
>> + order_objects(slab_order(slab), s->size));
>> return 0;
>> }
>> if (slab->inuse > slab->objects) {
>>
>> I don't know and I don't want to know TBH...
>
> OK, so you're telling us we have a problem with slab_order on parisc
> ... that's folio_order, so it smells like a parisc bug with
> folio_test_large? Unfortuntely I'm a bit pissed in an airport lounge
> on my way to the UK, so I've lost access to my pa test rig and can't
> test further for a while.
The point is that there are two invocations for order_objects(...) in
that code.
maxobj = order_objects(slab_order(slab), s->size);
and the extra one in the slab_err() output:
slab_err(s, slab, "objects %u > max %u size %u sorder %u %u",
slab->objects, maxobj, s->size,slab_order(slab),
order_objects(slab_order(slab), s->size));
>> [ 0.000000] BUG kmem_cache_node (Not tainted): objects 21 > max 16
>> size 192 sorder 0 21
So maxobj = 16 and the second invocation correctly returns 21, if and
only if the $$divoI placement is in that weird range.
When I move it out of that range then both return 21 as expected.
Thanks,
tglx