From: Pekka Enberg <penberg@cs.helsinki.fi>
To: akpm@linux-foundation.org
Cc: gorcunov@openvz.org, kosaki.motohiro@jp.fujitsu.com,
mel@csn.ul.ie, cl@linux-foundation.org, riel@redhat.com,
linux-kernel@vger.kernel.org, mingo@elte.hu, rientjes@google.com
Subject: [PATCH 2/2] SLUB: Use GFP_PANIC for early-boot allocations
Date: Fri, 08 May 2009 18:10:29 +0300 [thread overview]
Message-ID: <1241795429.28600.61.camel@penberg-laptop> (raw)
From: Pekka Enberg <penberg@cs.helsinki.fi>
This patch converts SLUB early-boot code to use GFP_PANIC instead of explicit
BUG_ON() calls.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
mm/slub.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index 7ab54ec..55216b4 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2109,9 +2109,8 @@ static void early_kmem_cache_node_alloc(gfp_t gfpflags, int node)
BUG_ON(kmalloc_caches->size < sizeof(struct kmem_cache_node));
- page = new_slab(kmalloc_caches, gfpflags, node);
+ page = new_slab(kmalloc_caches, gfpflags | GFP_PANIC, node);
- BUG_ON(!page);
if (page_to_nid(page) != node) {
printk(KERN_ERR "SLUB: Unable to allocate memory from "
"node %d\n", node);
@@ -4367,10 +4366,9 @@ static struct kset *slab_kset;
*/
static char *create_unique_id(struct kmem_cache *s)
{
- char *name = kmalloc(ID_STR_LENGTH, GFP_KERNEL);
- char *p = name;
+ char *name, *p;
- BUG_ON(!name);
+ p = name = kmalloc(ID_STR_LENGTH, GFP_KERNEL | GFP_PANIC);
*p++ = ':';
/*
--
1.5.6.3
next reply other threads:[~2009-05-08 15:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-08 15:10 Pekka Enberg [this message]
2009-05-08 15:23 ` Cyrill Gorcunov
2009-05-08 15:28 ` Christoph Lameter
2009-05-08 15:36 ` Pekka Enberg
2009-05-08 15:42 ` Peter Zijlstra
2009-05-08 15:45 ` Pekka Enberg
2009-05-08 15:50 ` Peter Zijlstra
2009-05-08 16:15 ` Cyrill Gorcunov
2009-05-08 16:31 ` Peter Zijlstra
2009-05-08 16:42 ` Christoph Lameter
2009-05-08 16:49 ` Cyrill Gorcunov
2009-05-09 8:30 ` Ingo Molnar
2009-05-08 15:42 ` Pekka Enberg
2009-05-09 8:30 ` Ingo Molnar
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=1241795429.28600.61.camel@penberg-laptop \
--to=penberg@cs.helsinki.fi \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=gorcunov@openvz.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=mingo@elte.hu \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
/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®