All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Jiang Jiacheng <jiangjiacheng@huawei.com>,
	jdenemar@redhat.com, berrange@redhat.com
Cc: qemu-devel@nongnu.org, quintela@redhat.com, yubihong@huawei.com,
	xiexiangyou@huawei.com, zhengchuan@huawei.com,
	linyilu@huawei.com
Subject: Re: [RESEND PATCH 2/2] migration: report multiFd related thread pid to libvirt
Date: Wed, 11 Jan 2023 19:00:53 +0000	[thread overview]
Message-ID: <Y78HZb0AG55Yp/i/@work-vm> (raw)
In-Reply-To: <20230109121235.2666476-3-jiangjiacheng@huawei.com>

* 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	other threads:[~2023-01-11 19:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09 12:12 [RESEND PATCH 0/2] migration: Report migration related thread pid to libvirt to support migration pin Jiang Jiacheng via
2023-01-09 12:12 ` [RESEND PATCH 1/2] migration: report migration related thread pid to libvirt Jiang Jiacheng via
2023-01-09 12:12 ` [RESEND PATCH 2/2] migration: report multiFd " Jiang Jiacheng via
2023-01-11 19:00   ` Dr. David Alan Gilbert [this message]
2023-01-11 19:04     ` Daniel P. Berrangé
2023-01-12  9:24       ` Jiang Jiacheng via

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=Y78HZb0AG55Yp/i/@work-vm \
    --to=dgilbert@redhat.com \
    --cc=berrange@redhat.com \
    --cc=jdenemar@redhat.com \
    --cc=jiangjiacheng@huawei.com \
    --cc=linyilu@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=xiexiangyou@huawei.com \
    --cc=yubihong@huawei.com \
    --cc=zhengchuan@huawei.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.