From: Eric Dumazet <eric.dumazet@gmail.com>
To: Hugh Dickins <hughd@google.com>
Cc: Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH next/mmotm] slub: partly fix freeze in __slab_free
Date: Mon, 11 Jul 2011 21:39:27 +0200 [thread overview]
Message-ID: <1310413167.2860.3.camel@edumazet-laptop> (raw)
In-Reply-To: <alpine.LSU.2.00.1107111156310.13035@sister.anvils>
Le lundi 11 juillet 2011 à 11:58 -0700, Hugh Dickins a écrit :
> My load tests on PowerPC freeze within minutes in __slab_free().
> I happened to try PPC first, didn't try without this fix on x86.
>
> It looks as if the author was interrupted while devising the new
> cmpxchg_double_slab() version of __slab_free(): its decision to
> spin_lock_irqsave() depends on several uninitialized fields,
> and fixing that (by copying page to new) mostly fixes it.
>
> But I didn't think about it very much, and this may well not be what
> the author intends; and I have seen a couple of much rarer freezes
> in __slab_free() on PPC (not yet on x86) even after applying this.
>
> Signed-off-by: Hugh Dickins <hughd@google.com>
> ---
> mm/slub.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- mmotm/mm/slub.c 2011-07-08 18:59:44.135443127 -0700
> +++ linux/mm/slub.c 2011-07-10 05:07:08.000000000 -0700
> @@ -2217,6 +2217,7 @@ static void __slab_free(struct kmem_cach
> return;
>
> do {
> + new = *page;
> prior = page->freelist;
> counters = page->counters;
> set_freepointer(s, object, prior);
> --
I suspect you hit the bug on 32bit arch ?
What about following patch instead ?
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 3d76a43..1351d28 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -62,7 +62,7 @@ struct page {
struct { /* SLUB cmpxchg_double area */
void *freelist;
union {
- unsigned long counters;
+ u64 counters;
struct {
unsigned inuse:16;
unsigned objects:15;
next prev parent reply other threads:[~2011-07-11 19:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-11 18:58 Hugh Dickins
2011-07-11 19:39 ` Eric Dumazet [this message]
2011-07-11 20:46 ` Hugh Dickins
2011-07-12 6:13 ` Pekka Enberg
2011-07-12 15:11 ` Christoph Lameter
2011-07-12 15:55 ` Christoph Lameter
2011-07-13 11:28 ` Hugh Dickins
2011-07-13 15:47 ` Christoph Lameter
2011-07-13 15:55 ` Christoph Lameter
2011-07-14 16:14 ` Hugh Dickins
2011-07-14 17:26 ` Christoph Lameter
2011-07-15 19:22 ` Hugh Dickins
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=1310413167.2860.3.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®