[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 03/23] multifd: Rename used field to num
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [PATCH v3 03/23] multifd: Rename used field to num |
Date: |
Thu, 25 Nov 2021 18:30:57 +0000 |
User-agent: |
Mutt/2.1.3 (2021-09-10) |
* Juan Quintela (quintela@redhat.com) wrote:
> "Dr. David Alan Gilbert" <dgilbert@redhat.com> wrote:
> > * Juan Quintela (quintela@redhat.com) wrote:
> >> We will need to split it later in zero_num (number of zero pages) and
> >> normal_num (number of normal pages). This name is better.
> >>
> >> Signed-off-by: Juan Quintela <quintela@redhat.com>
> >> ---
> >> migration/multifd.h | 2 +-
> >> migration/multifd.c | 38 +++++++++++++++++++-------------------
> >> 2 files changed, 20 insertions(+), 20 deletions(-)
> >>
> >> diff --git a/migration/multifd.h b/migration/multifd.h
> >> index 15c50ca0b2..86820dd028 100644
> >> --- a/migration/multifd.h
> >> +++ b/migration/multifd.h
> >> @@ -55,7 +55,7 @@ typedef struct {
> >>
> >> typedef struct {
> >> /* number of used pages */
> >> - uint32_t used;
> >> + uint32_t num;
> >
> > What does 'used' actually mean here?
>
> We allocate 128 pages for each "packet".
> But we can ben handled less than that (we are at the end of one
> iteration, the end of a ramblock, ...).
> That is what used mean.
>
> But later on the series, we enter with normal pages, and zero pages, and
> naming get really confusing. So, I moved to use *_num for everything.
>
> Even after all the series, I didn't rename everything on multifd, only
> the fields that I have to use sooner or later.
Hmm OK, I'm not sure 'num' is much better than used, but OK
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Later, Juan.
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
- Re: [PATCH v3 01/23] multifd: Delete useless operation, (continued)
[PATCH v3 02/23] migration: Never call twice qemu_target_page_size(), Juan Quintela, 2021/11/24
[PATCH v3 03/23] multifd: Rename used field to num, Juan Quintela, 2021/11/24
[PATCH v3 05/23] multifd: The variable is only used inside the loop, Juan Quintela, 2021/11/24
[PATCH v3 08/23] multifd: Fill offset and block for reception, Juan Quintela, 2021/11/24
[PATCH v3 10/23] multifd: Make zlib compression method not use iovs, Juan Quintela, 2021/11/24
[PATCH v3 07/23] multifd: remove used parameter from send_recv_pages() method, Juan Quintela, 2021/11/24
[PATCH v3 04/23] multifd: Add missing documention, Juan Quintela, 2021/11/24