[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/9] migration/postcopy: not necessary to do discard when canonica
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 2/9] migration/postcopy: not necessary to do discard when canonicalizing bitmap |
Date: |
Wed, 25 Sep 2019 16:01:23 +0100 |
From: Wei Yang <address@hidden>
All pages, either partially sent or partially dirty, will be discarded in
postcopy_send_discard_bm_ram(), since we update the unsentmap to be
unsentmap = unsentmap | dirty in ram_postcopy_send_discard_bitmap().
This is not necessary to do discard when canonicalizing bitmap. And by
doing so, we separate the page discard into two individual steps:
* canonicalize bitmap
* discard page
Signed-off-by: Wei Yang <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
migration/ram.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 01df326767..57d1a4627e 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2928,7 +2928,7 @@ static int postcopy_each_ram_send_discard(MigrationState
*ms)
}
/**
- * postcopy_chunk_hostpages_pass: canocalize bitmap in hostpages
+ * postcopy_chunk_hostpages_pass: canonicalize bitmap in hostpages
*
* Helper for postcopy_chunk_hostpages; it's called twice to
* canonicalize the two bitmaps, that are similar, but one is
@@ -2991,18 +2991,6 @@ static void postcopy_chunk_hostpages_pass(MigrationState
*ms, bool unsent_pass,
host_ratio);
run_start = QEMU_ALIGN_UP(run_start, host_ratio);
- /* Tell the destination to discard this page */
- if (unsent_pass || !test_bit(fixup_start_addr, unsentmap)) {
- /* For the unsent_pass we:
- * discard partially sent pages
- * For the !unsent_pass (dirty) we:
- * discard partially dirty pages that were sent
- * (any partially sent pages were already discarded
- * by the previous unsent_pass)
- */
- postcopy_discard_send_range(ms, fixup_start_addr, host_ratio);
- }
-
/* Clean up the bitmap */
for (page = fixup_start_addr;
page < fixup_start_addr + host_ratio; page++) {
--
2.21.0
- [PULL 0/9] migration queue, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 1/9] migration: fix vmdesc leak on vmstate_save() error, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 2/9] migration/postcopy: not necessary to do discard when canonicalizing bitmap,
Dr. David Alan Gilbert (git) <=
- [PULL 3/9] migration/postcopy: unsentmap is not necessary for postcopy, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 4/9] migration: remove sent parameter in get_queued_page_not_dirty, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 5/9] migration/rdma: Don't moan about disconnects at the end, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 6/9] migration/rdma.c: Swap synchronize_rcu for call_rcu, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 7/9] tests/migration: Fail on unexpected migration states, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 8/9] tests/migration/postcopy: trim migration bandwidth, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 9/9] migration/postcopy: Recognise the recovery states as 'in_postcopy', Dr. David Alan Gilbert (git), 2019/09/25
- Re: [PULL 0/9] migration queue, Peter Maydell, 2019/09/26