diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-11-25 16:20:58 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-11-25 16:20:58 +0000 |
commit | c7933a80bc6f3bb79c341f8fc17b4cf76622e2f3 (patch) | |
tree | c3fb00be709f6a464dcebc3b2b86b04f2b5039b5 /migration/block.c | |
parent | 1a4dab849d5d06191ab5e5850f6b8bfcad8ceb47 (diff) | |
parent | f77dcdbc76dbf9bade9739e85e1013639e535835 (diff) | |
download | hqemu-c7933a80bc6f3bb79c341f8fc17b4cf76622e2f3.zip hqemu-c7933a80bc6f3bb79c341f8fc17b4cf76622e2f3.tar.gz |
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20151125' into staging
migration/next for 20151125
# gpg: Signature made Wed 25 Nov 2015 14:28:47 GMT using RSA key ID 5872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>"
# gpg: aka "Juan Quintela <quintela@trasno.org>"
* remotes/juanquintela/tags/migration/20151125:
block-migration: limit the memory usage
Assume madvise for (no)hugepage works
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'migration/block.c')
-rw-r--r-- | migration/block.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/migration/block.c b/migration/block.c index 310e2b3..656f38f 100644 --- a/migration/block.c +++ b/migration/block.c @@ -36,6 +36,8 @@ #define MAX_IS_ALLOCATED_SEARCH 65536 +#define MAX_INFLIGHT_IO 512 + //#define DEBUG_BLK_MIGRATION #ifdef DEBUG_BLK_MIGRATION @@ -665,7 +667,10 @@ static int block_save_iterate(QEMUFile *f, void *opaque) blk_mig_lock(); while ((block_mig_state.submitted + block_mig_state.read_done) * BLOCK_SIZE < - qemu_file_get_rate_limit(f)) { + qemu_file_get_rate_limit(f) && + (block_mig_state.submitted + + block_mig_state.read_done) < + MAX_INFLIGHT_IO) { blk_mig_unlock(); if (block_mig_state.bulk_completed == 0) { /* first finish the bulk phase */ |