diff options
author | Lukas Straub <lukasstraub2@web.de> | 2021-07-04 18:14:44 +0200 |
---|---|---|
committer | Juan Quintela <quintela@trasno.org> | 2021-11-03 09:39:31 +0100 |
commit | e5fdf920964b65678798960d8b3a55453c2e9094 (patch) | |
tree | 97f21ab4672bcb6ea1516fa6519bb756e934bb9f /migration/ram.c | |
parent | 2b9f6bf36c7483a07e45cc20cb0bb794769fb6d1 (diff) |
colo: Don't dump colo cache if dump-guest-core=off
One might set dump-guest-core=off to make coredumps smaller and
still allow to debug many qemu bugs. Extend this option to the colo
cache.
Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/ram.c')
-rw-r--r-- | migration/ram.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/migration/ram.c b/migration/ram.c index f5d39db4e4..847af461f2 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -56,6 +56,8 @@ #include "multifd.h" #include "sysemu/runstate.h" +#include "hw/boards.h" /* for machine_dump_guest_core() */ + #if defined(__linux__) #include "qemu/userfaultfd.h" #endif /* defined(__linux__) */ @@ -3542,6 +3544,10 @@ int colo_init_ram_cache(void) } return -errno; } + if (!machine_dump_guest_core(current_machine)) { + qemu_madvise(block->colo_cache, block->used_length, + QEMU_MADV_DONTDUMP); + } } } |