From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: "Ingo Molnar" <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Andrew Morton" <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: use add_highpages_with_active_regions for high pages init
Date: Sun, 15 Jun 2008 21:39:09 -0700 [thread overview]
Message-ID: <86802c440806152139q13c2a2fay2c518f5b95c3d9ed@mail.gmail.com> (raw)
In-Reply-To: <86802c440806152046s71916de8g6f8e3e8d272d336a@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]
On Sun, Jun 15, 2008 at 8:46 PM, Yinghai Lu <yhlu.kernel@gmail.com> wrote:
> On Sun, Jun 15, 2008 at 6:20 PM, Huang, Ying <ying.huang@intel.com> wrote:
>> On Sat, 2008-06-14 at 02:05 -0700, Yinghai Lu wrote:
>>> On Sat, Jun 14, 2008 at 1:23 AM, Ingo Molnar <mingo@elte.hu> wrote:
>>> >
>>> > * Yinghai Lu <yhlu.kernel@gmail.com> wrote:
>>> >
>>> >> use early_node_map to init high pages, so can remove page_is_ram and
>>> >> page_is_reserved_early in the big loop with add_one_highpage
>>> >>
>>> >> also remove the page_is_reserved_early that is not needed.
>>> >
>>> > applied to tip/x86/mpparse for testing, thanks.
>>> >
>>> > Andrew: mm/page_alloc.c modification.
>>>
>>> Ying Huang,
>>>
>>> I removed page_is_reserved_early....it cause init highmem take extra
>>> time on my big box.
>>
>> OK.
>>
>>> please check efi_reserve_early that is calling reserve_early. so need
>>> to make sure "EFI memmap" is reserved in itself...otherwise you may
>>> need to update e820 table by add_memory_region (....,
>>> E820_RESERVED)...
>>
>> EFI memmap may be in highmem, it can not be reserved by bootmem
>> allocator on i386. So I think it is necessary to have an early highmem
>> allocator. It can be used for EFI memory map and linked list of setup
>> data which comes from boot-loader and may be located in highmem.
>>
>> As for the implementation, what about adding a remove_active_range()
>> which operate on early_node_map and an early_res_to_early_node_map()?
>
> don't need,
> EFI memmap should be reserved in e820map, so it should not show up in
> early_node_map.
> if it is not reserved in e820map, you could use e820_add_region or
> e820_update_range make it reserved
something like attached patch
YH
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: efi_memmap.patch --]
[-- Type: text/x-patch; name=efi_memmap.patch, Size: 1136 bytes --]
[PATCH] x86: reserve efi map itself in e820 map
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c
index d5c7fcd..f0869bb 100644
--- a/arch/x86/kernel/efi.c
+++ b/arch/x86/kernel/efi.c
@@ -235,6 +235,8 @@ static void __init add_efi_memmap(void)
e820_type = E820_RESERVED;
e820_add_region(start, size, e820_type);
}
+ e820_add_region(memmap.phys_map, memmap.nr_map * memmap.desc_size,
+ E820_RESERVED);
sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
}
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index de2645e..5fa241e 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -370,6 +370,9 @@ void __init setup_arch(char **cmdline_p)
early_gart_iommu_check();
+ if (efi_enabled)
+ efi_init();
+
e820_register_active_regions(0, 0, -1UL);
/*
* partially used pages are not usable - thus
@@ -392,8 +395,6 @@ void __init setup_arch(char **cmdline_p)
check_efer();
max_pfn_mapped = init_memory_mapping(0, (end_pfn << PAGE_SHIFT));
- if (efi_enabled)
- efi_init();
vsmp_init();
next prev parent reply other threads:[~2008-06-16 4:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-14 3:05 [PATCH] x86: replace shrink pages with remove_active_ranges v2 Yinghai Lu
2008-06-14 3:07 ` [PATCH] x86: cleanup reloated_initrd Yinghai Lu
2008-06-14 8:28 ` Ingo Molnar
2008-06-14 18:41 ` H. Peter Anvin
2008-06-14 19:27 ` Yinghai Lu
2008-06-14 19:39 ` H. Peter Anvin
2008-06-14 22:08 ` Yinghai Lu
2008-06-14 6:23 ` [PATCH] x86: replace shrink pages with remove_active_ranges v2 Ingo Molnar
2008-06-14 7:56 ` [PATCH] x86: use add_highpages_with_active_regions for high pages init Yinghai Lu
2008-06-14 8:23 ` Ingo Molnar
2008-06-14 8:50 ` Ingo Molnar
2008-06-14 8:59 ` Ingo Molnar
2008-06-14 9:05 ` Yinghai Lu
2008-06-16 1:20 ` Huang, Ying
2008-06-16 3:46 ` Yinghai Lu
2008-06-16 4:39 ` Yinghai Lu [this message]
2008-06-16 5:37 ` Huang, Ying
2008-06-16 5:38 ` H. Peter Anvin
2008-06-16 5:43 ` Yinghai Lu
2008-06-16 5:45 ` Huang, Ying
2008-06-15 1:32 ` [PATCH] x86: use add_highpages_with_active_regions for high pages init v2 Yinghai Lu
2008-06-16 8:09 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86802c440806152139q13c2a2fay2c518f5b95c3d9ed@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®