From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCmBL-0002xc-L8 for qemu-devel@nongnu.org; Fri, 23 Aug 2013 03:53:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCmBC-0005Yj-Mz for qemu-devel@nongnu.org; Fri, 23 Aug 2013 03:53:19 -0400 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:53261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCmBC-0005YU-4I for qemu-devel@nongnu.org; Fri, 23 Aug 2013 03:53:10 -0400 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 24 Aug 2013 04:47:24 +1000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [9.190.235.152]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id DB9E62CE8051 for ; Fri, 23 Aug 2013 17:53:04 +1000 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r7N7aoac9109910 for ; Fri, 23 Aug 2013 17:36:56 +1000 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r7N7qwNw007346 for ; Fri, 23 Aug 2013 17:52:59 +1000 Message-ID: <52171491.6000607@linux.vnet.ibm.com> Date: Fri, 23 Aug 2013 15:51:45 +0800 From: Lei Li MIME-Version: 1.0 References: <1377069536-12658-1-git-send-email-lilei@linux.vnet.ibm.com> <1377069536-12658-12-git-send-email-lilei@linux.vnet.ibm.com> <5214DA32.1060403@redhat.com> <52167992.3080806@linux.vnet.ibm.com> <521711D3.80107@redhat.com> In-Reply-To: <521711D3.80107@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 11/18] migration: introduce capability localhost List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: aarcange@redhat.com, aliguori@us.ibm.com, quintela@redhat.com, qemu-devel@nongnu.org, "Michael R. Hines" , lagarcia@br.ibm.com, rcj@linux.vnet.ibm.com On 08/23/2013 03:40 PM, Paolo Bonzini wrote: > Il 22/08/2013 22:50, Michael R. Hines ha scritto: >> On 08/21/2013 11:18 AM, Paolo Bonzini wrote: >>> Il 21/08/2013 09:18, Lei Li ha scritto: >>>> } else if (strstart(uri, "unix:", &p)) { >>>> + if (s->enabled_capabilities[MIGRATION_CAPABILITY_LOCALHOST]) { >>>> + local_start_outgoing_migration(s, p, &local_err); >>>> + } >>>> unix_start_outgoing_migration(s, p, &local_err); >>>> } else if (strstart(uri, "fd:", &p)) { >>>> fd_start_outgoing_migration(s, p, &local_err); >>>> @@ -521,6 +524,15 @@ int migrate_use_xbzrle(void) >>>> return s->enabled_capabilities[MIGRATION_CAPABILITY_XBZRLE]; >>>> } >>>> +bool migrate_is_localhost(void) >>>> +{ >>>> + MigrationState *s; >>>> + >>>> + s = migrate_get_current(); >>>> + >>>> + return s->enabled_capabilities[MIGRATION_CAPABILITY_LOCALHOST]; >>>> +} >>> I think this is a bad name, too. There is nothing more "local" in this >>> migration than in "unix:" migration. >>> >>> Let's call the capability according to what it does, for example >>> unix-page-flipping. >> Why is there a capability at all? Isn't that what the "local" URI is for? > Because in these patches, the local URI is only present in the > destination (which is wrong: the destination should autodetect local > mode using the load-page hook). As you can see above, a "unix" URI will > examine the capability and pick the appropriate migration method. Hi Paolo, I agree with that 'localhost' is a bad capability name. Since we just use unix socket temporarily and will be ending up with vmsplice via pipe, how about just page_flipping? > > However, this is also the wrong place to look at the capability. It is > the save-page hook that should examine the capability. It will then do > nothing if it is disabled, and do page-flipping if the capability is on. > > Paolo > -- Lei