Zhao Liu <zhao1....@linux.intel.com> wrote:
> From: Zhao Liu <zhao1....@intel.com>
>
> As the generic code, here we should respect the different topologies:
> smp or hybrid.
>
> So rename PostcopyBlocktimeContext.smp_cpus_down to
> PostcopyBlocktimeContext.cpus_down, and also rename other local
> variables from smp_cpus to cpus_num, to decouple with smp topology.
>
> And use generic topology helpers to get topology information.
>
> Cc: Juan Quintela <quint...@redhat.com>
> Cc: Dr. David Alan Gilbert <dgilb...@redhat.com>
> Signed-off-by: Zhao Liu <zhao1....@intel.com>
Reviewed-by: Juan Quintela <quint...@redhat.com>

but if you ever have to rebase.

> ---
>  migration/postcopy-ram.c | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
> index 53299b7a5ebd..1e861e313258 100644
> --- a/migration/postcopy-ram.c
> +++ b/migration/postcopy-ram.c
> @@ -122,7 +122,7 @@ typedef struct PostcopyBlocktimeContext {
>      /* point in time when last page fault was initiated */
>      uint32_t last_begin;
>      /* number of vCPU are suspended */
> -    int smp_cpus_down;
> +    int cpus_down;

Put the rename of the variable in a single patch.  Trivial to review.

> +    unsigned int cpus_num = machine_topo_get_cpus(ms);

Put the meat in another patch.  I think you call this function in two
places instead of the old one.


Later, Juan.


Reply via email to