From: Markus Armbruster <armbru@redhat.com>
To: Het Gala <het.gala@nutanix.com>
Cc: qemu-devel@nongnu.org, quintela@redhat.com,
dgilbert@redhat.com, pbonzini@redhat.com, berrange@redhat.com,
eblake@redhat.com, Manish Mishra <manish.mishra@nutanix.com>
Subject: Re: [PATCH 1/4] Modifying ‘migrate’ qmp command to add multi-FD socket on particular source and destination pair
Date: Tue, 19 Jul 2022 11:48:22 +0200 [thread overview]
Message-ID: <87r12hxwk9.fsf@pond.sub.org> (raw)
In-Reply-To: <57b8de99-fcf9-e015-eeb5-cdc14544d721@nutanix.com> (Het Gala's message of "Tue, 19 Jul 2022 13:21:34 +0530")
Het Gala <het.gala@nutanix.com> writes:
> On 19/07/22 12:36 pm, Markus Armbruster wrote:
>> Het Gala <het.gala@nutanix.com> writes:
>>
>>> On 18/07/22 8:03 pm, Markus Armbruster wrote:
>>>> Het Gala <het.gala@nutanix.com> writes:
>>>>
>>>>> On 18/07/22 2:05 pm, Markus Armbruster wrote:
>>>>>> Het Gala <het.gala@nutanix.com> writes:
>>>>>>
>>>>>>> i) Modified the format of the qemu monitor command : 'migrate' by adding a list,
>>>>>>> each element in the list consists of multi-FD connection parameters: source
>>>>>>> and destination uris and of the number of multi-fd channels between each pair.
>>>>>>>
>>>>>>> ii) Information of all multi-FD connection parameters’ list, length of the list
>>>>>>> and total number of multi-fd channels for all the connections together is
>>>>>>> stored in ‘OutgoingArgs’ struct.
>>>>>>>
>>>>>>> Suggested-by: Manish Mishra <manish.mishra@nutanix.com>
>>>>>>> Signed-off-by: Het Gala <het.gala@nutanix.com>
>>>>>>> ---
>> [...]
>>
>>>>>>> diff --git a/migration/socket.c b/migration/socket.c
>>>>>>> index 4fd5e85f50..7ca6af8cca 100644
>>>>>>> --- a/migration/socket.c
>>>>>>> +++ b/migration/socket.c
>>>>>>> @@ -32,6 +32,17 @@ struct SocketOutgoingArgs {
>>>>>>> SocketAddress *saddr;
>>>>>>> } outgoing_args;
>>>>>>>
>>>>>>> +struct SocketArgs {
>>>>>>> + struct SrcDestAddr data;
>>>>>>> + uint8_t multifd_channels;
>>>>>>> +};
>>>>>>> +
>>>>>>> +struct OutgoingMigrateParams {
>>>>>>> + struct SocketArgs *socket_args;
>>>>>>> + size_t length;
>>>>>> Length of what?
>>>>> length of the socket_args[] array. Thanks for pointing it out. I will
>>>>> be more specific for this variable in the v2 patchset series.
>>>>>
>>>>>>> + uint64_t total_multifd_channel;
>>>>>> @total_multifd_channels appears to be the sum of the
>>>>>> socket_args[*].multifd_channels. Correct?
>>>>> Yes Markus, you are correct.
>>>> Sure you need to keep the sum separately?
>>> So earlier, the idea behind this was that, we had this intention to depreciate the migrate_multifd_channels() API from the live migration
>>> process. We made total_multifd_channels() function, where it used to calculate total number of multifd channels every time, for whichever
>>> function called was computation internsive so we replaced it by returning sum of socket_args[*].multifd_channels i.e.
>>> total_multifd_channel in the later patches.
>>>
>>> But now in the v2 patchset onwards, Thanks to inputs from Dr. David and Daniel, we are not depricating migrate_multifd_channels() API but
>>> the value from the API will be cross-referenced with sum of socket_args[*].multifd_channels i.e. total_multifd_channel, and error if
>>> they are not equal.
>> I'm afraid I don't understand. I'm not sure I have to. Let me loop
>> back to my question.
>>
>> If @total_multifd_channel is always the sum of the
>> socket_args[*].multifd_channels, then you can always compute it on the
>> fly.
>>
>> I.e. you can replace @total_multifd_channel by a function that returns
>> the sum.
>>
>> Precomputing it instead is more complex, because then you need to
>> document that the two are the same. Also, bug oppertunity: letting them
>> deviate somehow. I figure that's worthwhile only if computing on the
>> fly is too expensive.
>> Okay, I understand your concern. I am okay with your approach too, but these things are not expected to change out of qmp command context.
>
> So is keeping @total_multifd_channel variable should be fine? or making a function is better?
I recommend making it a function unless we need a variable for
performance.
[...]
next prev parent reply other threads:[~2022-07-19 9:49 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 7:33 [PATCH 0/4] Multiple interface support on top of Multi-FD Het Gala
2022-06-09 7:33 ` [PATCH 1/4] Modifying ‘migrate’ qmp command to add multi-FD socket on particular source and destination pair Het Gala
2022-06-16 17:26 ` Dr. David Alan Gilbert
2022-07-13 8:08 ` Het Gala
2022-07-15 8:07 ` Het Gala
2022-07-13 12:54 ` Claudio Fontana
2022-07-18 8:35 ` Markus Armbruster
2022-07-18 13:33 ` Het Gala
2022-07-18 14:33 ` Markus Armbruster
2022-07-18 15:17 ` Het Gala
2022-07-19 7:06 ` Markus Armbruster
2022-07-19 7:51 ` Het Gala
2022-07-19 9:48 ` Markus Armbruster [this message]
2022-07-19 10:40 ` Het Gala
2022-06-09 7:33 ` [PATCH 2/4] Adding multi-interface support for multi-FD on destination side Het Gala
2022-06-16 18:40 ` Dr. David Alan Gilbert
2022-07-13 14:36 ` Het Gala
2022-06-09 7:33 ` [PATCH 3/4] Establishing connection between any non-default source and destination pair Het Gala
2022-06-16 17:39 ` Daniel P. Berrangé
2022-06-21 16:09 ` manish.mishra
[not found] ` <54ca00c7-a108-11e3-1c8d-8771798aed6a@nutanix.com>
[not found] ` <de0646c1-75d7-5f9d-32db-07c498c45715@nutanix.com>
2022-07-20 6:52 ` Daniel P. Berrangé
2022-06-09 7:33 ` [PATCH 4/4] Adding support for multi-FD connections dynamically Het Gala
2022-06-16 18:47 ` Dr. David Alan Gilbert
2022-06-21 16:12 ` manish.mishra
2022-06-09 15:47 ` [PATCH 0/4] Multiple interface support on top of Multi-FD Daniel P. Berrangé
2022-06-10 12:28 ` manish.mishra
2022-06-15 16:43 ` Daniel P. Berrangé
2022-06-15 19:14 ` Dr. David Alan Gilbert
2022-06-16 8:16 ` Daniel P. Berrangé
2022-06-16 10:14 ` manish.mishra
2022-06-16 17:32 ` Daniel P. Berrangé
2022-06-16 8:27 ` Daniel P. Berrangé
2022-06-16 15:50 ` Dr. David Alan Gilbert
2022-06-21 16:16 ` manish.mishra
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=87r12hxwk9.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=het.gala@nutanix.com \
--cc=manish.mishra@nutanix.com \
--cc=pbonzini@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.