All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <JBeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: "Fredy P." <fredy.pulido@savoirfairelinux.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] CPU frequency throttling based on the temperature
Date: Wed, 24 Jul 2019 15:51:07 +0000	[thread overview]
Message-ID: <d6ad63eb-8171-18a3-2e5a-4ee79b08b7bd@suse.com> (raw)
In-Reply-To: <20190724153528.xgpzq6ta4vrxpitq@Air-de-Roger>

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	other threads:[~2019-07-24 15:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24 14:01 [Xen-devel] CPU frequency throttling based on the temperature Fredy P.
2019-07-24 14:36 ` Roger Pau Monné
2019-07-24 14:47   ` Jan Beulich
2019-07-24 15:35     ` Roger Pau Monné
2019-07-24 15:51       ` Jan Beulich [this message]
2019-07-24 17:10       ` Fredy P.
2019-07-24 15:25   ` Fredy P.
2019-07-24 15:41     ` Roger Pau Monné
2019-07-25 12:44       ` Fredy P.
2019-07-25 12:54         ` Jan Beulich
2019-07-25 13:07           ` Fredy P.
2019-07-25 13:13           ` Roger Pau Monné
2019-07-25 13:29             ` Fredy P.
2019-07-25 13:47               ` Roger Pau Monné
2019-07-25 13:59                 ` Jan Beulich
2019-07-25 14:17                   ` Roger Pau Monné
2019-07-25 14:31                     ` Jan Beulich
2019-07-25 15:34                       ` Roger Pau Monné
2019-07-25 16:29                         ` Fredy P.
2019-07-25 13:43             ` Jan Beulich
2019-07-25 14:07               ` Roger Pau Monné
2019-07-25 14:27                 ` Fredy P.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d6ad63eb-8171-18a3-2e5a-4ee79b08b7bd@suse.com \
    --to=jbeulich@suse.com \
    --cc=fredy.pulido@savoirfairelinux.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.