Re: [Patch 8/8] kexec: allow to shrink reserved memory
From: Amerigo Wang <hidden>
Date: 2009-08-18 06:31:26
Also in:
lkml
KAMEZAWA Hiroyuki wrote:
On Mon, 17 Aug 2009 17:50:21 +0800 Amerigo Wang [off-list ref] wrote:quoted
Eric W. Biederman wrote:quoted
Amerigo Wang [off-list ref] writes:quoted
Not that simple, marking it as "__init" means it uses some "__init" data which will be dropped after initialization.If we start with the assumption that we will be reserving to much and will free the memory once we know how much we really need I see a very simple way to go about this. We ensure that the reservation of crash kernel memory is done through a normal allocation so that we have struct page entries for every page. On 32bit x86 that is an extra 1MB for a 128MB allocation. Then when it comes time to release that memory we clear whatever magic flags we have on the page (like PG_reserve) and call free_page.Hmm, my MM knowledge is not good enough to judge if this works... I need to check more MM source code. Can any MM people help?Hm, memory-hotplug guy is here.
Hi, thank you!
Can I have a question ? - How crash kernel's memory is preserved at boot ?
Use bootmem, I think.
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? :) Thanks. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>