------- Comment From leona...@ibm.com 2018-12-21 12:10 EDT-------
Hello,

I have been trying to reproduce this bug over this week, but I couldn't
do so on Ubuntu.

Could anyone verify what I have been doing wrong?

#################

## QEMU

I have built version Qemu 3.1.0 and made sure the patch that enables THP was 
included:
../configure 
--target-list=ppc-linux-user,ppc64-linux-user,ppc64le-linux-user,ppc-softmmu,ppc64-softmmu
 --enable-debug-info --enable-trace-backends=log --python=/usr/bin/python3 && 
make -j $(nproc)'

./ppc-softmmu/qemu-system-ppc -version
QEMU emulator version 3.1.0 (v3.1.0-dirty)

## Kernel

uname -a
Linux NAME 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:14:44 UTC 2018 
ppc64le ppc64le ppc64le GNU/Linux

cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never

## CLI command

Both commands were sent on the same host,  (1) is the "migrating from"
instance and (2) is the "migrate to" instance.

(1)
MALLOC_PERTURB_=1 /home/leonardo/qemu/build/ppc64-softmmu/qemu-system-ppc64 \
-nographic \
-serial mon:stdio \
-S  \
-name 'avocado-vt-vm1'  \
-machine pseries  \
-nodefaults  \
-vga std \
-device pci-bridge,id=pci_bridge,bus=pci.0,addr=0x3,chassis_nr=1  \
-device virtio-serial-pci,id=virtio_serial_pci0,bus=pci.0,addr=0x4 \
-object rng-random,filename=/dev/random,id=passthrough-RHq4nIpF \
-device 
virtio-rng-pci,id=virtio-rng-pci-aXCni2OX,rng=passthrough-RHq4nIpF,bus=pci.0,addr=0x5
 \
-device nec-usb-xhci,id=usb1,bus=pci.0,addr=0x6 \
-device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=0x7 \
-drive 
id=drive_image1,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/leonardo/images/ubuntu-18.04-ppc64le.qcow2
 \
-device scsi-hd,id=image1,drive=drive_image1 \
-m 8192  \
-smp 4,maxcpus=4,cores=2,threads=1,sockets=2 \
-device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
-vnc :0  \
-rtc base=utc,clock=host  \
-boot order=cdn,once=c,menu=off,strict=off \
-enable-kvm  \
-watchdog i6300esb \
-watchdog-action reset \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9

(2) Same as above. Changes only a few stuff:
- -name 'avocado-vt-vm1'  \
+ -name 'avocado-vt-vm2'  \
- -vnc :0  \
+ -vnc :1  \
+ -incoming tcp:0:5801 \

## Testing and Results

(1) On guest :
# stress --io 5 --cpu 4
stress: info: [812] dispatching hogs: 4 cpu, 5 io, 0 vm, 0 hdd

(1) on Qemu Terminal:
(qemu) migrate_set_speed 256
(qemu) migrate -d tcp:0:5801
(qemu) info migrate
globals:
store-global-state: on
only-migratable: off
send-configuration: on
send-section-footer: on
capabilities: xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off 
compress: off events: off postcopy-ram: off x-colo: off release-ram: off block: 
off return-path: off pause-before-switchover: off x
-multifd: off dirty-bitmaps: off
Migration status: completed
total time: 1776 milliseconds
downtime: 61 milliseconds
setup: 9 milliseconds
transferred ram: 422571 kbytes
throughput: 1964.89 mbps
remaining ram: 0 kbytes
total ram: 8405056 kbytes
duplicate: 2006371 pages
skipped: 0 pages
normal: 101037 pages
normal bytes: 404148 kbytes
dirty sync count: 3
page size: 4 kbytes
(qemu) info status
VM status: paused (postmigrate)

It's all over on ~2 seconds, no issues. Stress stay running on the new
machine. (after cont)

###

Other Qemu tested, with the same result:
v2.12 git
v3.0.0 git
Debian 1:2.12+dfsg-3ubuntu8)

Other Host Kernel tested, with the same result:
4.18.0 - Vanilla, no patch
4.15.0-42-generic
4.15.0-42-generic + patch
4.15.0-32-generic (provided by jsalisbury)
4.15.0-20-generic
4.15.0 - Vanilla, no patch

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1788098

Title:
  Avoid migration issues with aligned 2MB THB

Status in The Ubuntu-power-systems project:
  Incomplete
Status in linux package in Ubuntu:
  In Progress
Status in qemu package in Ubuntu:
  Invalid
Status in linux source package in Bionic:
  In Progress
Status in linux source package in Cosmic:
  In Progress

Bug description:
  FYI: This blocks bug 1781526 - once this one here is resolved we can
  go on with SRU considerations for 1781526

  ------- Comment From jhop...@us.ibm.com 2018-08-20 17:12 EDT-------

  Hi, in some environments it was observed that this qemu patch to
  enable THP made it more likely to hit guest migration issues, however
  the following kernel patch resolves those migration issues:

  
https://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git/commit/?h=kvm-ppc-next&id=c066fafc595eef5ae3c83ae3a8305956b8c3ef15
  KVM: PPC: Book3S HV: Use correct pagesize in kvm_unmap_radix()

  Once merged upstream, it would be good to include that change as well
  to avoid potential migration problems. Should I open a new bug for
  that or is it better to track here?

  Note Paelzer: I have not seen related migration issues myself, but it
  seems reasonable and confirmed by IBM.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/1788098/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to