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 <quint...@redhat.com> > Subject: Re: [RFC 15/52] migration/postcopy-ram: Use generic topology name > and helper > > 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. >
Thanks Juan! On the next send, I'll do the split. > > Later, Juan. >