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

Re: [Xen-devel] CPU frequency throttling based on the temperature


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Wed, 24 Jul 2019 15:51:07 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9qPZXh2J1krMD3B2RRzwb9HxBzU68GtYmQvv6mEJYAg=; b=Tgl80HK+F3bPzzZHBOfny6Z2ZNMAJthObvSjUNoWIDnRoSAge14yGJBUriE442KUN6gesUyxIMF/Zv+nTdBZCZu/9yGZI3EinclXJ2mTG1D34QjDpg0x1rGdGluQQeW1XG/kZTze3QYXM/jcr80I3eH2mEhp7QUnaagBVG+LKc0hvVSLxUTQqr1BjP+oWxzKW7ioW4PpdXSMNRC08mUjErRQ2TWcoE2cPhZewcSxVQ2/2kO4CyP5OCbCEbvX2Y9WVmTt7d6yNyN60VP/BUksKBwbb2/w0cdTMzi29qTEmoo+ckAC/G/7vFsduTmtzAbT80HqsIM2aoeG1wz3ostiOw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aulYHt1M6CxNjE5NvNy8yFmhlxI394Yia/FTAfrWudpP+jq0sOLJGIANdCiuNxDUVOlLFL21MwzQ7tklyOl8sqh9Sd8JJWgivr1AfPYEclNWBIqAGSfboWQzfBt7X7tFdPwoNsOYUMpgRnpfoQ0yrwhTohk12rb3qzNmNyYrBJupw+EaAFx6Jbz1c1Q//ON0Mslqt7f2otLSbPEsk47vllAu2YqxyQyCSuR1SOdsoG/tmDGR9t/mcqX78SR7L2yNG2rvhD048phAyMswH/c/y9M5iqDP71HPYMWloVOw6Ly4j7STYdUONFZrUFYj4ADtFnVxrFWEtwxwv0K9/EnqkA==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: "Fredy P." <fredy.pulido@xxxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 24 Jul 2019 15:51:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVQiidALk+x0uDw0GmzsE7VlPwJabZ1pPngAACeACAAA3tToAAA+cA
  • Thread-topic: [Xen-devel] CPU frequency throttling based on the temperature

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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.