qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Het Gala <het.gala@nutanix.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Juan Quintela" <quintela@redhat.com>
Cc: qemu-devel@nongnu.org, prerna.saxena@nutanix.com,
	dgilbert@redhat.com, pbonzini@redhat.com, armbru@redhat.com,
	eblake@redhat.com,
	Aravind Retnakaran <aravind.retnakaran@nutanix.com>,
	Manish Mishra <manish.mishra@nutanix.com>
Subject: Re: [PATCH] multifd: Updated QAPI format for 'migrate' qemu monitor command
Date: Wed, 23 Nov 2022 02:14:54 +0530	[thread overview]
Message-ID: <047df7db-1601-31ae-c8b3-702e8300d117@nutanix.com> (raw)
In-Reply-To: <Y3yVHpH2080Dm9eM@redhat.com>


On 22/11/22 2:53 pm, Daniel P. Berrangé wrote:
> On Mon, Nov 21, 2022 at 01:40:27PM +0100, Juan Quintela wrote:
>> Het Gala <het.gala@nutanix.com> wrote:
>>> To prevent double data encoding of uris, instead of passing transport
>>> mechanisms, host address and port all together in form of a single string
>>> and writing different parsing functions, we intend the user to explicitly
>>> mention most of the parameters through the medium of qmp command itself.
>>> +{ 'struct': 'MigrateChannel',
>>> +  'data' : {
>>> +    'channeltype' : 'MigrateChannelType',
>>> +    '*src-addr' : 'MigrateAddress',
>>> +    'dest-addr' : 'MigrateAddress',
>> Why do we want *both* addresses?
> This is part of their goal to have source based routing, so that
> traffic exits the src host via a particular NIC.
>
> I think this patch would be better if we split it into two parts.
>
> First introduce "MigrateChannel" struct with *only* the 'dest-addr'
> field, and only allow one element in the list, making 'uri' optional.
>
> Basically the first patch would *only* be about switching the
> 'migrate' command from using a plain string to a MigrateAddress
> structure.
>
> A second patch would then extend it to allow multiple MigrateChannel
> elements, to support different destinations for each channel.
>
> A third patch would then  extend it to add src-addr to attain the
> source based routing.
>
> A fourth patch can then deprecate the existing 'uri' field.
 > Thanks Daniel. This is a nice idea. I will break this patch into 4 
different patches, so it would be clear to see how the QAPI design is 
evolving.
>>> +    '*multifd-count' : 'int' } }
>> And if we are passing a list, why do we want to pass the real number?
> Yeah, technically I think this field is redundant, as you can just
> add many entires to the 'channels' list, using the same addresses.
> All this field does is allow a more compact JSON arg list. I'm
> not sure this is neccessary, unless we're expecting huge numbers
> of 'channels', and even then this isn't likely to be a performance
> issue.
 > I have tried to explain this to Juan. The main purpose is, if we want 
to add 3 channels to one pair of interface and 4 pair of channels to 
another pair of interface, instead of writing the same interface 3 or 4 
times, this field saves that redundancy, and I personally feel, it gives 
one clear representation of multifd capability.
>>> +# -> { "execute": "migrate",
>>> +#      "arguments": {
>>> +#          "channels": [ { 'channeltype': 'control',
>>> +#                          'dest-addr': {'transport': 'socket',
>>> +#                                        'type': 'inet',
>>> +#                                        'host': '10.12.34.9', 'port': '1050'}},
>>> +#                        { 'channeltype': 'data',
>>> +#                          'src-addr': {'transport': 'socket',
>>> +#                                        'type': 'inet',
>>> +#                                        'host': '10.12.34.9',
>>> +#                                        'port': '4000', 'ipv4': 'true'},
>>> +#                          'dest-addr': { 'transport': 'socket',
>>> +#                                          'type': 'inet',
>>> +#                                          'host': '10.12.34.92',
>>> +#                                          'port': '1234', 'ipv4': 'true'},
>>> +#                          'multifd-count': 5 },
>>> +#                        { 'channeltype': 'data',
>>> +#                          'src-addr': {'transport': 'socket',
>>> +#                                        'type': 'inet',
>>> +#                                        'host': '10.2.3.4', 'port': '1000'},
>>> +#                          'dest-addr': {'transport': 'socket',
>>> +#                                         'type': 'inet',
>>> +#                                         'host': '0.0.0.4', 'port': '3000'},
>>> +#                          'multifd-count': 3 } ] } }
>>> +# <- { "return": {} }
>>> +#
>>>   ##
>>>   { 'command': 'migrate',
>>> -  'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
>>> -           '*detach': 'bool', '*resume': 'bool' } }
>>> +  'data': {'*uri': 'str', '*channels': ['MigrateChannel'], '*blk': 'bool',
>>>
>> - I would not care at all about the "exec" protocol, just leave that
>>    alone in the deprecated command.  Right now:
>>    * we can't move it to multifd without a lot of PAIN
>>    * there are patches on the list suggesting that what we really want is
>>      to create a file that is the size of RAM and just write all the RAM
>>      at the right place.
>>    * that would make the way to create snapshots (I don't know if anyones
>>      still wants them, much easier).
>>    * I think that the only real use of exec migration was to create
>>      snapshots, for real migration, using a socket is much, much saner.
>>    * I.e. what I mean here is that for exec migration, we need to think
>>      if we want to continue supporting it for normal migration, or only
>>      as a way to create snapshots.
>
> With regards,
> Daniel

Thanks and regards,

Het Gala



  parent reply	other threads:[~2022-11-22 20:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 11:04 [PATCH] multifd: Updated QAPI format for 'migrate' qemu monitor command Het Gala
2022-11-21 12:40 ` Juan Quintela
2022-11-22  9:23   ` Daniel P. Berrangé
2022-11-22 15:57     ` manish.mishra
2022-11-22 17:03       ` Daniel P. Berrangé
2022-11-22 20:44     ` Het Gala [this message]
2022-11-22 20:05   ` Het Gala
2022-11-23  8:07     ` Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=047df7db-1601-31ae-c8b3-702e8300d117@nutanix.com \
    --to=het.gala@nutanix.com \
    --cc=aravind.retnakaran@nutanix.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=manish.mishra@nutanix.com \
    --cc=pbonzini@redhat.com \
    --cc=prerna.saxena@nutanix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).