Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-31 Thread Dr. David Alan Gilbert
* Jay Zhou (jianjay.z...@huawei.com) wrote: > Hi Dave, > > On 2017/7/25 18:34, Dr. David Alan Gilbert wrote: > > > After checking the codes of the newest libvirt, I think it is the same > > > in the qemuMigrationWaitForCompletion function, which is used to poll > > > qemu every 50ms. > > > > Chec

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-31 Thread Jay Zhou
Hi Dave, On 2017/7/25 18:34, Dr. David Alan Gilbert wrote: After checking the codes of the newest libvirt, I think it is the same in the qemuMigrationWaitForCompletion function, which is used to poll qemu every 50ms. Checking with Jiri Denemark (added to cc), newer libvirt should use events wh

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-27 Thread Paolo Bonzini
On 25/07/2017 21:15, Dr. David Alan Gilbert wrote: > * Paolo Bonzini (pbonz...@redhat.com) wrote: >> On 24/07/2017 21:03, Dr. David Alan Gilbert wrote: I don't like having such a long-lived mutex (it seems like a recipe for deadlocks with the BQL), plus memory_region_transaction_commit (t

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-25 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 24/07/2017 21:03, Dr. David Alan Gilbert wrote: > >> I don't like having such a long-lived mutex (it seems like a recipe for > >> deadlocks with the BQL), plus memory_region_transaction_commit (the > >> expensive part of memory_global_dirty_log_stop

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-25 Thread Dr. David Alan Gilbert
* Jay Zhou (jianjay.z...@huawei.com) wrote: > > On 2017/7/24 23:35, Dr. David Alan Gilbert wrote: > > * Jay Zhou (jianjay.z...@huawei.com) wrote: > > > Hi Dave, > > > > > > On 2017/7/21 17:49, Dr. David Alan Gilbert wrote: > > > > * Jay Zhou (jianjay.z...@huawei.com) wrote: > > > > > Qemu_savevm_

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-25 Thread Paolo Bonzini
On 25/07/2017 09:29, Jay Zhou wrote: >> >> >> Maybe memory_global_dirty_log_stop can delay itself to the next vm_start >> if it's called while runstate_running() returns false (which should be >> always the case)? > > It is logical, but then we need to put some migration related codes into > the f

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-25 Thread Jay Zhou
On 2017/7/25 0:33, Paolo Bonzini wrote: On 24/07/2017 17:35, Dr. David Alan Gilbert wrote: * Jay Zhou (jianjay.z...@huawei.com) wrote: Hi Dave, On 2017/7/21 17:49, Dr. David Alan Gilbert wrote: * Jay Zhou (jianjay.z...@huawei.com) wrote: Qemu_savevm_state_cleanup() takes about 300ms in my r

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-25 Thread Jay Zhou
On 2017/7/24 23:35, Dr. David Alan Gilbert wrote: * Jay Zhou (jianjay.z...@huawei.com) wrote: Hi Dave, On 2017/7/21 17:49, Dr. David Alan Gilbert wrote: * Jay Zhou (jianjay.z...@huawei.com) wrote: Qemu_savevm_state_cleanup() takes about 300ms in my ram migration tests with a 8U24G vm(20G is

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-24 Thread Paolo Bonzini
On 24/07/2017 21:03, Dr. David Alan Gilbert wrote: >> I don't like having such a long-lived mutex (it seems like a recipe for >> deadlocks with the BQL), plus memory_region_transaction_commit (the >> expensive part of memory_global_dirty_log_stop) needs to be under the >> BQL itself because it call

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-24 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 24/07/2017 17:35, Dr. David Alan Gilbert wrote: > > * Jay Zhou (jianjay.z...@huawei.com) wrote: > >> Hi Dave, > >> > >> On 2017/7/21 17:49, Dr. David Alan Gilbert wrote: > >>> * Jay Zhou (jianjay.z...@huawei.com) wrote: > Qemu_savevm_state_clea

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-24 Thread Paolo Bonzini
On 24/07/2017 17:35, Dr. David Alan Gilbert wrote: > * Jay Zhou (jianjay.z...@huawei.com) wrote: >> Hi Dave, >> >> On 2017/7/21 17:49, Dr. David Alan Gilbert wrote: >>> * Jay Zhou (jianjay.z...@huawei.com) wrote: Qemu_savevm_state_cleanup() takes about 300ms in my ram migration tests with

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-24 Thread Dr. David Alan Gilbert
* Jay Zhou (jianjay.z...@huawei.com) wrote: > Hi Dave, > > On 2017/7/21 17:49, Dr. David Alan Gilbert wrote: > > * Jay Zhou (jianjay.z...@huawei.com) wrote: > > > Qemu_savevm_state_cleanup() takes about 300ms in my ram migration tests > > > with a 8U24G vm(20G is really occupied), the main cost co

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-21 Thread Jay Zhou
Hi Dave, On 2017/7/21 17:49, Dr. David Alan Gilbert wrote: * Jay Zhou (jianjay.z...@huawei.com) wrote: Qemu_savevm_state_cleanup() takes about 300ms in my ram migration tests with a 8U24G vm(20G is really occupied), the main cost comes from KVM_SET_USER_MEMORY_REGION ioctl when mem.memory_size

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-21 Thread Dr. David Alan Gilbert
* Jay Zhou (jianjay.z...@huawei.com) wrote: > Qemu_savevm_state_cleanup() takes about 300ms in my ram migration tests > with a 8U24G vm(20G is really occupied), the main cost comes from > KVM_SET_USER_MEMORY_REGION ioctl when mem.memory_size = 0 in > kvm_set_user_memory_region(). In kmod, the main

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-19 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 1500522569-10760-1-git-send-email-jianjay.z...@huawei.com Subject: [Qemu-devel] [PATCH] migration: optimize the

[Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-19 Thread Jay Zhou
Qemu_savevm_state_cleanup() takes about 300ms in my ram migration tests with a 8U24G vm(20G is really occupied), the main cost comes from KVM_SET_USER_MEMORY_REGION ioctl when mem.memory_size = 0 in kvm_set_user_memory_region(). In kmod, the main cost is kvm_zap_obsolete_pages(), which traverses th