qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 4/5] migration iaa-compress: Add IAA initialization and deini


From: Juan Quintela
Subject: Re: [PATCH 4/5] migration iaa-compress: Add IAA initialization and deinitialization
Date: Thu, 19 Oct 2023 13:27:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)

Yuan Liu <yuan1.liu@intel.com> wrote:
> This patch defines the structure for IAA jobs related to data
> compression and decompression, as well as the initialization and
> deinitialization processes for IAA.
>
> Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
> Reviewed-by: Nanhai Zou <nanhai.zou@intel.com>

You should be using orderfile.

$ less .git/config
...
[diff]
        orderFile = scripts/git.orderfile

So .h and friends came first in patches.

> diff --git a/migration/ram-compress.c b/migration/ram-compress.c
> index 47357352f7..acc511ce57 100644
> --- a/migration/ram-compress.c
> +++ b/migration/ram-compress.c
> @@ -30,6 +30,9 @@
>  #include "qemu/cutils.h"
>  
>  #include "ram-compress.h"
> +#ifdef CONFIG_QPL
> +#include "iaa-ram-compress.h"
> +#endif
>  
>  #include "qemu/error-report.h"
>  #include "migration.h"
> @@ -484,10 +487,11 @@ int ram_compress_save_setup(void)
>      if (!migrate_compress()) {
>          return 0;
>      }
> +#ifdef CONFIG_QPL
>      if (migrate_compress_with_iaa()) {
> -        /* Implement in next patch */
> -        return 0;
> +        return iaa_compress_init(false);
>      }
> +#endif
>      return compress_threads_save_setup();
>  }
>  
> @@ -496,10 +500,12 @@ void ram_compress_save_cleanup(void)
>      if (!migrate_compress()) {
>          return;
>      }
> +#ifdef CONFIG_QPL
>      if (migrate_compress_with_iaa()) {
> -        /* Implement in next patch */
> +        iaa_compress_deinit();
>          return;
>      }
> +#endif
>      compress_threads_save_cleanup();
>  }
>  
> @@ -516,9 +522,11 @@ int ram_compress_load_setup(QEMUFile *f)
>      if (!migrate_compress()) {
>          return 0;
>      }
> +#ifdef CONFIG_QPL
>      if (migrate_compress_with_iaa()) {
> -        /* Implement in next patch */
> +        return iaa_compress_init(true);
>      }
> +#endif
>      return compress_threads_load_setup(f);
>  }
>  
> @@ -527,8 +535,11 @@ void ram_compress_load_cleanup(void)
>      if (!migrate_compress()) {
>          return;
>      }
> +#ifdef CONFIG_QPL
>      if (migrate_compress_with_iaa()) {
> -        /* Implement in next patch */
> +        iaa_compress_deinit();
> +        return;
>      }
> +#endif
>      compress_threads_load_cleanup();
>  }

I think it would be easier to understand and implement if you drop
patch3, and just add at each place that there is a:

compress_threads_load_cleanup()

a

iaa_load_cleanup()

And the same for everything else.

Later, Juan.




reply via email to

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