Message ID | 20210223021646.500-3-jiangkunkun@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | migration/ram: Some modifications about ram_save_host_page() | expand |
diff --git a/migration/ram.c b/migration/ram.c index fc49c3f898..c7e18dc2fc 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -2017,7 +2017,9 @@ static int ram_save_host_page(RAMState *rs, PageSearchStatus *pss, pages += tmppages; pss->page++; /* Allow rate limiting to happen in the middle of huge pages */ - migration_rate_limit(); + if (pagesize_bits > 1) { + migration_rate_limit(); + } } while ((pss->page & (pagesize_bits - 1)) && offset_in_ramblock(pss->block, ((ram_addr_t)pss->page) << TARGET_PAGE_BITS));