qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Yuan Liu <yuan1.liu@intel.com>,
	quintela@redhat.com, peterx@redhat.com, leobras@redhat.com
Cc: qemu-devel@nongnu.org, yuan1.liu@intel.com, nanhai.zou@intel.com
Subject: Re: [PATCH v2 2/4] multifd: Implement multifd compression accelerator
Date: Fri, 01 Dec 2023 15:01:19 -0300	[thread overview]
Message-ID: <87a5qtby4w.fsf@suse.de> (raw)
In-Reply-To: <20231109154638.488213-3-yuan1.liu@intel.com>

Yuan Liu <yuan1.liu@intel.com> writes:

> when starting multifd live migration, if the compression method is
> enabled, compression method can be accelerated using accelerators.
>
> Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
> Reviewed-by: Nanhai Zou <nanhai.zou@intel.com>
> ---
>  migration/multifd.c | 38 ++++++++++++++++++++++++++++++++++++--
>  migration/multifd.h |  8 ++++++++
>  2 files changed, 44 insertions(+), 2 deletions(-)
>
> diff --git a/migration/multifd.c b/migration/multifd.c
> index 1fe53d3b98..7149e67867 100644
> --- a/migration/multifd.c
> +++ b/migration/multifd.c
> @@ -165,6 +165,34 @@ static MultiFDMethods multifd_nocomp_ops = {
>  static MultiFDMethods *multifd_ops[MULTIFD_COMPRESSION__MAX] = {
>      [MULTIFD_COMPRESSION_NONE] = &multifd_nocomp_ops,
>  };
> +static MultiFDAccelMethods *accel_multifd_ops[MULTIFD_COMPRESSION_ACCEL__MAX];
> +
> +static MultiFDMethods *get_multifd_ops(void)
> +{
> +    MultiFDCompression comp = migrate_multifd_compression();
> +    MultiFDCompressionAccel accel = migrate_multifd_compression_accel();
> +
> +    if (comp == MULTIFD_COMPRESSION_NONE ||
> +        accel == MULTIFD_COMPRESSION_ACCEL_NONE) {
> +        return multifd_ops[comp];
> +    }
> +    if (accel == MULTIFD_COMPRESSION_ACCEL_AUTO) {
> +        for (int i = 0; i < MULTIFD_COMPRESSION_ACCEL__MAX; i++) {
> +            if (accel_multifd_ops[i] &&
> +                accel_multifd_ops[i]->is_supported(comp)) {
> +                return accel_multifd_ops[i]->get_multifd_methods();
> +            }
> +        }
> +        return multifd_ops[comp];
> +    }
> +
> +    /* Check if a specified accelerator is available */
> +    if (accel_multifd_ops[accel] &&

The CI is complaining that we might reach here with accel=2 when
!CONFIG_QPL. It seems the assert at migrate_multifd_compression_accel is
not enough.



  parent reply	other threads:[~2023-12-01 18:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09 15:46 [PATCH v2 0/4] Live Migration Acceleration with IAA Compression Yuan Liu
2023-11-09 15:46 ` [PATCH v2 1/4] migration: Introduce multifd-compression-accel parameter Yuan Liu
2023-12-01  9:17   ` Markus Armbruster
2023-12-04  9:27     ` Liu, Yuan1
2023-11-09 15:46 ` [PATCH v2 2/4] multifd: Implement multifd compression accelerator Yuan Liu
2023-11-24 13:20   ` Fabiano Rosas
2023-12-01 18:01   ` Fabiano Rosas [this message]
2023-12-04  9:24     ` Liu, Yuan1
2023-11-09 15:46 ` [PATCH v2 3/4] configure: add qpl option Yuan Liu
2023-12-01 17:44   ` Fabiano Rosas
2023-12-04  6:57     ` Liu, Yuan1
2023-12-04 12:29       ` Fabiano Rosas
2023-12-04 12:40         ` Liu, Yuan1
2023-11-09 15:46 ` [PATCH v2 4/4] multifd: Introduce QPL compression accelerator Yuan Liu

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=87a5qtby4w.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=leobras@redhat.com \
    --cc=nanhai.zou@intel.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=yuan1.liu@intel.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).