On 03/06/2016 22:40, Alex Bennée wrote: > +/* Kick the currently round-robin scheduled vCPU */ > +static void qemu_cpu_kick_rr_cpu(void) > +{ > + CPUState *cpu; > + do { > + cpu = atomic_mb_read(&tcg_current_rr_cpu); > + if (cpu) { > + cpu_exit(cpu); > + } > + } while (cpu != atomic_mb_read(&tcg_current_rr_cpu)); > +}
Interesting way to get rid of the global exit_request. I like it, but could you get stuck on NULL tcg_current_rr_cpu now? I think you should redo these two patches like this: - rename qemu_cpu_kick_no_halt to qemu_cpu_kick_rr_cpu and tcg_current_cpu to tcg_current_rr_cpu; possibly move functions around - extract handle_icount_deadline - then everything else in patches 13 and 14, squashed Paolo