public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Problem with no mem_map arg to init functions change?
@ 2004-09-02  5:36 Ian Wienand
  2004-09-02  6:10 ` William Lee Irwin III
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Ian Wienand @ 2004-09-02  5:36 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 2085 bytes --]

On Wed, Sep 01, 2004 at 08:15:10PM -0700, William Lee Irwin III wrote:
> Okay, you're diving into node_alloc_mem_map() when you shouldn't be.

OK, how about a patch like below for a start? node_alloc_mem_map()
calls alloc_bootmem_node() unconditionally, whereas we have already
setup a vmem map in arch/ia64/mm/contig.c:paging_init()

===== mm/page_alloc.c 1.234 vs edited =====
--- 1.234/mm/page_alloc.c       2004-08-27 16:59:59 +10:00
+++ edited/mm/page_alloc.c      2004-09-02 15:21:27 +10:00
@@ -1582,8 +1582,11 @@ void __init node_alloc_mem_map(struct pg
 {
        unsigned long size;

-       size = (pgdat->node_spanned_pages + 1) * sizeof(struct page);
-       pgdat->node_mem_map = alloc_bootmem_node(pgdat, size);
+       if (!pgdat->node_mem_map)
+       {
+               size = (pgdat->node_spanned_pages + 1) * sizeof(struct page);
+               pgdat->node_mem_map = alloc_bootmem_node(pgdat, size);
+       }
 #ifndef CONFIG_DISCONTIGMEM
        mem_map = contig_page_data.node_mem_map;
 #endif
===== arch/ia64/mm/contig.c 1.6 vs edited =====
--- 1.6/arch/ia64/mm/contig.c   2004-08-24 19:08:33 +10:00
+++ edited/arch/ia64/mm/contig.c        2004-09-02 15:33:35 +10:00
@@ -284,7 +284,6 @@ paging_init (void)
                free_area_init_node(0, &contig_page_data, zones_size,
                                    0, zholes_size);

-               mem_map = contig_page_data.node_mem_map;
                printk("Virtual mem_map starts at 0x%p\n", mem_map);
        }
 #else /* !CONFIG_VIRTUAL_MEM_MAP */

It's either that, or in arch/ia64/mm/contig.c:paging_init() finding
some way to set node_page_start_pfn (which will shortcut the test in
node_alloc_mem_map()) by walking the vmem_map?

With this applied, I no longer get the wrong address for the vmem_map
e.g. I get

Virtual mem_map starts at 0xa0007fffc7900000

on boot which is what I expect.  But it still stops with the same
problem :(

Bad page state at free_hot_cold_page (in process 'swapper', page a0007fffc7918d08)
flags:0x0000000000000000 mapping:0000000000000000 mapcount:1 count:0
Backtrace:

-i


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2004-09-03  6:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-02  5:36 Problem with no mem_map arg to init functions change? Ian Wienand
2004-09-02  6:10 ` William Lee Irwin III
2004-09-02  6:21 ` Ian Wienand
2004-09-02 15:05 ` Matthew Wilcox
2004-09-02 15:31 ` Jesse Barnes
2004-09-02 15:33 ` Jesse Barnes
2004-09-02 16:10 ` Randolph Chung
2004-09-02 16:16 ` Jesse Barnes
2004-09-02 17:43 ` Randolph Chung
2004-09-02 18:42 ` William Lee Irwin III
2004-09-03  2:19 ` Ian Wienand
2004-09-03  2:31 ` William Lee Irwin III
2004-09-03  6:09 ` Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox