lkml.org 
[lkml]   [2008]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [bug] SLUB + mm/slab.c boot crash in -rc9

* Ingo Molnar <mingo@elte.hu> wrote:

> -#if !(NODES_WIDTH > 0 || NODES_SHIFT == 0)
> +#if NODES_WIDTH <= 0 || NODES_SHIFT == 0
> #define NODE_NOT_IN_PAGE_FLAGS
> #endif

Peter "radar eye" Zijlstra noticed an ugly and annoying typo in mm.h:

-#ifdef NODE_NOT_IN_PAGEFLAGS
+#ifdef NODE_NOT_IN_PAGE_FLAGS

but even with the full fix (see below) the same crash remains.

i think getting NODE_NOT_IN_PAGEFLAGS wrong seems to result in
non-optimal but still correct code - by virtue of NODES_MASK ending up
zero.

Ingo

----------------------->
Subject: nodes: shift fix
From: Ingo Molnar <mingo@elte.hu>
Date: Tue Apr 15 21:15:21 CEST 2008

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
include/linux/mm.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux/include/linux/mm.h
===================================================================
--- linux.orig/include/linux/mm.h
+++ linux/include/linux/mm.h
@@ -424,7 +424,7 @@ static inline void set_compound_order(st
* We are going to use the flags for the page to node mapping if its in
* there. This includes the case where there is no node, so it is implicit.
*/
-#if !(NODES_WIDTH > 0 || NODES_SHIFT == 0)
+#if NODES_WIDTH <= 0 || NODES_SHIFT == 0
#define NODE_NOT_IN_PAGE_FLAGS
#endif

@@ -442,7 +442,7 @@ static inline void set_compound_order(st
#define ZONES_PGSHIFT (ZONES_PGOFF * (ZONES_WIDTH != 0))

/* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */
-#ifdef NODE_NOT_IN_PAGEFLAGS
+#ifdef NODE_NOT_IN_PAGE_FLAGS
#define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT)
#define ZONEID_PGOFF ((SECTIONS_PGOFF < ZONES_PGOFF)? \
SECTIONS_PGOFF : ZONES_PGOFF)

\
 
 \ /
  Last update: 2008-04-15 21:45    [W:0.131 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site