From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Blake Subject: Re: [PATCH v2 1/8] migration: do not wait for free thread Date: Mon, 23 Jul 2018 13:36:38 -0500 Message-ID: <2ad95481-76bd-22ec-4d79-aa39c950db56@redhat.com> References: <20180719121520.30026-1-xiaoguangrong@tencent.com> <20180719121520.30026-2-xiaoguangrong@tencent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: guangrong.xiao@gmail.com, pbonzini@redhat.com, mst@redhat.com, mtosatti@redhat.com Return-path: In-Reply-To: <20180719121520.30026-2-xiaoguangrong@tencent.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/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? -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org