Skip to content
Commit 902c2d91 authored by Ma Wupeng's avatar Ma Wupeng Committed by Ard Biesheuvel
Browse files

memblock: Disable mirror feature if kernelcore is not specified



If system have some mirrored memory and mirrored feature is not specified
in boot parameter, the basic mirrored feature will be enabled and this will
lead to the following situations:

- memblock memory allocation prefers mirrored region. This may have some
  unexpected influence on numa affinity.

- contiguous memory will be split into several parts if parts of them
  is mirrored memory via memblock_mark_mirror().

To fix this, variable mirrored_kernelcore will be checked in
memblock_mark_mirror(). Mark mirrored memory with flag MEMBLOCK_MIRROR iff
kernelcore=mirror is added in the kernel parameters.

Signed-off-by: default avatarMa Wupeng <mawupeng1@huawei.com>
Acked-by: default avatarArd Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20220614092156.1972846-6-mawupeng1@huawei.com


Acked-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent c0b978fe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment