]> git.proxmox.com Git - mirror_qemu.git/commit
migration: Use atomic ops properly for page accountings
authorPeter Xu <peterx@redhat.com>
Tue, 11 Oct 2022 21:55:51 +0000 (17:55 -0400)
committerJuan Quintela <quintela@redhat.com>
Thu, 15 Dec 2022 09:30:37 +0000 (10:30 +0100)
commit23b7576d7879cdc93e3328e1a9228e8843780012
treeef2bd156267ac39a812f728e54d7a17fcd4337bf
parentf3321554ef7e3adc3be6f697185d3bd50d60e30e
migration: Use atomic ops properly for page accountings

To prepare for thread-safety on page accountings, at least below counters
need to be accessed only atomically, they are:

        ram_counters.transferred
        ram_counters.duplicate
        ram_counters.normal
        ram_counters.postcopy_bytes

There are a lot of other counters but they won't be accessed outside
migration thread, then they're still safe to be accessed without atomic
ops.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/migration.c
migration/multifd.c
migration/ram.c
migration/ram.h