ram.c (9605c2ac282c565bb00b5f344217161bef29eff8) ram.c (873f674c559e3162a6e6e92994301d400c5cc873)
1/*
2 * QEMU System Emulator
3 *
4 * Copyright (c) 2003-2008 Fabrice Bellard
5 * Copyright (c) 2011-2015 Red Hat Inc
6 *
7 * Authors:
8 * Juan Quintela <quintela@redhat.com>

--- 697 unchanged lines hidden (view full) ---

706 * writes. If guest dirty memory rate is reduced below the rate at
707 * which we can transfer pages to the destination then we should be
708 * able to complete migration. Some workloads dirty memory way too
709 * fast and will not effectively converge, even with auto-converge.
710 */
711static void mig_throttle_guest_down(uint64_t bytes_dirty_period,
712 uint64_t bytes_dirty_threshold)
713{
1/*
2 * QEMU System Emulator
3 *
4 * Copyright (c) 2003-2008 Fabrice Bellard
5 * Copyright (c) 2011-2015 Red Hat Inc
6 *
7 * Authors:
8 * Juan Quintela <quintela@redhat.com>

--- 697 unchanged lines hidden (view full) ---

706 * writes. If guest dirty memory rate is reduced below the rate at
707 * which we can transfer pages to the destination then we should be
708 * able to complete migration. Some workloads dirty memory way too
709 * fast and will not effectively converge, even with auto-converge.
710 */
711static void mig_throttle_guest_down(uint64_t bytes_dirty_period,
712 uint64_t bytes_dirty_threshold)
713{
714 MigrationState *s = migrate_get_current();
715 uint64_t pct_initial = migrate_cpu_throttle_initial();
716 uint64_t pct_increment = migrate_cpu_throttle_increment();
714 uint64_t pct_initial = migrate_cpu_throttle_initial();
715 uint64_t pct_increment = migrate_cpu_throttle_increment();
717 bool pct_tailslow = s->parameters.cpu_throttle_tailslow;
716 bool pct_tailslow = migrate_cpu_throttle_tailslow();
718 int pct_max = migrate_max_cpu_throttle();
719
720 uint64_t throttle_now = cpu_throttle_get_percentage();
721 uint64_t cpu_now, cpu_ideal, throttle_inc;
722
723 /* We have not started throttling yet. Let's start it. */
724 if (!cpu_throttle_active()) {
725 cpu_throttle_set(pct_initial);

--- 4002 unchanged lines hidden ---
717 int pct_max = migrate_max_cpu_throttle();
718
719 uint64_t throttle_now = cpu_throttle_get_percentage();
720 uint64_t cpu_now, cpu_ideal, throttle_inc;
721
722 /* We have not started throttling yet. Let's start it. */
723 if (!cpu_throttle_active()) {
724 cpu_throttle_set(pct_initial);

--- 4002 unchanged lines hidden ---