From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BFE25C433EF for ; Wed, 20 Apr 2022 11:04:43 +0000 (UTC) Received: from localhost ([::1]:55998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nh88Y-0001Yx-Qt for qemu-devel@archiver.kernel.org; Wed, 20 Apr 2022 07:04:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7vr-0004PI-Lt for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:51:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45141) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7vp-0001A6-Pc for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:51:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650451893; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=17TwLDtWz3iXPUY4znvYnGzLQcMVXLOHgq+gA7VaTbk=; b=Y9Ts9HnXheUxjEfxUEQ/hnViYruoe87kzOOB3XM6pKmx+2iTYzLPoRFcObEfzBF59dv2Pf ur8wO9aQmaJFP6v1VXL1B3kQrwp4M6Uc41XxxtE6eXTeioKKxSYJ6/ldHAkJ+udvluksZv 8Vu5OBwKKIFMCHSJz78xZ2ioV4D8880= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-590-pDSOLvpPOaSw-ok9NBbIbQ-1; Wed, 20 Apr 2022 06:51:31 -0400 X-MC-Unique: pDSOLvpPOaSw-ok9NBbIbQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 918DD185A7B2 for ; Wed, 20 Apr 2022 10:51:31 +0000 (UTC) Received: from redhat.com (unknown [10.33.36.162]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B40C8141511F; Wed, 20 Apr 2022 10:51:30 +0000 (UTC) Date: Wed, 20 Apr 2022 11:51:28 +0100 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= To: Peter Xu Subject: Re: [PATCH v4 08/19] migration: Add postcopy-preempt capability Message-ID: References: <20220331150857.74406-1-peterx@redhat.com> <20220331150857.74406-9-peterx@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220331150857.74406-9-peterx@redhat.com> User-Agent: Mutt/2.1.5 (2021-12-30) X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Cc: Juan Quintela , qemu-devel@nongnu.org, Leonardo Bras Soares Passos , "Dr . David Alan Gilbert" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Thu, Mar 31, 2022 at 11:08:46AM -0400, Peter Xu wrote: > Firstly, postcopy already preempts precopy due to the fact that we do > unqueue_page() first before looking into dirty bits. > > However that's not enough, e.g., when there're host huge page enabled, when > sending a precopy huge page, a postcopy request needs to wait until the whole > huge page that is sending to finish. That could introduce quite some delay, > the bigger the huge page is the larger delay it'll bring. > > This patch adds a new capability to allow postcopy requests to preempt existing > precopy page during sending a huge page, so that postcopy requests can be > serviced even faster. > > Meanwhile to send it even faster, bypass the precopy stream by providing a > standalone postcopy socket for sending requested pages. > > Since the new behavior will not be compatible with the old behavior, this will > not be the default, it's enabled only when the new capability is set on both > src/dst QEMUs. > > This patch only adds the capability itself, the logic will be added in follow > up patches. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Peter Xu > --- > migration/migration.c | 23 +++++++++++++++++++++++ > migration/migration.h | 1 + > qapi/migration.json | 8 +++++++- > 3 files changed, 31 insertions(+), 1 deletion(-) > diff --git a/qapi/migration.json b/qapi/migration.json > index 18e2610e88..3523f23386 100644 > --- a/qapi/migration.json > +++ b/qapi/migration.json > @@ -463,6 +463,12 @@ > # procedure starts. The VM RAM is saved with running VM. > # (since 6.0) > # > +# @postcopy-preempt: If enabled, the migration process will allow postcopy > +# requests to preempt precopy stream, so postcopy requests > +# will be handled faster. This is a performance feature and > +# should not affect the correctness of postcopy migration. > +# (since 7.0) Now 7.1 Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|