Re: [Patch 8/8] kexec: allow to shrink reserved memory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Amerigo Wang <amwang@xxxxxxxxxx>
- Subject: Re: [Patch 8/8] kexec: allow to shrink reserved memory
- From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
- Date: Tue, 18 Aug 2009 17:25:52 +0900
- Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, tony.luck@xxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, Neil Horman <nhorman@xxxxxxxxxx>, Andi Kleen <andi@xxxxxxxxxxxxxx>, akpm@xxxxxxxxxxxxxxxxxxxx, bernhard.walle@xxxxxx, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Anton Vorontsov <avorontsov@xxxxxxxxxxxxx>
- In-reply-to: <4A8A4ABB.70003@xxxxxxxxxx>
- List-id: <linux-ia64.vger.kernel.org>
- Organization: FUJITSU Co. LTD.
- References: <20090812081731.5757.25254.sendpatchset@xxxxxxxxxxxxxxxxxxxxx> <20090812081906.5757.39417.sendpatchset@xxxxxxxxxxxxxxxxxxxxx> <m1bpmk8l1g.fsf@xxxxxxxxxxxxxxxxx> <4A83893D.50707@xxxxxxxxxx> <m1eirg5j9i.fsf@xxxxxxxxxxxxxxxxx> <4A83CD84.8040609@xxxxxxxxxx> <m1tz0avy4h.fsf@xxxxxxxxxxxxxxxxx> <4A8927DD.6060209@xxxxxxxxxx> <20090818092939.2efbe158.kamezawa.hiroyu@xxxxxxxxxxxxxx> <4A8A4ABB.70003@xxxxxxxxxx>
On Tue, 18 Aug 2009 14:31:23 +0800
Amerigo Wang <amwang@xxxxxxxxxx> wrote:
> Hi, thank you!
> > Can I have a question ?
> >
> > - How crash kernel's memory is preserved at boot ?
> >
>
> Use bootmem, I think.
>
I see.
In x86,
setup_arch()
-> reserve_crashkernel()
-> find_and_reserve_crashkernel()
-> reserve_bootmem_generic()
Then, all "active range" is already registered and there are memmap.
> > 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++
But it has no argumetns. Maybe you need your own function or modification.
online_pages() does very similar. But, hmm,.. writing something open coded one
for crashkernel is not very bad, I think.
Thanks,
-Kame
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]