[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v2 6/9] migration/multifd: Move pages accounting into mul
From: |
Fabiano Rosas |
Subject: |
Re: [RFC PATCH v2 6/9] migration/multifd: Move pages accounting into multifd_send_zero_page_detect() |
Date: |
Mon, 22 Jul 2024 17:07:57 -0300 |
Peter Xu <peterx@redhat.com> writes:
> On Mon, Jul 22, 2024 at 02:59:11PM -0300, Fabiano Rosas wrote:
>> All references to pages are being removed from the multifd worker
>> threads in order to allow multifd to deal with different payload
>> types.
>>
>> multifd_send_zero_page_detect() is called by all multifd migration
>> paths that deal with pages and is the last spot where zero pages and
>> normal page amounts are adjusted. Move the pages accounting into that
>> function.
>
> True, but it's a bit hackish to update (especially, normal) page counters
> in a zero page detect function.
Hm, that's the one place in the code that actually sets
normal_num. Seems adequate to me.
> I understand you want to move pages out of the thread function, that's
> fair. How about put it in your new multifd_ram_fill_packet()?
>
That one is skipped when mapped-ram is in use. I could move it to
nocomp_send_prepare() after the zero_page_detect. It seems we're moving
towards changing nocomp -> ram at some point anyway. Would that be
better? It would duplicate the call due to the compression code.
- [RFC PATCH v2 1/9] migration/multifd: Reduce access to p->pages, (continued)
- [RFC PATCH v2 1/9] migration/multifd: Reduce access to p->pages, Fabiano Rosas, 2024/07/22
- [RFC PATCH v2 3/9] migration/multifd: Introduce MultiFDSendData, Fabiano Rosas, 2024/07/22
- [RFC PATCH v2 4/9] migration/multifd: Make MultiFDPages_t:offset a flexible array member, Fabiano Rosas, 2024/07/22
- [RFC PATCH v2 2/9] migration/multifd: Pass in MultiFDPages_t to file_write_ramblock_iov, Fabiano Rosas, 2024/07/22
- [RFC PATCH v2 6/9] migration/multifd: Move pages accounting into multifd_send_zero_page_detect(), Fabiano Rosas, 2024/07/22
- [RFC PATCH v2 5/9] migration/multifd: Replace p->pages with an union pointer, Fabiano Rosas, 2024/07/22
- [RFC PATCH v2 7/9] migration/multifd: Isolate ram pages packet data, Fabiano Rosas, 2024/07/22
[RFC PATCH v2 8/9] migration/multifd: Don't send ram data during SYNC, Fabiano Rosas, 2024/07/22