diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2019-12-05 10:29:18 +0000 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2020-01-20 09:10:22 +0100 |
commit | 97e1e06780e70f6e98a0d2df881e0c0927d3aeb6 (patch) | |
tree | c1313e021eb0cb39925d20bf16d6e08c45c9b6f0 /migration/ram.c | |
parent | 03acb4e94deada2dd32412725420db82682f2e2e (diff) |
migration: Rate limit inside host pages
When using hugepages, rate limiting is necessary within each huge
page, since a 1G huge page can take a significant time to send, so
you end up with bursty behaviour.
Fixes: 4c011c37ecb3 ("postcopy: Send whole huge pages")
Reported-by: Lin Ma <LMa@suse.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/ram.c')
-rw-r--r-- | migration/ram.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/migration/ram.c b/migration/ram.c index 17cd8d524b..1ec5c10561 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -2639,6 +2639,8 @@ 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(); } while ((pss->page & (pagesize_bits - 1)) && offset_in_ramblock(pss->block, pss->page << TARGET_PAGE_BITS)); |