lkml.org 
[lkml]   [2009]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch 8/8] kexec: allow to shrink reserved memory
KAMEZAWA Hiroyuki wrote:
> On Tue, 18 Aug 2009 18:35:32 +0800
> Amerigo Wang <amwang@redhat.com> wrote:
>
>
>> KAMEZAWA Hiroyuki wrote:
>>
>>> On Tue, 18 Aug 2009 14:31:23 +0800
>>> Amerigo Wang <amwang@redhat.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...

Thanks.




\
 
 \ /
  Last update: 2009-08-19 04:43    [W:0.139 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site