From: "Zhang, Chen" <chen.zhang@intel.com>
To: Derek Su <dereksu@qnap.com>, qemu-devel <qemu-devel@nongnu.org>,
"Rao, Lei" <lei.rao@intel.com>
Cc: "zhang.zhanghailiang@huawei.com" <zhang.zhanghailiang@huawei.com>,
"dgilbert@redhat.com" <dgilbert@redhat.com>,
"quintela@redhat.com" <quintela@redhat.com>
Subject: RE: [PATCH v1 1/1] COLO: only flush dirty ram pages from colo cache
Date: Tue, 22 Sep 2020 03:41:27 +0000 [thread overview]
Message-ID: <b92f4c7b02fd448a949fed3b304cafa8@intel.com> (raw)
In-Reply-To: <CAKEOLWXPfULXx5-vzg3w-DRS3azhkizo-Ne05FJE+t5mtPd4Mg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3087 bytes --]
Hi Derek and Lei,
It looks same with Lei’ patch:
[PATCH 2/3] Reduce the time of checkpoint for COLO
Can you discuss to merge it into one patch?
Thanks
Zhang Chen
From: Derek Su <dereksu@qnap.com>
Sent: Tuesday, September 22, 2020 11:31 AM
To: qemu-devel <qemu-devel@nongnu.org>
Cc: zhang.zhanghailiang@huawei.com; quintela@redhat.com; dgilbert@redhat.com; Zhang, Chen <chen.zhang@intel.com>
Subject: Re: [PATCH v1 1/1] COLO: only flush dirty ram pages from colo cache
Hello, all
Ping...
Regards,
Derek Su
Derek Su <dereksu@qnap.com<mailto:dereksu@qnap.com>> 於 2020年9月10日 週四 下午6:47寫道:
In secondary side, the colo_flush_ram_cache() calls
migration_bitmap_find_dirty() to finding the dirty pages and
flush them to host. But ram_state's ram_bulk_stage flag is always
enabled in secondary side, it leads to the whole ram pages copy
instead of only dirty pages.
Here, the ram_bulk_stage in secondary side is disabled in the
preparation of COLO incoming process to avoid the whole dirty
ram pages flush.
Signed-off-by: Derek Su <dereksu@qnap.com<mailto:dereksu@qnap.com>>
---
migration/colo.c | 6 +++++-
migration/ram.c | 10 ++++++++++
migration/ram.h | 3 +++
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/migration/colo.c b/migration/colo.c
index ea7d1e9d4e..6e644db306 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -844,6 +844,8 @@ void *colo_process_incoming_thread(void *opaque)
return NULL;
}
+ colo_disable_ram_bulk_stage();
+
failover_init_state();
mis->to_src_file = qemu_file_get_return_path(mis->from_src_file);
@@ -873,7 +875,7 @@ void *colo_process_incoming_thread(void *opaque)
goto out;
}
#else
- abort();
+ abort();
#endif
vm_start();
trace_colo_vm_state_change("stop", "run");
@@ -924,6 +926,8 @@ out:
qemu_fclose(fb);
}
+ colo_enable_ram_bulk_stage();
+
/* Hope this not to be too long to loop here */
qemu_sem_wait(&mis->colo_incoming_sem);
qemu_sem_destroy(&mis->colo_incoming_sem);
diff --git a/migration/ram.c b/migration/ram.c
index 76d4fee5d5..65e9b12058 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3357,6 +3357,16 @@ static bool postcopy_is_running(void)
return ps >= POSTCOPY_INCOMING_LISTENING && ps < POSTCOPY_INCOMING_END;
}
+void colo_enable_ram_bulk_stage(void)
+{
+ ram_state->ram_bulk_stage = true;
+}
+
+void colo_disable_ram_bulk_stage(void)
+{
+ ram_state->ram_bulk_stage = false;
+}
+
/*
* Flush content of RAM cache into SVM's memory.
* Only flush the pages that be dirtied by PVM or SVM or both.
diff --git a/migration/ram.h b/migration/ram.h
index 2eeaacfa13..c1c0ebbe0f 100644
--- a/migration/ram.h
+++ b/migration/ram.h
@@ -69,4 +69,7 @@ void colo_flush_ram_cache(void);
void colo_release_ram_cache(void);
void colo_incoming_start_dirty_log(void);
+void colo_enable_ram_bulk_stage(void);
+void colo_disable_ram_bulk_stage(void);
+
#endif
--
2.25.1
[-- Attachment #2: Type: text/html, Size: 7789 bytes --]
next prev parent reply other threads:[~2020-09-22 3:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 10:46 [PATCH v1 0/1] COLO: only flush dirty ram pages from colo cache Derek Su
2020-09-10 10:46 ` [PATCH v1 1/1] " Derek Su
2020-09-22 3:31 ` Derek Su
2020-09-22 3:41 ` Zhang, Chen [this message]
2020-09-22 3:48 ` Derek Su
2020-09-22 5:04 ` Rao, Lei
2020-09-22 5:18 ` Derek Su
2020-09-22 5:37 ` Zhang, Chen
2020-09-22 5:46 ` Derek Su
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=b92f4c7b02fd448a949fed3b304cafa8@intel.com \
--to=chen.zhang@intel.com \
--cc=dereksu@qnap.com \
--cc=dgilbert@redhat.com \
--cc=lei.rao@intel.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=zhang.zhanghailiang@huawei.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.