[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 2/4] Curling: cmdline interface
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH RFC 2/4] Curling: cmdline interface |
Date: |
Tue, 10 Sep 2013 15:57:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Jules Wang <address@hidden> wrote:
> Parse the word 'curling' when incoming/outgoing migration is
> starting. So we know whether to enable fault tolerant or not.
>
> Signed-off-by: Jules Wang <address@hidden>
> ---
> include/migration/migration.h | 2 ++
> migration.c | 16 ++++++++++++++++
> 2 files changed, 18 insertions(+)
>
> diff --git a/include/migration/migration.h b/include/migration/migration.h
> index 140e6b4..4cbb62f 100644
> --- a/include/migration/migration.h
> +++ b/include/migration/migration.h
> @@ -162,4 +162,6 @@ size_t ram_control_save_page(QEMUFile *f, ram_addr_t
> block_offset,
> ram_addr_t offset, size_t size,
> int *bytes_sent);
>
> +bool ft_enabled(void);
> +
> #endif
> diff --git a/migration.c b/migration.c
> index 200d404..59c8f32 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -58,6 +58,12 @@ enum {
> static NotifierList migration_state_notifiers =
> NOTIFIER_LIST_INITIALIZER(migration_state_notifiers);
>
> +static bool ft_mode;
> +bool ft_enabled(void)
> +{
> + return ft_mode;
Shouldn't this be in migration_state? Just wondering. And yes, I
don't see either a trivial place how to get it. get_current_migration()?
> +}
> +
> /* When we add fault tolerance, we could have several
> migrations at once. For now we don't need to add
> dynamic creation of migration */
> @@ -78,6 +84,11 @@ void qemu_start_incoming_migration(const char *uri, Error
> **errp)
> {
> const char *p;
>
> + if (strstart(uri, "curling:", &p)) {
> + ft_mode = true;
> + uri = p;
> + }
> +
Syntax is at least weird:
curling:tcp:foo:9999
curling+tcp:foo:9999
could be better? Suggestions folks?
notice that we still need more things: tcp+tls should happen at some
time soon. This is not related with this patch.
> if (strstart(uri, "tcp:", &p))
> tcp_start_incoming_migration(p, errp);
> #ifdef CONFIG_RDMA
> @@ -420,6 +431,11 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
>
> s = migrate_init(¶ms);
>
> + if (strstart(uri, "curling:", &p)) {
> + ft_mode = true;
> + uri = p;
> + }
> +
> if (strstart(uri, "tcp:", &p)) {
> tcp_start_outgoing_migration(s, p, &local_err);
> #ifdef CONFIG_RDMA
- [Qemu-devel] [PATCH RFC 0/4] Curling: KVM Fault Tolerance, Jules Wang, 2013/09/10
- Re: [Qemu-devel] [PATCH RFC 0/4] Curling: KVM Fault Tolerance, Orit Wasserman, 2013/09/10
- [Qemu-devel] [PATCH RFC 4/4] Curling: the receiver, Jules Wang, 2013/09/10
- [Qemu-devel] [PATCH RFC 3/4] Curling: the sender, Jules Wang, 2013/09/10
- [Qemu-devel] [PATCH RFC 2/4] Curling: cmdline interface, Jules Wang, 2013/09/10
- Re: [Qemu-devel] [PATCH RFC 2/4] Curling: cmdline interface,
Juan Quintela <=
- Re: [Qemu-devel] [PATCH RFC 2/4] Curling: cmdline interface, Paolo Bonzini, 2013/09/10
- Re: [Qemu-devel] [PATCH RFC 2/4] Curling: cmdline interface, Juan Quintela, 2013/09/10
- Re: [Qemu-devel] [PATCH RFC 2/4] Curling: cmdline interface, Paolo Bonzini, 2013/09/10
- Re: [Qemu-devel] [PATCH RFC 2/4] Curling: cmdline interface, Juan Quintela, 2013/09/10
- Re: [Qemu-devel] [PATCH RFC 2/4] Curling: cmdline interface, Juan Quintela, 2013/09/10
- Re: [Qemu-devel] [PATCH RFC 2/4] Curling: cmdline interface, junqing . wang, 2013/09/10
[Qemu-devel] [PATCH RFC 1/4] Curling: add doc, Jules Wang, 2013/09/10