[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/8] Postcopy: Avoid 0 length discards
From: |
Amit Shah |
Subject: |
[Qemu-devel] [PULL 3/8] Postcopy: Avoid 0 length discards |
Date: |
Fri, 10 Jun 2016 17:18:15 +0530 |
From: "Dr. David Alan Gilbert" <address@hidden>
The discard code in migration/ram.c would send request for
zero length discards in the case where no discards were needed.
It doesn't appear to have had any bad effect.
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Denis V. Lunev <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>
---
migration/ram.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/migration/ram.c b/migration/ram.c
index 844ea46..5f929d6 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1557,7 +1557,9 @@ static int postcopy_send_discard_bm_ram(MigrationState
*ms,
} else {
discard_length = zero - one;
}
- postcopy_discard_send_range(ms, pds, one, discard_length);
+ if (discard_length) {
+ postcopy_discard_send_range(ms, pds, one, discard_length);
+ }
current = one + discard_length;
} else {
current = one;
--
2.7.4
- [Qemu-devel] [PULL 2/8] Migration: Split out ram part of qmp_query_migrate, (continued)
- [Qemu-devel] [PULL 2/8] Migration: Split out ram part of qmp_query_migrate, Amit Shah, 2016/06/10
- [Qemu-devel] [PULL 5/8] tests: fix libqtest socket timeouts, Amit Shah, 2016/06/10
- [Qemu-devel] [PULL 6/8] Postcopy: Check for support when setting the capability, Amit Shah, 2016/06/10
- [Qemu-devel] [PULL 4/8] test: Postcopy, Amit Shah, 2016/06/10
- [Qemu-devel] [PULL 7/8] migration: fix typos in qapi-schema from latest migration additions, Amit Shah, 2016/06/10
- [Qemu-devel] [PULL 8/8] migration: rename functions to starting migrations, Amit Shah, 2016/06/10
- Re: [Qemu-devel] [PULL 0/8] migration: fixes, Peter Maydell, 2016/06/10
- [Qemu-devel] [PULL 0/8] migration: fixes, Amit Shah, 2016/06/10
- [Qemu-devel] [PULL 2/8] migration: rename functions to starting migrations, Amit Shah, 2016/06/10
- [Qemu-devel] [PULL 1/8] migration: fix typos in qapi-schema from latest migration additions, Amit Shah, 2016/06/10
- [Qemu-devel] [PULL 3/8] Postcopy: Avoid 0 length discards,
Amit Shah <=
- [Qemu-devel] [PULL 4/8] Migration: Split out ram part of qmp_query_migrate, Amit Shah, 2016/06/10
- [Qemu-devel] [PULL 5/8] Postcopy: Add stats on page requests, Amit Shah, 2016/06/10
- [Qemu-devel] [PULL 6/8] test: Postcopy, Amit Shah, 2016/06/10
- [Qemu-devel] [PULL 7/8] tests: fix libqtest socket timeouts, Amit Shah, 2016/06/10
- [Qemu-devel] [PULL 8/8] Postcopy: Check for support when setting the capability, Amit Shah, 2016/06/10
- Re: [Qemu-devel] [PULL 0/8] migration: fixes, Peter Maydell, 2016/06/10
- Re: [Qemu-devel] [PULL 0/8] migration: fixes, Dr. David Alan Gilbert, 2016/06/10
- [Qemu-devel] [PULL 0/8] migration: fixes, Amit Shah, 2016/06/16