Re: [Qemu-devel] [RFC v3 13/19] tcg: rename tcg_current_cpu to tcg_current_rr_cpu

2016-06-07 Thread Alex Bennée
Alex Bennée writes: > ..and make the definition local to cpus. In preparation for MTTCG the > concept of a global tcg_current_cpu will no longer make sense. However > we still need to keep track of it in the single-threaded case to be able > to exit quickly when required. > > qemu_cpu_kick_no_ha

Re: [Qemu-devel] [RFC v3 13/19] tcg: rename tcg_current_cpu to tcg_current_rr_cpu

2016-06-06 Thread Paolo Bonzini
On 06/06/2016 19:26, Alex Bennée wrote: > > Paolo Bonzini writes: > >> On 06/06/2016 18:05, Alex Bennée wrote: - 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 >>> >>> That is this patch isn't it? >> >> T

Re: [Qemu-devel] [RFC v3 13/19] tcg: rename tcg_current_cpu to tcg_current_rr_cpu

2016-06-06 Thread Alex Bennée
Paolo Bonzini writes: > On 06/06/2016 18:05, Alex Bennée wrote: >> > - 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 >> >> That is this patch isn't it? > > There's some renaming left in patch 14 which complicat

Re: [Qemu-devel] [RFC v3 13/19] tcg: rename tcg_current_cpu to tcg_current_rr_cpu

2016-06-06 Thread Paolo Bonzini
On 06/06/2016 18:05, Alex Bennée wrote: > > - 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 > > That is this patch isn't it? There's some renaming left in patch 14 which complicates things. Paolo >> > - extra

Re: [Qemu-devel] [RFC v3 13/19] tcg: rename tcg_current_cpu to tcg_current_rr_cpu

2016-06-06 Thread Paolo Bonzini
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); > +} >

Re: [Qemu-devel] [RFC v3 13/19] tcg: rename tcg_current_cpu to tcg_current_rr_cpu

2016-06-06 Thread Alex Bennée
Paolo Bonzini writes: > 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) { >> +

[Qemu-devel] [RFC v3 13/19] tcg: rename tcg_current_cpu to tcg_current_rr_cpu

2016-06-03 Thread Alex Bennée
..and make the definition local to cpus. In preparation for MTTCG the concept of a global tcg_current_cpu will no longer make sense. However we still need to keep track of it in the single-threaded case to be able to exit quickly when required. qemu_cpu_kick_no_halt() moves and becomes qemu_cpu_ki