Paolo Bonzini <pbonz...@redhat.com> 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) {
>> +            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?

If tcg_current_rr_cpu is still NULL when you read the second time (i.e.
hasn't changed) then we'll exit the loop and your don't really need to
do anything as your outside the vCPU TCG code.

>
> 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
>

That is this patch isn't it?


> - extract handle_icount_deadline

Sure I can do that separately.

>
> - then everything else in patches 13 and 14, squashed

I was wondering after I posted if I should split all the current_cpu
stuff out as I don't think I need it straight away...

>
> Paolo


--
Alex Bennée

Reply via email to