From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH v2 1/8] migration: do not wait for free thread Date: Tue, 24 Jul 2018 15:40:18 +0800 Message-ID: <6a4d48c6-edae-36bf-e8e8-853ed02ee805@gmail.com> References: <20180719121520.30026-1-xiaoguangrong@tencent.com> <20180719121520.30026-2-xiaoguangrong@tencent.com> <2ad95481-76bd-22ec-4d79-aa39c950db56@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: kvm@vger.kernel.org, Xiao Guangrong , qemu-devel@nongnu.org, peterx@redhat.com, dgilbert@redhat.com, wei.w.wang@intel.com, jiang.biao2@zte.com.cn To: Eric Blake , pbonzini@redhat.com, mst@redhat.com, mtosatti@redhat.com Return-path: In-Reply-To: <2ad95481-76bd-22ec-4d79-aa39c950db56@redhat.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel2=m.gmane.org@nongnu.org Sender: "Qemu-devel" List-Id: kvm.vger.kernel.org On 07/24/2018 02:36 AM, Eric Blake wrote: > On 07/19/2018 07:15 AM, guangrong.xiao@gmail.com wrote: >> From: Xiao Guangrong >> >> Instead of putting the main thread to sleep state to wait for >> free compression thread, we can directly post it out as normal >> page that reduces the latency and uses CPUs more efficiently >> >> A parameter, compress-wait-thread, is introduced, it can be >> enabled if the user really wants the old behavior >> >> Signed-off-by: Xiao Guangrong >> --- >>   hmp.c                 |  8 ++++++++ >>   migration/migration.c | 21 +++++++++++++++++++++ >>   migration/migration.h |  1 + >>   migration/ram.c       | 45 ++++++++++++++++++++++++++------------------- >>   qapi/migration.json   | 23 ++++++++++++++++++----- >>   5 files changed, 74 insertions(+), 24 deletions(-) >> > >> +++ b/qapi/migration.json >> @@ -462,6 +462,11 @@ >>   # @compress-threads: Set compression thread count to be used in live migration, >>   #          the compression thread count is an integer between 1 and 255. >>   # >> +# @compress-wait-thread: Wait if no thread is free to compress the memory page >> +#          if it's enabled, otherwise, the page will be posted out immediately >> +#          in the main thread without compression. It's off on default. >> +#          (Since: 3.0) > > Is this a bug fix? It's awfully late in the release cycle to be adding new features; is this something that we can live without until 3.1? > It's performance improvement, i think it is not urgent. :)