WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] linux x86/64: No need to pre-allocate all

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] linux x86/64: No need to pre-allocate all fixmap pagetables:
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Mar 2007 11:31:09 -0800
Delivery-date: Wed, 07 Mar 2007 12:59:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1173188465 0
# Node ID 200d13363a38cb84ab1a75aca6d0a31f9390ecaa
# Parent  ae203b55e7c833b8ed934fab8e06d00e694ae989
linux x86/64: No need to pre-allocate all fixmap pagetables:
just those for bt_ioremap().
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff -r ae203b55e7c8 -r 200d13363a38 
linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c    Tue Mar 06 11:53:37 
2007 +0000
+++ b/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c    Tue Mar 06 13:41:05 
2007 +0000
@@ -708,19 +708,22 @@ static void xen_finish_init_mapping(void
                WARN_ON(HYPERVISOR_update_va_mapping(
                        start, __pte_ma(0), 0));
 
-       /* Initialise all fixmap pagetables. Use 'start_pfn' allocator. */
+       /* Allocate pte's for initial fixmaps from 'start_pfn' allocator. */
        table_end = ~0UL;
-       for (i = 0; i < __end_of_fixed_addresses; i++)
+
+       /*
+        * Prefetch pte's for the bt_ioremap() area. It gets used before the
+        * boot-time allocator is online, so allocate-on-demand would fail.
+        */
+       for (i = FIX_BTMAP_END; i <= FIX_BTMAP_BEGIN; i++)
                __set_fixmap(i, 0, __pgprot(0));
-       table_end = start_pfn;
-
-       /* Switch to the real shared_info page, and clear the
-        * dummy page. */
+
+       /* Switch to the real shared_info page, and clear the dummy page. */
        set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
        HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
        memset(empty_zero_page, 0, sizeof(empty_zero_page));
 
-       /* Setup mapping of lower 1st MB */
+       /* Set up mapping of lowest 1MB of physical memory. */
        for (i = 0; i < NR_FIX_ISAMAPS; i++)
                if (is_initial_xendomain())
                        set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
@@ -729,6 +732,9 @@ static void xen_finish_init_mapping(void
                                     virt_to_mfn(empty_zero_page)
                                     << PAGE_SHIFT,
                                     PAGE_KERNEL_RO);
+
+       /* Disable the 'start_pfn' allocator. */
+       table_end = start_pfn;
 }
 
 /* Setup the direct mapping of the physical memory at PAGE_OFFSET.

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] linux x86/64: No need to pre-allocate all fixmap pagetables:, Xen patchbot-unstable <=