mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <christoph@lameter.com>
To: torvalds@osdl.org
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Fix broken kmalloc_node in rc1/rc2
Date: Wed, 6 Jul 2005 10:47:07 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.62.0507061042460.30563@graphe.net> (raw)

This patch used to be in Andrew's tree before the NUMA slab allocator went 
in. Either this patch or the NUMA slab allocator is needed in order for
kmalloc_node to work correctly.

pcibus_to_node may be used to generate the node information passed to 
kmalloc_node. pcibus_to_node returns -1 if it was not able to determine
on which node a pcibus is located. For that case kmalloc_node must
work like kmalloc.

Signed-off-by: Christoph Lameter <christoph@lameter.com>

Index: linux-2.6.13-rc2/mm/slab.c
===================================================================
--- linux-2.6.13-rc2.orig/mm/slab.c	2005-07-06 03:46:33.000000000 +0000
+++ linux-2.6.13-rc2/mm/slab.c	2005-07-06 17:34:19.000000000 +0000
@@ -2372,6 +2372,9 @@ void *kmem_cache_alloc_node(kmem_cache_t
 	struct slab *slabp;
 	kmem_bufctl_t next;
 
+	if (nodeid == -1)
+		return kmem_cache_alloc(cachep, flags);
+
 	for (loop = 0;;loop++) {
 		struct list_head *q;
 

             reply	other threads:[~2005-07-07  0:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-06 17:47 Christoph Lameter [this message]
2005-07-09  6:25 ` Jens Axboe

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=Pine.LNX.4.62.0507061042460.30563@graphe.net \
    --to=christoph@lameter.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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®