From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Christoph Lameter <cl@linux-foundation.org>,
Pekka Enberg <penberg@kernel.org>, Matt Mackall <mpm@selenic.com>,
linux-mm@kvack.org
Subject: Re: [PATCH] slub: fix check_bytes() for slub debugging
Date: Mon, 8 Aug 2011 23:24:18 +0200 [thread overview]
Message-ID: <20110808212418.GA3297@joi.lan> (raw)
In-Reply-To: <1312709438-7608-1-git-send-email-akinobu.mita@gmail.com>
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@gmail.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
WARNING: multiple messages have this Message-ID (diff)
From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Christoph Lameter <cl@linux-foundation.org>,
Pekka Enberg <penberg@kernel.org>, Matt Mackall <mpm@selenic.com>,
linux-mm@kvack.org
Subject: Re: [PATCH] slub: fix check_bytes() for slub debugging
Date: Mon, 8 Aug 2011 23:24:18 +0200 [thread overview]
Message-ID: <20110808212418.GA3297@joi.lan> (raw)
In-Reply-To: <1312709438-7608-1-git-send-email-akinobu.mita@gmail.com>
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@gmail.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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-08-08 21:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-07 9:30 [PATCH] slub: fix check_bytes() for slub debugging Akinobu Mita
2011-08-07 9:30 ` Akinobu Mita
2011-08-08 21:24 ` Marcin Slusarz [this message]
2011-08-08 21:24 ` Marcin Slusarz
2011-08-09 1:08 ` Akinobu Mita
2011-08-09 1:08 ` Akinobu Mita
2011-08-09 3:10 ` Eric Dumazet
2011-08-09 3:10 ` Eric Dumazet
2011-08-09 3:33 ` Eric Dumazet
2011-08-09 3:33 ` Eric Dumazet
2011-08-09 9:38 ` Akinobu Mita
2011-08-09 9:38 ` Akinobu Mita
2011-08-09 9:43 ` Pekka Enberg
2011-08-09 9:43 ` Pekka Enberg
2011-08-09 9:54 ` Eric Dumazet
2011-08-09 9:54 ` Eric Dumazet
2011-08-09 9:46 ` Eric Dumazet
2011-08-09 9:46 ` Eric Dumazet
2011-08-09 21:46 ` Marcin Slusarz
2011-08-09 21:46 ` Marcin Slusarz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110808212418.GA3297@joi.lan \
--to=marcin.slusarz@gmail.com \
--cc=akinobu.mita@gmail.com \
--cc=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.com \
--cc=penberg@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.