[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compressionan
From: |
jiang.biao2 |
Subject: |
Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compressionand decompression errors |
Date: |
Mon, 19 Mar 2018 15:56:18 +0800 (CST) |
Hi, guangrong
> @@ -1051,11 +1052,13 @@ static int do_compress_ram_page(QEMUFile *f, z_stream
> *stream, RAMBlock *block,
> {
> RAMState *rs = ram_state;
> int bytes_sent, blen;
> - uint8_t *p = block->host + (offset & TARGET_PAGE_MASK);
> + uint8_t buf[TARGET_PAGE_SIZE], *p;
> + p = block->host + (offset & TARGET_PAGE_MASK);
> bytes_sent = save_page_header(rs, f, block, offset |
> RAM_SAVE_FLAG_COMPRESS_PAGE);
> - blen = qemu_put_compression_data(f, stream, p, TARGET_PAGE_SIZE);
> + memcpy(buf, p, TARGET_PAGE_SIZE);
> + blen = qemu_put_compression_data(f, stream, buf, TARGET_PAGE_SIZE);
Memory copy operation for every page to be compressed is not cheap, especially
when the page number is huge, and it may be not necessary for pages never
updated during migration.
Is there any possibility that we can distinguish the real compress/decompress
errors from those being caused by source VM updating? Such as the return
value of qemu_uncompress(distinguish Z_DATA_ERROR and other error codes
returned by inflate())?
Jiang
Regards,
[Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors, guangrong . xiao, 2018/03/13
- Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors, Dr. David Alan Gilbert, 2018/03/15
- Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compressionand decompression errors,
jiang.biao2 <=
- Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors, Peter Xu, 2018/03/21
- Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors, Xiao Guangrong, 2018/03/22
- Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors, Peter Xu, 2018/03/27
- Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors, Xiao Guangrong, 2018/03/27
- Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors, Peter Xu, 2018/03/27
- Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors, Xiao Guangrong, 2018/03/27
- Re: [Qemu-devel] [PATCH 3/8] migration: support to detectcompression and decompression errors, jiang.biao2, 2018/03/27
- Re: [Qemu-devel] [PATCH 3/8] migration: support to detectcompression and decompression errors, Xiao Guangrong, 2018/03/27
- Re: [Qemu-devel] [PATCH 3/8] migration: support to detectcompression and decompression errors, Peter Xu, 2018/03/27