• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisão8af66371ed8e86c7caea9b814dcee23e8ba08f79 (tree)
Hora2020-03-13 18:36:30
Autorzhanghailiang <zhang.zhanghailiang@huaw...>
CommiterDr. David Alan Gilbert

Mensagem de Log

ram/colo: only record bitmap of dirty pages in COLO stage

It is only need to record bitmap of dirty pages while goes
into COLO stage.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Message-Id: <20200224065414.36524-6-zhang.zhanghailiang@huawei.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

Mudança Sumário

Diff

--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2742,7 +2742,7 @@ static inline void *host_from_ram_block_offset(RAMBlock *block,
27422742 }
27432743
27442744 static inline void *colo_cache_from_block_offset(RAMBlock *block,
2745- ram_addr_t offset)
2745+ ram_addr_t offset, bool record_bitmap)
27462746 {
27472747 if (!offset_in_ramblock(block, offset)) {
27482748 return NULL;
@@ -2758,7 +2758,8 @@ static inline void *colo_cache_from_block_offset(RAMBlock *block,
27582758 * It help us to decide which pages in ram cache should be flushed
27592759 * into VM's RAM later.
27602760 */
2761- if (!test_and_set_bit(offset >> TARGET_PAGE_BITS, block->bmap)) {
2761+ if (record_bitmap &&
2762+ !test_and_set_bit(offset >> TARGET_PAGE_BITS, block->bmap)) {
27622763 ram_state->migration_dirty_pages++;
27632764 }
27642765 return block->colo_cache + offset;
@@ -3416,13 +3417,13 @@ static int ram_load_precopy(QEMUFile *f)
34163417 if (migration_incoming_colo_enabled()) {
34173418 if (migration_incoming_in_colo_state()) {
34183419 /* In COLO stage, put all pages into cache temporarily */
3419- host = colo_cache_from_block_offset(block, addr);
3420+ host = colo_cache_from_block_offset(block, addr, true);
34203421 } else {
34213422 /*
34223423 * In migration stage but before COLO stage,
34233424 * Put all pages into both cache and SVM's memory.
34243425 */
3425- host_bak = colo_cache_from_block_offset(block, addr);
3426+ host_bak = colo_cache_from_block_offset(block, addr, false);
34263427 }
34273428 }
34283429 if (!host) {