Re: [PATCH v2 2/4] x86, kdump: Retore crashkernel= to allocate low

From: Vivek Goyal
Date: Thu Apr 04 2013 - 10:16:20 EST


On Wed, Apr 03, 2013 at 05:38:25PM -0700, Yinghai Lu wrote:
> Vivek found old kexec-tools does not work new kernel anymore.
>
> So change back crashkernel= back to old behavoir, and add crashkernel_high=
> to let user decide if buffer could be above 4G, and also new kexec-tools will
> be needed.
>
> v2: let crashkernel=X override crashkernel_high=
> update description about _high will be ignored by crashkernel=X
>
> Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
>
> ---
> Documentation/kernel-parameters.txt | 11 +++++++++--
> arch/x86/kernel/setup.c | 24 +++++++++++++++++++-----
> include/linux/kexec.h | 2 ++
> kernel/kexec.c | 9 +++++++++
> 4 files changed, 39 insertions(+), 7 deletions(-)
>
> Index: linux-2.6/Documentation/kernel-parameters.txt
> ===================================================================
> --- linux-2.6.orig/Documentation/kernel-parameters.txt
> +++ linux-2.6/Documentation/kernel-parameters.txt
> @@ -603,9 +603,14 @@ bytes respectively. Such letter suffixes
> a memory unit (amount[KMG]). See also
> Documentation/kdump/kdump.txt for an example.
>
> + crashkernel_high=size[KMG]
> + [KNL, x86_64] range could be above 4G. Allow kernel
> + to allocate physical memory region from top, so could
> + be above 4G if system have more than 4G ram installed.

Also specify "otherwise memory will be allocated below 4G, if available".

> + It will be ignored if crashkernel=X is specified.
> crashkernel_low=size[KMG]
> - [KNL, x86_64] range under 4G. When crashkernel= is
> - passed, kernel allocate physical memory region
> + [KNL, x86_64] range under 4G. When crashkernel_high= is
> + passed, kernel could allocate physical memory region
> above 4G, that cause second kernel crash on system
> that need swiotlb later. Kernel would try to allocate
> some region below 4G automatically. This one let
> @@ -614,6 +619,8 @@ bytes respectively. Such letter suffixes
> 0: to disable low allocation on systems that do not
> need swiotlb, that will save 72M low ram in first
> kernel.
> + It will be ignored when crashkernel_high=X is not used
> + or return from that is below 4G.

Replace "return from that" with "memory reserved".

Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/