Re: [Qemu-devel] [PATCH 3/3] tcg: signal-free qemu_cpu_kick

2015-08-18 Thread Paolo Bonzini
On 17/08/2015 11:31, Richard Henderson wrote: > On 08/14/2015 06:15 AM, Paolo Bonzini wrote: >> +atomic_mb_set(¤t_cpu, cpu); > ... >> +cpu_exit(atomic_rcu_read(¤t_cpu)); > > Mixing java and rcu style sync to the same data structure? Well, I usually read rcu_read as CONSUME, rcu_set

Re: [Qemu-devel] [PATCH 3/3] tcg: signal-free qemu_cpu_kick

2015-08-17 Thread Richard Henderson
On 08/14/2015 06:15 AM, Paolo Bonzini wrote: > +atomic_mb_set(¤t_cpu, cpu); ... > +cpu_exit(atomic_rcu_read(¤t_cpu)); Mixing java and rcu style sync to the same data structure? > + * ensure tcg_exit_req is read before exit_request > + *

[Qemu-devel] [PATCH 3/3] tcg: signal-free qemu_cpu_kick

2015-08-14 Thread Paolo Bonzini
Signals are slow and do not exist on Win32. It is not much more complicated to use memory barriers (which we already need anyway on Windows!) and set the existing flags in the iothread. qemu_cpu_kick_thread is not used anymore on TCG, since the TCG thread is never outside usermode while the CPU i