|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v1 0/2] Functional and performance tests for migration
This is a test that can be run in Dom0, which constructs a minimal
guest, fills the memory with a deterministic pattern,
xc_domains_save/xc_domain_restore on 2 threads, and checks the pattern
at the end. On mismatch hexdumps of the portions that do not match are
printed.
Although the test is very simple it has already been very useful during
the development of 2 migration optimization patch sets (foreign copy and
migration compression, to be posted separately).
Of course the test is not a guarantee that migration works correctly,
there are lots of aspects that are not tested (interaction with device
emulators, more complicated memory layouts, the memory layout changing
during migration, etc.), but is a lot easier to debug when it goes wrong
than a real guest crashing (quite often even if you run 'memtest' in the
guest, it'll either crash while executing without printing where the mismatch
is -- if you corrupted the actual program, or continue undetected,
requiring many migration iterations to catch the bug).
It can also be used as a low-level performance test by specifying the
REPEAT environment variable.
Example usage from the tests/migration directory when working on
optimizations in libxenguest:
```
make -j$(nproc) -O -C ../../libs/guest && make -j$(nproc) -O && scp
../../libs/guest/libxenguest.so.4.22.0 ../../libs/guest/libxenguest.so.4.22
test-migration root@$HOST: && ssh root@$HOST env REPEAT=20
LD_LIBRARY_PATH=/root ./test-migration 2>/dev/null | grep
'Performance.*xc_domain_restore'
```
The output can be post-processed with `cut -f2 -d: |cut -f1 -ds`, and
then compared with `ministat` for example.
Currently this patchset depends on another that refactors the unit test
Makefiles. Once I've updated that patchset I'll send a rebased version
of this one.
Edwin Török (2):
tools/tests/migration: introduce migration functional and performance
tests
tools/lib/call: cache up to 4 pages in hypercall bounce buffers
tools/libs/call/buffer.c | 28 +-
tools/libs/call/core.c | 3 +-
tools/libs/call/private.h | 8 +-
tools/tests/Makefile | 1 +
tools/tests/common/guests.c | 1 +
tools/tests/migration/.gitignore | 1 +
tools/tests/migration/Makefile | 70 +++
tools/tests/migration/memory.c | 6 +
tools/tests/migration/memory.h | 92 ++++
tools/tests/migration/patterns.c | 76 +++
tools/tests/migration/patterns.h | 22 +
tools/tests/migration/test-migration.c | 713 +++++++++++++++++++++++++
tools/tests/migration/xen_patterns.c | 92 ++++
tools/tests/migration/xen_patterns.h | 14 +
14 files changed, 1111 insertions(+), 16 deletions(-)
create mode 100644 tools/tests/migration/.gitignore
create mode 100644 tools/tests/migration/Makefile
create mode 100644 tools/tests/migration/memory.c
create mode 100644 tools/tests/migration/memory.h
create mode 100644 tools/tests/migration/patterns.c
create mode 100644 tools/tests/migration/patterns.h
create mode 100644 tools/tests/migration/test-migration.c
create mode 100644 tools/tests/migration/xen_patterns.c
create mode 100644 tools/tests/migration/xen_patterns.h
--
2.47.3
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |