[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A8D144C.5050005@redhat.com>
Date: Thu, 20 Aug 2009 17:15:56 +0800
From: Amerigo Wang <amwang@...hat.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
CC: "Eric W. Biederman" <ebiederm@...ssion.com>,
linux-kernel@...r.kernel.org, tony.luck@...el.com,
linux-ia64@...r.kernel.org, linux-mm@...ck.org,
Neil Horman <nhorman@...hat.com>,
Andi Kleen <andi@...stfloor.org>, akpm@...ux-foundation.org,
bernhard.walle@....de, Fenghua Yu <fenghua.yu@...el.com>,
Ingo Molnar <mingo@...e.hu>,
Anton Vorontsov <avorontsov@...mvista.com>
Subject: Re: [Patch 8/8] kexec: allow to shrink reserved memory
KAMEZAWA Hiroyuki wrote:
> On Wed, 19 Aug 2009 10:41:13 +0800
> Amerigo Wang <amwang@...hat.com> wrote:
>
>
>> KAMEZAWA Hiroyuki wrote:
>>
>>> On Tue, 18 Aug 2009 18:35:32 +0800
>>> Amerigo Wang <amwang@...hat.com> wrote:
>>>
>>>
>>>
>>>> KAMEZAWA Hiroyuki wrote:
>>>>
>>>>
>>>>> On Tue, 18 Aug 2009 14:31:23 +0800
>>>>> Amerigo Wang <amwang@...hat.com> wrote:
>>>>>
>>>>>
>>>>>
>>>>>>> It's hidden from the system before mem_init() ?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> Not sure, but probably yes. It is reserved in setup_arch() which is
>>>>>> before mm_init() which calls mem_init().
>>>>>>
>>>>>> Do you have any advice to free that reserved memory after boot? :)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> Let's see arch/x86/mm/init.c::free_initmem()
>>>>>
>>>>> Maybe it's all you want.
>>>>>
>>>>> - ClearPageReserved()
>>>>> - init_page_count()
>>>>> - free_page()
>>>>> - totalram_pages++
>>>>>
>>>>>
>>>>>
>>>> Just FYI: calling ClearPageReserved() caused an oops: "Unable to handle
>>>> paging request".
>>>>
>>>> I am trying to figure out why...
>>>>
>>>>
>>>>
>>> Hmm...then....memmap is not there.
>>> pfn_valid() check will help you. What arch ? x86-64 ?
>>>
>>>
>> Hmm, yes, x86_64, but this code is arch-independent, I mean it should
>> work or not work on all arch, no?
>>
>> So I am afraid we need to use other API to free it...
>>
>>
> The, problem is whether memmap is there or not. That's all.
> plz see init sequence and check there are memmap.
> If memory-for-crash is obtained via bootmem,
> Don't you try to free memory hole ?
>
Hi,
It looks like that mem_map has 'struct page' for the reserved memory, I
checked my "early_node_map[] active PFN ranges" output, the reserved
memory area for crash kernel is right in one range. Am I missing
something here?
I don't know why that oops comes out, maybe because of no PTE for thoese
pages?
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists