From nobody Mon Apr 29 09:42:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513087054067838.3246140357473; Tue, 12 Dec 2017 05:57:34 -0800 (PST) Received: from localhost ([::1]:58431 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOl3s-00086x-Ix for importer@patchew.org; Tue, 12 Dec 2017 08:57:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOl2Z-0007TE-TL for qemu-devel@nongnu.org; Tue, 12 Dec 2017 08:56:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eOl2V-0008DF-Tg for qemu-devel@nongnu.org; Tue, 12 Dec 2017 08:56:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46708) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eOl2V-0008Cj-JX for qemu-devel@nongnu.org; Tue, 12 Dec 2017 08:56:07 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 710794A6EA for ; Tue, 12 Dec 2017 13:56:06 +0000 (UTC) Received: from dgilbert-t530.redhat.com (ovpn-117-194.ams2.redhat.com [10.36.117.194]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5A1E36266F; Tue, 12 Dec 2017 13:56:01 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, kashyap@redhat.com, quintela@redhat.com Date: Tue, 12 Dec 2017 13:56:00 +0000 Message-Id: <20171212135600.14965-1-dgilbert@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 12 Dec 2017 13:56:06 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] docs: Convert migration.txt to rst X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peterx@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" Mostly just manual conversion with very minor fixes. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu --- docs/devel/{migration.txt =3D> migration.rst} | 326 +++++++++++++++-------= ------ 1 file changed, 176 insertions(+), 150 deletions(-) rename docs/devel/{migration.txt =3D> migration.rst} (74%) diff --git a/docs/devel/migration.txt b/docs/devel/migration.rst similarity index 74% rename from docs/devel/migration.txt rename to docs/devel/migration.rst index 4030703726..7d64298cd7 100644 --- a/docs/devel/migration.txt +++ b/docs/devel/migration.rst @@ -1,4 +1,6 @@ -=3D Migration =3D +=3D=3D=3D=3D=3D=3D=3D=3D=3D +Migration +=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 QEMU has code to load/save the state of the guest that it is running. These are two complementary operations. Saving the state just does @@ -26,7 +28,8 @@ the guest to be stopped. Typically the time that the gue= st is unresponsive during live migration is the low hundred of milliseconds (notice that this depends on a lot of things). =20 -=3D=3D=3D Types of migration =3D=3D=3D +Types of migration +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 Now that we have talked about live migration, there are several ways to do migration: @@ -41,21 +44,25 @@ All these four migration protocols use the same infrast= ructure to save/restore state devices. This infrastructure is shared with the savevm/loadvm functionality. =20 -=3D=3D=3D State Live Migration =3D=3D=3D +State Live Migration +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 This is used for RAM and block devices. It is not yet ported to vmstate. =20 -=3D=3D=3D What is the common infrastructure =3D=3D=3D +Common infrastructure +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 QEMU uses a QEMUFile abstraction to be able to do migration. Any type of migration that wants to use QEMU infrastructure has to create a QEMUFile with: =20 -QEMUFile *qemu_fopen_ops(void *opaque, - QEMUFilePutBufferFunc *put_buffer, - QEMUFileGetBufferFunc *get_buffer, - QEMUFileCloseFunc *close); +.. code:: c + + QEMUFile *qemu_fopen_ops(void *opaque, + QEMUFilePutBufferFunc *put_buffer, + QEMUFileGetBufferFunc *get_buffer, + QEMUFileCloseFunc *close); =20 The functions have the following functionality: =20 @@ -63,19 +70,25 @@ This function writes a chunk of data to a file at the g= iven position. The pos argument can be ignored if the file is only used for streaming. The handler should try to write all of the data it can. =20 -typedef int (QEMUFilePutBufferFunc)(void *opaque, const uint8_t *buf, - int64_t pos, int size); +.. code:: c + + typedef int (QEMUFilePutBufferFunc)(void *opaque, const uint8_t *buf, + int64_t pos, int size); =20 Read a chunk of data from a file at the given position. The pos argument can be ignored if the file is only be used for streaming. The number of bytes actually read should be returned. =20 -typedef int (QEMUFileGetBufferFunc)(void *opaque, uint8_t *buf, - int64_t pos, int size); +.. code:: c + + typedef int (QEMUFileGetBufferFunc)(void *opaque, uint8_t *buf, + int64_t pos, int size); =20 Close a file and return an error code. =20 -typedef int (QEMUFileCloseFunc)(void *opaque); +.. code:: c + + typedef int (QEMUFileCloseFunc)(void *opaque); =20 You can use any internal state that you need using the opaque void * pointer that is passed to all functions. @@ -83,7 +96,8 @@ pointer that is passed to all functions. The important functions for us are put_buffer()/get_buffer() that allow to write/read a buffer into the QEMUFile. =20 -=3D=3D=3D How to save the state of one device =3D=3D=3D +Saving the state of one device +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D =20 The state of a device is saved using intermediate buffers. There are some helper functions to assist this saving. @@ -97,30 +111,34 @@ associated with a series of fields saved. The save_st= ate always saves the state as the newer version. But load_state sometimes is able to load state from an older version. =20 -=3D=3D=3D Legacy way =3D=3D=3D +Legacy way +---------- =20 This way is going to disappear as soon as all current users are ported to = VMSTATE. =20 Each device has to register two functions, one to save the state and another to load the state back. =20 -int register_savevm(DeviceState *dev, - const char *idstr, - int instance_id, - int version_id, - SaveStateHandler *save_state, - LoadStateHandler *load_state, - void *opaque); +.. code:: c + + int register_savevm(DeviceState *dev, + const char *idstr, + int instance_id, + int version_id, + SaveStateHandler *save_state, + LoadStateHandler *load_state, + void *opaque); =20 -typedef void SaveStateHandler(QEMUFile *f, void *opaque); -typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id); + typedef void SaveStateHandler(QEMUFile *f, void *opaque); + typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id); =20 The important functions for the device state format are the save_state and load_state. Notice that load_state receives a version_id parameter to know what state format is receiving. save_state doesn't have a version_id parameter because it always uses the latest version. =20 -=3D=3D=3D VMState =3D=3D=3D +VMState +------- =20 The legacy way of saving/loading state of the device had the problem that we have to maintain two functions in sync. If we did one change @@ -135,23 +153,27 @@ save/load functions. =20 An example (from hw/input/pckbd.c) =20 -static const VMStateDescription vmstate_kbd =3D { - .name =3D "pckbd", - .version_id =3D 3, - .minimum_version_id =3D 3, - .fields =3D (VMStateField[]) { - VMSTATE_UINT8(write_cmd, KBDState), - VMSTATE_UINT8(status, KBDState), - VMSTATE_UINT8(mode, KBDState), - VMSTATE_UINT8(pending, KBDState), - VMSTATE_END_OF_LIST() - } -}; +.. code:: c + + static const VMStateDescription vmstate_kbd =3D { + .name =3D "pckbd", + .version_id =3D 3, + .minimum_version_id =3D 3, + .fields =3D (VMStateField[]) { + VMSTATE_UINT8(write_cmd, KBDState), + VMSTATE_UINT8(status, KBDState), + VMSTATE_UINT8(mode, KBDState), + VMSTATE_UINT8(pending, KBDState), + VMSTATE_END_OF_LIST() + } + }; =20 We are declaring the state with name "pckbd". The version_id is 3, and the fields are 4 uint8_t in a KBDState structure. We registered this with: =20 +.. code:: c + vmstate_register(NULL, 0, &vmstate_kbd, s); =20 Note: talk about how vmstate <-> qdev interact, and what the instance ids = mean. @@ -159,7 +181,8 @@ Note: talk about how vmstate <-> qdev interact, and wha= t the instance ids mean. You can search for VMSTATE_* macros for lots of types used in QEMU in include/hw/hw.h. =20 -=3D=3D=3D More about versions =3D=3D=3D +More about versions +------------------- =20 Version numbers are intended for major incompatible changes to the migration of a device, and using them breaks backwards-migration @@ -183,7 +206,8 @@ function is deprecated and will be removed when no more= users are left. Saving state will always create a section with the 'version_id' value and thus can't be loaded by any older QEMU. =20 -=3D=3D=3D Massaging functions =3D=3D=3D +Massaging functions +------------------- =20 Sometimes, it is not enough to be able to save the state directly from one structure, we need to fill the correct values there. One @@ -194,20 +218,19 @@ load the state for the cpu that we have just loaded f= rom the QEMUFile. =20 The functions to do that are inside a vmstate definition, and are called: =20 -- int (*pre_load)(void *opaque); +- ``int (*pre_load)(void *opaque);`` =20 This function is called before we load the state of one device. =20 -- int (*post_load)(void *opaque, int version_id); +- ``int (*post_load)(void *opaque, int version_id);`` =20 This function is called after we load the state of one device. =20 -- int (*pre_save)(void *opaque); +- ``int (*pre_save)(void *opaque);`` =20 This function is called before we save the state of one device. =20 -Example: You can look at hpet.c, that uses the three function to - massage the state that is transferred. +Example: You can look at hpet.c, that uses the three function to massage t= he state that is transferred. =20 If you use memory API functions that update memory layout outside initialization (i.e., in response to a guest action), this is a strong @@ -221,7 +244,8 @@ Examples of such memory API functions are: - memory_region_set_address() - memory_region_set_alias_offset() =20 -=3D=3D=3D Subsections =3D=3D=3D +Subsections +----------- =20 The use of version_id allows to be able to migrate from older versions to newer versions of a device. But not the other way around. This @@ -251,48 +275,50 @@ value that it uses. =20 Example: =20 -static bool ide_drive_pio_state_needed(void *opaque) -{ - IDEState *s =3D opaque; - - return ((s->status & DRQ_STAT) !=3D 0) - || (s->bus->error_status & BM_STATUS_PIO_RETRY); -} - -const VMStateDescription vmstate_ide_drive_pio_state =3D { - .name =3D "ide_drive/pio_state", - .version_id =3D 1, - .minimum_version_id =3D 1, - .pre_save =3D ide_drive_pio_pre_save, - .post_load =3D ide_drive_pio_post_load, - .needed =3D ide_drive_pio_state_needed, - .fields =3D (VMStateField[]) { - VMSTATE_INT32(req_nb_sectors, IDEState), - VMSTATE_VARRAY_INT32(io_buffer, IDEState, io_buffer_total_len, 1, - vmstate_info_uint8, uint8_t), - VMSTATE_INT32(cur_io_buffer_offset, IDEState), - VMSTATE_INT32(cur_io_buffer_len, IDEState), - VMSTATE_UINT8(end_transfer_fn_idx, IDEState), - VMSTATE_INT32(elementary_transfer_size, IDEState), - VMSTATE_INT32(packet_transfer_size, IDEState), - VMSTATE_END_OF_LIST() - } -}; - -const VMStateDescription vmstate_ide_drive =3D { - .name =3D "ide_drive", - .version_id =3D 3, - .minimum_version_id =3D 0, - .post_load =3D ide_drive_post_load, - .fields =3D (VMStateField[]) { - .... several fields .... - VMSTATE_END_OF_LIST() - }, - .subsections =3D (const VMStateDescription*[]) { - &vmstate_ide_drive_pio_state, - NULL - } -}; +.. code:: c + + static bool ide_drive_pio_state_needed(void *opaque) + { + IDEState *s =3D opaque; + + return ((s->status & DRQ_STAT) !=3D 0) + || (s->bus->error_status & BM_STATUS_PIO_RETRY); + } + + const VMStateDescription vmstate_ide_drive_pio_state =3D { + .name =3D "ide_drive/pio_state", + .version_id =3D 1, + .minimum_version_id =3D 1, + .pre_save =3D ide_drive_pio_pre_save, + .post_load =3D ide_drive_pio_post_load, + .needed =3D ide_drive_pio_state_needed, + .fields =3D (VMStateField[]) { + VMSTATE_INT32(req_nb_sectors, IDEState), + VMSTATE_VARRAY_INT32(io_buffer, IDEState, io_buffer_total_len, 1, + vmstate_info_uint8, uint8_t), + VMSTATE_INT32(cur_io_buffer_offset, IDEState), + VMSTATE_INT32(cur_io_buffer_len, IDEState), + VMSTATE_UINT8(end_transfer_fn_idx, IDEState), + VMSTATE_INT32(elementary_transfer_size, IDEState), + VMSTATE_INT32(packet_transfer_size, IDEState), + VMSTATE_END_OF_LIST() + } + }; + + const VMStateDescription vmstate_ide_drive =3D { + .name =3D "ide_drive", + .version_id =3D 3, + .minimum_version_id =3D 0, + .post_load =3D ide_drive_post_load, + .fields =3D (VMStateField[]) { + .... several fields .... + VMSTATE_END_OF_LIST() + }, + .subsections =3D (const VMStateDescription*[]) { + &vmstate_ide_drive_pio_state, + NULL + } + }; =20 Here we have a subsection for the pio state. We only need to save/send this state when we are in the middle of a pio operation @@ -305,14 +331,11 @@ to send a subsection allows backwards migration compa= tibility when new subsections are added. =20 For example; - a) Add a new property using DEFINE_PROP_BOOL - e.g. support-foo and - default it to true. - b) Add an entry to the HW_COMPAT_ for the previous version - that sets the property to false. + a) Add a new property using ``DEFINE_PROP_BOOL`` - e.g. support-foo and= default it to true. + b) Add an entry to the ``HW_COMPAT_`` for the previous version that set= s the property to false. c) Add a static bool support_foo function that tests the property. d) Add a subsection with a .needed set to the support_foo function - e) (potentially) Add a pre_load that sets up a default value for 'foo' - to be used if the subsection isn't loaded. + e) (potentially) Add a pre_load that sets up a default value for 'foo' = to be used if the subsection isn't loaded. =20 Now that subsection will not be generated when using an older machine type and the migration stream will be accepted by older @@ -332,25 +355,28 @@ in most cases. In general the preference is to tie t= he subsection to the machine type, and allow reliable migrations, unless the behaviour from omission of the subsection is really bad. =20 -=3D Not sending existing elements =3D +Not sending existing elements +----------------------------- =20 Sometimes members of the VMState are no longer needed; - removing them will break migration compatibility - making them version dependent and bumping the version will break backwar= ds - migration compatibility. + - removing them will break migration compatibility + + - making them version dependent and bumping the version will break backw= ards migration compatibility. =20 The best way is to: - a) Add a new property/compatibility/function in the same way for subsect= ions - above. + a) Add a new property/compatibility/function in the same way for subsect= ions above. b) replace the VMSTATE macro with the _TEST version of the macro, e.g.: - VMSTATE_UINT32(foo, barstruct) + + ``VMSTATE_UINT32(foo, barstruct)`` + becomes - VMSTATE_UINT32_TEST(foo, barstruct, pre_version_baz) =20 - Sometime in the future when we no longer care about the ancient -versions these can be killed off. + ``VMSTATE_UINT32_TEST(foo, barstruct, pre_version_baz)`` =20 -=3D Return path =3D + Sometime in the future when we no longer care about the ancient version= s these can be killed off. + +Return path +----------- =20 In most migration scenarios there is only a single data path that runs from the source VM to the destination, typically along a single fd (althou= gh @@ -369,10 +395,11 @@ path. =20 Destination side Forward path - read by main thread - Return path - opened by main thread, written by main thread AND post= copy - thread (protected by rp_mutex) + Return path - opened by main thread, written by main thread AND post= copy thread (protected by rp_mutex) + +Postcopy +=3D=3D=3D=3D=3D=3D=3D=3D =20 -=3D Postcopy =3D 'Postcopy' migration is a way to deal with migrations that refuse to conve= rge (or take too long to converge) its plus side is that there is an upper bou= nd on the amount of migration traffic and time it takes, the down side is that d= uring @@ -386,17 +413,18 @@ a fault that's translated by QEMU into a request to t= he source QEMU. Postcopy can be combined with precopy (i.e. normal migration) so that if p= recopy doesn't finish in a given time the switch is made to postcopy. =20 -=3D=3D=3D Enabling postcopy =3D=3D=3D +Enabling postcopy +----------------- =20 To enable postcopy, issue this command on the monitor prior to the start of migration: =20 -migrate_set_capability postcopy-ram on +``migrate_set_capability postcopy-ram on`` =20 The normal commands are then used to start a migration, which is still started in precopy mode. Issuing: =20 -migrate_start_postcopy +``migrate_start_postcopy`` =20 will now cause the transition from precopy to postcopy. It can be issued immediately after migration is started or any @@ -406,7 +434,8 @@ Note: During the postcopy phase, the bandwidth limits s= et using migrate_set_speed is ignored (to avoid delaying requested pages that the destination is waiting for). =20 -=3D=3D=3D Postcopy device transfer =3D=3D=3D +Postcopy device transfer +------------------------ =20 Loading of device data may cause the device emulation to access guest RAM that may trigger faults that have to be resolved by the source, as such @@ -416,6 +445,7 @@ before the device load begins to free the stream up. T= his is achieved by 'packaging' the device data into a blob that's read in one go. =20 Source behaviour +---------------- =20 Until postcopy is entered the migration stream is identical to normal precopy, except for the addition of a 'postcopy advise' command at @@ -423,11 +453,10 @@ the beginning, to tell the destination that postcopy = might happen. When postcopy starts the source sends the page discard data and then forms the 'package' containing: =20 - Command: 'postcopy listen' - The device state - A series of sections, identical to the precopy streams device state = stream - containing everything except postcopiable devices (i.e. RAM) - Command: 'postcopy run' + - Command: 'postcopy listen' + - The device state + A series of sections, identical to the precopy streams device state = stream containing everything except postcopiable devices (i.e. RAM) + - Command: 'postcopy run' =20 The 'package' is sent as the data part of a Command: 'CMD_PACKAGED', and t= he contents are formatted in the same way as the main migration stream. @@ -441,44 +470,38 @@ to be sent quickly in the hope that those pages are l= ikely to be used by the destination soon. =20 Destination behaviour +--------------------- =20 Initially the destination looks the same as precopy, with a single thread reading the migration stream; the 'postcopy advise' and 'discard' commands are processed to change the way RAM is managed, but don't affect the stream processing. =20 ---------------------------------------------------------------------------= ---- - 1 2 3 4 5 6 7 -main -----DISCARD-CMD_PACKAGED ( LISTEN DEVICE DEVICE DEVICE RUN ) -thread | | - | (page request) - | \___ - v \ -listen thread: --- page -- page -- page -- page -- pag= e -- - - a b c ---------------------------------------------------------------------------= ---- - -On receipt of CMD_PACKAGED (1) - All the data associated with the package - the ( ... ) section in the -diagram - is read into memory, and the main thread recurses into -qemu_loadvm_state_main to process the contents of the package (2) -which contains commands (3,6) and devices (4...) - -On receipt of 'postcopy listen' - 3 -(i.e. the 1st command in the package) -a new thread (a) is started that takes over servicing the migration stream, -while the main thread carries on loading the package. It loads normal -background page data (b) but if during a device load a fault happens (5) t= he -returned page (c) is loaded by the listen thread allowing the main threads -device load to carry on. - -The last thing in the CMD_PACKAGED is a 'RUN' command (6) letting the dest= ination -CPUs start running. -At the end of the CMD_PACKAGED (7) the main thread returns to normal runni= ng behaviour -and is no longer used by migration, while the listen thread carries -on servicing page data until the end of migration. - -=3D=3D=3D Postcopy states =3D=3D=3D +:: + + ------------------------------------------------------------------------= ------ + 1 2 3 4 5 6 7 + main -----DISCARD-CMD_PACKAGED ( LISTEN DEVICE DEVICE DEVICE RUN ) + thread | | + | (page request) + | \___ + v \ + listen thread: --- page -- page -- page -- page -- p= age -- + + a b c + ------------------------------------------------------------------------= ------ + +- On receipt of CMD_PACKAGED (1) + All the data associated with the package - the ( ... ) section in the d= iagram - is read into memory, and the main thread recurses into qemu_loadvm= _state_main to process the contents of the package (2) which contains comma= nds (3,6) and devices (4...) + +- On receipt of 'postcopy listen' - 3 -(i.e. the 1st command in the packag= e) + a new thread (a) is started that takes over servicing the migration str= eam, while the main thread carries on loading the package. It loads norma= l background page data (b) but if during a device load a fault happens (5) = the returned page (c) is loaded by the listen thread allowing the main thre= ads device load to carry on. + +- The last thing in the CMD_PACKAGED is a 'RUN' command (6) + letting the destination CPUs start running. At the end of the CMD_PACK= AGED (7) the main thread returns to normal running behaviour and is no long= er used by migration, while the listen thread carries on servicing page dat= a until the end of migration. + +Postcopy states +--------------- =20 Postcopy moves through a series of states (see postcopy_state) from ADVISE->DISCARD->LISTEN->RUNNING->END @@ -516,7 +539,8 @@ ADVISE->DISCARD->LISTEN->RUNNING->END End: The listen thread can now quit, and perform the cleanup of migr= ation state, the migration is now complete. =20 -=3D=3D=3D Source side page maps =3D=3D=3D +Source side page maps +--------------------- =20 The source side keeps two bitmaps during postcopy; 'the migration bitmap' and 'unsent map'. The 'migration bitmap' is basically the same as in @@ -529,6 +553,7 @@ The 'unsent map' is used for the transition to postcopy= . It is a bitmap that has a bit cleared whenever a page is sent to the destination, however duri= ng the transition to postcopy mode it is combined with the migration bitmap to form a set of pages that: + a) Have been sent but then redirtied (which must be discarded) b) Have not yet been sent - which also must be discarded to cause any transparent huge pages built during precopy to be broken. @@ -540,7 +565,8 @@ request for a page that has already been sent is ignore= d. Duplicate requests such as this can happen as a page is sent at about the same time the destination accesses it. =20 -=3D=3D=3D Postcopy with hugepages =3D=3D=3D +Postcopy with hugepages +----------------------- =20 Postcopy now works with hugetlbfs backed memory: a) The linux kernel on the destination must support userfault on hugepag= es. --=20 2.14.3