ACPI-based IPA implementation method, device, equipment, and storage medium

By configuring IPA-related temperature information in the ACPIDSDT table of UEFI and initializing the temperature control module, the problem of IPA technology not being able to operate under the UEFI boot operating system is solved, and effective management of computing equipment energy consumption and maximum performance is achieved.

CN118051267BActive Publication Date: 2025-04-04PHYTIUM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410051460.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-12
Publication Date
2025-04-04
Estimated Expiration
2044-01-12

AI Technical Summary

Technical Problem

In scenarios where UEFI boots the operating system, existing IPA technology cannot operate normally and cannot achieve energy consumption management of computing devices.

Method used

By configuring the IPA trigger temperature and IPA target temperature in the UEFI's ACPIDSDT table, and after the UEFI boot operating system is started, the ACPI driver module initializes the temperature control module in the operating system to achieve normal operation of the IPA components.

Benefits of technology

In the scenario of UEFI booting operating system, the normal operation of IPA components is achieved, which can effectively manage the energy consumption of computing devices, meet the temperature control requirements while maximizing performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118051267B_ABST
    Figure CN118051267B_ABST
Patent Text Reader

Abstract

The present application provides an IPA implementation method, device, equipment, and storage medium based on ACPI, and the method includes: before using UEFI to boot the operating system, configuring the IPA trigger temperature and the IPA target temperature in the ACPI DSDT table of UEFI; during or after the UEFI boot operating system, the ACPI driver module in the operating system uses the IPA target temperature and the IPA trigger temperature in the ACPI DSDT table of UEFI to initialize the temperature control module in the operating system, and the temperature control module is used to determine whether to call the IPA component according to the IPA trigger temperature, the IPA target temperature, and the current system temperature provided by the temperature acquisition device. The present application can realize the normal operation of the IPA component in the UEFI scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an ACPI-based IPA implementation method, apparatus, device, and storage medium. Background Art

[0002] At present, the firmware used to boot the operating system (OS) mainly includes Universal Boot Loader (UBOOT) and Unified Extensible Firmware Interface (UEFI). The resource description method of UBOOT is Device Tree Source (DTS), while the resource description method of UEFI is Advanced Configuration and Power Interface (ACPI). As UEFI is widely used, it gradually replaces the traditional UBOOT.

[0003] Among the existing Linux open source technologies, temperature control algorithms mainly include step-wise intelligent allocation, bang bang intelligent allocation, and intelligent power allocation (IPA). The core of IPA is to use the proportional-integral-derivative (PID) controller to achieve closed-loop temperature control, and then use the power allocator (PA) to achieve power allocation, aiming to reasonably allocate power among various IP cores (IP Cores) to maximize performance while meeting temperature control requirements.

[0004] However, IPA is still not available in the scenario where the UEFI boots the operating system. Summary of the invention

[0005] In view of this, the embodiments of the present application are committed to providing an ACPI-based IPA implementation method, apparatus, device, and storage medium to implement the IPA function in a scenario where UEFI is used to boot an operating system.

[0006] In one aspect of the present application, an ACPI-based IPA implementation method is provided, including:

[0007] Before using UEFI to boot the operating system, configure the IPA trigger temperature and IPA target temperature in the UEFI advanced configuration power management interface ACPIDSDT table;

[0008] During or after the UEFI booting of the operating system, the ACPI driver module in the operating system uses the IPA target temperature and IPA trigger temperature in the UEFI ACPIDSDT table to initialize the temperature control module in the operating system. The temperature control module is used to determine whether to call the IPA component based on the IPA trigger temperature, the IPA target temperature and the current system temperature.

[0009] In a possible implementation of the present application, the temperature control module includes a temperature control core component, an intelligent power consumption allocation IPA component and a cooling device component. The temperature control core component is used to manage the temperature acquisition device, the cooling device component is used to manage the cooling device, the IPA component is used to implement the power consumption allocation of the cooling device, and the temperature acquisition device is used to obtain the current system temperature and provide it to the temperature control module.

[0010] In a possible implementation of the present application, the ACPI-based IPA implementation method also includes: during or after the UEFI boot operating system startup, the ACPI driver module obtains energy efficiency level information from the ACPI APIC table of the UEFI and initializes the energy model in the operating system, and the energy model is used to create an energy model performance table based on the energy efficiency level information, so that the IPA component uses the energy model performance table to implement the power consumption allocation.

[0011] In a possible implementation of the present application, the ACPI-based IPA implementation method also includes: during or after the UEFI boot operating system startup, the ACPI driver module obtains the co-processor performance control CPPC dynamic frequency modulation configuration information from the UEFI ACPI system description table and initializes the dynamic frequency modulation module in the operating system, and the dynamic frequency modulation module performs frequency modulation operations on the corresponding cooling device according to the target frequency of the cooling device determined by the IPA component.

[0012] In a possible implementation of the present application, configuring the IPA trigger temperature and the IPA target temperature in the ACPIDSDT table of UEFI includes: configuring the value of the IPA target temperature in a first method function of the ACPIDSDT table; and, adding a second method function to the ACPIDSDT table and configuring the value of the IPA trigger temperature in the second method function; wherein the first method function is used to pass the value of the IPA target temperature to the ACPI driver module, and the second method function is used to pass the value of the IPA trigger temperature to the ACPI driver module.

[0013] In a possible implementation of the present application, the ACPI driver module in the operating system uses the IPA target temperature and IPA trigger temperature in the ACPIDSDT table of UEFI to initialize the temperature control module in the operating system, including: the ACPI driver module uses the ACPI processor structure to register the cooling device to initialize the cooling device component, the ACPI processor structure contains a first variable, a second variable and a third variable, the first variable is used to initialize each cooling device so that the energy models of each cooling device can be associated with each other, the second variable is used to save the previous load information of the cooling device, and the third variable is used to set the maximum control level of the cooling device.

[0014] In a possible implementation of the present application, the ACPI-based IPA implementation method also includes: before using UEFI to boot the operating system, pre-defining an initialization temperature control device function in the ACPI driver module; during or after the UEFI boot operating system, after the dynamic frequency modulation module in the operating system is initialized, the notification chain mechanism is used to call the initialization temperature control device function, and the initialization temperature control device function initializes the first variable, the second variable and the third variable when being called.

[0015] In a possible implementation of the present application, the ACPI-based IPA implementation method also includes: before using UEFI to boot the operating system, pre-defining a first callback function, a second callback function and a third callback function in the source program file of the ACPI driver module for assigning values ​​to cooling device members, the first callback function is used to obtain the power consumption that needs to be allocated to the cooling device, the second callback function is used to convert the state of the cooling device into the power consumption, and the third callback function is used to convert the power consumption of the cooling device into the state; during or after the UEFI boot operating system startup, when the IPA component determines that the current system temperature provided by the temperature acquisition device reaches the IPA target temperature, the first callback function, the second callback function and the third callback function are called to determine the target frequency of each cooling device.

[0016] A possible implementation of the present application also includes: before using UEFI to boot the operating system, predefining a power consumption conversion frequency function, a frequency conversion power consumption function, a dynamic power consumption acquisition function and / or a current state level acquisition function in the source program file of the ACPI driver module; during or after the UEFI boot operating system startup, when the IPA component determines that the current system temperature provided by the temperature acquisition device reaches the IPA target temperature, calling the first callback function, the second callback function and the third callback function, and when the first callback function, the second callback function and the third callback function are called, calling back the power consumption conversion frequency function, the frequency conversion power consumption function, the dynamic power consumption acquisition function and / or the current state level acquisition function to obtain the target frequency of each cooling device.

[0017] In a possible implementation of the present application, the power consumption to frequency function is used to determine and return the target frequency of the current cooling device based on the current power consumption of the cooling device and the energy model performance table of the current cooling device when it is called; and / or, the frequency to power consumption function is used to determine the target power consumption value of the current cooling device based on the current frequency of the cooling device and the energy model performance table of the current cooling device when it is called; and / or, the dynamic power consumption acquisition function is used to obtain the dynamic power consumption of the cooling device according to the operating frequency of the current cooling device and the last load of the cooling device when it is called; and / or, the current state level acquisition function is used to determine the cooling level of the cooling device according to the state of the current cooling device and the dynamic frequency modulation strategy of the current cooling device that has been created when it is called.

[0018] In a possible implementation of the present application, the cooling device includes a CPU core.

[0019] In one aspect of the present application, an ACPI device is provided, comprising: an ACPI driver module set in an operating system and an ACPI ID SDT table set in UEFI; the ACPI ID SDT table is pre-configured with an IPA trigger temperature and an IPA target temperature; the ACPI driver module is used to initialize a temperature control module in the operating system using the IPA target temperature and the IPA trigger temperature in the ACPI ID SDT table of UEFI, and the temperature control module is used to determine whether to call an IPA component according to the IPA trigger temperature, the IPA target temperature and the current system temperature.

[0020] In one aspect of the present application, a computing device is provided, including: a processor and a memory;

[0021] Wherein, the memory is connected to the processor, and the memory is used to store a computer program;

[0022] The processor is used to implement the ACPI-based IPA implementation method as claimed in the claims by running the computer program stored in the memory.

[0023] In one aspect of the present application, a computer-readable storage medium is further provided, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the ACPI-based IPA implementation method as described above is implemented.

[0024] According to an embodiment of the present application, an IPA-related resource description is added to the UEFI firmware layer so that the IPA-related resource description of UEFI includes two temperature information required by IPA, and then the IPA-related resource description is used to initialize the IPA-related modules during or after the UEFI boot operating system startup, thereby achieving the normal operation of the IPA component in the operating system under the usage scenario of the UEFI firmware. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0026] Figure 1 is a schematic diagram of the structure of a computing device to which the embodiments of the present application are applicable;

[0027] Figure 2 It is a schematic diagram of the temperature control system architecture applicable to the embodiment of the present application;

[0028] Figure 3 It is a flowchart of an ACPI-based IPA implementation method provided in an embodiment of the present application;

[0029] Figure 4 It is a schematic diagram of the energy consumption management architecture of the operating system and UEFI involved in the embodiment of the present application;

[0030] Figure 5 It is a schematic diagram of the initialization process of the temperature control module involved in the embodiment of the present application;

[0031] Figure 6 It is a schematic diagram of a process of allocating power consumption of an IPA component according to an embodiment of the present application;

[0032] Figure 7 is a schematic diagram of the structure of an ACPI device provided in an embodiment of the present application;

[0033] Figure 8It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0035] Terminology explanation:

[0036] IPA: A thermal management component (governor) developed by ARM that complies with the Linux kernel thermal framework. Its name in the implementation code is power_allocator, which aims to maximize performance while meeting the temperature control effect.

[0037] Collaborative Processor Performance Control (CPPC): It is a standardized mechanism for describing abstract performance metrics defined by the ACPI specification. It is also a method for requesting higher / lower performance levels and managing CPU frequency and measuring the performance of each CPU.

[0038] Example scenarios

[0039] Figure 1 The schematic diagram of the structure of the computing device to which the embodiment of the present application is applicable is shown. The hardware layer of the computing device 100 may include a processor 110 and a memory 120, the memory 110 is connected to the processor 120, the computing device 100 may have a built-in or external temperature acquisition device 130 (thermal zone device), and the temperature acquisition device 130 can communicate or connect with the processor 110.

[0040] See also Figure 1 The software layer of the computing device may include UEFI, an operating system (OS), and applications, etc. The memory 120 stores program instructions of the UEFI, OS, and applications, which can implement the functions of the UEFI, OS, and applications when read and executed by the processor 110.

[0041] The processor 110 may be, but is not limited to, a CPU, a GPU, or various other types. The processor 110 may include one or more CPU cores. In specific applications, the UEFI, the OS, and the application may run in different cores or the same core of the processor 110, respectively. For example, when the processor includes two CPU cores, namely, a first CPU core and a second CPU core, the UEFI and the OS may run in the first CPU core and the second CPU core of the processor 110, and the application may run in the second CPU core of the processor 110.

[0042] The temperature acquisition device 130 may be, but is not limited to, a temperature sensor, a thermistor (NTC), and the like.

[0043] The computing device 100 of the embodiment of the present application may be, but is not limited to, various electronic devices such as personal computers (PCs), desktops, servers, portable devices, etc., and may also be, for example, chips, etc. In particular, the computing device of the embodiment of the present application may be a laptop computer, desktop computer, etc. used by ARM chip system developers. The embodiment of the present application does not limit the specific implementation form of the computing device in the embodiment of the present application.

[0044] Figure 2 2 shows a schematic diagram of the temperature control system 200 architecture applicable to the present application. The temperature control system 200 architecture can be run in the aforementioned computing device 100. Figure 2 The temperature control system 200 may include: a temperature control core layer 210, a temperature control strategy layer 220 (thermal governor) and a cooling device layer 230. The temperature control core layer 210 is provided with a temperature acquisition device 130 (thermal zone device). The temperature acquisition device 130 may be, but not limited to, a temperature sensor, a thermistor, etc. The cooling device layer 230 is provided with a cooling device (thermal cooling device). The cooling device may be, but not limited to, a fan, a CPU, a DDR, a GPU, etc. in the computing device 100. The temperature control strategy layer 220 may include power consumption allocation components for implementing temperature control. These power consumption allocation components may include Figure 3 The IPA, step_wise, bang_bang and other components shown are usually set in the temperature control module in the operating system of the computing device 100. The processor 110 of the computing device 100 reads and executes the program instructions of the operating system in the memory 110 to implement the functions of the above power consumption allocation components.

[0045] The temperature acquisition device detects the current temperature in real time and provides the current temperature to the processor 110. The processor 110 reads and executes the program instructions of the operating system in the memory 120 to run the operating system, so that the operating system can call a power consumption allocation component in the temperature control strategy layer 220 according to the current temperature to execute the temperature control algorithm to control the corresponding cooling device in the cooling device layer 230 to adjust its frequency, voltage and other working parameters, and finally achieve the expected temperature control target.

[0046] UEFI can be used to boot the operating system securely, and the resource description method of UEFI is ACPI. In the scenario of using UEFI, the "CPPC+energy model+ACPI" method is generally used to implement energy consumption management of computing devices.

[0047] As mentioned above, in the scenario where the UEFI is used to boot the operating system, because ACPI does not support IPA, it is impossible to use IPA to implement energy consumption management of the computing device after the UEFI is used to boot the operating system. In view of this, the embodiment of the present application proposes the following ACPI-based IPA implementation method, device, equipment and storage medium, which can normally run IPA in the scenario where the UEFI is used to boot the operating system to implement energy consumption management of the computing device.

[0048] Exemplary Methods

[0049] Figure 3 The following is a flow chart of the ACPI-based IPA implementation method provided in the embodiment of the present application. Figure 3 , the method may include:

[0050] Step 301, before using UEFI to boot the operating system, configure the IPA trigger temperature and the IPA target temperature in the ACPIDSDT table of UEFI;

[0051] Step 303, during or after the UEFI booting of the operating system, the ACPI driver module in the operating system initializes the temperature control module in the operating system using the IPA target temperature and IPA trigger temperature in the ACPIDSDT table of UEFI. The temperature control module is used to determine whether to call the IPA component based on the IPA trigger temperature, the IPA target temperature and the current system temperature.

[0052] The temperature control module may include a temperature control core component, an IPA component and a cooling device component. The temperature control core component is used to manage the temperature acquisition device, the cooling device component is used to manage the cooling device, and the temperature acquisition device can be used to obtain the current system temperature and provide it to the temperature control module.

[0053] Specifically, if the current system temperature exceeds the IPA trigger temperature, the IPA component is triggered to start working. Through the intelligent power consumption adjustment of the IPA component, the system temperature can be stabilized at the IPA target temperature and the fluctuation can be reduced as much as possible, thereby achieving the expected temperature control target. When the system temperature drops below the IPA trigger temperature, the IPA component will stop working.

[0054] The embodiment of the present application first configures the IPA trigger temperature and IPA target temperature required by the IPA component in the ACPIDSDT table of UEFI, and then the ACPI driver module uses the IPA target temperature and IPA trigger temperature in the ACPIDSDT table of UEFI to initialize the temperature control module in the operating system during or after the UEFI boots the operating system. Therefore, the embodiment of the present application adds an IPA-related resource description to the UEFI firmware layer so that the IPA-related resource description of UEFI contains the two temperature information required by IPA, and then uses the IPA-related resource description to initialize the IPA-related modules during or after the UEFI boots the operating system, thereby realizing the normal operation of the IPA component in the operating system under the usage scenario of UEFI firmware.

[0055] Figure 4 The schematic diagram of the energy consumption management architecture of the operating system and UEFI applicable to the embodiment of the present application is shown. Figure 4 , the modules related to the IPA components in the operating system may include but are not limited to: ACPI driver module (ACPI driver), temperature control module (Thermal zone), dynamic frequency modulation module (CPUfreq), energy model (energy model). Among them, the ACPI driver module can perform operations based on the ACPI system description table provided by UEFI, the temperature control module can be used to manage various temperature control devices (for example, the cooling device and temperature acquisition device mentioned above) to achieve energy consumption management through temperature control, and the energy model can create an energy model performance table corresponding to each cooling device, and the energy model performance table can include the frequency power consumption corresponding information of the cooling device, and the energy model performance table can be used to achieve the frequency power consumption conversion of the cooling device.

[0056] See also Figure 4 The temperature control module may include a temperature control core component, a temperature control strategy component and a cooling device management component; the temperature control core component is used to manage the temperature acquisition device, and can perform operations such as initialization and registration of the temperature acquisition device; the cooling device component is used to manage various cooling devices in the computing device, and can perform operations related to various cooling devices. The temperature control strategy component may include but is not limited to an IPA component, a BB (bang bang) component, an ST (step wise) component, etc. These components may use different temperature control algorithms to achieve power consumption regulation of the computing device.

[0057] In one example, the temperature control core component is specifically used to poll the temperature acquisition device according to the sampling time, and determine whether to perform regulation and what temperature control strategy (thermal governor) to use for regulation based on the currently acquired temperature.

[0058] The ACPI system description table in UEFI can contain IPA resource descriptions and methods to provide them to the operating system. The IPA resource description includes the parameters required for the normal initialization and operation of the Linux kernel modules involved in the IPA component. Figure 4 The ACPI system description table in the embodiment of the present application may include a distinguishing system description table (DSDT table) and an APIC table, wherein the DSDT table includes a description of trigger point resources related to IPA (for example, the IPA trigger temperature and the IPA target temperature in this article). The APIC table includes an efficiency class field (efficiency_class), which can be used to initialize the energy model in the operating system.

[0059] In one example, the ACPI system description table includes multiple nodes for describing IPA-related resources, and these nodes may include: temperature zone nodes, frequency modulation strategy protocol nodes, and energy model-related nodes.

[0060] The temperature zone node is the temperature zone management resource description, which may include but is not limited to: resource description of temperature acquisition devices, resource description of cooling devices, resource description of trigger points, etc. The resource description of trigger points is used to configure trigger points such as target temperature and shutdown temperature. The resource description of cooling devices may include but is not limited to the total number of cooling devices, relevant information of each cooling device, etc. The resource description of temperature acquisition devices may include but is not limited to the total number of temperature acquisition devices, relevant information of each temperature acquisition device, and parameters such as the polling time of each temperature acquisition device.

[0061] The frequency modulation policy protocol node may include, for example, a description of relevant policy resources of collaborative processor performance control (CPPC). For example, a resource description of the processor collaborative controller protocol CPPC cpufreq, where CPPC cpufreq is used to initialize the dynamic frequency modulation driver component (cpufreq driver) of the dynamic frequency modulation module in the operating system. For example, the CPPC cpufreq module may be the ACPICPPC CPUFreq driver provided by the Linux kernel, and its main application scenario is the ARM platform.

[0062] The energy model related node includes the description of the related resources of the energy model, for example, the energy efficiency level information used to initialize the energy model, etc. In one example, the energy model can be used to create an energy model performance table, and the energy model performance table can include the corresponding relationship between frequency and power consumption. For example, the energy model performance table can include two columns, one column is used to record the frequency value, and the other column is used to record the power consumption value, and the frequency value and the power consumption value in the same row are in a corresponding relationship.

[0063] The IPA component requires two passive state type temperature control trigger points, namely, the IPA trigger temperature (switch_on temp) (also called the start working temperature) and the IPA target temperature (also called the threshold temperature), but the ACPI protocol stipulates that there is only one method function used to transmit the passive temperature control trigger point. In view of this, in step 301, a method function can be customized in ACPIDSDT to configure the IPA trigger temperature required by the IPA component, and the IPA target temperature required by the IPA component can be configured using the existing method function in ACPIDSDT, so that the two temperature control trigger points required by IPA can be configured in the ACPIDSDT table at the same time.

[0064] There may be multiple specific implementations for configuring the IPA trigger temperature and the IPA target temperature in the ACPIDSDT table of UEFI in step 301. Considering that there is already a method function Method(_PSV) (collectively referred to as the first method function in this article) in the ACPIDSDT table of UEFI, the first method function returns the value of the target temperature required by the IPA component to the ACPI driver module when called by the operating system. In view of this, in one implementation, the value of the IPA target temperature may be configured in the first method function of the ACPIDSDT table, a second method function may be added to the ACPIDSDT table, and the value of the IPA trigger temperature may be configured in the second method function; the first method function is used to pass the value of the IPA target temperature to the ACPI driver module, and the second method function is used to pass the value of the IPA trigger temperature to the ACPI driver module. Therefore, by adding a second method function Method (_PAS) in the ACPIDSDT table of UEFI, the second method function Method (_PAS) returns the value of the IPA trigger temperature required by the IPA component to the ACPI driver module when called by the operating system, and uses the first method function Method (_PSV) already in the ACPIDSDT of UEFI to configure the value of the IPA target temperature, while being compatible with the existing ACPI specifications and realizing the configuration of the two temperature information required by IPA. In an example, the second method function can be written in ACPI source language (ASL).

[0065] Typically, the ACPIDSDT table contains a large amount of trigger point (trip) information, which describes trigger points of types such as passive (passive state), active (active state) and critical (critical state), and the temperature control trigger point required by IPA is passive. Therefore, in one implementation of an embodiment of the present application, passive trigger point information (passive trip) is added to the second method function Method (_PAS) newly added to the ACPIDSDT table to set the value of the IPA trigger temperature, and the passive trigger point information in the first method function Method (_PSV) already in the ACPIDSDT table is used to set the value of the IPA target temperature.

[0066] The ACPI driver module in the operating system complies with the ACPI specification. In step 303, the initialization of the temperature control module may include: initializing temperature trips and initializing cooling device components for use by the temperature control module.

[0067] In one implementation, initializing the temperature touch points in step 303 may include: during or after the UEFI booting of the operating system, the ACPI driver module may initialize two temperature touch points (thermal trips) required by the IPA component, namely, the IPA trigger temperature and the IPA target temperature, based on the IPA target temperature and the IPA trigger temperature in the ACPIDSDT table of UEFI, for use by the temperature control module in the operating system.

[0068] In one implementation, initializing the cooling device component in step 303 may include: registering the cooling device using a structure defined in the ACPI system description of UEFI. In one example, if the cooling device is a CPU or a CPU core, the ACPI processor structure (sttruct acpi_processor) defined in the ACPI system description table may be used to register the cooling device to initialize the corresponding cooling device component. In other examples, if the cooling device is not a CPU or a CPU core, the ACPI structure corresponding to the cooling device defined in the ACPI system description table may be used to register the cooling device.

[0069] In one implementation of the present application, considering that the IPA component needs to use the energy model and load in the operating system when performing power consumption allocation, when initializing the cooling device component in step 303, a first variable, a second variable and a third variable can be added to the ACPI processor (acpi_processor) structure to respectively associate the energy model and load corresponding to the CPU core or CPU serving as the cooling device.

[0070] In one example, if the cooling device is a cooling device of a processor type such as a CPU core, a CPU, or a GPU, initializing the cooling device component may include: the ACPI driver module may register the cooling device using the ACPI processor structure to initialize the cooling device component, the ACPI processor structure includes a first variable, a second variable, and a third variable, the first variable is used to initialize each cooling device so that the energy models of each cooling device can be associated with each other, the second variable is used to save the previous load information of the cooling device, and the third variable is used to set the maximum control level of the cooling device. For example, see Figure 4 For example, three member variables can be added in advance in the source program file Processor.c of the ACPI processor (acpi_processor) structure, which are defined as struct em_perf_domain*em (equivalent to the first variable), last_load (equivalent to the second variable) and max_level (equivalent to the third variable). The aforementioned first variable, second variable and third variable are implemented through these three member variables.

[0071] In other implementations of the present application, when initializing the cooling device component in step 303, other methods may be used to achieve the association between the energy model and the load corresponding to the cooling device. For example, existing member variables may be used or one or more other types of member variables may be configured in any other ACPI structure to initialize the energy model of the cooling device, save the previous load of the cooling device, and the maximum control level. The embodiments of the present application do not limit the specific implementation of initializing the cooling device component.

[0072] In one implementation of the present application, step 303 may also include: before using UEFI to boot the operating system, pre-defining the initialization temperature control device function in the ACPI driver module; during or after the UEFI boot operating system, after the dynamic frequency modulation module in the operating system is initialized, the notification chain mechanism is used to call the initialization temperature control device function, and the initialization temperature control device function initializes the first variable, the second variable, and the third variable when called. Thus, the configuration of the first variable, the second variable, and the third variable in the ACPI processor structure can be completed by pre-defining the initialization temperature control device function in the ACPI driver module and calling the initialization temperature control device function.

[0073] In one example, the temperature control device initialization function can be used to perform the following processing: after the dynamic frequency regulation module initializes the policy information (policy) required for dynamic frequency regulation (for example, the dynamic frequency regulation policy corresponding to each CPU core described below), the above-mentioned temperature control device initialization function is called through the notification function in the notification chain (notifier) ​​mechanism to realize the association of the energy model of each cooling device and the initialization of its second variable and third variable.

[0074] In addition, the above method of the embodiment of the present application may also include initializing IPA-related modules in the operating system, such as an energy model, a dynamic frequency modulation module, etc.

[0075] In specific applications, the initialization of IPA-related modules can be performed synchronously or sequentially, but the execution order is not limited. Specifically, the operating system can be initialized after the system is powered on and enters the operating system. If the firmware running the system is UEFI, it jumps to the ACPI driver module under the Linux kernel driver. The ACPI driver module parses the ACPI system description table of UEFI, parses and obtains the IPA-related resource description from the ACPI system description table, and uses the IPA-related resource description to initialize the operating system, such as the temperature control module, dynamic frequency modulation module, energy model and other IPA-related modules.

[0076] In one implementation, the above method of the embodiment of the present application may also include: during or after the UEFI boots the operating system, the ACPI driver module obtains energy efficiency level information from the ACPI APIC table of the UEFI and initializes the energy model in the operating system, and the energy model is used to create an energy model performance table based on the energy efficiency level information, so that the IPA component uses the energy model performance table to implement power consumption allocation.

[0077] In one implementation, the above method of the embodiment of the present application may also include: during or after the UEFI boots the operating system, the ACPI driver module obtains the CPPC dynamic frequency modulation configuration information from the ACPI system description table of the UEFI and initializes the dynamic frequency modulation module in the operating system, and the dynamic frequency modulation module performs frequency modulation operations on the corresponding cooling device according to the target frequency of the cooling device determined by the IPA component.

[0078] In one example, see Figure 4, during the process of UEFI booting the operating system, the initialization process of the dynamic frequency modulation module includes: the ACPI driver module obtains the IPA target temperature and the IPA trigger temperature from the ACPIDSDT table of UEFI, and calls the function cppc_acpi driver under the processor driver component (processor driver) to initialize the dynamic frequency modulation driver component (cpufreq driver) of the dynamic frequency modulation module in the operating system. The cpufreq driver is mainly used to control the frequency of the CPU through some strategies to achieve the purpose of adjusting its power consumption. Specifically, when the cppc_acpi driver is called, it passes the IPA resource description containing the IPA target temperature and the IPA trigger temperature to the cppc_cpufreq driver in the dynamic frequency modulation module and initializes the relevant part cppc_cpufreqdriver of the CPPC dynamic frequency modulation component (cppc cpufreq) in the dynamic frequency modulation driver component.

[0079] In one implementation of the present application, step 303 may also include: before using UEFI to boot the operating system, pre-defining a first callback function, a second callback function and a third callback function in the source program file of the ACPI driver module to assign values ​​to the cooling device members, the first callback function is used to obtain the power consumption that needs to be allocated to the cooling device, the second callback function is used to convert the state of the cooling device into the power consumption, and the third callback function is used to convert the power consumption of the cooling device into the state; during or after the UEFI boot operating system startup, when the IPA component determines that the current system temperature provided by the temperature acquisition device reaches the IPA target temperature, the first callback function, the second callback function and the third callback function are called to determine the target frequency of each cooling device.

[0080] In one example, combining Figure 4, the processing logic "CONFIG_THERMAL_GOV_POWER_ALLOCATOR" for the two temperature touch points required by IPA can be added to processor_thermal.c in the source program file thermal.c of the ACPI driver module. Specifically, the following callback functions can be defined in the processing logic "CONFIG_THERMAL_GOV_POWER_ALLOCATOR": the first callback function processor_get_requested_power, the second callback function processor_state2power and the third callback function processor_power2state. Among them, the first callback function processor_get_requested_power is used to obtain the power consumption that needs to be allocated to the cooling device, the second callback function processor_state2power is used to convert the state of the cooling device into power consumption, and the third callback function processor_power2state is used to convert the power consumption of the cooling device into state. These callback functions are used to assign values ​​to member functions in thermal_cooling_device_ops when registering the cooling device.

[0081] In some implementations, the process of assigning values ​​to members of thermal_cooling_device_ops through the callback function can be expressed as the following equations (1) to (6), where the left side of the equal sign is the member in thermal_cooling_device_ops and the right side of the equal sign is the callback function.

[0082] .get_max_state = processor_get_max_state (1)

[0083] .get_cur_state = processor_get_cur_state (2)

[0084] .set_cur_state = processor_set_cur_state (3)

[0085] .get_requested_power = processor_get_requested_power (4)

[0086] .state2power = processor_state2power (5)

[0087] .power2state = processor_power2state (6)

[0088] Among them, .get_max_state is used to obtain the maximum level state, .get_cur_state is used to obtain the current level state, .set_cur_state is used to set the current level state, .get_requested_power is used to obtain the target power consumption, .state2power is used to convert the state to power consumption, and .power2state is used to convert the power consumption to the state.

[0089] In some implementations, the first callback function, the second callback function and the third callback function mentioned above can be specifically used to call one or more of the following functions or variables to implement their functions: load rate calculation function get_load, frequency conversion power consumption function processor_freq_to_power, power consumption conversion frequency function processor_power_to_freq, dynamic power consumption acquisition function get_dynamic_power, dynamic power consumption acquisition function get_dynamic_power, the first variable, the second variable and the third variable in the sttruct acpi_processor structure member.

[0090] Specifically, step 303 may also include: before using UEFI to boot the operating system, predefining a power consumption conversion frequency function, a frequency conversion power consumption function, a dynamic power consumption acquisition function and / or a current state level acquisition function in the source program file of the ACPI driver module; and, during or after the UEFI boot operating system startup, when the IPA component determines that the current system temperature provided by the temperature acquisition device reaches the IPA target temperature, calling the first callback function, the second callback function and the third callback function, and when the first callback function, the second callback function and the third callback function are called, the power consumption conversion frequency function, the frequency conversion power consumption function, the dynamic power consumption acquisition function and / or the current state level acquisition function are called back to obtain the target frequency of each cooling device.

[0091] The power consumption to frequency function can be used to determine and return the target frequency of the current cooling device based on the current power consumption of the cooling device and the energy model performance table of the current cooling device when called. In an example, the power consumption to frequency function can be defined as processor_power_to_freq, which can be used to traverse the energy model performance table of the current cooling device (for example, a CPU core) based on the current power consumption of the cooling device, find the first element whose power consumption value is smaller than the current power consumption and use the frequency value corresponding to this element as the target frequency of the current cooling device and return it. It can be seen that the embodiment of the present application implements the power consumption to state algorithm interface of IPA through the power consumption to frequency function.

[0092] The frequency-to-power consumption function can be used to determine the target power consumption value of the current cooling device based on the current frequency of the cooling device and the energy model performance table of the current cooling device when called. In an example, the frequency-to-power consumption function can be defined as processor_freq_to_power. The frequency-to-power consumption function can specifically traverse the energy model performance table of the current cooling device (for example, a CPU core) based on the current frequency of the cooling device, find the first element in the energy model performance table whose frequency value is smaller than the current frequency, and return the power consumption value in the element as the target power consumption value of the current cooling device. It can be seen that the embodiment of the present application implements the state-to-power consumption algorithm interface of the IPA through the frequency-to-power consumption function.

[0093] The dynamic power consumption acquisition function can be used to obtain the dynamic power consumption of the cooling device according to the operating frequency of the current cooling device and the last load of the cooling device when it is called. In an example, the dynamic power consumption acquisition function can be defined as get_dynamic_power, which can specifically calculate the corresponding original power consumption according to the operating frequency of the current cooling device (for example, a CPU core), multiply the original power consumption by the last load of the cooling device recorded in the second variable last_load in the ACPI processor structure, and then divide it by 100 to obtain the dynamic power consumption of the cooling device. It can be seen that the embodiment of the present application implements the IPA cooling device demand power consumption algorithm interface by acquiring the dynamic power consumption function.

[0094] The function of getting the current state level can be used to determine the cooling level of the cooling device according to the state of the current cooling device and the dynamic frequency modulation strategy of the current cooling device that has been created when it is called. In one example, the function of getting the current state level can be defined as get_level, which can be specifically used to determine whether the policy information (policy) of the dynamic frequency modulation module is ready. If the policy information of the dynamic frequency modulation module is ready, according to each dynamic frequency modulation driver module (cppc_cpufreq driver), the number of frequency points (i.e., how many frequency points there are) is obtained by calculation formula, and then the energy model performance table of the corresponding cooling device in the energy model is called to obtain the key-value pair information of frequency and power consumption, and then one or more frequency points are taken as the frequency modulation reference points of the corresponding cooling device and the power consumption of the cooling device is adjusted accordingly, and finally the corresponding energy efficiency level (also referred to as cooling level) is returned. For example, 4 frequency modulation points can be taken as the frequency modulation reference points of the cooling device, and the frequency modulation reference points can be specifically: 0-3 gears, the highest gear is 100%, that is, the gear with the maximum frequency running at full, and each gear is reduced by 25%. It can be seen that the embodiment of the present application determines the cooling level by obtaining the current state level function IPA, and by returning the cooling level to the dynamic frequency modulation module, the specific cooling device can be controlled to adjust according to the cooling level.

[0095] As can be seen from the above, the embodiment of the present application adds a temperature control trigger point (trip point) and its processing logic in the ACPI driver module, so that the ACPI driver module can support the parameters and logic related to the IPA component, so that the function of the IPA component in the operating system booted by UEFI can be realized.

[0096] Taking the case where the cooling device includes two or more CPU cores as an example, the temperature control initialization process before IPA execution, the initialization process of IPA related modules, and the process of IPA executing power consumption allocation in the IPA implementation method in the embodiment of the present application are exemplarily described.

[0097] Figure 5 Schematic diagram of the initialization process of the temperature control module in the embodiment of the present application is shown. Figure 5 As shown, the temperature control module initialization process may include the following steps:

[0098] Step 501, initializing the temperature control trigger point;

[0099] Specifically, the acpi_thermal_get_info function in the ACPI driver module can be called to obtain the IPA trigger temperature and the IPA target temperature from the ACPIDSDT table of UEFI to initialize the temperature control trigger point of the temperature control module in the operating system, so that the IPA component in the thermal zone can be used.

[0100] Step 502, registering the temperature acquisition device, i.e. initializing the temperature control core component;

[0101] Specifically, the function acpi_thermal_register_thermal_zone in the ACPI driver module may be called to complete the registration of each temperature acquisition device in the temperature control core layer (thermal zone).

[0102] Step 503, binding the temperature control core layer;

[0103] Specifically, the acpi_thermal_bind_cooling_device function in the ACPI driver module may be called to complete the binding of the temperature control core layer 210 .

[0104] Step 504, registering the cooling device, i.e. initializing the cooling device component;

[0105] Assume that the current cooling includes two or more CPU cores. Specifically, the acpi_processor_start function in the ACPI driver module can be called to initialize each CPU core, and then acpi_processor_thermal_init can be called to initialize the temperature control strategy of each cooling device, and then the thermal_cooling_device_register function can be called to complete the registration of each CPU core.

[0106] In the process of registering the cooling device, the dynamic frequency modulation module (cpufreq) calls the initialization temperature control device function to complete the configuration of the first variable struct em_perf_domain*em, the second variable unsignedlong and the third variable last_load in the acpi_processor structure, so as to realize the energy model association between each CPU core, the last load information of each CPU core and the configuration of the maximum regulation level.

[0107] In a preferred implementation, after the dynamic frequency modulation module (cpufreq) initializes the policy and other information, it calls the notifier mechanism to notify the initialization of the temperature control device function to complete the initialization of the processor thermal device, so as to complete the configuration of the first variable, the second variable and the third variable.

[0108] When the cooling device is a CPU core, IPA needs to use the energy model performance table (em perf table) corresponding to the CPU core in the energy model module when performing intelligent power consumption allocation. Therefore, in the scenario where UEFI is used to boot the operating system, the energy model performance table must also be registered using ACPI.

[0109] The process of initializing the energy model includes registering the energy model performance table. The exemplary process of registering the energy model performance table may include the following steps a1 to a4:

[0110] Step a1, initializing the energy model kernel driver module in the operating system;

[0111] Step a2, in the general dynamic frequency modulation driver component (cpufreq driver), for each online CPU core, if one CPU core is found to be powered on, the function cpufreq_add_dev is called to add a CPU type cooling device, and a dynamic frequency modulation policy (cpufreq policy) is created for each online CPU core. After the dynamic frequency modulation policy is created, the register_em function is called to register the energy model, and then the corresponding energy model performance table is created for the CPU core.

[0112] The content of the dynamic frequency modulation strategy of each CPU core may include, but is not limited to, information such as the operating frequency of the maximum performance (Performance), power saving (powersave), on-demand (ondemand) and other modes. The operating frequency of the CPU core is different in different modes.

[0113] Step a3, depending on the information in the ACPI APIC table parsed by the ACPI driver module and the cppc_acpi driver in the ACPI driver module calling back the cppc_cpufreq_register_em function in the cppc_cpufreq driver of the CPPC part of the dynamic frequency modulation driver component, the APIC table includes an efficiency class field (efficiency_class).

[0114] Step a4, calling the em_dev_register_perf_domain function in the energy model, which calls back the em_cb function in the dynamic frequency modulation module, and the ACPI driver module calls the cppc_get_cpu_power function in the cppc_cpufreq driver to use the efficiency_class in the APIC table as a coefficient for calculating power consumption to create an energy model performance table.

[0115] Figure 6 An exemplary process of performing power consumption allocation by an IPA component is shown. Figure 6 An exemplary process of performing power consumption allocation by an IPA component may include an initial configuration process of a temperature control zone (Thermal_zone) and a power consumption allocation process of an IPA component (gov_power_allocator).

[0116] The initial configuration process of the thermal zone may include the following steps 601 to 603:

[0117] Step 601, temperature control zone device registration (thermal_zone_device_register): registration of temperature acquisition device, cooling device, temperature control algorithm, etc.;

[0118] Step 602, call (thermal_zone_device_set_polling) to set the polling time;

[0119] Step 603, the temperature control algorithm calls throttle to call back the aforementioned components for power consumption (e.g., IPA, step-wise, etc.) (thermal_gov->throttole) to determine whether power consumption allocation needs to be performed and calls the IPA component to perform power consumption allocation when necessary;

[0120] The process of the IPA component performing power consumption allocation may include the following steps 604 to 606:

[0121] Step 604, Power_allocator_throttle: When the current system temperature reaches the IPA trigger temperature, the IPA component is triggered to start working; when the current system temperature reaches the IPA target temperature, power consumption allocation is performed;

[0122] Step 605, allocator power: calling the allocator power function to calculate the energy that needs to be allocated to each cooling device (for example, CPU core 1, CPU core 2, etc.);

[0123] Step 606, calculate the required power consumption of each cooling device to obtain a total power consumption:

[0124] Specifically, for each cooling device, its get_requested_power function is called. After the get_requested_power function is called, the first callback function processor_get_requested_power in the ACPI driver module is called back to calculate the load of the cooling device (cooling_device). Specifically, the second callback function processor_get_requested_power calls state2power, and the member .state2power in thermal_cooling_device_ops calls the second callback function processor_state2power to obtain the power consumption of the cooling device in the current state. Among them, after the second callback function processor_state2power is called, it will call the function get_level to obtain the current state level and the function processor_freq_to_power to convert the frequency to power consumption, so as to obtain the dynamic power consumption of the cooling device in the current state by running the function get_level to obtain the current state level and the function processor_freq_to_power to convert the frequency to power consumption.

[0125] Step 607, pid_controller: call the pid_controller algorithm, run the divvy_up_power, power_actor_set_power functions in the pid_controller algorithm, and calculate the power consumption value that meets the power consumption allocation requirements according to the total power consumption obtained in step 703 and the required power consumption of each cooling device. The power consumption value is the minimum power consumption according to the total power consumption, IPA target temperature and current temperature / normal operation.

[0126] Step 608, divvy_up_power(): add the value of the member get_requested_power in thermal_cooling_device_ops, the power consumption value that meets the power consumption allocation requirement, and the value of the member state2power in thermal_cooling_device_ops, calculate the actual allocated power consumption Divvy of each cooling device, and output it.

[0127] Step 609, power_actor_set_power: call the member power2state in thermal_cooling_device_ops to convert the actual allocated power consumption of each cooling device into a level to achieve the final frequency reduction of each cooling device.

[0128] Usually the frequency is proportional to the temperature, and the actual CPU core frequency reduction operation is implemented through the dynamic frequency modulation driver module (cpufreq driver). Specifically, the member power2state in thermal_cooling_device_ops calls the third callback function processor_power2state, and when the third callback function processor_power2state is called, it calls back the power consumption conversion frequency function processor_power_to_freq, the load rate calculation function get_load, and the current state level acquisition function get_level. After the power consumption conversion frequency function processor_power_to_freq, the load rate calculation function get_load, and the current state level acquisition function get_level are called, the actual allocated power consumption of the CPU core is converted into a level.

[0129] It can be seen from the above that the method of the embodiment of the present application realizes the normal operation of IPA in the scenario of UEFI booting the operating system.

[0130] Exemplary Devices

[0131] Figure 7An ACPI device 700 provided in an embodiment of the present application is shown. The ACPI device 700 includes: an ACPI driver module 701 set in an operating system and an ACPI DDT table 702 set in UEFI:

[0132] The ACPIDSDT table 701 is pre-configured with an IPA trigger temperature and an IPA target temperature;

[0133] The ACPI driver module 702 is used to initialize the temperature control module in the operating system using the IPA target temperature and IPA trigger temperature in the ACPIDSDT table of UEFI. The temperature control module is used to determine whether to call the IPA component based on the IPA trigger temperature, the IPA target temperature and the current system temperature.

[0134] Among them, the temperature control module may include a temperature control core component, an intelligent power consumption allocation IPA component and a cooling device component. The temperature control core component is used to manage the temperature acquisition device, the cooling device component is used to manage the cooling device, the IPA component is used to implement the power consumption allocation of the cooling device, and the temperature acquisition device is used to obtain the current system temperature and provide it to the temperature control module.

[0135] Specifically, if the current system temperature exceeds the IPA trigger temperature, the IPA component is triggered to start working. Through the intelligent power consumption adjustment of the IPA component, the system temperature can be stabilized at the IPA target temperature and the fluctuation can be reduced as much as possible, thereby achieving the expected temperature control target. When the system temperature drops below the IPA trigger temperature, the IPA component will stop working.

[0136] In some embodiments, the ACPI device 700 also includes an ACPI APIC table 703 set in the UEFI, and the ACPI driver module 801 can also be used to obtain energy efficiency level information from the ACPI APIC table of the UEFI and initialize the energy model in the operating system. The energy model is used to create an energy model performance table based on the energy efficiency level information, so that the IPA component uses the energy model performance table to implement power consumption allocation.

[0137] In some implementations, the ACPI driver module 701 can also be used to obtain the co-processor performance control CPPC dynamic frequency modulation configuration information from the ACPI system description table of UEFI and initialize the dynamic frequency modulation module in the operating system. The dynamic frequency modulation module performs frequency modulation operations on the corresponding cooling device according to the target frequency of the cooling device determined by the IPA component.

[0138] In some implementations, the ACPI device 700 may further include: a temperature configuration module 704, which is used to: configure the value of the IPA target temperature in the first method function of the ACPIDSDT table; and, add a second method function in the ACPIDSDT table and configure the value of the IPA trigger temperature in the second method function; wherein the first method function is used to transfer the value of the IPA target temperature to the ACPI driver module, and the second method function is used to transfer the value of the IPA trigger temperature to the ACPI driver module. Thus, the temperature configuration module 804 can be used to implement the configuration of the IPA trigger temperature and the IPA target temperature in the ACPIDSDT table of UEFI.

[0139] In some embodiments, the ACPI driver module 701 can be used to: register a cooling device using an ACPI processor structure to initialize a cooling device component, the ACPI processor structure comprising a first variable, a second variable, and a third variable, the first variable being used to initialize each cooling device so that the energy models of each cooling device can be associated with each other, the second variable being used to save the previous load information of the cooling device, and the third variable being used to set the maximum control level of the cooling device.

[0140] In some implementations, the ACPI device 700 may further include: a predefined module 705, which is used to predefine an initialization temperature control device function in the ACPI driver module, so that during or after the UEFI boot operating system startup, after the dynamic frequency modulation module in the operating system is initialized, a notification chain mechanism is used to call the initialization temperature control device function, and the initialization temperature control device function initializes the first variable, the second variable, and the third variable when being called.

[0141] In some embodiments, the predefined module 706 can also be used to predefine a first callback function, a second callback function, and a third callback function in the source program file of the ACPI driver module for assigning values ​​to cooling device members, the first callback function is used to obtain the power consumption that needs to be allocated to the cooling device, the second callback function is used to convert the state of the cooling device into the power consumption, and the third callback function is used to convert the power consumption of the cooling device into the state, so that during or after the UEFI boot operating system starts, when the IPA component determines that the current system temperature provided by the temperature acquisition device reaches the IPA target temperature, the first callback function, the second callback function, and the third callback function are called to determine the target frequency of each cooling device.

[0142] In some embodiments, the predefined module 706 can also be used to predefine the power consumption to frequency function, the frequency to power consumption function, the dynamic power consumption acquisition function and / or the current state level acquisition function in the source program file of the ACPI driver module. Thus, during or after the UEFI boot operating system startup, the IPA component can call the first callback function, the second callback function and the third callback function when it is determined that the current system temperature provided by the temperature acquisition device reaches the IPA target temperature. When the first callback function, the second callback function and the third callback function are called, the power consumption to frequency function, the frequency to power consumption function, the dynamic power consumption acquisition function and / or the current state level acquisition function are called back to obtain the target frequency of each cooling device.

[0143] In some embodiments, a power consumption to frequency function is used to determine and return a target frequency of the current cooling device based on the current power consumption of the cooling device and the energy model performance table of the current cooling device when called; and / or, a frequency to power consumption function is used to determine the target power consumption value of the current cooling device based on the current frequency of the cooling device and the energy model performance table of the current cooling device when called; and / or, a dynamic power consumption acquisition function is used to obtain the dynamic power consumption of the cooling device according to the operating frequency of the current cooling device and the last load of the cooling device when called; and / or, a current state level acquisition function is used to determine the cooling level of the cooling device according to the state of the current cooling device and the dynamic frequency modulation strategy of the current cooling device that has been created when called.

[0144] Other technical details of the ACPI device 700 in the embodiment of the present application can be found in the method section above and will not be repeated here.

[0145] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0146] Computing equipment

[0147] Figure 8 FIG. 1 shows an example diagram of the structure of a computing device provided in an embodiment of the present application. Figure 8 As shown, the computing device may include: one or more processors 801, and a memory 802 storing one or more programs, which are executed by the one or more processors 801 to implement the method flow shown in the above embodiments of the present disclosure and / or program units corresponding to each unit in the device.

[0148] The various components are interconnected using different buses and can be mounted on a common motherboard or in other ways as needed. The processor 801 can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the user interface on an external input / output device (such as a display device coupled to the interface). In other embodiments, if desired, multiple processors and / or multiple buses can be used with multiple memories and multiple memories.

[0149] The processor 801 may include one or more single-core processors or multi-core processors. The processor 801 may include any combination of general-purpose processors or dedicated processors (such as image processors, application processors, baseband processors, etc.).

[0150] The memory 802 is a computer-readable storage medium provided by the present disclosure, which can be used to store non-transient software programs, non-transient computer executable programs and units, such as the following in the embodiments of the present disclosure: Figure 2 The processor 801 executes the non-transient software programs, instructions and units stored in the memory 802, thereby executing the above method embodiments. Figure 3 The methods shown correspond to programs, instructions, and units.

[0151] The computing device may further include: an input device 803 and an output device 804. The processor 801, the memory 802, the input device 803 and the output device 804 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.

[0152] The input device 803 can receive input digital or character information, and generate signal input related to user settings and function control of the camera calibration device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick, and other input devices. The output device 804 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.

[0153] The above-mentioned programs (also referred to as software, software applications, or codes) include machine instructions for programmable processors, and these computer programs can be implemented using object-oriented programming languages, assembly or machine languages.

[0154] With the development of time and technology, the meaning of medium is becoming more and more extensive, and the propagation path of computer programs is no longer limited to tangible media, and can also be downloaded directly from the network, etc. Any combination of one or more computer-readable storage media can be used. Computer-readable storage media can be used but not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing programs, which can be used by or in combination with instruction execution systems, devices or devices.

[0155] In one implementation, the computing device may be, but is not limited to, a computing device with relatively high power consumption requirements, such as a laptop computer or a desktop computer commonly used by ARM chip system developers.

[0156] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. The program includes instructions. When the instructions are executed by one or more processors of a computing device, the steps of the method described in any one of the aforementioned method embodiments are executed.

[0157] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the steps of any one of the methods described in the aforementioned method embodiments.

[0158] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for implementing intelligent power consumption allocation (IPA) based on advanced configuration power management interface (ACPI), comprising: Before starting the operating system using UEFI, configure the IPA trigger temperature and the IPA target temperature in the advanced configuration power management interface ACPI DSDT table of UEFI; the IPA trigger temperature is the start working temperature, and the IPA target temperature is the threshold temperature; During or after the UEFI booting of the operating system, the ACPI driver module in the operating system initializes the temperature control module in the operating system using the IPA target temperature and the IPA trigger temperature in the ACPI DSDT table of UEFI, and the temperature control module is used to determine whether to call the IPA component according to the IPA trigger temperature, the IPA target temperature and the current system temperature.

2. The method according to claim 1, characterized in that The temperature control module includes a temperature control core component, an intelligent power consumption allocation IPA component and a cooling device component. The temperature control core component is used to manage the temperature acquisition device, the cooling device component is used to manage the cooling device, the IPA component is used to implement the power consumption allocation of the cooling device, and the temperature acquisition device is used to obtain the current system temperature and provide it to the temperature control module.

3. The method according to claim 1, characterized in that Also includes: During or after the UEFI boot operating system starts, the ACPI driver module obtains energy efficiency level information from the ACPI APIC table of UEFI and initializes the energy model in the operating system, and the energy model is used to create an energy model performance table based on the energy efficiency level information, so that the IPA component uses the energy model performance table to implement the power consumption allocation.

4. The method according to claim 1, characterized in that: Also includes: During or after the UEFI booting of the operating system, the ACPI driver module obtains the co-processor performance control CPPC dynamic frequency modulation configuration information from the UEFI ACPI system description table and initializes the dynamic frequency modulation module in the operating system. The dynamic frequency modulation module performs frequency modulation operations on the corresponding cooling device according to the target frequency of the cooling device determined by the IPA component.

5. The method according to claim 1, characterized in that The configuring of the IPA trigger temperature and the IPA target temperature in the ACPI DSDT table of UEFI includes: configuring a value of the IPA target temperature in a first method function of the ACPI DSDT table; and Adding a second method function in the ACPI DSDT table and configuring a value of the IPA trigger temperature in the second method function; The first method function is used to transmit the value of the IPA target temperature to the ACPI driver module, and the second method function is used to transmit the value of the IPA trigger temperature to the ACPI driver module.

6. The method according to claim 1, characterized in that The ACPI driver module in the operating system uses the IPA target temperature and the IPA trigger temperature in the ACPI DSDT table of UEFI to initialize the temperature control module in the operating system, including: the ACPI driver module uses the ACPI processor structure to register the cooling device to initialize the cooling device component, the ACPI processor structure contains a first variable, a second variable and a third variable, the first variable is used to initialize each cooling device so that the energy models of each cooling device can be associated with each other, the second variable is used to save the previous load information of the cooling device, and the third variable is used to set the maximum control level of the cooling device.

7. The method according to claim 6, characterized in that Also includes: Before using UEFI to boot the operating system, pre-define the function of initializing the temperature control device in the ACPI driver module; During or after the UEFI booting of the operating system, after the dynamic frequency modulation module in the operating system is initialized, the temperature control device initialization function is called using a notification chain mechanism, and the temperature control device initialization function initializes the first variable, the second variable, and the third variable when being called.

8. The method according to claim 1, characterized in that Also includes: Before starting the operating system by using UEFI, a first callback function, a second callback function, and a third callback function for assigning values ​​to cooling device members are predefined in the source program file of the ACPI driver module, the first callback function is used to obtain the power consumption that needs to be allocated to the cooling device, the second callback function is used to convert the state of the cooling device into the power consumption, and the third callback function is used to convert the power consumption of the cooling device into the state; During or after the UEFI boot operating system starts, when the IPA component determines that the current system temperature provided by the temperature acquisition device reaches the IPA target temperature, the first callback function, the second callback function and the third callback function are called to determine the target frequency of each cooling device.

9. The method according to claim 8, characterized in that Also includes: Before starting the operating system using UEFI, a power consumption conversion frequency function, a frequency conversion power consumption function, a dynamic power consumption acquisition function and / or a current state level acquisition function are predefined in a source program file of the ACPI driver module; During or after the UEFI boot operating system startup, when the IPA component determines that the current system temperature provided by the temperature acquisition device reaches the IPA target temperature, the first callback function, the second callback function and the third callback function are called. When the first callback function, the second callback function and the third callback function are called, the power consumption conversion frequency function, the frequency conversion power consumption function, the dynamic power consumption acquisition function and / or the current state level acquisition function are called back to obtain the target frequency of each cooling device.

10. The method according to claim 9, characterized in that The power consumption-to-frequency function is used to determine and return a target frequency of the current cooling device based on the current power consumption of the cooling device and the energy model performance table of the current cooling device when called; and / or, The frequency-to-power consumption function is used to determine the target power consumption value of the current cooling device based on the current frequency of the cooling device and the energy model performance table of the current cooling device when called; and / or, The dynamic power consumption acquisition function is used to obtain the dynamic power consumption of the cooling device according to the current operating frequency of the cooling device and the last load of the cooling device when called; and / or, The function for obtaining the current state level is used to determine the cooling level of the cooling device according to the state of the current cooling device and the dynamic frequency modulation strategy of the current cooling device that has been created when being called.

11. The method according to any one of claims 2, 4, 6 to 10, characterized in that: The cooling device includes a CPU core.

12. An advanced configuration power management interface (ACPI) device, characterized in that: The ACPI device includes: an ACPI driver module arranged in the operating system and an ACPI DSDT table arranged in the UEFI; The ACPI DSDT table is pre-configured with an IPA trigger temperature and an IPA target temperature; the IPA trigger temperature is the start operating temperature, and the IPA target temperature is the threshold temperature; The ACPI driver module is used to initialize the temperature control module in the operating system using the IPA target temperature and the IPA trigger temperature in the ACPI DSDT table of UEFI, and the temperature control module is used to determine whether to call the IPA component according to the IPA trigger temperature, the IPA target temperature and the current system temperature.

13. A computing device, characterized in that: include: Processor and memory; Wherein, the memory is connected to the processor, and the memory is used to store a computer program; The processor is used to implement the intelligent power consumption allocation IPA implementation method based on the advanced configuration power management interface ACPI as described in any one of claims 1 to 11 by running the computer program stored in the memory.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method for implementing intelligent power consumption allocation IPA based on the advanced configuration power management interface ACPI according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Method for managing physical bare computer based on Ironic

    CN112948008A

  • Dynamic network card drive management system, method, device and equipment of intelligent terminal

    CN115473757A