qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/3] migration: Update atomic stats out of the mutex


From: David Edmondson
Subject: Re: [PATCH 2/3] migration: Update atomic stats out of the mutex
Date: Thu, 02 Mar 2023 11:51:22 +0000
User-agent: mu4e 1.8.14; emacs 30.0.50

On Wednesday, 2023-03-01 at 13:40:25 +01, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: David Edmondson <david.edmondson@oracle.com>

> ---
>  migration/multifd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/migration/multifd.c b/migration/multifd.c
> index 7cb2326d03..f558169e37 100644
> --- a/migration/multifd.c
> +++ b/migration/multifd.c
> @@ -433,8 +433,8 @@ static int multifd_send_pages(QEMUFile *f)
>      transferred = ((uint64_t) pages->num) * p->page_size + p->packet_len;
>      qemu_file_acct_rate_limit(f, transferred);
>      ram_counters.multifd_bytes += transferred;
> +    qemu_mutex_unlock(&p->mutex);
>      stat64_add(&ram_counters.transferred, transferred);
> -    qemu_mutex_unlock(&p->mutex);
>      qemu_sem_post(&p->sem);
>  
>      return 1;
> @@ -628,8 +628,8 @@ int multifd_send_sync_main(QEMUFile *f)
>          p->pending_job++;
>          qemu_file_acct_rate_limit(f, p->packet_len);
>          ram_counters.multifd_bytes += p->packet_len;
> +        qemu_mutex_unlock(&p->mutex);
>          stat64_add(&ram_counters.transferred, p->packet_len);
> -        qemu_mutex_unlock(&p->mutex);
>          qemu_sem_post(&p->sem);
>      }
>      for (i = 0; i < migrate_multifd_channels(); i++) {
-- 
I walk like a building, I never get wet.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]