open-power-host-os / linux

Linux kernel source tree
Other
3 stars 4 forks source link

[Regression] With 4.15.0-2.rc9.dev kernel memory hotplug is not working #27

Closed nasastry closed 6 years ago

nasastry commented 6 years ago
Mirrored with LTC bug https://bugzilla.linux.ibm.com/show_bug.cgi?id=164142 Guest and Host are at the same level of kernel i.e. 4.15.0-2.rc9.dev.git03552b2.el7.centos.ppc64le With 4.14.0-3.git68b4afb.el7.centos.ppc64le kernel able to do memory hotplug. Steps to re-produce: 1. Start a guest with the following in the guest xml `2621440` 2. Check the memory at guest before hotplug ``` # cat /proc/meminfo | grep -i memtotal MemTotal: 1014464 kB ``` 3. Hot plug memory from Host hotplug xml: ``` # cat mem_hp_512m.xml 524288 ``` ``` # virsh attach-device nrs mem_hp_512m.xml --live Device attached successfully ``` 4. Check the guest memory ``` # cat /proc/meminfo | grep -i memtotal MemTotal: 1014464 kB ``` ``` from dmesg: [ 65.938167] pseries-hotplug-mem: Attempting to hot-add 2 LMB(s) at index 80000004 [ 65.975206] radix-mmu: Mapped 0xc000000040000000-0xc000000050000000 with 2.00 MiB pages [ 65.977148] radix-mmu: Mapped 0xc000000050000000-0xc000000060000000 with 2.00 MiB pages [ 65.978832] pseries-hotplug-mem: Memory at 40000000 (drc index 80000004) was hot-added [ 65.979941] pseries-hotplug-mem: Memory at 50000000 (drc index 80000005) was hot-added ``` From old kernel on guest: i.e. `4.14.0-3.git68b4afb.el7.centos.ppc64le` Before hotplug ``` # cat /proc/meminfo | grep -i memtotal MemTotal: 1539456 kB ``` After hotplug ``` # cat /proc/meminfo | grep -i memtotal MemTotal: 2063744 kB ``` Required services are running: ``` [root@localhost ~]# systemctl status rtas_errd.service ● rtas_errd.service - ppc64-diag rtas_errd (platform error handling) Service Loaded: loaded (/usr/lib/systemd/system/rtas_errd.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2018-01-31 08:34:29 EST; 2min 21s ago Process: 808 ExecStart=/usr/sbin/rtas_errd (code=exited, status=0/SUCCESS) Main PID: 817 (rtas_errd) CGroup: /system.slice/rtas_errd.service └─817 /usr/sbin/rtas_errd Jan 31 08:34:29 localhost.localdomain systemd[1]: Starting ppc64-diag rtas_er... Jan 31 08:34:29 localhost.localdomain systemd[1]: Started ppc64-diag rtas_err... Hint: Some lines were ellipsized, use -l to show in full. ``` Libvirt and QEMU rpm levels: ``` # rpm -qa | grep "qemu\|libvirt" libvirt-daemon-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-config-network-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-driver-storage-logical-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-driver-secret-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-libs-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-driver-storage-core-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-driver-nwfilter-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-driver-qemu-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-driver-lxc-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-driver-storage-disk-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-driver-storage-iscsi-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-driver-storage-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-driver-nodedev-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-client-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-devel-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le qemu-img-2.11.0-1.dev.gite7153e0.el7.centos.ppc64le qemu-common-2.11.0-1.dev.gite7153e0.el7.centos.ppc64le qemu-system-ppc-2.11.0-1.dev.gite7153e0.el7.centos.ppc64le ipxe-roms-qemu-20170123-1.git4e85b27.el7_4.1.noarch qemu-2.11.0-1.dev.gite7153e0.el7.centos.ppc64le libvirt-python-3.2.0-3.el7_4.1.ppc64le libvirt-daemon-driver-network-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-config-nwfilter-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-driver-storage-mpath-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-driver-storage-scsi-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le libvirt-daemon-driver-interface-4.0.0-2.dev.git5e6f8a1.el7.centos.ppc64le qemu-system-x86-2.11.0-1.dev.gite7153e0.el7.centos.ppc64le ``` Using the devel version of the packages.
cdeadmin commented 6 years ago

------- Comment From bharata.rao@in.ibm.com 2018-02-01 00:46:08 EDT------- Reported and fixed here: https://marc.info/?l=linux-mm&m=151730101720645&w=2

Fix is already in -mm kernel tree. Please follow up and ensure the fix gets in to all required guest distros as and when required.

------- Comment From bharata.rao@in.ibm.com 2018-02-01 00:52:09 EDT------- http://ozlabs.org/~akpm/mmots/broken-out/mm-memory_hotplug-fix-memmap-initialization.patch

That's the fix.