New systemd (I think starting from systemd-219-19) will online/consume standby memory during startup. Commenting out udev memory hotadd rule is not enough.
The following did work during my testing: 1- in /etc/systemd/system.conf: DefaultMemoryAccounting=yes 2- comment out memory hotadd line in udev rules 3- rebuild initramfs Best Regards, Mohammad Y. Zachariah System Support Representative , Linux Support To open or view an IBM PMR electronically http://www.ibm.com/support/servicerequest/help/srHelp.action Phone: 303 - 354 - 8832 E-mail: [email protected] B145 IBM Smart Village Cairo Egypt From: Heiko Carstens <[email protected]> To: [email protected] Date: 08/30/2016 01:24 PM Subject: Re: Offline/STANDBY memory - Linux vs z/VM Sent by: Linux on 390 Port <[email protected]> On Tue, Aug 30, 2016 at 06:23:50AM -0400, Michael MacIsaac wrote: > > Hmmm... a difference of exactly 512MB. > That's two chunks, since a chunk is 256 MB. > > I hard rebooted and this time Linux took three extra chunks: (just can't > keep his hands out of the cookie jar :)) > > # zruncommand linux255 lsmem > Address Range Size (MB) State Removable Device > =============================================================================== > 0x0000000000000000-0x000000000fffffff 256 online no 0-15 > 0x0000000010000000-0x000000002fffffff 512 online yes 16-47 > 0x0000000030000000-0x000000004fffffff 512 online no 48-79 > 0x0000000050000000-0x000000005fffffff 256 online yes 80-95 > 0x0000000060000000-0x000000006fffffff 256 online no 96-111 > 0x0000000070000000-0x00000001ffffffff 6400 offline - > 112-511 > > Memory device size : 16 MB > Memory block size : 256 MB > Total online memory : 1792 MB > Total offline memory: 6400 MB > > Here's /proc/meminfo. This is SLES 12 SP1. Maybe one of the linux kernel > developers will chime in ... Just installed SLES 12 SP1 in order to see if I can reproduce this. And yes, I see something similar. The extra "onlining" however is not caused by the kernel but by a systemd/udev rule: See /usr/lib/udev/rules.d/80-hotplug-cpu-mem.rules If you uncomment the "Hotplug physical memory" rule then the system would behave as expected; it wouldn't online any standby memory by itself. (I'm wondering why the udev rule doesn't cause onlining of _all_ standby memory - but that is a different issue) In my humble opinion this rule should be removed since it is doing the opposite of what is expected on s390. ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For more information on Linux on System z, visit http://wiki.linuxvm.org/ ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For more information on Linux on System z, visit http://wiki.linuxvm.org/
