Remove capabilities from query-migrate.
patches are based on git://repo.or.cz/qemu/quintela.git Migration-next-v5 branch
Please review
Juan Quintela (1):
Restart optimization on stage3 update version
Orit Wasserman (10):
Add migration capabilities
Add migrate-set-capabilities and query-migrat
Remove capabilities from query-migrate.
patches are based on git://repo.or.cz/qemu/quintela.git Migration-next-v5 branch
Please review
Juan Quintela (1):
Restart optimization on stage3 update version
Orit Wasserman (10):
Add migration capabilities
Add migrate-set-capabilities and query-migrat
Add migration capabilities that can be queried by the management using
query-migrate-supported-capabilities command.
The management can query the source QEMU and the destination QEMU in order to
verify both support some migration capability (currently only XBZRLE).
Signed-off-by: Orit Wasserman
' HMP
commands.
Signed-off-by: Orit Wasserman
Signed-off-by: Juan Quintela
---
hmp-commands.hx | 16 +
hmp.c| 65 ++
hmp.h|2 +
migration.c | 46 ++
m
-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
---
arch_init.c | 158 ++-
migration.c | 24 +
migration.h |4 ++
3 files changed, 184 insertions(+), 2 deletions(-)
diff --git a/arch_init.c
Add MRU page cache mechanism.
The page are accessed by their address.
Signed-off-by: Benoit Hudzia
Signed-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
---
Makefile.objs |1 +
cutils.c |9 ++
include/qemu/page_cache.h
e.
Signed-off-by: Benoit Hudzia
Signed-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
---
arch_init.c | 10 ++
hmp-commands.hx | 22 ++
hmp.c| 19 +++
hmp.h|2 ++
migration.c
Signed-off-by: Benoit Hudzia
Signed-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
Signed-off-by: Juan Quintela
---
arch_init.c | 28
hmp.c| 13 +
migration.c | 17
Signed-off-by: Orit Wasserman
---
docs/xbzrle.txt | 136 +++
1 files changed, 136 insertions(+), 0 deletions(-)
create mode 100644 docs/xbzrle.txt
diff --git a/docs/xbzrle.txt b/docs/xbzrle.txt
new file mode 100644
index 000..ce577a9
From: Juan Quintela
Signed-off-by: Juan Quintela
---
arch_init.c | 24 +++-
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index 9833d54..21031d1 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -273,14 +273,16 @@ static void save_bl
Signed-off-by: Benoit Hudzia
Signed-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
Signed-off-by: Juan Quintela
---
arch_init.c | 38 ++
hmp.c|6 ++
migration.c |6 ++
migration.h
d-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
Signed-off-by: Eric Blake
---
migration.h |4 ++
savevm.c| 159 +++
2 files changed, 163 insertions(+), 0 deletions(-)
diff --git a/migration.h b/mig
Implement Unsigned Little Endian Base 128.
Signed-off-by: Orit Wasserman
---
cutils.c | 33 +
qemu-common.h |8
2 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/cutils.c b/cutils.c
index b0bdd4b..700f943 100644
--- a/cutils.c
On 08/06/2012 05:26 PM, Eric Blake wrote:
> On 08/05/2012 03:13 AM, Orit Wasserman wrote:
>> The management can enable/disable a capability for the next migration by
>> using
>> migrate-set-apabilities QMP command.
>
> s/set-apabilities/set-capabilities/
>
&
On 08/06/2012 09:13 PM, Eric Blake wrote:
> On 08/06/2012 11:51 AM, Orit Wasserman wrote:
>> Change XBZRLE cache size in bytes (the size should be a power of 2, it will
>> be
>> rounded down to the nearest power of 2).
>> If XBZRLE cache size is too small there will be
From: Juan Quintela
Signed-off-by: Juan Quintela
---
arch_init.c | 24 +++-
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index 5f864a6..5181953 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -273,14 +273,16 @@ static void save_bl
ntela (1):
Restart optimization on stage3 update version
Orit Wasserman (11):
Add migration capabilities
Add migrate-set-capabilities
Add XBZRLE documentation
Add cache handling functions
Add uleb encoding/decoding functions
Add xbzrle_encode_buffer and xbzrle_decode_buffer funct
Signed-off-by: Benoit Hudzia
Signed-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
Signed-off-by: Juan Quintela
---
arch_init.c | 28
hmp.c| 13 +
migration.c | 17
Add MRU page cache mechanism.
The page are accessed by their address.
Signed-off-by: Benoit Hudzia
Signed-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
---
Makefile.objs |1 +
cutils.c |9 ++
include/qemu/page_cache.h
Remove capabilities from query-migrate.
patches are based on git://repo.or.cz/qemu/quintela.git Migration-next-v5 branch
Please review
Juan Quintela (1):
Restart optimization on stage3 update version
Orit Wasserman (11):
Add migration capabilities
Add migrate-set-capabilities
Add XBZRLE
The management can query the current migration capabilities using
query-migrate-capabilities QMP command.
The user can use 'info migrate_capabilities' HMP command.
Currently only XBZRLE capability is available.
Signed-off-by: Orit Wasserman
Signed-off-by: Juan Quintela
---
hmp-c
d-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
Signed-off-by: Eric Blake
---
migration.h |4 ++
savevm.c| 159 +++
2 files changed, 163 insertions(+), 0 deletions(-)
diff --git a/migration.h b/mig
migration total_time was introduced in commit
d5f8a5701d3690b5ec0c34b6a5c0b5a24d274540 for QEMU 1.2
Signed-off-by: Orit Wasserman
---
qapi-schema.json |4 ++--
qmp-commands.hx |9 +++--
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/qapi-schema.json b/qapi
Signed-off-by: Benoit Hudzia
Signed-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
Signed-off-by: Juan Quintela
---
arch_init.c | 38 ++
hmp.c|6 ++
migration.c |6 ++
migration.h
-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
---
arch_init.c | 158 ++-
migration.c | 24 +
migration.h |4 ++
3 files changed, 184 insertions(+), 2 deletions(-)
diff --git a/arch_init.c
From: Juan Quintela
Signed-off-by: Juan Quintela
---
arch_init.c | 24 +++-
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index 5f864a6..5181953 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -273,14 +273,16 @@ static void save_bl
-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
---
arch_init.c | 158 ++-
migration.c | 24 +
migration.h |4 ++
3 files changed, 184 insertions(+), 2 deletions(-)
diff --git a/arch_init.c
e.
Signed-off-by: Benoit Hudzia
Signed-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
---
arch_init.c | 10 ++
hmp-commands.hx | 22 ++
hmp.c| 19 +++
hmp.h|2 ++
migration.c
The management can query the current migration capabilities using
query-migrate-capabilities QMP command.
The user can use 'info migrate_capabilities' HMP command.
Currently only XBZRLE capability is available.
Signed-off-by: Orit Wasserman
Signed-off-by: Juan Quintela
---
hmp-c
Signed-off-by: Orit Wasserman
---
docs/xbzrle.txt | 128 +++
1 files changed, 128 insertions(+), 0 deletions(-)
create mode 100644 docs/xbzrle.txt
diff --git a/docs/xbzrle.txt b/docs/xbzrle.txt
new file mode 100644
index 000..cc3a26a
The management can enable/disable a capability for the next migration by using
migrate-set-capabilities QMP command.
The user can use migrate_set_capability HMP command.
Signed-off-by: Orit Wasserman
Signed-off-by: Juan Quintela
---
hmp-commands.hx | 14 ++
hmp.c
Signed-off-by: Benoit Hudzia
Signed-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
Signed-off-by: Juan Quintela
---
arch_init.c | 28
hmp.c| 13 +
migration.c | 17
e.
Signed-off-by: Benoit Hudzia
Signed-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
---
arch_init.c | 10 ++
hmp-commands.hx | 22 ++
hmp.c| 19 +++
hmp.h|2 ++
migration.c
Signed-off-by: Benoit Hudzia
Signed-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
Signed-off-by: Juan Quintela
---
arch_init.c | 38 ++
hmp.c|6 ++
migration.c |6 ++
migration.h
Implement Unsigned Little Endian Base 128.
Signed-off-by: Orit Wasserman
---
cutils.c | 33 +
qemu-common.h |8
2 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/cutils.c b/cutils.c
index b0bdd4b..700f943 100644
--- a/cutils.c
Add MRU page cache mechanism.
The page are accessed by their address.
Signed-off-by: Benoit Hudzia
Signed-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
---
Makefile.objs |1 +
cutils.c |9 ++
include/qemu/page_cache.h
On 08/06/2012 07:39 PM, Eric Blake wrote:
> On 08/06/2012 10:28 AM, Orit Wasserman wrote:
>
>>> That is, BOTH commands end up iterating over a list of caps, and output
>>> identical information in the case where caps exist of 'name: state' for
>>> ea
Implement Unsigned Little Endian Base 128.
Signed-off-by: Orit Wasserman
---
cutils.c | 33 +
qemu-common.h |8
2 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/cutils.c b/cutils.c
index b0bdd4b..700f943 100644
--- a/cutils.c
The management can enable/disable a capability for the next migration by using
migrate-set-capabilities QMP command.
The user can use migrate_set_capability HMP command.
Signed-off-by: Orit Wasserman
Signed-off-by: Juan Quintela
---
hmp-commands.hx | 14 ++
hmp.c
Signed-off-by: Orit Wasserman
---
docs/xbzrle.txt | 128 +++
1 files changed, 128 insertions(+), 0 deletions(-)
create mode 100644 docs/xbzrle.txt
diff --git a/docs/xbzrle.txt b/docs/xbzrle.txt
new file mode 100644
index 000..cc3a26a
d-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Signed-off-by: Orit Wasserman
Signed-off-by: Eric Blake
---
migration.h |4 ++
savevm.c| 159 +++
2 files changed, 163 insertions(+), 0 deletions(-)
diff --git a/migration.h b/mig
On 08/06/2012 07:14 PM, Eric Blake wrote:
> On 08/06/2012 10:04 AM, Orit Wasserman wrote:
>> On 08/06/2012 05:26 PM, Eric Blake wrote:
>>> On 08/05/2012 03:13 AM, Orit Wasserman wrote:
>>>> The management can enable/disable a capability for the next migration b
Signed-off-by: Orit Wasserman
---
qapi-schema.json |4 ++--
qmp-commands.hx |6 ++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index 8cc40e2..3238403 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -260,7 +260,7
L) {
> -fprintf(stderr, "qemu file buffer expansion failed\n");
> -exit(1);
> -}
> -
> -s->buffer = tmp;
> +s->buffer = g_realloc(s->buffer, s->buffer_capacity);
> }
>
> memcpy(s->buffer + s->buffer_size, buf, size);
>
Reviewed-by: Orit Wasserman
@@ -488,6 +488,7 @@ static int ram_save_setup(QEMUFile *f, void *opaque)
> ram_addr_t addr;
> RAMBlock *block;
>
> +memory_global_sync_dirty_bitmap(get_system_memory());
> bytes_transferred = 0;
> last_block = NULL;
> last_offset = 0;
>
Reviewed-by: Orit Wasserman
uery-migrate
> diff --git a/qmp-commands.hx b/qmp-commands.hx
> index 2ce4ce6..8671bf3 100644
> --- a/qmp-commands.hx
> +++ b/qmp-commands.hx
> @@ -2239,14 +2239,14 @@ The main json-object contains the following:
>
> - "status": migration status (json-string)
> - Possible values: "active", "completed", "failed", "cancelled"
> +- "total-time": total amount of ms since migration started. If
> +migration has ended, it returns the total migration
> + time (json-int)
> - "ram": only present if "status" is "active", it is a json-object with the
>following RAM information (in bytes):
> - "transferred": amount transferred (json-int)
> - "remaining": amount remaining (json-int)
> - "total": total (json-int)
> - - "total-time": total amount of ms since migration started. If
> - migration has ended, it returns the total migration
> time
> - (json-int)
> - "duplicate": number of duplicated pages (json-int)
> - "normal" : number of normal pages transferred (json-int)
> - "normal-bytes" : number of normal bytes transferred (json-int)
>
Reviewed-by: Orit Wasserman
On 08/18/2012 02:17 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela
> ---
> hmp.c| 4
> migration.c | 6 +-
> migration.h | 1 +
> qapi-schema.json | 7 ++-
> qmp-commands.hx | 3 +++
> 5 files changed, 19 insertions(+), 2 deletions(-)
>
> diff --git a
ntime <= migrate_max_downtime()) {
> memory_global_sync_dirty_bitmap(get_system_memory());
> -expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
> +expected_downtime = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
>
> -return expected_time <= migrate_max_downtime();
> +return expected_downtime <= migrate_max_downtime();
> }
> return 0;
> }
>
Reviewed-by: Orit Wasserman
nge_notifier(Notifier
> *notify);
> bool migration_is_active(MigrationState *);
> bool migration_has_finished(MigrationState *);
> bool migration_has_failed(MigrationState *);
> +MigrationState *migrate_get_current(void);
>
> uint64_t ram_bytes_remaining(void);
> uint64_t ram_bytes_transferred(void);
>
Reviewed-by: Orit Wasserman
Implement Unsigned Little Endian Base 128.
Signed-off-by: Orit Wasserman
---
migration.h |4
savevm.c| 26 ++
2 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/migration.h b/migration.h
index 372b066..50dec18 100644
--- a/migration.h
+++ b
..}
Signed-off-by: Benoit Hudzia
Signed-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Orit Wasserman (11):
Add cache handling functions
Add uleb encoding/decoding functions
Add save_block_hdr function
Add host_from_stream_offset_versioned function
Add XBZRLE to ram_save_block
Add migration capabiltes that can be queried by the management.
The managment can query to source and the destination in order to
verfiy both support some maigration capability (currently only XBZRLE).
Signed-off-by: Orit Wasserman
---
hmp.c| 18 ++
hmp.h
Change XBZRLE cache size in MB (the size should be a poer of 2)
Signed-off-by: Orit Wasserman
---
hmp-commands.hx | 15 +++
hmp.c| 13 +
hmp.h|1 +
migration.c | 22 +-
migration.h |2 ++
qapi
On 01/25/2012 02:22 PM, Orit Wasserman wrote:
> On 01/25/2012 01:48 PM, Avi Kivity wrote:
>> On 01/25/2012 01:26 PM, Orit Wasserman wrote:
>>> Implement Unsigned Little Endian Base 128.
>>>
>>>
>>> +/* ULEB128 */
>>> +int ul
Signed-off-by: Orit Wasserman
---
arch_init.c | 26 +++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index 1218306..26312f6 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -550,6 +550,18 @@ static inline void
QMP/HMP changes
Signed-off-by: Orit Wasserman
---
hmp-commands.hx | 21 +
qmp-commands.hx | 18 +++---
2 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 3b7255d..daa8aae 100644
--- a/hmp-commands.hx
+++ b
Add LRU page caching mechanism.
The pages are stored in the cache ordered by their address.
Signed-off-by: Orit Wasserman
---
arch_init.c | 175 +++
1 files changed, 175 insertions(+), 0 deletions(-)
diff --git a/arch_init.c b
Signed-off-by: Orit Wasserman
---
arch_init.c |5 +
migration.c |8
migration.h |4
savevm.c|9 ++---
sysemu.h|1 +
5 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index 3a9b0e6..c7da4d7 100644
--- a
Signed-off-by: Orit Wasserman
---
arch_init.c | 24
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index 34e4e60..1218306 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -300,6 +300,16 @@ static void cache_insert(unsigned long
(by using load_xbrle function).
Signed-off-by: Orit Wasserman
---
arch_init.c | 169 ++
migration.h |3 +
savevm.c| 93 -
3 files changed, 251 insertions(+), 14 deletions(-)
diff --git a
Signed-off-by: Orit Wasserman
---
arch_init.c | 60 ++
migration.c | 10 +
migration.h |9
qapi-schema.json | 20 -
4 files changed, 97 insertions(+), 2 deletions(-)
diff --git a
On 01/25/2012 01:48 PM, Avi Kivity wrote:
> On 01/25/2012 01:26 PM, Orit Wasserman wrote:
>> Implement Unsigned Little Endian Base 128.
>>
>>
>> +/* ULEB128 */
>> +int uleb128_encode_small(uint8_t *out, uint32_t n);
>> +int uleb128_decode_small(const u
Signed-off-by: Orit Wasserman
---
block-migration.c |8
migration.c | 16 +---
migration.h |9 +++--
qemu-common.h |1 +
savevm.c | 12
sysemu.h |4 ++--
vmstate.h |2 +-
7 files changed, 32
Add LRU page cache mechanism.
The page are accessed by their address.
Signed-off-by: Orit Wasserman
---
arch_init.c | 174 +++
1 files changed, 174 insertions(+), 0 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index 2366511
Signed-off-by: Orit Wasserman
---
arch_init.c | 25 +
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index bdc74a9..ac21bc0 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -300,6 +300,17 @@ static void cache_insert(unsigned
Signed-off-by: Orit Wasserman
---
arch_init.c | 26 +++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index ac21bc0..0f6037e 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -550,6 +550,18 @@ static inline void
Signed-off-by: Orit Wasserman
---
arch_init.c | 60 ++
migration.c | 10 +
migration.h |9
qapi-schema.json | 20 -
4 files changed, 97 insertions(+), 2 deletions(-)
diff --git a
Implement Unsigned Little Endian Base 128.
Signed-off-by: Orit Wasserman
---
migration.h |4
savevm.c| 28
2 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/migration.h b/migration.h
index 372b066..50dec18 100644
--- a/migration.h
+++ b
Signed-off-by: Orit Wasserman
---
block-migration.c |8
migration.c | 16 +---
migration.h |9 +++--
qemu-common.h |1 +
savevm.c | 12
sysemu.h |4 ++--
vmstate.h |2 +-
7 files changed, 32
Add migration capabiltes that can be queried by the management.
The managment can query to source and the destination in order to
verify both support some maigration capability (currently only XBZRLE).
Signed-off-by: Orit Wasserman
---
hmp.c| 18 ++
hmp.h
Signed-off-by: Orit Wasserman
---
hmp-commands.hx | 21 +
qmp-commands.hx | 18 +++---
2 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 3b7255d..daa8aae 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
Change XBZRLE cache size in MB (the size should be a power of 2).
Signed-off-by: Orit Wasserman
---
hmp-commands.hx | 15 +++
hmp.c| 13 +
hmp.h|1 +
migration.c | 22 +-
migration.h |2 ++
qapi
; 4096 * 4; i++) {
..buf[i * 4096 / 4]++;
..}
..printf(".");
..}
..}
Signed-off-by: Benoit Hudzia
Signed-off-by: Petter Svard
Signed-off-by: Aidan Shribman
Orit Wasserman (11):
Add cache handling functions
Add uleb encoding/decoding functio
Signed-off-by: Orit Wasserman
---
arch_init.c |5 +
migration.c |8
migration.h |4
savevm.c|9 ++---
4 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index 4ebf080..f864585 100644
--- a/arch_init.c
+++ b
(by using load_xbrle function).
Signed-off-by: Orit Wasserman
---
arch_init.c | 169 ++
migration.h |3 +
savevm.c| 93
3 files changed, 253 insertions(+), 12 deletions(-)
diff --git a/arch_init.c
On 02/07/2012 04:05 PM, Paolo Bonzini wrote:
> On 02/07/2012 02:50 PM, Stefan Hajnoczi wrote:
>>> I guess we might need to attach multiple QMP monitors for this to work
>>> (one for libvirt, one for the rephub). I'm not sure if there is a
>>> fundamental problem with this or if it just needs to be
On 02/07/2012 04:45 PM, Ori Mamluk wrote:
> On 07/02/2012 15:34, Kevin Wolf wrote:
>> Am 07.02.2012 11:29, schrieb Ori Mamluk:
>>> Repagent is a new module that allows an external replication system to
>>> replicate a volume of a Qemu VM.
>>>
>>> This RFC patch adds the repagent client module to Qe
ext_mru);
> }
> if (xen_enabled()) {
> /* We need to check if the requested address is in the RAM
> @@ -2813,7 +2821,7 @@ int qemu_ram_addr_from_host(void *ptr, ram_addr_t
> *ram_addr)
> return 0;
> }
>
> -QLIST_FOREACH(block, &ram_list.blocks, next) {
> +QLIST_FOREACH(block, &ram_list.blocks_mru, next_mru) {
> /* This case append when the block is not mapped. */
> if (block->host == NULL) {
> continue;
>
Reviewed-by: Orit Wasserman
(ram_addr_t addr)
> {
> RAMBlock *block;
>
> +qemu_mutex_lock_ramlist();
> QLIST_FOREACH(block, &ram_list.blocks, next) {
> if (addr == block->offset) {
> QLIST_REMOVE(block, next);
> QLIST_REMOVE(block, next_mru);
> ram_list.version++;
> g_free(block);
> -return;
> +break;
> }
> }
> +qemu_mutex_unlock_ramlist();
> }
>
> void qemu_ram_free(ram_addr_t addr)
> {
> RAMBlock *block;
>
> +qemu_mutex_lock_ramlist();
> QLIST_FOREACH(block, &ram_list.blocks, next) {
> if (addr == block->offset) {
> QLIST_REMOVE(block, next);
> @@ -2644,9 +2662,10 @@ void qemu_ram_free(ram_addr_t addr)
> #endif
> }
> g_free(block);
> -return;
> +break;
> }
> }
> +qemu_mutex_unlock_ramlist();
>
> }
>
Reviewed-by: Orit Wasserman
On 10/18/2012 09:30 AM, Juan Quintela wrote:
> We still protect everything except the wait with the iothread lock.
> But we moved from a timer to a thread. Steps one by one.
>
> We also need to detect when we have finished with a variable "complete".
>
> Signed-off-by: Juan Quintela
> ---
> bu
>
> DPRINTF("beginning savevm\n");
> ret = qemu_savevm_state_begin(s->file, &s->params);
> diff --git a/migration.h b/migration.h
> index 1c3e9b7..a63c5d5 100644
> --- a/migration.h
> +++ b/migration.h
> @@ -45,6 +45,7 @@ struct MigrationState
> int64_t dirty_pages_rate;
> bool enabled_capabilities[MIGRATION_CAPABILITY_MAX];
> int64_t xbzrle_cache_size;
> +bool complete;
> };
>
> void process_incoming_migration(QEMUFile *f);
>
Reviewed-by: Orit Wasserman
;
> return;
> }
> @@ -2616,6 +2618,7 @@ void qemu_ram_free(ram_addr_t addr)
> if (addr == block->offset) {
> QLIST_REMOVE(block, next);
> QLIST_REMOVE(block, next_mru);
> +ram_list.version++;
> if (block->flags & RAM_PREALLOC_MASK) {
> ;
> } else if (mem_path) {
>
Reviewed-by: Orit Wasserman
On 10/18/2012 09:30 AM, Juan Quintela wrote:
> Instead of testing each page individually, we search what is the next
> dirty page with a bitmap operation. We have to reorganize the code to
> move from a "for" loop, to a while(dirty) loop.
>
> Signed-off-by: Juan Quintela
> ---
> arch_init.c | 4
On 10/25/2012 10:12 AM, Stefan Priebe - Profihost AG wrote:
> Hello list,
>
> i'm using 1.2 stable and wanted to use xbzrle but xbzrle is extremely slow.
>
> While trying to transfer a simple VM with 4GB memory through a 10GBe nic
> while running a MySQL (with NO LOAD) it takes up to 10 - 15 min
On 10/25/2012 12:35 PM, Stefan Priebe - Profihost AG wrote:
> Am 25.10.2012 11:44, schrieb Orit Wasserman:
>>> Is this known or is something wrong?
>> My guess this workload migrates fine without XBZRLE so it is not the speed
>> or downtime :).
>> it could be th
On 10/25/2012 02:18 PM, Stefan Priebe - Profihost AG wrote:
> Am 25.10.2012 13:39, schrieb Orit Wasserman:
>> On 10/25/2012 12:35 PM, Stefan Priebe - Profihost AG wrote:
>>> Am 25.10.2012 11:44, schrieb Orit Wasserman:
>>>>> Is this known or is something wrong?
>
On 10/26/2012 01:39 PM, Juan Quintela wrote:
> Orit Wasserman wrote:
>> On 10/18/2012 09:30 AM, Juan Quintela wrote:
>>> Instead of testing each page individually, we search what is the next
>>> dirty page with a bitmap operation. We have to reorganize the code to
>
gt; + s->file = qemu_fopen_ops(s, NULL, stdio_get_buffer, stdio_fclose,
> NULL, NULL, NULL);
> }
> return s->file;
>
Reviewed-by: Orit Wasserman
(ret >= 0) {
> ret = ret2;
> }
> @@ -510,7 +522,7 @@ int qemu_fclose(QEMUFile *f)
>
> int qemu_file_put_notify(QEMUFile *f)
> {
> -return f->put_buffer(f->opaque, NULL, 0, 0);
> +return f->ops->put_buffer(f->opaque, NULL, 0, 0);
> }
>
> void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, int size)
> @@ -657,16 +669,16 @@ static int64_t qemu_ftell(QEMUFile *f)
>
> int qemu_file_rate_limit(QEMUFile *f)
> {
> -if (f->rate_limit)
> -return f->rate_limit(f->opaque);
> +if (f->ops->rate_limit)
> +return f->ops->rate_limit(f->opaque);
>
> return 0;
> }
>
> int64_t qemu_file_get_rate_limit(QEMUFile *f)
> {
> -if (f->get_rate_limit)
> -return f->get_rate_limit(f->opaque);
> +if (f->ops->get_rate_limit)
> +return f->ops->get_rate_limit(f->opaque);
>
> return 0;
> }
> @@ -675,8 +687,8 @@ int64_t qemu_file_set_rate_limit(QEMUFile *f, int64_t
> new_rate)
> {
> /* any failed or completed migration keeps its state to allow probing of
> * migration data, but has no associated file anymore */
> -if (f && f->set_rate_limit)
> -return f->set_rate_limit(f->opaque, new_rate);
> +if (f && f->ops->set_rate_limit)
> +return f->ops->set_rate_limit(f->opaque, new_rate);
>
> return 0;
> }
>
Reviewed-by: Orit Wasserman
socket_close
> };
> @@ -491,6 +510,14 @@ static void qemu_fill_buffer(QEMUFile *f)
> qemu_file_set_error(f, len);
> }
>
> +int qemu_get_fd(QEMUFile *f)
> +{
> +if (f->ops->get_fd) {
> +return f->ops->get_fd(f->opaque);
> +}
> +return -1;
> +}
> +
> /** Closes the file
> *
> * Returns negative error value if any error happened on previous operations
> or
>
Reviewed-by: Orit Wasserman
);
> }
>
> -int qemu_stdio_fd(QEMUFile *f)
> -{
> -QEMUFileStdio *p;
> -int fd;
> -
> -p = (QEMUFileStdio *)f->opaque;
> - fd = fileno(p->stdio_file);
> -
> -return fd;
> -}
> -
> static const QEMUFileOps stdio_file_read_ops = {
> .get_fd = stdio_get_fd,
> .get_buffer = stdio_get_buffer,
>
Reviewed-by: Orit Wasserman
, "could not accept migration connection\n");
> -goto out2;
> +goto out;
> }
>
> f = qemu_fopen_socket(c);
> @@ -147,9 +149,6 @@ static void unix_accept_incoming_migration(void *opaque)
> qemu_fclose(f);
> out:
> close(c);
> -out2:
> -qemu_set_fd_handler2(s, NULL, NULL, NULL, NULL);
> -close(s);
> }
>
> int unix_start_incoming_migration(const char *path)
>
Reviewed-by: Orit Wasserman
On 10/18/2012 12:22 PM, Paolo Bonzini wrote:
> migrate_fd_cleanup will usually close the file descriptor via
> buffered_file_close's call to migrate_fd_close. However, in the case
> of s->file == NULL it is "inlining" migrate_fd_close (almost: there is a
> direct close() instead of using s->close(
,7 +115,7 @@ static void tcp_accept_incoming_migration(void *opaque)
> process_incoming_migration(f);
> qemu_fclose(f);
> out:
> -close(c);
> +closesocket(c);
> }
>
> int tcp_start_incoming_migration(const char *host_port, Error **errp)
>
Reviewed-by: Orit Wasserman
1;
> +if (closesocket(s->fd) < 0) {
> +r = -socket_error();
> }
> return r;
> }
> diff --git a/migration-unix.c b/migration-unix.c
> index a407af2..def1969 100644
> --- a/migration-unix.c
> +++ b/migration-unix.c
> @@ -44,11 +44,8 @@ static int unix_close(MigrationState *s)
> {
> int r = 0;
> DPRINTF("unix_close\n");
> -if (s->fd != -1) {
> -if (close(s->fd) < 0) {
> -r = -errno;
> -}
> -s->fd = -1;
> +if (close(s->fd) < 0) {
> +r = -errno;
> }
> return r;
> }
>
Reviewed-by: Orit Wasserman
atic int socket_get_buffer(void *opaque, uint8_t *buf,
> int64_t pos, int size)
> static int socket_close(void *opaque)
> {
> QEMUFileSocket *s = opaque;
> +closesocket(s->fd);
> g_free(s);
> return 0;
> }
>
Reviewed-by: Orit Wasserman
t qemu_start_incoming_migration(const char *uri, Error
> **errp)
>
> void process_incoming_migration(QEMUFile *f)
> {
> -if (qemu_loadvm_state(f) < 0) {
> + int ret;
> +
> +ret = qemu_loadvm_state(f);
> +qemu_fclose(f);
> +if (ret < 0) {
> fprintf(stderr, "load of migration failed\n");
> exit(0);
> }
>
Reviewed-by: Orit Wasserman
On 10/18/2012 12:22 PM, Paolo Bonzini wrote:
> This will never happen right now (the assertion would fail). The
> next patch will set the socket or pipe in non-blocking mode, thus
> enabling this part of the code.
>
> Coroutines can just stop whenever they want with qemu_coroutine_yield.
> As soo
_set_nonblock(fd);
> +qemu_set_fd_handler(fd, enter_migration_coroutine, NULL, co);
> +qemu_coroutine_enter(co, f);
> +}
> +
> /* amount of nanoseconds we are willing to wait for migration to be down.
> * the choice of nanoseconds is because it is the maximum resolution that
> * get_clock() can achieve. It is an internal measure. All user-visible
>
Reviewed-by: Orit Wasserman
On 10/28/2012 10:35 AM, Orit Wasserman wrote:
> On 10/26/2012 01:39 PM, Juan Quintela wrote:
>> Orit Wasserman wrote:
>>> On 10/18/2012 09:30 AM, Juan Quintela wrote:
>>>> Instead of testing each page individually, we search what is the next
>>>> dirty
1 - 100 of 791 matches
Mail list logo