[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 11/18] migration: introduce capability localhost
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 11/18] migration: introduce capability localhost |
Date: |
Fri, 23 Aug 2013 09:40:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
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.
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
- Re: [Qemu-devel] [PATCH 07/18] arch_init: export RAM_SAVE_xxx flags, (continued)
[Qemu-devel] [PATCH 09/18] exec: export qemu_get_ram_block(), Lei Li, 2013/08/21
[Qemu-devel] [PATCH 10/18] migration-local: implementation of outgoing part, Lei Li, 2013/08/21
[Qemu-devel] [PATCH 11/18] migration: introduce capability localhost, Lei Li, 2013/08/21
[Qemu-devel] [PATCH 12/18] arch_init: factor out ram_save_blocks(), Lei Li, 2013/08/21
[Qemu-devel] [PATCH 14/18] arch_init: skip migration_bitmap_sync for local migration, Lei Li, 2013/08/21
[Qemu-devel] [PATCH 16/18] migration-local: implementation of incoming part, Lei Li, 2013/08/21
[Qemu-devel] [PATCH 15/18] migration: adjust migration_thread for local migration, Lei Li, 2013/08/21
[Qemu-devel] [PATCH 13/18] arch_init: adjust ram_save_setup() for migrate_is_localhost, Lei Li, 2013/08/21