21.05.2021 18:02, Paolo Bonzini wrote:
On 20/05/21 17:34, Vladimir Sementsov-Ogievskiy wrote:
By adding acquire/release pairs, we ensure that .ret and .error_is_read
fields are written by block_copy_dirty_clusters before .finished is true.
As I already said, please, can we live with one mutex for now? finished, ret,
error_is_read, all these variables are changing rarely. I doubt that
performance is improved by these atomic operations. But complexity of the
architecture increases exponentially.
The problem is that these are used outside coroutines.
Hmm. I think, if some bit of block-copy is not in a coroutine yet, it's simple
to move it to coroutine
load-acquire/store-release is the simplest way to handle a "finished" flag
really.
Paolo
--
Best regards,
Vladimir