qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Alex Bennée
Subject: Re: [Qemu-devel] [RFC v3 13/19] tcg: rename tcg_current_cpu to tcg_current_rr_cpu
Date: Mon, 06 Jun 2016 17:05:32 +0100
User-agent: mu4e 0.9.17; emacs 25.0.94.5

Paolo Bonzini <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]