diff mbox series

[v20210111,08/39] xl: fix description of migrate --debug

Message ID 20210111174224.24714-9-olaf@aepfle.de (mailing list archive)
State New, archived
Headers show
Series leftover from 2020 | expand

Commit Message

Olaf Hering Jan. 11, 2021, 5:41 p.m. UTC
xl migrate --debug used to track every pfn in every batch of pages.
But these times are gone. Adjust the help text to tell what --debug
is supposed to do today.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 docs/man/xl.1.pod.in   | 4 +++-
 tools/xl/xl_cmdtable.c | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Ian Jackson Feb. 8, 2021, 4:25 p.m. UTC | #1
Olaf Hering writes ("[PATCH v20210111 08/39] xl: fix description of migrate --debug"):
> xl migrate --debug used to track every pfn in every batch of pages.
> But these times are gone. Adjust the help text to tell what --debug
> is supposed to do today.
...
> -Display huge (!) amount of debug information during the migration process.
> +Verify transferred domU page data. All memory will be transferred one more
> +time to the destination host while the domU is paused, and compared with
> +the result of the inital transfer while the domU was still running.

Andy, as our expert on migration, can you confirm whether this is
accurate ?

Docs (including usage message) so

Release-Acked-by: Ian Jackson <iwj@xenproject.org>


Thanks,
Ian.
Andrew Cooper Feb. 8, 2021, 4:39 p.m. UTC | #2
On 08/02/2021 16:25, Ian Jackson wrote:
> Olaf Hering writes ("[PATCH v20210111 08/39] xl: fix description of migrate --debug"):
>> xl migrate --debug used to track every pfn in every batch of pages.
>> But these times are gone. Adjust the help text to tell what --debug
>> is supposed to do today.
> ...
>> -Display huge (!) amount of debug information during the migration process.
>> +Verify transferred domU page data. All memory will be transferred one more
>> +time to the destination host while the domU is paused, and compared with
>> +the result of the inital transfer while the domU was still running.
> Andy, as our expert on migration, can you confirm whether this is
> accurate ?
>
> Docs (including usage message) so
>
> Release-Acked-by: Ian Jackson <iwj@xenproject.org>

Yeah - I totally changed what --debug did in migration v2, and this is
stale.  The legacy behaviour was unhelpful on any non-trivial guest.

It is possibly worth noting that you typically do see changed data when
using --debug, because of how the front/back pairs work.  This was a bit
of a curveball during development.

~Andrew
Olaf Hering Feb. 9, 2021, 12:42 p.m. UTC | #3
Am Mon, 8 Feb 2021 16:39:01 +0000
schrieb Andrew Cooper <andrew.cooper3@citrix.com>:

> It is possibly worth noting that you typically do see changed data when
> using --debug, because of how the front/back pairs work.  This was a bit
> of a curveball during development.

I just noticed "migrate --debug" is a noop, "verify" works just for remus or colo, per send_domain_memory_live():
- libxl_domain_remus_start sets checkpointed_stream to COLO/REMUS
- libxl_domain_suspend sets checkpointed_stream to NONE.
- external callers can not influence this internal state.
- main_migrate_receive sets it based on the command line option.


In case we want a "verify" functionality also for migration, the "stream_type" check could be removed to make it work everywhere.
The domU is suspended, it should not make much difference how often its memory is passed around in this suspended state.
But this would be a separate thing to explore.

Having a "LIBXL_SUSPEND_DEBUG/XCFLAGS_DEBUG" might be useful, but in its current state the flags should have "STREAM_VERIFY" in their name.

So instead of changing the help string I suggest to remove "--debug" altogether from the xl UI.


Olaf
diff mbox series

Patch

diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in
index 494a84ee13..e6e4e8e83a 100644
--- a/docs/man/xl.1.pod.in
+++ b/docs/man/xl.1.pod.in
@@ -481,7 +481,9 @@  Include timestamps in output.
 
 =item B<--debug>
 
-Display huge (!) amount of debug information during the migration process.
+Verify transferred domU page data. All memory will be transferred one more
+time to the destination host while the domU is paused, and compared with
+the result of the inital transfer while the domU was still running.
 
 =item B<-p>
 
diff --git a/tools/xl/xl_cmdtable.c b/tools/xl/xl_cmdtable.c
index da0473ddfb..a0567169bf 100644
--- a/tools/xl/xl_cmdtable.c
+++ b/tools/xl/xl_cmdtable.c
@@ -168,7 +168,7 @@  struct cmd_spec cmd_table[] = {
       "-e              Do not wait in the background (on <host>) for the death\n"
       "                of the domain.\n"
       "-T              Show timestamps during the migration process.\n"
-      "--debug         Print huge (!) amount of debug during the migration process.\n"
+      "--debug         Verify transferred domU page data.\n"
       "-p              Do not unpause domain after migrating it.\n"
       "-D              Preserve the domain id"
     },