Bug 2219374

Summary: s390x/memory_hotplug: standby memory are onlined automatically during boottime
Product: [Fedora] Fedora Reporter: sumanth <sumanth.korikkar>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: acaringi, adscvr, airlied, alciregi, bskeggs, hca, hdegoede, hpa, jarodwilson, josef, kernel-maint, lgoncalv, linville, masami256, mchehab, ptalbert, steved
Target Milestone: ---   
Target Release: ---   
Hardware: s390x   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description sumanth 2023-07-03 11:31:06 UTC
CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE is enabled on fedora s390 kernel config. This leads to autoonlining of standby memory on zvm during boottime.

Reproducible: Always

Steps to Reproduce:
1. s390 zvm configuration:
#cp define storage 12g standby 3g

2. boot the z/vm

3. Result:
* lsmem
RANGE                                 SIZE  STATE REMOVABLE BLOCK
0x0000000000000000-0x00000003bfffffff  15G online       yes  0-59

Memory block size:       256M
Total online memory:      15G
Total offline memory:      0B

4. grep -R "CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE" config-6.2.9-300.fc38.s390x 
CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y


Actual Results:  
* grep -R "CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE" config-6.2.9-300.fc38.s390x 
CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y

* lsmem
RANGE                                 SIZE  STATE REMOVABLE BLOCK
0x0000000000000000-0x00000003bfffffff  15G online       yes  0-59

Memory block size:       256M
Total online memory:      15G
Total offline memory:      0B



* Due to enablement of auto online feature, all the standby memory are 
converted to online during boottime. 

Expected Results:  
* lsmem
RANGE                                 SIZE   STATE REMOVABLE BLOCK
0x0000000000000000-0x00000002FFFFFFFF   12G  online       yes   0-47
0x0000000300000000-0x00000003BFFFFFFF   3G   offline            48-59

Memory block size:         256M
Total online memory:       12G
Total offline memory:      3G

* Auto online feature should be disabled on s390x. 
* The  CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE config is already disabled on upstream s390 kernel defconfig, as this is recommended.

* Redhat fixes reference:
https://bugzilla.redhat.com/show_bug.cgi?id=1370161

* Redhat has disabled the autoonline feature:
grep -R "CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE" config-5.14.0*.el9.s390x 
# CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE is not set