[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [v8 08/14] migration: Add the core code of multi-thread
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [v8 08/14] migration: Add the core code of multi-thread compression |
Date: |
Thu, 07 May 2015 15:02:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
On 15/04/2015 11:26, Liang Li wrote:
> + if (ret != RAM_SAVE_CONTROL_NOT_SUPP) {
> + if (ret != RAM_SAVE_CONTROL_DELAYED) {
> + if (bytes_xmit > 0) {
> + acct_info.norm_pages++;
I don't think you can mix non-atomic and atomic increments like
this---or if you can, you really should document why.
Perhaps you can add a counter to the CompressParam struct, and sum all
counters in norm_mig_pages_transferred/norm_mig_bytes_transferred (the
latter probably should just call norm_mig_pages_transferred)?
Paolo
> + } else if (bytes_xmit == 0) {
> + acct_info.dup_pages++;
> + }
> + }
- Re: [Qemu-devel] [v8 08/14] migration: Add the core code of multi-thread compression,
Paolo Bonzini <=