diff options
author | Peter Lieven <pl@kamp.de> | 2018-03-08 12:18:27 +0100 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2018-03-23 16:45:03 +0000 |
commit | 44815334e10365ae5c60914c1d9fcecfe5ed5982 (patch) | |
tree | 46d1057e71b4ccff493a939f716e4e644cd79bd6 /migration/block.c | |
parent | e8a0f2f9a18f6ab4aa4896cef0010bcad1f323c4 (diff) | |
download | qemu-44815334e10365ae5c60914c1d9fcecfe5ed5982.zip qemu-44815334e10365ae5c60914c1d9fcecfe5ed5982.tar.gz qemu-44815334e10365ae5c60914c1d9fcecfe5ed5982.tar.bz2 |
migration/block: limit the number of parallel I/O requests
the current implementation submits up to 512 I/O requests in parallel
which is much to high especially for a background task.
This patch adds a maximum limit of 16 I/O requests that can
be submitted in parallel to avoid monopolizing the I/O device.
Signed-off-by: Peter Lieven <pl@kamp.de>
Message-Id: <1520507908-16743-5-git-send-email-pl@kamp.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/block.c')
-rw-r--r-- | migration/block.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/migration/block.c b/migration/block.c index 5c03632..03bbba6 100644 --- a/migration/block.c +++ b/migration/block.c @@ -37,6 +37,7 @@ #define MAX_IS_ALLOCATED_SEARCH (65536 * BDRV_SECTOR_SIZE) #define MAX_IO_BUFFERS 512 +#define MAX_PARALLEL_IO 16 //#define DEBUG_BLK_MIGRATION @@ -775,6 +776,7 @@ static int block_save_iterate(QEMUFile *f, void *opaque) while ((block_mig_state.submitted + block_mig_state.read_done) * BLOCK_SIZE < qemu_file_get_rate_limit(f) && + block_mig_state.submitted < MAX_PARALLEL_IO && (block_mig_state.submitted + block_mig_state.read_done) < MAX_IO_BUFFERS) { blk_mig_unlock(); |