diff options
| author | Yuan Liu <yuan1.liu@intel.com> | 2024-04-01 23:41:10 +0800 |
|---|---|---|
| committer | Peter Xu <peterx@redhat.com> | 2024-04-23 18:36:01 -0400 |
| commit | 5ef7e26bdb7eda10d6d5e1b77121be9945e5e550 (patch) | |
| tree | 8823bbea099cf77e06a48b8d465ff2666c9adf6a /migration/multifd-zlib.c | |
| parent | dd031677257d7d00a72f28f073befc22691a0ad6 (diff) | |
| download | focaccia-qemu-5ef7e26bdb7eda10d6d5e1b77121be9945e5e550.tar.gz focaccia-qemu-5ef7e26bdb7eda10d6d5e1b77121be9945e5e550.zip | |
migration/multifd: solve zero page causing multiple page faults
Implemented recvbitmap tracking of received pages in multifd. If the zero page appears for the first time in the recvbitmap, this page is not checked and set. If the zero page has already appeared in the recvbitmap, there is no need to check the data but directly set the data to 0, because it is unlikely that the zero page will be migrated multiple times. Signed-off-by: Yuan Liu <yuan1.liu@intel.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/20240401154110.2028453-2-yuan1.liu@intel.com [peterx: touch up the comment, as the bitmap is used outside postcopy now] Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'migration/multifd-zlib.c')
| -rw-r--r-- | migration/multifd-zlib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/migration/multifd-zlib.c b/migration/multifd-zlib.c index 99821cd4d5..737a9645d2 100644 --- a/migration/multifd-zlib.c +++ b/migration/multifd-zlib.c @@ -284,6 +284,7 @@ static int zlib_recv(MultiFDRecvParams *p, Error **errp) int flush = Z_NO_FLUSH; unsigned long start = zs->total_out; + ramblock_recv_bitmap_set_offset(p->block, p->normal[i]); if (i == p->normal_num - 1) { flush = Z_SYNC_FLUSH; } |