diff options
| author | Peter Xu | 2022-10-04 20:24:29 +0200 |
|---|---|---|
| committer | Juan Quintela | 2022-11-21 11:58:10 +0100 |
| commit | cedb70eafb4fd51d9c714981509d97b9f4055be5 (patch) | |
| tree | a230b94aab982dab7966e935680acd1ac408e229 /include/qemu | |
| parent | migration: Disallow postcopy preempt to be used with compress (diff) | |
| download | qemu-cedb70eafb4fd51d9c714981509d97b9f4055be5.tar.gz qemu-cedb70eafb4fd51d9c714981509d97b9f4055be5.tar.xz qemu-cedb70eafb4fd51d9c714981509d97b9f4055be5.zip | |
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>
Diffstat (limited to 'include/qemu')
| -rw-r--r-- | include/qemu/bitmap.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h index 82a1d2f41f..3ccb00865f 100644 --- a/include/qemu/bitmap.h +++ b/include/qemu/bitmap.h @@ -253,6 +253,7 @@ void bitmap_set(unsigned long *map, long i, long len); void bitmap_set_atomic(unsigned long *map, long i, long len); void bitmap_clear(unsigned long *map, long start, long nr); bool bitmap_test_and_clear_atomic(unsigned long *map, long start, long nr); +bool bitmap_test_and_clear(unsigned long *map, long start, long nr); void bitmap_copy_and_clear_atomic(unsigned long *dst, unsigned long *src, long nr); unsigned long bitmap_find_next_zero_area(unsigned long *map, |
