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: ebiederm@xxxxxxxxxxxx (Eric W. Biederman)
- Date: Fri, 14 Aug 2009 15:17:34 -0700
- Cc: 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: <4A83CD84.8040609@xxxxxxxxxx> (Amerigo Wang's message of "Thu\, 13 Aug 2009 16\:23\:32 +0800")
- List-id: <linux-ia64.vger.kernel.org>
- References: <20090812081731.5757.25254.sendpatchset@xxxxxxxxxxxxxxxxxxxxx> <20090812081906.5757.39417.sendpatchset@xxxxxxxxxxxxxxxxxxxxx> <m1bpmk8l1g.fsf@xxxxxxxxxxxxxxxxx> <4A83893D.50707@xxxxxxxxxx> <m1eirg5j9i.fsf@xxxxxxxxxxxxxxxxx> <4A83CD84.8040609@xxxxxxxxxx>
- User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)
Amerigo Wang <amwang@xxxxxxxxxx> writes:
> 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.
Eric
--
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]