From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
Leonardo Bras <leobras@redhat.com>, Fam Zheng <fam@euphon.net>,
Peter Xu <peterx@redhat.com>
Subject: Re: [PATCH 3/9] qemu-file: make qemu_file_[sg]et_rate_limit() use an uint64_t
Date: Fri, 05 May 2023 01:59:26 +0200 [thread overview]
Message-ID: <87r0rvodgh.fsf@secure.mitica> (raw)
In-Reply-To: <20230504113841.23130-4-quintela@redhat.com> (Juan Quintela's message of "Thu, 4 May 2023 13:38:35 +0200")
Juan Quintela <quintela@redhat.com> wrote:
> It is really size_t. Everything else uses uint64_t, so move this to
> uint64_t as well. A size can't be negative anyways.
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
Self-nack.
> - qemu_file_set_rate_limit(ms->to_dst_file, INT64_MAX);
> + qemu_file_set_rate_limit(ms->to_dst_file, UINT64_MAX);
1st: this should be zero.
> } else {
> qemu_file_set_rate_limit(ms->to_dst_file, bandwidth / XFER_LIMIT_RATIO);
> }
> @@ -2301,7 +2301,7 @@ static void migration_completion(MigrationState *s)
> }
> if (ret >= 0) {
> s->block_inactive = !migrate_colo();
> - qemu_file_set_rate_limit(s->to_dst_file, INT64_MAX);
> + qemu_file_set_rate_limit(s->to_dst_file, UINT64_MAX);
Same here
> ret = qemu_savevm_state_complete_precopy(s->to_dst_file, false,
> s->block_inactive);
> }
> @@ -3049,7 +3049,7 @@ static void *bg_migration_thread(void *opaque)
> rcu_register_thread();
> object_ref(OBJECT(s));
>
> - qemu_file_set_rate_limit(s->to_dst_file, INT64_MAX);
> + qemu_file_set_rate_limit(s->to_dst_file, UINT64_MAX);
And here.
> @@ -748,18 +748,18 @@ int qemu_file_rate_limit(QEMUFile *f)
> if (qemu_file_get_error(f)) {
> return 1;
> }
> - if (f->rate_limit_max > 0 && f->rate_limit_used > f->rate_limit_max) {
> + if (f->rate_limit_used > f->rate_limit_max) {
And this is wrong. f->rate_limit_max == 0 means that we don't do rate_limit.
Will resend this one later.
Sorry, Juan.
PD. No, I have no clue how I have had this patch applied the whole day
and no failures and now I get failures in migration-test. The
number of times that I run this test on the last two days have been
in the hundreds.
next prev parent reply other threads:[~2023-05-05 0:00 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-04 11:38 [PATCH 0/9] QEMU file cleanups Juan Quintela
2023-05-04 11:38 ` [PATCH 1/9] migration: max_postcopy_bandwidth is a size parameter Juan Quintela
2023-05-04 16:48 ` Daniel P. Berrangé
2023-05-04 11:38 ` [PATCH 2/9] migration: qemu_file_total_transferred() function is monotonic Juan Quintela
2023-05-04 16:49 ` Daniel P. Berrangé
2023-05-04 11:38 ` [PATCH 3/9] qemu-file: make qemu_file_[sg]et_rate_limit() use an uint64_t Juan Quintela
2023-05-04 16:50 ` Daniel P. Berrangé
2023-05-04 23:59 ` Juan Quintela [this message]
2023-05-04 11:38 ` [PATCH 4/9] qemu-file: Make rate_limit_used " Juan Quintela
2023-05-04 16:51 ` Daniel P. Berrangé
2023-05-04 11:38 ` [PATCH 5/9] qemu-file: No need to check for shutdown in qemu_file_rate_limit Juan Quintela
2023-05-04 14:27 ` Peter Xu
2023-05-04 16:51 ` Daniel P. Berrangé
2023-05-04 11:38 ` [PATCH 6/9] qemu-file: remove shutdown member Juan Quintela
2023-05-04 14:27 ` Peter Xu
2023-05-04 16:52 ` Daniel P. Berrangé
2023-05-04 11:38 ` [PATCH 7/9] qemu-file: Make total_transferred an uint64_t Juan Quintela
2023-05-04 16:53 ` Daniel P. Berrangé
2023-05-04 11:38 ` [PATCH 8/9] qemu-file: Make ram_control_save_page() use accessors for rate_limit Juan Quintela
2023-05-04 14:28 ` Peter Xu
2023-05-04 16:53 ` Daniel P. Berrangé
2023-05-04 11:38 ` [PATCH 9/9] qemu-file: Account for rate_limit usage on qemu_fflush() Juan Quintela
2023-05-04 14:43 ` Peter Xu
2023-05-04 14:59 ` Juan Quintela
2023-05-04 16:58 ` Daniel P. Berrangé
2023-05-04 17:22 ` Juan Quintela
2023-05-05 7:19 ` Daniel P. Berrangé
2023-05-05 12:14 ` Juan Quintela
2023-05-04 14:45 ` [PATCH 0/9] QEMU file cleanups Peter Xu
2023-05-04 14:56 ` Juan Quintela
2023-05-04 15:24 ` Peter Xu
2023-05-04 15:29 ` Juan Quintela
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=87r0rvodgh.fsf@secure.mitica \
--to=quintela@redhat.com \
--cc=fam@euphon.net \
--cc=leobras@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.