[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 05/17] ram: extend the data structures for backgr
From: |
Denis Plotnikov |
Subject: |
[Qemu-devel] [PATCH v1 05/17] ram: extend the data structures for background snapshotting |
Date: |
Wed, 18 Jul 2018 18:41:48 +0300 |
Signed-off-by: Denis Plotnikov <address@hidden>
---
include/exec/ram_addr.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 6cbc02aa0f..5b403d537d 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -36,6 +36,8 @@ struct RAMBlock {
char idstr[256];
/* RCU-enabled, writes protected by the ramlist lock */
QLIST_ENTRY(RAMBlock) next;
+ /* blocks used for background snapshot */
+ QLIST_ENTRY(RAMBlock) bgs_next;
QLIST_HEAD(, RAMBlockNotifier) ramblock_notifiers;
int fd;
size_t page_size;
@@ -49,6 +51,11 @@ struct RAMBlock {
unsigned long *unsentmap;
/* bitmap of already received pages in postcopy */
unsigned long *receivedmap;
+ /* The following 2 are for background snapshot */
+ /* Pages currently being copied */
+ unsigned long *touched_map;
+ /* Pages has been copied already */
+ unsigned long *copied_map;
};
static inline bool offset_in_ramblock(RAMBlock *b, ram_addr_t offset)
--
2.17.0
- [Qemu-devel] [PATCH v1 00/17] Background snapshots, Denis Plotnikov, 2018/07/18
- [Qemu-devel] [PATCH v1 05/17] ram: extend the data structures for background snapshotting,
Denis Plotnikov <=
- [Qemu-devel] [PATCH v1 01/17] migration: add background snapshot capability, Denis Plotnikov, 2018/07/18
- [Qemu-devel] [PATCH v1 13/17] background snapshot: add write-protected page access handler function, Denis Plotnikov, 2018/07/18
- [Qemu-devel] [PATCH v1 06/17] background snapshot: add helpers to manage a copy of ram block list, Denis Plotnikov, 2018/07/18
- [Qemu-devel] [PATCH v1 08/17] migration: add helpers to change VM memory protection rights, Denis Plotnikov, 2018/07/18
- [Qemu-devel] [PATCH v1 02/17] bitops: add some atomic versions of bitmap operations, Denis Plotnikov, 2018/07/18