Skip to contentSkip to conversation

Redundant zonelist initialization

DISCUSSION Andi Kleen 2 participants 4 messages May 8, 2003 Memory management

lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

When booting 2.5.69 on a 4 Node CONFIG_DISCONTIGMEM machine I get:

Building zonelist for node : 0
Building zonelist for node : 1
Building zonelist for node : 2
Building zonelist for node : 3
Building zonelist for node : 0
Building zonelist for node : 0
Building zonelist for node : 0
Building zonelist for node : 0

Why does it initialize the zonelist for node 0 five times?

-Andi
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#1 lore raw
Quoted 11 lines · --On Thursday, May 08, 2003 13:23:39 +0200 Andi Kleen <[email protected]> wrote:

When booting 2.5.69 on a 4 Node CONFIG_DISCONTIGMEM machine I get:

Building zonelist for node : 0 Building zonelist for node : 1 Building zonelist for node : 2 Building zonelist for node : 3 Building zonelist for node : 0 Building zonelist for node : 0 Building zonelist for node : 0 Building zonelist for node : 0

Quoted 1 line

Why does it initialize the zonelist for node 0 five times?

Looks like you have numnodes wrong ...

void __init build_all_zonelists(void)

{
        int i;

        for(i = 0 ; i < numnodes ; i++)
                build_zonelists(NODE_DATA(i));
}

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

author
#2 lore raw
Quoted 19 lines · Martin J. Bligh
Quoted 11 lines · --On Thursday, May 08, 2003 13:23:39 +0200 Andi Kleen <[email protected]> wrote:

When booting 2.5.69 on a 4 Node CONFIG_DISCONTIGMEM machine I get:

Building zonelist for node : 0 Building zonelist for node : 1 Building zonelist for node : 2 Building zonelist for node : 3 Building zonelist for node : 0 Building zonelist for node : 0 Building zonelist for node : 0 Building zonelist for node : 0

Quoted 1 line

Why does it initialize the zonelist for node 0 five times?

Looks like you have numnodes wrong ...

Quoted 7 lines

void __init build_all_zonelists(void)

{
        int i;

        for(i = 0 ; i < numnodes ; i++)
                build_zonelists(NODE_DATA(i));
}

Only with new mathematics :-) How can any value for numnodes explain such a sequence ?

I think it actually comes from the two loops calling build_zonelist_node in build_zonelists(). But I'm not sure why it produces such a strange sequence.

-Andi
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#3 lore raw
Quoted 19 lines
Quoted 19 lines
Quoted 11 lines

When booting 2.5.69 on a 4 Node CONFIG_DISCONTIGMEM machine I get:

Building zonelist for node : 0 Building zonelist for node : 1 Building zonelist for node : 2 Building zonelist for node : 3 Building zonelist for node : 0 Building zonelist for node : 0 Building zonelist for node : 0 Building zonelist for node : 0

Quoted 1 line

Why does it initialize the zonelist for node 0 five times?

Looks like you have numnodes wrong ...

void __init build_all_zonelists(void)

{
        int i;
Quoted 6 lines
Quoted 3 lines
        for(i = 0 ; i < numnodes ; i++)
                build_zonelists(NODE_DATA(i));
}

Only with new mathematics :-) How can any value for numnodes explain such a sequence ?

I was thinking of "numnodes = 8", and just screwed up data for the last few. Not quite sure how you'd avoid derefing a NULL ptr though, I guess.

Quoted 2 lines

I think it actually comes from the two loops calling build_zonelist_node in build_zonelists().

I don't see how it can - that printk is before the loops.

static void __init build_zonelists(pg_data_t *pgdat)

{
        int i, j, k, node, local_node;

        local_node = pgdat->node_id;
        printk("Building zonelist for node : %d\n", local_node);
Quoted 1 line

But I'm not sure why it produces such a strange sequence.

Throw a few printks in there, should tell you easily enough. I'll bet you a couple of beers on it being numnodes ;-)

M.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>