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

Re: [RFC] DVFS and Thermal management subsystem proposal


  • To: Oleksii Moisieiev <Oleksii_Moisieiev@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 7 Jul 2022 13:55:30 +0200
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RMS5ols3p0aQi8ODPiMUrqXvEneE56yD24DzW4xORYI=; b=ithDGRj/zeg4dKKX9wJyQadHY/HkkjSwANyx5txyG5ajaLEDxc6eXPY8kYlhr7P/rrKuyL9oezQMl8tNSzYU/xCIQPsgJ9ifzgA4p8ScQaIlY34Q8yZ3IhIBmo+T5hvGSveI7jUkyXIt/McCIB+1NbHjIXu1txU3ckuczkJBPM9HBWX3ocmH5ultv16J/ZdclVJsgpi/KsX3wQXF1lm8nz8gCrxoWAjHORimuPsQf2j4x9+oua17TPxyYMOuY16noFv2BjvpLORDpZipiu5fwuECJs2xogSygzkl8xa21QeabOxj5yjS63MhyUgAiBWEQZNjdgstDBIIq4r3bDLJOw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h12FesejtBGC6PoazOtW5eu2kDUkyB1BTFmA7StogqGudLhVTmHK7DUKfzA9m//Bl/3jlKXNJ3ASHi6TlowglcsaaOQ+JnEjDyO/a0PDLQNU6XpWz9wOnDCh+ormqqG2G2/eeywjF6stN57VtoR2oUEPPzNvhsyuc0UZBwCnarvdCOd+MSs4EyNkhSY8LXvysoe2qB0NBDG89NEZWloquQE3yovPs5tVzxQregWwwiJVa0Rrr73Cmj3Kv6JzckH1XbyBA+uPtYT33nnC7fY0ujxZdGhoB+zgM7kRdih2mX7Fzmeypzb+lKahJbeH6W21PUH+HITUk8lzyEixlcHO5w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Juergen Gross <jgross@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Nick Rosbrook <rosbrookn@xxxxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 07 Jul 2022 11:55:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.07.2022 12:35, Oleksii Moisieiev wrote:
> # Synopsis
> This document is intended to describe the design of the thermal based cpu
> throttling in virtualized environments. The goal is to provide generic thermal
> management subsystem, which should work with existing cpufreq subsystem in XEN
> and could be used on various architectures and hardware.

Looks quite plausible to me, just two questions:

> # Cpufreq subsystem in XEN
> 
> ## Brief overview
> 
>    Governors
> +--------------------+
> | +----------------+ |  struct cpufreq_governor {
> | |  ondemand      | |      .name
> | +----------------+ |      .governor
> | +----------------+ |      .handle_option
> | |  powersave     | |  }
> | +----------------+ |
> | +----------------+ |                              +----------------------+
> | |  performance   | |->cpufreq_register_governor() | +-------------------+|
> | +----------------+ |                              | |  cpufreq_dev_drv  ||
> | +----------------+ |   cpufreq_register_driver()->| +-------------------+|
> | |  userspace     | |                              | +-------------------+|
> | +----------------+ |                              | |     ...           ||
> | +----------------+ |                              | +-------------------+|
> | |  ...           | |    struct cpufreq_driver {   +----------------------+
> | +----------------+ |       .init                  +----------------------+
> +--------------------+       .verify                |    Hardware          |
>                              .setpolicy             +----------------------+
>                              .update
>                              .target
>                              .get
>                              .getavg
>                              .exit
>                           }
> 
> Cpufreq subsystem consists of 2 parts:
> 1) Cpufreq governor, which should be registered using 
> cpufreq_register_governor
> call;
> 2) Cpufreq driver, which provides access to the hardware should be registered
> using cpufreq_register_driver call.
> 
> ## Hardware drivers
> 
> There are two Cpufreq hardware drivers implemented by us (see Appendix 1 and
> Appendix 2) to provide support for Rcar-3 and i.MX8 boards. Those drivers are
> designed to support thermal throttling subsystem. They are going to be the 
> part
> of the contribution package.

Are these drivers also intended to act as "ordinary" cpufreq drivers,
i.e. controlled by cpufreq governors instead of thermal ones?

> # XEN Dynamic Thermal management design
> 
> ## Synopsis
> 
> Introducing the design of the Dynamic Thermal Management for Xen hypervisor.
> This feature is an enhancement of the Xen DVFS feature and will allow system
> admin to configure different thermal governors which will perform CPU
> throttling, based on the CPU cores temperature and thermal configuration.
> 
> ## Top level design.
> 
> +-----------------------------------------------+
> |    XEN                                        |
> |              +-------------------+            |
> |              |      Thermal      |            |
> |       +----->|     Governor      |            |
> |       |      +---------|---------+            |
> |       |                |                      |
> |       |                +-------+              |
> |       |                        |              |
> |  +------------------+  +------------------+   |
> |  |   Thermal        |  |    Cpufreq       |   |
> |  |   Driver         |  |                  |   |
> |  +------------------+  +------------------+   |
> |                                               |
> +-----------------------------------------------+
>                     ^
>                     |
>                     |
>            +--------v--------+
>            |                 |
>            |    Hardware     |
>            |                 |
>            +-----------------+
> 
> 
> ## Thermal management subsystem design in XEN
> 
>  +------------------+
>  | +--------------+ |
>  | |  powersave   | |               struct thermal_governor {
>  | +--------------+ |                   .name
>  | +--------------+ |                   .governor
>  | |   stepwise   | |<------------+     .handle_option
>  | +--------------+ |             | }
>  | +--------------+ |             |
>  | |     ...      | |             |
>  | +--------------+ |             |
>  +------------------+             v
>           +----------------->register_thermal_governor()
>           |
> +---------v--------+                         Polling temperature
> |   dyn_thermal    |<--------+             +--------------------+
> +------------------+         +------------>|  polling_handler() |
>                                            +--------------------+

Polling (only)?

Jan



 


Rackspace

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