[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 05/12] migration: show the statistics of compres
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH 05/12] migration: show the statistics of compression |
Date: |
Mon, 16 Jul 2018 20:01:22 +0100 |
User-agent: |
Mutt/1.10.0 (2018-05-17) |
* Xiao Guangrong (address@hidden) wrote:
>
>
> On 06/14/2018 12:25 AM, Dr. David Alan Gilbert wrote:
> }
> > > static void migration_bitmap_sync(RAMState *rs)
> > > @@ -1412,6 +1441,9 @@ static void flush_compressed_data(RAMState *rs)
> > > qemu_mutex_lock(&comp_param[idx].mutex);
> > > if (!comp_param[idx].quit) {
> > > len = qemu_put_qemu_file(rs->f, comp_param[idx].file);
> > > + /* 8 means a header with RAM_SAVE_FLAG_CONTINUE. */
> > > + compression_counters.reduced_size += TARGET_PAGE_SIZE - len
> > > + 8;
> >
> > I think I'd rather save just len+8 rather than than the subtraction.
> >
> Hmmmmmm, is this what you want?
> compression_counters.reduced_size += len - 8;
>
> Then calculate the real reduced size in populate_ram_info() where we return
> this
> info to the user:
> info->compression->reduced_size = compression_counters.pages *
> PAGE_SIZE - compression_counters.reduced_size;
>
> Right?
I mean I'd rather see the actual size presented to the user rather than
the saving compared to uncompressed.
Dave
> > I think other than that, and Eric's comments, it's OK.
> >
>
> Thanks.
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
- Re: [Qemu-devel] [PATCH 05/12] migration: show the statistics of compression,
Dr. David Alan Gilbert <=