Re: Problem with no mem_map arg to init functions change?

From: Randolph Chung <tausq_at_debian.org>
Date: 2004-09-03 03:43:19
> Are you creating the whole memmap and then freeing up the holes?  IIRC that's 
> what's done for x86 NUMA boxes, but that won't work if the inital memmap is 
> too big to fit in memory in the first place.

this is what we do:

        for (i = 0; i < npmem_ranges; i++) {
                unsigned long start_pfn;
                unsigned long npages;

                start_pfn = pmem_ranges[i].start_pfn;
                npages = pmem_ranges[i].pages;

                bootmap_size = init_bootmem_node(NODE_DATA(i),
                                                bootmap_pfn,
                                                start_pfn,
                                                (start_pfn + npages) );
                free_bootmem_node(NODE_DATA(i),
                                  (start_pfn << PAGE_SHIFT),
                                  (npages << PAGE_SHIFT) );
                bootmap_pfn += (bootmap_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
                if ((start_pfn + npages) > max_pfn)
                        max_pfn = start_pfn + npages;
        }

we don't do anything explicit with the holes when DISCONTIGMEM is
enabled. when it's not enabled we are able to work with small holes by
using the technique you mentioned above.

randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Sep 2 13:43:31 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:30 EST