qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 35a6ed: migration: Introduce capability 'x-co


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 35a6ed: migration: Introduce capability 'x-colo' to migrat...
Date: Mon, 31 Oct 2016 07:00:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 35a6ed4f716c1027c04d12a3c499b2e9d6b62c24
      
https://github.com/qemu/qemu/commit/35a6ed4f716c1027c04d12a3c499b2e9d6b62c24
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M docs/qmp-commands.txt
    A include/migration/colo.h
    M include/migration/migration.h
    M migration/Makefile.objs
    A migration/colo.c
    M migration/migration.c
    M qapi-schema.json
    M stubs/Makefile.objs
    A stubs/migration-colo.c

  Log Message:
  -----------
  migration: Introduce capability 'x-colo' to migration

We add helper function colo_supported() to indicate whether
colo is supported or not, with which we use to control whether or not
showing 'x-colo' string to users, they can use qmp command
'query-migrate-capabilities' or hmp command 'info migrate_capabilities'
to learn if colo is supported.

The default value for COLO (COarse-Grain LOck Stepping) is disabled.

Cc: Juan Quintela <address@hidden>
Cc: Amit Shah <address@hidden>
Cc: Eric Blake <address@hidden>
Cc: Markus Armbruster <address@hidden>
Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 5821ebf93b1da9f74dc04c20e2923aadfaf803df
      
https://github.com/qemu/qemu/commit/5821ebf93b1da9f74dc04c20e2923aadfaf803df
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M include/migration/colo.h
    M migration/Makefile.objs
    A migration/colo-comm.c
    M vl.c

  Log Message:
  -----------
  COLO: migrate COLO related info to secondary node

We can determine whether or not VM in destination should go into COLO mode
by referring to the info that was migrated.

We skip this section if COLO is not enabled (i.e.
migrate_set_capability colo off), so that, It doesn't break compatibility
with migration no matter whether users configure the --enable-colo/disable-colo
on the source/destination side or not;

Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 0b827d5e7291193887d22d058bc20c12b423047c
      
https://github.com/qemu/qemu/commit/0b827d5e7291193887d22d058bc20c12b423047c
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M include/migration/colo.h
    M migration/colo.c
    M migration/migration.c
    M migration/trace-events
    M qapi-schema.json
    M stubs/migration-colo.c

  Log Message:
  -----------
  migration: Enter into COLO mode after migration if COLO is enabled

Add a new migration state: MIGRATION_STATUS_COLO. Migration source side
enters this state after the first live migration successfully finished
if COLO is enabled by command 'migrate_set_capability x-colo on'.

We reuse migration thread, so the process of checkpointing will be handled
in migration thread.

Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 25d0c16f625feb3b6b9bf8079388cdd314e63916
      
https://github.com/qemu/qemu/commit/25d0c16f625feb3b6b9bf8079388cdd314e63916
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M include/migration/colo.h
    M include/migration/migration.h
    M migration/colo-comm.c
    M migration/colo.c
    M migration/migration.c
    M stubs/migration-colo.c

  Log Message:
  -----------
  migration: Switch to COLO process after finishing loadvm

Switch from normal migration loadvm process into COLO checkpoint process if
COLO mode is enabled.

We add three new members to struct MigrationIncomingState,
'have_colo_incoming_thread' and 'colo_incoming_thread' record the COLO
related thread for secondary VM, 'migration_incoming_co' records the
original migration incoming coroutine.

Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 56ba83d2a871a28ec18b8bb0fcec74ed02bbe06c
      
https://github.com/qemu/qemu/commit/56ba83d2a871a28ec18b8bb0fcec74ed02bbe06c
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M migration/colo.c

  Log Message:
  -----------
  COLO: Establish a new communicating path for COLO

This new communication path will be used for returning messages
from Secondary side to Primary side.

Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 4f97558e100f66f953ba7576b0ced146e6846997
      
https://github.com/qemu/qemu/commit/4f97558e100f66f953ba7576b0ced146e6846997
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M migration/colo.c
    M migration/trace-events
    M qapi-schema.json

  Log Message:
  -----------
  COLO: Introduce checkpointing protocol

We need communications protocol of user-defined to control
the checkpointing process.

The new checkpointing request is started by Primary VM,
and the interactive process like below:

Checkpoint synchronizing points:
              Primary               Secondary
                                      initial work
'checkpoint-ready'    <-------------------- @

'checkpoint-request'  @ -------------------->
                                      Suspend (Only in hybrid mode)
'checkpoint-reply'    <-------------------- @
                Suspend&Save state
'vmstate-send'        @ -------------------->
                Send state            Receive state
'vmstate-received'    <-------------------- @
                Release packets       Load state
'vmstate-load'        <-------------------- @
                Resume                Resume (Only in hybrid mode)
                 Start Comparing (Only in hybrid mode)
NOTE:
 1) '@' who sends the message
 2) Every sync-point is synchronized by two sides with only
    one handshake(single direction) for low-latency.
    If more strict synchronization is required, a opposite direction
    sync-point should be added.
 3) Since sync-points are single direction, the remote side may
    go forward a lot when this side just receives the sync-point.
 4) For now, we only support 'periodic' checkpoint, for which
   the Secondary VM is not running, later we will support 'hybrid' mode.

Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Cc: Eric Blake <address@hidden>
Cc: Markus Armbruster <address@hidden>
Cc: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 21142ba7ffbf62bd8914af4595184415c50f8f39
      
https://github.com/qemu/qemu/commit/21142ba7ffbf62bd8914af4595184415c50f8f39
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M qapi-schema.json
    M vl.c

  Log Message:
  -----------
  COLO: Add a new RunState RUN_STATE_COLO

Guest will enter this state when paused to save/restore VM state
under COLO checkpoint.

Cc: Eric Blake <address@hidden>
Cc: Markus Armbruster <address@hidden>
Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: a91246c95f913dc6fd391eee32f6c9796de70183
      
https://github.com/qemu/qemu/commit/a91246c95f913dc6fd391eee32f6c9796de70183
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M migration/colo.c
    M migration/ram.c

  Log Message:
  -----------
  COLO: Send PVM state to secondary side when do checkpoint

VM checkpointing is to synchronize the state of PVM to SVM, just
like migration does, we re-use save helpers to achieve migrating
PVM's state to Secondary side.

COLO need to cache the data of VM's state in the secondary side before
synchronize it to SVM. COLO need the size of the data to determine
how much data should be read in the secondary side.
So here, we can get the size of the data by saving it into I/O channel
before send it to the secondary side.

Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Cc: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 4291d372e22425e6e8b45466b46a051c82ac4ce1
      
https://github.com/qemu/qemu/commit/4291d372e22425e6e8b45466b46a051c82ac4ce1
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M migration/colo.c

  Log Message:
  -----------
  COLO: Load VMState into QIOChannelBuffer before restore it

We should not destroy the state of SVM (Secondary VM) until we receive
the complete data of PVM's state, in case the primary fails in the process
of sending the state, so we cache the VM's state in secondary side before
load it into SVM.

Besides, we should call qemu_system_reset() before load VM state,
which can ensure the data is intact.

Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Cc: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 68b5359187c3d4164cc546dcdd5ba3e37f0ffb55
      
https://github.com/qemu/qemu/commit/68b5359187c3d4164cc546dcdd5ba3e37f0ffb55
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M docs/qmp-commands.txt
    M hmp.c
    M migration/migration.c
    M qapi-schema.json

  Log Message:
  -----------
  COLO: Add checkpoint-delay parameter for migrate-set-parameters

Add checkpoint-delay parameter for migrate-set-parameters, so that
we can control the checkpoint frequency when COLO is in periodic mode.

Cc: Luiz Capitulino <address@hidden>
Cc: Eric Blake <address@hidden>
Cc: Markus Armbruster <address@hidden>
Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 18cc23d72cabf708d5a7e6b5948ec0420a1a2ebd
      
https://github.com/qemu/qemu/commit/18cc23d72cabf708d5a7e6b5948ec0420a1a2ebd
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M migration/colo.c

  Log Message:
  -----------
  COLO: Synchronize PVM's state to SVM periodically

Do checkpoint periodically, the default interval is 200ms.

Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: d89e666e0666a0023e4aa6b6b4c4d25d049c5215
      
https://github.com/qemu/qemu/commit/d89e666e0666a0023e4aa6b6b4c4d25d049c5215
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M docs/qmp-commands.txt
    M hmp-commands.hx
    M hmp.c
    M hmp.h
    M include/migration/colo.h
    A include/migration/failover.h
    M migration/Makefile.objs
    M migration/colo-comm.c
    A migration/colo-failover.c
    M migration/colo.c
    M qapi-schema.json
    M stubs/migration-colo.c

  Log Message:
  -----------
  COLO: Add 'x-colo-lost-heartbeat' command to trigger failover

We leave users to choose whatever heartbeat solution they want,
if the heartbeat is lost, or other errors they detect, they can use
experimental command 'x_colo_lost_heartbeat' to tell COLO to do failover,
COLO will do operations accordingly.

For example, if the command is sent to the Primary side,
the Primary side will exit COLO mode, does cleanup work,
and then, PVM will take over the service work. If sent to the Secondary side,
the Secondary side will run failover work, then takes over PVM's service work.

Cc: Luiz Capitulino <address@hidden>
Cc: Eric Blake <address@hidden>
Cc: Markus Armbruster <address@hidden>
Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: aef060850bd0e35aa7128e0ae3cef9d62c328314
      
https://github.com/qemu/qemu/commit/aef060850bd0e35aa7128e0ae3cef9d62c328314
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M include/migration/failover.h
    M migration/colo-failover.c
    M migration/colo.c
    M migration/trace-events
    M qapi-schema.json

  Log Message:
  -----------
  COLO: Introduce state to record failover process

When handling failover, COLO processes differently according to
the different stage of failover process, here we introduce a global
atomic variable to record the status of failover.

We add four failover status to indicate the different stage of failover process.
You should use the helpers to get and set the value.

Signed-off-by: zhanghailiang <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: b3f7f0c5e6449be7275f1762bccbfa2177395a3b
      
https://github.com/qemu/qemu/commit/b3f7f0c5e6449be7275f1762bccbfa2177395a3b
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M include/migration/colo.h
    M include/migration/failover.h
    M migration/colo-failover.c
    M migration/colo.c

  Log Message:
  -----------
  COLO: Implement the process of failover for primary VM

For primary side, if COLO gets failover request from users.
To be exact, gets 'x_colo_lost_heartbeat' command.
COLO thread will exit the loop while the failover BH does the
cleanup work and resumes VM.

Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 9d2db3760be9e32414e22889e3e2bffdf4898f32
      
https://github.com/qemu/qemu/commit/9d2db3760be9e32414e22889e3e2bffdf4898f32
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M migration/colo.c

  Log Message:
  -----------
  COLO: Implement failover work for secondary VM

If users require SVM to takeover work, COLO incoming thread should
exit from loop while failover BH helps backing to migration incoming
coroutine.

Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: e59887d8c9ebc132d14567f6552bb017e5bc724d
      
https://github.com/qemu/qemu/commit/e59887d8c9ebc132d14567f6552bb017e5bc724d
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    A docs/COLO-FT.txt

  Log Message:
  -----------
  docs: Add documentation for COLO feature

Introduce the design of COLO, and how to test it.

Signed-off-by: zhanghailiang <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 180fb750004ffd99e20300d9d2eaa4e5f5adae72
      
https://github.com/qemu/qemu/commit/180fb750004ffd99e20300d9d2eaa4e5f5adae72
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M configure
    M migration/colo.c

  Log Message:
  -----------
  configure: Support enable/disable COLO feature

configure --enable-colo/--disable-colo to switch COLO
support on/off.

COLO feature doesn't depend on any other external libraries,
So here it is reasonable to enable COLO by default, to
avoid re-compile QEMU if users want to use this capability.

Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: a4cc318e15955b4b9c7231c37128d4e7466d4307
      
https://github.com/qemu/qemu/commit/a4cc318e15955b4b9c7231c37128d4e7466d4307
  Author: zhanghailiang <address@hidden>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Add maintainer for COLO framework related files

Add myself as co-maintainer of COLO framework, so that
I can get CC'ed on future patches and bugs for this feature.

Signed-off-by: zhanghailiang <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: eab9e9629c8f3c0ce87f7bcad82176f55029a640
      
https://github.com/qemu/qemu/commit/eab9e9629c8f3c0ce87f7bcad82176f55029a640
  Author: Peter Maydell <address@hidden>
  Date:   2016-10-31 (Mon, 31 Oct 2016)

  Changed paths:
    M MAINTAINERS
    M configure
    A docs/COLO-FT.txt
    M docs/qmp-commands.txt
    M hmp-commands.hx
    M hmp.c
    M hmp.h
    A include/migration/colo.h
    A include/migration/failover.h
    M include/migration/migration.h
    M migration/Makefile.objs
    A migration/colo-comm.c
    A migration/colo-failover.c
    A migration/colo.c
    M migration/migration.c
    M migration/ram.c
    M migration/trace-events
    M qapi-schema.json
    M stubs/Makefile.objs
    A stubs/migration-colo.c
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/amit-migration/tags/migration-for-2.8' 
into staging

Migration bits from the COLO project

# gpg: Signature made Sun 30 Oct 2016 10:39:55 GMT
# gpg:                using RSA key 0xEB0B4DFC657EF670
# gpg: Good signature from "Amit Shah <address@hidden>"
# gpg:                 aka "Amit Shah <address@hidden>"
# gpg:                 aka "Amit Shah <address@hidden>"
# Primary key fingerprint: 48CA 3722 5FE7 F4A8 B337  2735 1E9A 3B5F 8540 83B6
#      Subkey fingerprint: CC63 D332 AB8F 4617 4529  6534 EB0B 4DFC 657E F670

* remotes/amit-migration/tags/migration-for-2.8:
  MAINTAINERS: Add maintainer for COLO framework related files
  configure: Support enable/disable COLO feature
  docs: Add documentation for COLO feature
  COLO: Implement failover work for secondary VM
  COLO: Implement the process of failover for primary VM
  COLO: Introduce state to record failover process
  COLO: Add 'x-colo-lost-heartbeat' command to trigger failover
  COLO: Synchronize PVM's state to SVM periodically
  COLO: Add checkpoint-delay parameter for migrate-set-parameters
  COLO: Load VMState into QIOChannelBuffer before restore it
  COLO: Send PVM state to secondary side when do checkpoint
  COLO: Add a new RunState RUN_STATE_COLO
  COLO: Introduce checkpointing protocol
  COLO: Establish a new communicating path for COLO
  migration: Switch to COLO process after finishing loadvm
  migration: Enter into COLO mode after migration if COLO is enabled
  COLO: migrate COLO related info to secondary node
  migration: Introduce capability 'x-colo' to migration

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/5ff06787d492...eab9e9629c8f

reply via email to

[Prev in Thread] Current Thread [Next in Thread]