On 08/01/2015 05:40 AM, Paolo Bonzini wrote:
On 31/07/2015 20:11, Jason J. Herne wrote:
Doh! Yep :). This problem is an artifact of moving the timer_mod from
cpu_throttle_thread into cpu_throttle_timer_tick. I'll have to go back
to the review comments and look at why that was done.
So, we
On 31/07/2015 20:11, Jason J. Herne wrote:
>>>
>>
>> Doh! Yep :). This problem is an artifact of moving the timer_mod from
>> cpu_throttle_thread into cpu_throttle_timer_tick. I'll have to go back
>> to the review comments and look at why that was done.
>
> So, we made that change in v3 to elimi
On 07/31/2015 01:42 PM, Jason J. Herne wrote:
On 07/31/2015 01:16 PM, Paolo Bonzini wrote:
On 31/07/2015 19:12, Jason J. Herne wrote:
Throttle ratio is relative to CPU_THROTTLE_TIMESLICE. Take a look at how
throttle_ratio is used in the calculation:
long sleeptime_ms = (long)(throttle_ra
On 07/31/2015 01:16 PM, Paolo Bonzini wrote:
On 31/07/2015 19:12, Jason J. Herne wrote:
Throttle ratio is relative to CPU_THROTTLE_TIMESLICE. Take a look at how
throttle_ratio is used in the calculation:
long sleeptime_ms = (long)(throttle_ratio * CPU_THROTTLE_TIMESLICE);
A value of 1 me
On 31/07/2015 19:12, Jason J. Herne wrote:
>>
>>
>
> Throttle ratio is relative to CPU_THROTTLE_TIMESLICE. Take a look at how
> throttle_ratio is used in the calculation:
>
> long sleeptime_ms = (long)(throttle_ratio * CPU_THROTTLE_TIMESLICE);
>
> A value of 1 means we sleep the same amount of
On 07/23/2015 05:59 AM, Paolo Bonzini wrote:
On 16/07/2015 16:21, Jason J. Herne wrote:
1. Using atomic operations to manage throttle_percentage. I'm not sure
where atomics are applicable here. If this is still a concern hopefully
someone can explain.
I would use atomic_read/atomic_set in cp
On 16/07/2015 16:21, Jason J. Herne wrote:
> 1. Using atomic operations to manage throttle_percentage. I'm not sure
> where atomics are applicable here. If this is still a concern hopefully
> someone can explain.
I would use atomic_read/atomic_set in cpu_throttle_set,
cpu_throttle_stop, cpu_thr
On 07/15/2015 08:54 AM, Paolo Bonzini wrote:
On 15/07/2015 14:40, Jason J. Herne wrote:
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
On 15/07/2015 14:40, Jason J. Herne wrote:
>>> 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
On 07/13/2015 11:14 AM, Paolo Bonzini wrote:
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
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_TIMESLI
On 07/02/2015 12:43 PM, Paolo Bonzini wrote:
On 02/07/2015 18:36, Jason J. Herne wrote:
+static void cpu_throttle_thread(void *opaque)
+{
+double pct = (double)throttle_percentage/100;
+double throttle_ratio = pct / (1 - pct);
+long sleeptime_ms = (long)(throttle_ratio * CPU_THROTT
* Paolo Bonzini (pbonz...@redhat.com) wrote:
>
>
> On 02/07/2015 18:36, Jason J. Herne wrote:
> > +static void cpu_throttle_thread(void *opaque)
> > +{
> > +double pct = (double)throttle_percentage/100;
> > +double throttle_ratio = pct / (1 - pct);
> > +long sleeptime_ms = (long)(thro
Am 02.07.2015 um 18:36 schrieb Jason J. Herne:
> Provide a method to throttle guest cpu execution. CPUState is augmented with
> timeout controls and throttle start/stop functions. To throttle the guest cpu
> the caller simply has to call the throttle set function and provide a
> percentage
> of th
On 02/07/2015 18:36, Jason J. Herne wrote:
> +static void cpu_throttle_thread(void *opaque)
> +{
> +double pct = (double)throttle_percentage/100;
> +double throttle_ratio = pct / (1 - pct);
> +long sleeptime_ms = (long)(throttle_ratio * CPU_THROTTLE_TIMESLICE);
> +
> +if (!throttl
Provide a method to throttle guest cpu execution. CPUState is augmented with
timeout controls and throttle start/stop functions. To throttle the guest cpu
the caller simply has to call the throttle set function and provide a percentage
of throttle time.
Signed-off-by: Jason J. Herne
Reviewed-by:
16 matches
Mail list logo