Re: [Qemu-devel] [PATCH 0/5] Separate thread for VM migration

2011-08-30 Thread Umesh Deshpande
On Mon, Aug 29, 2011 at 6:20 AM, Paolo Bonzini wrote: > On 08/27/2011 08:09 PM, Umesh Deshpande wrote: > >> Following patch series deals with VCPU and iothread starvation during the >> migration of a guest. Currently the iothread is responsible for performing >> the >

Re: [Qemu-devel] [PATCH 5/5] Separate migration thread

2011-08-29 Thread Umesh Deshpande
On 08/29/2011 05:09 AM, Stefan Hajnoczi wrote: On Sat, Aug 27, 2011 at 7:09 PM, Umesh Deshpande wrote: This patch creates a separate thread for the guest migration on the source side. All exits (on completion/error) from the migration thread are handled by a bottom handler, which is called

Re: [Qemu-devel] [PATCH 3/5] Migration thread mutex

2011-08-29 Thread Umesh Deshpande
On 08/29/2011 05:04 AM, Stefan Hajnoczi wrote: On Sat, Aug 27, 2011 at 7:09 PM, Umesh Deshpande wrote: This patch implements migrate_ram mutex, which protects the RAMBlock list traversal in the migration thread during the transfer of a ram from their addition/removal from the iothread. Note

[Qemu-devel] [PATCH 5/5] Separate migration thread

2011-08-27 Thread Umesh Deshpande
This patch creates a separate thread for the guest migration on the source side. All exits (on completion/error) from the migration thread are handled by a bottom handler, which is called from the iothread. Signed-off-by: Umesh Deshpande --- buffered_file.c | 76

[Qemu-devel] [PATCH 4/5] Separate migration dirty bitmap

2011-08-27 Thread Umesh Deshpande
This patch creates a migration bitmap, which is periodically kept in sync with the qemu bitmap. A separate copy of the dirty bitmap for the migration avoids concurrent access to the qemu bitmap from the iothread and the migration thread. Signed-off-by: Umesh Deshpande --- arch_init.c | 17

[Qemu-devel] [PATCH 0/5] Separate thread for VM migration

2011-08-27 Thread Umesh Deshpande
. The guest migration, executed as an iohandler also delays the execution of other iohandlers. In the following patch series, The migration has been moved to a separate thread to reduce the qemu_mutex contention and iohandler starvation. Umesh Deshpande (5): vm_stop from non-io threads MRU ram

[Qemu-devel] [PATCH 3/5] Migration thread mutex

2011-08-27 Thread Umesh Deshpande
while modifying the ram_list members or RAM block list. Signed-off-by: Umesh Deshpande --- arch_init.c | 21 + cpu-all.h |3 +++ exec.c| 23 +++ qemu-common.h |2 ++ 4 files changed, 49 insertions(+), 0 deletions(-) diff --git a

[Qemu-devel] [PATCH 2/5] MRU ram block list

2011-08-27 Thread Umesh Deshpande
This patch creates a new list of RAM blocks in MRU order. So that separate locking rules can be applied to the regular RAM block list and the MRU list. Signed-off-by: Paolo Bonzini --- cpu-all.h |2 ++ exec.c| 17 - 2 files changed, 14 insertions(+), 5 deletions(-) dif

[Qemu-devel] [PATCH 1/5] Support for vm_stop from the migration thread

2011-08-27 Thread Umesh Deshpande
Currently, when any thread other than iothread calls vm_stop, it is scheduled to be executed later by the iothread. This patch allows the execution of vm_stop from threads other than iothread. This is especially helpful when the migration is moved into a separate thread. Signed-off-by: Umesh

Re: [Qemu-devel] [RFC PATCH v5 0/4] Separate thread for VM migration

2011-08-24 Thread Umesh Deshpande
wrote: On 08/23/2011 10:12 PM, Umesh Deshpande wrote: Following patch series deals with VCPU and iothread starvation during the migration of a guest. Currently the iothread is responsible for performing the guest migration. It holds qemu_mutex during the migration and doesn't allow VCPU to

Re: [Qemu-devel] [RFC PATCH v5 0/4] Separate thread for VM migration

2011-08-24 Thread Umesh Deshpande
) ping to a non-migrating VM: Avg 0.156, Max: 0.96 Latency (ms) with migration thread : Avg 0.215, Max: 280 Latency (ms) without migration thread: Avg 6.47, Max: 4562 - Umesh On 08/24/2011 01:19 PM, Anthony Liguori wrote: On 08/23/2011 10:12 PM, Umesh Deshpande wrote

[Qemu-devel] [RFC PATCH v5 3/4] Separate migration bitmap

2011-08-23 Thread Umesh Deshpande
This patch creates a migration bitmap, which is periodically kept in sync with the qemu bitmap. A separate copy of the dirty bitmap for the migration avoids concurrent access to the qemu bitmap from iothread and migration thread. Signed-off-by: Umesh Deshpande --- arch_init.c | 17

[Qemu-devel] [RFC PATCH v5 0/4] Separate thread for VM migration

2011-08-23 Thread Umesh Deshpande
. The guest migration, executed as an iohandler also delays the execution of other iohandlers. In the following patch series, The migration has been moved to a separate thread to reduce the qemu_mutex contention and iohandler starvation. Umesh Deshpande (4): MRU ram block list migration thread

[Qemu-devel] [RFC PATCH v5 4/4] Separate thread for VM migration

2011-08-23 Thread Umesh Deshpande
This patch creates a separate thread for the guest migration on the source side. All exits (on completion/error) from the migration thread are handled by a bottom handler, which is called from the iothread. Signed-off-by: Umesh Deshpande --- buffered_file.c | 75

[Qemu-devel] [RFC PATCH v5 1/4] MRU ram list

2011-08-23 Thread Umesh Deshpande
This patch creates a new list of RAM blocks in MRU order. So that separate locking rules can be applied to the regular RAM block list and the MRU list. Signed-off-by: Paolo Bonzini --- cpu-all.h |2 ++ exec.c| 17 - 2 files changed, 14 insertions(+), 5 deletions(-) dif

[Qemu-devel] [RFC PATCH v5 2/4] Migration thread mutex

2011-08-23 Thread Umesh Deshpande
list. Signed-off-by: Umesh Deshpande --- arch_init.c | 21 + cpu-all.h |3 +++ exec.c| 23 +++ qemu-common.h |2 ++ 4 files changed, 49 insertions(+), 0 deletions(-) diff --git a/arch_init.c b/arch_init.c index 484b39d..9d02270

Re: [Qemu-devel] [RFC PATCH v4 3/5] separate migration bitmap

2011-08-20 Thread Umesh Deshpande
On 08/19/2011 08:51 AM, Paolo Bonzini wrote: On 08/16/2011 08:56 PM, Umesh Deshpande wrote: @@ -2128,8 +2132,61 @@ void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end, start1, length); } } + } +void

Re: [Qemu-devel] [RFC PATCH v4 2/5] ramlist mutex

2011-08-18 Thread Umesh Deshpande
On 08/17/2011 02:28 AM, Paolo Bonzini wrote: On 08/16/2011 08:56 PM, Umesh Deshpande wrote: @@ -3001,8 +3016,10 @@ void qemu_ram_free_from_ptr(ram_addr_t addr) QLIST_FOREACH(block,&ram_list.blocks, next) { if (addr == block->offset) { +qemu_mutex_lock_

[Qemu-devel] [RFC PATCH v3 5/5] Making iothread block for migrate_cancel

2011-08-16 Thread Umesh Deshpande
Following patch makes iothread wait until the migration thread responds to the migrate_cancel request and terminates its execution. Signed-off-by: Umesh Deshpande --- buffered_file.c | 13 - buffered_file.h |3 +++ hw/hw.h |5 - migration.c

[Qemu-devel] [RFC PATCH v4 2/5] ramlist mutex

2011-08-16 Thread Umesh Deshpande
ramlist mutex is implemented to protect the RAMBlock list traversal in the migration thread from their addition/removal from the iothread. Signed-off-by: Umesh Deshpande --- cpu-all.h |2 ++ exec.c| 19 +++ qemu-common.h |2 ++ 3 files changed, 23

[Qemu-devel] [RFC PATCH v4 1/5] MRU ram list

2011-08-16 Thread Umesh Deshpande
This patch creates a new list of RAM blocks in MRU order. So that separate locking rules can be applied to the regular RAM block list and the MRU list. Signed-off-by: Paolo Bonzini --- cpu-all.h |2 ++ exec.c| 17 - 2 files changed, 14 insertions(+), 5 deletions(-) dif

[Qemu-devel] [RFC PATCH v4 4/5] separate thread for VM migration

2011-08-16 Thread Umesh Deshpande
to terminate its execution. Signed-off-by: Umesh Deshpande --- buffered_file.c | 93 ++ migration.c | 77 +++-- migration.h |1 + savevm.c|5 --- 4 files changed, 99 insertions

[Qemu-devel] [RFC PATCH v4 3/5] separate migration bitmap

2011-08-16 Thread Umesh Deshpande
This patch creates a migration bitmap, which is periodically kept in sync with the qemu bitmap. A separate copy of the dirty bitmap for the migration avoids concurrent access to the qemu bitmap from iothread and migration thread. Signed-off-by: Umesh Deshpande --- arch_init.c | 26

[Qemu-devel] [RFC PATCH v4 0/5] Separate thread for VM migration

2011-08-16 Thread Umesh Deshpande
. The guest migration, executed as an iohandler also delays the execution of other iohandlers. In the following patch series, The migration has been moved to a separate thread to reduce the qemu_mutex contention and iohandler starvation. Umesh Deshpande (5): MRU ram list ramlist lock sep

Re: [Qemu-devel] [RFC PATCH v2 1/3] separate thread for VM migration

2011-08-01 Thread Umesh Deshpande
On 08/01/2011 05:37 AM, Paolo Bonzini wrote: On 07/29/2011 10:57 PM, Umesh Deshpande wrote: This patch creates a separate thread for the guest migration on the source side. Signed-off-by: Umesh Deshpande Looks pretty good! One thing that shows, is that the interface separation between

[Qemu-devel] [RFC PATCH v2 3/3] Per memslot dirty bitmap

2011-07-29 Thread Umesh Deshpande
ny VM pages. This patch reduces the size of the dirty bitmap by allocating per memslot dirty bitmaps. Signed-off-by: Umesh Deshpande --- cpu-all.h | 40 +--- exec.c| 38 +++--- xen-all.c |6 ++ 3 files change

[Qemu-devel] [RFC PATCH v2 2/3] fine grained qemu_mutex locking for migration

2011-07-29 Thread Umesh Deshpande
: Umesh Deshpande --- arch_init.c | 14 +++--- migration.c | 11 +++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index 484b39d..cd545bc 100644 --- a/arch_init.c +++ b/arch_init.c @@ -110,7 +110,7 @@ static int is_dup_page(uint8_t

[Qemu-devel] [RFC PATCH v2 1/3] separate thread for VM migration

2011-07-29 Thread Umesh Deshpande
This patch creates a separate thread for the guest migration on the source side. Signed-off-by: Umesh Deshpande --- buffered_file.c | 28 - buffered_file.h |4 +++ migration.c | 59 +++--- migration.h |3

[Qemu-devel] [RFC PATCH v2 0/3] separate thread for VM migration

2011-07-29 Thread Umesh Deshpande
e its size. Umesh Deshpande (3): separate thread for VM migration fine grained qemu_mutex locking for migration per memslot dirty bitmap arch_init.c | 14 ++-- buffered_file.c | 28 - buffered_file.h |4 +++ cpu-all.h |

Re: [Qemu-devel] [RFC 3/4] A separate thread for the VM migration

2011-07-21 Thread Umesh Deshpande
- Original Message - From: "Marcelo Tosatti" To: "Umesh Deshpande" Cc: k...@vger.kernel.org, qemu-devel@nongnu.org Sent: Wednesday, July 20, 2011 3:02:46 PM Subject: Re: [RFC 3/4] A separate thread for the VM migration On Wed, Jul 20, 2011 at 12:00:44AM -0400, U

[Qemu-devel] [RFC 3/4] A separate thread for the VM migration

2011-07-19 Thread Umesh Deshpande
This patch creates a separate thread for the guest migration on the source side. The migration routine is called from the migration clock. Signed-off-by: Umesh Deshpande --- arch_init.c |8 +++ buffered_file.c | 10 - migration-tcp.c | 18 - migration

[Qemu-devel] [RFC 4/4] A separate thread for the VM migration

2011-07-19 Thread Umesh Deshpande
This patch creates a separate thread for the guest migration on the target side. Signed-off-by: Umesh Deshpande --- migration-exec.c |7 +++ migration-fd.c |4 ++-- migration-tcp.c |9 + migration-unix.c | 10 ++ migration.c | 32

[Qemu-devel] [RFC 2/4] A separate thread for the VM migration

2011-07-19 Thread Umesh Deshpande
migration routine on the source side. Signed-off-by: Umesh Deshpande --- qemu-timer.c | 29 +++-- qemu-timer.h |3 +++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 72066c7..91e356f 100644 --- a/qemu-timer.c +++ b/qemu

[Qemu-devel] [RFC 1/4] A separate thread for the VM migration

2011-07-19 Thread Umesh Deshpande
. Signed-off-by: Umesh Deshpande --- arch_init.c | 16 --- cpu-all.h | 37 +++ exec.c | 63 3 files changed, 109 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c

Re: [Qemu-devel] [RFC] New thread for the VM migration

2011-07-14 Thread Umesh Deshpande
o the guest. The guest migration, executed as an iohandler also delays the execution of other iohandlers. In the following patch, the migration has been moved to a separate thread to reduce the qemu_mutex contention and iohandler starvation. Signed-off-by: Umesh Deshpande --- arch_init.c |

[Qemu-devel] [RFC] New thread for the VM migration

2011-07-13 Thread Umesh Deshpande
o the guest. The guest migration, executed as an iohandler also delays the execution of other iohandlers. In the following patch, the migration has been moved to a separate thread to reduce the qemu_mutex contention and iohandler starvation. Signed-off-by: Umesh Deshpande --- arch_init.c |