qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: Joao Martins <joao.m.martins@oracle.com>
Cc: qemu-devel@nongnu.org,  Peter Xu <peterx@redhat.com>,
	 Leonardo Bras <leobras@redhat.com>,
	 Eric Blake <eblake@redhat.com>,
	 Markus Armbruster <armbru@redhat.com>,
	 Avihai Horon <avihaih@nvidia.com>,
	 Yishai Hadas <yishaih@nvidia.com>,
	 "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
Subject: Re: [PATCH 5/5] migration: Print expected-downtime on completion
Date: Tue, 31 Oct 2023 14:14:51 +0100	[thread overview]
Message-ID: <877cn37x2s.fsf@secure.mitica> (raw)
In-Reply-To: <20230926161841.98464-6-joao.m.martins@oracle.com> (Joao Martins's message of "Tue, 26 Sep 2023 17:18:41 +0100")

Joao Martins <joao.m.martins@oracle.com> wrote:
> Right now, migration statistics either print downtime or expected
> downtime depending on migration completing of in progress. Also in the
> beginning of migration by printing the downtime limit as expected
> downtime, when estimation is not available.
>
> The pending_size is private in migration iteration and not necessarily
> accessible outside. Given the non-determinism of the switchover cost, it
> can be useful to understand if the downtime was far off from the one
> detected by the migration algoritm, thus print the resultant downtime
> alongside its estimation.
>
> Signed-off-by: Joao Martins <joao.m.martins@oracle.com>

I see that "part" of this series is on the downtime series by Peter.
I have merged them (they are tracepoints, we can change them when
needed).

But this one is not on that series.

Should we continue and send a patch for it?

Later, Juan.


> ---
>  migration/migration.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index dec6c88fbff9..f08f65b4b1c3 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -943,6 +943,10 @@ static void populate_time_info(MigrationInfo *info, MigrationState *s)
>      if (s->state == MIGRATION_STATUS_COMPLETED) {
>          info->has_total_time = true;
>          info->total_time = s->total_time;
> +        if (s->expected_downtime) {
> +            info->has_expected_downtime = true;
> +            info->expected_downtime = s->expected_downtime;
> +        }
>      } else {
>          info->has_total_time = true;
>          info->total_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME) -
> @@ -2844,6 +2848,10 @@ static MigIterateState migration_iteration_run(MigrationState *s)
>  
>      if ((!pending_size || pending_size < s->threshold_size) && can_switchover) {
>          trace_migration_thread_low_pending(pending_size);
> +        if (s->threshold_size) {
> +            s->expected_downtime = (pending_size * s->parameters.downtime_limit) /
> +                                   s->threshold_size;
> +        }
>          migration_completion(s);
>          return MIG_ITERATE_BREAK;
>      }



  parent reply	other threads:[~2023-10-31 13:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 16:18 [PATCH 0/5] migration: Downtime observability improvements Joao Martins
2023-09-26 16:18 ` [PATCH 1/5] migration: Store downtime timestamps in an array Joao Martins
2023-09-28  1:55   ` Wang, Lei
2023-09-28 13:31     ` Joao Martins
2023-09-26 16:18 ` [PATCH 2/5] migration: Collect more timestamps during switchover Joao Martins
2023-09-26 16:18 ` [PATCH 3/5] migration: Add a tracepoint for the downtime stats Joao Martins
2023-09-26 16:18 ` [PATCH 4/5] migration: Provide QMP access to " Joao Martins
2023-10-04 17:10   ` Peter Xu
2023-10-06 11:37     ` Joao Martins
2023-10-06 14:27       ` Peter Xu
2023-09-26 16:18 ` [PATCH 5/5] migration: Print expected-downtime on completion Joao Martins
2023-10-04 19:33   ` Peter Xu
2023-10-06 11:45     ` Joao Martins
2023-10-31 13:14   ` Juan Quintela [this message]
2023-11-02 10:22     ` Joao Martins
2023-10-04 17:19 ` [PATCH 0/5] migration: Downtime observability improvements Peter Xu
2023-10-06 11:39   ` Joao Martins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877cn37x2s.fsf@secure.mitica \
    --to=quintela@redhat.com \
    --cc=armbru@redhat.com \
    --cc=avihaih@nvidia.com \
    --cc=eblake@redhat.com \
    --cc=joao.m.martins@oracle.com \
    --cc=leobras@redhat.com \
    --cc=maciej.szmigiero@oracle.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yishaih@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).