Memory management method, electronic device, storage medium and computer program product

By integrating the hot and cold scoring calculator and energy consumption management module in the CXL controller, combining hardware and protocol layer expansion, dynamically adjusting data location and energy consumption management, the problems of energy consumption waste and system delay in the CXL protocol are solved, and efficient memory management is achieved.

CN119847772BActive Publication Date: 2025-07-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510331481.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-07-25
Estimated Expiration
2045-03-20

AI Technical Summary

Technical Problem

The low-power heterogeneous memory management technology under the existing CXL protocol has problems such as limitations in static power management strategies, single media access policies and insufficient protocol layer support, resulting in waste of energy consumption and increased system latency, and the data location cannot be dynamically adjusted according to load.

Method used

By integrating the hot and cold scoring calculator and energy consumption management module in the CXL controller, combining hardware layer and protocol layer extensions, dynamic data migration and energy consumption management are realized, data transfer is carried out according to the hot and cold scoring of the memory page and the storage media type, and the operation mode is adjusted on the target storage media to optimize energy consumption.

Benefits of technology

It effectively reduces memory energy consumption, avoids energy waste, and improves system efficiency. It is suitable for application scenarios with high concurrency and high computing power requirements such as GPU server clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847772B_ABST
    Figure CN119847772B_ABST
Patent Text Reader

Abstract

The present application discloses a memory management method, an electronic device, a storage medium, and a computer program product, which relate to the field of computer technologies. According to the hot and cold scores, the present application sets hot and cold marks for memory pages to distinguish memory data of different hot and cold levels, and compares with the type of the storage medium where the memory page is located to determine whether to transfer the memory data of the memory page. By transferring the data to the storage medium that matches the hot and cold marks, energy consumption can be reduced and energy waste can be avoided. Moreover, before the data transfer, it is determined whether the current operating mode of the target storage medium supports the data transfer, and the target storage medium is adjusted to an operating mode that supports the data transfer, without always keeping all storage media in an operating mode that supports the data transfer, which can keep the energy consumption of the operating mode of the storage medium at the lowest level, and can realize reducing energy consumption by combining dynamic adjustment of data positions according to the load and static power management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technologies, and in particular, to a memory management method, an electronic device, a storage medium, and a computer program product. Background Art

[0002] CXL (Computer Express Link) is an open interconnection new standard jointly launched by Intel and multiple manufacturers for fields such as data centers, high-performance computers, and AI. The current low-power heterogeneous memory management technology under the CXL protocol mainly relies on static allocation strategies and single-medium optimization, with significant limitations. Usually, fixed memory partitions are adopted, and DRAM and SCM / NVM are divided into static capacity pools, unable to dynamically adjust the data location according to the load, resulting in low-frequency accessed data occupying high-power DRAM for a long time, causing more than 30% of energy consumption waste. The current technical solutions of the CXL protocol in the field of heterogeneous memory management have significant defects, mainly reflected in three aspects: static power management, single medium access strategy, and insufficient protocol layer support. Summary of the Invention

[0003] This application provides a memory management method, an electronic device, a storage medium, and a computer program product to at least solve the technical problem in related technologies that it is impossible to combine dynamic adjustment of data location according to the load with static power management to reduce energy consumption.

[0004] This application provides a memory management method, including:

[0005] Obtain the memory data of a memory page in a memory module, obtain the cold-hot score of the memory data of the memory page, and set a cold-hot mark for the memory page according to the cold-hot score;

[0006] Obtain the type of the storage medium where the memory page is located, and determine whether to transfer the memory data of the memory page according to the type of the storage medium and the cold-hot mark set for the memory page;

[0007] In response to transferring the memory data of the memory page, obtain the address of the storage medium where the memory page is located and the address of a target storage medium, and determine whether the current operating mode of the target storage medium supports data transfer;

[0008] In response to the current operating mode of the target storage medium supporting data transfer, migrate the memory data of the memory page to the target storage medium according to the address of the target storage medium; otherwise, convert the current operating mode of the target storage medium to support data transfer.

[0009] The present application also provides an electronic device, including: a memory for storing a computer program; a processor for implementing the steps of any of the above memory management methods when executing the computer program:

[0010] Obtain the memory data of the memory page in the memory module, obtain the hot-cold score of the memory data of the memory page, and set a hot-cold mark for the memory page according to the hot-cold score;

[0011] Obtain the type of the storage medium where the memory page is located, and determine whether to transfer the memory data of the memory page according to the type of the storage medium and the hot-cold mark set for the memory page;

[0012] In response to transferring the memory data of the memory page, obtain the address of the storage medium where the memory page is located and the address of the target storage medium, and determine whether the current operating mode of the target storage medium supports data transfer;

[0013] In response to the current operating mode of the target storage medium supporting data transfer, migrate the memory data of the memory page to the target storage medium according to the address of the target storage medium, otherwise convert the current operating mode of the target storage medium to support data transfer.

[0014] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above memory management methods are implemented:

[0015] Obtain the memory data of the memory page in the memory module, obtain the hot-cold score of the memory data of the memory page, and set a hot-cold mark for the memory page according to the hot-cold score;

[0016] Obtain the type of the storage medium where the memory page is located, and determine whether to transfer the memory data of the memory page according to the type of the storage medium and the hot-cold mark set for the memory page;

[0017] In response to transferring the memory data of the memory page, obtain the address of the storage medium where the memory page is located and the address of the target storage medium, and determine whether the current operating mode of the target storage medium supports data transfer;

[0018] In response to the current operating mode of the target storage medium supporting data transfer, migrate the memory data of the memory page to the target storage medium according to the address of the target storage medium, otherwise convert the current operating mode of the target storage medium to support data transfer.

[0019] The present application also provides a computer program product, including a computer program which, when executed by a processor, implements the steps of any of the above memory management methods:

[0020] Obtain the memory data of a memory page in a memory module, obtain the cold - hot score of the memory data of the memory page, and set a cold - hot mark for the memory page according to the cold - hot score;

[0021] Obtain the type of the storage medium where the memory page is located, and determine whether to perform data transfer on the memory data of the memory page according to the type of the storage medium and the cold - hot mark set for the memory page;

[0022] In response to performing data transfer on the memory data of the memory page, obtain the address of the storage medium where the memory page is located and the address of the target storage medium, and determine whether the current operating mode of the target storage medium supports data transfer;

[0023] In response to the current operating mode of the target storage medium supporting data transfer, migrate the memory data of the memory page to the target storage medium according to the address of the target storage medium; otherwise, convert the current operating mode of the target storage medium to support data transfer.

[0024] Through the present application, setting cold - hot marks for memory pages according to cold - hot scores can distinguish memory data of different cold - hot levels, and by comparing with the type of the storage medium where the memory page is located, it is determined whether to perform data transfer on the memory data of the memory page. Transferring data to a storage medium matching the cold - hot mark can reduce energy consumption and avoid energy waste. Moreover, before data transfer, it is judged whether the current operating mode of the target storage medium supports data transfer, and the target storage medium is adjusted to an operating mode that supports data transfer, without always keeping all storage media in an operating mode that supports data transfer, which can keep the energy consumption of the operating mode of the storage medium at the lowest level, and can realize reducing energy consumption by combining dynamic adjustment of data location according to load and static power management. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] To more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0026] Figure 1 It is an application environment diagram of the memory management method in an embodiment of the present application;

[0027] Figure 2 It is a flowchart of the memory management method in an embodiment of the present application;

[0028] Figure 3 A flowchart of steps for obtaining memory data of a memory page in a memory module, obtaining a cold / hot score of the memory data of the memory page, and setting a cold / hot mark for the memory page according to the cold / hot score in an embodiment of the present application;

[0029] Figure 4 A flowchart of steps for obtaining the type of the storage medium where the memory page is located, and determining whether to perform data transfer on the memory data of the memory page according to the type of the storage medium and the cold / hot mark set for the memory page in an embodiment of the present application;

[0030] Figure 5 A flowchart of steps for, in response to performing data transfer on the memory data of the memory page, obtaining the address of the storage medium where the memory page is located and the address of a target storage medium, and determining whether the current operation mode of the target storage medium supports data transfer in an embodiment of the present application;

[0031] Figure 6 A flowchart of steps for, in response to the current operation mode of the target storage medium supporting data transfer, migrating the memory data of the memory page to the target storage medium according to the address of the target storage medium in an embodiment of the present application;

[0032] Figure 7 A structural block diagram of a memory management device in an embodiment of the present application;

[0033] Figure 8 A structural block diagram of a data migration engine in an embodiment of the present application;

[0034] Figure 9 An internal structural diagram of an electronic device in an embodiment of the present application. Detailed implementation manners

[0035] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0036] It should be noted that in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0037] To enable those skilled in the art of this technology to better understand the solution of this application, the following further details this application in conjunction with the accompanying drawings and specific embodiments.

[0038] Currently, the CXL protocol lacks dynamic analysis of multi-dimensional features such as access frequency and temporal locality, resulting in a high mis-migration rate and increased system latency instead. At the protocol support level, the existing CXL 3.0 standard lacks native energy consumption management fields, and manufacturers need to indirectly control the medium state through private protocols, leading to poor cross-platform compatibility. Moreover, the DRAM mode switch is achieved through multiple MMIO register reads and writes, introducing additional latency and unable to provide real-time feedback on the energy consumption state. In addition, traditional solutions have insufficient support for new media (such as ReRAM, MRAM), requiring customized drivers and hardware interfaces, with a long R & D cycle and poor scalability.

[0039] In dynamic load scenarios, the existing technologies are particularly insufficient. In AI training tasks, sudden data access causes the DRAM to frequently switch power consumption modes, and static strategies are difficult to respond quickly, leading to performance fluctuations. Generally speaking, the existing solutions cannot meet the requirements of green computing in terms of energy efficiency, real-time performance, and scalability, and there is an urgent need for innovative breakthroughs in software and hardware collaboration.

[0040] Specifically, the technical solutions of the current CXL protocol in the field of heterogeneous memory management have significant defects, mainly reflected in three aspects: static power consumption management, single medium access strategy, and insufficient protocol layer support.

[0041] (1)Limitations of static power consumption management strategies

[0042] Currently, a fixed power consumption mode is adopted, and the power consumption state of the memory medium cannot be dynamically adjusted according to the load. Specific problems include energy consumption waste: data accessed at a low frequency occupies high-power DRAM for a long time, resulting in a low energy efficiency ratio (TOPS / W). For example, in AI inference tasks, after the model parameters are loaded, they may only be frequently accessed during the initialization phase, and 80% of the data is idle during the subsequent inference process, but traditional solutions still keep it in the DRAM, causing energy consumption waste.

[0043] There is also a lack of dynamic response and an inability to perceive real-time load changes. For example, sudden access requests (such as real-time data analysis) may cause DRAM to frequently enter / exit low-power mode, resulting in additional energy consumption overhead.

[0044] (2) Simplified media access strategy

[0045] Existing technologies generally adopt a single medium optimization strategy, ignoring the differentiated characteristics of heterogeneous media, and over-reliance on DRAM leads to resource contention. The low power consumption characteristics of SCM / NVM are not fully utilized. Traditional solutions do not classify the hot and cold attributes of data, resulting in mixed storage of high-frequency access "hot data" and low-frequency "cold data". There is a lack of collaborative access mechanisms for DRAM, SCM, and NVM. It cannot effectively cooperate with the random access characteristics of DRAM, resulting in increased cross-media data transfer overhead.

[0046] (3) Insufficient support at the protocol layer

[0047] The CXL protocol has weak native support for energy management. First, there is a lack of energy status feedback: the CXL 3.0 protocol does not define a standard field for reporting real-time power consumption status. In addition, it is difficult to expand control instructions. The existing CXL.io protocol lacks dedicated commands for power management and requires indirect control of the media status through multiple read and write operations.

[0048] like Figure 1 As shown, in order to avoid the serious problem of energy waste caused by low-frequency access data occupying high-power DRAM for a long time, resulting in low energy efficiency ratio (TOPS / W) of memory modules, this application reduces the delay of media switching and reduces memory energy consumption. By setting a CXL controller between the host (HOST CPU) and the memory module, the CXL controller includes a hot and cold score calculator, an energy management module and a data migration engine. The memory module includes DRAM, SCM (storage-class memory), and NVM (non-volatile memory), where the storage medium type of DRAM is high-bandwidth memory, the storage medium type of SCM (storage-class memory) is low-power medium, and the storage medium type of NVM (non-volatile memory) is large-capacity memory. This application is based on the low-power heterogeneous memory management technology of the Compute Express Link (CXL) protocol. By integrating the energy consumption perception module and dynamic data migration strategy in the CXL controller, the energy efficiency of heterogeneous media such as DRAM, SCM (storage-class memory), and NVM (non-volatile memory) is optimized, and it is suitable for high-density computing scenarios such as data centers and edge servers.

[0049] This application realizes software and hardware collaboration through hardware architecture optimization and protocol layer expansion to achieve low-power heterogeneous memory management. The system architecture is divided into two levels: hardware layer and protocol layer.

[0050] Hardware layer: The host is interconnected with the CXL controller through the PCIE protocol; the CXL controller integrates a data migration engine and an energy consumption management module internally, which are responsible for data cold and hot classification and energy consumption management respectively; the CXL controller externally extends the link to connect different types of storage media, including three heterogeneous memory modules of DRAM / SCM / NVM, which are used to store different data types of hot data (Hot), warm data (Warm) and cold data (Cold), and to implement different energy consumption management strategies.

[0051] Protocol layer: The CXL.io protocol provides underlying device connection and device management functions, and adds information control such as energy consumption status and data migration; the CXL.cache protocol mainly solves the problem of multi-device cache coherence; the CXL.memory protocol realizes elastic expansion of memory resources, adds detailed energy consumption management fields, and sends the energy consumption information to the memory module while completing data migration for power consumption management of the memory module. Expand the CXL.memory protocol, add an energy consumption management TLP field, without affecting the existing CXL.io / CXL.cache functions, attach energy consumption management information during the process of dynamically expanding memory resources, and improve resource utilization and energy efficiency ratio; expand the CXL.io control interface for transmitting control information such as energy consumption status and data migration, and use it for basic information synchronization with the host and devices.

[0052] As Figure 2 shown, the embodiments of the present application provide a memory management method, including the following steps:

[0053] S1. Obtain the memory data of the memory page in the memory module, obtain the cold and hot score of the memory data of the memory page, and set a cold and hot mark for the memory page according to the cold and hot score;

[0054] S2. Obtain the type of the storage medium where the memory page is located, and determine whether to transfer the memory data of the memory page according to the type of the storage medium and the cold and hot mark set for the memory page;

[0055] S3. In response to transferring the memory data of the memory page, obtain the address of the storage medium where the memory page is located and the address of the target storage medium, and determine whether the current operating mode of the target storage medium supports data transfer;

[0056] S4. In response to the current operating mode of the target storage medium supporting data transfer, migrate the memory data of the memory page to the target storage medium according to the address of the target storage medium, otherwise convert the current operating mode of the target storage medium to support data transfer.

[0057] In this embodiment, hot and cold marks are set for memory pages according to the hot and cold score, so as to distinguish memory data with different hot and cold levels. By comparing with the type of storage medium where the memory page is located, it is determined whether to transfer the memory data of the memory page. Transferring the data to a storage medium matching the hot and cold mark can reduce energy consumption and avoid energy waste. Moreover, before data transfer, it is judged whether the current operating mode of the target storage medium supports data transfer, and the target storage medium is adjusted to an operating mode that supports data transfer. There is no need to always keep all storage media in an operating mode that supports data transfer, which can keep the energy consumption of the storage medium operating mode at the lowest level. It can realize reducing energy consumption by combining dynamic adjustment of data location according to load and static power management.

[0058] The memory management method is applied to a GPU server cluster and can serve various application scenarios with high concurrency and high computing power requirements, such as AI / HPC / cloud services.

[0059] As Figure 3 shown, in this embodiment, obtaining the memory data of the memory page in the memory module, obtaining the hot and cold score of the memory data of the memory page, and setting hot and cold marks for the memory page according to the hot and cold score include:

[0060] S11. Obtain the access frequency, temporal locality, and task priority of the memory data of the memory page;

[0061] S12. Obtain the hot and cold score of the memory data of the memory page according to the access frequency, temporal locality, and task priority of the memory data of the memory page;

[0062] S13. Obtain the types of hot and cold marks, where the hot and cold marks include hot data, warm data, and cold data, and mark hot and cold marks for the memory page according to the hot and cold score of the memory data of the memory page.

[0063] In this embodiment, obtaining the hot and cold score of the memory data of the memory page according to the access frequency, temporal locality, and task priority of the memory data of the memory page includes:

[0064] Set the temporal locality as a weight value that decreases with time based on an exponential decay model;

[0065] Set the weight coefficients of the access frequency, temporal locality, and task priority;

[0066] Multiply the access frequency, temporal locality, and task priority by their corresponding weight coefficients respectively and then sum to obtain the hot and cold score of the memory data of the memory page.

[0067] Specifically, the formula for the hot and cold score of the memory data of the memory page is: Score = 0.6 * Freq + 0.3 * Recency + 0.1 * Priority.

[0068] Among them, Freq is the access frequency. The access frequency (Freq) is the number of accesses within the statistical time window (T = 1s), which is a value between 0 and 1; Recency is the temporal locality. The temporal locality (Recency) is based on an exponential decay model, and the weight decreases with time. In the exponential decay model, λ = 0.1 (decay coefficient), and the unit of t is milliseconds; Priority is the task priority. The task priority (Priority) is marked by the operating system or application program (in the range of 0 - 1). For example, a real-time task = 1.0, and a batch task = 0.3.

[0069] This embodiment improves the LRU-K algorithm: it extends the traditional LRU to record the recent 3 access histories (K = 3), and combines the weighted popularity to calculate the candidate pages for eviction. Among them, the weight coefficients of the access frequency, temporal locality, and task priority are set to 0.6, 0.3, and 0.1 respectively, and these weight coefficients can also be adjusted according to the actual situation.

[0070] As Figure 4 shown, in this embodiment, obtaining the type of the storage medium where the memory page is located, and determining whether to perform data transfer on the memory data of the memory page according to the type of the storage medium and the hot-cold mark set for the memory page includes:

[0071] S21. Obtain the type of the storage medium in the memory module. The types of storage media include high-bandwidth memory, low-power consumption media, and large-capacity storage;

[0072] S22. Obtain the types of preset hot-cold marks of the memory data stored corresponding to the type of the storage medium. The memory data marked as hot data is stored in the high-bandwidth memory, the memory data marked as warm data is stored in the low-power consumption media, and the memory data marked as cold data is stored in the large-capacity storage;

[0073] S23. Obtain the types of preset hot-cold marks corresponding to the type of the storage medium where the memory page is located, and determine whether the hot-cold mark marked on the memory data of the memory page is the same as the types of preset hot-cold marks corresponding to the type of the storage medium where the memory page is located. If they are different, it is determined to perform data transfer on the memory data of the memory page; otherwise, it is determined not to perform data transfer on the memory data of the memory page.

[0074] It is understandable that the CXL controller externally extends the link to connect different types of storage media, can obtain the storage media type in the memory module, and has a dual-port DMA controller as the connection port, supporting concurrent transmission between DRAM and SCM / NVM with a bandwidth of 64GB / s. Among the storage media types in the memory module, the storage medium for high-bandwidth memory is DRAM, the storage medium for low-power media is SCM (Storage-Class Memory), and the storage medium for large-capacity storage is NVM (Non-Volatile Memory). In DRAM, the memory data marked as hot data is stored correspondingly, in SCM, the memory data marked as warm data is stored correspondingly, and in NVM, the memory data marked as cold data is stored correspondingly. By classifying and storing memory data according to hot and cold markings, it can prevent warm data and cold data from occupying high-bandwidth memory space and prevent cold data from occupying low-power media space.

[0075] Among them, the characteristics of hot data are: high-frequency access (>100 times / second), recently used (last access time <10ms), and associated with high-priority tasks. The storage strategy for hot data is: retained in DRAM, and high-speed cache lines are preferentially allocated.

[0076] The characteristics of warm data are: medium access frequency (10 - 100 times / second), weak temporal locality (last access time 10ms - 1s), and normal priority. The storage strategy for warm data is: temporarily stored in SCM, and dynamically upgraded or downgraded according to the load pressure.

[0077] The characteristics of cold data are: low-frequency access (<10 times / second), long-term unused (last access time >1s), and low priority or background tasks. The storage strategy for cold data is: migrated to NVM to release DRAM resources.

[0078] Among them, setting hot and cold markings for memory pages according to hot and cold scores includes:

[0079] Comparing the hot and cold scores with the first threshold;

[0080] When the hot and cold score is less than the first threshold and the utilization rate of the storage medium of high-bandwidth memory is greater than the preset utilization rate threshold, set the hot and cold marking for the memory page as cold data, and forcibly migrate the memory data of the memory page;

[0081] When the hot and cold score is greater than or equal to the first threshold and less than or equal to the second threshold, set the hot and cold marking for the memory page as warm data, and asynchronously migrate the memory data of the memory page.

[0082] In this embodiment, an adaptive migration strategy is adopted: design a hardware migration circuit in the CXL controller to automatically migrate cold data to low-power media (such as SCM / NVM), and retain hot data in DRAM.

[0083] Forced migration: When Score < 0.4 and DRAM utilization > 80%, immediately migrate cold data;

[0084] Suggested migration: Asynchronously migrate data with Score ∈ [0.4, 0.6] to avoid blocking the critical path.

[0085] As Figure 5 shown, in this embodiment, in response to data transfer of the memory data of a memory page, the address of the storage medium where the memory page is located and the address of the target storage medium are obtained, and determining whether the current operating mode of the target storage medium supports data transfer includes:

[0086] S31. After confirming the memory data type of the memory page and the target storage medium, perform address conversion, and obtain the address of the target storage medium by querying the address conversion table;

[0087] S32. Obtain the current operating mode of the target storage medium according to the address of the target storage medium, and obtain the transfer operating mode preset for the target storage medium to perform data transfer;

[0088] S33. Determine whether the current operating mode of the target storage medium is the transfer operating mode. If so, it is determined that the current operating mode of the target storage medium supports data transfer; otherwise, it is determined that the current operating mode of the target storage medium does not support data transfer.

[0089] Among them, the address conversion table is a 16K entry mapping relationship stored in SRAM, and the hash index combined with the Bloom filter realizes a 5ns query latency.

[0090] As Figure 6 shown, in this embodiment, in response to the current operating mode of the target storage medium supporting data transfer, migrating the memory data of the memory page to the target storage medium according to the address of the target storage medium includes:

[0091] S41. Migrate the memory data of the memory page to the target storage medium according to the address of the target storage medium, and determine whether the memory data of the memory page has been transferred;

[0092] S42. After the memory data of the memory page is transferred, update the address conversion table and release the space of the storage medium where the memory page is located.

[0093] This application can reduce energy consumption and avoid the energy consumption of maintaining a large storage space by timely releasing the space of the storage medium where the memory page is located.

[0094] In this embodiment, before migrating the memory data of the memory page to the target storage medium according to the address of the target storage medium, it further includes:

[0095] Lock the address of the storage medium where the memory page is located, and read the memory data of the memory page from the address of the storage medium where the memory page is located.

[0096] Among them, locking the address of the storage medium where the memory page is located can prevent concurrent access conflicts.

[0097] In this embodiment, before migrating the memory data of the memory page to the target storage medium according to the address of the target storage medium, it further includes:

[0098] Judge the validity of the data migration permission and parameters. If it is valid, check whether it meets the switching limit conditions. If it is invalid, send an alarm message;

[0099] In response to meeting the switching limit conditions, it is judged that the data migration is legal, and the memory data of the memory page is migrated to the target storage medium.

[0100] Among them, the CXL controller parses the request, verifies the validity of the permission and parameters, and also needs to check whether it meets the switching limit conditions; if it is legal, the information is sent to the target medium, the GPIO signal is driven to switch the medium state, and the internal state machine is updated.

[0101] In this embodiment, converting the current operating mode of the target storage medium to support data transfer includes:

[0102] Obtain whether there is an intermediate transition mode when the current operating mode of the target storage medium is converted to a preset transfer operating mode for data transfer;

[0103] In response to the existence of an intermediate transition mode, the current operating mode of the target storage medium is converted to the intermediate transition mode, and then the intermediate transition mode is converted to the transfer operating mode;

[0104] In response to the non-existence of an intermediate transition mode, the current operating mode of the target storage medium is converted to the transfer operating mode.

[0105] Among them, the data migration engine drives the storage medium to switch the operating mode through the GPIO signal, so that the DRAM switching delay < 100ns.

[0106] Specifically, define multi-level power consumption modes P1 - P6, and dynamically switch according to the storage medium type:

[0107] DRAM: full-speed mode (P1: 5W / GB), self-refresh mode (P2: 1W / GB);

[0108] SCM: full-speed mode (P3: 2W / GB), low-power mode (P4: 0.5W / GB);

[0109] NVM: Full-speed mode (P5: 1W / GB), Deep sleep mode (P6: 0.1W / GB).

[0110] Among them, the state transition mechanism of each storage medium is as follows:

[0111] First, the full-speed mode of DRAM state transition is converted to self-refresh mode:

[0112] Condition: DRAM has not been accessed for 5 consecutive cycles (5ms).

[0113] Operation: Send PRECHARGE ALL command and enter the low-power state.

[0114] Second, the self-refresh mode of DRAM state transition is converted to full-speed mode:

[0115] Condition: An access request is detected.

[0116] Operation: Send REFRESH EXIT command to restore the full-speed mode.

[0117] Third, the full-speed mode of SCM state transition is converted to low-power mode:

[0118] Condition: SCM has not been accessed for 20 consecutive cycles (20ms).

[0119] Operation: Turn off the redundant power domain and retain the critical status register.

[0120] Fourth, the low-power mode of SCM state transition is converted to full-speed mode:

[0121] Condition: An access request is detected.

[0122] Operation: Restore the power and initialize the I / O interface.

[0123] Fifth, the full-speed mode of NVM state transition is converted to deep sleep mode:

[0124] Condition: NVM has not been accessed for 100 consecutive cycles (100ms).

[0125] Operation: Disconnect the main power supply and only retain the standby circuit.

[0126] Sixth, the deep sleep mode of NVM state transition is converted to full-speed mode:

[0127] Condition: The controller sends an activation command or a direct access request.

[0128] Operation: Re-power on and load the metadata.

[0129] In this embodiment, converting the current operating mode of the target storage medium to support data transfer includes:

[0130] Obtain the limiting conditions of the target storage medium, and analyze the limiting conditions of the target storage medium to judge the preconditions for converting from the current operating mode to the target operating mode that supports data transfer;

[0131] Control the target storage medium to meet the preconditions. After the target storage medium meets the preconditions, convert the current operating mode to the target operating mode.

[0132] Among them, the switching limiting conditions are as follows:

[0133] DRAM: It cannot be directly switched from the full-speed mode to the deep sleep mode and needs to transition through the self-refresh mode;

[0134] SCM: Writing is prohibited in the low-power mode, and only reading is supported;

[0135] NVM: At least 1 ms of wake-up time needs to be reserved in the deep sleep mode, and access requests are queued during this period.

[0136] Among them, by first obtaining the limiting conditions for conversion when converting the current operating mode of the target storage medium to support data transfer, and then implementing the operating mode conversion after meeting the preconditions, the smooth completion of the operating mode conversion can be ensured.

[0137] In this embodiment, converting the current operating mode of the target storage medium to support data transfer includes:

[0138] Configure the target storage medium to the required state according to the energy consumption management information, and send a pre-wake-up signal to the target storage medium;

[0139] In response to the target storage medium receiving the pre-wake-up signal, perform an operating mode conversion.

[0140] When data enters the memory module through the CXL controller, the CXL controller obtains data information through the CXL.io protocol, and marks a certain memory page as hot data (Hot), warm data (Warm), and cold data (Cold) through the hot and cold scoring calculator. After confirming the data type and the target storage medium, the data migration engine performs address conversion, obtains the target DRAM / SCM / NVM physical address by querying the address conversion table. At this time, notify the DMA controller to read data from the source DRAM through the CXL.memory protocol, migrate the memory data to the target storage medium according to the DRAM / SCM / NVM target address, update the address conversion table after completing the data migration, and release the source DRAM space.

[0141] Meanwhile, information such as power consumption mode, medium information, and mode switching is sent to the target storage medium through the CXL.memory protocol. The target storage medium is configured to the required state according to the energy consumption management information. At this time, if the target DRAM / SCM / NVM is in the low-power or self-refresh mode, a pre-wake-up signal will be sent; support the dynamic operation mode switching of DRAM, SCM, and NVM, and the real-time energy consumption status can be reported to the host side by extending the CXL.io protocol field.

[0142] In this embodiment, after the memory data of the memory page is transferred, it further includes:

[0143] Obtain the real-time energy consumption status data of the target storage medium, set a preset duration for reporting the real-time energy consumption status data at intervals, and report the real-time energy consumption status data of the target storage medium to the host side according to the preset duration or after the operation mode of the target storage medium is converted.

[0144] Add a 16-byte extended field in the CXL.memory TLP of the CXL protocol layer, including the medium type (DRAM / SCM / NVM), the current power consumption mode (full-speed mode / low-power mode / deep sleep mode), and the cumulative energy consumption value (μJ). The newly added 16-byte field is located in the extended area of the TLP header, does not affect the original data transmission and control logic, and is compatible with existing CXL devices (such as memory modules, accelerators). Moreover, the ASIC / FPGA controller can support the parsing of the new field through microcode upgrade without reconstructing the physical layer and link layer design.

[0145] The CXL protocol layer also includes a mode switching instruction, which defines a dedicated opcode (Opcode = 0x2F) for issuing a switching command and supports execution and permission verification, etc. An example of switching the SCM to the low-power mode is: medium type = 0x2, target mode = 0x1.

[0146] CXL.io adds control information bytes such as energy consumption status and data migration.

[0147] In this embodiment, the memory management method further includes:

[0148] Send a request packet to the memory module, and the request packet is used to issue a running mode switching command or an energy consumption query request;

[0149] After sending the request packet, obtain a completion packet, and the completion packet is used to return the energy consumption status data or the operation result of the running mode switching.

[0150] The CXL protocol is highly scalable in design. Its Transaction Layer reserves flexible header extension space, supporting the addition of new custom fields. New fields are registered through the CXL.memory and CXL.io management interfaces to ensure coordinated operations between the Host and devices, enabling elastic expansion of memory pooling resources and avoiding conflicts with the CXL.cache protocol. CXL.memory defines the transmission mechanism through TLP extension. The (Status Management Unit) mainly completes device status energy consumption query and energy consumption mode switching. Among them, the Request TLP is used to issue mode switching commands or query requests; the Completion TLP is used to return the energy consumption status or confirm the operation result.

[0151] Among them, the energy consumption status data feedback is reported periodically. By default, the current status is reported once every 1ms through the Completion TLP, and it is reported immediately after the storage medium operation mode is switched; users can also integrate command tools in the firmware for active query, and the Host forcibly obtains the real-time status through the Request TLP.

[0152] Among them, the energy consumption mode switching can be issued by the CXL controller to the target medium, or the user can issue the switching instruction by himself at the host side. The implementation steps are as follows:

[0153] 1. Software initiates a request:

[0154] The Host driver constructs a Request TLP (Opcode = 0x2F), specifying the target medium and mode;

[0155] Example: The method to switch the SCM to the low power consumption mode is: medium type = 0x2, target mode = 0x1.

[0156] 2. Controller response:

[0157] The CXL controller parses the request, validates the permissions and parameter validity, and also needs to verify whether it meets the switching limit conditions (introduced below); if legal, it will send the information to the target medium, drive the GPIO signal to switch the medium state, and update the internal state machine.

[0158] 3. Completion confirmation:

[0159] The CXL controller returns a Completion TLP, containing the operation result (success / failure code);

[0160] When it fails, additional error details are attached (such as invalid mode or medium failure).

[0161] The switching limit conditions are as follows:

[0162] DRAM cannot directly switch from the full-speed mode to the deep sleep mode and needs to transition through the self-refresh mode;

[0163] Writing is prohibited in the low-power mode of SCM, and only reading is supported;

[0164] At least 1 ms of wake-up time needs to be reserved for the deep sleep mode of NVM, and access requests are queued during this period.

[0165] The specific field extensions of CXL.Mem TLP are defined as shown in Table 1.

[0166] Table 1 Field Extension Definitions

[0167]

[0168] Through the above medium power consumption definitions and state transition mechanisms, dynamic load adaptation can be achieved, data locations can be dynamically allocated in combination with cold and hot scoring (Score), and the utilization rate of each medium can be monitored in real time. Through collaborative operations at the protocol layer, the current power consumption mode is reported and issued through the extended fields (ESFs) of the CXL.mem and CXL.io protocols, the energy consumption ratio of each medium is statistically analyzed in real time, task scheduling is optimized, the effect of allocating cold and hot data on demand and dynamically managing energy consumption is achieved, and resource costs are allocated according to energy consumption in the cloud computing scenario.

[0169] Through the description of the above implementation manners, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation manner.

[0170] As Figure 7 、 Figure 8 shown, the embodiments of the present application also provide a memory management device 10, including: a cold and hot scoring calculator 1, an energy consumption management module 2, and a data migration engine 3;

[0171] The cold and hot scoring calculator 1 is used to obtain the memory data of the memory page in the memory module, obtain the cold and hot score of the memory data of the memory page, and set a cold and hot mark for the memory page according to the cold and hot score;

[0172] The data migration engine 3 is used to obtain the type of the storage medium where the memory page is located, and determine whether to transfer the memory data of the memory page according to the type of the storage medium and the cold and hot mark set for the memory page;

[0173] The energy consumption management module 2 is used to, in response to transferring the memory data of the memory page, obtain the address of the storage medium where the memory page is located and the address of the target storage medium, and determine whether the current operating mode of the target storage medium supports data transfer;

[0174] The data migration engine 3 is used to support data transfer in response to the current operating mode of the target storage medium, and then migrate the memory data of the memory page to the target storage medium according to the address of the target storage medium. Otherwise, the power consumption management module 2 is used to convert the current operating mode of the target storage medium to support data transfer.

[0175] In this embodiment, obtaining the memory data of the memory page in the memory module, obtaining the hot and cold score of the memory data of the memory page, and setting the hot and cold mark for the memory page according to the hot and cold score includes:

[0176] Obtaining the access frequency, temporal locality, and task priority of the memory data of the memory page;

[0177] Obtaining the hot and cold score of the memory data of the memory page according to the access frequency, temporal locality, and task priority of the memory data of the memory page;

[0178] Obtaining the types of hot and cold marks, where the hot and cold marks include hot data, warm data, and cold data, and marking the hot and cold marks for the memory page according to the hot and cold score of the memory data of the memory page.

[0179] In this embodiment, obtaining the hot and cold score of the memory data of the memory page according to the access frequency, temporal locality, and task priority of the memory data of the memory page includes:

[0180] Setting the temporal locality as a weight value that decreases with time based on an exponential decay model;

[0181] Setting the weight coefficients of the access frequency, temporal locality, and task priority;

[0182] Multiplying the access frequency, temporal locality, and task priority by their corresponding weight coefficients respectively and then summing them to obtain the hot and cold score of the memory data of the memory page.

[0183] In this embodiment, obtaining the type of the storage medium where the memory page is located, and determining whether to perform data transfer on the memory data of the memory page according to the type of the storage medium and the hot and cold mark set for the memory page includes:

[0184] Obtaining the type of the storage medium in the memory module, where the storage medium types include high-bandwidth memory, low-power consumption medium, and large-capacity memory;

[0185] Obtaining the types of preset hot and cold marks of the memory data stored corresponding to the storage medium type. The memory data marked as hot data is stored correspondingly in the high-bandwidth memory, the memory data marked as warm data is stored correspondingly in the low-power consumption medium, and the memory data marked as cold data is stored correspondingly in the large-capacity memory;

[0186] Obtain the type of the preset cold-hot mark corresponding to the storage medium where the memory page is located, and determine whether the cold-hot mark marked by the memory data of the memory page is the same as the type of the preset cold-hot mark corresponding to the storage medium where the memory page is located. If they are different, it is determined that data transfer is to be performed on the memory data of the memory page; otherwise, it is determined that data transfer is not to be performed on the memory data of the memory page.

[0187] In this embodiment, in response to performing data transfer on the memory data of the memory page, obtain the address of the storage medium where the memory page is located and the address of the target storage medium. Determining whether the current operating mode of the target storage medium supports data transfer includes:

[0188] After confirming the memory data type of the memory page and the target storage medium, perform address conversion, and obtain the address of the target storage medium by querying the address conversion table;

[0189] Obtain the current operating mode of the target storage medium according to the address of the target storage medium, and obtain the transfer operating mode preset for the target storage medium to perform data transfer;

[0190] Determine whether the current operating mode of the target storage medium is the transfer operating mode. If so, it is determined that the current operating mode of the target storage medium supports data transfer; otherwise, it is determined that the current operating mode of the target storage medium does not support data transfer.

[0191] In this embodiment, in response to the current operating mode of the target storage medium supporting data transfer, migrating the memory data of the memory page to the target storage medium according to the address of the target storage medium includes:

[0192] Migrate the memory data of the memory page to the target storage medium according to the address of the target storage medium, and determine whether the memory data of the memory page has been transferred;

[0193] After the memory data of the memory page is transferred, update the address conversion table and release the space of the storage medium where the memory page is located.

[0194] In this embodiment, before migrating the memory data of the memory page to the target storage medium according to the address of the target storage medium, it also includes:

[0195] Lock the address of the storage medium where the memory page is located, and read the memory data of the memory page from the address of the storage medium where the memory page is located.

[0196] In this embodiment, before migrating the memory data of the memory page to the target storage medium according to the address of the target storage medium, it also includes:

[0197] Judge the validity of the data transfer permission and parameters. If it is valid, check whether it meets the switching limit conditions. If it is invalid, send an alarm message;

[0198] In response to meeting the switching limit conditions, it is determined that the data migration is legal, and the memory data of the memory page is migrated to the target storage medium.

[0199] In this embodiment, converting the current operating mode of the target storage medium to support data transfer includes:

[0200] Obtain whether there is an intermediate transition mode when converting the current operating mode of the target storage medium to a transfer operating mode for preset data transfer;

[0201] In response to the existence of an intermediate transition mode, convert the current operating mode of the target storage medium to the intermediate transition mode, and then convert the intermediate transition mode to the transfer operating mode;

[0202] In response to the non-existence of an intermediate transition mode, convert the current operating mode of the target storage medium to the transfer operating mode.

[0203] In this embodiment, converting the current operating mode of the target storage medium to support data transfer includes:

[0204] Configure the target storage medium to the demand state according to the energy consumption management information, and send a pre-wake-up signal to the target storage medium;

[0205] In response to the target storage medium receiving the pre-wake-up signal, perform an operating mode conversion.

[0206] In this embodiment, after the data transfer of the memory data of the memory page, it further includes:

[0207] Obtain the real-time energy consumption status data of the target storage medium, set a preset duration for periodically reporting the real-time energy consumption status data, and report the real-time energy consumption status data of the target storage medium to the host side according to the preset duration or after the operating mode conversion of the target storage medium.

[0208] As Figure 7 shown, in this embodiment, the memory management device 10 further includes: an instruction query module 4.

[0209] The instruction query module 4 is used to send a request packet to the memory module. The request packet is used to issue an operating mode switching command or an energy consumption query request; after sending the request packet, obtain a completion packet, and the completion packet is used to return the energy consumption status data or the operating mode switching operation result.

[0210] For the description of the features in the corresponding embodiment of the memory management device, reference can be made to the relevant description of the corresponding embodiment of the memory management method, which will not be elaborated here one by one.

[0211] An embodiment of the present application further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above embodiments of the memory management method.

[0212] The electronic device may be a server, and its internal structure diagram may be as Figure 9 shown. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store memory management data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a memory management method is implemented.

[0213] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above embodiments of the memory management method when running.

[0214] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drive, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disk, magnetic disk, or optical disc, and other various media that can store computer programs.

[0215] An embodiment of the present application further provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by the processor, the steps in any of the above embodiments of the memory management method are implemented.

[0216] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps in any of the above embodiments of the memory management method are implemented.

[0217] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0218] The above has introduced in detail a memory management method, an electronic device, a storage medium, and a computer program product provided by this application. Specific examples are used herein to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of this application, several improvements and modifications can still be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A memory management method, applied to a memory management controller in a memory management system, characterized in that The memory management system further includes a host and at least one storage medium. The memory management controller communicates with the host through the PCIE protocol, and the memory management controller is interconnected with the at least one storage medium through the CXL protocol. The CXL protocol includes a storage medium type field and a current operating mode field, including: Obtain the memory data of the memory page in the memory module, obtain the cold-hot score of the memory data of the memory page, and set a cold-hot mark for the memory page according to the cold-hot score, including: obtaining the access frequency, temporal locality, and task priority of the memory data of the memory page; obtaining the cold-hot score of the memory data of the memory page according to the access frequency, temporal locality, and task priority of the memory data of the memory page; obtaining the types of cold-hot marks, where the cold-hot marks include hot data, warm data, and cold data, and marking the cold-hot mark for the memory page according to the cold-hot score of the memory data of the memory page; Obtain the type of the storage medium where the memory page is located, and determine whether to transfer the memory data of the memory page according to the type of the storage medium and the cold-hot mark set for the memory page. The storage medium types include high-bandwidth memory, low-power consumption medium, and large-capacity memory. The high-bandwidth memory stores the memory data marked as hot data correspondingly, the low-power consumption medium stores the memory data marked as warm data correspondingly, and the large-capacity memory stores the memory data marked as cold data correspondingly; In response to transferring the memory data of the memory page, determine the target storage medium from the at least one storage medium according to the cold-hot mark of the memory data to be transferred, and obtain the address of the storage medium where the memory page is located and the address of the target storage medium, and determine whether the current operating mode of the target storage medium supports data transfer; If the current operating mode of the target storage medium supports data transfer, then migrate the memory data of the memory page to the target storage medium according to the address of the target storage medium. Otherwise, convert the current operating mode of the target storage medium to support data transfer. The conversion of the current operating mode of the target storage medium to support data transfer includes: obtaining the limit conditions of the target storage medium of the target storage medium, parsing the limit conditions of the target storage medium to judge the preconditions for the target operating mode to be converted from the current operating mode to support data transfer; controlling the target storage medium to meet the preconditions, and after the target storage medium meets the preconditions, convert the current operating mode to the target operating mode; Obtain the operating modes supported by the target storage medium according to the type of the target storage medium, obtain the consecutive unaccessed periods and real-time energy consumption status data in the current operating mode of the target storage medium, and drive the target storage medium to perform an operating mode switch according to the consecutive unaccessed periods and the real-time energy consumption status data.

2. The memory management method according to claim 1, wherein The obtaining the cold-hot score of the memory data of the memory page according to the access frequency, temporal locality, and task priority of the memory data of the memory page includes: Set the temporal locality to a weight value that decreases over time based on an exponential decay model; Set the weight coefficients for the access frequency, the temporal locality, and the task priority; Multiply the access frequency, the temporal locality, and the task priority by their respective weight coefficients and sum them to obtain the cold - hot score of the memory data of the memory page.

3. The memory management method according to claim 1, wherein The obtaining the type of the storage medium where the memory page is located and determining whether to perform data transfer on the memory data of the memory page according to the type of the storage medium and the cold - hot flag set for the memory page includes: Obtain the type of the storage medium in the memory module; Obtain the types of the preset cold - hot flags of the memory data stored corresponding to the type of the storage medium; Obtain the types of the preset cold - hot flags corresponding to the type of the storage medium where the memory page is located, and determine whether the cold - hot flag marked for the memory data of the memory page is the same as the types of the preset cold - hot flags corresponding to the type of the storage medium where the memory page is located. If not, it is determined to perform data transfer on the memory data of the memory page; otherwise, it is determined not to perform data transfer on the memory data of the memory page.

4. The memory management method according to claim 1, wherein In response to performing data transfer on the memory data of the memory page, obtain the address of the storage medium where the memory page is located and the address of the target storage medium, and determine whether the current operating mode of the target storage medium supports data transfer, including: After confirming the memory data type of the memory page and the target storage medium, perform address conversion, and obtain the address of the target storage medium by querying the address conversion table; Obtain the current operating mode of the target storage medium according to the address of the target storage medium, and obtain the transfer operating mode preset for the target storage medium to perform data transfer; Determine whether the current operating mode of the target storage medium is the transfer operating mode. If so, it is determined that the current operating mode of the target storage medium supports data transfer; otherwise, it is determined that the current operating mode of the target storage medium does not support data transfer.

5. The memory management method according to claim 4, wherein In response to the current operating mode of the target storage medium supporting data transfer, migrate the memory data of the memory page to the target storage medium according to the address of the target storage medium, including: Migrate the memory data of the memory page to the target storage medium according to the address of the target storage medium, and determine whether the memory data of the memory page has completed the transfer; In response to the memory data of the memory page completing the transfer, update the address conversion table and release the space of the storage medium where the memory page is located.

6. The memory management method according to claim 5, wherein Before migrating the memory data of the memory page to the target storage medium according to the address of the target storage medium, it also includes: Lock the address of the storage medium where the memory page is located, and read the memory data of the memory page from the address of the storage medium where the memory page is located.

7. The memory management method according to claim 5, wherein Before migrating the memory data of the memory page to the target storage medium according to the address of the target storage medium, it also includes: Judge the validity of the data migration permission and parameters. If valid, check whether it meets the switching limit conditions. If invalid, send an alarm message; In response to meeting the switching limit conditions, it is determined that the data migration is legal, and the memory data of the memory page is migrated to the target storage medium.

8. The memory management method according to claim 4, wherein The conversion of the current operating mode of the target storage medium to support data transfer includes: Obtaining whether there is an intermediate transition mode when the current operating mode of the target storage medium is converted to a transfer operating mode for preset data transfer; In response to the existence of an intermediate transition mode, converting the current operating mode of the target storage medium to the intermediate transition mode, and then converting the intermediate transition mode to the transfer operating mode; In response to the non-existence of an intermediate transition mode, converting the current operating mode of the target storage medium to the transfer operating mode.

9. The memory management method according to claim 1, characterized in that The conversion of the current operating mode of the target storage medium to support data transfer includes: Configuring the target storage medium to a demand state according to the energy consumption management information, and sending a pre-wake-up signal to the target storage medium; In response to the target storage medium receiving the pre-wake-up signal, performing an operating mode conversion.

10. The memory management method according to claim 1, wherein After the data transfer of the memory data of the memory page, it further includes: Obtaining the real-time energy consumption status data of the target storage medium, setting a preset duration for periodically reporting the real-time energy consumption status data, and reporting the real-time energy consumption status data of the target storage medium to the host side according to the preset duration or after the operating mode conversion of the target storage medium.

11. The memory management method according to claim 1, wherein It further includes: Sending a request packet to the memory module, where the request packet is used to issue an operating mode switching command or an energy consumption query request; Obtaining a completion packet after sending the request packet, where the completion packet is used to return the energy consumption status data or the operation result of the operating mode switching.

12. An electronic device, characterized in that, It includes: A memory for storing a computer program; A processor for implementing the steps of the memory management method according to any one of claims 1 to 11 when executing the computer program.

13. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, where the computer program implements the steps of the memory management method according to any one of claims 1 to 11 when executed by a processor.

14. A computer program product, comprising a computer program, characterized in that, The computer program implements the steps of the memory management method according to any one of claims 1 to 11 when executed by a processor.

Citation Information

Patent Citations

  • Management method and management device of hybrid memory system, equipment and medium

    CN117234432A

  • Reducing memory power usage in far memory

    US20230086149A1