qemu-devel
[Top][All Lists]
Advanced

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

Re: [RESEND PATCH 2/2] migration: report multiFd related thread pid to l


From: Dr. David Alan Gilbert
Subject: Re: [RESEND PATCH 2/2] migration: report multiFd related thread pid to libvirt
Date: Wed, 11 Jan 2023 19:00:53 +0000
User-agent: Mutt/2.2.9 (2022-11-12)

* Jiang Jiacheng via (qemu-devel@nongnu.org) wrote:
> From: Zheng Chuan <zhengchuan@huawei.com>
> 
> Report multiFd related thread pid to libvirt in order to
> pin multiFd thread to different cpu.

With multifd you may well want to pin different multifd threads
to different cores; so you need to include the 'id' and 'name' fields of
the multifd thread in the event.

(Copying in Jiri and Dan )

Dave

> ---
>  migration/multifd.c |  4 ++++
>  qapi/migration.json | 12 ++++++++++++
>  2 files changed, 16 insertions(+)
> 
> diff --git a/migration/multifd.c b/migration/multifd.c
> index 000ca4d4ec..f3f7e8ae31 100644
> --- a/migration/multifd.c
> +++ b/migration/multifd.c
> @@ -17,6 +17,7 @@
>  #include "exec/ramblock.h"
>  #include "qemu/error-report.h"
>  #include "qapi/error.h"
> +#include "qapi/qapi-events-migration.h"
>  #include "ram.h"
>  #include "migration.h"
>  #include "socket.h"
> @@ -650,6 +651,9 @@ static void *multifd_send_thread(void *opaque)
>      int ret = 0;
>      bool use_zero_copy_send = migrate_use_zero_copy_send();
>  
> +    /* report multifd thread pid to libvirt */
> +    qapi_event_send_migration_multifd_pid(qemu_get_thread_id());
> +
>      trace_multifd_send_thread_start(p->id);
>      rcu_register_thread();
>  
> diff --git a/qapi/migration.json b/qapi/migration.json
> index aafc940617..33fc319329 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -1286,6 +1286,18 @@
>  { 'event': 'MIGRATION_PASS',
>    'data': { 'pass': 'int' } }
>  
> +##
> +# @MIGRATION_MULTIFD_PID:
> +#
> +# Emitted when multifd thread appear
> +#
> +# @pid: pid of multifd thread
> +#
> +# Since: 7.2
> +##
> +{ 'event': 'MIGRATION_MULTIFD_PID',
> +  'data': { 'pid': 'int' } }
> +
>  ##
>  # @MIGRATION_PID:
>  #
> -- 
> 2.33.0
> 
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK




reply via email to

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