summary refs log tree commit diff stats
path: root/hw/lm32/lm32_boards.c
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@tencent.com>2018-03-30 15:51:20 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2018-04-25 18:04:06 +0100
commitdcaf446ebda5d87e05eb41cdbafb7ae4a7cc4a62 (patch)
tree4b798711f89fc9803ad553b521d0d26b68958351 /hw/lm32/lm32_boards.c
parent263a289ae61c8344a417a95b0142650fdff3af56 (diff)
downloadfocaccia-qemu-dcaf446ebda5d87e05eb41cdbafb7ae4a7cc4a62.tar.gz
focaccia-qemu-dcaf446ebda5d87e05eb41cdbafb7ae4a7cc4a62.zip
migration: stop compression to allocate and free memory frequently
Current code uses compress2() to compress memory which manages memory
internally, that causes huge memory is allocated and freed very
frequently

More worse, frequently returning memory to kernel will flush TLBs
and trigger invalidation callbacks on mmu-notification which
interacts with KVM MMU, that dramatically reduce the performance
of VM

So, we maintain the memory by ourselves and reuse it for each
compression

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Jiang Biao <jiang.biao2@zte.com.cn>
Signed-off-by: Xiao Guangrong <xiaoguangrong@tencent.com>
Message-Id: <20180330075128.26919-3-xiaoguangrong@tencent.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'hw/lm32/lm32_boards.c')
0 files changed, 0 insertions, 0 deletions