[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC 05/15] migration: Simplify unqueue_page()
From: |
Juan Quintela |
Subject: |
Re: [PATCH RFC 05/15] migration: Simplify unqueue_page() |
Date: |
Thu, 27 Jan 2022 10:41:31 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Peter Xu <peterx@redhat.com> wrote:
> This patch simplifies unqueue_page() on both sides of it (itself, and caller).
>
> Firstly, due to the fact that right after unqueue_page() returned true, we'll
> definitely send a huge page (see ram_save_huge_page() call - it will _never_
> exit before finish sending that huge page), so unqueue_page() does not need to
> jump in small page size if huge page is enabled on the ramblock. IOW, it's
> destined that only the 1st 4K page will be valid, when unqueue the 2nd+ time
> we'll notice the whole huge page has already been sent anyway. Switching to
> operating on huge page reduces a lot of the loops of redundant unqueue_page().
>
> Meanwhile, drop the dirty check. It's not helpful to call test_bit() every
> time to jump over clean pages, as ram_save_host_page() has already done so,
> while in a faster way (see commit ba1b7c812c ("migration/ram: Optimize
> ram_save_host_page()", 2021-05-13)). So that's not necessary too.
>
> Drop the two tracepoints along the way - based on above analysis it's very
> possible that no one is really using it..
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
queued.
I added the extra tracepoint that you added later.
- [PATCH RFC 02/15] migration: Allow pss->page jump over clean pages, (continued)
- [PATCH RFC 06/15] migration: Move temp page setup and cleanup into separate functions, Peter Xu, 2022/01/19
- [PATCH RFC 07/15] migration: Introduce postcopy channels on dest node, Peter Xu, 2022/01/19
- [PATCH RFC 08/15] migration: Dump ramblock and offset too when non-same-page detected, Peter Xu, 2022/01/19
- [PATCH RFC 09/15] migration: Add postcopy_thread_create(), Peter Xu, 2022/01/19
- [PATCH RFC 10/15] migration: Move static var in ram_block_from_stream() into global, Peter Xu, 2022/01/19
- [PATCH RFC 11/15] migration: Add pss.postcopy_requested status, Peter Xu, 2022/01/19
- [PATCH RFC 12/15] migration: Move migrate_allow_multifd and helpers into migration.c, Peter Xu, 2022/01/19
- [PATCH RFC 13/15] migration: Add postcopy-preempt capability, Peter Xu, 2022/01/19