diff options
author | Amerigo Wang <amwang@redhat.com> | 2009-12-15 16:47:46 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 07:20:13 -0800 |
commit | 06a7f711246b081afc21fff859f1003f1f2a0fbc (patch) | |
tree | aece49693ad751923ce71387201d3c3e6214e335 /include | |
parent | 1f2c19f8c959c1d0ccd3e33b1f480593b66d95dd (diff) |
kexec: premit reduction of the reserved memory size
Implement shrinking the reserved memory for crash kernel, if it is more
than enough.
For example, if you have already reserved 128M, now you just want 100M,
you can do:
# echo $((100*1024*1024)) > /sys/kernel/kexec_crash_size
Note, you can only do this before loading the crash kernel.
Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Neil Horman <nhorman@redhat.com>
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kexec.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index adc34f2c6ef..c356b6914ff 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h @@ -206,6 +206,8 @@ extern size_t vmcoreinfo_max_size; int __init parse_crashkernel(char *cmdline, unsigned long long system_ram, unsigned long long *crash_size, unsigned long long *crash_base); +int crash_shrink_memory(unsigned long new_size); +size_t crash_get_memory_size(void); #else /* !CONFIG_KEXEC */ struct pt_regs; |