qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 1/5] cpu: Provide vcpu throttling interface


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v4 1/5] cpu: Provide vcpu throttling interface
Date: Mon, 13 Jul 2015 17:14:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1


On 13/07/2015 16:43, Jason J. Herne wrote:
>>>
>>> +    CPU_FOREACH(cpu) {
>>> +        async_run_on_cpu(cpu, cpu_throttle_thread, NULL);
>>> +    }
>>> +
>>> +    timer_mod(throttle_timer,
>>> qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_RT) +
>>> +                                   CPU_THROTTLE_TIMESLICE);
>>> +}
>>
>> This could cause callbacks to pile up I think.  David, do you have any
>> idea how to fix it?
> 
> I'm not sure how callbacks can pile up here. If the vcpus are running
> then their thread's will execute the callbacks. If they are not running
> then the use of QEMU_CLOCK_VIRTUAL_RT will prevent the callbacks from
> stacking because the timer is not running, right?

Couldn't the iothread starve the VCPUs?  They need to take the iothread
lock in order to process the callbacks.

Paolo



reply via email to

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