Re: [PATCH v3] migration/xbzrle: add encoding rate

2020-06-05 Thread Dr. David Alan Gilbert
* Wei Wang (wei.w.w...@intel.com) wrote: > On 06/05/2020 12:57 AM, Richard Henderson wrote: > > On 6/4/20 3:27 AM, Wei Wang wrote: > > > On 06/04/2020 05:38 PM, Dr. David Alan Gilbert wrote: > > > > Hmm OK; I'll admit to not liking NaN/Inf in output. > > > > > > > > Dave > > > > > > > OK. To

Re: [PATCH v3] migration/xbzrle: add encoding rate

2020-06-04 Thread Wei Wang
On 06/05/2020 12:57 AM, Richard Henderson wrote: On 6/4/20 3:27 AM, Wei Wang wrote: On 06/04/2020 05:38 PM, Dr. David Alan Gilbert wrote: Hmm OK; I'll admit to not liking NaN/Inf in output. Dave OK. To deal with the reported issue, how about using FLT_MAX (as opposed to UINT64_MAX or inf):

Re: [PATCH v3] migration/xbzrle: add encoding rate

2020-06-04 Thread Richard Henderson
On 6/4/20 3:27 AM, Wei Wang wrote: > On 06/04/2020 05:38 PM, Dr. David Alan Gilbert wrote: >> Hmm OK; I'll admit to not liking NaN/Inf in output. >> >> Dave >> > > OK. To deal with the reported issue, how about using FLT_MAX (as opposed to > UINT64_MAX or inf): > xbzrle_counters.encoding_rate =

Re: [PATCH v3] migration/xbzrle: add encoding rate

2020-06-04 Thread Wei Wang
On 06/04/2020 05:38 PM, Dr. David Alan Gilbert wrote: * Richard Henderson (richard.hender...@linaro.org) wrote: On 6/3/20 7:58 PM, Wei Wang wrote: It is possible that encoded_size==0, but unencoded_size !=0. For example, a page is written with the same data that it already has. That really

Re: [PATCH v3] migration/xbzrle: add encoding rate

2020-06-04 Thread Dr. David Alan Gilbert
* Richard Henderson (richard.hender...@linaro.org) wrote: > On 6/3/20 7:58 PM, Wei Wang wrote: > > It is possible that encoded_size==0, but unencoded_size !=0. For example, > > a page is written with the same data that it already has. > > That really contains 0 bytes? > Not even the ones that say

Re: [PATCH v3] migration/xbzrle: add encoding rate

2020-06-04 Thread Wei Wang
On 06/04/2020 11:22 AM, Richard Henderson wrote: On 6/3/20 7:58 PM, Wei Wang wrote: It is possible that encoded_size==0, but unencoded_size !=0. For example, a page is written with the same data that it already has. That really contains 0 bytes? Not even the ones that say "same data"? Yes.

Re: [PATCH v3] migration/xbzrle: add encoding rate

2020-06-03 Thread Richard Henderson
On 6/3/20 7:58 PM, Wei Wang wrote: > It is possible that encoded_size==0, but unencoded_size !=0. For example, > a page is written with the same data that it already has. That really contains 0 bytes? Not even the ones that say "same data"? You certainly have a magical compression algorithm

Re: [PATCH v3] migration/xbzrle: add encoding rate

2020-06-03 Thread Wei Wang
On 06/04/2020 03:28 AM, Richard Henderson wrote: On Wed, 29 Apr 2020 at 18:54, Wei Wang wrote: +if (xbzrle_counters.pages == rs->xbzrle_pages_prev) { +xbzrle_counters.encoding_rate = 0; +} else if (!encoded_size) { +xbzrle_counters.encoding_rate =

Re: [PATCH v3] migration/xbzrle: add encoding rate

2020-06-03 Thread Richard Henderson
On Wed, 29 Apr 2020 at 18:54, Wei Wang wrote: > +if (xbzrle_counters.pages == rs->xbzrle_pages_prev) { > +xbzrle_counters.encoding_rate = 0; > +} else if (!encoded_size) { > +xbzrle_counters.encoding_rate = UINT64_MAX; > +} else { > +

Re: [PATCH v3] migration/xbzrle: add encoding rate

2020-05-07 Thread Dr. David Alan Gilbert
* Wei Wang (wei.w.w...@intel.com) wrote: > Users may need to check the xbzrle encoding rate to know if the guest > memory is xbzrle encoding-friendly, and dynamically turn off the > encoding if the encoding rate is low. > > Signed-off-by: Yi Sun > Signed-off-by: Wei Wang Queued > --- >

Re: [PATCH v3] migration/xbzrle: add encoding rate

2020-04-30 Thread Dr. David Alan Gilbert
* Wei Wang (wei.w.w...@intel.com) wrote: > Users may need to check the xbzrle encoding rate to know if the guest > memory is xbzrle encoding-friendly, and dynamically turn off the > encoding if the encoding rate is low. > > Signed-off-by: Yi Sun > Signed-off-by: Wei Wang Reviewed-by: Dr. David

[PATCH v3] migration/xbzrle: add encoding rate

2020-04-29 Thread Wei Wang
Users may need to check the xbzrle encoding rate to know if the guest memory is xbzrle encoding-friendly, and dynamically turn off the encoding if the encoding rate is low. Signed-off-by: Yi Sun Signed-off-by: Wei Wang --- migration/migration.c | 1 + migration/ram.c | 39