From: Andrew Morton <akpm@linux-foundation.org>
To: Chris Mason <clmason@fusionio.com>
Cc: Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Tony Lindgren <tony@atomide.com>
Subject: Re: [PATCH] Fix crash during slab init
Date: Wed, 8 May 2013 15:09:32 -0700 [thread overview]
Message-ID: <20130508150932.e6ea333eb8e023940d15ac46@linux-foundation.org> (raw)
In-Reply-To: <20130508195628.4271.97115@localhost.localdomain>
On Wed, 8 May 2013 15:56:28 -0400 Chris Mason <clmason@fusionio.com> wrote:
> Commit 8a965b3b introduced a regression that caused us to crash early
> during boot. The commit was introducing ordering of slab creation,
> making sure two odd-sized slabs were created after specific powers of
> two sizes.
>
> But, if any of the power of two slabs were created earlier during boot,
> slabs at index 1 or 2 might not get created at all. This patch makes
> sure none of the slabs get skipped.
>
> Tony Lindgren bisected this down to the offending commit, which really
> helped because bisect kept bringing me to almost but not quite this one.
err, yes. Without your patch, current mainline does an ignominious
faceplant on my test box.
From: Chris Mason <clmason@fusionio.com>
Subject: slab: fix crash during slab init
Commit 8a965b3b ("mm, slab_common: Fix bootstrap creation of kmalloc
caches") introduced a regression that caused us to crash early during
boot. The commit was introducing ordering of slab creation, making sure
two odd-sized slabs were created after specific powers of two sizes.
But, if any of the power of two slabs were created earlier during boot,
slabs at index 1 or 2 might not get created at all. This patch makes sure
none of the slabs get skipped.
Tony Lindgren bisected this down to the offending commit, which really
helped because bisect kept bringing me to almost but not quite this one.
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Acked-by: Christoph Lameter <cl@linux.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Pekka Enberg <penberg@kernel.org>
Tested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/slab_common.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff -puN mm/slab_common.c~slab-fix-crash-during-slab-init mm/slab_common.c
--- a/mm/slab_common.c~slab-fix-crash-during-slab-init
+++ a/mm/slab_common.c
@@ -446,18 +446,18 @@ void __init create_kmalloc_caches(unsign
if (!kmalloc_caches[i]) {
kmalloc_caches[i] = create_kmalloc_cache(NULL,
1 << i, flags);
+ }
- /*
- * Caches that are not of the two-to-the-power-of size.
- * These have to be created immediately after the
- * earlier power of two caches
- */
- if (KMALLOC_MIN_SIZE <= 32 && !kmalloc_caches[1] && i == 6)
- kmalloc_caches[1] = create_kmalloc_cache(NULL, 96, flags);
+ /*
+ * Caches that are not of the two-to-the-power-of size.
+ * These have to be created immediately after the
+ * earlier power of two caches
+ */
+ if (KMALLOC_MIN_SIZE <= 32 && !kmalloc_caches[1] && i == 6)
+ kmalloc_caches[1] = create_kmalloc_cache(NULL, 96, flags);
- if (KMALLOC_MIN_SIZE <= 64 && !kmalloc_caches[2] && i == 7)
- kmalloc_caches[2] = create_kmalloc_cache(NULL, 192, flags);
- }
+ if (KMALLOC_MIN_SIZE <= 64 && !kmalloc_caches[2] && i == 7)
+ kmalloc_caches[2] = create_kmalloc_cache(NULL, 192, flags);
}
/* Kmalloc array is now usable */
_
next prev parent reply other threads:[~2013-05-08 22:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-07 6:37 [GIT PULL] SLAB changes for v3.10 Pekka Enberg
2013-05-08 0:30 ` Tony Lindgren
2013-05-08 4:24 ` Tony Lindgren
2013-05-08 5:16 ` Tony Lindgren
2013-05-08 6:20 ` Pekka Enberg
2013-05-08 11:58 ` Glauber Costa
2013-05-08 12:26 ` Pekka Enberg
2013-05-08 12:38 ` Glauber Costa
2013-05-08 13:56 ` Christoph Lameter
2013-05-08 15:45 ` Tony Lindgren
[not found] ` <alpine.DEB.2.02.1305081309310.3124@gentwo.org>
2013-05-08 18:29 ` Christoph Lameter
2013-05-08 18:13 ` Chris Mason
2013-05-08 18:25 ` Christoph Lameter
2013-05-08 18:48 ` Chris Mason
2013-05-08 19:01 ` Christoph Lameter
2013-05-08 19:11 ` Tony Lindgren
2013-05-08 19:56 ` [PATCH] Fix crash during slab init Chris Mason
2013-05-08 20:10 ` Sören Brinkmann
2013-05-08 21:48 ` Tetsuo Handa
2013-05-08 22:09 ` Andrew Morton [this message]
2013-05-08 19:05 ` [GIT PULL] SLAB changes for v3.10 Tony Lindgren
2013-05-08 21:01 ` Konrad Rzeszutek Wilk
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=20130508150932.e6ea333eb8e023940d15ac46@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=clmason@fusionio.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@kernel.org \
--cc=tony@atomide.com \
--cc=torvalds@linux-foundation.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®