[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 8 Aug 2011 23:24:18 +0200
From: Marcin Slusarz <marcin.slusarz@...il.com>
To: Akinobu Mita <akinobu.mita@...il.com>
Cc: linux-kernel@...r.kernel.org,
Christoph Lameter <cl@...ux-foundation.org>,
Pekka Enberg <penberg@...nel.org>,
Matt Mackall <mpm@...enic.com>, linux-mm@...ck.org
Subject: Re: [PATCH] slub: fix check_bytes() for slub debugging
On Sun, Aug 07, 2011 at 06:30:38PM +0900, Akinobu Mita wrote:
> The check_bytes() function is used by slub debugging. It returns a pointer
> to the first unmatching byte for a character in the given memory area.
>
> If the character for matching byte is greater than 0x80, check_bytes()
> doesn't work. Becuase 64-bit pattern is generated as below.
>
> value64 = value | value << 8 | value << 16 | value << 24;
> value64 = value64 | value64 << 32;
>
> The integer promotions are performed and sign-extended as the type of value
> is u8. The upper 32 bits of value64 is 0xffffffff in the first line, and
> the second line has no effect.
>
> This fixes the 64-bit pattern generation.
Thank you. I'm a bit ashamed about this bug... I introduced this bug, so:
Reviewed-by: Marcin Slusarz <marcin.slusarz@...il.com>
I tested your patch to check if performance improvements of commit
c4089f98e943ff445665dea49c190657b34ccffe come from this bug or not.
And forunately they aren't - performance is exactly the same.
How did you find it?
Marcin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists