[24.04 FEAT] Memory hotplug vmem pages (s390x)

Bug #2051835 reported by bugproxy
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
High
Skipper Bug Screeners
linux (Ubuntu)
Fix Released
High
Canonical Kernel Team
Noble
Fix Released
High
Canonical Kernel Team

Bug Description

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.

Note: there are intentions to tell customers that they should always define the maximum size of standby memory for their LPAR activation profiles. This would allow for maximum flexibility for all LPARs during runtime, given that the amount of standby memory cannot be changed during runtime.

bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-205064 severity-high targetmilestone-inin2404
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → linux (Ubuntu)
Revision history for this message
Frank Heimes (fheimes) wrote :

Thank you for the heads-up - please let us know as soon as the code is available/upstream and where.

Changed in ubuntu-z-systems:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
Changed in linux (Ubuntu):
assignee: Skipper Bug Screeners (skipper-screen-team) → nobody
Changed in ubuntu-z-systems:
importance: Undecided → High
status: New → Incomplete
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2024-03-18 04:24 EDT-------
Hi All,

List of commits from the linux master branch for "memmap on memory" / Memory hotplug vmem pages support are:

9eda317c15ff s390: enable MHP_MEMMAP_ON_MEMORY
890a4212de71 s390/mm: implement MEM_PREPARE_ONLINE/MEM_FINISH_OFFLINE notifiers
fb6d5eb9f4c9 s390/sclp: remove unhandled memory notifier type
1a65b73ae9ab s390/mm: allocate vmemmap pages from self-contained memory range
c5f1e2d18909 mm/memory_hotplug: introduce MEM_PREPARE_ONLINE/MEM_FINISH_OFFLINE notifiers
11684134140b mm/memory_hotplug: fix memmap_on_memory sysfs value retrieval
95a2ac937013 mm: use vmem_altmap code without CONFIG_ZONE_DEVICE
f42ce5f087eb mm/memory_hotplug: fix error handling in add_memory_resource()
001002e73712 mm/memory_hotplug: add missing mem_hotplug_lock
e3f4170ccf20 s390/sclp: handle default case in sclp memory notifier

Thank you

Revision history for this message
Frank Heimes (fheimes) wrote : Re: [24.04 FEAT] Memory hotplug vmem pages

Many thanks for the detailed list of commits!

A quick upstream analysis showed that (as of today) the top 5 are not yet tagged for a certain kernel version, and with that also not incl. in kernel 6.8, but the bottom 5 are:

next-20240223 9eda317c15ff s390: enable MHP_MEMMAP_ON_MEMORY
next-20240223 890a4212de71 s390/mm: implement MEM_PREPARE_ONLINE/MEM_FINISH_OFFLINE notifiers
next-20240223 fb6d5eb9f4c9 s390/sclp: remove unhandled memory notifier type
next-20240223 1a65b73ae9ab s390/mm: allocate vmemmap pages from self-contained memory range
next-20240223 c5f1e2d18909 mm/memory_hotplug: introduce MEM_PREPARE_ONLINE/MEM_FINISH_OFFLINE notifiers
v6.8-rc1 11684134140b mm/memory_hotplug: fix memmap_on_memory sysfs value retrieval
v6.8-rc1 95a2ac937013 mm: use vmem_altmap code without CONFIG_ZONE_DEVICE
v6.7-rc5 f42ce5f087eb mm/memory_hotplug: fix error handling in add_memory_resource()
v6.7-rc5 001002e73712 mm/memory_hotplug: add missing mem_hotplug_lock
v6.7-rc1 e3f4170ccf20 s390/sclp: handle default case in sclp memory notifier

And since 6.8 is the target kernel for noble / 24.04, only c5f1e2d18909 to 9eda317c15ff need to be cherry picked. We'll work on the submission to the Canonical kernel team ...

Changed in linux (Ubuntu):
status: Incomplete → New
Changed in ubuntu-z-systems:
status: Incomplete → New
Frank Heimes (fheimes)
information type: Private → Public
Frank Heimes (fheimes)
summary: - [24.04 FEAT] Memory hotplug vmem pages
+ [24.04 FEAT] Memory hotplug vmem pages (s390x)
Revision history for this message
Frank Heimes (fheimes) wrote :
Changed in linux (Ubuntu):
importance: Undecided → High
status: New → In Progress
Changed in ubuntu-z-systems:
status: New → In Progress
Changed in linux (Ubuntu Noble):
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
Revision history for this message
Frank Heimes (fheimes) wrote :

Got marked as APPLIED by kernel team (Paolo).

Revision history for this message
Frank Heimes (fheimes) wrote :

This is not incl. in Ubuntu-6.8.0-20.20, but will be included in the next updated kernel.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 6.8.0-31.31

---------------
linux (6.8.0-31.31) noble; urgency=medium

  * noble/linux: 6.8.0-31.31 -proposed tracker (LP: #2062933)

  * Packaging resync (LP: #1786013)
    - [Packaging] debian.master/dkms-versions -- update from kernel-versions
      (main/d2024.04.04)

 -- Andrea Righi <email address hidden> Fri, 19 Apr 2024 23:46:38 +0200

Changed in linux (Ubuntu Noble):
status: In Progress → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.