All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/4] mm/memory_hotplug: full support for
@ 2021-09-27 15:05 ` David Hildenbrand
  0 siblings, 0 replies; 61+ messages in thread
From: David Hildenbrand @ 2021-09-27 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Hildenbrand, Andrew Morton, Mike Rapoport, Michal Hocko,
	Oscar Salvador, Jianyong Wu, Aneesh Kumar K . V, Vineet Gupta,
	Geert Uytterhoeven, Huacai Chen, Jiaxun Yang,
	Thomas Bogendoerfer, Heiko Carstens, Vasily Gorbik,
	Christian Borntraeger, Eric Biederman, Arnd Bergmann,
	linux-snps-arc, linux-ia64, linux-m68k, linux-mips, linux-s390,
	linux-mm, kexec

Architectures that require CONFIG_ARCH_KEEP_MEMBLOCK=y, such as arm64,
don't cleanly support add_memory_driver_managed() yet. Most prominently,
kexec_file can still end up placing images on such driver-managed memory,
resulting in undesired behavior.

Teaching kexec to not place images on driver-managed memory is especially
relevant for virtio-mem. Details can be found in commit 7b7b27214bba
("mm/memory_hotplug: introduce add_memory_driver_managed()").

Extend memblock with a new flag and set it from memory hotplug code
when applicable. This is required to fully support virtio-mem on
arm64, making also kexec_file behave like on x86-64.

Alternative A: Extend kexec_walk_memblock() to consult the kernel resource
tree whether IORESOURCE_SYSRAM_DRIVER_MANAGED is set. This feels wrong,
because the goal was to rely on memblock and not the resource tree.

Alternative B: Reuse MEMBLOCK_HOTPLUG. MEMBLOCK_HOTPLUG serves a different
purpose, though.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Jianyong Wu <Jianyong.Wu@arm.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Vineet Gupta <vgupta@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-snps-arc@lists.infradead.org
Cc: linux-ia64@vger.kernel.org
Cc: linux-m68k@lists.linux-m68k.org
Cc: linux-mips@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: kexec@lists.infradead.org

David Hildenbrand (4):
  mm/memory_hotplug: handle memblock_add_node() failures in
    add_memory_resource()
  memblock: allow to specify flags with memblock_add_node()
  memblock: add MEMBLOCK_DRIVER_MANAGED to mimic
    IORESOURCE_SYSRAM_DRIVER_MANAGED
  mm/memory_hotplug: indicate MEMBLOCK_DRIVER_MANAGED with
    IORESOURCE_SYSRAM_DRIVER_MANAGED

 arch/arc/mm/init.c               |  4 ++--
 arch/ia64/mm/contig.c            |  2 +-
 arch/ia64/mm/init.c              |  2 +-
 arch/m68k/mm/mcfmmu.c            |  3 ++-
 arch/m68k/mm/motorola.c          |  6 ++++--
 arch/mips/loongson64/init.c      |  4 +++-
 arch/mips/sgi-ip27/ip27-memory.c |  3 ++-
 arch/s390/kernel/setup.c         |  3 ++-
 include/linux/memblock.h         | 19 ++++++++++++++++---
 include/linux/mm.h               |  2 +-
 kernel/kexec_file.c              |  5 +++++
 mm/memblock.c                    | 13 +++++++++----
 mm/memory_hotplug.c              | 11 +++++++++--
 13 files changed, 57 insertions(+), 20 deletions(-)


base-commit: 5816b3e6577eaa676ceb00a848f0fd65fe2adc29
-- 
2.31.1


^ permalink raw reply	[flat|nested] 61+ messages in thread

end of thread, other threads:[~2021-10-01 14:03 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 15:05 [PATCH v1 0/4] mm/memory_hotplug: full support for David Hildenbrand
2021-09-27 15:05 ` David Hildenbrand
2021-09-27 15:05 ` David Hildenbrand
2021-09-27 15:05 ` David Hildenbrand
2021-09-27 15:05 ` [PATCH v1 1/4] mm/memory_hotplug: handle memblock_add_node() failures in add_memory_resource() David Hildenbrand
2021-09-27 15:05   ` David Hildenbrand
2021-09-27 15:05   ` David Hildenbrand
2021-09-27 15:05   ` David Hildenbrand
2021-09-27 15:05 ` [PATCH v1 2/4] memblock: allow to specify flags with memblock_add_node() David Hildenbrand
2021-09-27 15:05   ` David Hildenbrand
2021-09-27 15:05   ` David Hildenbrand
2021-09-27 15:05   ` David Hildenbrand
2021-09-27 15:19   ` Geert Uytterhoeven
2021-09-27 15:19     ` Geert Uytterhoeven
2021-09-27 15:19     ` Geert Uytterhoeven
2021-09-27 15:19     ` Geert Uytterhoeven
2021-09-27 15:19     ` Geert Uytterhoeven
2021-09-28  9:38   ` Heiko Carstens
2021-09-28  9:38     ` Heiko Carstens
2021-09-28  9:38     ` Heiko Carstens
2021-09-28  9:38     ` Heiko Carstens
2021-09-29 16:25   ` Mike Rapoport
2021-09-29 16:25     ` Mike Rapoport
2021-09-29 16:25     ` Mike Rapoport
2021-09-29 16:25     ` Mike Rapoport
2021-09-29 16:30     ` David Hildenbrand
2021-09-29 16:30       ` David Hildenbrand
2021-09-29 16:30       ` David Hildenbrand
2021-09-29 16:30       ` David Hildenbrand
2021-09-27 15:05 ` [PATCH v1 3/4] memblock: add MEMBLOCK_DRIVER_MANAGED to mimic IORESOURCE_SYSRAM_DRIVER_MANAGED David Hildenbrand
2021-09-27 15:05   ` David Hildenbrand
2021-09-27 15:05   ` David Hildenbrand
2021-09-27 15:05   ` David Hildenbrand
2021-09-29 16:39   ` Mike Rapoport
2021-09-29 16:39     ` Mike Rapoport
2021-09-29 16:39     ` Mike Rapoport
2021-09-29 16:39     ` Mike Rapoport
2021-09-29 16:54     ` David Hildenbrand
2021-09-29 16:54       ` David Hildenbrand
2021-09-29 16:54       ` David Hildenbrand
2021-09-29 16:54       ` David Hildenbrand
2021-09-30 21:21       ` Mike Rapoport
2021-09-30 21:21         ` Mike Rapoport
2021-09-30 21:21         ` Mike Rapoport
2021-09-30 21:21         ` Mike Rapoport
2021-10-01  8:04         ` David Hildenbrand
2021-10-01  8:04           ` David Hildenbrand
2021-10-01  8:04           ` David Hildenbrand
2021-10-01  8:04           ` David Hildenbrand
2021-10-01 14:03           ` Mike Rapoport
2021-10-01 14:03             ` Mike Rapoport
2021-10-01 14:03             ` Mike Rapoport
2021-10-01 14:03             ` Mike Rapoport
2021-09-27 15:05 ` [PATCH v1 4/4] mm/memory_hotplug: indicate MEMBLOCK_DRIVER_MANAGED with IORESOURCE_SYSRAM_DRIVER_MANAGED David Hildenbrand
2021-09-27 15:05   ` [PATCH v1 4/4] mm/memory_hotplug: indicate MEMBLOCK_DRIVER_MANAGED with IORESOURCE_SYSRAM_DRIVER_MAN David Hildenbrand
2021-09-27 15:05   ` [PATCH v1 4/4] mm/memory_hotplug: indicate MEMBLOCK_DRIVER_MANAGED with IORESOURCE_SYSRAM_DRIVER_MANAGED David Hildenbrand
2021-09-27 15:05   ` David Hildenbrand
2021-09-27 15:07 ` [PATCH v1 0/4] mm/memory_hotplug: full support for David Hildenbrand
2021-09-27 15:07   ` David Hildenbrand
2021-09-27 15:07   ` David Hildenbrand
2021-09-27 15:07   ` David Hildenbrand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.