]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
UBUNTU: SAUCE: mm: fix memory hotplug in ZONE_HIGHMEM
authorSeth Forshee <seth.forshee@canonical.com>
Mon, 4 Dec 2017 13:14:41 +0000 (07:14 -0600)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 29 Jan 2018 13:45:00 +0000 (07:45 -0600)
commit94ea0bacb314711c9b958e8a01702b56f66bd2c9
treed8905846abf4ca11642bed61cc6624561b9e0481
parent6ce97a3b2f97f203cbcff19a1c0289e43f87dd8b
UBUNTU: SAUCE: mm: fix memory hotplug in ZONE_HIGHMEM

BugLink: http://bugs.launchpad.net/bugs/1732463
Prior to f1dd2cd13c4b "mm, memory_hotplug: do not associate
hotadded memory to zones until online" 32-bit x86 with
CONFIG_HIGHMEM=y would default to ZONE_HIGHMEM for hotplugged
memory. That commit changed this to ZONE_NORMAL and made it
impossible for hotplugged memory to be added to ZONE_HIGHMEM,
resulting in oopses whenever the kernel tries to use hotplugged
memory that should have been placed in ZONE_HIGHMEM.

This has been reported upstream, but as a temporary fix make the
following changes:

 - If CONFIG_HIGHMEM=y, also look in ZONE_HIGHMEM when searching
   for a matching zone for memory being onlined.

 - Allow the arch to specify the default zone to be used if no
   matching zone is found.

 - Change 32-bit x86 to set the default zone to ZONE_HIGHMEM if
   CONFIG_HIGHMEM=y.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/x86/mm/init_32.c
include/linux/memory_hotplug.h
mm/memory_hotplug.c