[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC 15/52] migration/postcopy-ram: Use generic topology name and he
From: |
Zhao Liu |
Subject: |
Re: [RFC 15/52] migration/postcopy-ram: Use generic topology name and helper |
Date: |
Tue, 14 Feb 2023 16:12:18 +0800 |
On Mon, Feb 13, 2023 at 11:07:33AM +0100, Juan Quintela wrote:
> Date: Mon, 13 Feb 2023 11:07:33 +0100
> From: Juan Quintela <quintela@redhat.com>
> Subject: Re: [RFC 15/52] migration/postcopy-ram: Use generic topology name
> and helper
>
> Zhao Liu <zhao1.liu@linux.intel.com> wrote:
> > From: Zhao Liu <zhao1.liu@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 <quintela@redhat.com>
> > Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
>
> Reviewed-by: Juan Quintela <quintela@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.
>
Thanks Juan! On the next send, I'll do the split.
>
> Later, Juan.
>
- Re: [RFC 09/52] hw/machine: Introduce core type for hybrid topology, (continued)
- [RFC 10/52] machine: Replace MachineState.topo.smp access with topology helpers, Zhao Liu, 2023/02/13
- [RFC 11/52] accel/kvm: Add hybrid info when check cpu num, Zhao Liu, 2023/02/13
- [RFC 12/52] hw/acpi: Replace MachineState.smp access with topology helpers, Zhao Liu, 2023/02/13
- [RFC 14/52] hw/smbios: Use generic topology name and helper, Zhao Liu, 2023/02/13
- [RFC 13/52] cpu/core: Use generic topology helper for "help" to set nr_threads, Zhao Liu, 2023/02/13
- [RFC 15/52] migration/postcopy-ram: Use generic topology name and helper, Zhao Liu, 2023/02/13
- [RFC 16/52] plugins: Use generic topology name and helper, Zhao Liu, 2023/02/13
- [RFC 17/52] softmmu/cpus: Use generic topology helper in vcpus initialization, Zhao Liu, 2023/02/13
- [RFC 18/52] general: Replace MachineState.smp access with topology helpers, Zhao Liu, 2023/02/13
- [RFC 19/52] i386: Replace MachineState.smp access with topology helpers, Zhao Liu, 2023/02/13
- [RFC 20/52] s390x: Replace MachineState.smp access with topology helpers, Zhao Liu, 2023/02/13
- [RFC 21/52] ppc: Replace MachineState.smp access with topology helpers, Zhao Liu, 2023/02/13