All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: Andrew Morton <akpm@osdl.org>, Jeff Garzik <jeff@garzik.org>,
	Mel Gorman <mel@csn.ul.ie>,
	linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	Paul Mackerras <paulus@samba.org>,
	Anton Blanchard <anton@samba.org>
Subject: Re: kernel BUG in __cache_alloc_node at linux-2.6.git/mm/slab.c:3177!
Date: Fri, 20 Oct 2006 19:07:29 +0100	[thread overview]
Message-ID: <45391061.7090900@shadowen.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0610201044570.16161@schroedinger.engr.sgi.com>

Christoph Lameter wrote:
> Here is the patch:
> 
> Slab: Do not fallback to nodes that have not been bootstrapped yet
> 
> The zonelist may contain zones of nodes that have not been bootstrapped 
> and we will oops if we try to allocate from those zones. So check if the 
> node information for the slab and the node have been setup before 
> attempting an allocation. If it has not been setup then skip that zone.
> 
> Usually we will not encounter this situation since the slab bootstrap
> code avoids falling back before we have setup the respective nodes but we 
> seem to have a special needs for pppc.
> 
> Signed-off-by: Christoph Lameter <clameter@sgi.com>
> 
> Index: linux-2.6.19-rc2-mm1/mm/slab.c
> ===================================================================
> --- linux-2.6.19-rc2-mm1.orig/mm/slab.c	2006-10-20 12:39:02.000000000 -0500
> +++ linux-2.6.19-rc2-mm1/mm/slab.c	2006-10-20 12:41:04.137684581 -0500
> @@ -3160,12 +3160,15 @@ void *fallback_alloc(struct kmem_cache *
>  	struct zone **z;
>  	void *obj = NULL;
>  
> -	for (z = zonelist->zones; *z && !obj; z++)
> +	for (z = zonelist->zones; *z && !obj; z++) {
> +		int nid = zone_to_nid(*z);
> +
>  		if (zone_idx(*z) <= ZONE_NORMAL &&
> -				cpuset_zone_allowed(*z, flags))
> +				cpuset_zone_allowed(*z, flags) &&
> +				cache->nodelists[nid])
>  			obj = __cache_alloc_node(cache,
> -					flags | __GFP_THISNODE,
> -					zone_to_nid(*z));
> +					flags | __GFP_THISNODE, nid);
> +	}
>  	return obj;
>  }
>  
> 

Applied this and the previous version, diff says they are identicle, so
my previous testing applies.

Acked-by: Andy Whitcroft <apw@shadowen.org>

-apw

WARNING: multiple messages have this Message-ID (diff)
From: Andy Whitcroft <apw@shadowen.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: Andrew Morton <akpm@osdl.org>, Paul Mackerras <paulus@samba.org>,
	Anton Blanchard <anton@samba.org>,
	linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org,
	Mel Gorman <mel@csn.ul.ie>, Mike Kravetz <kravetz@us.ibm.com>,
	will_schmidt@vnet.ibm.com, Jeff Garzik <jeff@garzik.org>
Subject: Re: kernel BUG in __cache_alloc_node at linux-2.6.git/mm/slab.c:3177!
Date: Fri, 20 Oct 2006 19:07:29 +0100	[thread overview]
Message-ID: <45391061.7090900@shadowen.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0610201044570.16161@schroedinger.engr.sgi.com>

Christoph Lameter wrote:
> Here is the patch:
> 
> Slab: Do not fallback to nodes that have not been bootstrapped yet
> 
> The zonelist may contain zones of nodes that have not been bootstrapped 
> and we will oops if we try to allocate from those zones. So check if the 
> node information for the slab and the node have been setup before 
> attempting an allocation. If it has not been setup then skip that zone.
> 
> Usually we will not encounter this situation since the slab bootstrap
> code avoids falling back before we have setup the respective nodes but we 
> seem to have a special needs for pppc.
> 
> Signed-off-by: Christoph Lameter <clameter@sgi.com>
> 
> Index: linux-2.6.19-rc2-mm1/mm/slab.c
> ===================================================================
> --- linux-2.6.19-rc2-mm1.orig/mm/slab.c	2006-10-20 12:39:02.000000000 -0500
> +++ linux-2.6.19-rc2-mm1/mm/slab.c	2006-10-20 12:41:04.137684581 -0500
> @@ -3160,12 +3160,15 @@ void *fallback_alloc(struct kmem_cache *
>  	struct zone **z;
>  	void *obj = NULL;
>  
> -	for (z = zonelist->zones; *z && !obj; z++)
> +	for (z = zonelist->zones; *z && !obj; z++) {
> +		int nid = zone_to_nid(*z);
> +
>  		if (zone_idx(*z) <= ZONE_NORMAL &&
> -				cpuset_zone_allowed(*z, flags))
> +				cpuset_zone_allowed(*z, flags) &&
> +				cache->nodelists[nid])
>  			obj = __cache_alloc_node(cache,
> -					flags | __GFP_THISNODE,
> -					zone_to_nid(*z));
> +					flags | __GFP_THISNODE, nid);
> +	}
>  	return obj;
>  }
>  
> 

Applied this and the previous version, diff says they are identicle, so
my previous testing applies.

Acked-by: Andy Whitcroft <apw@shadowen.org>

-apw

  reply	other threads:[~2006-10-20 18:08 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-13 18:41 kernel BUG in __cache_alloc_node at linux-2.6.git/mm/slab.c:3177! Will Schmidt
2006-10-13 19:05 ` Christoph Lameter
2006-10-13 19:05   ` Christoph Lameter
2006-10-13 19:53   ` Will Schmidt
2006-10-13 20:57     ` Will Schmidt
2006-10-13 21:22       ` Nathan Lynch
2006-10-13 21:22         ` Nathan Lynch
2006-10-13 21:34         ` Anton Blanchard
2006-10-13 21:34           ` Anton Blanchard
2006-10-13 22:01         ` Mike Kravetz
2006-10-13 22:01           ` Mike Kravetz
2006-10-13 22:22       ` Christoph Lameter
2006-10-16 16:00         ` Will Schmidt
2006-10-16 19:20         ` Will Schmidt
2006-10-16 19:25           ` Christoph Lameter
2006-10-16 20:50             ` Will Schmidt
2006-10-16 23:37               ` Christoph Lameter
2006-10-18  6:11                 ` Paul Mackerras
2006-10-18  6:11                   ` Paul Mackerras
2006-10-18 15:12                   ` Christoph Lameter
2006-10-18 15:12                     ` Christoph Lameter
2006-10-18 21:19                     ` Paul Mackerras
2006-10-18 21:19                       ` Paul Mackerras
2006-10-18 21:26                       ` Christoph Lameter
2006-10-18 21:26                         ` Christoph Lameter
2006-10-18 21:49                       ` Christoph Lameter
2006-10-18 21:49                         ` Christoph Lameter
2006-10-19  5:03                         ` Paul Mackerras
2006-10-19  5:03                           ` Paul Mackerras
2006-10-19 16:16                           ` Christoph Lameter
2006-10-19 16:16                             ` Christoph Lameter
2006-10-19 16:30                             ` Anton Blanchard
2006-10-19 16:30                               ` Anton Blanchard
2006-10-19 16:49                               ` Christoph Lameter
2006-10-19 16:49                                 ` Christoph Lameter
2006-10-19 22:23                                 ` Paul Mackerras
2006-10-19 22:23                                   ` Paul Mackerras
2006-10-19 22:31                                   ` Christoph Lameter
2006-10-19 22:31                                     ` Christoph Lameter
2006-10-20  7:18                                     ` Paul Mackerras
2006-10-20  7:18                                       ` Paul Mackerras
2006-10-20 14:18                                       ` Andy Whitcroft
2006-10-20 14:18                                         ` Andy Whitcroft
2006-10-20 14:31                                         ` [PATCH] Reintroduce NODES_SPAN_OTHER_NODES for powerpc Andy Whitcroft
2006-10-20 16:30                                           ` Mel Gorman
2006-10-20 16:30                                             ` Mel Gorman
2006-10-20 14:59                                         ` kernel BUG in __cache_alloc_node at linux-2.6.git/mm/slab.c:3177! Mike Kravetz
2006-10-20 14:59                                           ` Mike Kravetz
2006-10-20 15:19                                         ` Will Schmidt
2006-10-20 15:19                                           ` Will Schmidt
2006-10-20 16:00                                         ` Andy Whitcroft
2006-10-20 16:00                                           ` Andy Whitcroft
2006-10-20 17:09                                           ` Andrew Morton
2006-10-20 17:09                                             ` Andrew Morton
2006-10-20 17:46                                             ` Christoph Lameter
2006-10-20 17:46                                               ` Christoph Lameter
2006-10-20 18:07                                               ` Andy Whitcroft [this message]
2006-10-20 18:07                                                 ` Andy Whitcroft
2006-10-20 17:13                                           ` Will Schmidt
2006-10-20 17:13                                             ` Will Schmidt
2006-10-20 17:34                                       ` Christoph Lameter
2006-10-20 17:34                                         ` Christoph Lameter
2006-10-20 22:54                                         ` Paul Mackerras
2006-10-20 22:54                                           ` Paul Mackerras
2006-10-19 17:03                               ` Christoph Lameter
2006-10-19 17:03                                 ` Christoph Lameter
2006-10-19 18:07                                 ` Christoph Lameter
2006-10-19 18:07                                   ` Christoph Lameter
2006-10-19 20:37                                 ` Will Schmidt
2006-10-19 20:37                                   ` Will Schmidt
2006-10-19 21:28                                   ` Christoph Lameter
2006-10-19 21:28                                     ` Christoph Lameter
2006-10-19 21:43                                     ` Will Schmidt
2006-10-19 21:43                                       ` Will Schmidt
2006-10-19 22:00                                       ` Christoph Lameter
2006-10-19 22:00                                         ` Christoph Lameter
2006-10-19 21:39                                   ` Christoph Lameter
2006-10-19 21:39                                     ` Christoph Lameter
2006-10-19 20:38                             ` Will Schmidt
2006-10-19 20:38                               ` Will Schmidt
2006-10-19 21:30                               ` Christoph Lameter
2006-10-19 21:30                                 ` Christoph Lameter
2006-10-18 16:06                   ` Christoph Lameter
2006-10-18 16:06                     ` Christoph Lameter

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=45391061.7090900@shadowen.org \
    --to=apw@shadowen.org \
    --cc=akpm@osdl.org \
    --cc=anton@samba.org \
    --cc=clameter@sgi.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mel@csn.ul.ie \
    --cc=paulus@samba.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.