[{"id":1769288,"web_url":"http://patchwork.ozlabs.org/comment/1769288/","msgid":"<20170915160927.GT2170@work-vm>","list_archive_url":null,"date":"2017-09-15T16:09:28","subject":"Re: [Qemu-devel] [RFC 15/15] qmp: let migrate-incoming allow\n\tout-of-band","submitter":{"id":48102,"url":"http://patchwork.ozlabs.org/api/people/48102/","name":"Dr. David Alan Gilbert","email":"dgilbert@redhat.com"},"content":"* Peter Xu (peterx@redhat.com) wrote:\n> So it can get rid of being run on main thread.\n> \n> Signed-off-by: Peter Xu <peterx@redhat.com>\n> ---\n>  qapi/migration.json | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n> \n> diff --git a/qapi/migration.json b/qapi/migration.json\n> index ee2b3b8..dedc4f8 100644\n> --- a/qapi/migration.json\n> +++ b/qapi/migration.json\n> @@ -986,7 +986,8 @@\n>  # <- { \"return\": {} }\n>  #\n>  ##\n> -{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } }\n> +{ 'command': 'migrate-incoming', 'data': {'uri': 'str' },\n> +  'allow-oob': true }\n\nAre you completely convinced migrate-incoming is non-blocking?\nWhat about during the tls handshake if tls is enabled?\n(We only set non-blocking on the fd later)\n\nI don't understand in this structure on which thread\nprocess_incoming_migration_co gets run.\n\nDave\n\n>  ##\n>  # @xen-save-devices-state:\n> -- \n> 2.7.4\n> \n--\nDr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=dgilbert@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xv0jZ1Zt7z9s03\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 16 Sep 2017 02:10:09 +1000 (AEST)","from localhost ([::1]:54123 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dstBu-0000lA-VX\n\tfor incoming@patchwork.ozlabs.org; Fri, 15 Sep 2017 12:10:06 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:36690)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgilbert@redhat.com>) id 1dstBX-0000kp-QN\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 12:09:44 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgilbert@redhat.com>) id 1dstBT-0007Fv-O0\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 12:09:43 -0400","from mx1.redhat.com ([209.132.183.28]:57838)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgilbert@redhat.com>) id 1dstBT-0007FU-Gd\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 12:09:39 -0400","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 5C14D804E3;\n\tFri, 15 Sep 2017 16:09:38 +0000 (UTC)","from work-vm (ovpn-117-180.ams2.redhat.com [10.36.117.180])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 1AD18704A0;\n\tFri, 15 Sep 2017 16:09:30 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 5C14D804E3","Date":"Fri, 15 Sep 2017 17:09:28 +0100","From":"\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>","To":"Peter Xu <peterx@redhat.com>","Message-ID":"<20170915160927.GT2170@work-vm>","References":"<1505375436-28439-1-git-send-email-peterx@redhat.com>\n\t<1505375436-28439-16-git-send-email-peterx@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1505375436-28439-16-git-send-email-peterx@redhat.com>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.11","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.27]);\n\tFri, 15 Sep 2017 16:09:38 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [RFC 15/15] qmp: let migrate-incoming allow\n\tout-of-band","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Laurent Vivier <lvivier@redhat.com>, Fam Zheng <famz@redhat.com>,\n\tmdroth@linux.vnet.ibm.com, Juan Quintela <quintela@redhat.com>,\n\tMarkus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org, Stefan\n\tHajnoczi <shajnocz@redhat.com>, =?iso-8859-1?q?Marc-Andr=E9?=\n\tLureau <marcandre.lureau@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1769943,"web_url":"http://patchwork.ozlabs.org/comment/1769943/","msgid":"<20170918080014.GC3617@pxdev.xzpeter.org>","list_archive_url":null,"date":"2017-09-18T08:00:14","subject":"Re: [Qemu-devel] [RFC 15/15] qmp: let migrate-incoming allow\n\tout-of-band","submitter":{"id":67717,"url":"http://patchwork.ozlabs.org/api/people/67717/","name":"Peter Xu","email":"peterx@redhat.com"},"content":"On Fri, Sep 15, 2017 at 05:09:28PM +0100, Dr. David Alan Gilbert wrote:\n> * Peter Xu (peterx@redhat.com) wrote:\n> > So it can get rid of being run on main thread.\n> > \n> > Signed-off-by: Peter Xu <peterx@redhat.com>\n> > ---\n> >  qapi/migration.json | 3 ++-\n> >  1 file changed, 2 insertions(+), 1 deletion(-)\n> > \n> > diff --git a/qapi/migration.json b/qapi/migration.json\n> > index ee2b3b8..dedc4f8 100644\n> > --- a/qapi/migration.json\n> > +++ b/qapi/migration.json\n> > @@ -986,7 +986,8 @@\n> >  # <- { \"return\": {} }\n> >  #\n> >  ##\n> > -{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } }\n> > +{ 'command': 'migrate-incoming', 'data': {'uri': 'str' },\n> > +  'allow-oob': true }\n> \n> Are you completely convinced migrate-incoming is non-blocking?\n> What about during the tls handshake if tls is enabled?\n> (We only set non-blocking on the fd later)\n\nIIUC after socket_start_incoming_migration() we are done in\nqmp_migrate_incoming(), then all the rest of the socket work will all\nbe done in main thread.\n\nNote: g_source_attach() along the way in the whole\nqmp_migrate_incoming() should be using NULL as the second parameter,\nwhich means they'll attach the objects all to the default gcontext,\nwhich targets to the main thread.\n\n> \n> I don't understand in this structure on which thread\n> process_incoming_migration_co gets run.\n\nIIUC it should be the main thread as well.\n\nThanks,","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=peterx@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xwdjs1561z9s7G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 18 Sep 2017 18:01:01 +1000 (AEST)","from localhost ([::1]:35145 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dtqzA-0007MD-MQ\n\tfor incoming@patchwork.ozlabs.org; Mon, 18 Sep 2017 04:00:56 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:33742)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <peterx@redhat.com>) id 1dtqyk-0007Lm-0h\n\tfor qemu-devel@nongnu.org; Mon, 18 Sep 2017 04:00:34 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <peterx@redhat.com>) id 1dtqyg-0007IX-Vb\n\tfor qemu-devel@nongnu.org; Mon, 18 Sep 2017 04:00:30 -0400","from mx1.redhat.com ([209.132.183.28]:41476)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <peterx@redhat.com>) id 1dtqyg-0007IM-Pv\n\tfor qemu-devel@nongnu.org; Mon, 18 Sep 2017 04:00:26 -0400","from smtp.corp.redhat.com\n\t(int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id A54E37E420;\n\tMon, 18 Sep 2017 08:00:25 +0000 (UTC)","from pxdev.xzpeter.org (dhcp-15-224.nay.redhat.com [10.66.15.224])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 8A1A75C880;\n\tMon, 18 Sep 2017 08:00:18 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com A54E37E420","Date":"Mon, 18 Sep 2017 16:00:14 +0800","From":"Peter Xu <peterx@redhat.com>","To":"\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>","Message-ID":"<20170918080014.GC3617@pxdev.xzpeter.org>","References":"<1505375436-28439-1-git-send-email-peterx@redhat.com>\n\t<1505375436-28439-16-git-send-email-peterx@redhat.com>\n\t<20170915160927.GT2170@work-vm>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20170915160927.GT2170@work-vm>","User-Agent":"Mutt/1.5.24 (2015-08-30)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.16","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.27]);\n\tMon, 18 Sep 2017 08:00:25 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [RFC 15/15] qmp: let migrate-incoming allow\n\tout-of-band","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Laurent Vivier <lvivier@redhat.com>, Fam Zheng <famz@redhat.com>,\n\tmdroth@linux.vnet.ibm.com, Juan Quintela <quintela@redhat.com>,\n\tMarkus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org, Stefan\n\tHajnoczi <shajnocz@redhat.com>, =?utf-8?q?Marc-Andr=C3=A9?=\n\tLureau <marcandre.lureau@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]