[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Specifying 'mem=' as Linux boot parameter disables the default
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 6a2d93c2b32d332366cc5e8d11e85c476afa8f9b # Parent 21d175472d55522cdbecd2a1018ad5eb35e7d487 Specifying 'mem=' as Linux boot parameter disables the default 8MB slack in the mem_map and the p2m table. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> diff -r 21d175472d55 -r 6a2d93c2b32d linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c Fri Nov 4 10:08:45 2005 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c Fri Nov 4 10:46:10 2005 @@ -936,11 +936,15 @@ /* We don't use the fake e820 because we need to respond to user override. */ void __init find_max_pfn(void) { - if ( xen_override_max_pfn < xen_start_info->nr_pages ) - xen_override_max_pfn = xen_start_info->nr_pages; - max_pfn = xen_override_max_pfn; - /* 8MB slack, to make up for address space allocations in backends. */ - max_pfn += 8 << (20 - PAGE_SHIFT); + if (xen_override_max_pfn == 0) { + max_pfn = xen_start_info->nr_pages; + /* Default 8MB slack (to balance backend allocations). */ + max_pfn += 8 << (20 - PAGE_SHIFT); + } else if (xen_override_max_pfn > xen_start_info->nr_pages) { + max_pfn = xen_override_max_pfn; + } else { + max_pfn = xen_start_info->nr_pages; + } } #endif /* XEN */ diff -r 21d175472d55 -r 6a2d93c2b32d linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c Fri Nov 4 10:08:45 2005 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c Fri Nov 4 10:46:10 2005 @@ -526,15 +526,19 @@ unsigned long __init e820_end_of_ram(void) { - unsigned long max_end_pfn = xen_start_info->nr_pages; - - if ( xen_override_max_pfn < max_end_pfn) - xen_override_max_pfn = max_end_pfn; - - /* 8MB slack, to make up for address space allocations in backends. */ - xen_override_max_pfn += 8 << (20 - PAGE_SHIFT); - - return xen_override_max_pfn; + unsigned long max_end_pfn; + + if (xen_override_max_pfn == 0) { + max_end_pfn = xen_start_info->nr_pages; + /* Default 8MB slack (to balance backend allocations). */ + max_end_pfn += 8 << (20 - PAGE_SHIFT); + } else if (xen_override_max_pfn > xen_start_info->nr_pages) { + max_end_pfn = xen_override_max_pfn; + } else { + max_end_pfn = xen_start_info->nr_pages; + } + + return max_end_pfn; } void __init e820_reserve_resources(void) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |