Re: [Qemu-block] [PATCH] util/async: use atomic_mb_set in qemu_bh_cancel

2017-11-07 Thread Paolo Bonzini
On 07/11/2017 16:09, Sergio Lopez wrote: > Commit b7a745d added a qemu_bh_cancel call to the completion function > as an optimization to prevent it from unnecessarily rescheduling itself. > > This completion function is scheduled from worker_thread, after setting > the state of a

[Qemu-block] [PATCH] util/async: use atomic_mb_set in qemu_bh_cancel

2017-11-07 Thread Sergio Lopez
Commit b7a745d added a qemu_bh_cancel call to the completion function as an optimization to prevent it from unnecessarily rescheduling itself. This completion function is scheduled from worker_thread, after setting the state of a ThreadPoolElement to THREAD_DONE. This was considered to be safe,