Sizing zones and holes in an architecture independent manner V2
Subsystems (5)
cover Sizing zones and holes in an architecture independent manner V2
This is V2 of the patchset. They have been boot tested on x86, ppc64 and x86_64 but I still need to do a double check that zones are the same size before and after the patch on all arches. IA64 passed a basic compile-test. a driver program that fed in the values generated by IA64 to add_active_range(), zone_present_pages_in_node() and zone_absent_pages_in_node() seemed to generate expected values.
Changelog since V1
o Correctly convert virtual and physical addresses to PFNs on ia64
o Correctly convert physical addresses to PFN on older ppc
o When add_active_range() is called with overlapping pfn ranges, merge them
o When a zone boundary occurs within a memory hole, account correctly
o Minor whitespace damage cleanup
o Debugging patch temporarily included
At a basic level, architectures define structures to record where active ranges of page frames are located. Once located, the code to calculate zone sizes and holes in each architecture is very similar. Some of this zone and hole sizing code is difficult to read for no good reason. This set of patches eliminates the similar-looking architecture-specific code.
The patches introduce a mechanism where architectures register where the active ranges of page frames are with add_active_range(). When all areas have been discovered, free_area_init_nodes() is called to initialise the pgdat and zones. The zone sizes and holes are then calculated in an architecture independent manner.
Patch 1 introduces the mechanism for registering and initialising PFN ranges Patch 2 changes ppc to use the mechanism - 128 arch-specific LOC removed Patch 3 changes x86 to use the mechanism - 150 arch-specific LOC removed Patch 4 changes x86_64 to use the mechanism - 34 arch-specific LOC removed Patch 5 changes ia64 to use the mechanism - 57 arch-specific LOC removed
At this point, there is a net reduction of 27 lines of code and the arch-independent code is a lot easier to read in comparison to some of the arch-specific stuff, particularly in arch/i386/ .
For Patch 6, it was also noted that page_alloc.c has a *lot* of initialisation code which makes the file harder to read than it needs to be. Patch 6 creates a new file mem_init.c and moves a lot of initialisation code from page_alloc.c to it. After the patch is applied, there is still a net reduction of 6 lines of code.
The patches have been successfully boot tested on
o x86, flatmem
o x86, NUMAQ
o PPC64, NUMA
o PPC64, CONFIG_NUMA=n
o x86_64, NUMA with SRAT
The patches have been compile tested for ia64 for flatmem and sparsemem configurations. At attempt was made to boot test on an ancient RS/6000 but the vanilla kernel does not boot so I have to investigate there.
The net reduction seems small but the big benefit of this set of patches is the reduction of 380 lines of architecture-specific code, some of which is very hairy. There should be a greater net reduction when other architectures use the same mechanisms for zone and hole sizing but I lack the hardware to test on.
Comments?
Additional credit;
Dave Hansen for the initial suggestion and comments on early patches Andy Whitcroft for reviewing early versions and catching numerous errors Tony Luck and Bob Picco for testing and debugging on IA64
arch/i386/Kconfig | 8 arch/i386/kernel/setup.c | 19 arch/i386/kernel/srat.c | 98 ---- arch/i386/mm/discontig.c | 59 -- arch/ia64/Kconfig | 3 arch/ia64/mm/contig.c | 60 -- arch/ia64/mm/discontig.c | 41 - arch/ia64/mm/init.c | 12 arch/powerpc/Kconfig | 13 arch/powerpc/mm/mem.c | 53 -- arch/powerpc/mm/numa.c | 157 ------ arch/ppc/Kconfig | 3 arch/ppc/mm/init.c | 26 - arch/x86_64/Kconfig | 3 arch/x86_64/kernel/e820.c | 19 arch/x86_64/mm/init.c | 60 -- arch/x86_64/mm/numa.c | 15 include/asm-ia64/meminit.h | 1 include/asm-x86_64/e820.h | 1 include/asm-x86_64/proto.h | 2 include/linux/mm.h | 14 include/linux/mmzone.h | 15 mm/Makefile | 2 mm/mem_init.c | 1014 +++++++++++++++++++++++++++++++++++++++++++++ mm/page_alloc.c | 678 ------------------------------ 25 files changed, 1185 insertions(+), 1191 deletions(-)
Signature · 10 lines
-- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab -- 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>
PATCH 1/7 Introduce mechanism for registering active regions of memory
This patch defines the structure to represent an active range of page frames within a node in an architecture independent manner. Architectures are expected to register active ranges of PFNs using add_active_range(nid, start_pfn, end_pfn) and call free_area_init_nodes() passing the PFNs of the end of each zone.
include/linux/mm.h | 14 + include/linux/mmzone.h | 15 + mm/page_alloc.c | 363 +++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 367 insertions(+), 25 deletions(-)
include/linux/mm.h +14 -0
@@ -867,6 +867,20 @@ extern void free_area_init(unsigned longextern void free_area_init_node (int nid,pg_data_t *pgdat,unsigned long * zones_size,unsigned long zone_start_pfn,unsigned long *zholes_size); +#ifdef CONFIG_ARCH_POPULATES_NODE_MAP +extern void free_area_init_nodes (unsigned long max_dma_pfn, +unsigned long max_dma32_pfn, +unsigned long max_low_pfn, +unsigned long max_high_pfn); +extern void add_active_range (unsigned int nid,unsigned long start_pfn, +unsigned long end_pfn); +extern void get_pfn_range_for_nid (unsigned int nid, +unsigned long *start_pfn,unsigned long *end_pfn); +extern int early_pfn_to_nid (unsigned long pfn); +extern void free_bootmem_with_active_regions (int nid, +unsigned long max_low_pfn); +extern void memory_present_with_active_regions (int nid); +#endif extern void memmap_init_zone (unsigned long ,int ,unsigned long ,unsigned long );extern void setup_per_zone_pages_min (void );extern void mem_init (void );
include/linux/mmzone.h +14 -1
@@ -271,6 +271,18 @@ struct zonelist {struct zone *zones[MAX_NUMNODES *MAX_NR_ZONES +1 ];// NULL delimited }; +#ifdef CONFIG_ARCH_POPULATES_NODE_MAP +/* +* This represents an active range of physical memory. Architectures register +* a pfn range using add_active_range() and later initialise the nodes and +* free list with free_area_init_nodes() +*/ +struct node_active_region { +unsigned long start_pfn; +unsigned long end_pfn; +int nid; +}; +#endif /* CONFIG_ARCH_POPULATES_NODE_MAP */ /* * The pg_data_t structure is used in machines with CONFIG_DISCONTIGMEM
@@ -465,7 +477,8 @@ extern struct zone *next_zone(struct zon#endif -#ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID +#if !defined(CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID ) && \ + !defined(CONFIG_ARCH_POPULATES_NODE_MAP )#define early_pfn_to_nid (nid) (0UL)#endif
mm/page_alloc.c +339 -24
405 lines not on this page · raw message
--
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>
PATCH 2/7 Have Power use add_active_range() and free_area_init_nodes()
In reply to Mel GormanSize zones and holes in an architecture independent manner for Power.
This has been boot tested on PPC64 with NUMA both enabled and disabled. It has been compile tested for an older CHRP-based machine.
powerpc/Kconfig | 13 ++-- powerpc/mm/mem.c | 53 ++++++---------- powerpc/mm/numa.c | 157 ++++--------------------------------------------- ppc/Kconfig | 3 ppc/mm/init.c | 26 ++++---- 5 files changed, 62 insertions(+), 190 deletions(-)
arch/powerpc/Kconfig +9 -4
@@ -665,11 +665,16 @@ config ARCH_SPARSEMEM_DEFAULT def_bool y depends on SMP && PPC_PSERIES -source "mm/Kconfig" - -config HAVE_ARCH_EARLY_PFN_TO_NID +config ARCH_POPULATES_NODE_MAP def_bool y - depends on NEED_MULTIPLE_NODES + +# Value of 256 is MAX_LMB_REGIONS * 2 +config MAX_ACTIVE_REGIONS + int + default 256 + depends on ARCH_POPULATES_NODE_MAP + +source "mm/Kconfig" config ARCH_MEMORY_PROBE def_bool y
arch/powerpc/mm/mem.c +22 -31
85 lines not on this page · raw message
arch/powerpc/mm/numa.c +14 -143
207 lines not on this page · raw message
arch/ppc/Kconfig +3 -0
@@ -949,6 +949,9 @@ config NR_CPUS config HIGHMEM bool "High memory support" +config ARCH_POPULATES_NODE_MAP + def_bool y + source kernel/Kconfig.hz source kernel/Kconfig.preempt source "mm/Kconfig"
arch/ppc/mm/init.c +14 -12
@@ -359,8 +359,7 @@ void __init do_init_bootmem(void)*/ void __init paging_init (void ) { -unsigned long zones_size[MAX_NR_ZONES ], i; - +unsigned long start_pfn, end_pfn;#ifdef CONFIG_HIGHMEM map_page (PKMAP_BASE ,0 ,0 );/* XXX gross */ pkmap_page_table = pte_offset_kernel(pmd_offset(pgd_offset_k
@@ -370,19 +369,22 @@ void __init paging_init(void) (KMAP_FIX_BEGIN), KMAP_FIX_BEGIN), KMAP_FIX_BEGIN); kmap_prot =PAGE_KERNEL ;#endif /* CONFIG_HIGHMEM */ - -/* -* All pages are DMA-able so we put them all in the DMA zone. -*/ - zones_size[ZONE_DMA ] = total_lowmem >>PAGE_SHIFT ; -for (i =1 ; i <MAX_NR_ZONES ; i++) - zones_size[i] =0 ; +/* All pages are DMA-able so we put them all in the DMA zone. */ + start_pfn =__pa (PAGE_OFFSET ) >>PAGE_SHIFT ; + end_pfn = start_pfn + (total_memory >>PAGE_SHIFT ); +add_active_range (0 , start_pfn, end_pfn);#ifdef CONFIG_HIGHMEM - zones_size[ZONE_HIGHMEM ] = (total_memory - total_lowmem) >>PAGE_SHIFT ; +free_area_init_nodes (total_lowmem >>PAGE_SHIFT , + total_lowmem >>PAGE_SHIFT , + total_lowmem >>PAGE_SHIFT , + total_memory >>PAGE_SHIFT ); +#else +free_area_init_nodes (total_memory >>PAGE_SHIFT , + total_memory >>PAGE_SHIFT , + total_memory >>PAGE_SHIFT , + total_memory >>PAGE_SHIFT );#endif /* CONFIG_HIGHMEM */ - -free_area_init (zones_size); }void __init mem_init (void )
--
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>
PATCH 3/7 Have x86 use add_active_range() and free_area_init_nodes
In reply to Mel GormanSize zones and holes in an architecture independent manner for x86.
This has been boot tested on;
x86 with 4 CPUs, flatmem
x86 on NUMAQ
It needs to be boot tested on an x86 machine that uses SRAT.
Kconfig | 8 +--- kernel/setup.c | 19 +++------- kernel/srat.c | 98 ---------------------------------------------------- mm/discontig.c | 59 ++++--------------------------- 4 files changed, 17 insertions(+), 167 deletions(-)
arch/i386/Kconfig +3 -5
@@ -563,12 +563,10 @@ config ARCH_SELECT_MEMORY_MODEL def_bool y depends on ARCH_SPARSEMEM_ENABLE -source "mm/Kconfig" +config ARCH_POPULATES_NODE_MAP + def_bool y -config HAVE_ARCH_EARLY_PFN_TO_NID - bool - default y - depends on NUMA +source "mm/Kconfig" config HIGHPTE bool "Allocate 3rd-level pagetables from highmem"
arch/i386/kernel/setup.c +6 -13
@@ -1156,22 +1156,15 @@ static unsigned long __init setup_memoryvoid __init zone_sizes_init (void ) { -unsigned long zones_size[MAX_NR_ZONES ] = {0 ,0 ,0 }; -unsigned int max_dma, low; +unsigned int max_dma; +#ifndef CONFIG_HIGHMEM +unsigned long highend_pfn = max_low_pfn; +#endif max_dma =virt_to_phys ((char *)MAX_DMA_ADDRESS ) >>PAGE_SHIFT ; - low = max_low_pfn; -if (low < max_dma) - zones_size[ZONE_DMA ] = low; -else { - zones_size[ZONE_DMA ] = max_dma; - zones_size[ZONE_NORMAL ] = low - max_dma; -#ifdef CONFIG_HIGHMEM - zones_size[ZONE_HIGHMEM ] = highend_pfn - low; -#endif - } -free_area_init (zones_size); +add_active_range (0 ,0 , highend_pfn); +free_area_init_nodes (max_dma, max_dma, max_low_pfn, highend_pfn); }#else extern unsigned long __init setup_memory (void );
arch/i386/kernel/srat.c +0 -98
119 lines not on this page · raw message
arch/i386/mm/discontig.c +8 -51
74 lines not on this page · raw message
--
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>
PATCH 4/7 Have x86_64 use add_active_range() and free_area_init_nodes
In reply to Mel GormanSize zones and holes in an architecture independent manner for x86_64.
This has only been boot tested on an x86_64 with NUMA and SRAT.
arch/x86_64/Kconfig | 3 ++ arch/x86_64/kernel/e820.c | 19 ++++++++++++ arch/x86_64/mm/init.c | 60 +--------------------------------------- arch/x86_64/mm/numa.c | 15 +++++----- include/asm-x86_64/e820.h | 1 include/asm-x86_64/proto.h | 2 - 6 files changed, 33 insertions(+), 67 deletions(-)
arch/x86_64/Kconfig +3 -0
@@ -73,6 +73,9 @@ config ARCH_MAY_HAVE_PC_FDC bool default y +config ARCH_POPULATES_NODE_MAP + def_bool y + config DMI bool default y
arch/x86_64/kernel/e820.c +19 -0
@@ -220,6 +220,25 @@ e820_hole_size(unsigned long start_pfn,return ((end - start) - ram) >>PAGE_SHIFT ; } +/* Walk the e820 map and register active regions */ +unsigned long __init +e820_register_active_regions (void ) +{ +int i; +unsigned long start_pa, end_pa; +for (i =0 ; i < e820.nr_map; i++) { +struct e820entry *ei = &e820.map[i]; +if (ei->type !=E820_RAM ) +continue ; + + start_pa =round_up (ei->addr,PAGE_SIZE ); + end_pa =round_down (ei->addr + ei->size,PAGE_SIZE ); + +add_active_range (0 , start_pa >>PAGE_SHIFT , + end_pa >>PAGE_SHIFT ); + } +} +/* * Mark e820 reserved areas as busy for the resource manager. */
arch/x86_64/mm/init.c +2 -58
71 lines not on this page · raw message
arch/x86_64/mm/numa.c +8 -7
@@ -149,13 +149,12 @@ void __init setup_node_bootmem(int nodeivoid __init setup_node_zones (int nodeid) {unsigned long start_pfn, end_pfn, memmapsize, limit; -unsigned long zones[MAX_NR_ZONES ]; -unsigned long holes[MAX_NR_ZONES ]; start_pfn =node_start_pfn (nodeid); end_pfn =node_end_pfn (nodeid); +add_active_range (nodeid, start_pfn, end_pfn); -Dprintk (KERN_INFO "Setting up node %d %lx-%lx\n" , +Dprintk (KERN_INFO "Setting up memmap for node %d %lx-%lx\n" , nodeid, start_pfn, end_pfn);/* Try to allocate mem_map at end to not fill up precious <4GB
@@ -167,10 +166,6 @@ void __init setup_node_zones(int nodeid) memmapsize,SMP_CACHE_BYTES ,round_down (limit - memmapsize,PAGE_SIZE ), limit); - -size_zones (zones, holes, start_pfn, end_pfn); -free_area_init_node (nodeid,NODE_DATA (nodeid), zones, - start_pfn, holes); }void __init numa_init_array (void )
@@ -312,12 +307,18 @@ static void __init arch_sparse_init(voidvoid __init paging_init (void ) {int i; +unsigned long max_normal_pfn =0 ;arch_sparse_init ();for_each_online_node (i) {setup_node_zones (i); +if (max_normal_pfn <node_end_pfn (i)) + max_normal_pfn =node_end_pfn (i); } + +free_area_init_nodes (MAX_DMA_PFN ,MAX_DMA32_PFN , max_normal_pfn, + max_normal_pfn); }/* [numa=off] */
include/asm-x86_64/e820.h +1 -0
@@ -53,6 +53,7 @@ extern void e820_bootmem_free(pg_data_textern void e820_setup_gap (void );extern unsigned long e820_hole_size (unsigned long start_pfn,unsigned long end_pfn); +extern unsigned long e820_register_active_regions (void );extern void __init parse_memopt (char *p,char **end);extern void __init parse_memmapopt (char *p,char **end);
include/asm-x86_64/proto.h +0 -2
@@ -24,8 +24,6 @@ extern void mtrr_bp_init(void);#define mtrr_bp_init () do {} while (0)#endif extern void init_memory_mapping (unsigned long start,unsigned long end); -extern void size_zones (unsigned long *z,unsigned long *h, -unsigned long start_pfn,unsigned long end_pfn);extern void system_call (void );extern int kernel_syscall (void );
--
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>
PATCH 5/7 Have ia64 use add_active_range() and free_area_init_nodes
In reply to Mel GormanSize zones and holes in an architecture independent manner for ia64.
This has only been compile-tested due to lack of a suitable test machine.
arch/ia64/Kconfig | 3 ++ arch/ia64/mm/contig.c | 60 +++++----------------------------------- arch/ia64/mm/discontig.c | 41 ++++----------------------- arch/ia64/mm/init.c | 12 ++++++++ include/asm-ia64/meminit.h | 1 5 files changed, 30 insertions(+), 87 deletions(-)
arch/ia64/Kconfig +3 -0
@@ -352,6 +352,9 @@ config NUMA Access). This option is for configuring high-end multiprocessor server systems. If in doubt, say N. +config ARCH_POPULATES_NODE_MAP + def_bool y + # VIRTUAL_MEM_MAP and FLAT_NODE_MEM_MAP are functionally equivalent. # VIRTUAL_MEM_MAP has been retained for historical reasons. config VIRTUAL_MEM_MAP
arch/ia64/mm/contig.c +8 -52
102 lines not on this page · raw message
arch/ia64/mm/discontig.c +6 -35
67 lines not on this page · raw message
arch/ia64/mm/init.c +12 -0
@@ -539,6 +539,18 @@ find_largest_hole (u64 start, u64 end, v last_end = end;return 0 ; } + +int __init +register_active_ranges (u64 start,u64 end,void *nid) +{ +BUG_ON (nid ==NULL ); +BUG_ON (*(unsigned long *)nid >=MAX_NUMNODES ); + +add_active_range (*(unsigned long *)nid, +__pa (start) >>PAGE_SHIFT , +__pa (end) >>PAGE_SHIFT ); +return 0 ; +}#endif /* CONFIG_VIRTUAL_MEM_MAP */ static int __init
include/asm-ia64/meminit.h +1 -0
@@ -56,6 +56,7 @@ extern void efi_memmap_init(unsigned lonextern unsigned long vmalloc_end;extern struct page *vmem_map;extern int find_largest_hole (u64 start,u64 end,void *arg); +extern int register_active_ranges (u64 start,u64 end,void *arg);extern int create_mem_map_page_table (u64 start,u64 end,void *arg);#endif
--
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>
PATCH 6/7 Break out memory initialisation code from page_alloc.c to mem_init.c
In reply to Mel Gormanpage_alloc.c contains a large amount of memory initialisation code. This patch breaks out the initialisation code to a separate file to make page_alloc.c a bit easier to read.
Makefile | 2 mem_init.c | 1014 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ page_alloc.c | 993 ---------------------------------------------------- 3 files changed, 1015 insertions(+), 994 deletions(-)
mm/Makefile +1 -1
@@ -8,7 +8,7 @@ mmu-$(CONFIG_MMU) := fremap.o highmem.o vmalloc.o obj-y := bootmem.o filemap.o mempool.o oom_kill.o fadvise.o \ - page_alloc.o page-writeback.o pdflush.o \ + page_alloc.o mem_init.o page-writeback.o pdflush.o \ readahead.o swap.o truncate.o vmscan.o \ prio_tree.o util.o mmzone.o $(mmu-y)
mm/mem_init.c +1014 -0
1,014 lines not on this page · raw message
mm/page_alloc.c +0 -993
1,028 lines not on this page · raw message
--
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>
PATCH 7/7 Print out debugging information during initialisation
In reply to Mel GormanThe zone and hole sizing code is new and unexpected problems showed up on machines that were not covered by the pre-release tests. This patch prints out useful information when those unexpected situations occur.
It is not expected that this patch become a permanent part of the set.
mem_init.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 46 insertions(+), 4 deletions(-)
mm/mem_init.c +46 -4
@@ -645,13 +645,23 @@ void __init free_bootmem_with_active_regfor_each_active_range_index_in_nid (i, nid) {unsigned long size_pages =0 ;unsigned long end_pfn = early_node_map[i].end_pfn; -if (early_node_map[i].start_pfn >= max_low_pfn) +if (early_node_map[i].start_pfn >= max_low_pfn) { +printk ("start_pfn %lu >= %lu\n" , early_node_map[i].start_pfn, + max_low_pfn);continue ; + } -if (end_pfn > max_low_pfn) +if (end_pfn > max_low_pfn) { +printk ("end_pfn %lu going back to %lu\n" , early_node_map[i].end_pfn, + max_low_pfn); end_pfn = max_low_pfn; + } size_pages = end_pfn - early_node_map[i].start_pfn; +printk ("free_bootmem_node(%d, %lu, %lu)\n" , + early_node_map[i].nid, +PFN_PHYS (early_node_map[i].start_pfn), +PFN_PHYS (size_pages));free_bootmem_node (NODE_DATA (early_node_map[i].nid),PFN_PHYS (early_node_map[i].start_pfn),PFN_PHYS (size_pages));
@@ -661,10 +671,15 @@ void __init free_bootmem_with_active_regvoid __init memory_present_with_active_regions (int nid) {unsigned int i; -for_each_active_range_index_in_nid (i, nid) +for_each_active_range_index_in_nid (i, nid) { +printk ("memory_present(%d, %lu, %lu)\n" , + early_node_map[i].nid, + early_node_map[i].start_pfn, + early_node_map[i].end_pfn);memory_present (early_node_map[i].nid, early_node_map[i].start_pfn, early_node_map[i].end_pfn); + } } void __init get_pfn_range_for_nid(unsigned int nid,
@@ -738,10 +753,17 @@ unsigned long __init zone_absent_pages_i start_pfn = early_node_map[i].start_pfn;if (start_pfn > arch_zone_highest_possible_pfn[zone_type]) start_pfn = arch_zone_highest_possible_pfn[zone_type]; -BUG_ON (prev_end_pfn > start_pfn); +if (prev_end_pfn > start_pfn) { +printk ("prev_end > start_pfn : %lu > %lu\n" , + prev_end_pfn, + start_pfn); +BUG (); + }/* Update the hole size cound and move on */ hole_pages += start_pfn - prev_end_pfn; +printk ("Hole found index %d: %lu -> %lu\n" , + i, prev_end_pfn, start_pfn); prev_end_pfn = early_node_map[i].end_pfn; }
@@ -892,6 +914,9 @@ void __init add_active_range(unsigned in {unsigned int i; +printk ("add_active_range(%d, %lu, %lu): " , + nid, start_pfn, end_pfn); +/* Merge with existing active regions if possible */ for (i =0 ; early_node_map[i].end_pfn; i++) {if (early_node_map[i].nid != nid)
@@ -900,6 +925,7 @@ void __init add_active_range(unsigned in/* Merge forward if suitable */ if (start_pfn <= early_node_map[i].end_pfn && end_pfn > early_node_map[i].end_pfn) { +printk ("Merging forward\n" ); early_node_map[i].end_pfn = end_pfn;return ; }
@@ -907,6 +933,7 @@ void __init add_active_range(unsigned in/* Merge backward if suitable */ if (start_pfn < early_node_map[i].end_pfn && end_pfn >= early_node_map[i].start_pfn) { +printk ("Merging backwards\n" ); early_node_map[i].start_pfn = start_pfn;return ; }
@@ -922,6 +949,7 @@ void __init add_active_range(unsigned inreturn ; } +printk ("New\n" ); early_node_map[i].nid = nid; early_node_map[i].start_pfn = start_pfn; early_node_map[i].end_pfn = end_pfn;
@@ -951,6 +979,14 @@ static void __init sort_node_map(void)sort (early_node_map, num,sizeof (struct node_active_region ), cmp_node_active_region,NULL ); + +printk ("Dumping sorted node map\n" ); +for (num =0 ; early_node_map[num].end_pfn; num++) { +printk ("entry %lu: %d %lu -> %lu\n" , num, + early_node_map[num].nid, + early_node_map[num].start_pfn, + early_node_map[num].end_pfn); + } }unsigned long __init find_min_pfn (void )
@@ -988,6 +1024,10 @@ void __init free_area_init_nodes(unsigne {unsigned long nid; +printk ("free_area_init_nodes(%lu, %lu, %lu, %lu)\n" , + arch_max_dma_pfn, arch_max_dma32_pfn, + arch_max_low_pfn, arch_max_high_pfn); +/* Record where the zone boundaries are */ memset (arch_zone_lowest_possible_pfn,0 ,sizeof (arch_zone_lowest_possible_pfn));
@@ -1002,6 +1042,8 @@ void __init free_area_init_nodes(unsigne arch_zone_lowest_possible_pfn[ZONE_HIGHMEM ] = arch_max_low_pfn; arch_zone_highest_possible_pfn[ZONE_HIGHMEM ] = arch_max_high_pfn; +printk ("free_area_init_nodes(): find_min_pfn = %lu\n" ,find_min_pfn ()); +/* Regions in the early_node_map can be in any order */ sort_node_map ();
--
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>
Quoted 6 lines · Mel Gorman
This is V2 of the patchset. They have been boot tested on x86, ppc64 and
x86_64but I still need to do a double check that zones are the same size before and after the patch on all arches. IA64 passed a basic compile-test. a driver program that fed in the values generated by IA64 toadd_active_range(),zone_present_pages_in_node()andzone_absent_pages_in_node()seemed to generate expected values.
For x86-64 the new code seems far more complicated than the old one and keeps the same information in two places now. I have my doubts that is really a improvement over the old state.
I think it would be better if you just defined some simple "library functions" that can be called from the architecture specific code instead of adding all this new high level code.
-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>
Quoted 10 lines · Andi Kleen
Quoted 6 lines · Mel Gorman
This is V2 of the patchset. They have been boot tested on x86, ppc64 and
x86_64but I still need to do a double check that zones are the same size before and after the patch on all arches. IA64 passed a basic compile-test. a driver program that fed in the values generated by IA64 toadd_active_range(),zone_present_pages_in_node()andzone_absent_pages_in_node()seemed to generate expected values.For x86-64 the new code seems far more complicated than the old one and keeps the same information in two places now.
I experimented with the idea of all architectures sharing the struct node_active_region rather than storing the information twice. It got very messy, particularly for x86 because it needs to store more than nid, start_pfn and end_pfn for a range of page frames (see node_memory_chunk_s in arch/i386/kernel/srat.c). Worse, some architecture-specific code remembers the ranges of active memory as addresses and others as pfn's. In the end, I was not too worried about having the information in two places, because the active ranges are kept in __initdata and gets freed.
I'll admit that for x86_64, the entire code path for initialisation (i.e. architecture specific and architecture independent paths) is now more complex. The architecture independent code needed to be able to handle every variety of node layout which is overkill for x86_64. Nevertheless, without size_zones(), I thought the architecture-specific code for x86_64 memory initialisation was a bit easier to read. With architecture-independent zone size and hole calculation, you only have to understand the relevant code once, not once for each architecture.
Quoted 2 lines
I have my doubts that is really a improvement over the old state.
For x86_64 in isolation or the entire set of patches?
Quoted 4 lines
I think it would be better if you just defined some simple "library functions" that can be called from the architecture specific code instead of adding all this new high level code.
What sort of library functions would you recommend? x86_64 uses add_active_range() and free_area_init_nodes() from this patchset which seemed fairly straight-forward.
Signature · 9 lines
Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab -- 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>
Quoted 8 lines · Mel Gorman
I experimented with the idea of all architectures sharing the struct
node_active_regionrather than storing the information twice. It got very messy, particularly for x86 because it needs to store more than nid,start_pfnandend_pfnfor a range of page frames (seenode_memory_chunk_sinarch/i386/kernel/srat.c). Worse, some architecture-specific code remembers the ranges of active memory as addresses and others as pfn's. In the end, I was not too worried about having the information in two places, because the active ranges are kept in__initdataand gets freed.
The problem is not memory consumption but complexity of code/data structures. Keeping information in two places is usually a good cue that something is wrong. This code is also fragile and hard to test.
Quoted 8 lines
I'll admit that for
x86_64, the entire code path for initialisation (i.e. architecture specific and architecture independent paths) is now more complex. The architecture independent code needed to be able to handle every variety of node layout which is overkill forx86_64. Nevertheless, withoutsize_zones(), I thought the architecture-specific code forx86_64memory initialisation was a bit easier to read. With architecture-independent zone size and hole calculation, you only have to understand the relevant code once, not once for each architecture.
I think i386 SRAT NUMA should be just removed at some point - it never worked all that well and is quite complicated. That leaves IA64, x86-64 and ppc64. I suspect keeping the code there near their low level data structures is better.
Quoted 4 lines
Quoted 2 lines
I have my doubts that is really a improvement over the old state.
For
x86_64in isolation or the entire set of patches?
For x86-64/i386. I haven't read the other architectures.
Quoted 8 lines
Quoted 4 lines
I think it would be better if you just defined some simple "library functions" that can be called from the architecture specific code instead of adding all this new high level code.
What sort of library functions would you recommend?
x86_64usesadd_active_range()andfree_area_init_nodes()from this patchset which seemed fairly straight-forward.
e.g. a generic size_zones(). Possibly some others.
-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>
Quoted 3 lines · Andi Kleen
The problem is not memory consumption but complexity of code/data structures. Keeping information in two places is usually a good cue that something is wrong. This code is also fragile and hard to test.
Part of the motivation for these patches is that we really duplicate a lot of functionality across architectures. For instance, on x86, we have limit_regions() to fiddle with the e820 or efi tables to make them look right after a mem= on the command-line.
We end up doing the same kind of fiddling on powerpc, but on LMBs, instead. This code is error-prone, and every one of these implementations gets it wrong. I believe I've seen and fixed bugs in at least two of them. Add in NUMA things or hotplug boot-time zone sizing, and you get an even worse mess.
The motivation for Mel's patches is to keep the architectures from getting it wrong. If we let them do it themselves, they _will_ get it wrong, and any bugfixes will not help anybody else.
If we do it in common code, we will certainly have bugs for a while. By sharing code, we narrow the bugs down to one place, and only have to fix them once.
-- Dave "guy who hates the same bugs in many arches" Hansen
--
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>
Quoted 11 lines · Andi Kleen
Quoted 8 lines · Mel Gorman
I experimented with the idea of all architectures sharing the struct
node_active_regionrather than storing the information twice. It got very messy, particularly for x86 because it needs to store more than nid,start_pfnandend_pfnfor a range of page frames (seenode_memory_chunk_sinarch/i386/kernel/srat.c). Worse, some architecture-specific code remembers the ranges of active memory as addresses and others as pfn's. In the end, I was not too worried about having the information in two places, because the active ranges are kept in__initdataand gets freed.
Quoted 1 line
The problem is not memory consumption but complexity of code/data structures.
The architecture-independent code is simpler than i386's SRAT messing, about the same complexity as ppcs dealings with LMB (in fact, much of the code is lifted from ppc) and comparable in complexity to what IA64 does. For x86_64, there is less architecture-specific code that has to be understood.
Quoted 3 lines
Keeping information in two places is usually a good cue that something is wrong. This code is also fragile and hard to test.
At minimum, it requires a boot test - not that massive a burden. For the active, a look at the value of the zones before and after the patches.
To test architectures that register PFNs in unexpected ways that I don't have a test machine for (like IA64), I wrote the attached test program. It was a simply case of
1. Few #defines to pretend it's compiled in-kernel
2. Cut and paste from the architecture-independent code in mem_init.c to the driver program
3. Pass in sample input from main() and see what pops out
It caught a number of simple bugs (including one this morning) without having to even boot a machine. The same type of testing is hard with the architecture specific code. This is sample output of the driver program handing PFN ranges supplied by IA64;
mel@joshua:~/tmp$ gcc driver_test.c -o driver_test && ./driver_test | grep -v "active with no" Stage 1: Registering active ranges add_active_range(0, 0, 4096): New add_active_range(0, 0, 131072): Merging forward add_active_range(0, 0, 131072): Merging backwards add_active_range(0, 393216, 523264): New add_active_range(0, 393216, 523264): Merging backwards add_active_range(0, 393216, 524288): Merging forward add_active_range(0, 393216, 524288): Merging backwards
Stage 2: Calculating zone sizes and holes
Hole found zone 1 index 1: 131072 -> 393216
Stage 3: Dumping zone sizes and holes
zone_size[0][0] = 131020 zone_holes[0][0] = 0
zone_size[0][1] = 393268 zone_holes[0][1] = 262144
Stage 4: Printing present pages
On node 0, 262144 pages
zone 0 present_pages = 131020
zone 1 present_pages = 131124
So, testing is not that hard.
How is the code fragile? Even *if* it is fragile, it only has to be fixed once to benefit any architecture using the code path.
Quoted 10 lines
Quoted 8 lines
I'll admit that for
x86_64, the entire code path for initialisation (i.e. architecture specific and architecture independent paths) is now more complex. The architecture independent code needed to be able to handle every variety of node layout which is overkill forx86_64. Nevertheless, withoutsize_zones(), I thought the architecture-specific code forx86_64memory initialisation was a bit easier to read. With architecture-independent zone size and hole calculation, you only have to understand the relevant code once, not once for each architecture.
Quoted 2 lines
I think i386 SRAT NUMA should be just removed at some point - it never worked all that well and is quite complicated.
Assuming you mean the code, are these patches not a readable replacement?
Quoted 4 lines
That leaves IA64, x86-64
and ppc64. I suspect keeping the code there near their low level data structures is better.
For PPC64, the architecture-independent representation *is* the only copy (which is why 128 arch-specific LOC were deleted for ppc including a stryct init_node_data array of nids, start_pfns and end_pfns). IA64's low level representation uses addresses, not pfns, so having only one copy would be a very invasive patch which is not a good idea without a test box.
In many cases, the low-level representation between architectures is similar. The representation I use is the common elements all the architectures need - nid, start_pfn, end_pfn.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I have my doubts that is really a improvement over the old state.
For
x86_64in isolation or the entire set of patches?For x86-64/i386. I haven't read the other architectures.
ok.
Quoted 11 lines
Quoted 8 lines
Quoted 4 lines
I think it would be better if you just defined some simple "library functions" that can be called from the architecture specific code instead of adding all this new high level code.
What sort of library functions would you recommend?
x86_64usesadd_active_range()andfree_area_init_nodes()from this patchset which seemed fairly straight-forward.e.g. a generic
size_zones(). Possibly some others.
For a generic size_zones(), one would need an architecture independent way to pass in active page frame ranges and what node they are on. So we end up with code very similar to what I've posted.
Signature · 3 lines
Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define ZONE_DMA 0
#define ZONE_NORMAL 1
#define printk(x, args...) printf(x, ## args)
#define BUG(x) do { printf("BUG AT %d\n", __LINE__); } while (0) #define BUG_ON(x) do { if (x) BUG(); } while (0) #define __init
#define __initdata
#define KERN_WARNING
#define KERN_ERR
#define MAX_NR_NODES 32
#define MAX_NR_ZONES 5
struct node_active_region {
unsigned long start_pfn;
unsigned long end_pfn;
int nid;
};#define MAX_ACTIVE_REGIONS (MAX_NR_NODES * MAX_NR_ZONES) struct node_active_region __initdata early_node_map[MAX_ACTIVE_REGIONS]; unsigned long __initdata arch_zone_lowest_possible_pfn[MAX_NR_ZONES]; unsigned long __initdata arch_zone_highest_possible_pfn[MAX_NR_ZONES];
static int __init first_active_region_index_in_nid(int nid)
{
int i;
for (i = 0; early_node_map[i].end_pfn; i++) {
if (early_node_map[i].nid == nid)
return i;
}
return MAX_ACTIVE_REGIONS;
}static int __init next_active_region_index_in_nid(unsigned int index, int nid)
{
for (index = index + 1; early_node_map[index].end_pfn; index++) {
if (early_node_map[index].nid == nid)
return index;
}
return MAX_ACTIVE_REGIONS;
}#ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
int __init early_pfn_to_nid(unsigned long pfn)
{
int i;
for (i = 0; early_node_map[i].end_pfn; i++) {
unsigned long start_pfn = early_node_map[i].start_pfn;
unsigned long end_pfn = early_node_map[i].end_pfn;
if ((start_pfn <= pfn) && (pfn < end_pfn))
return early_node_map[i].nid;
}
return -1;
}#endif
#define for_each_active_range_index_in_nid(i, nid) \ for (i = first_active_region_index_in_nid(nid); \ i != MAX_ACTIVE_REGIONS; \ i = next_active_region_index_in_nid(i, nid))
void __init get_pfn_range_for_nid(unsigned int nid,
unsigned long *start_pfn, unsigned long *end_pfn)
{
unsigned int i;
*start_pfn = -1UL;
*end_pfn = 0;
for_each_active_range_index_in_nid(i, nid) {
if (early_node_map[i].start_pfn < *start_pfn)
*start_pfn = early_node_map[i].start_pfn;
if (early_node_map[i].end_pfn > *end_pfn)
*end_pfn = early_node_map[i].end_pfn;
}
if (*start_pfn == -1UL) {
printk(KERN_WARNING "Node %u active with no memory\n", nid);
*start_pfn = 0;
}
}unsigned long __init zone_present_pages_in_node(int nid,
unsigned long zone_type, unsigned long *ignored)
{
unsigned long node_start_pfn, node_end_pfn;
unsigned long zone_start_pfn, zone_end_pfn;
/* Get the start and end of the node and zone */
get_pfn_range_for_nid(nid, &node_start_pfn, &node_end_pfn);
zone_start_pfn = arch_zone_lowest_possible_pfn[zone_type];
zone_end_pfn = arch_zone_highest_possible_pfn[zone_type];
/* Check that this node has pages within the zone's required range */
if (zone_end_pfn < node_start_pfn || zone_start_pfn > node_end_pfn)
return 0;
/* Move the zone boundaries inside the node if necessary */
if (zone_end_pfn > node_end_pfn)
zone_end_pfn = node_end_pfn;
if (zone_start_pfn < node_start_pfn)
zone_start_pfn = node_start_pfn;
/* Return the spanned pages */
return zone_end_pfn - zone_start_pfn;
}unsigned long __init zone_absent_pages_in_node(int nid,
unsigned long zone_type, unsigned long *ignored)
{
int i = 0;
unsigned long prev_end_pfn = 0, hole_pages = 0;
unsigned long start_pfn;
/* Find the end_pfn of the first active range of pfns in the node */
i = first_active_region_index_in_nid(nid);
prev_end_pfn = early_node_map[i].start_pfn;
/* Find all holes for the zone within the node */
for (; i != MAX_ACTIVE_REGIONS;
i = next_active_region_index_in_nid(i, nid)) {
/* No need to continue if prev_end_pfn is outside the zone */
if (prev_end_pfn >= arch_zone_highest_possible_pfn[zone_type])
break;
/* Make sure the end of the zone is not within the hole */
start_pfn = early_node_map[i].start_pfn;
if (start_pfn > arch_zone_highest_possible_pfn[zone_type])
start_pfn = arch_zone_highest_possible_pfn[zone_type];
if (prev_end_pfn > start_pfn) {
printk("prev_end > start_pfn : %lu > %lu\n",
prev_end_pfn,
start_pfn);
BUG();
}
/* Update the hole size cound and move on */
if (start_pfn > arch_zone_lowest_possible_pfn[zone_type]) {
hole_pages += start_pfn - prev_end_pfn;
printk("Hole found zone %lu index %d: %lu -> %lu\n",
zone_type, i, prev_end_pfn, start_pfn);
}
prev_end_pfn = early_node_map[i].end_pfn;
}
return hole_pages;
}void __init add_active_range(unsigned int nid, unsigned long start_pfn,
unsigned long end_pfn)
{
unsigned int i;
printk("add_active_range(%d, %lu, %lu): ",
nid, start_pfn, end_pfn);
/* Merge with existing active regions if possible */
for (i = 0; early_node_map[i].end_pfn; i++) {
if (early_node_map[i].nid != nid)
continue;
/* Merge forward if suitable */
if (start_pfn <= early_node_map[i].end_pfn &&
end_pfn > early_node_map[i].end_pfn) {
printk("Merging forward\n");
early_node_map[i].end_pfn = end_pfn;
return;
}
/* Merge backward if suitable */
if (start_pfn < early_node_map[i].end_pfn &&
end_pfn >= early_node_map[i].start_pfn) {
printk("Merging backwards\n");
early_node_map[i].start_pfn = start_pfn;
return;
}
}
/*
* Leave last entry NULL so we dont iterate off the end (we use
* entry.end_pfn to terminate the walk).
*/
if (i >= MAX_ACTIVE_REGIONS - 1) {
printk(KERN_ERR "WARNING: too many memory regions in "
"numa code, truncating\n");
return;
}
printk("New\n");
early_node_map[i].nid = nid;
early_node_map[i].start_pfn = start_pfn;
early_node_map[i].end_pfn = end_pfn;
}unsigned long __init find_min_pfn(void)
{
int i;
unsigned long min_pfn = -1UL;
for (i = 0; early_node_map[i].end_pfn; i++) {
if (early_node_map[i].start_pfn < min_pfn)
min_pfn = early_node_map[i].start_pfn;
}
return min_pfn;
}/* Find the lowest pfn in a node. This depends on a sorted early_node_map */ unsigned long __init find_start_pfn_for_node(unsigned long nid)
{
int i;
/* Assuming a sorted map, the first range found has the starting pfn */
for_each_active_range_index_in_nid(i, nid) {
return early_node_map[i].start_pfn;
}
/* nid does not exist in early_node_map */
printk(KERN_WARNING "Could not find start_pfn for node %lu\n", nid);
return 0;
}int main()
{
unsigned long zone_size[MAX_NR_NODES][MAX_NR_ZONES];
unsigned long zone_holes[MAX_NR_NODES][MAX_NR_ZONES];
unsigned long node_present[MAX_NR_NODES];
unsigned long start_pfn, end_pfn;
int i, j;
/* init */
memset(early_node_map, 0, sizeof(early_node_map));
memset(zone_size, 0, sizeof(zone_size));
memset(zone_holes, 0, sizeof(zone_holes));
memset(node_present, 0, sizeof(node_present));
printk("Stage 1: Registering active ranges\n");
/* Test Case: IA64 flatmem with VIRT_MEM_MAP=y */
/*
add_active_range(0, 1024, 130688);
add_active_range(0, 130984, 131020);
add_active_range(0, 393216, 524164);
add_active_range(0, 524192, 524269);
*/
/* Test Case: IA64 generic kernel */
add_active_range(0, 0, 4096);
add_active_range(0, 0, 131072);
add_active_range(0, 0, 131072);
add_active_range(0, 393216, 523264);
add_active_range(0, 393216, 523264);
add_active_range(0, 393216, 524288);
add_active_range(0, 393216, 524288);
/* Test Case: Simple PPC64 LMB */
/*
add_active_range(0, 0, 100);
add_active_range(0, 100, 200);
add_active_range(0, 200, 300);
add_active_range(1, 1000, 2000);
add_active_range(1, 500, 1000);
*/
/* Test Case: PPC64 with interleving nodes and holes*/
/*
add_active_range(0, 0, 100);
add_active_range(0, 200, 300);
add_active_range(1, 100, 200);
add_active_range(0, 500, 1000);
*/
/* IA64 zone pfn ranges */
arch_zone_lowest_possible_pfn[ZONE_DMA] = 0;
arch_zone_highest_possible_pfn[ZONE_DMA] = 131020;
arch_zone_lowest_possible_pfn[ZONE_NORMAL] = arch_zone_highest_possible_pfn[ZONE_DMA];
arch_zone_highest_possible_pfn[ZONE_NORMAL] = 800000;
/* PPC64 zone pfn ranges */
/*
arch_zone_lowest_possible_pfn[ZONE_DMA] = 0;
arch_zone_highest_possible_pfn[ZONE_DMA] = 131020;
*/
printf("\nStage 2: Calculating zone sizes and holes\n");
for (i = 0; i < MAX_NR_NODES; i++) {
for (j = 0; j < MAX_NR_ZONES; j++) {
zone_size[i][j] = zone_present_pages_in_node(i, j, NULL);
zone_holes[i][j] = zone_absent_pages_in_node(i, j, NULL);
node_present[i] += zone_size[i][j];
node_present[i] -= zone_holes[i][j];
}
}
printf("\nStage 3: Dumping zone sizes and holes\n");
for (i = 0; i < MAX_NR_NODES; i++) {
if (!node_present[i])
continue;
for (j = 0; j < MAX_NR_ZONES; j++) {
if (!zone_size[i][j])
continue;
printf("zone_size[%d][%d] = %8lu zone_holes[%d][%d] = %8lu\n",
i, j, zone_size[i][j], i, j, zone_holes[i][j]);
}
}
printf("\nStage 4: Printing present pages\n");
for (i = 0; i < MAX_NR_NODES; i++) {
if (!node_present[i])
continue;
printf("On node %d, %lu pages\n", i, node_present[i]);
for (j = 0; j < MAX_NR_ZONES; j++) {
if (!zone_size[i][j])
continue;
printf(" zone %d present_pages = %lu\n", j,
zone_size[i][j] - zone_holes[i][j]);
}
}
}On (13/04/06 00:20), Mel Gorman didst pronounce:
Quoted 6 lines
This is V2 of the patchset. They have been boot tested on x86, ppc64 and
x86_64but I still need to do a double check that zones are the same size before and after the patch on all arches. IA64 passed a basic compile-test. a driver program that fed in the values generated by IA64 toadd_active_range(),zone_present_pages_in_node()andzone_absent_pages_in_node()seemed to generate expected values.
I didn't look at the test program output carefully enough! There was a double counting of some holes because of a missing "if" - obvious in the morning. Fix is this (applies on top of the debugging patch)
mm/mem_init.c +5 -3
@@ -761,9 +761,11 @@ unsigned long __init zone_absent_pages_i }/* Update the hole size cound and move on */ - hole_pages += start_pfn - prev_end_pfn; -printk ("Hole found index %d: %lu -> %lu\n" , - i, prev_end_pfn, start_pfn); +if (start_pfn > arch_zone_lowest_possible_pfn[zone_type]) { + hole_pages += start_pfn - prev_end_pfn; +printk ("Hole found index %d: %lu -> %lu\n" , + i, prev_end_pfn, start_pfn); + } prev_end_pfn = early_node_map[i].end_pfn; }
--
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>
Ah, my willing patch is here. :-).
My system, which is Tiger4 with my numa emulation, can boot up by this patch.
Thanks.
Quoted 35 lines
On (13/04/06 00:20), Mel Gorman didst pronounce:
Quoted 6 lines
This is V2 of the patchset. They have been boot tested on x86, ppc64 and
x86_64but I still need to do a double check that zones are the same size before and after the patch on all arches. IA64 passed a basic compile-test. a driver program that fed in the values generated by IA64 toadd_active_range(),zone_present_pages_in_node()andzone_absent_pages_in_node()seemed to generate expected values.I didn't look at the test program output carefully enough! There was a double counting of some holes because of a missing "if" - obvious in the morning. Fix is this (applies on top of the debugging patch)
diff -rup -X
/usr/src/patchset-0.5/bin//dontdifflinux-2.6.17-rc1-zonesizing-v6/mm/mem_init.clinux-2.6.17-rc1-zonesizing-v7/mm/mem_init.cmm/mem_init.c +5
-4@@ -761,9 +761,11 @@ unsigned long __init zone_absent_pages_i }/* Update the hole size cound and move on */ - hole_pages += start_pfn - prev_end_pfn; -printk ("Hole found index %d: %lu -> %lu\n" , - i, prev_end_pfn, start_pfn); +if (start_pfn > arch_zone_lowest_possible_pfn[zone_type]) { + hole_pages += start_pfn - prev_end_pfn; +printk ("Hole found index %d: %lu -> %lu\n" , + i, prev_end_pfn, start_pfn); + } prev_end_pfn = early_node_map[i].end_pfn; } -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 8 lines
Yasunori Goto -- 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>
Quoted 4 lines · Yasunori Goto
Ah, my willing patch is here. :-).
My system, which is Tiger4 with my numa emulation, can boot up by this patch.
Most excellent! Thanks for testing.
Signature · 9 lines
Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab -- 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>
Quoted 3 lines · Mel Gorman
I didn't look at the test program output carefully enough! There was a double counting of some holes because of a missing "if" - obvious in the morning. Fix is this (applies on top of the debugging patch)
Back to not booting with tiger_defconfig on Intel Tiger box :-(
There are no lines like:
On node 0 totalpages: 260725 DMA zone: 129700 pages, LIFO batch:7 Normal zone: 131025 pages, LIFO batch:7
in the log ... which might explain the OOM later.
Whole console log appended (The "Kill process 2" messages repeat forever).
-Tony
Linux version 2.6.17-rc1-tiger-smpxx (aegl@linux-t10) (gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.1)) #2 SMP Thu Apr 13 09:54:33 PDT 2006 EFI v1.10 by INTEL: SALsystab=0x7fe54980 ACPI=0x7ff84000 ACPI 2.0=0x7ff83000 MPS=0x7ff82000 SMBIOS=0xf0000
Early serial console at I/O port 0x2f8 (options '115200')
Initial ramdisk at: 0xe0000001fedf5000 (1303557 bytes)
SAL 3.20: Intel Corp SR870BN4 version 3.0
SAL Platform features: BusLock IRQ_Redirection
SAL: AP wakeup using external interrupt vector 0xf0
No logical to physical processor mapping availableiosapic_system_init: Disabling PC-AT compatible 8259 interrupts
ACPI: Local APIC address c0000000fee00000
PLATFORM int CPEI (0x3): GSI 22 (level, low) -> CPU 0 (0xc618) vector 30register_intr: changing vector 39 from IO-SAPIC-edge to IO-SAPIC-level
4 CPUs available, 4 CPUs total
MCA related initialization doneadd_active_range(0, 1024, 130688): Newadd_active_range(0, 130984, 131020): Newadd_active_range(0, 393216, 524164): Newadd_active_range(0, 524192, 524269): Newfree_area_init_nodes(262144, 262144, 524269, 524269)free_area_init_nodes(): find_min_pfn = 1024
Dumping sorted node map
entry 0: 0 1024 -> 130688
entry 1: 0 130984 -> 131020
entry 2: 0 393216 -> 524164
entry 3: 0 524192 -> 524269
Hole found index 1: 130688 -> 130984
Hole found index 2: 131020 -> 262144
Hole found index 2: 131020 -> 393216
Hole found index 3: 524164 -> 524192
Hole found index 1: 130688 -> 130984
Hole found index 2: 131020 -> 262144
Hole found index 2: 131020 -> 393216
Hole found index 3: 524164 -> 524192
Virtual mem_map starts at 0xa0007ffffe400000
SMP: Allowing 4 CPUs, 0 hotplug CPUs
Built 1 zonelists
Kernel command line: BOOT_IMAGE=scsi0:EFI\redhat\l-tiger-smpxx.gz root=LABEL=/ console=uart,io,0x2f8 ro
PID hash table entries: 4096 (order: 12, 32768 bytes)
Console: colour VGA+ 80x25
Dentry cache hash table entries: 262144 (order: 7, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 6, 1048576 bytes)
Placing software IO TLB between 0x4a84000 - 0x8a84000
Memory: 4073632k/4171600k available (6832k code, 96720k reserved, 2753k data, 256k init)
McKinley Errata 9 workaround not needed; disabling it
Mount-cache hash table entries: 1024
Boot processor id 0x0/0xc618
Fixed BSP b0 value from CPU 1
CPU 1: synchronized ITC with CPU 0 (last diff -10 cycles, maxerr 611 cycles)
CPU 2: synchronized ITC with CPU 0 (last diff 10 cycles, maxerr 593 cycles)
CPU 3: synchronized ITC with CPU 0 (last diff 10 cycles, maxerr 593 cycles)
Brought up 4 CPUs
Total of 4 processors activated (10158.08 BogoMIPS).
migration_cost=9941
checking if image is initramfs... it is
Freeing initrd memory: 1248kB freed
DMI 2.3 present.
NET: Registered protocol family 16
ACPI: bus type pci registered
ACPI: Subsystem revision 20060127
ACPI: Interpreter enabled
ACPI: Using IOSAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI quirk: region 0c00-0c7f claimed by ICH4 ACPI/GPIO/TCO
PCI quirk: region 0500-053f claimed by ICH4 GPIO
PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1
ACPI: PCI Root Bridge [PCI1] (0000:02)
ACPI: PCI Root Bridge [PCI3] (0000:09)
ACPI: PCI Root Bridge [PCI4] (0000:0f)
ACPI: Device [CSFF] status [00000008]: functional but not present; setting present
ACPI: PCI Root Bridge [CSFF] (0000:ff)
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
pnp: PnP ACPI: found 12 devices
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
perfmon: version 2.0 IRQ 238
perfmon: Itanium 2 PMU detected, 16 PMCs, 18 PMDs, 4 counters (47 bits)
PAL Information Facility v0.5
perfmon: added sampling format default_formatperfmon_default_smpl: default_format v2.0 registered
oom-killer: gfp_mask=0xd0, order=1
Call Trace:
[<a0000001000117f0>] show_stack+0x50/0xa0
sp=e0000001816577c0 bsp=e000000181651328
[<a000000100011870>] dump_stack+0x30/0x60
sp=e000000181657990 bsp=e000000181651310
[<a0000001000dd330>] out_of_memory+0x70/0x380
sp=e000000181657990 bsp=e0000001816512b8
[<a0000001000e03b0>] __alloc_pages+0x3d0/0x520
sp=e0000001816579b0 bsp=e000000181651250
[<a0000001000e05c0>] __get_free_pages+0xc0/0x180
sp=e0000001816579c0 bsp=e000000181651228
[<a00000010007d2f0>] dup_task_struct+0x30/0x140
sp=e0000001816579c0 bsp=e0000001816511f0
[<a00000010007f0c0>] copy_process+0x80/0x1c20
sp=e0000001816579c0 bsp=e000000181651120
[<a000000100080ee0>] do_fork+0x1c0/0x3a0
sp=e0000001816579c0 bsp=e0000001816510c0
[<a000000100013aa0>] kernel_thread+0x160/0x180
sp=e0000001816579e0 bsp=e000000181651088
[<a0000001000b4f00>] keventd_create_kthread+0x40/0x100
sp=e000000181657db0 bsp=e000000181651050
[<a0000001000abb10>] run_workqueue+0x1f0/0x2a0
sp=e000000181657db0 bsp=e000000181651008
[<a0000001000abd80>] worker_thread+0x1c0/0x260
sp=e000000181657db0 bsp=e000000181650fc0
[<a0000001000b4e40>] kthread+0x180/0x200
sp=e000000181657e20 bsp=e000000181650f88
[<a000000100013b90>] kernel_thread_helper+0xd0/0x100
sp=e000000181657e30 bsp=e000000181650f60
[<a0000001000094c0>] start_kernel_thread+0x20/0x40
sp=e000000181657e30 bsp=e000000181650f60Mem-info:
DMA per-cpu:
cpu 0 hot: high 42, batch 7 used:37
cpu 0 cold: high 14, batch 3 used:0
cpu 1 hot: high 42, batch 7 used:0
cpu 1 cold: high 14, batch 3 used:0
cpu 2 hot: high 42, batch 7 used:0
cpu 2 cold: high 14, batch 3 used:0
cpu 3 hot: high 42, batch 7 used:0
cpu 3 cold: high 14, batch 3 used:0
DMA32 per-cpu: empty
Normal per-cpu:
cpu 0 hot: high 42, batch 7 used:8
cpu 0 cold: high 14, batch 3 used:0
cpu 1 hot: high 42, batch 7 used:29
cpu 1 cold: high 14, batch 3 used:0
cpu 2 hot: high 42, batch 7 used:40
cpu 2 cold: high 14, batch 3 used:0
oom-killer: gfp_mask=0x200d2, order=0
Call Trace:
[<a0000001000117f0>] show_stack+0x50/0xa0
sp=e0000001ff927b70 bsp=e0000001ff921270
[<a000000100011870>] dump_stack+0x30/0x60
sp=e0000001ff927d40 bsp=e0000001ff921258
[<a0000001000dd330>] out_of_memory+0x70/0x380
sp=e0000001ff927d40 bsp=e0000001ff921200
[<a0000001000e03b0>] __alloc_pages+0x3d0/0x520
sp=e0000001ff927d60 bsp=e0000001ff921190
[<a0000001000f47a0>] do_wp_page+0x2c0/0x740
sp=e0000001ff927d70 bsp=e0000001ff921120
[<a0000001000f6c90>] __handle_mm_fault+0x12b0/0x13c0
sp=e0000001ff927d70 bsp=e0000001ff921088
[<a000000100058fd0>] ia64_do_page_fault+0x230/0xa00
sp=e0000001ff927d80 bsp=e0000001ff921030
[<a00000010000c360>] ia64_leave_kernel+0x0/0x280
sp=e0000001ff927e30 bsp=e0000001ff921030Mem-info:
DMA per-cpu:
cpu 0 hot: high 42, batch 7 used:37
cpu 0 cold: high 14, batch 3 used:0
cpu 1 hot: high 42, batch 7 used:0
cpu 1 cold: high 14, batch 3 used:0
cpu 2 hot: high 42, batch 7 used:0
cpu 2 cold: high 14, batch 3 used:0
cpu 3 hot: high 42, batch 7 used:0
cpu 3 cold: high 14, batch 3 used:0
DMA32 per-cpu: empty
Normal per-cpu:
cpu 0 hot: high 42, batch 7 used:8
cpu 0 cold: high 14, batch 3 used:0
cpu 1 hot: high 42, batch 7 used:29
cpu 1 cold: high 14, batch 3 used:0
cpu 2 hot: high 42, batch 7 used:40
cpu 2 cold: high 14, batch 3 used:0
cpu 3 hot: high 42, batch 7 used:2
cpu 3 cold: high 14, batch 3 used:0
HighMem per-cpu: empty
Free pages: 4055248kB (0kB HighMem)
Active:151 inactive:62 dirty:0 writeback:0 unstable:0 free:253453 slab:243 mapped:55 pagetables:8
DMA free:1998256kB min:5760kB low:7200kB high:8640kB active:0kB inactive:0kB present:2075200kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 72057594037927935 72057594037927935
DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 72057594037927935 72057594037927935
Normal free:2056992kB min:2277358239360432kB low:2846697799200528kB high:3416037359040640kB active:2416kB inactive:992kB present:18446744073709550032kB pages_scanned:994 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0
HighMem free:0kB min:512kB low:512kB high:512kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA: 3*16kB 2*32kB 1*64kB 2*128kB 2*256kB 1*512kB 2*1024kB 2*2048kB 2*4096kB 2*8192kB 2*16384kB 3*32768kB 2*65536kB 1*131072kB 2*262144kB 2*524288kB 0*1048576kB = 1998256kB
DMA32: empty
Normal: 0*16kB 39*32kB 11*64kB 1*128kB 1*256kB 1*512kB 0*1024kB 1*2048kB 1*4096kB 2*8192kB 0*16384kB 2*32768kB 2*65536kB 2*131072kB 2*262144kB 2*524288kB 0*1048576kB = 2056992kB
HighMem: empty
Swap cache: add 0, delete 0, find 0/0, race 0+0
Free swap = 0kB
Total swap = 0kB
Free swap: 0kB
261247 pages of RAM
6488 reserved pages
45 pages shared
0 pages swap cached
644 pages in page table cache
Out of Memory: Kill process 274 (udev) score 7 and children.
Out of memory: Killed process 274 (udev).
hotplug: page allocation failure. order:0, mode:0x20
Call Trace:
[<a0000001000117f0>] show_stack+0x50/0xa0
sp=e0000001ff927b60 bsp=e0000001ff921540
[<a000000100011870>] dump_stack+0x30/0x60
sp=e0000001ff927d30 bsp=e0000001ff921528
[<a0000001000e04b0>] __alloc_pages+0x4d0/0x520
sp=e0000001ff927d30 bsp=e0000001ff9214c0
[<a0000001001173d0>] cache_alloc_refill+0x790/0xde0
sp=e0000001ff927d40 bsp=e0000001ff921448
[<a000000100116be0>] kmem_cache_alloc+0xa0/0x100
sp=e0000001ff927d40 bsp=e0000001ff921420
[<a00000010009e110>] __sigqueue_alloc+0xb0/0x160
sp=e0000001ff927d40 bsp=e0000001ff9213e8
[<a00000010009f200>] send_signal+0x80/0x2a0
sp=e0000001ff927d40 bsp=e0000001ff9213b0
[<a00000010009f580>] specific_send_sig_info+0x160/0x1e0
sp=e0000001ff927d40 bsp=e0000001ff921378
[<a00000010009f6e0>] force_sig_info+0xe0/0x120
sp=e0000001ff927d40 bsp=e0000001ff921338
[<a0000001000a01f0>] force_sig+0x30/0x60
sp=e0000001ff927d40 bsp=e0000001ff921310
[<a0000001000dcf60>] __oom_kill_task+0x240/0x260
sp=e0000001ff927d40 bsp=e0000001ff9212d8
[<a0000001000dd010>] oom_kill_task+0x90/0x1e0
sp=e0000001ff927d40 bsp=e0000001ff921290
[<a0000001000dd290>] oom_kill_process+0x130/0x160
sp=e0000001ff927d40 bsp=e0000001ff921258
[<a0000001000dd5b0>] out_of_memory+0x2f0/0x380
sp=e0000001ff927d40 bsp=e0000001ff921200
[<a0000001000e03b0>] __alloc_pages+0x3d0/0x520
sp=e0000001ff927d60 bsp=e0000001ff921190
[<a0000001000f47a0>] do_wp_page+0x2c0/0x740
sp=e0000001ff927d70 bsp=e0000001ff921120
[<a0000001000f6c90>] __handle_mm_fault+0x12b0/0x13c0
sp=e0000001ff927d70 bsp=e0000001ff921088
[<a000000100058fd0>] ia64_do_page_fault+0x230/0xa00
sp=e0000001ff927d80 bsp=e0000001ff921030
[<a00000010000c360>] ia64_leave_kernel+0x0/0x280
sp=e0000001ff927e30 bsp=e0000001ff921030Mem-info:
DMA per-cpu:
cpu 0 hot: high 42, batch 7 used:37
cpu 0 cold: high 14, batch 3 used:0
cpu 1 hot: high 42, batch 7 used:0
cpu 1 cold: high 14, batch 3 used:0
cpu 2 hot: high 42, batch 7 used:0
cpu 2 cold: high 14, batch 3 used:0
cpu 3 hot: high 42, batch 7 used:0
cpu 3 cold: high 14, batch 3 used:0
DMA32 per-cpu: empty
Normal per-cpu:
cpu 0 hot: high 42, batch 7 used:8
cpu 0 cold: high 14, batch 3 used:0
cpu 1 hot: high 42, batch 7 used:29
cpu 1 cold: high 14, batch 3 used:0
cpu 2 hot: high 42, batch 7 used:40
cpu 2 cold: high 14, batch 3 used:0
cpu 3 hot: high 42, batch 7 used:2
cpu 3 cold: high 14, batch 3 used:0
HighMem per-cpu: empty
Free pages: 4055248kB (0kB HighMem)
Active:151 inactive:62 dirty:0 writeback:0 unstable:0 free:253453 slab:243 mapped:55 pagetables:8
DMA free:1998256kB min:5760kB low:7200kB high:8640kB active:0kB inactive:0kB present:2075200kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 72057594037927935 72057594037927935
DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 72057594037927935 72057594037927935
Normal free:2056992kB min:2277358239360432kB low:2846697799200528kB high:3416037359040640kB active:2416kB inactive:992kB present:18446744073709550032kB pages_scanned:994 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0
HighMem free:0kB min:512kB low:512kB high:512kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA: 3*16kB 2*32kB 1*64kB 2*128kB 2*256kB 1*512kB 2*1024kB 2*2048kB 2*4096kB 2*8192kB 2*16384kB 3*32768kB 2*65536kB 1*131072kB 2*262144kB 2*524288kB 0*1048576kB = 1998256kB
DMA32: empty
Normal: 0*16kB 39*32kB 11*64kB 1*128kB 1*256kB 1*512kB 0*1024kB 1*2048kB 1*4096kB 2*8192kB 0*16384kB 2*32768kB 2*65536kB 2*131072kB 2*262144kB 2*524288kB 0*1048576kB = 2056992kB
HighMem: empty
Swap cache: add 0, delete 0, find 0/0, race 0+0
Free swap = 0kB
Total swap = 0kB
Free swap: 0kB
261247 pages of RAM
6488 reserved pages
45 pages shared
0 pages swap cached
644 pages in page table cache
oom-killer: gfp_mask=0x280d2, order=0
Call Trace:
[<a0000001000117f0>] show_stack+0x50/0xa0
sp=e0000001ff8c7b70 bsp=e0000001ff8c1268
[<a000000100011870>] dump_stack+0x30/0x60
sp=e0000001ff8c7d40 bsp=e0000001ff8c1250
[<a0000001000dd330>] out_of_memory+0x70/0x380
sp=e0000001ff8c7d40 bsp=e0000001ff8c11f0
[<a0000001000e03b0>] __alloc_pages+0x3d0/0x520
sp=e0000001ff8c7d60 bsp=e0000001ff8c1188
[<a0000001000f5ce0>] __handle_mm_fault+0x300/0x13c0
sp=e0000001ff8c7d70 bsp=e0000001ff8c10f0
[<a000000100058fd0>] ia64_do_page_fault+0x230/0xa00
sp=e0000001ff8c7d80 bsp=e0000001ff8c1098
[<a00000010000c360>] ia64_leave_kernel+0x0/0x280
sp=e0000001ff8c7e30 bsp=e0000001ff8c1098Mem-info:
DMA per-cpu:
cpu 0 hot: high 42, batch 7 used:37
cpu 0 cold: high 14, batch 3 used:0
cpu 1 hot: high 42, batch 7 used:0
cpu 1 cold: high 14, batch 3 used:0
cpu 2 hot: high 42, batch 7 used:0
cpu 2 cold: high 14, batch 3 used:0
cpu 3 hot: high 42, batch 7 used:0
cpu 3 cold: high 14, batch 3 used:0
DMA32 per-cpu: empty
Normal per-cpu:
cpu 0 hot: high 42, batch 7 used:8
cpu 0 cold: high 14, batch 3 used:0
cpu 1 hot: high 42, batch 7 used:28
cpu 1 cold: high 14, batch 3 used:0
cpu 2 hot: high 42, batch 7 used:40
cpu 2 cold: high 14, batch 3 used:0
cpu 3 hot: high 42, batch 7 used:2
cpu 3 cold: high 14, batch 3 used:0
HighMem per-cpu: empty
Free pages: 4055248kB (0kB HighMem)
Active:160 inactive:53 dirty:0 writeback:0 unstable:0 free:253453 slab:244 mapped:55 pagetables:8
DMA free:1998256kB min:5760kB low:7200kB high:8640kB active:0kB inactive:0kB present:2075200kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 72057594037927935 72057594037927935
DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 72057594037927935 72057594037927935
Normal free:2056992kB min:2277358239360432kB low:2846697799200528kB high:3416037359040640kB active:2560kB inactive:848kB present:18446744073709550032kB pages_scanned:1135 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0
HighMem free:0kB min:512kB low:512kB high:512kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA: 3*16kB 2*32kB 1*64kB 2*128kB 2*256kB 1*512kB 2*1024kB 2*2048kB 2*4096kB 2*8192kB 2*16384kB 3*32768kB 2*65536kB 1*131072kB 2*262144kB 2*524288kB 0*1048576kB = 1998256kB
DMA32: empty
Normal: 0*16kB 39*32kB 11*64kB 1*128kB 1*256kB 1*512kB 0*1024kB 1*2048kB 1*4096kB 2*8192kB 0*16384kB 2*32768kB 2*65536kB 2*131072kB 2*262144kB 2*524288kB 0*1048576kB = 2056992kB
HighMem: empty
Swap cache: add 0, delete 0, find 0/0, race 0+0
Free swap = 0kB
Total swap = 0kB
Free swap: 0kB
261247 pages of RAM
6488 reserved pages
45 pages shared
0 pages swap cached
644 pages in page table cache
cpu 3 hot: high 42, batch 7 used:2
oom-killer: gfp_mask=0x200d2, order=0
Call Trace:
[<a0000001000117f0>] show_stack+0x50/0xa0
sp=e0000001ff927b70 bsp=e0000001ff921270
[<a000000100011870>] dump_stack+0x30/0x60
sp=e0000001ff927d40 bsp=e0000001ff921258
[<a0000001000dd330>] out_of_memory+0x70/0x380
sp=e0000001ff927d40 bsp=e0000001ff921200
[<a0000001000e03b0>] __alloc_pages+0x3d0/0x520
sp=e0000001ff927d60 bsp=e0000001ff921190
[<a0000001000f47a0>] do_wp_page+0x2c0/0x740
sp=e0000001ff927d70 bsp=e0000001ff921120
[<a0000001000f6c90>] __handle_mm_fault+0x12b0/0x13c0
sp=e0000001ff927d70 bsp=e0000001ff921088
[<a000000100058fd0>] ia64_do_page_fault+0x230/0xa00
sp=e0000001ff927d80 bsp=e0000001ff921030
[<a00000010000c360>] ia64_leave_kernel+0x0/0x280
sp=e0000001ff927e30 bsp=e0000001ff921030Mem-info:
DMA per-cpu:
cpu 0 hot: high 42, batch 7 used:37
cpu 0 cold: high 14, batch 3 used:0
cpu 1 hot: high 42, batch 7 used:0
cpu 1 cold: high 14, batch 3 used:0
cpu 2 hot: high 42, batch 7 used:0
cpu 2 cold: high 14, batch 3 used:0
cpu 3 hot: high 42, batch 7 used:0
cpu 3 cold: high 14, batch 3 used:0
DMA32 per-cpu: empty
Normal per-cpu:
cpu 0 hot: high 42, batch 7 used:8
cpu 0 cold: high 14, batch 3 used:0
cpu 1 hot: high 42, batch 7 used:34
cpu 1 cold: high 14, batch 3 used:0
cpu 2 hot: high 42, batch 7 used:40
cpu 2 cold: high 14, batch 3 used:0
cpu 3 hot: high 42, batch 7 used:2
cpu 3 cold: high 14, batch 3 used:0
HighMem per-cpu: empty
Free pages: 4055248kB (0kB HighMem)
Active:157 inactive:50 dirty:0 writeback:0 unstable:0 free:253453 slab:244 mapped:23 pagetables:4
DMA free:1998256kB min:5760kB low:7200kB high:8640kB active:0kB inactive:0kB present:2075200kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 72057594037927935 72057594037927935
DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 72057594037927935 72057594037927935
Normal free:2056992kB min:2277358239360432kB low:2846697799200528kB high:3416037359040640kB active:2512kB inactive:800kB present:18446744073709550032kB pages_scanned:1471 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0
HighMem free:0kB min:512kB low:512kB high:512kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA: 3*16kB 2*32kB 1*64kB 2*128kB 2*256kB 1*512kB 2*1024kB 2*2048kB 2*4096kB 2*8192kB 2*16384kB 3*32768kB 2*65536kB 1*131072kB 2*262144kB 2*524288kB 0*1048576kB = 1998256kB
DMA32: empty
Normal: 0*16kB 39*32kB 11*64kB 1*128kB 1*256kB 1*512kB 0*1024kB 1*2048kB 1*4096kB 2*8192kB 0*16384kB 2*32768kB 2*65536kB 2*131072kB 2*262144kB 2*524288kB 0*1048576kB = 2056992kB
HighMem: empty
Swap cache: add 0, delete 0, find 0/0, race 0+0
Free swap = 0kB
Total swap = 0kB
Free swap: 0kB
261247 pages of RAM
6488 reserved pages
19 pages shared
0 pages swap cached
651 pages in page table cache
Out of Memory: Kill process 275 (hotplug) score 5 and children.
Out of memory: Killed process 275 (hotplug).
cpu 3 cold: high 14, batch 3 used:0
HighMem per-cpu: empty
Free pages: 4055248kB (0kB HighMem)
Active:152 inactive:50 dirty:0 writeback:0 unstable:0 free:253453 slab:245 mapped:0 pagetables:0
DMA free:1998256kB min:5760kB low:7200kB high:8640kB active:0kB inactive:0kB present:2075200kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 72057594037927935 72057594037927935
DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 72057594037927935 72057594037927935
Normal free:2056992kB min:2277358239360432kB low:2846697799200528kB high:3416037359040640kB active:2432kB inactive:800kB present:18446744073709550032kB pages_scanned:1471 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0
HighMem free:0kB min:512kB low:512kB high:512kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA: 3*16kB 2*32kB 1*64kB 2*128kB 2*256kB 1*512kB 2*1024kB 2*2048kB 2*4096kB 2*8192kB 2*16384kB 3*32768kB 2*65536kB 1*131072kB 2*262144kB 2*524288kB 0*1048576kB = 1998256kB
DMA32: empty
Normal: 0*16kB 39*32kB 11*64kB 1*128kB 1*256kB 1*512kB 0*1024kB 1*2048kB 1*4096kB 2*8192kB 0*16384kB 2*32768kB 2*65536kB 2*131072kB 2*262144kB 2*524288kB 0*1048576kB = 2056992kB
HighMem: empty
Swap cache: add 0, delete 0, find 0/0, race 0+0
Free swap = 0kB
Total swap = 0kB
Free swap: 0kB
261247 pages of RAM
6488 reserved pages
0 pages shared
0 pages swap cached
658 pages in page table cache
Out of Memory: Kill process 2 (migration/0) score 0 and children.
Out of Memory: Kill process 2 (migration/0) score 0 and children.
--
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>
On (13/04/06 10:19), Luck, Tony didst pronounce:
Quoted 21 lines · Mel Gorman
Quoted 3 lines
I didn't look at the test program output carefully enough! There was a double counting of some holes because of a missing "if" - obvious in the morning. Fix is this (applies on top of the debugging patch)
Back to not booting with
tiger_defconfigon Intel Tiger box :-(There are no lines like:
On node 0 totalpages: 260725 DMA zone: 129700 pages, LIFO batch:7 Normal zone: 131025 pages, LIFO batch:7in the log ... which might explain the OOM later.
Whole console log appended (The "Kill process 2" messages repeat forever).
-Tony
Quoted 9 lines
<SNIP>
Dumping sorted node map
entry 0: 0 1024 -> 130688 entry 1: 0 130984 -> 131020 entry 2: 0 393216 -> 524164 entry 3: 0 524192 -> 524269 Hole found index 1: 130688 -> 130984 Hole found index 2: 131020 -> 262144 Hole found index 2: 131020 -> 393216
Double counted a hole here, then went downhill. Does the following fix it?
mm/mem_init.c +13 -9
@@ -753,17 +753,21 @@ unsigned long __init zone_absent_pages_i start_pfn = early_node_map[i].start_pfn;if (start_pfn > arch_zone_highest_possible_pfn[zone_type]) start_pfn = arch_zone_highest_possible_pfn[zone_type]; -if (prev_end_pfn > start_pfn) { -printk ("prev_end > start_pfn : %lu > %lu\n" , - prev_end_pfn, - start_pfn); -BUG (); - } +if (prev_end_pfn < arch_zone_lowest_possible_pfn[zone_type]) + prev_end_pfn = arch_zone_lowest_possible_pfn[zone_type];/* Update the hole size cound and move on */ - hole_pages += start_pfn - prev_end_pfn; -printk ("Hole found index %d: %lu -> %lu\n" , - i, prev_end_pfn, start_pfn); +if (start_pfn > arch_zone_lowest_possible_pfn[zone_type]) { +if (prev_end_pfn > start_pfn) { +printk ("prev_end > start_pfn : %lu > %lu\n" , + prev_end_pfn, + start_pfn); +BUG (); + } + hole_pages += start_pfn - prev_end_pfn; +printk ("Hole found index %d: %lu -> %lu\n" , + i, prev_end_pfn, start_pfn); + } prev_end_pfn = early_node_map[i].end_pfn; }
--
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>
Quoted 2 lines
Double counted a hole here, then went downhill. Does the following fix it?
Yes, that boots. What's more the counts of pages in DMA/Normal zone match the kernel w/o your patches too. So for tiger_defconfig you've now exactly matched the old behaivour.
I'll try to test generic and sparse kernels later, but I have to look at another issue now.
-Tony
--
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>
On (13/04/06 10:47), Luck, Tony didst pronounce:
Quoted 7 lines
Quoted 2 lines
Double counted a hole here, then went downhill. Does the following fix it?
Yes, that boots. What's more the counts of pages in DMA/Normal zone match the kernel w/o your patches too. So for
tiger_defconfigyou've now exactly matched the old behaivour.
Very very cool. Thanks for persisting.
Quoted 3 lines
I'll try to test generic and sparse kernels later, but I have to look at another issue now.
When you get around to it later, there is one case you may hit that Bob Picco encountered and fixed for me. It's where a "new" range is registered that is inside an existing area; e.g.
add_active_range: 0->10000add_active_range: 9800->10000
It ends up merging incorrectly and you end up with one region from 9800-10000. The fix is below.
mm/mem_init.c +7 -0
@@ -922,6 +926,13 @@ void __init add_active_range(unsigned inif (early_node_map[i].nid != nid)continue ; +/* Skip if an existing region covers this new one */ +if (start_pfn >= early_node_map[i].start_pfn && + end_pfn <= early_node_map[i].end_pfn) { +printk ("Existing\n" ); +return ; + } +/* Merge forward if suitable */ if (start_pfn <= early_node_map[i].end_pfn && end_pfn > early_node_map[i].end_pfn) {
--
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>
Quoted 9 lines · Mel Gorman
When you get around to it later, there is one case you may hit that Bob Picco encountered and fixed for me. It's where a "new" range is registered that is inside an existing area; e.g.
add_active_range: 0->10000add_active_range: 9800->10000It ends up merging incorrectly and you end up with one region from 9800-10000. The fix is below.
I applied that fix on top of all the others and re-built and booted a "generic" kernel (using arch/ia64/defconfig) and a "sparse" kernel (based on arch/ia64/configs/gensparse_defconfig).
Both booted just fine on my tiger, the memory amounts looked a bit suspicious though ... as if you are reporting *all* the memory in range for the zone, rather than the usable parts.
Diffing console log from the boot of a 2.6.17-rc1 generic kernel against one with your patches the relevent bit is:
< On node 0 totalpages: 259873
< DMA zone: 128931 pages, LIFO batch:7
< Normal zone: 130942 pages, LIFO batch:7
---
Quoted 3 lines
On node 0 totalpages: 262144
DMA zone: 131072 pages, LIFO batch:7
Normal zone: 131072 pages, LIFO batch:7
That's a very precise 4G total, split exactly 2G+2G between DMA and normal zones. Same thing for the sparse kernel (though I didn't check what an unpatched kernel prints).
At the end I've put the console logs from a generic boot, a generic boot with your patch, and finally a generic-sparse boot with your patch.
-Tony
::::::::::::::
dmesg-gen
::::::::::::::
Linux version 2.6.17-rc1-generic-smp (aegl@linux-t10) (gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.1)) #1 SMP Thu Apr 13 14:28:18 PDT 2006 EFI v1.10 by INTEL: SALsystab=0x7fe54980 ACPI=0x7ff84000 ACPI 2.0=0x7ff83000 MPS=0x7ff82000 SMBIOS=0xf0000
booting generic kernel on platform dig
Early serial console at I/O port 0x2f8 (options '115200')
ACPI: RSDP (v002 INTEL ) @ 0x000000007ff83000
ACPI: XSDT (v001 INTEL SR870BN4 0x01072002 MSFT 0x00010013) @ 0x000000007ff83090
ACPI: FADT (v003 INTEL SR870BN4 0x01072002 MSFT 0x00010013) @ 0x000000007ff83138
ACPI: MADT (v001 INTEL SR870BN4 0x01072002 MSFT 0x00010013) @ 0x000000007ff83230
ACPI: DSDT (v001 Intel SR870BN4 0x00000000 MSFT 0x0100000d) @ 0x0000000000000000
Initial ramdisk at: 0xe0000001fedf7000 (1303563 bytes)
SAL 3.20: Intel Corp SR870BN4 version 3.0
SAL Platform features: BusLock IRQ_Redirection
SAL: AP wakeup using external interrupt vector 0xf0
No logical to physical processor mapping availableiosapic_system_init: Disabling PC-AT compatible 8259 interrupts
ACPI: Local APIC address c0000000fee00000
PLATFORM int CPEI (0x3): GSI 22 (level, low) -> CPU 0 (0xc618) vector 30register_intr: changing vector 39 from IO-SAPIC-edge to IO-SAPIC-level
4 CPUs available, 4 CPUs total
MCA related initialization done
Virtual mem_map starts at 0xa0007ffffe400000
On node 0 totalpages: 259873
DMA zone: 128931 pages, LIFO batch:7
Normal zone: 130942 pages, LIFO batch:7
SMP: Allowing 4 CPUs, 0 hotplug CPUs
Built 1 zonelists
Kernel command line: BOOT_IMAGE=scsi0:EFI\redhat\l-generic-smp.gz root=LABEL=/ console=uart,io,0x2f8 ro
PID hash table entries: 4096 (order: 12, 32768 bytes)
CPU 0: base freq=199.441MHz, ITC ratio=17/2, ITC freq=1695.255MHz
Console: colour VGA+ 80x25
Placing software IO TLB between 0x4c00000 - 0x8c00000
Memory: 4011344k/4157968k available (6923k code, 160256k reserved, 3388k data, 384k init)
McKinley Errata 9 workaround not needed; disabling it
Calibrating delay loop... 2539.52 BogoMIPS (lpj=5079040)
Dentry cache hash table entries: 524288 (order: 8, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 7, 2097152 bytes)
Mount-cache hash table entries: 1024
Boot processor id 0x0/0xc618
Fixed BSP b0 value from CPU 1
CPU 1: synchronized ITC with CPU 0 (last diff -10 cycles, maxerr 611 cycles)
CPU 1: base freq=199.441MHz, ITC ratio=17/2, ITC freq=1695.255MHz
Calibrating delay loop... 2539.52 BogoMIPS (lpj=5079040)
CPU 2: synchronized ITC with CPU 0 (last diff 10 cycles, maxerr 593 cycles)
CPU 2: base freq=199.441MHz, ITC ratio=17/2, ITC freq=1695.255MHz
Calibrating delay loop... 2539.52 BogoMIPS (lpj=5079040)
CPU 3: synchronized ITC with CPU 0 (last diff -10 cycles, maxerr 611 cycles)
CPU 3: base freq=199.441MHz, ITC ratio=17/2, ITC freq=1695.255MHz
Calibrating delay loop... 2539.52 BogoMIPS (lpj=5079040)
Brought up 4 CPUs
Total of 4 processors activated (10158.08 BogoMIPS).
migration_cost=9899
checking if image is initramfs... it is
Freeing initrd memory: 1264kB freed
DMI 2.3 present.
NET: Registered protocol family 16
ACPI: bus type pci registered
ACPI: Subsystem revision 20060127
ACPI: Interpreter enabled
ACPI: Using IOSAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI quirk: region 0c00-0c7f claimed by ICH4 ACPI/GPIO/TCO
PCI quirk: region 0500-053f claimed by ICH4 GPIO
PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.H2PB._PRT]
ACPI: PCI Root Bridge [PCI1] (0000:02)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI1.P2PA._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI1.P2PB._PRT]
ACPI: PCI Root Bridge [PCI3] (0000:09)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI3.P2PA._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI3.P2PB._PRT]
ACPI: PCI Root Bridge [PCI4] (0000:0f)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI4.P2PA._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI4.P2PB._PRT]
ACPI: Device [CSFF] status [00000008]: functional but not present; setting present
ACPI: PCI Root Bridge [CSFF] (0000:ff)
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
pnp: PnP ACPI: found 12 devices
SCSI subsystem initialized
perfmon: version 2.0 IRQ 238
perfmon: Itanium 2 PMU detected, 16 PMCs, 18 PMDs, 4 counters (47 bits)
PAL Information Facility v0.5
perfmon: added sampling format default_formatperfmon_default_smpl: default_format v2.0 registered
Total HugeTLB memory allocated, 0
initcall at 0xa0000001007dc640: init_autofs4_fs+0x0/0x40(): returned with error code -16
SGI XFS with large block/inode numbers, no debug enabled
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
EFI Time Services Driver v0.4
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
00:07: ttyS0 at I/O 0x3f8 (irq = 44) is a 16550A
00:08: ttyS1 at I/O 0x2f8 (irq = 45) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Intel(R) PRO/1000 Network Driver - version 7.0.33-k2
Copyright (c) 1999-2005 Intel Corporation.
GSI 18 (level, low) -> CPU 0 (0xc618) vector 48
ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 18 (level, low) -> IRQ 48
e1000: 0000:01:00.0: e1000_probe: (PCI:33MHz:32-bit) 00:03:47:fd:bb:42
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
netconsole: not configured, aborting
initcall at 0xa0000001007dfe60: init_netconsole+0x0/0x140(): returned with error code -22
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH4: IDE controller at PCI slot 0000:00:1f.1
PCI: Device 0000:00:1f.1 not available because of resource collisions
ACPI: PCI Interrupt 0000:00:1f.1[A]: no GSI
ICH4: BIOS configuration fixed.
ICH4: chipset revision 1
ICH4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1000-0x1007, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0x1008-0x100f, BIOS settings: hdc:pio, hdd:pioProbing IDE interface ide0...
hda: MATSHITADVD-ROM SR-8177, ATAPI CD/DVD-ROM drive
hdb: LS-120/240 00 UHD Floppy, ATAPI FLOPPY drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 34
Probing IDE interface ide1...
hda: ATAPI 24X DVD-ROM drive, 256kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 0.99.newide
hdb: No disk in drive
hdb: 234752kB, 262/32/56 CHS, 2995 kBps, 512 sector size, 1500 rpm
libata version 1.20 loaded.
Fusion MPT base driver 3.03.08
Copyright (c) 1999-2005 LSI Logic Corporation
Fusion MPT SPI Host driver 3.03.08
GSI 28 (level, low) -> CPU 1 (0xc218) vector 49
ACPI: PCI Interrupt 0000:06:02.0[A] -> GSI 28 (level, low) -> IRQ 49
mptbase: Initiating ioc0 bringup
ioc0: 53C1030: Capabilities={Initiator}
scsi0 : ioc0: LSI53C1030, FwRev=01030a00h, Ports=1, MaxQ=255, IRQ=49
Vendor: QUANTUM Model: ATLAS IV 9 SCA Rev: 0B0B
Type: Direct-Access ANSI SCSI revision: 03
target0:0:0: Beginning Domain Validation
target0:0:0: Domain Validation skipping write tests
target0:0:0: Ending Domain Validation
target0:0:0: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 31)
SCSI device sda: 17942584 512-byte hdwr sectors (9187 MB)
sda: Write Protect is off
sda: Mode Sense: e3 00 10 08
SCSI device sda: drive cache: write back w/ FUA
SCSI device sda: 17942584 512-byte hdwr sectors (9187 MB)
sda: Write Protect is off
sda: Mode Sense: e3 00 10 08
SCSI device sda: drive cache: write back w/ FUA
sda: sda1 sda2 sda3
sd 0:0:0:0: Attached scsi disk sda
Vendor: SEAGATE Model: ST318406LC Rev: 010A
Type: Direct-Access ANSI SCSI revision: 03
target0:0:1: Beginning Domain Validation
target0:0:1: Ending Domain Validation
target0:0:1: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 63)
SCSI device sdb: 35843670 512-byte hdwr sectors (18352 MB)
sdb: Write Protect is off
sdb: Mode Sense: 9f 00 10 08
SCSI device sdb: drive cache: write back w/ FUA
SCSI device sdb: 35843670 512-byte hdwr sectors (18352 MB)
sdb: Write Protect is off
sdb: Mode Sense: 9f 00 10 08
SCSI device sdb: drive cache: write back w/ FUA
sdb: sdb1 sdb2 sdb3
sd 0:0:1:0: Attached scsi disk sdb
Vendor: ESG-SHV Model: SCA HSBP M17 Rev: 1.0D
Type: Processor ANSI SCSI revision: 02
target0:0:6: Beginning Domain Validation
target0:0:6: Ending Domain Validation
target0:0:6: asynchronous
GSI 29 (level, low) -> CPU 2 (0xc418) vector 50
ACPI: PCI Interrupt 0000:06:02.1[B] -> GSI 29 (level, low) -> IRQ 50
mptbase: Initiating ioc1 bringup
ioc1: 53C1030: Capabilities={Initiator}
scsi1 : ioc1: LSI53C1030, FwRev=01030a00h, Ports=1, MaxQ=255, IRQ=50
mice: PS/2 mouse device common for all mice
EFI Variables Facility v0.08 2004-May-17
NET: Registered protocol family 2
IP route cache hash table entries: 131072 (order: 6, 1048576 bytes)
TCP established hash table entries: 524288 (order: 9, 8388608 bytes)
TCP bind hash table entries: 65536 (order: 6, 1048576 bytes)
TCP: Hash tables configured (established 524288 bind 65536)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Adding console on ttyS1 at I/O port 0x2f8 (options '115200')
Freeing unused kernel memory: 384kB freed
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:1:0: Attached scsi generic sg1 type 0
0:0:6:0: Attached scsi generic sg2 type 3
usbcore: registered new driver usbfs
usbcore: registered new driver hub
GSI 23 (level, low) -> CPU 3 (0xc018) vector 51
ACPI: PCI Interrupt 0000:00:1d.7[D] -> GSI 23 (level, low) -> IRQ 51ehci_hcd 0000:00:1d.7: EHCI Host Controllerehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1ehci_hcd 0000:00:1d.7: debug port 1
PCI: slot 0000:00:1d.7 has incorrect PCI cache line size of 0 bytes, correcting to 128ehci_hcd 0000:00:1d.7: irq 51, io mem 0xf9ff0000ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 4 ports detected
USB Universal Host Controller Interface driver v3.0
GSI 16 (level, low) -> CPU 0 (0xc618) vector 52
ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 16 (level, low) -> IRQ 52uhci_hcd 0000:00:1d.0: UHCI Host Controlleruhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2uhci_hcd 0000:00:1d.0: irq 52, io base 0x00004cc0
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
GSI 19 (level, low) -> CPU 1 (0xc218) vector 53
ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 19 (level, low) -> IRQ 53uhci_hcd 0000:00:1d.1: UHCI Host Controlleruhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3uhci_hcd 0000:00:1d.1: irq 53, io base 0x00004ce0
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
usb 2-1: new low speed USB device using uhci_hcd and address 2
usb 2-1: configuration #1 chosen from 1 choice
usb 2-2: new low speed USB device using uhci_hcd and address 3
usb 2-2: configuration #1 chosen from 1 choice
input: SOLIDTEK USB Composite Keyboard as /class/input/input0
input: USB HID v1.10 Keyboard [SOLIDTEK USB Composite Keyboard] on usb-0000:00:1d.0-1
input: SOLIDTEK USB Composite Keyboard as /class/input/input1
input: USB HID v1.10 Device [SOLIDTEK USB Composite Keyboard] on usb-0000:00:1d.0-1
input: HID 04b3:310b as /class/input/input2
input: USB HID v1.00 Mouse [HID 04b3:310b] on usb-0000:00:1d.0-2
usbcore: registered new driver usbhiddrivers/usb/input/hid-core.c: v2.6:USB HID core driver
ACPI: Power Button (FF) [PWRF]
EXT3 FS on sda2, internal journal
device-mapper: 4.6.0-ioctl (2006-02-17) initialised: [email protected]
hdb: No disk in drive
kjournald starting. Commit interval 5 seconds
EXT3 FS on sdb3, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding 1700816k swap on /dev/sda3. Priority:-1 extents:1 across:1700816k
e1000: eth0: e1000_watchdog_task: NIC Link is Up 100 Mbps Full Duplex
::::::::::::::
dmesg-mel-generic
::::::::::::::
Linux version 2.6.17-rc1-generic-smp (aegl@linux-t10) (gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.1)) #1 SMP Thu Apr 13 13:43:50 PDT 2006 EFI v1.10 by INTEL: SALsystab=0x7fe54980 ACPI=0x7ff84000 ACPI 2.0=0x7ff83000 MPS=0x7ff82000 SMBIOS=0xf0000
booting generic kernel on platform dig
Early serial console at I/O port 0x2f8 (options '115200')
ACPI: RSDP (v002 INTEL ) @ 0x000000007ff83000
ACPI: XSDT (v001 INTEL SR870BN4 0x01072002 MSFT 0x00010013) @ 0x000000007ff83090
ACPI: FADT (v003 INTEL SR870BN4 0x01072002 MSFT 0x00010013) @ 0x000000007ff83138
ACPI: MADT (v001 INTEL SR870BN4 0x01072002 MSFT 0x00010013) @ 0x000000007ff83230
ACPI: DSDT (v001 Intel SR870BN4 0x00000000 MSFT 0x0100000d) @ 0x0000000000000000
Initial ramdisk at: 0xe0000001fedf7000 (1303561 bytes)
SAL 3.20: Intel Corp SR870BN4 version 3.0
SAL Platform features: BusLock IRQ_Redirection
SAL: AP wakeup using external interrupt vector 0xf0
No logical to physical processor mapping availableiosapic_system_init: Disabling PC-AT compatible 8259 interrupts
ACPI: Local APIC address c0000000fee00000
PLATFORM int CPEI (0x3): GSI 22 (level, low) -> CPU 0 (0xc618) vector 30register_intr: changing vector 39 from IO-SAPIC-edge to IO-SAPIC-level
4 CPUs available, 4 CPUs total
MCA related initialization doneadd_active_range(0, 0, 4096): Newadd_active_range(0, 0, 131072): Merging forwardadd_active_range(0, 0, 131072): Existingadd_active_range(0, 393216, 523264): Newadd_active_range(0, 393216, 523264): Existingadd_active_range(0, 393216, 524288): Merging forwardadd_active_range(0, 393216, 524288): Existing
Virtual mem_map starts at 0xa0007ffffe400000free_area_init_nodes(262144, 262144, 524288, 524288)free_area_init_nodes(): find_min_pfn = 0
Dumping sorted node map
entry 0: 0 0 -> 131072
entry 1: 0 393216 -> 524288
Hole found index 1: 131072 -> 262144
Hole found index 1: 262144 -> 393216
On node 0 totalpages: 262144
Hole found index 1: 131072 -> 262144
DMA zone: 131072 pages, LIFO batch:7
Hole found index 1: 262144 -> 393216
Normal zone: 131072 pages, LIFO batch:7
SMP: Allowing 4 CPUs, 0 hotplug CPUs
Built 1 zonelists
Kernel command line: BOOT_IMAGE=scsi0:EFI\redhat\l-generic-smp.gz root=LABEL=/ console=uart,io,0x2f8 ro
PID hash table entries: 4096 (order: 12, 32768 bytes)
CPU 0: base freq=199.441MHz, ITC ratio=17/2, ITC freq=1695.254MHz
Console: colour VGA+ 80x25
Placing software IO TLB between 0x4c00000 - 0x8c00000
Memory: 4011344k/4157968k available (6923k code, 160256k reserved, 3388k data, 400k init)
McKinley Errata 9 workaround not needed; disabling it
Calibrating delay loop... 2539.52 BogoMIPS (lpj=5079040)
Dentry cache hash table entries: 524288 (order: 8, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 7, 2097152 bytes)
Mount-cache hash table entries: 1024
Boot processor id 0x0/0xc618
Fixed BSP b0 value from CPU 1
CPU 1: synchronized ITC with CPU 0 (last diff -10 cycles, maxerr 611 cycles)
CPU 1: base freq=199.441MHz, ITC ratio=17/2, ITC freq=1695.254MHz
Calibrating delay loop... 2539.52 BogoMIPS (lpj=5079040)
CPU 2: synchronized ITC with CPU 0 (last diff -10 cycles, maxerr 611 cycles)
CPU 2: base freq=199.441MHz, ITC ratio=17/2, ITC freq=1695.254MHz
Calibrating delay loop... 2539.52 BogoMIPS (lpj=5079040)
CPU 3: synchronized ITC with CPU 0 (last diff -10 cycles, maxerr 611 cycles)
CPU 3: base freq=199.441MHz, ITC ratio=17/2, ITC freq=1695.254MHz
Calibrating delay loop... 2539.52 BogoMIPS (lpj=5079040)
Brought up 4 CPUs
Total of 4 processors activated (10158.08 BogoMIPS).
migration_cost=9881
checking if image is initramfs... it is
Freeing initrd memory: 1264kB freed
DMI 2.3 present.
NET: Registered protocol family 16
ACPI: bus type pci registered
ACPI: Subsystem revision 20060127
ACPI: Interpreter enabled
ACPI: Using IOSAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI quirk: region 0c00-0c7f claimed by ICH4 ACPI/GPIO/TCO
PCI quirk: region 0500-053f claimed by ICH4 GPIO
PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.H2PB._PRT]
ACPI: PCI Root Bridge [PCI1] (0000:02)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI1.P2PA._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI1.P2PB._PRT]
ACPI: PCI Root Bridge [PCI3] (0000:09)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI3.P2PA._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI3.P2PB._PRT]
ACPI: PCI Root Bridge [PCI4] (0000:0f)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI4.P2PA._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI4.P2PB._PRT]
ACPI: Device [CSFF] status [00000008]: functional but not present; setting present
ACPI: PCI Root Bridge [CSFF] (0000:ff)
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
pnp: PnP ACPI: found 12 devices
SCSI subsystem initialized
perfmon: version 2.0 IRQ 238
perfmon: Itanium 2 PMU detected, 16 PMCs, 18 PMDs, 4 counters (47 bits)
PAL Information Facility v0.5
perfmon: added sampling format default_formatperfmon_default_smpl: default_format v2.0 registered
Total HugeTLB memory allocated, 0
initcall at 0xa0000001007dd660: init_autofs4_fs+0x0/0x40(): returned with error code -16
SGI XFS with large block/inode numbers, no debug enabled
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
EFI Time Services Driver v0.4
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
00:07: ttyS0 at I/O 0x3f8 (irq = 44) is a 16550A
00:08: ttyS1 at I/O 0x2f8 (irq = 45) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Intel(R) PRO/1000 Network Driver - version 7.0.33-k2
Copyright (c) 1999-2005 Intel Corporation.
GSI 18 (level, low) -> CPU 0 (0xc618) vector 48
ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 18 (level, low) -> IRQ 48
e1000: 0000:01:00.0: e1000_probe: (PCI:33MHz:32-bit) 00:03:47:fd:bb:42
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
netconsole: not configured, aborting
initcall at 0xa0000001007e0e70: init_netconsole+0x0/0x140(): returned with error code -22
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH4: IDE controller at PCI slot 0000:00:1f.1
PCI: Device 0000:00:1f.1 not available because of resource collisions
ACPI: PCI Interrupt 0000:00:1f.1[A]: no GSI
ICH4: BIOS configuration fixed.
ICH4: chipset revision 1
ICH4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1000-0x1007, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0x1008-0x100f, BIOS settings: hdc:pio, hdd:pioProbing IDE interface ide0...
hda: MATSHITADVD-ROM SR-8177, ATAPI CD/DVD-ROM drive
hdb: LS-120/240 00 UHD Floppy, ATAPI FLOPPY drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 34
Probing IDE interface ide1...
hda: ATAPI 24X DVD-ROM drive, 256kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 0.99.newide
hdb: No disk in drive
hdb: 234752kB, 262/32/56 CHS, 2995 kBps, 512 sector size, 1500 rpm
libata version 1.20 loaded.
Fusion MPT base driver 3.03.08
Copyright (c) 1999-2005 LSI Logic Corporation
Fusion MPT SPI Host driver 3.03.08
GSI 28 (level, low) -> CPU 1 (0xc018) vector 49
ACPI: PCI Interrupt 0000:06:02.0[A] -> GSI 28 (level, low) -> IRQ 49
mptbase: Initiating ioc0 bringup
ioc0: 53C1030: Capabilities={Initiator}
scsi0 : ioc0: LSI53C1030, FwRev=01030a00h, Ports=1, MaxQ=255, IRQ=49
Vendor: QUANTUM Model: ATLAS IV 9 SCA Rev: 0B0B
Type: Direct-Access ANSI SCSI revision: 03
target0:0:0: Beginning Domain Validation
target0:0:0: Domain Validation skipping write tests
target0:0:0: Ending Domain Validation
target0:0:0: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 31)
SCSI device sda: 17942584 512-byte hdwr sectors (9187 MB)
sda: Write Protect is off
sda: Mode Sense: e3 00 10 08
SCSI device sda: drive cache: write back w/ FUA
SCSI device sda: 17942584 512-byte hdwr sectors (9187 MB)
sda: Write Protect is off
sda: Mode Sense: e3 00 10 08
SCSI device sda: drive cache: write back w/ FUA
sda: sda1 sda2 sda3
sd 0:0:0:0: Attached scsi disk sda
Vendor: SEAGATE Model: ST318406LC Rev: 010A
Type: Direct-Access ANSI SCSI revision: 03
target0:0:1: Beginning Domain Validation
target0:0:1: Ending Domain Validation
target0:0:1: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 63)
SCSI device sdb: 35843670 512-byte hdwr sectors (18352 MB)
sdb: Write Protect is off
sdb: Mode Sense: 9f 00 10 08
SCSI device sdb: drive cache: write back w/ FUA
SCSI device sdb: 35843670 512-byte hdwr sectors (18352 MB)
sdb: Write Protect is off
sdb: Mode Sense: 9f 00 10 08
SCSI device sdb: drive cache: write back w/ FUA
sdb: sdb1 sdb2 sdb3
sd 0:0:1:0: Attached scsi disk sdb
Vendor: ESG-SHV Model: SCA HSBP M17 Rev: 1.0D
Type: Processor ANSI SCSI revision: 02
target0:0:6: Beginning Domain Validation
target0:0:6: Ending Domain Validation
target0:0:6: asynchronous
GSI 29 (level, low) -> CPU 2 (0xc218) vector 50
ACPI: PCI Interrupt 0000:06:02.1[B] -> GSI 29 (level, low) -> IRQ 50
mptbase: Initiating ioc1 bringup
ioc1: 53C1030: Capabilities={Initiator}
scsi1 : ioc1: LSI53C1030, FwRev=01030a00h, Ports=1, MaxQ=255, IRQ=50
mice: PS/2 mouse device common for all mice
EFI Variables Facility v0.08 2004-May-17
NET: Registered protocol family 2
IP route cache hash table entries: 131072 (order: 6, 1048576 bytes)
TCP established hash table entries: 524288 (order: 9, 8388608 bytes)
TCP bind hash table entries: 65536 (order: 6, 1048576 bytes)
TCP: Hash tables configured (established 524288 bind 65536)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Adding console on ttyS1 at I/O port 0x2f8 (options '115200')
Freeing unused kernel memory: 400kB freed
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:1:0: Attached scsi generic sg1 type 0
0:0:6:0: Attached scsi generic sg2 type 3
usbcore: registered new driver usbfs
usbcore: registered new driver hub
GSI 23 (level, low) -> CPU 3 (0xc418) vector 51
ACPI: PCI Interrupt 0000:00:1d.7[D] -> GSI 23 (level, low) -> IRQ 51ehci_hcd 0000:00:1d.7: EHCI Host Controllerehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1ehci_hcd 0000:00:1d.7: debug port 1
PCI: slot 0000:00:1d.7 has incorrect PCI cache line size of 0 bytes, correcting to 128ehci_hcd 0000:00:1d.7: irq 51, io mem 0xf9ff0000ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 4 ports detected
USB Universal Host Controller Interface driver v3.0
GSI 16 (level, low) -> CPU 0 (0xc618) vector 52
ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 16 (level, low) -> IRQ 52uhci_hcd 0000:00:1d.0: UHCI Host Controlleruhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2uhci_hcd 0000:00:1d.0: irq 52, io base 0x00004cc0
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
GSI 19 (level, low) -> CPU 1 (0xc018) vector 53
ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 19 (level, low) -> IRQ 53uhci_hcd 0000:00:1d.1: UHCI Host Controlleruhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3uhci_hcd 0000:00:1d.1: irq 53, io base 0x00004ce0
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
usb 2-1: new low speed USB device using uhci_hcd and address 2
ACPI: Power Button (FF) [PWRF]
usb 2-1: configuration #1 chosen from 1 choice
usb 2-2: new low speed USB device using uhci_hcd and address 3
usb 2-2: configuration #1 chosen from 1 choice
input: SOLIDTEK USB Composite Keyboard as /class/input/input0
input: USB HID v1.10 Keyboard [SOLIDTEK USB Composite Keyboard] on usb-0000:00:1d.0-1
input: SOLIDTEK USB Composite Keyboard as /class/input/input1
input: USB HID v1.10 Device [SOLIDTEK USB Composite Keyboard] on usb-0000:00:1d.0-1
input: HID 04b3:310b as /class/input/input2
input: USB HID v1.00 Mouse [HID 04b3:310b] on usb-0000:00:1d.0-2
usbcore: registered new driver usbhiddrivers/usb/input/hid-core.c: v2.6:USB HID core driver
EXT3 FS on sda2, internal journal
device-mapper: 4.6.0-ioctl (2006-02-17) initialised: [email protected]
hdb: No disk in drive
kjournald starting. Commit interval 5 seconds
EXT3 FS on sdb3, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding 1700816k swap on /dev/sda3. Priority:-1 extents:1 across:1700816k
e1000: eth0: e1000_watchdog_task: NIC Link is Up 100 Mbps Full Duplex
::::::::::::::
dmesg-mel-gensparse
::::::::::::::
Linux version 2.6.17-rc1-generic-sparse (aegl@linux-t10) (gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.1)) #1 SMP Thu Apr 13 13:48:09 PDT 2006 EFI v1.10 by INTEL: SALsystab=0x7fe54980 ACPI=0x7ff84000 ACPI 2.0=0x7ff83000 MPS=0x7ff82000 SMBIOS=0xf0000
booting generic kernel on platform dig
Early serial console at I/O port 0x2f8 (options '115200')
ACPI: RSDP (v002 INTEL ) @ 0x000000007ff83000
ACPI: XSDT (v001 INTEL SR870BN4 0x01072002 MSFT 0x00010013) @ 0x000000007ff83090
ACPI: FADT (v003 INTEL SR870BN4 0x01072002 MSFT 0x00010013) @ 0x000000007ff83138
ACPI: MADT (v001 INTEL SR870BN4 0x01072002 MSFT 0x00010013) @ 0x000000007ff83230
ACPI: DSDT (v001 Intel SR870BN4 0x00000000 MSFT 0x0100000d) @ 0x0000000000000000
Initial ramdisk at: 0xe0000001fedf7000 (1303578 bytes)
SAL 3.20: Intel Corp SR870BN4 version 3.0
SAL Platform features: BusLock IRQ_Redirection
SAL: AP wakeup using external interrupt vector 0xf0
No logical to physical processor mapping availableiosapic_system_init: Disabling PC-AT compatible 8259 interrupts
ACPI: Local APIC address c0000000fee00000
PLATFORM int CPEI (0x3): GSI 22 (level, low) -> CPU 0 (0xc618) vector 30register_intr: changing vector 39 from IO-SAPIC-edge to IO-SAPIC-level
4 CPUs available, 4 CPUs total
MCA related initialization doneadd_active_range(0, 0, 4096): Newadd_active_range(0, 0, 131072): Merging forwardadd_active_range(0, 0, 131072): Existingadd_active_range(0, 393216, 523264): Newadd_active_range(0, 393216, 523264): Existingadd_active_range(0, 393216, 524288): Merging forwardadd_active_range(0, 393216, 524288): Existingfree_area_init_nodes(262144, 262144, 524288, 524288)free_area_init_nodes(): find_min_pfn = 0
Dumping sorted node map
entry 0: 0 0 -> 131072
entry 1: 0 393216 -> 524288
Hole found index 1: 131072 -> 262144
Hole found index 1: 262144 -> 393216
On node 0 totalpages: 262144
Hole found index 1: 131072 -> 262144
DMA zone: 131072 pages, LIFO batch:7
Hole found index 1: 262144 -> 393216
Normal zone: 131072 pages, LIFO batch:7
SMP: Allowing 4 CPUs, 0 hotplug CPUs
Built 1 zonelists
Kernel command line: BOOT_IMAGE=scsi0:EFI\redhat\l-generic-sparse.gz root=LABEL=/ console=uart,io,0x2f8 ro
PID hash table entries: 4096 (order: 12, 32768 bytes)
CPU 0: base freq=199.442MHz, ITC ratio=17/2, ITC freq=1695.257MHz
Console: colour VGA+ 80x25
Placing software IO TLB between 0x4c14000 - 0x8c14000
Memory: 4011232k/4157888k available (6984k code, 160368k reserved, 3394k data, 400k init)
McKinley Errata 9 workaround not needed; disabling it
Calibrating delay loop... 2539.52 BogoMIPS (lpj=5079040)
Dentry cache hash table entries: 524288 (order: 8, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 7, 2097152 bytes)
Mount-cache hash table entries: 1024
Boot processor id 0x0/0xc618
Fixed BSP b0 value from CPU 1
CPU 1: synchronized ITC with CPU 0 (last diff -10 cycles, maxerr 611 cycles)
CPU 1: base freq=199.442MHz, ITC ratio=17/2, ITC freq=1695.257MHz
Calibrating delay loop... 2539.52 BogoMIPS (lpj=5079040)
CPU 2: synchronized ITC with CPU 0 (last diff 10 cycles, maxerr 593 cycles)
CPU 2: base freq=199.442MHz, ITC ratio=17/2, ITC freq=1695.257MHz
Calibrating delay loop... 2539.52 BogoMIPS (lpj=5079040)
CPU 3: synchronized ITC with CPU 0 (last diff -10 cycles, maxerr 611 cycles)
CPU 3: base freq=199.442MHz, ITC ratio=17/2, ITC freq=1695.257MHz
Calibrating delay loop... 2539.52 BogoMIPS (lpj=5079040)
Brought up 4 CPUs
Total of 4 processors activated (10158.08 BogoMIPS).
migration_cost=9992
checking if image is initramfs... it is
Freeing initrd memory: 1264kB freed
DMI 2.3 present.
NET: Registered protocol family 16
ACPI: bus type pci registered
ACPI: Subsystem revision 20060127
ACPI: Interpreter enabled
ACPI: Using IOSAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI quirk: region 0c00-0c7f claimed by ICH4 ACPI/GPIO/TCO
PCI quirk: region 0500-053f claimed by ICH4 GPIO
PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.H2PB._PRT]
ACPI: PCI Root Bridge [PCI1] (0000:02)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI1.P2PA._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI1.P2PB._PRT]
ACPI: PCI Root Bridge [PCI3] (0000:09)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI3.P2PA._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI3.P2PB._PRT]
ACPI: PCI Root Bridge [PCI4] (0000:0f)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI4.P2PA._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI4.P2PB._PRT]
ACPI: Device [CSFF] status [00000008]: functional but not present; setting present
ACPI: PCI Root Bridge [CSFF] (0000:ff)
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
pnp: PnP ACPI: found 12 devices
SCSI subsystem initialized
perfmon: version 2.0 IRQ 238
perfmon: Itanium 2 PMU detected, 16 PMCs, 18 PMDs, 4 counters (47 bits)
PAL Information Facility v0.5
perfmon: added sampling format default_formatperfmon_default_smpl: default_format v2.0 registered
Total HugeTLB memory allocated, 0
initcall at 0xa0000001007ed860: init_autofs4_fs+0x0/0x40(): returned with error code -16
SGI XFS with large block/inode numbers, no debug enabled
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
EFI Time Services Driver v0.4
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
00:07: ttyS0 at I/O 0x3f8 (irq = 44) is a 16550A
00:08: ttyS1 at I/O 0x2f8 (irq = 45) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Intel(R) PRO/1000 Network Driver - version 7.0.33-k2
Copyright (c) 1999-2005 Intel Corporation.
GSI 18 (level, low) -> CPU 0 (0xc618) vector 48
ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 18 (level, low) -> IRQ 48
e1000: 0000:01:00.0: e1000_probe: (PCI:33MHz:32-bit) 00:03:47:fd:bb:42
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
netconsole: not configured, aborting
initcall at 0xa0000001007edaf0: init_netconsole+0x0/0x140(): returned with error code -22
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH4: IDE controller at PCI slot 0000:00:1f.1
PCI: Device 0000:00:1f.1 not available because of resource collisions
ACPI: PCI Interrupt 0000:00:1f.1[A]: no GSI
ICH4: BIOS configuration fixed.
ICH4: chipset revision 1
ICH4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1000-0x1007, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0x1008-0x100f, BIOS settings: hdc:pio, hdd:pioProbing IDE interface ide0...
hda: MATSHITADVD-ROM SR-8177, ATAPI CD/DVD-ROM drive
hdb: LS-120/240 00 UHD Floppy, ATAPI FLOPPY drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 34
Probing IDE interface ide1...
Probing IDE interface ide1...
Probing IDE interface ide2...
Probing IDE interface ide3...
hda: ATAPI 24X DVD-ROM drive, 256kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 0.99.newide
hdb: No disk in drive
hdb: 234752kB, 262/32/56 CHS, 2995 kBps, 512 sector size, 1500 rpm libata version 1.20 loaded.
Fusion MPT base driver 3.03.08
Copyright (c) 1999-2005 LSI Logic Corporation
Fusion MPT SPI Host driver 3.03.08
GSI 28 (level, low) -> CPU 1 (0xc018) vector 49
ACPI: PCI Interrupt 0000:06:02.0[A] -> GSI 28 (level, low) -> IRQ 49
mptbase: Initiating ioc0 bringup
ioc0: 53C1030: Capabilities={Initiator}
scsi0 : ioc0: LSI53C1030, FwRev=01030a00h, Ports=1, MaxQ=255, IRQ=49
Vendor: QUANTUM Model: ATLAS IV 9 SCA Rev: 0B0B
Type: Direct-Access ANSI SCSI revision: 03
target0:0:0: Beginning Domain Validation
target0:0:0: Domain Validation skipping write tests
target0:0:0: Ending Domain Validation
target0:0:0: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 31)
SCSI device sda: 17942584 512-byte hdwr sectors (9187 MB)
sda: Write Protect is off
sda: Mode Sense: e3 00 10 08
SCSI device sda: drive cache: write back w/ FUA
SCSI device sda: 17942584 512-byte hdwr sectors (9187 MB)
sda: Write Protect is off
sda: Mode Sense: e3 00 10 08
SCSI device sda: drive cache: write back w/ FUA
sda: sda1 sda2 sda3
sd 0:0:0:0: Attached scsi disk sda
Vendor: SEAGATE Model: ST318406LC Rev: 010A
Type: Direct-Access ANSI SCSI revision: 03
target0:0:1: Beginning Domain Validation
target0:0:1: Ending Domain Validation
target0:0:1: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 63)
SCSI device sdb: 35843670 512-byte hdwr sectors (18352 MB)
sdb: Write Protect is off
sdb: Mode Sense: 9f 00 10 08
SCSI device sdb: drive cache: write back w/ FUA
SCSI device sdb: 35843670 512-byte hdwr sectors (18352 MB)
sdb: Write Protect is off
sdb: Mode Sense: 9f 00 10 08
SCSI device sdb: drive cache: write back w/ FUA
sdb: sdb1 sdb2 sdb3
sd 0:0:1:0: Attached scsi disk sdb
Vendor: ESG-SHV Model: SCA HSBP M17 Rev: 1.0D
Type: Processor ANSI SCSI revision: 02
target0:0:6: Beginning Domain Validation
target0:0:6: Ending Domain Validation
target0:0:6: asynchronous
GSI 29 (level, low) -> CPU 2 (0xc218) vector 50
ACPI: PCI Interrupt 0000:06:02.1[B] -> GSI 29 (level, low) -> IRQ 50
mptbase: Initiating ioc1 bringup
ioc1: 53C1030: Capabilities={Initiator}
scsi1 : ioc1: LSI53C1030, FwRev=01030a00h, Ports=1, MaxQ=255, IRQ=50
mice: PS/2 mouse device common for all mice
EFI Variables Facility v0.08 2004-May-17
NET: Registered protocol family 2
IP route cache hash table entries: 131072 (order: 6, 1048576 bytes)
TCP established hash table entries: 524288 (order: 9, 8388608 bytes)
TCP bind hash table entries: 65536 (order: 6, 1048576 bytes)
TCP: Hash tables configured (established 524288 bind 65536)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Adding console on ttyS1 at I/O port 0x2f8 (options '115200')
Freeing unused kernel memory: 400kB freed
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:1:0: Attached scsi generic sg1 type 0
0:0:6:0: Attached scsi generic sg2 type 3
usbcore: registered new driver usbfs
usbcore: registered new driver hub
GSI 23 (level, low) -> CPU 3 (0xc418) vector 51
ACPI: PCI Interrupt 0000:00:1d.7[D] -> GSI 23 (level, low) -> IRQ 51 ehci_hcd 0000:00:1d.7: EHCI Host Controllerehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1 ehci_hcd 0000:00:1d.7: debug port 1
PCI: slot 0000:00:1d.7 has incorrect PCI cache line size of 0 bytes, correcting to 128 ehci_hcd 0000:00:1d.7: irq 51, io mem 0xf9ff0000ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004 usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 4 ports detected
USB Universal Host Controller Interface driver v3.0
GSI 16 (level, low) -> CPU 0 (0xc618) vector 52
ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 16 (level, low) -> IRQ 52 uhci_hcd 0000:00:1d.0: UHCI Host Controlleruhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2 uhci_hcd 0000:00:1d.0: irq 52, io base 0x00004cc0
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
GSI 19 (level, low) -> CPU 1 (0xc018) vector 53
ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 19 (level, low) -> IRQ 53 uhci_hcd 0000:00:1d.1: UHCI Host Controlleruhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3 uhci_hcd 0000:00:1d.1: irq 53, io base 0x00004ce0
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
usb 2-1: new low speed USB device using uhci_hcd and address 2
ACPI: Power Button (FF) [PWRF]
usb 2-1: configuration #1 chosen from 1 choice
usb 2-2: new low speed USB device using uhci_hcd and address 3
usb 2-2: configuration #1 chosen from 1 choice
input: SOLIDTEK USB Composite Keyboard as /class/input/input0
input: USB HID v1.10 Keyboard [SOLIDTEK USB Composite Keyboard] on usb-0000:00:1d.0-1
input: SOLIDTEK USB Composite Keyboard as /class/input/input1
input: USB HID v1.10 Device [SOLIDTEK USB Composite Keyboard] on usb-0000:00:1d.0-1
input: HID 04b3:310b as /class/input/input2
input: USB HID v1.00 Mouse [HID 04b3:310b] on usb-0000:00:1d.0-2
usbcore: registered new driver usbhiddrivers/usb/input/hid-core.c: v2.6:USB HID core driver
EXT3 FS on sda2, internal journal
device-mapper: 4.6.0-ioctl (2006-02-17) initialised: [email protected]
hdb: No disk in drive
kjournald starting. Commit interval 5 seconds
EXT3 FS on sdb3, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding 1700816k swap on /dev/sda3. Priority:-1 extents:1 across:1700816k
e1000: eth0: e1000_watchdog_task: NIC Link is Up 100 Mbps Full Duplex
--
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>
On (13/04/06 14:53), Luck, Tony didst pronounce:
Quoted 26 lines · Mel Gorman
Quoted 9 lines
When you get around to it later, there is one case you may hit that Bob Picco encountered and fixed for me. It's where a "new" range is registered that is inside an existing area; e.g.
add_active_range: 0->10000add_active_range: 9800->10000It ends up merging incorrectly and you end up with one region from 9800-10000. The fix is below.
I applied that fix on top of all the others and re-built and booted a "generic" kernel (using
arch/ia64/defconfig) and a "sparse" kernel (based onarch/ia64/configs/gensparse_defconfig).Both booted just fine on my tiger, the memory amounts looked a bit suspicious though ... as if you are reporting *all* the memory in range for the zone, rather than the usable parts.
Diffing console log from the boot of a 2.6.17-rc1 generic kernel against one with your patches the relevent bit is:
< On node 0 totalpages: 259873
< DMA zone: 128931 pages, LIFO batch:7
< Normal zone: 130942 pages, LIFO batch:7
---
Quoted 8 lines
Quoted 3 lines
On node 0 totalpages: 262144
DMA zone: 131072 pages, LIFO batch:7
Normal zone: 131072 pages, LIFO batch:7That's a very precise 4G total, split exactly 2G+2G between DMA and normal zones. Same thing for the sparse kernel (though I didn't check what an unpatched kernel prints).
Interesting. I register active ranges inside count_node_pages() which is an EFI memmap_walk callback. So, I'd expect to see one call to add_active_range() for each active range in the EFI map;
Quoted 7 lines
add_active_range(0, 0, 4096): Newadd_active_range(0, 0, 131072): Merging forwardadd_active_range(0, 0, 131072): Existingadd_active_range(0, 393216, 523264): Newadd_active_range(0, 393216, 523264): Existingadd_active_range(0, 393216, 524288): Merging forwardadd_active_range(0, 393216, 524288): Existing
That appears fine, but I call add_active_range() after a GRANULEROUNDUP and GRANULEROUNDDOWN has taken place so that might be the problem, especially as all those ranges are aligned on a 16MiB boundary. The following patch calls add_active_range() before the rounding takes place. Can you try it out please?
arch/ia64/mm/discontig.c +1 -1
@@ -636,6 +636,7 @@ static __init int count_node_pages(unsig {unsigned long end = start + len; +add_active_range (node, start >>PAGE_SHIFT , end >>PAGE_SHIFT ); mem_data[node].num_physpages += len >>PAGE_SHIFT ;if (start <=__pa (MAX_DMA_ADDRESS )) mem_data[node].num_dma_physpages +=
@@ -647,7 +648,6 @@ static __init int count_node_pages(unsig end >> PAGE_SHIFT); mem_data[node].min_pfn =min (mem_data[node].min_pfn, start >>PAGE_SHIFT ); -add_active_range (node, start >>PAGE_SHIFT , end >>PAGE_SHIFT );return 0 ; }
--
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>
Quoted 4 lines · Mel Gorman
That appears fine, but I call
add_active_range()after a GRANULEROUNDUP and GRANULEROUNDDOWN has taken place so that might be the problem, especially as all those ranges are aligned on a 16MiB boundary. The following patch callsadd_active_range()before the rounding takes place. Can you try it out please?
That's good. Now I see identical output before/after your patch for the generic (DISCONTIG=y) kernel:
On node 0 totalpages: 259873
DMA zone: 128931 pages, LIFO batch:7
Normal zone: 130942 pages, LIFO batch:7
-Tony
--
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>
Quoted 6 lines · Tony
Quoted 4 lines · Mel Gorman
That appears fine, but I call
add_active_range()after a GRANULEROUNDUP and GRANULEROUNDDOWN has taken place so that might be the problem, especially as all those ranges are aligned on a 16MiB boundary. The following patch callsadd_active_range()before the rounding takes place. Can you try it out please?
Quoted 7 lines
That's good. Now I see identical output before/after your patch for the generic (DISCONTIG=y) kernel:
On node 0 totalpages: 259873
DMA zone: 128931 pages, LIFO batch:7
Normal zone: 130942 pages, LIFO batch:7
Very very cool. Thanks for all the testing.
Signature · 9 lines
Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab -- 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>
Hi Mel.
It looks to me like this code could be used by the software suspend code in our determinations of what pages to save, particularly in the context of memory hotplug support. Just some food for thought at the moment; I'll see if I can come up with a patch when I have some time, but it might help justify getting this merged.
Regards,
Nigel
Quoted 2 lines · Nigel Cunningham
It looks to me like this code could be used by the software suspend code in our determinations of what pages to save
Potentially yes. Currently, the node map and related functions are marked __init so they become unavailable but that is not set in stone.
Quoted 2 lines
, particularly in the context of
memory hotplug support.
Right now during memory hot-add, the memory is not registered with add_active_range(), but it would be straight-forward to add the call to add_memory() of each architecture that supported hotplug for example.
Quoted 4 lines
Just some food for thought at the moment; I'll see if
I can come up with a patch when I have some time, but it might help justify getting this merged.
Thanks
Signature · 9 lines
Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab -- 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>