From: Thomas Huth <thuth@redhat.com>
To: Juan Quintela <quintela@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
qemu-devel@nongnu.org
Cc: "Daniel P . Berrangé" <berrange@redhat.com>,
"Peter Xu" <peterx@redhat.com>, "Bin Meng" <bmeng.cn@gmail.com>
Subject: [PATCH 2/4] tests/migration/aarch64: Speed up the aarch64 migration test
Date: Fri, 19 Aug 2022 07:38:00 +0200 [thread overview]
Message-ID: <20220819053802.296584-3-thuth@redhat.com> (raw)
In-Reply-To: <20220819053802.296584-1-thuth@redhat.com>
The migration tests spend a lot of time waiting for a sign of live
of the guest on the serial console. The aarch64 migration code only
outputs "B"s every couple of seconds (at least it takes more than 4
seconds between each characeter on my x86 laptop). There are a lot
of migration tests, and if each test that checks for a successful
migration waits for these characters before and after migration, the
wait time sums up to multiple minutes! Let's use a shorter delay to
speed things up.
While we're at it, also remove a superfluous masking with 0xff - we're
reading and storing bytes, so the upper bits of the register do not
matter anyway.
With these changes, the test runs twice as fast on my laptop, decreasing
the total run time from approx. 8 minutes to only 4 minutes!
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/migration/aarch64/a-b-kernel.h | 10 +++++-----
tests/migration/aarch64/a-b-kernel.S | 3 +--
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/tests/migration/aarch64/a-b-kernel.h b/tests/migration/aarch64/a-b-kernel.h
index 0a9b01137e..34e518d061 100644
--- a/tests/migration/aarch64/a-b-kernel.h
+++ b/tests/migration/aarch64/a-b-kernel.h
@@ -10,9 +10,9 @@ unsigned char aarch64_kernel[] = {
0x03, 0x00, 0x80, 0x52, 0xe4, 0x03, 0x00, 0xaa, 0x83, 0x00, 0x00, 0x39,
0x84, 0x04, 0x40, 0x91, 0x9f, 0x00, 0x01, 0xeb, 0xad, 0xff, 0xff, 0x54,
0x05, 0x00, 0x80, 0x52, 0xe4, 0x03, 0x00, 0xaa, 0x83, 0x00, 0x40, 0x39,
- 0x63, 0x04, 0x00, 0x11, 0x63, 0x1c, 0x00, 0x12, 0x83, 0x00, 0x00, 0x39,
- 0x24, 0x7e, 0x0b, 0xd5, 0x84, 0x04, 0x40, 0x91, 0x9f, 0x00, 0x01, 0xeb,
- 0x2b, 0xff, 0xff, 0x54, 0xa5, 0x04, 0x00, 0x11, 0xa5, 0x1c, 0x00, 0x12,
- 0xbf, 0x00, 0x00, 0x71, 0x81, 0xfe, 0xff, 0x54, 0x43, 0x08, 0x80, 0x52,
- 0x43, 0x00, 0x00, 0x39, 0xf1, 0xff, 0xff, 0x17
+ 0x63, 0x04, 0x00, 0x11, 0x83, 0x00, 0x00, 0x39, 0x24, 0x7e, 0x0b, 0xd5,
+ 0x84, 0x04, 0x40, 0x91, 0x9f, 0x00, 0x01, 0xeb, 0x4b, 0xff, 0xff, 0x54,
+ 0xa5, 0x04, 0x00, 0x11, 0xa5, 0x10, 0x00, 0x12, 0xbf, 0x00, 0x00, 0x71,
+ 0xa1, 0xfe, 0xff, 0x54, 0x43, 0x08, 0x80, 0x52, 0x43, 0x00, 0x00, 0x39,
+ 0xf2, 0xff, 0xff, 0x17
};
diff --git a/tests/migration/aarch64/a-b-kernel.S b/tests/migration/aarch64/a-b-kernel.S
index 0225945348..a4103ecb71 100644
--- a/tests/migration/aarch64/a-b-kernel.S
+++ b/tests/migration/aarch64/a-b-kernel.S
@@ -53,7 +53,6 @@ innerloop:
/* increment the first byte of each page by 1 */
ldrb w3, [x4]
add w3, w3, #1
- and w3, w3, #0xff
strb w3, [x4]
/* make sure QEMU user space can see consistent data as MMU is off */
@@ -64,7 +63,7 @@ innerloop:
blt innerloop
add w5, w5, #1
- and w5, w5, #0xff
+ and w5, w5, #0x1f
cmp w5, #0
bne mainloop
--
2.31.1
next prev parent reply other threads:[~2022-08-19 5:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-19 5:37 [PATCH 0/4] Speed up migration tests Thomas Huth
2022-08-19 5:37 ` [PATCH 1/4] tests/qtest/migration-test: Only wait for serial output where migration succeeds Thomas Huth
2022-08-19 5:38 ` Thomas Huth [this message]
2022-08-22 10:57 ` [PATCH 2/4] tests/migration/aarch64: Speed up the aarch64 migration test Daniel P. Berrangé
2022-08-19 5:38 ` [PATCH 3/4] tests/migration/i386: Speed up the i386 migration test (when using TCG) Thomas Huth
2022-08-22 10:58 ` Daniel P. Berrangé
2022-08-19 5:38 ` [PATCH 4/4] tests/qtest/migration-test: Remove duplicated test_postcopy from the test plan Thomas Huth
2022-08-22 10:59 ` Daniel P. Berrangé
2022-08-22 15:32 ` Dr. David Alan Gilbert
2022-08-19 16:25 ` [PATCH 0/4] Speed up migration tests Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220819053802.296584-3-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=berrange@redhat.com \
--cc=bmeng.cn@gmail.com \
--cc=dgilbert@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.