On 24.07.2019 17:35, Roger Pau Monné  wrote:
> On Wed, Jul 24, 2019 at 02:47:19PM +0000, Jan Beulich wrote:
>> On 24.07.2019 16:36, Roger Pau Monné  wrote:
>>> On Wed, Jul 24, 2019 at 10:01:40AM -0400, Fredy P. wrote:
>>>> My objective is to get CPU frequency throttling based on the
>>>> temperature in a Xen/OpenWRT(dom0) system.
>>>>
>>>> After to expend hours reading Xen's wiki, mailing list archives,
>>>> commits, googling and asking in the IRC channel I'm coming here asking
>>>> for help because I hope there is something I miss and you could point
>>>> it.
>>>
>>> That seems like an interesting project, I guess your focus is some
>>> kind of low-power device? (not that it matters much for the context of
>>> the question).
>>>
>>> Anyway, thanks for your interest on Xen and ways to improve it!
>>>
>>>> My first question is, there is any way to do CPU frequency throttling
>>>> based on the temperature?
>>>
>>> I don't think there's such governor ATM implemented in Xen, the more
>>> that I think all frequency throttling is supposed to be done by dom0
>>> using xenpm, but not Xen itself?
>>
>> The original authors of P- and C-state handling look to have
>> assumed that T-state handling should work similarly, i.e. by
>> Dom0 uploading relevant data. See public/platform.h starting at
>>
>> #define XENPF_set_processor_pminfo      54
>>
>> where in particular you'll find
>>
>> #define XEN_PM_TX   2
> 
> OK, I assumed the question was about reading the CPU temperature and
> then changing the frequency of the CPU, but not related to T-states.

Well, except that iirc T-states are (were) a means to control this via
some governor, rather than "manually".

Obtaining the CPU temperature should work (perhaps with some tweaks)
the same way under Xen or on bare hardware. I also don't think hwmon
devices get unintentionally "unexposed" when running under Xen. Their
drivers may be written in ways that make them not work properly when
run under Xen, though.

> FWIW, there's an Intel article about T-states from 2013:
> 
> https://software.intel.com/en-us/blogs/2013/10/15/c-states-p-states-where-the-heck-are-those-t-states
> 
> That claims T-states are basically dead, and no modern processors
> support them.

Interesting; I wasn't aware of this.

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to