Re: [PATCH] mm: allocate section_map for sparse_init

Previous thread: Re: + n_tty-loss-of-sync-following-a-buffer-overflow.patch added to -mm tree by Paul Fulghum on Wednesday, March 12, 2008 - 10:39 am. (4 messages)

Next thread: Re: [opensuse] nfs_update_inode: inode X mode changed, Y to Z by Adam Schrotenboer on Wednesday, March 12, 2008 - 11:06 am. (1 message)
From: Yinghai Lu
Date: Wednesday, March 12, 2008 - 10:51 am

[PATCH] mm: allocate section_map for sparse_init

allocate section_map in bootmem instead of using __initdata.

need to apply it after
        [PATCH] mm: fix boundary checking in free_bootmem_core
        [PATCH] mm: make mem_map allocation continuous.


Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
From: Mel Gorman
Date: Thursday, March 13, 2008 - 4:19 am

Why are you iterating every online node here instead of just calling


-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
--

From: Yinghai Lu
Date: Thursday, March 13, 2008 - 11:02 am

free_bootmem will assume use bdata on NODE_DATA(0).

some cases: four nodes system: only have memory installed for node 1,
and node 3.
alloc_bootmem will loop to get bootmem from node1, because there is no
ram node0, and not NODE_DATA(0) ...

we may update free_bootmem to loop all bdata or all online nodes to
call free_bootmem_core...

YH
--

From: Mel Gorman
Date: Tuesday, March 18, 2008 - 2:41 am

True. The unwritten assumption is that NODE_DATA(0) always has memory

Alternatively, update free_bootmem so that it figures out which node it is
meant to be freeing to based on the PFN of the page currently being freed.

It still doesn't seem right to try freeing on all online nodes as it looks like
free_bootmem_core() should flip bits outside the range of its node_bootmem_map
which could cause tricky bugs.

As things currently stand with bootmem, what you should be doing is using
for_each_online_node() to figure out which node you can allocate from,
remembering that node and calling free_bootmem_node() once. If you fix
free_bootmem() though, you should only need to call free_bootmem() once
in this patch.

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
--

From: Yinghai Lu
Date: Tuesday, March 18, 2008 - 10:57 am

Yes

with the new free_bootmem that loop bdata_list, we can call
free_bootmem.

YH
--

Previous thread: Re: + n_tty-loss-of-sync-following-a-buffer-overflow.patch added to -mm tree by Paul Fulghum on Wednesday, March 12, 2008 - 10:39 am. (4 messages)

Next thread: Re: [opensuse] nfs_update_inode: inode X mode changed, Y to Z by Adam Schrotenboer on Wednesday, March 12, 2008 - 11:06 am. (1 message)