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

2017-11-07 Thread Sergio Lopez Pascual
Hi Fam, On Wed, Nov 8, 2017 at 2:29 AM, Fam Zheng wrote: >>I/O thread | worker thread > > Isn't the left column "workder thread" and the right one "I/O thread"? > Yes, you're right. I'm going to switch them back. Thanks, Sergio.

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

2017-11-07 Thread Fam Zheng
Hi Sergio, On Tue, 11/07 23:54, 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 Threa

[Qemu-devel] [PATCH v2] 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, a