mbox series

[N,0/6] Memory hotplug vmem pages (s390x) (LP: 2051835)

Message ID 20240319130415.495851-1-frank.heimes@canonical.com
Headers show
Series Memory hotplug vmem pages (s390x) (LP: 2051835) | expand

Message

Frank Heimes March 19, 2024, 1:04 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/2051835

The current s390 specific memory hotplug backend allocates 'struct page'
management structures for all standby memory regions, when those standby
regions are detected at ipl time.
The reason for this is, that setting standby online memory is supposed to
succeed especially in memory constrained environments, since lack of free
memory is likely the reason why additional memory is brought online.
If in such cases 'struct pages' would have to be allocated before memory
could be brought up, this would likely fail, and contradict the whole
rationale of memory hotplug.

However pre-allocating memory for 'struct pages' comes with the downside
that for highly unbalanced ratios of online/standby memory a system might
even fail to ipl, because there is not enough memory available for all
possible struct pages which are required for standby memory.

The idea is to improve the situation: when standby memory is brought
online, the memory for struct pages (and maybe other management structures)
required for this new memory area should be taken from the online memory,
instead of pre-allocating them.

This would solve the problems with unbalanced ratios as described above.

Frank Heimes (1):
  UBUNTU: [Config] enable CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE and
    CONFIG_MHP_MEMMAP_ON_MEMORY for s390x

Sumanth Korikkar (5):
  mm/memory_hotplug: introduce MEM_PREPARE_ONLINE/MEM_FINISH_OFFLINE
    notifiers
  s390/mm: allocate vmemmap pages from self-contained memory range
  s390/sclp: remove unhandled memory notifier type
  s390/mm: implement MEM_PREPARE_ONLINE/MEM_FINISH_OFFLINE notifiers
  s390: enable MHP_MEMMAP_ON_MEMORY

 arch/s390/Kconfig                |  1 +
 arch/s390/mm/init.c              |  3 --
 arch/s390/mm/vmem.c              | 62 ++++++++++++++++++--------------
 debian.master/config/annotations |  8 +++--
 drivers/base/memory.c            | 23 +++++++++++-
 drivers/s390/char/sclp_cmd.c     | 44 ++++++++++++++++++-----
 include/linux/memory.h           |  9 +++++
 include/linux/memory_hotplug.h   | 18 +++++++++-
 include/linux/memremap.h         |  1 +
 mm/memory_hotplug.c              | 17 +++++++--
 mm/sparse.c                      |  3 +-
 11 files changed, 142 insertions(+), 47 deletions(-)

Comments

Paolo Pisati March 19, 2024, 3:55 p.m. UTC | #1
On Tue, Mar 19, 2024 at 02:04:09PM +0100, frank.heimes@canonical.com wrote:
> BugLink: https://bugs.launchpad.net/bugs/2051835

Applied.