]> git.ipfire.org Git - thirdparty/qemu.git/commit
migration: Use non-atomic ops for clear log bitmap
authorPeter Xu <peterx@redhat.com>
Tue, 4 Oct 2022 18:24:29 +0000 (14:24 -0400)
committerJuan Quintela <quintela@redhat.com>
Mon, 21 Nov 2022 10:58:10 +0000 (11:58 +0100)
commitcedb70eafb4fd51d9c714981509d97b9f4055be5
treea230b94aab982dab7966e935680acd1ac408e229
parentafed4273b5c9438dfbaa0b4762d0433f295ccdc1
migration: Use non-atomic ops for clear log bitmap

Since we already have bitmap_mutex to protect either the dirty bitmap or
the clear log bitmap, we don't need atomic operations to set/clear/test on
the clear log bitmap.  Switching all ops from atomic to non-atomic
versions, meanwhile touch up the comments to show which lock is in charge.

Introduced non-atomic version of bitmap_test_and_clear_atomic(), mostly the
same as the atomic version but simplified a few places, e.g. dropped the
"old_bits" variable, and also the explicit memory barriers.

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>
include/exec/ram_addr.h
include/exec/ramblock.h
include/qemu/bitmap.h
util/bitmap.c