Re: [Qemu-devel] [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-03 Thread Roman Kagan
On Thu, Mar 03, 2016 at 05:46:15PM +, Dr. David Alan Gilbert wrote: > * Liang Li (liang.z...@intel.com) wrote: > > The current QEMU live migration implementation mark the all the > > guest's RAM pages as dirtied in the ram bulk stage, all these pages > > will be processed and that takes quit a

RE: [Qemu-devel] [RFC qemu 4/4] migration: filter out guest's free pages in ram bulk stage

2016-03-03 Thread Li, Liang Z
> On Thu, Mar 03, 2016 at 06:44:28PM +0800, Liang Li wrote: > > Get the free pages information through virtio and filter out the free > > pages in the ram bulk stage. This can significantly reduce the total > > live migration time as well as network traffic. > > > > Signed-off-by: Liang Li

RE: [RFC qemu 2/4] virtio-balloon: Add a new feature to balloon device

2016-03-03 Thread Li, Liang Z
> On Thu, 3 Mar 2016 18:44:26 +0800 > Liang Li wrote: > > > Extend the virtio balloon device to support a new feature, this new > > feature can help to get guest's free pages information, which can be > > used for live migration optimzation. > > Do you have a spec for

RE: [RFC qemu 4/4] migration: filter out guest's free pages in ram bulk stage

2016-03-03 Thread Li, Liang Z
> On Thu, 3 Mar 2016 18:44:28 +0800 > Liang Li wrote: > > > Get the free pages information through virtio and filter out the free > > pages in the ram bulk stage. This can significantly reduce the total > > live migration time as well as network traffic. > > > >

RE: [RFC qemu 2/4] virtio-balloon: Add a new feature to balloon device

2016-03-03 Thread Li, Liang Z
> Subject: Re: [RFC qemu 2/4] virtio-balloon: Add a new feature to balloon > device > > On Thu, Mar 03, 2016 at 06:44:26PM +0800, Liang Li wrote: > > Extend the virtio balloon device to support a new feature, this new > > feature can help to get guest's free pages information, which can be > >

RE: [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-03 Thread Li, Liang Z
> Subject: Re: [RFC qemu 0/4] A PV solution for live migration optimization > > * Liang Li (liang.z...@intel.com) wrote: > > The current QEMU live migration implementation mark the all the > > guest's RAM pages as dirtied in the ram bulk stage, all these pages > > will be processed and that takes

RE: [Qemu-devel] [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-03 Thread Li, Liang Z
> On Thu, Mar 03, 2016 at 06:44:24PM +0800, Liang Li wrote: > > The current QEMU live migration implementation mark the all the > > guest's RAM pages as dirtied in the ram bulk stage, all these pages > > will be processed and that takes quit a lot of CPU cycles. > > > > From guest's point of view,

Re: [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-03 Thread Dr. David Alan Gilbert
* Liang Li (liang.z...@intel.com) wrote: > The current QEMU live migration implementation mark the all the > guest's RAM pages as dirtied in the ram bulk stage, all these pages > will be processed and that takes quit a lot of CPU cycles. > > From guest's point of view, it doesn't care about the

[RFC kernel 2/2] virtio-balloon: extend balloon driver to support a new feature

2016-03-03 Thread Liang Li
Extend the virio balloon to support the new feature VIRTIO_BALLOON_F_GET_FREE_PAGES, so that we can use it to send the free pages information from guest to QEMU, and then optimize the live migration process. Signed-off-by: Liang Li --- drivers/virtio/virtio_balloon.c |

[RFC kernel 1/2] mm: Add the functions used to get free pages information

2016-03-03 Thread Liang Li
get_total_pages_count() tries to get the page count of the system RAM. get_free_pages() is intend to construct a free pages bitmap by traversing the free_list. The free pages information will be sent to QEMU through virtio and used for live migration optimization. Signed-off-by: Liang Li

[RFC kernel 0/2]A PV solution for KVM live migration optimization

2016-03-03 Thread Liang Li
The current QEMU live migration implementation mark the all the guest's RAM pages as dirtied in the ram bulk stage, all these pages will be processed and that takes quit a lot of CPU cycles. >From guest's point of view, it doesn't care about the content in free pages. We can make use of this fact

[RFC qemu 3/4] migration: not set migration bitmap in setup stage

2016-03-03 Thread Liang Li
Set ram_list.dirty_memory instead of migration bitmap, the migration bitmap will be update when doing migration_bitmap_sync(). Set migration_dirty_pages to 0 and it will be updated by migration_dirty_pages() too. The following patch is based on this change. Signed-off-by: Liang Li

[RFC qemu 2/4] virtio-balloon: Add a new feature to balloon device

2016-03-03 Thread Liang Li
Extend the virtio balloon device to support a new feature, this new feature can help to get guest's free pages information, which can be used for live migration optimzation. Signed-off-by: Liang Li --- balloon.c | 30 -

[RFC qemu 4/4] migration: filter out guest's free pages in ram bulk stage

2016-03-03 Thread Liang Li
Get the free pages information through virtio and filter out the free pages in the ram bulk stage. This can significantly reduce the total live migration time as well as network traffic. Signed-off-by: Liang Li --- migration/ram.c | 52

[RFC qemu 0/4] A PV solution for live migration optimization

2016-03-03 Thread Liang Li
The current QEMU live migration implementation mark the all the guest's RAM pages as dirtied in the ram bulk stage, all these pages will be processed and that takes quit a lot of CPU cycles. >From guest's point of view, it doesn't care about the content in free pages. We can make use of this fact

[RFC qemu 1/4] pc: Add code to get the lowmem form PCMachineState

2016-03-03 Thread Liang Li
The lowmem will be used by the following patch to get a correct free pages bitmap. Signed-off-by: Liang Li --- hw/i386/pc.c | 5 + hw/i386/pc_piix.c| 1 + hw/i386/pc_q35.c | 1 + include/hw/i386/pc.h | 3 ++- 4 files changed, 9 insertions(+), 1

virtio-vsock live migration

2016-03-03 Thread Stefan Hajnoczi
Michael pointed out that the virtio-vsock draft specification does not address live migration and in fact currently precludes migration. Migration is fundamental so the device specification at least mustn't preclude it. Having brainstormed migration with Matthew Benjamin and Michael Tsirkin, I

Re: [Qemu-devel] [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-03 Thread Roman Kagan
On Thu, Mar 03, 2016 at 06:44:24PM +0800, Liang Li wrote: > The current QEMU live migration implementation mark the all the > guest's RAM pages as dirtied in the ram bulk stage, all these pages > will be processed and that takes quit a lot of CPU cycles. > > From guest's point of view, it doesn't

[PULL for-4.5] virtio/vhost: minor fixes

2016-03-03 Thread Michael S. Tsirkin
The following changes since commit fc77dbd34c5c99bce46d40a2491937c3bcbd10af: Linux 4.5-rc6 (2016-02-28 08:41:20 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to

Re: [RFC qemu 2/4] virtio-balloon: Add a new feature to balloon device

2016-03-03 Thread Michael S. Tsirkin
On Thu, Mar 03, 2016 at 06:44:26PM +0800, Liang Li wrote: > Extend the virtio balloon device to support a new feature, this > new feature can help to get guest's free pages information, which > can be used for live migration optimzation. > > Signed-off-by: Liang Li I don't

Re: [Qemu-devel] [RFC qemu 4/4] migration: filter out guest's free pages in ram bulk stage

2016-03-03 Thread Daniel P. Berrange
On Thu, Mar 03, 2016 at 06:44:28PM +0800, Liang Li wrote: > Get the free pages information through virtio and filter out the free > pages in the ram bulk stage. This can significantly reduce the total > live migration time as well as network traffic. > > Signed-off-by: Liang Li

Re: [RFC qemu 2/4] virtio-balloon: Add a new feature to balloon device

2016-03-03 Thread Cornelia Huck
On Thu, 3 Mar 2016 18:44:26 +0800 Liang Li wrote: > Extend the virtio balloon device to support a new feature, this > new feature can help to get guest's free pages information, which > can be used for live migration optimzation. Do you have a spec for this, e.g. as a

Re: [RFC qemu 4/4] migration: filter out guest's free pages in ram bulk stage

2016-03-03 Thread Cornelia Huck
On Thu, 3 Mar 2016 18:44:28 +0800 Liang Li wrote: > Get the free pages information through virtio and filter out the free > pages in the ram bulk stage. This can significantly reduce the total > live migration time as well as network traffic. > > Signed-off-by: Liang Li