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 <[email protected]>
Reviewed-by: Jiang Biao <[email protected]>
Signed-off-by: Xiao Guangrong <[email protected]>
Message-Id: <
20180330075128[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>