Memory working frequency adjusting method and computer program product

By calculating the average idle time and load status information of memory and dynamically adjusting the memory frequency, the memory system power consumption optimization problem in the prior art is solved, and the effect of reducing power consumption and improving energy efficiency ratio without disabling memory is achieved.

CN119003289AInactive Publication Date: 2024-11-22INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202411488142.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has problems such as untimely frequency adjustment, large performance impact, and data loss when optimizing the power consumption of memory systems, making it difficult to effectively reduce server energy consumption and improve energy efficiency ratio.

Method used

By calculating the average idle time of memory, determining the load status information, adjusting the memory frequency according to the preset clock load setting information, and dynamically adjusting the memory operating frequency to reduce power consumption without disabling memory.

Benefits of technology

It realizes that on the premise of ensuring memory performance, it significantly reduces memory power consumption, improves the energy efficiency ratio of the server system, reduces server energy consumption, and dynamically adjusts the memory frequency to adapt to different application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003289A_ABST
    Figure CN119003289A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method for adjusting the working frequency of a memory and a computer program product, and relates to the technical field of adjustment of the working frequency of the memory. Determining load condition information for the memory through the average idle time; determining a target memory frequency according to the load condition information and preset clock load setting information; adjusting the working frequency of the memory based on the target memory frequency; and the power consumption of the memory is dynamically adjusted on the basis of not forbidding the memory, so that the energy efficiency ratio of the server system is improved, and the energy consumption of the server is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of memory operating frequency adjustment, and in particular to a memory operating frequency adjustment method, a computer program product, an electronic device and a computer-readable storage medium. Background Art

[0002] In recent years, with the rapid development of the Internet and the popularization of smart devices, computers and servers have become very important tools for people's work and study, and are widely used in various fields. In the entire computer system, the gap between the energy efficiency ratio of the memory system and the energy efficiency ratio of the processor is gradually increasing. The power consumption of the memory system accounts for an increasing proportion of the power consumption of the entire computer system. Therefore, optimizing the power consumption of the memory system is of great significance to reducing server power consumption and improving energy efficiency. Summary of the invention

[0003] The embodiments of the present invention provide a method for adjusting the operating frequency of a memory, a computer program product, an electronic device, and a computer-readable storage medium to overcome the above problems or at least partially solve the above problems.

[0004] The embodiment of the present invention discloses a method for adjusting a memory operating frequency, comprising: Calculate the average idle time for memory; Determining load status information for the memory according to the average idle time; Determining a target memory frequency according to the load status information and preset clock load setting information; The operating frequency of the memory is adjusted based on the target memory frequency.

[0005] Optionally, it also includes: Generate switch unit; When the switch unit is configured to be turned on, the step of calculating the average idle time for the memory is performed.

[0006] Optionally, the method is applied to a memory power consumption dynamic adjustment system mounted on a basic input / output system, the basic input / output system being provided with a user interaction interface, and further comprising: The clock load setting information and the sampling period are set through the user interaction interface.

[0007] Optionally, before the step of calculating the average idle time of the memory, the method further includes: Determine the target functional module of the memory power consumption dynamic adjustment system; An initialization operation is performed on the target functional module.

[0008] Optionally, before the step of calculating the average idle time of the memory, the method further includes: Generate periodic timer; Setting the sampling period to the interruption time period of the periodic timer; The periodic timer is triggered based on the interrupt time period to call a system control interrupt processing function to perform an interrupt operation.

[0009] Optionally, the step of calculating the average idle time of the memory includes: When the periodic timer is triggered to call the system control interrupt processing function to perform an interrupt operation, a plurality of memory idle time data for representing the length of time that the memory is in an idle state is obtained according to a preset number of times; The average idle time of the memory is calculated by using a plurality of the memory idle time data.

[0010] Optionally, before the step of using a plurality of memory idle time data to calculate the average idle time of the memory, the step further includes: Determine whether the memory idle time data is within a preset time interval; When the memory idle time data is not within the preset time interval, deleting the memory idle time data; When the memory idle time data is within a preset time interval, the step of using a plurality of memory idle time data to calculate the average idle time of the memory is performed.

[0011] Optionally, the load status information is a clock load value corresponding to the average idle time, the clock load setting information includes a preset clock load value, and the step of determining the target memory frequency according to the load status information and the preset clock load setting information includes: Determining whether the clock load value is less than the preset clock load value; When the clock load value is less than the preset clock load value, the frequency level of the memory is increased, and a target memory frequency of the memory with the increased frequency level is determined; When the clock load value is not less than the preset clock load value, the frequency level of the memory is reduced, and a target memory frequency of the memory with the reduced frequency level is determined.

[0012] Optionally, the step of adjusting the operating frequency of the memory based on the target memory frequency includes: Determine the current memory frequency; Calling a preset function to initiate memory training, and determining alignment parameters, compensation parameters, and reference voltage parameters based on the memory training; The front memory frequency is adjusted to the target memory frequency based on the alignment parameter, the compensation parameter, and the reference voltage parameter.

[0013] Optionally, after the step of adjusting the front memory frequency to the target memory frequency based on the alignment parameter, the compensation parameter and the reference voltage parameter, the method further includes: Re-execute the step of triggering the periodic timer to call the system control interrupt processing function to perform an interrupt operation based on the interrupt time period.

[0014] Optionally, the step of acquiring a plurality of memory idle time data for characterizing the length of time that the memory is in an idle state according to a preset number of times includes: Determine the current number of acquisitions; When the current acquisition times do not reach the preset times, the memory idle time data acquired in this round is saved, and the step of triggering the periodic timer to call the system control interrupt processing function to perform the interrupt operation based on the interrupt time period is re-executed; When the current acquisition times reaches the preset times, the memory idle time data acquired in this round is saved, and multiple memory idle time data of previous rounds are acquired.

[0015] Optionally, before the step of determining whether the clock load value is less than the preset clock load value, the method further includes: Determining whether the clock load value is within a preset load value range; When the clock load value is within the preset load value range, re-execute the step of triggering the periodic timer to call the system control interrupt processing function to perform an interrupt operation based on the interrupt time period; When the clock load value is not within the preset load value range, the step of determining whether the clock load value is less than the preset clock load value is performed.

[0016] The embodiment of the present invention further discloses a computer program product, including a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0017] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.

[0018] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.

[0019] The embodiments of the present invention include the following advantages: The embodiment of the present invention calculates the average idle time for the memory; determines the load status information for the memory through the average idle time; determines the target memory frequency according to the load status information and preset clock load setting information; adjusts the working frequency of the memory based on the target memory frequency; and dynamically adjusts the power consumption of the memory without disabling the memory, thereby improving the energy efficiency ratio of the server system and reducing the energy consumption of the server. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flow chart of steps of a method for adjusting the memory operating frequency provided in an embodiment of the present invention; Figure 2 It is a structural block diagram of a system for dynamically adjusting memory power consumption provided in an embodiment of the present invention; Figure 3 It is a hardware structure diagram of a memory power consumption dynamic adjustment device provided in an embodiment of the present invention; Figure 4 is a structural block diagram of another memory power consumption dynamic adjustment system provided in an embodiment of the present invention; Figure 5 It is a flow chart of a method for adjusting the memory operating frequency provided in an embodiment of the present invention; Figure 6 is a structural block diagram of a computer program product provided in an embodiment of the present invention; Figure 7 is a hardware structure block diagram of an electronic device provided in an embodiment of the present invention; Figure 8 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0022] In order to solve the energy consumption problem of memory systems, researchers in this field have begun to actively explore energy-saving technologies. At present, related technologies for memory energy saving solutions include powering off idle memory, reducing the refresh rate, turning off the clock of idle memory, etc.

[0023] However, these technologies still have some problems in practical applications. For example, memory breakpoints may cause the memory to not be enabled in time when the memory load becomes heavier. Memory data migration or reducing the memory refresh rate not only affects memory performance, but also has an ineffective impact on the power consumption of the entire memory.

[0024] Specifically, stopping the power supply to the memory will cause the loss of data stored therein. The data stored in the memory needs to be transferred to other storage media that are not idle, including other non-idle memories or hard disks. This method will greatly affect the system performance, and the memory stick needs to be re-initialized and memory training after powering on again after power failure, and the server needs to be restarted to restart the idle memory.

[0025] Furthermore, in the related technology, the memory NVM (Non-Volatile Memory) memory module has the characteristics of non-volatility and low power consumption. Transferring part of the data stored in the DRAM (Dynamic Random Access Memory) memory module to the NVM memory module is to reduce the memory power consumption by improving performance. This method does not reduce the power consumption of the memory system by a large margin, and the effect of reducing the power consumption of the memory system is not obvious.

[0026] Based on the above background, this patent proposes a method for adjusting the memory operating frequency, which adjusts the memory power consumption in real time according to the memory load, ensuring that the memory power consumption is reduced when the memory throughput is low, and the power consumption is increased when the memory throughput is high. While ensuring that the memory power consumption is reduced, it is compatible with the memory performance and meets various application scenarios of servers and computers.

[0027] For example, a function of dynamically adjusting memory power consumption is developed based on the server's UEFI (Unified Extensible Firmware Interface) firmware, and a control switch is set in the BIOS setup (Basic Input Output System Setup) interface. During the initialization process after the server is powered on, the interface control switch is used to select whether to enable the method. At the same time, the module function is initialized. After entering the system, the pre-registered interrupt program runtime detects the idle state of the memory clock, and dynamically adjusts the memory voltage and frequency according to the idle time. After multiple adjustments, the optimal frequency suitable for the current application scenario is found to meet the requirements of memory energy saving and performance.

[0028] The embodiments of the present invention can dynamically adjust the power consumption of the memory without disabling the memory, thereby improving the energy efficiency ratio of the server system and reducing the energy consumption of the server.

[0029] Reference Figure 1 , shows a flow chart of the steps of a method for adjusting the memory operating frequency provided in an embodiment of the present invention, which may specifically include the following steps: Step 101, calculating the average idle time of the memory; Step 102, determining load status information for the memory according to the average idle time; Step 103, determining a target memory frequency according to the load status information and preset clock load setting information; Step 104: adjust the operating frequency of the memory based on the target memory frequency.

[0030] refer to Figure 2 and Figure 3 , Figure 2 It is a structural block diagram of a system for dynamically adjusting memory power consumption provided in an embodiment of the present invention; Figure 3 It is a hardware structure diagram of a memory power consumption dynamic adjustment device provided in an embodiment of the present invention; In practical applications, the embodiment of the present invention can be applied to a memory power consumption dynamic adjustment system 200 mounted on a basic input / output system, wherein the memory power consumption dynamic adjustment system 200 may include a display and control module 201, a memory clock monitoring module 202, a data processing module 203, and a memory frequency control module 204. Specifically, the main hardware involved in the display and control module 201 is the system firmware BIOS basic input / output system, which is stored in a flash memory chip; the hardware involved in the memory clock monitoring module 202 is a memory bar, a central processing unit CPU, a bus system on a server motherboard, and a BIOS program; the data processing module 203 is mainly a program in the system firmware BIOS; and the memory frequency control module 204 mainly acts on the CPU and the memory bar.

[0031] The display and control module 201 of the embodiment of the present invention can be used to interact with the user, for example, to provide a user interface to allow the user to configure various parameters of the system, such as sampling period, clock load settings, etc. The memory clock monitoring module 202 can be responsible for collecting the operating status data of the memory to provide a basis for subsequent analysis. Specifically, the idle time of the memory clock can be periodically collected, that is, the time when the memory is in a non-working state, and the collected data can be pre-processed, for example, abnormal data can be eliminated, etc.; the collected idle time calculates the average idle time, wherein the average idle time of the memory can better express the load situation of the memory in a period of time.

[0032] After calculating the average idle time for the memory, the data processing module 203 can clean and process the collected data to extract useful information to provide a basis for frequency adjustment decisions. Specifically, the data processing module 203 of the embodiment of the present invention can determine the load status information used to express the current memory load status based on the calculated average idle time.

[0033] In actual applications, the clock load setting information can be set by the user. The clock load setting information can be a value or a range. When it is a value, it can be a threshold, which can be used to determine the degree of memory load. Similarly, it can also be a range. For example, if the actual load value is within the range, it is considered that the memory load is normal. If it is not within the range, it can be said that the load pressure is too high or too low. At this time, the memory operating frequency should be adjusted.

[0034] After determining the load status information for the memory through the average idle time, an embodiment of the present invention can decide whether to adjust the memory frequency, as well as the direction and amplitude of the adjustment based on the load status information and preset clock load setting information. For example, after determining the adjustment amplitude, the current frequency can be increased to the target memory frequency, or decreased to the target memory frequency.

[0035] The memory frequency control module 204 can directly control the frequency of the memory according to the decision result to achieve hardware-level adjustment. Specifically, the memory frequency control module 204 of the embodiment of the present invention can adjust the operating frequency of the memory based on the target memory frequency. After completing the frequency adjustment, the system will verify the adjusted frequency to ensure that the memory can operate stably.

[0036] The advantages of the memory power consumption dynamic adjustment system 200 are: Dynamic adjustment: Flexibly adjust memory frequency according to real-time load conditions to avoid resource waste.

[0037] Significant energy-saving effect: effectively reduce memory power consumption while ensuring performance.

[0038] Flexible configuration: Users can customize various parameters through the interface to meet the needs of different scenarios.

[0039] The memory power consumption dynamic adjustment system 200 realizes dynamic adjustment of memory frequency through real-time monitoring and intelligent analysis of memory load, thereby achieving energy saving, which is of great significance for improving the energy efficiency of servers and reducing operating costs.

[0040] The embodiment of the present invention calculates the average idle time for the memory; determines the load status information for the memory through the average idle time; determines the target memory frequency according to the load status information and preset clock load setting information; adjusts the working frequency of the memory based on the target memory frequency; and dynamically adjusts the power consumption of the memory without disabling the memory, thereby improving the energy efficiency ratio of the server system and reducing the energy consumption of the server.

[0041] Based on the above embodiment, a variant embodiment of the above embodiment is proposed. It should be noted that in order to make the description concise, only the differences from the above embodiment are described in the variant embodiment.

[0042] In an embodiment of the present invention, it also includes: Generate switch unit; When the switch unit is configured to be turned on, the step of calculating the average idle time for the memory is performed.

[0043] refer to Figure 4 and Figure 5 , Figure 4 is a structural block diagram of another memory power consumption dynamic adjustment system provided in an embodiment of the present invention; Figure 5 It is a flow chart of a method for adjusting the memory operating frequency provided in an embodiment of the present invention; The display and control module 201 includes a switch unit 205 .

[0044] In actual application, the BIOS Setup interface is a basic setting interface for computer hardware, which can usually be entered by pressing a specific key (such as Delete, F2, etc.) when the computer is turned on. In this interface, we can make some low-level settings for the computer hardware.

[0045] In practical applications, the switch unit can be an option, usually represented by words such as "enable", "disable", "on", "off", etc. By setting this switch, you can control whether a certain function is activated.

[0046] The switch unit 205 can be a changeable variable preset in the firmware. Before the server starts, the user can enter the BIOS setting interface and decide whether to enable the memory power consumption dynamic adjustment system 200 when the server starts by setting the switch unit 205, and whether to start the step of calculating the average idle time for the memory, that is, start dynamically adjusting the memory operating frequency.

[0047] By setting the switch unit 205 in the BIOS setting interface, the startup behavior of the server can be customized to meet different user requirements.

[0048] In an optional embodiment of the present invention, the method is applied to a memory power consumption dynamic adjustment system mounted on a basic input / output system, the basic input / output system being provided with a user interaction interface, and further comprising: The clock load setting information and the sampling period are set through the user interaction interface.

[0049] refer to Figure 4 , Figure 4 is a structural block diagram of another memory power consumption dynamic adjustment system provided in an embodiment of the present invention; The display and control module 201 includes a sampling period control unit 206 and a clock load setting unit 207 .

[0050] The embodiment of the present invention can be applied to a basic input / output system BIOS, wherein the basic input / output system is provided with a user interaction interface, and the cycle control unit 206 can be used to control the user interaction interface. The user can set the clock load setting information and the sampling period through the user interaction interface, and the cycle control unit 206 can obtain the clock load setting information and the sampling period.

[0051] In a specific implementation, the sampling period may refer to the time interval between two consecutive data collections by the system. For example, if the sampling period is set to 1 second, the system will collect data every 1 second.

[0052] The clock load setting information can be set by the user through the clock load setting unit 207. The clock load setting unit 207 presets a changeable variable in the firmware to enable the user to control the overall power consumption. The value range is 0-10. The larger the value, the more obvious the memory energy saving effect.

[0053] The sampling period directly affects the data collection frequency of the system, which in turn affects the performance and accuracy of the system. By flexibly setting the sampling period, the system can be optimized according to different application scenarios.

[0054] In an optional embodiment of the present invention, before the step of calculating the average idle time for the memory, the method further includes: Determine the target functional module of the memory power consumption dynamic adjustment system; An initialization operation is performed on the target functional module.

[0055] refer to Figure 4 , Figure 4 is a structural block diagram of another memory power consumption dynamic adjustment system provided in an embodiment of the present invention; The memory clock monitoring module 202 includes an interrupt initialization and registration unit 208 and a memory clock information collection unit 209 .

[0056] In a specific implementation, when the server is started, the interrupt initialization and registration unit 208 will determine all target functional modules used to adjust memory power consumption in the memory power consumption dynamic adjustment system 200, namely, the display and control module 201, the memory clock monitoring module 202, the data processing module 203 and the memory frequency control module 204, and perform initialization operations on the target functional modules to allow the user to configure preset parameters according to different needs. At the same time, it also ensures that the target functional modules in the memory power consumption dynamic adjustment system 200 can operate normally.

[0057] In an optional embodiment of the present invention, before the step of calculating the average idle time for the memory, the method further includes: Generate periodic timer; Setting the sampling period to the interruption time period of the periodic timer; The periodic timer is triggered based on the interrupt time period to call a system control interrupt processing function to perform an interrupt operation.

[0058] SCI (Serial Communication Interface) is a serial communication interface, commonly used for communication between microcontrollers and external devices, for example, sending data to computers, controlling motors, etc. The working principle of SCI is to transmit data serially one bit at a time, so the transmission rate is relatively slow, but it is simple to implement and low cost.

[0059] The function of SCI processing is: The SCI processing function is a function specifically used to handle SCI interrupts. When the SCI receives data or the send buffer is idle, an interrupt will be generated and the system will call the corresponding SCI processing function. The main tasks of this function are: Read or write data: If it is a receive interrupt, read the data from the SCI receive buffer and store it in the specified memory location; if it is a transmit interrupt, write the data to be sent to the SCI transmit buffer.

[0060] Execute related operations: Execute corresponding operations according to the received data or sending status. For example, if a specific command is received, the corresponding control action is executed; if the sending buffer is empty, continue to write the next batch of data.

[0061] Simply put, the SCI processing function is responsible for managing the data transmission and reception of SCI, and is the core part of serial port communication.

[0062] The typical process of SCI processing function: Interrupt generation: When SCI completes data reception or transmission, an interrupt is generated.

[0063] Entering interrupt service routine: The system enters the corresponding SCI interrupt service routine.

[0064] Read interrupt flag: Check the interrupt flag register to determine whether it is a receive interrupt or a transmit interrupt.

[0065] Data processing: Receive interrupt: read the data in the receive buffer and perform corresponding processing (for example, verify data, store data, etc.).

[0066] Send interrupt: write the data to be sent into the send buffer.

[0067] Clear interrupt flag: Clear the interrupt flag so that the system can respond to the next interrupt.

[0068] Exit the interrupt service routine: return to the main program.

[0069] The SCI processing function is a very important part of serial communication. It is responsible for managing the data transmission and reception of SCI and ensuring the reliability of data transmission. By reasonably writing the SCI processing function, various applications based on serial communication can be realized.

[0070] In a specific implementation, the interrupt initialization and registration unit 208 can be an interrupt and interrupt processing module registered during the server startup process. The interrupt initialization and registration unit 208 can set the interrupt trigger condition and the execution function SCI after the trigger. The trigger condition is to generate a periodic timer, and after setting the sampling period to the interrupt time period of the periodic timer, the timer times out and triggers the corresponding SCI. After receiving the SCI, the central processing unit CPU calls the system control interrupt processing function SCI to execute the interrupt operation.

[0071] Optionally, the step of calculating the average idle time of the memory includes: When the periodic timer is triggered to call the system control interrupt processing function to perform an interrupt operation, a plurality of memory idle time data for representing the length of time that the memory is in an idle state is obtained according to a preset number of times; The average idle time of the memory is calculated by using a plurality of the memory idle time data.

[0072] In actual applications, the runtime phase is the entire process from when the program code is loaded into memory and starts executing to when the program ends. At this stage, the program is no longer a static text, but actually runs on the computer.

[0073] In a specific implementation, the memory clock information acquisition unit 209 may be an integrated runtime stage executable function in the firmware, and specifically, may obtain multiple memory idle time data representing the length of time the memory is in an idle state from the memory clock signal at a preset number of times.

[0074] refer to Figure 4 The data processing module 203 includes a data preprocessing unit 213, an average value calculation unit 214, and a frequency value calculation unit 215.

[0075] Optionally, before the step of using a plurality of memory idle time data to calculate the average idle time of the memory, the step further includes: Determine whether the memory idle time data is within a preset time interval; When the memory idle time data is not within the preset time interval, deleting the memory idle time data; When the memory idle time data is within a preset time interval, the step of using a plurality of memory idle time data to calculate the average idle time of the memory is performed.

[0076] The data preprocessing unit 213 performs preprocessing for the memory clock idle time collected multiple times within the cycle time, including determining whether the data is within a reasonable range (within a preset time interval). If it is not within a reasonable range, the memory idle time data can be determined to be unreasonable, and at this time, it can be deleted. If it is within a reasonable range, it can be considered reasonable, and it can be collected. For another example, if the memory idle time data reflects that the memory is completely idle or completely busy, it should also be determined to be invalid, deleted, and only valid data is retained. For example, if the memory clock idle time is 0 or 10, the calculation unit can be directly skipped, no subsequent calculation is performed, and the interrupt is re-executed.

[0077] Optionally, after completing the preprocessing, the average value calculation unit 214 can calculate the average idle time based on the idle time (idle time data) fed back by the data preprocessing unit and the monitoring period, and judge whether the memory load under the current business is stable based on the distribution of the idle time in each area, and finally calculate the final CKE idle time (average idle time).

[0078] Optionally, the load status information is a clock load value corresponding to the average idle time, the clock load setting information includes a preset clock load value, and the step of determining the target memory frequency according to the load status information and the preset clock load setting information includes: Determining whether the clock load value is less than the preset clock load value; When the clock load value is less than the preset clock load value, the frequency level of the memory is increased, and a target memory frequency of the memory with the increased frequency level is determined; When the clock load value is not less than the preset clock load value, the frequency level of the memory is reduced, and a target memory frequency of the memory with the reduced frequency level is determined.

[0079] In a specific implementation, the frequency value calculation unit 215 can be used to convert the average idle time CKE idle time transmitted by the average value calculation unit into a clock load value, and compare it with a preset clock load value. If the clock load value is less than the preset clock load value, it means that the memory load is too large and the power should be increased. Therefore, the frequency level of the memory can be increased, and the target memory frequency of the memory with the increased frequency level can be determined. If the clock load value is not less than the preset clock load value, it means that the memory load is too light and the power should be reduced. The frequency level of the memory can be reduced, and the target memory frequency of the memory with the reduced frequency level can be determined, thereby improving the efficiency of determining the target memory frequency.

[0080] In an optional embodiment of the present invention, the step of adjusting the operating frequency of the memory based on the target memory frequency includes: Determine the current memory frequency; Calling a preset function to initiate memory training, and determining alignment parameters, compensation parameters, and reference voltage parameters based on the memory training; The front memory frequency is adjusted to the target memory frequency based on the alignment parameter, the compensation parameter, and the reference voltage parameter.

[0081] The memory frequency control module 204 includes a memory preset information query unit 210 , a memory frequency setting unit 211 and a memory training unit 212 .

[0082] The preset information query unit 210 is used to check the memory frequency value supported by the current server and the current memory frequency, and confirm the target memory frequency to be set according to the data transmitted by the frequency calculation unit.

[0083] The memory frequency setting unit 211 is used to set the memory frequency, and to call the preset callback function through the preset memory training unit 212 to re-initiate the memory training, obtain a set of alignment parameters, compensation parameters and reference voltage parameters, and complete the memory frequency setting. The callback function is a pre-defined function that will be automatically called when the memory frequency changes. Its function is to trigger a series of subsequent operations to ensure that the memory can adapt to the new frequency.

[0084] Among them, the alignment parameter is used to adjust the memory timing to synchronize it with the new frequency.

[0085] Compensation parameters: used to compensate for performance degradation caused by frequency changes.

[0086] Reference voltage parameters: used to set the memory supply voltage to ensure its stable operation.

[0087] The objectives of the training are to: Memory is a complex component: memory performance depends not only on frequency, but also on multiple factors such as timing and voltage.

[0088] Frequency changes affect performance: Changing the memory frequency will affect its stability and performance.

[0089] Training to find the optimal parameters: Through training, a set of optimal parameters can be found so that the memory can achieve the best performance at the new frequency.

[0090] Adjusting the memory frequency is not a simple process, it involves a series of complex adjustments and verifications. By retraining the memory, you can ensure that the memory can run stably at the new frequency, thereby ensuring the overall performance of the system.

[0091] In an optional embodiment of the present invention, after the step of adjusting the front memory frequency to the target memory frequency based on the alignment parameter, the compensation parameter and the reference voltage parameter, the method further includes: Re-execute the step of triggering the periodic timer to call the system control interrupt processing function to perform an interrupt operation based on the interrupt time period.

[0092] In the specific implementation, after the power adjustment of the memory is completed, the periodic timer can be triggered based on the interrupt time period to call the system control interrupt processing function to perform the interrupt operation, so as to poll the memory load and finally achieve the effect of dynamically adjusting the memory operating frequency.

[0093] In an optional embodiment of the present invention, the step of acquiring a plurality of memory idle time data for characterizing the length of time that the memory is in an idle state according to a preset number of times comprises: Determine the current number of acquisitions; when the current number of acquisitions does not reach the preset number, save the memory idle time data acquired in this round, and re-execute the steps of triggering the periodic timer based on the interrupt time period to call the system control interrupt processing function to perform the interrupt operation, so as to grab the memory idle time data again; when the current number of acquisitions reaches the preset number, it means that the preset number of grabs has been met, and there is no need to grab the idle time data again. At this time, the memory idle time data acquired in this round can be saved, and multiple memory idle time data of previous rounds can be acquired. For example, assuming that the idle time data is acquired five times, then when the fifth acquisition is performed, the idle time data acquired in the fifth round is saved, and the idle time data of the first four rounds are acquired, thereby realizing automatic multiple acquisition of idle time data and improving the efficiency of acquiring idle time data.

[0094] In an optional embodiment of the present invention, before the step of determining whether the clock load value is less than the preset clock load value, the step further includes: Determining whether the clock load value is within a preset load value range; When the clock load value is within the preset load value range, re-execute the step of triggering the periodic timer to call the system control interrupt processing function to perform an interrupt operation based on the interrupt time period; When the clock load value is not within the preset load value range, the step of determining whether the clock load value is less than the preset clock load value is performed.

[0095] In practical applications, the clock load setting information may be set by the user, and the clock load setting information may be a range, and the frequency value calculation unit 215 may determine whether the clock load value is within the preset load value range; If the clock load value is within the preset load value range, the memory is considered to be normally loaded. At this time, the periodic timer can be triggered based on the interrupt time period to call the system control interrupt processing function to perform interrupt operations to dynamically monitor the memory load. When the clock load value is not within the preset load value range, it can be said that the load pressure is too high or too low. At this time, it can be determined whether the clock load value is less than the preset clock load value to adjust the memory frequency.

[0096] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0097] Reference Figure 6 , Figure 6 : is a structural block diagram of a computer program product provided in an embodiment of the present invention: The computer program product includes a computer program / instruction 501, and when the computer program / instruction 501 is executed by a processor, the steps of the method for adjusting the memory operating frequency as described above are implemented.

[0098] In addition, an embodiment of the present invention further provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned memory operating frequency adjustment method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0099] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned memory operating frequency adjustment method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0100] Figure 7 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.

[0101] The electronic device 600 includes but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and a power supply 611. Those skilled in the art will appreciate that Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.

[0102] It should be understood that in the embodiment of the present invention, the radio frequency unit 601 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving downlink data from the base station, it is sent to the processor 610 for processing; in addition, uplink data is sent to the base station. Generally, the radio frequency unit 601 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 601 can also communicate with the network and other devices through a wireless communication system.

[0103] The electronic device provides users with wireless broadband Internet access through the network module 602, such as helping users to send and receive emails, browse web pages, and access streaming media.

[0104] The audio output unit 603 can convert the audio data received by the RF unit 601 or the network module 602 or stored in the memory 609 into an audio signal and output it as sound. Moreover, the audio output unit 603 can also provide audio output related to a specific function performed by the electronic device 600 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 603 includes a speaker, a buzzer, a receiver, etc.

[0105] The input unit 604 is used to receive audio or video signals. The input unit 604 may include a graphics processor (GPU) 6041 and a microphone 6042. The graphics processor 6041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 606. The image frame processed by the graphics processor 6041 can be stored in the memory 609 (or other storage medium) or sent via the radio frequency unit 601 or the network module 602. The microphone 6042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 601 in the case of a telephone call mode.

[0106] The electronic device 600 also includes at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 6061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 6061 and / or the backlight when the electronic device 600 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 605 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.

[0107] The display unit 606 is used to display information input by the user or information provided to the user. The display unit 606 may include a display panel 6061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0108] The user input unit 607 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 607 includes a touch panel 6071 and other input devices 6072. The touch panel 6071, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch panel 6071). The touch panel 6071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the processor 610, receives the command sent by the processor 610 and executes it. In addition, the touch panel 6071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 6071, the user input unit 607 may also include other input devices 6072. Specifically, other input devices 6072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.

[0109] Furthermore, the touch panel 6071 may be overlaid on the display panel 6061. When the touch panel 6071 detects a touch operation on or near it, it is transmitted to the processor 610 to determine the type of touch event. Then, the processor 610 provides corresponding visual output on the display panel 6061 according to the type of touch event. Figure 7 In the figure, the touch panel 6071 and the display panel 6061 are used as two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 6071 and the display panel 6061 can be integrated to realize the input and output functions of the electronic device, which is not limited here.

[0110] The interface unit 608 is an interface for connecting an external device to the electronic device 600. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 608 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 600 or may be used to transmit data between the electronic device 600 and an external device.

[0111] The memory 609 can be used to store software programs and various data. The memory 609 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 609 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0112] The processor 610 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 609 and calling data stored in the memory 609, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 610 may include one or more processing units; preferably, the processor 610 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 610.

[0113] The electronic device 600 may also include a power supply 611 (such as a battery) for supplying power to various components. Preferably, the power supply 611 may be logically connected to the processor 610 via a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.

[0114] In addition, the electronic device 600 includes some functional modules not shown, which will not be described in detail here.

[0115] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0116] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0117] like Figure 8 As shown, in another embodiment provided by the present invention, a computer-readable storage medium 701 is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the method for adjusting the memory operating frequency described in the above embodiment.

[0118] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

[0119] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0120] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0121] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0122] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0123] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0124] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0125] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for adjusting a memory operating frequency, characterized in that: include: Calculate the average idle time for memory; Determining load status information for the memory according to the average idle time; Determining a target memory frequency according to the load status information and preset clock load setting information; The operating frequency of the memory is adjusted based on the target memory frequency.

2. The method according to claim 1, characterized in that Also includes: Generate switch unit; When the switch unit is configured to be turned on, the step of calculating the average idle time for the memory is performed.

3. The method according to claim 1 or 2, characterized in that: The method is applied to a memory power consumption dynamic adjustment system installed in a basic input and output system, wherein the basic input and output system is provided with a user interaction interface and further comprises: The clock load setting information and the sampling period are set through the user interaction interface.

4. The method according to claim 3, characterized in that Before the step of calculating the average idle time of the memory, the method further includes: Determine the target functional module of the memory power consumption dynamic adjustment system; An initialization operation is performed on the target functional module.

5. The method according to claim 4, characterized in that Before the step of calculating the average idle time of the memory, the method further includes: Generate periodic timer; Setting the sampling period to the interruption time period of the periodic timer; The periodic timer is triggered based on the interrupt time period to call a system control interrupt processing function to perform an interrupt operation.

6. The method according to claim 5, characterized in that The step of calculating the average idle time for the memory comprises: When the periodic timer is triggered to call the system control interrupt processing function to perform an interrupt operation, a plurality of memory idle time data for representing the length of time that the memory is in an idle state is obtained according to a preset number of times; The average idle time of the memory is calculated by using a plurality of the memory idle time data.

7. The method according to claim 6, characterized in that Before the step of using a plurality of memory idle time data to calculate the average idle time of the memory, the method further includes: Determine whether the memory idle time data is within a preset time interval; When the memory idle time data is not within the preset time interval, deleting the memory idle time data; When the memory idle time data is within a preset time interval, the step of using a plurality of memory idle time data to calculate the average idle time of the memory is performed.

8. The method according to claim 6, characterized in that The load status information is a clock load value corresponding to the average idle time, the clock load setting information includes a preset clock load value, and the step of determining a target memory frequency according to the load status information and the preset clock load setting information includes: Determining whether the clock load value is less than the preset clock load value; When the clock load value is less than the preset clock load value, the frequency level of the memory is increased, and a target memory frequency of the memory with the increased frequency level is determined; When the clock load value is not less than the preset clock load value, the frequency level of the memory is reduced, and a target memory frequency of the memory with the reduced frequency level is determined.

9. The method according to claim 8, characterized in that The step of adjusting the operating frequency of the memory based on the target memory frequency comprises: Determine the current memory frequency; Calling a preset function to initiate memory training, and determining alignment parameters, compensation parameters, and reference voltage parameters based on the memory training; The front memory frequency is adjusted to the target memory frequency based on the alignment parameter, the compensation parameter, and the reference voltage parameter.

10. The method according to claim 9, characterized in that After the step of adjusting the front memory frequency to the target memory frequency based on the alignment parameter, the compensation parameter and the reference voltage parameter, the method further includes: Re-execute the step of triggering the periodic timer to call the system control interrupt processing function to perform an interrupt operation based on the interrupt time period.

11. The method according to claim 6, characterized in that The step of obtaining a plurality of memory idle time data for representing the length of time that the memory is in an idle state according to a preset number of times comprises: Determine the current number of acquisitions; When the current acquisition times do not reach the preset times, the memory idle time data acquired in this round is saved, and the step of triggering the periodic timer to call the system control interrupt processing function to perform the interrupt operation based on the interrupt time period is re-executed; When the current acquisition times reaches the preset times, the memory idle time data acquired in this round is saved, and multiple memory idle time data of previous rounds are acquired.

12. The method according to claim 8, characterized in that Before the step of determining whether the clock load value is less than the preset clock load value, the method further includes: Determining whether the clock load value is within a preset load value range; When the clock load value is within the preset load value range, re-execute the step of triggering the periodic timer to call the system control interrupt processing function to perform an interrupt operation based on the interrupt time period; When the clock load value is not within the preset load value range, the step of determining whether the clock load value is less than the preset clock load value is performed.

13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

14. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 12 when executing the program stored in the memory.

15. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • CPU (Central Processing Unit) power control method, smart television and storage medium

    CN108200473A

  • Memory management method and device, electronic equipment and computer readable storage medium

    CN116932191A

  • CPU performance power consumption ratio test method and system, terminal and storage medium

    CN116932297A

  • Method for adjusting DDR working frequency based on instruction monitoring and storage medium

    CN118708047A

  • Method for reducing current consumption of mobile communication terminals

    CN1406096A

Cited By

  • Electronic equipment control method and device, server, medium and program product

    CN120723129A