Re: [Qemu-devel] [PATCH v2 6/8] migration: move handle of zero page to the thread

2018-07-24 Thread Xiao Guangrong
On 07/23/2018 05:40 PM, Peter Xu wrote: On Mon, Jul 23, 2018 at 04:44:49PM +0800, Xiao Guangrong wrote: [...] However, it is not safe to do ram_release_pages in the thread as it's not protected it multithreads. Fortunately, compression will be disabled if it switches to post-copy, so i pre

Re: [Qemu-devel] [PATCH v2 6/8] migration: move handle of zero page to the thread

2018-07-23 Thread Peter Xu
On Mon, Jul 23, 2018 at 04:44:49PM +0800, Xiao Guangrong wrote: [...] > > > > > > However, it is not safe to do ram_release_pages in the thread as it's > > > not protected it multithreads. Fortunately, compression will be disabled > > > if it switches to post-copy, so i preferred to keep current

Re: [Qemu-devel] [PATCH v2 6/8] migration: move handle of zero page to the thread

2018-07-23 Thread Xiao Guangrong
On 07/23/2018 04:28 PM, Peter Xu wrote: On Mon, Jul 23, 2018 at 03:56:33PM +0800, Xiao Guangrong wrote: [...] @@ -2249,15 +2308,8 @@ static int ram_save_target_page(RAMState *rs, PageSearchStatus *pss, return res; } -/* - * When starting the process of a new block

Re: [Qemu-devel] [PATCH v2 6/8] migration: move handle of zero page to the thread

2018-07-23 Thread Peter Xu
On Mon, Jul 23, 2018 at 03:56:33PM +0800, Xiao Guangrong wrote: [...] > > > @@ -2249,15 +2308,8 @@ static int ram_save_target_page(RAMState *rs, > > > PageSearchStatus *pss, > > > return res; > > > } > > > -/* > > > - * When starting the process of a new block, the first

Re: [Qemu-devel] [PATCH v2 6/8] migration: move handle of zero page to the thread

2018-07-23 Thread Xiao Guangrong
On 07/23/2018 01:03 PM, Peter Xu wrote: On Thu, Jul 19, 2018 at 08:15:18PM +0800, guangrong.x...@gmail.com wrote: [...] @@ -1950,12 +1971,16 @@ retry: set_compress_params(&comp_param[idx], block, offset); qemu_cond_signal(&comp_param[idx].cond); qem

Re: [Qemu-devel] [PATCH v2 6/8] migration: move handle of zero page to the thread

2018-07-22 Thread Peter Xu
On Thu, Jul 19, 2018 at 08:15:18PM +0800, guangrong.x...@gmail.com wrote: [...] > @@ -1950,12 +1971,16 @@ retry: > set_compress_params(&comp_param[idx], block, offset); > qemu_cond_signal(&comp_param[idx].cond); > qemu_mutex_unlock(&comp_param[idx].mutex); >

[Qemu-devel] [PATCH v2 6/8] migration: move handle of zero page to the thread

2018-07-19 Thread guangrong . xiao
From: Xiao Guangrong Detecting zero page is not a light work, moving it to the thread to speed the main thread up Signed-off-by: Xiao Guangrong --- migration/ram.c | 112 +++- 1 file changed, 78 insertions(+), 34 deletions(-) diff --git a/mi