[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 17/23] multifd: Use normal pages array on the send side
From: |
Juan Quintela |
Subject: |
Re: [PATCH v3 17/23] multifd: Use normal pages array on the send side |
Date: |
Tue, 30 Nov 2021 13:01:10 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
"Dr. David Alan Gilbert" <dgilbert@redhat.com> wrote:
> * Juan Quintela (quintela@redhat.com) wrote:
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>
> Can you explain a bit more what's going on here?
Sorry.
Until patch 20, we have what we had always have:
pages that are sent through multifd (non zero pages). We are going to
call it normal pages. So right now, we use the array of pages that we
are passed in directly on the multifd send methods.
But when we introduce zero pages handling around patch 20, we end having
two types of pages sent through multifd:
- normal pages (a.k.a. non-zero pages)
- zero pages
So the options are:
- we rename the fields before we introduce the zero page code, and then
we introduce the zero page code.
- we rename at the same time that we introduce the zero page code.
I decided to go with the 1st option.
The other thing that we do here is that we introduce the normal array
pages, so right now we do:
for (i = 0; i < pages->num; i++) {
p->narmal[p->normal_num] = pages->offset[i];
p->normal_num++:
}
Why?
Because then patch 20 becomes:
for (i = 0; i < pages->num; i++) {
if (buffer_is_zero(page->offset[i])) {
p->zerol[p->zero_num] = pages->offset[i];
p->zeronum++:
} else {
p->narmal[p->normal_num] = pages->offset[i];
p->normal_num++:
}
}
i.e. don't have to touch the handling of normal pages at all, only this
for loop.
As an added benefit, after this patch, multifd methods don't need to
know about the pages array, only about the params array (that will allow
me to drop the locking earlier).
I hope this helps.
Later, Juan.
- [PATCH v3 06/23] multifd: remove used parameter from send_prepare() method, (continued)
- [PATCH v3 06/23] multifd: remove used parameter from send_prepare() method, Juan Quintela, 2021/11/24
- [PATCH v3 13/23] multifd: Make zstd use iov's, Juan Quintela, 2021/11/24
- [PATCH v3 15/23] multifd: Use a single writev on the send side, Juan Quintela, 2021/11/24
- [PATCH v3 16/23] multifd: Unfold "used" variable by its value, Juan Quintela, 2021/11/24
- [PATCH v3 17/23] multifd: Use normal pages array on the send side, Juan Quintela, 2021/11/24
- [PATCH v3 14/23] multifd: Remove send_write() method, Juan Quintela, 2021/11/24
- [PATCH v3 18/23] multifd: Use normal pages array on the recv side, Juan Quintela, 2021/11/24
- [PATCH v3 19/23] multifd: recv side only needs the RAMBlock host address, Juan Quintela, 2021/11/24
- [PATCH v3 20/23] multifd: Rename pages_used to normal_pages, Juan Quintela, 2021/11/24
- [PATCH v3 21/23] multifd: Support for zero pages transmission, Juan Quintela, 2021/11/24
- [PATCH v3 22/23] multifd: Zero pages transmission, Juan Quintela, 2021/11/24
- [PATCH v3 23/23] migration: Use multifd before we check for the zero page, Juan Quintela, 2021/11/24
- Re: [PATCH v3 00/23] Migration: Transmit and detect zero pages in the multifd threads, Peter Xu, 2021/11/24