[pve-devel] qemu memory hotplug limited to 64 dimm

Alexandre DERUMIER aderumier at odiso.com
Wed Dec 14 17:05:20 CET 2016


>>Apparently I do have to explicitly mention that I'm talking about *unused* memory, iow. memory where the /sys/../enabled file is 0. I think this was working at some point on modern guest >>kernels?

do you mean "online" instead "enabled" ?

also here some notes I have set in the wiki



online should be set by an udev rules, to auto online dimm on hotplug

/lib/udev/rules.d/80-hotplug-cpu-mem.rules
SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ATTR{online}="1"
SUBSYSTEM=="memory", ACTION=="add", TEST=="state", ATTR{state}=="offline", ATTR{state}="online"

for linux kernel >= 4.7,
you don't need the udev rule for memory hotplug, you only need to add this kernel parameter at boot:

memhp_default_state=online

Memory hot-unplug
- Memory unplug don't work windows currently (<=win10 currently)
- Memory unplug can't be unstable on linux (<= kernel 4.8 currently)
for Linux memory unplug, you need have movable zone enabled in kernel config (not enabled by default on debian/ubuntu)
CONFIG_MOVABLE_NODE=YES
and
"movable_node" boot kernel parameter enabled



----- Mail original -----
De: "Wolfgang Bumiller" <w.bumiller at proxmox.com>
À: "Alexandre Derumier" <aderumier at odiso.com>
Cc: "pve-devel" <pve-devel at pve.proxmox.com>, "dietmar" <dietmar at proxmox.com>
Envoyé: Mercredi 14 Décembre 2016 16:44:52
Objet: Re: [pve-devel] qemu memory hotplug limited to 64 dimm

> On December 14, 2016 at 3:45 PM Alexandre DERUMIER <aderumier at odiso.com> wrote: 
> 
> 
> >>3) Drop support for hot*UN*plugging altogether and simply always hot-add 
> >>one big dimm. ;-) 
> >>On that note, my guests currently hang when I unplug memory and I bet 
> >>that happens to all of you and nobody ever noticed because nobody needs 
> >>that feature anyway ;-) 
> 
> yes, it's a linux guest limitation. (qemu implementation is ok), but linux kernel memory is not movable currently, and if it's located on a dimm, you can't unplug it, as the kernel memory can't be move at another location. 

Apparently I do have to explicitly mention that I'm talking about *unused* memory, iow. memory where the /sys/../enabled file is 0. I think this was working at some point on modern guest kernels? 




More information about the pve-devel mailing list