On 06/03/2015 03:12 AM, Juan Quintela wrote:
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
>index 39f0f19..9d16e6a 100644
>--- a/include/qom/cpu.h
>+++ b/include/qom/cpu.h
>@@ -310,6 +310,11 @@ struct CPUState {
>      uint32_t can_do_io;
>      int32_t exception_index; /* used by m68k TCG */
>
>+    /* vcpu throttling controls */
>+    QEMUTimer *throttle_timer;
>+    bool throttle_timer_stop;
>+    float throttle_ratio;
>+
I think that if we go this way, we can have a single throotling thread
that do a for loop for each vcpu.  As a bonus, we got a single timer,
and single bool and a single throotle_ratio (i.e. it don't need to be on
the cpu struct).  Being a global will don't matter because we are
requiring the iothread anyways.


Juan,

I like this idea. I'll work up another patch set :).

--
-- Jason J. Herne (jjhe...@linux.vnet.ibm.com)


Reply via email to