qemu-devel
[Top][All Lists]
Advanced

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

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


From: Jason J. Herne
Subject: Re: [Qemu-devel] [PATCH 1/2] cpu: Provide vcpu throttling interface
Date: Wed, 03 Jun 2015 10:35:36 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

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 (address@hidden)




reply via email to

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