On Tue, Aug 07, 2018 at 05:12:04PM +0800, [email protected] wrote:
> From: Xiao Guangrong <[email protected]>
>
> 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 <[email protected]>
> ---
[...]
> @@ -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 <[email protected]>
Thanks,
> return ram_save_multifd_page(rs, block, offset);
> }
>
> --
> 2.14.4
>
--
Peter Xu