...of course, the same file says that the removable flag in sysfs should only be one when every memory segment in the block is removable, so it's possible this is a bug in the reporting of the removability of that memory.
On Fri, Dec 6, 2013 at 10:24 PM, Christian Paro <[email protected]>wrote: > With memory hotplug, the removal of hot-plugged memory is also condition > on there not being and "unmovable" memory pages within the memory region > that you're trying to remove - with it returning an EBUSY error if it is > not presently able to offline that region. > > From the memory-hotplug.txt in the kernel source: > >> 6.2. How to offline memory >> ------------ >> You can offline a section by using the same sysfs interface that was used in >> memory onlining. >> >> % echo offline > /sys/devices/system/memory/memoryXXX/state >> >> If offline succeeds, the state of the memory section is changed to be >> "offline". >> If it fails, some error core (like -EBUSY) will be returned by the kernel. >> Even if a section does not belong to ZONE_MOVABLE, you can try to offline it. >> If it doesn't contain 'unmovable' memory, you'll get success. >> >> A section under ZONE_MOVABLE is considered to be able to be offlined easily. >> But under some busy state, it may return -EBUSY. Even if a memory section >> cannot be offlined due to -EBUSY, you can retry offlining it and may be able >> to >> offline it (or not). >> (For example, a page is referred to by some kernel internal call and released >> soon.) >> >> > > > On Fri, Dec 6, 2013 at 9:41 PM, Michael MacIsaac <[email protected]>wrote: > >> Mike, >> >> Thanks for the quick reply. >> >> There are two other chunks online (0 and 1): >> >> # mzlsmemory -v zntc76 >> zntc76: >> Memory in user directory: >> Default memory: 512M >> Standby memory: 1G >> Reserved memory: 0 >> Maximum memory: 2G >> >> Memory block size: 256 MB >> Memory device size: 2 MB >> >> Memory blocks in /sys/devices/system/memory: >> Block Start State Removable >> ----- ----- ----- --------- >> 0 0 online 0 >> 1 256 online 0 >> 2 512 online 1 >> 3 768 offline 0 >> 4 1024 offline 0 >> 5 1280 offline 0 >> Active memory: 768 MB >> Offline memory: 768 MB >> Removable memory: 256 MB >> >> Also, I perform the same step on a SLES 11 SP3 system and the last chunk >> marked removable does go offline. >> >> "Mike MacIsaac" <mikemac at-sign us.ibm.com> >> >> ---------------------------------------------------------------------- >> 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/
