[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 12/23] multifd: Make zlib use iov's
From: |
Juan Quintela |
Subject: |
Re: [PATCH v3 12/23] multifd: Make zlib use iov's |
Date: |
Mon, 29 Nov 2021 19:21:11 +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>
>> ---
>> migration/multifd-zlib.c | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/migration/multifd-zlib.c b/migration/multifd-zlib.c
>> index da6201704c..478a4af115 100644
>> --- a/migration/multifd-zlib.c
>> +++ b/migration/multifd-zlib.c
>> @@ -143,6 +143,9 @@ static int zlib_send_prepare(MultiFDSendParams *p, Error
>> **errp)
>> }
>> out_size += available - zs->avail_out;
>> }
>> + p->iov[p->iovs_num].iov_base = z->zbuff;
>> + p->iov[p->iovs_num].iov_len = out_size;
>> + p->iovs_num++;
>> p->next_packet_size = out_size;
>
> Do you still need next_packet_size?
As my crystal ball didn't worked so well, I ended putting
next_packet_size on the wire. So yes, I need it.
Yes, I also wanted to remove it.
Later, Juan.
>
> but:
>
>
> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
>
>> p->flags |= MULTIFD_FLAG_ZLIB;
>>
>> @@ -162,10 +165,7 @@ static int zlib_send_prepare(MultiFDSendParams *p,
>> Error **errp)
>> */
>> static int zlib_send_write(MultiFDSendParams *p, uint32_t used, Error
>> **errp)
>> {
>> - struct zlib_data *z = p->data;
>> -
>> - return qio_channel_write_all(p->c, (void *)z->zbuff,
>> p->next_packet_size,
>> - errp);
>> + return qio_channel_writev_all(p->c, p->iov, p->iovs_num, errp);
>> }
>>
>> /**
>> --
>> 2.33.1
>>
- Re: [PATCH v3 07/23] multifd: remove used parameter from send_recv_pages() method, (continued)
- [PATCH v3 04/23] multifd: Add missing documention, Juan Quintela, 2021/11/24
- [PATCH v3 09/23] multifd: Make zstd compression method not use iovs, Juan Quintela, 2021/11/24
- [PATCH v3 11/23] multifd: Move iov from pages to params, Juan Quintela, 2021/11/24
- [PATCH v3 12/23] multifd: Make zlib use iov's, Juan Quintela, 2021/11/24
- [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