[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 05/10] migration: move handle of zero page to
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH v3 05/10] migration: move handle of zero page to the thread |
Date: |
Wed, 8 Aug 2018 12:39:26 +0800 |
User-agent: |
Mutt/1.10.0 (2018-05-17) |
On Tue, Aug 07, 2018 at 05:12:04PM +0800, address@hidden wrote:
> From: Xiao Guangrong <address@hidden>
>
> Detecting zero page is not a light work, moving it to the thread to
> speed the main thread up, btw, handling ram_release_pages() for the
> zero page is moved to the thread as well
>
> Signed-off-by: Xiao Guangrong <address@hidden>
> ---
[...]
> @@ -2239,17 +2290,10 @@ static int ram_save_target_page(RAMState *rs,
> PageSearchStatus *pss,
> }
>
> /*
> - * Make sure the first page is sent out before other pages.
> - *
> - * we post it as normal page as compression will take much
> - * CPU resource.
> + * do not use multifd for compression as the first page in the new
> + * block should be posted out before sending the compressed page
> */
> - if (block == rs->last_sent_block && save_page_use_compression(rs)) {
> - res = compress_page_with_multi_thread(rs, block, offset);
> - if (res > 0) {
> - return res;
> - }
> - } else if (migrate_use_multifd()) {
> + if (!save_page_use_compression(rs) && migrate_use_multifd()) {
Not related to this patch: I think we should just disallow user to
specify both compression and multifd together. I vaguely remembered
that I left a comment somewhere in the multifd series but it must have
fallen throw the cracks... Anyway it's not related to this patch:
Reviewed-by: Peter Xu <address@hidden>
Thanks,
> return ram_save_multifd_page(rs, block, offset);
> }
>
> --
> 2.14.4
>
--
Peter Xu
- [Qemu-devel] [PATCH v3 00/10] migration: compression optimization, guangrong . xiao, 2018/08/07
- [Qemu-devel] [PATCH v3 02/10] migration: fix counting normal page for compression, guangrong . xiao, 2018/08/07
- [Qemu-devel] [PATCH v3 03/10] migration: introduce save_zero_page_to_file, guangrong . xiao, 2018/08/07
- [Qemu-devel] [PATCH v3 04/10] migration: drop the return value of do_compress_ram_page, guangrong . xiao, 2018/08/07
- [Qemu-devel] [PATCH v3 05/10] migration: move handle of zero page to the thread, guangrong . xiao, 2018/08/07
- Re: [Qemu-devel] [PATCH v3 05/10] migration: move handle of zero page to the thread,
Peter Xu <=
- [Qemu-devel] [PATCH v3 06/10] migration: hold the lock only if it is really needed, guangrong . xiao, 2018/08/07
- [Qemu-devel] [PATCH v3 07/10] migration: do not flush_compressed_data at the end of each iteration, guangrong . xiao, 2018/08/07
- [Qemu-devel] [PATCH v3 08/10] migration: handle the error condition properly, guangrong . xiao, 2018/08/07