[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>, Fredy P. <fredy.pulido@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Thu, 25 Jul 2019 13:59:22 +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=mf7HCANgWZzXO6AbdeyOHe9Dq2tJQ/e3dyuiKJdvTZg=; b=i7tpOfGDMLVAe5wYQZDkGgVsM3EdrdBIdGvh2E/l0DdGQa1lIY9qyLMDu+AqaPdaLG//kirJjB6gRXhTlVuSa4I53ESHWdvNZIsGI/otDG+oSq5m/T8EQacq6MgOKEmC5dWG+9Kocg9Sy++bQRx1bn5r7FYZ+ZjmBHfUj1WkM1lyqtqlZ8v5QqlzT0G+m3sHULppexwFjMoxaRn+CNtA1hROdO3CC7oLpGuXdLdf/cqd5mjzsOo6T0nfZwTwgmaHI1qmH0t7Wvkh8l2tVdfZfEp0l/QHpn9JR9yYVP1PMgIlSZWK4an7vQjvy/QpVws8AyWp1RU48s5V1p3JGpaxtg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M+JJ6p2tpfga19lbhLJg+co7HK5QKGZt31JJbE7Z8dVuFnuElW0zVevCXxUMMTDbibXt1eGxO2gPmDF9k7TiVZMzsmSvo6rDUAaJDhmBsHF3uhKh2lnRJpQr6dN9icuUETgwZkMKd3ZQR2NKdiyD/oFb+cGMriFgA1lsU9c0Gv7ffG9zbgznl9xXT6r+ztA+D7RxnlyV3MxnzbHlbtUx8QA6qa0GwWZKz6CDbpjDrfrKsHp/P9sNOCB5LArGbALg7KkkTT8Ye4rVXy5NJTtlyQHVSe6LKMNDFxnBP0COSC86fhfz15Er948SIJ8rcRAaURrqUA9wb9y7ej+34ZcDQw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 25 Jul 2019 14:05:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVQu0HpijgxWKHrUqY6YxdJv9yhqbbWYdZgAAC64A=
  • Thread-topic: [Xen-devel] CPU frequency throttling based on the temperature

On 25.07.2019 15:47, Roger Pau Monné  wrote:
> On Thu, Jul 25, 2019 at 09:29:01AM -0400, Fredy P. wrote:
>> On Thu, 2019-07-25 at 15:13 +0200, Roger Pau Monné wrote:
>>> On Thu, Jul 25, 2019 at 12:54:46PM +0000, Jan Beulich wrote:
>>>> On 25.07.2019 14:44,  Fredy P.  wrote:
>>>>> On Wed, 2019-07-24 at 17:41 +0200, Roger Pau Monné wrote:
>>>>>>>> What hardware interface does thermald (or the driver in
>>>>>>>> Linux if
>>>>>>>> there's one) use to get the temperature data?
>>>>>
>>>>> In our initial POC using Xen 4.8.x we where using Linux coretemp
>>>>> driver
>>>>> reading by example /class/sys/hwmon/hwmon0/temp3_input but it got
>>>>> deprecated at commit 72e038450d3d5de1a39f0cfa2d2b0f9b3d43c6c6
>>>>
>>>> Hmm, I wouldn't call this deprecation, but a regression. I would
>>>> say we want to re-expose this leaf to Dom0, the more that the
>>>> commit also only mentions unprivileged domains. Andrew?
>>>
>>> AFAICT from the documents provided by Fredy the temperature is read
>>> from a MSR that reports the current temperature of the core on which
>>> the MSR is read from. When running on Xen this will only work
>>> correctly if dom0 is given the same vCPUs as pCPUs and those are
>>> identity pinned.
>>
>> I just want to be sure I got it correctly, by saying "When running on
>> Xen this will only work correctly if ..." means in a future
>> implementation or that right now could work if I pin this v/pCPUS?
> 
> No, right now there's no way to get this data from dom0, regardless of
> the pinning.

Of course you can, using the MSR "device" Linux optionally
provides (plus perhaps the rdmsr utility from the msr-tools
package).

> The commit you mention simply removes exposing the feature on CPUID,
> but I'm not sure whether access to the actual MSR is also forbidden. I
> think so since we do MSR white listing IIRC, and I don't seem to find
> MSR_IA32_THERM_STATUS white listed anywhere.

At least for PV we continue to let everything not specially
handled shine through - see the bottom of pv/emul-pro-op.c:read_msr().

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®.