WO2024082702A1 - Procédé et appareil de traitement de données, puce et support de stockage lisible par ordinateur - Google Patents

Procédé et appareil de traitement de données, puce et support de stockage lisible par ordinateur Download PDF

Info

Publication number
WO2024082702A1
WO2024082702A1 PCT/CN2023/103852 CN2023103852W WO2024082702A1 WO 2024082702 A1 WO2024082702 A1 WO 2024082702A1 CN 2023103852 W CN2023103852 W CN 2023103852W WO 2024082702 A1 WO2024082702 A1 WO 2024082702A1
Authority
WO
WIPO (PCT)
Prior art keywords
physical page
storage medium
memory
cache
data
Prior art date
Application number
PCT/CN2023/103852
Other languages
English (en)
Chinese (zh)
Inventor
杨春
杨瑞
祝晓平
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024082702A1 publication Critical patent/WO2024082702A1/fr

Links

Definitions

  • the present application relates to the field of storage technology, and in particular to a data processing method, device, chip and computer-readable storage medium.
  • the processor usually reads the data to be migrated from one storage medium in the hybrid memory system first, and then writes the read data to be migrated to another storage medium in the hybrid memory system.
  • the above data migration process depends on the progress of data transfer, and the reading process of all the data to be migrated must be completed before the operation of writing the data to be migrated to another storage medium can be performed, which increases the time of data migration and reduces the efficiency of data migration.
  • the present application provides a data processing method, device, chip and computer-readable storage medium, which can improve data migration efficiency.
  • a data processing method is provided, which is applied to a hybrid memory system, the hybrid memory system comprising a first storage medium and a second storage medium, wherein access performance of the first storage medium is better than access performance of the second storage medium, and the method comprises the following steps: first obtaining a first migration detection result of a first physical page used as memory of an electronic device in the first storage medium; if the first migration detection result satisfies a first data migration condition, then selecting a second physical page from the second storage medium, wherein the second physical page is a candidate physical page used as memory in the second storage medium; thereafter, using the second physical page as memory, and using the first physical page as a cache of the second physical page.
  • This method uses the first physical page as a cache of a candidate physical page in the second storage medium when the first migration detection result of the first physical page meets the first data migration condition, and uses the candidate physical page as a memory physical page in the second storage medium, so that the data in the first physical page becomes the cache data of the memory physical page in the second storage medium, avoiding the data in the first physical page from being written back to the second storage medium later, and also avoiding the written-back data from being migrated to the first storage medium again, thereby simplifying the data migration process, reducing the overhead of reading and writing data back and forth during the data migration process, and improving the data migration efficiency.
  • the second physical page is used as memory by converting the candidate state of the second physical page into a memory state, wherein the candidate state is used to indicate that the corresponding physical page is a candidate physical page, and the memory state is used to indicate that the corresponding physical page is used as memory.
  • the second physical page can be used as a memory by converting the state of the second physical page, and the implementation manner is simple and convenient.
  • the first mapping relationship is used to indicate that the first physical page is in a memory state
  • the media address is used to indicate the position of the corresponding physical page in the storage medium to which it belongs
  • the first memory address is used to indicate the position of the first physical page in the memory when it is used as a memory.
  • the first mapping relationship is also used to indicate that the physical page associated with the first memory address is in a memory state.
  • the media address of the physical page in the candidate state in the second storage medium i.e., the candidate physical page
  • the media address of the second physical page in the candidate list is deleted, and the media address in the first mapping relationship is modified to the media address of the second physical page to realize the conversion of the candidate state of the second physical page into a memory state.
  • the first physical page in the memory state is recorded by the first mapping relationship and the candidate physical page is recorded by the candidate list, and then the second physical page can be replaced by the first mapping relationship by deleting the record of the second physical page in the candidate list.
  • the first physical page is used as memory, and the implementation is simple.
  • the first physical page is used as a cache of the second physical page by converting the memory state of the first physical page to a cache state and associating the second physical page with the first physical page.
  • the memory state is used to indicate that the corresponding physical page is used as a memory
  • the cache state is used to indicate that the corresponding physical page is a cache of the associated physical page.
  • the first physical page can be used as a cache of the second physical page, and the implementation manner is simple.
  • the above-mentioned method of converting the memory state of the first physical page into a cache state and associating the second physical page with the first physical page includes: first invalidating the first mapping relationship between the media address of the first physical page and the first memory address in the hybrid memory system; and then establishing a second mapping relationship between the media address of the first physical page and the media address of the second physical page, wherein the first mapping relationship is used to indicate that the first physical page is in a memory state, the media address is used to indicate the position of the corresponding physical page in the storage medium to which it belongs, the memory address is used to indicate the position of the corresponding physical page in the memory when it is used as memory, and the second mapping relationship is used to indicate that the first physical page is a cache of the associated second physical page.
  • the first physical page is not in the memory state, and by establishing the second mapping relationship, the first physical page becomes the cache of the second physical page.
  • the implementation manner is simple.
  • the method also includes the following steps: obtaining a second migration detection result of the third physical page in the second storage medium, and if the second migration detection result meets the second data migration condition, selecting a fourth physical page from the first storage medium, wherein the third physical page is a physical page used as memory in the second storage medium and the fourth physical page is a cache of the third physical page in the first storage medium; thereafter, the fourth physical page is used as memory and the third physical page is used as a candidate physical page.
  • the fourth physical page replaces the third physical page as memory.
  • the fourth physical page was a cache of the third physical page, and the fourth physical page may cache data of the third physical page. If the fourth physical page caches all the data of the third physical page, there is no need to migrate data from the third physical page, which simplifies the data migration process and improves data migration efficiency.
  • the first storage medium includes at least one cache physical page, each cache physical page is associated with a physical page used as memory in the second storage medium, and each cache physical page is used as a cache for the associated physical page. Based on this, the fourth physical page is selected from the first storage medium by determining a cache physical page associated with the third physical page in at least one cache physical page as the fourth physical page.
  • the fourth physical page is used as memory by disassociating the third physical page from the fourth physical page and converting the cache state of the fourth physical page to a memory state, wherein the cache state is used to indicate that the corresponding physical page is a cache of the associated physical page, and the memory state is used to indicate that the corresponding physical page is used as memory.
  • the fourth physical page is no longer a cache of the third physical page.
  • the fourth physical page can be used as memory.
  • the implementation method is simple.
  • a third mapping relationship is provided between the media address of the third physical page and the second memory address in the hybrid memory system, the third mapping relationship is used to indicate that the third physical page is in a memory state, the media address is used to indicate the position of the corresponding physical page in the storage medium to which it belongs, and the memory address is used to indicate the position of the corresponding physical page in the memory when it is used as a memory.
  • converting the cache state of the fourth physical page to the memory state includes:
  • the fourth physical page can be placed in a memory state by modifying the third mapping relationship, and the implementation manner is simple.
  • the method before the fourth physical page is used as memory, the method further includes the following steps: querying the third physical page for data that has not been cached to the fourth physical page, and migrating the queried data to the fourth physical page.
  • whether the cache line of the fourth physical page stores data is recorded by the cache line status.
  • the above-mentioned query of the data in the third physical page that has not been cached to the fourth physical page and the implementation process of migrating the queried data to the fourth physical page include: obtaining the cache line status of the cache line of the fourth physical page, if the cache status indicates that the cache line does not store data, migrating the data in the storage space corresponding to the cache line in the third physical page to the cache line.
  • the method after obtaining the second migration detection result of the third physical page in the second storage medium, the method also includes the following steps: if the second migration detection result meets the third data migration condition, writing the data stored in the fourth physical page to the third physical page; and releasing the association between the third physical page and the fourth physical page.
  • the storage space of the fourth physical page can be released so that the data of other physical pages in the second storage medium can be cached after the fourth physical page to improve the access efficiency of other physical pages.
  • the association between the third physical page and the fourth physical page is removed by invalidating a fourth mapping relationship between the media address of the third physical page and the media address of the fourth physical page, wherein the media address is used to indicate the location of the corresponding physical page in the storage medium.
  • the method also includes: obtaining an access request for a first target physical page in a hybrid memory system; if the first target physical page belongs to a first storage medium, accessing the first target physical page based on the access request; if the first target physical page belongs to a second storage medium, accessing a second target physical page associated with the first target physical page in the first storage medium based on the access request, the second target physical page being a cache of the first target physical page.
  • the first target physical page to be accessed belongs to the first storage medium, then based on the access request, the first target physical page is accessed, and since the access performance of the first storage medium is higher than that of the second storage medium, the first target physical page in the first storage medium can be quickly accessed. If the first target physical page belongs to the second storage medium, then based on the access request, the second target physical page associated with the first target physical page in the first storage medium is accessed, and since the access performance of the first storage medium is higher than that of the second storage medium, the second target physical page in the first storage medium can be quickly accessed.
  • a data processing device which includes modules for executing the data processing method in the first aspect or any possible implementation of the first aspect.
  • a chip is provided, wherein the chip is used to implement the operating steps of the data processing method in the first aspect or any possible implementation of the first aspect.
  • a computer-readable storage medium wherein at least one program code is stored in the storage medium, and the program code is read by a processor to enable a chip to execute the operation steps of the above-mentioned data processing method.
  • a computer program product or a computer program which includes a program code, and the program code is stored in a computer-readable storage medium.
  • the processor of the chip reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the chip executes the method provided in the above-mentioned first aspect or various optional implementations of the first aspect.
  • FIG1 is a schematic diagram of a hybrid memory system for applying a data processing method provided by the present application
  • FIG2 is a structural diagram of an electronic device using a hybrid memory system 1A provided by the present application.
  • FIG3 is a structural diagram of an electronic device using a hybrid memory system 1B provided by the present application.
  • FIG4 is a flow chart of a data processing method provided by the present application.
  • FIG5 is a flow chart of a data migration detection provided by the present application.
  • FIG6 is a flow chart of a method for accessing a hybrid memory system provided by the present application.
  • FIG7 is a schematic diagram of the structure of a data processing device provided by the present application.
  • FIG8 is a schematic diagram of the structure of another data processing device provided by the present application.
  • FIG. 9 is a schematic diagram of the structure of a chip provided in the present application.
  • the present application provides a data processing method applied to a hybrid memory system.
  • the hybrid memory system includes two storage media (such as a first storage medium and a second storage medium) with different access performances.
  • a memory physical page in the first storage medium that is, a physical page used as a memory
  • the memory physical page is the physical page of data to be migrated to the second storage medium (that is, the physical page to be migrated).
  • the method uses the physical page to be migrated as a cache of a candidate physical page in the second storage medium instead of a memory physical page, and uses the candidate physical page as a memory physical page in the second storage medium, so that the data in the physical page to be migrated becomes the cache data of the memory physical page in the second storage medium, and skips the process of migrating the data in the physical page to be migrated to the second storage medium.
  • the process simplifies the data migration process, thereby improving the efficiency of data migration.
  • FIG1 is a schematic diagram of a hybrid memory system for applying a data processing method provided by the present application.
  • the hybrid memory system 100 includes a plurality of storage media 11, a controller 12, and a manager 13.
  • the plurality of storage media 11 include a high bandwidth memory (HBM) 111, a solid state disk (SSD) 112, and a double data rate synchronous dynamic random access memory (DDR) 113.
  • HBM high bandwidth memory
  • SSD solid state disk
  • DDR double data rate synchronous dynamic random access memory
  • Each storage medium 11 corresponds to a controller 12.
  • the controller 12 corresponding to HBM 111 is an HBM controller 121
  • the controller 12 corresponding to SSD 112 is an SSD controller 122
  • the controller 12 corresponding to DDR is a DDR controller 123.
  • the controller 12 is used to control the storage medium 11 managed by it to exchange data with the outside.
  • Multiple storage media 11 are used to store data (such as computer program code or business data) and support application access.
  • the access performance of the multiple storage media 11 is different, where access performance refers to the performance that affects the storage medium in processing access requests, such as the access delay or access bandwidth of the storage medium, where the access request is used to indicate access to the storage medium, the access delay is the average time it takes for the storage medium to process the access request, and the access bandwidth is the bandwidth used when the storage medium receives the access request or returns the access result of the access request.
  • the types of multiple storage media 11 may also include other storage media that can be used as memory, such as phase change memory (PCM), magnetic random access memory (MRAM), and static random access memory (SRAM).
  • PCM phase change memory
  • MRAM magnetic random access memory
  • SRAM static random access memory
  • the hybrid memory system 100 involved in the present application includes two or more types of storage media, but there is no limitation on the type of storage media and the number of each type of storage media.
  • the hybrid memory system 100 may also include more than three types of storage media and controllers for each type of storage media.
  • the above-mentioned multiple types of storage media may also be uniformly managed by one class or one controller.
  • the following embodiment is described by taking the storage medium 11 shown in FIG1 as including HBM111, SSD112 and DDR113 as an example.
  • the manager 13 is connected to the controllers 12 of the various storage media 11.
  • the manager 13 can also serve as an interface for the hybrid memory system 100 to communicate with the outside, for receiving access requests for accessing the storage medium 12 from outside the hybrid memory system 100, and returning access results to the outside based on the access requests.
  • the manager 13 is implemented by software, hardware, or a combination of software and hardware.
  • the manager 13 includes code running on a computing instance.
  • the computing instance includes at least one of a virtual machine and a container.
  • the computing instance may be one or more.
  • the manager 13 includes code running on multiple virtual machines/containers.
  • the multiple virtual machines/containers used to run the code may be distributed in the same region or in different regions.
  • the multiple virtual machines/containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple data centers with close geographical locations.
  • a region may include multiple AZs.
  • VPC virtual private cloud
  • multiple VPCs for running the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs.
  • VPC virtual private cloud
  • usually one VPC is set in one region, and the cross-region communication between two VPCs in the same region and between VPCs in different regions requires the setting of a communication gateway in each VPC, and the interconnection between VPCs is realized through the communication gateway.
  • the manager 13 may be a device implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD).
  • the PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a system on chip (SoC) or any combination thereof.
  • CPLD complex programmable logical device
  • FPGA field-programmable gate array
  • GAL generic array logic
  • DPU data processing unit
  • SoC system on chip
  • the hybrid memory system 100 is applied to an electronic device, which may be a server or a terminal device, wherein the server is, for example, a cloud server, a central server, an edge server, a remote server in a remote data center, or a local server in a local data center, etc.
  • the terminal device is, for example, a desktop computer, a laptop computer, or a smart phone, etc.
  • the storage medium 11 may be an on-chip memory inside the electronic device, or a memory external to a processor in the electronic device, or a storage medium in a storage device extended by the electronic device through a serial bus.
  • the serial bus is, for example, a high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, PCIE).
  • the bus may be a computer express link (CXL) bus, a cache coherent interconnect for accelerators (CCIX) bus, a unified bus (UB or Ubus), or the like, which is used to interconnect devices.
  • CXL computer express link
  • CCIX cache coherent interconnect for accelerators
  • UBA unified bus
  • the embodiment of the present application does not limit the location of the storage medium 11 in the electronic device in the hybrid memory system 100.
  • the hybrid memory system 100 is taken as a hybrid memory system 1A as an example, and is introduced in combination with the electronic device 200 shown in Figure 2, wherein Figure 2 is a structural diagram of an electronic device provided by the present application that applies the hybrid memory system 1A.
  • the electronic device 200 includes a hybrid memory system 1A, a processor 201, and a cache 202.
  • the electronic device 200 is also connected to a storage device 203 via a PCIE/CXL/CCIX bus.
  • the storage media 11 in the hybrid memory system 1A are storage media 11a to storage media 11d, and the controllers of the storage media 11a to 11d are controllers 12a, 12b, 12c, and 12d, respectively.
  • the storage medium 11a is a memory integrated on the processor 201 chip, etc.
  • the storage medium 11b is an external memory of the processor 201, such as a memory inserted on the computer motherboard of the electronic device 200.
  • the storage medium 11c and the storage medium 11d are memories in the storage device 203, and the controller 12c of the storage medium 11c and the controller 12d of the storage medium 11d are also located in the storage device 230.
  • the processor 201 may also integrate multiple storage media on the chip and add them to the hybrid memory system 1A, the processor 201 may also add multiple storage media externally to the hybrid memory system 1A, and the storage device 203 may also have more than two storage media added to the hybrid memory system 1A. It should be understood that for the three locations of the computer mainboard of the electronic device 200 (including the storage medium external to the processor 20), on the chip of the processor 201, and the storage device external to the electronic device 200, the hybrid memory system 1A may include storage media in at least one of these three locations.
  • the processor 201 also includes at least one processor core 211, and the processor core 211 is connected to the manager 13a of the hybrid memory system 1A through the cache 102, so that the access request of the processor core 211 to any storage medium in the hybrid memory system 1A can be sent to the manager 11a, and the manager 13a returns the access result to the processor 201 based on the received access request.
  • the manager 13a is integrated in the host memory bridge between the cache 202 and each controller. Alternatively, the manager 13a is used as a separate chip to connect the host memory bridge and each controller.
  • the storage medium in the hybrid memory system 100 is only composed of the storage medium in the storage device extended by the electronic device through the serial bus.
  • the hybrid memory system 100 is taken as an example as follows, and is introduced in conjunction with the electronic device 300 shown in FIG.
  • FIG3 is a structural diagram of an electronic device using a hybrid memory system 1B provided by the present application.
  • the electronic device 300 includes a processor 301, a cache 302, at least one storage medium 303, and a controller 304 for each storage medium 303.
  • the electronic device 300 is connected to a storage device 305 via a PCIE/CXL/CCIX bus.
  • the storage device 305 includes a hybrid memory system 1B.
  • the hybrid memory system 1B includes a manager 13b, a storage medium 11e, a controller 12e of the storage medium 11e, a storage medium 11f, and a controller 12f of the storage medium 11.
  • the controllers 12e and 12f are both connected to the manager 13b.
  • FIG3 is an example in which the hybrid memory system 13b includes two storage media. In some embodiments, the hybrid memory system 13b includes more than two storage media.
  • the embodiment of the present application does not limit the type of the storage medium 11 in the hybrid memory system 13b.
  • the hybrid memory system 13b shown in Figure 3 is an example of the hybrid memory system 100, and the manager 13b is an example of the manager 13. If the manager 13b is used as a hardware functional unit, unlike Figure 2, in the embodiment shown in Figure 3, the manager 13b is located in the storage device connected to the electronic device, while the manager 13a shown in Figure 2 is located in the electronic device.
  • Figures 2 and 3 are both illustrated using the example of an electronic device including a cache.
  • the manager 13 of the hybrid memory system connects the processor in the electronic device and the controllers of each storage medium.
  • the processor can be implemented in at least one hardware form of application-specific integrated circuit (ASIC), digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA).
  • ASIC application-specific integrated circuit
  • DSP digital signal processing
  • FPGA field-programmable gate array
  • PDA programmable logic array
  • the processor can also have other hardware implementations, which are not limited in this application.
  • the processor is, for example, a central processing unit (CPU).
  • the processor can also be implemented using a graphics processing unit (GPU) or a data processing unit (DPU).
  • the GPU is responsible for rendering and drawing the content to be displayed on the display screen.
  • the processor also includes an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
  • AI artificial intelligence
  • FIG. 4 is a flow chart of a data processing method provided by the present application.
  • the data processing method is applied to a hybrid memory system.
  • the system includes a first storage medium and a second storage medium, wherein the hybrid memory system is any of the hybrid memory systems described above, and the first storage medium and the second storage medium are any two storage media with different access performances in the hybrid memory system.
  • the access performance of the first storage medium is better than the access performance of the second storage medium, for example, the access latency of the first storage medium is lower than the access latency of the second storage medium, or the access bandwidth of the first storage medium is higher than the access bandwidth of the second storage medium.
  • Any storage medium in the first storage medium and the second storage medium includes a plurality of physical pages, and the physical page is used to store data, and the physical page is the basic unit of data migration.
  • the physical pages in the first storage medium are divided into memory physical pages and cache physical pages, and the number of memory physical pages in the first storage medium is generally greater than the number of cache physical pages.
  • the physical pages in the second storage medium are divided into memory physical pages and candidate physical pages, and the number of memory physical pages in the second storage medium is greater than the number of candidate physical pages.
  • the memory physical pages in the first storage medium and the second storage medium are used as the memory of the electronic device where the hybrid memory system is located.
  • the manager of the hybrid memory system uniformly addresses the memory physical pages of multiple storage media in the hybrid memory system, and obtains the physical addresses of each memory physical page, so as to organize the memory physical pages in the hybrid memory system into memory visible to the processor.
  • the physical address of each memory physical page is used to indicate the location of the memory physical page in the memory.
  • the physical address is the page frame number of the memory physical page in the hybrid memory system.
  • the manager also assigns a virtual address to each physical memory page in the memory.
  • the application can perceive the virtual address and access the physical memory page through the virtual address. It can be understood that the memory is used as a storage space visible to the application, and this memory is also called the visible memory of the application.
  • the cache physical pages in the first storage medium are used to form a cache space of the second storage medium, and the cache space is used to cache data in the second storage medium.
  • the cache physical page serves as a cache of the memory physical page in the second storage medium to cache the data of the memory physical page in the second storage medium.
  • the cache physical page in the first storage medium can be accessed first, and if there is no data cached in the cache physical page, the memory physical page can be accessed, or the cache physical page can be accessed after the data in the memory physical page is cached in the cache physical page.
  • the candidate physical page in the second storage medium is a candidate physical page in the second storage medium for use as memory, or the candidate physical page can also be understood as a physical page in the second storage medium to be added to the memory. No data is stored in the candidate physical page, and the candidate physical page is an idle physical page.
  • the manager In order to distinguish between memory physical pages, cache physical pages and candidate physical pages, the manager records the status of the memory physical page as the memory status, the status of the cache physical page as the cache status, and the status of the candidate physical page as the candidate status, wherein the memory status is used to indicate that the corresponding physical page is used as memory, that is, to indicate that the corresponding physical page is a memory physical page.
  • the cache status is used to indicate that the corresponding physical page is a cache of an associated physical page, and the physical page associated with the corresponding physical page is a memory physical page in the second storage medium.
  • the candidate status is used to indicate that the corresponding physical page is a candidate physical page.
  • the data processing method provided in the present application is executed by a manager in the hybrid memory system.
  • the manager migrates data between the first storage medium and the second storage medium by switching the usage of physical pages in the hybrid memory system.
  • the data processing method includes the following steps.
  • Step 401 The manager obtains a first migration detection result of a first physical page in a first storage medium.
  • the first physical page is a physical page used as memory in the first storage medium. It can be understood that the first physical page is any memory physical page in the first storage medium.
  • the first migration detection result is used to indicate the number of times the first physical page has been accessed. In some embodiments, the first migration detection result is also used to indicate whether the first physical page supports data migration.
  • the manager performs a data migration test on the first physical page in the first storage medium to obtain the first migration test result, and then determines whether the first physical page is a memory physical page to be involved in data migration based on the first migration test result.
  • the manager periodically obtains access statistics of the first physical page to perform data migration detection on the first physical page, wherein the access statistics include the number of times the corresponding physical page is accessed within a period of time.
  • FIG5 is a flowchart of a data migration detection provided by the present application, and the data migration detection process shown in FIG5 includes the following steps.
  • Step 4011 The manager counts the number of times each physical memory page in the hybrid memory system is accessed.
  • the manager establishes a mapping relationship between each memory physical page in the first storage medium and the second storage medium and the access statistics information. Initially, the number of accesses in the access statistics information of each memory physical page is 0.
  • the processor When the processor is running an application, if the application has a need to access a certain memory physical page, it triggers the processor to send an access request for the memory physical page to the manager.
  • the manager receives the access request, it adds 1 to the number of accesses in the access statistics information corresponding to the memory physical page according to the memory address of the memory physical page to be accessed in the access request.
  • the memory address corresponds to the location of the physical page in the memory when it is used as memory.
  • the memory address is a physical address associated with the memory physical page or a virtual address associated with the memory physical page.
  • mapping relationship between each memory physical page in the first storage medium and the second storage medium and the access statistical information is stored in a page mapping table.
  • the page mapping table is stored in the first storage medium or the manager and maintained by the manager.
  • the page mapping table includes multiple mapping table entries, each of which includes the memory address of a memory physical page and access statistics.
  • the manager adds 1 to the number of accesses in the access statistics corresponding to the memory address.
  • the memory address is used as the physical address, and each mapping table entry is arranged in the page mapping table in the order of the size of the physical addresses associated with each memory physical page.
  • Table 1 the mapping table entry where the memory address 00000001 is located is located in the first row of the page mapping table, and the mapping table entry where the memory address 00000002 is located is located in the second row of the page mapping table.
  • each mapping table entry in order to record more information about the memory physical page, each mapping table entry also includes at least one of a medium address, a medium attribute identifier, and a migration capability identifier of a memory physical page, wherein the medium address is used to indicate the location of the corresponding physical page in the storage medium to which it belongs, and the medium attribute identifier is used to indicate the storage medium to which the corresponding physical page belongs.
  • the hybrid memory system includes a first storage medium DDR and a second storage medium SSD.
  • the medium address 000001 indicates the first physical page in the first storage medium DDR, which is the memory physical page of the associated memory address 00000001 in the hybrid memory system, that is, the first memory physical page in the memory provided in the hybrid memory system.
  • Table 1 uses characters (such as "DDR", "SSD") as an example to show the medium attribute identifier.
  • the manager assigns a medium number to each storage medium in the hybrid memory system, and the medium attribute identifier is the medium number of the storage medium.
  • the migration capability identifier is used to indicate whether the corresponding physical page supports data migration, wherein the migration capability identifier includes a first migration capability identifier and a second migration capability identifier, the first migration capability identifier is used to indicate that the corresponding physical page supports data migration, and the second migration capability identifier is used to indicate that the corresponding physical page does not support data migration.
  • the first migration capability identifier is 1 and the second migration capability identifier is 0.
  • the first migration capability identifier is 0 and the second migration capability identifier is 1.
  • the migration capability identifier of each memory physical page can be configured according to business needs or instructions.
  • the embodiment of the present application does not limit the configuration method of the migration capability identifier.
  • Step 4012 The manager uses the first duration as a migration cycle, and obtains the number of times each memory physical page is accessed when a migration cycle ends each time the migration cycle begins.
  • the first duration can be set according to the specific implementation scenario.
  • the embodiment of the present application does not limit the value of the first duration.
  • the manager obtains the number of times each memory physical page is accessed from the page migration table.
  • Step 4013 The manager determines a first migration threshold, a second migration threshold, and a third migration threshold according to the number of times each memory physical page is accessed.
  • the first migration threshold is a migration threshold that triggers the migration of data from the memory physical page in the first storage medium to the memory physical page in the second storage medium.
  • the second migration threshold is a migration threshold that triggers the migration of data from the memory physical page in the second storage medium to the memory physical page in the first storage medium.
  • the third migration threshold is a migration threshold that triggers the migration of data from the cache physical page in the second storage medium to the memory physical page in the second storage medium, which can also be understood as a migration threshold that triggers the memory physical page in the second storage medium to reclaim cache data.
  • the second migration threshold is greater than the first migration threshold, the first migration threshold is generally greater than the third migration threshold, and the first migration threshold is greater than 0.
  • the manager sorts the number of accesses of each memory physical page to obtain a number sequence, and uses the number of accesses at the first target position, the second target position, and the third target position in the number sequence as the first migration threshold, the second migration threshold, and the third migration threshold, respectively.
  • the first target position, the second target position, and the third target position can be set according to a specific implementation method, and it can be ensured that the second migration threshold is greater than the first migration threshold, and the first migration threshold is greater than the third migration threshold.
  • the manager can also use other strategies to determine the first migration threshold, the second migration threshold, and the third migration threshold, which is not limited in this embodiment of the present application.
  • the manager stores the migration threshold determined in the previous migration cycle. After a new migration threshold is determined during this migration process, the stored migration threshold is modified to the new one. Migration threshold.
  • the manager modifies the migration threshold determined in the previous migration cycle to a new migration threshold. If the manager is not configured with the requirement information, the manager does not modify the migration threshold determined in the previous migration cycle, and uses the migration threshold determined in the previous migration cycle as the migration threshold for this data migration detection.
  • step 4013 is an optional step.
  • the manager is configured with a first migration threshold, a second migration threshold and a third migration threshold. Each migration cycle shares the configured first migration threshold, second migration threshold and third migration threshold. There is no need to modify the first migration threshold, the second migration threshold and the third migration threshold, and there is no need to execute step 4013.
  • Step 4014 The manager determines whether the number of accesses of each memory physical page needs to be reset based on the configured second requirement information. If reset is required, the manager resets the number of accesses of each memory physical page to 0, and jumps to execute the above step 4011. The manager starts counting the number of accesses of each memory physical page from 0 and enters the next migration cycle. If reset is not required, the manager jumps to execute the above step 4011. The manager continues counting from the current number of accesses of each memory physical page and enters the next migration cycle.
  • the manager does not count the number of times each physical memory page is accessed, and a statistical unit outside the manager counts the number of times each physical memory page is accessed, and at the end of each migration cycle, the manager obtains the number of times each physical memory page is accessed from the statistical unit.
  • the statistical unit may be a hardware unit or a software unit.
  • the manager After the manager obtains the number of times the first physical page is accessed, the manager compares the number of times the first physical page is accessed with the first migration threshold. If the number of times the first physical page is accessed is less than or equal to the first migration threshold, it means that the first physical page is not frequently accessed, and the data stored in the first physical page is cold data.
  • the first physical page is a cold page, which triggers the manager to migrate the cold data to a second storage medium with low access performance.
  • the migration process is shown in steps 402 to 404 below.
  • Step 402 If the first migration detection result meets the first data migration condition, the manager selects a second physical page from the second storage medium, where the second physical page is a candidate physical page used as a memory in the second storage medium.
  • the first migration detection result satisfies the first data migration condition including that the number of accesses to the first physical page is less than or equal to the first migration threshold.
  • the first migration detection result satisfies the first data migration condition including that the number of accesses to the first physical page is less than or equal to the first migration threshold, and the first physical page supports data migration.
  • the manager obtains the number of accesses to the first physical page from the page mapping table, or obtains the number of accesses to the first physical page from the statistical unit. If the obtained number of accesses to the first physical page is less than or equal to the first migration threshold, the first migration detection result satisfies the first data migration condition.
  • the manager obtains the number of accesses of the first physical page and the migration capability identifier from the page mapping table.
  • the number of accesses of the first physical page is less than or equal to the first migration threshold, if the migration capability identifier is the first migration capability identifier, it means that the first physical page supports data migration, and the first migration detection result satisfies the first data migration condition.
  • the manager After determining that the first migration detection result satisfies the first data migration condition, the manager determines the second physical page from the candidate physical pages used as memory in the second storage medium. In a possible implementation, the manager stores the state of at least one physical page in the second storage medium as a candidate state to indicate that the at least one physical page is a candidate physical page in the second storage medium, and then the manager selects one of the at least one physical page as the second physical page.
  • the manager records each candidate physical page in the second storage medium that is in a candidate state through a candidate list corresponding to the second storage medium.
  • the candidate list is used to store the media addresses of each candidate physical page in the second storage medium that is in a candidate state.
  • the manager randomly obtains a media address from the candidate list, or obtains the first media address in the candidate list, and uses the candidate physical page indicated by the media address obtained from the candidate list as the second physical page.
  • Step 403 The manager uses the second physical page as memory.
  • the manager implements step 403 by converting the state of the second physical page. For example, the manager converts the candidate state of the second physical page to the memory state.
  • the manager For each memory physical page in the hybrid memory system, the manager indicates that the memory physical page is in the memory state through the mapping relationship between the media address of each memory physical page and the memory address in the hybrid system. In some embodiments, the manager records the mapping relationship between the media address of each memory physical page and the memory address in the hybrid memory system through a page mapping table. Taking the page mapping table shown in Table 1 above as an example, each mapping table entry includes the memory address, media address and media attribute identifier of a memory physical page, and the memory address, media address and media attribute identifier in the same mapping table entry are the mapping relationship between the media address of a memory physical page and the allocated memory address.
  • the page mapping table may record at least one of the migration capability identifier and access statistics of the memory physical page, or may not record the migration capability identifier and access statistics of the memory physical page. At least one item of the information, the migration capability identifier of the memory physical page, and at least one item of the access statistical information may also be recorded in other tables.
  • the first mapping relationship between the medium address of the first physical page and the first memory address in the hybrid memory system, and the first mapping relationship is used to indicate that the first physical page is in a memory state.
  • the first memory address is used to indicate the location of the first physical page in the memory when it is used as a memory. It can be understood that the first memory address is a physical address or a virtual address associated with the first physical page in the hybrid memory system.
  • Step 4031 The manager deletes the media address of the second physical page in the candidate list, where the candidate list is used to store the media addresses of candidate physical pages used as memory in the second storage medium.
  • the manager deletes the first media address in the candidate list, and the remaining media addresses in the candidate list are shifted one position toward the direction of the first media address in sequence, so that the first media address in the remaining media addresses becomes the first media address in the candidate list.
  • the second physical page By deleting the medium address of the second physical page in the selection list, the second physical page is placed in a candidate state, so that the second physical page does not have the identity of a candidate physical page.
  • Step 4032 The manager modifies the media address of the first physical page in the first mapping relationship to the media address of the second physical page.
  • the manager modifies the media address of the first physical page in the first mapping table entry to the media address of the second physical page, and modifies the media attribute identifier of the first storage medium in the first mapping table entry to the media attribute identifier of the second storage medium, so that the second physical page is associated with the first memory address in the first mapping table entry, and the second physical page replaces the first physical page as the memory physical page indicated by the first memory address.
  • the manager also clears the access count in the access statistics information of the first physical page in the first mapping table entry to 0, or does not clear the access count to 0, and continues to count based on the access count.
  • the manager also modifies the migration capability identifier of the first physical page in the first mapping table entry to the migration capability identifier of the second physical page.
  • the manager does not modify the media address of the first physical page in the first mapping relationship, but deletes the first mapping relationship and establishes a mapping relationship between the first memory address associated with the first physical page and the media address of the second physical page.
  • the method for establishing the mapping relationship can refer to the method for establishing the first mapping relationship, and will not be repeated here.
  • Step 404 The manager uses the first physical page as a cache for the second physical page.
  • the manager implements step 403 by converting the state of the first physical page. For example, the manager converts the memory state of the first physical page to the cache state, associates the second physical page in the cache state with the first physical page, so that the first physical page becomes the cache of the second physical page. At this time, the first physical page is a cache physical page in the first storage medium.
  • the manager indicates that the cached physical page is in a cache state and that the cached physical page is a cache of an associated memory physical page through a mapping relationship between the media address of the cached physical page and the media address of the memory physical page in the second storage medium.
  • the mapping relationship between the media address of the cached physical page and the media address of the memory physical page in the second storage medium is stored through a cache mapping table.
  • the cache mapping table is stored in the first storage medium or the manager and maintained by the manager.
  • the cache mapping table includes multiple cache table entries, each cache table entry includes a media address of a cache physical page in a first storage medium (i.e., a cache address) and a media address of a memory physical page in a second storage medium in a second storage medium, to indicate that the cache physical page is associated with the memory physical page, and the cache physical page is a cache of the memory physical page.
  • a cache table entry includes a media address of a cache physical page in a first storage medium (i.e., a cache address) and a media address of a memory physical page in a second storage medium in a second storage medium, to indicate that the cache physical page is associated with the memory physical page, and the cache physical page is a cache of the memory physical page.
  • Step 4041 The manager invalidates a first mapping relationship between a media address of the first physical page and a first memory address in the hybrid memory system. Tie.
  • the first physical page is not in the memory state, and at this time, the first physical page is not a memory physical page in the hybrid memory system.
  • the method of invalidating the first mapping relationship for example, modifying the medium address of the first physical page in the first mapping relationship or deleting the first mapping relationship in the above-mentioned step 4032. It should be understood that if step 4032 has been executed, step 4041 is not executed.
  • Step 4042 The manager establishes a second mapping relationship between the media address of the first physical page and the media address of the second physical page.
  • the manager uses the media address of the first physical page as the media address in the first storage medium and the media address of the second physical page as the media address in the second storage medium, and adds a first cache entry in the cache mapping table.
  • the first cache entry also establishes the second mapping relationship.
  • each cache entry also includes a valid flag, a page cache state of a cache physical page, and at least one of a memory address associated with a memory physical page in the second storage medium.
  • the valid flag is used to indicate whether the cache entry is valid, and the valid flag includes a first valid flag and a second valid flag.
  • the first valid flag is used to indicate that the cache entry is valid, and the second valid flag is used to indicate that the cache entry is invalid.
  • the first valid flag is 1 and the second valid flag is 0 for illustration. In other embodiments, the first valid flag is 0 and the second valid flag is 1.
  • the page cache state of a cache physical page is used to indicate whether each cache line in the cache physical page stores data of a corresponding storage space in an associated memory physical page.
  • the page cache state of the cache physical page includes a first page cache state and a second page cache state, wherein the first page cache state is used to indicate whether each cache line in the cache physical page stores data, and the second cache state is used to indicate whether the data in each cache line in the cache physical page is the same as the data in the corresponding storage space in the associated memory physical page, wherein any cache behavior is a cache of a corresponding storage space in an associated memory physical page, and is used to store data in a corresponding storage space in an associated memory physical page.
  • the first cache state includes multiple first cache line states, each of which is used to indicate whether data is stored in a cache line in a cache physical page. As shown in Table 2, if the first cache line state of a cache line is 1, it indicates that data is stored in the cache line, and if the first cache line state of a cache line is 0, it indicates that there is no data in the cache line. In other embodiments, the first cache line state is 0 to indicate that data is stored in the cache line, and the first cache line state is 1 to indicate that no data is stored in the cache line.
  • the second cache state includes multiple second cache line states, each second cache line state is used to indicate whether the data in a cache line in a cache physical page is the same as the data in the corresponding storage space in the associated memory physical page, as shown in Table 2, if the second cache line state of a cache line is 1, it indicates that the data in the cache line is the same as the data in the corresponding storage space in the associated memory physical page, and if the second cache line state of a cache line is 0, it indicates that the data in the cache line is not the same as the data in the corresponding storage space in the associated memory physical page.
  • the second cache line state of 1 indicates that the data in the cache line is not the same as the data in the corresponding storage space in the associated memory physical page, and the second cache line state of 1 indicates that the data in the cache line is the same as the data in the corresponding storage space in the associated memory physical page.
  • the manager when adding a first cache entry to the cache mapping table, stores the valid flag in the first cache entry as a first valid flag (e.g., 1) to indicate that the first cache entry is valid.
  • a first valid flag e.g. 1
  • the manager stores the first cache state of the cache line in the first page cache state as indicating that data is stored in the cache line (e.g., stored as 1), and if the cache line does not store data, the manager stores the first cache state of the cache line in the first page cache state as indicating that data is not stored in the cache line (e.g., stored as 0).
  • the manager since the second physical page is originally a cache physical page and no data is stored in the second physical page, for any cache line in the first physical page, the manager stores the second cache state of the cache line in the second page cache state as indicating that the data in the cache line is different from the data in the corresponding storage space in the first physical page (e.g., stored as 0).
  • the data to be migrated in the storage medium with high access performance is first read, and then the data to be migrated is written to the storage medium with low access performance. If this part of data is frequently accessed, this part of data is migrated to the storage medium with high access performance.
  • the first migration detection result meets the first data migration condition, the data in the first physical page needs to be written back to the second storage medium. Considering that the data in the first physical page is written back to the second storage medium, it may be migrated back to the first storage medium from the second storage medium later.
  • the manager uses the second physical page instead of the first physical page as memory, switches the first physical page to the cache of the second physical page, completes the data migration, avoids writing the data in the first physical page back to the second storage medium later, and can also avoid migrating the written back data to the first storage medium again, thereby reducing the overhead of reading and writing data back and forth during the data migration process and improving the data migration efficiency.
  • the second physical page is used as memory instead of the first physical page to ensure that the memory visible to the application remains unchanged, and avoids page faults when the application accesses the first memory address previously associated with the first physical page.
  • the manager also performs data migration detection on the memory physical pages in the second storage medium to detect the memory physical pages in the second storage medium to be involved in data migration, and performs related data migration operations, such as steps 405 to 411 described below.
  • Step 405 The manager obtains a second migration detection result of the third physical page in the second storage medium.
  • the third physical page is a physical page used as memory in the second storage medium. It can be understood that the third physical page is any memory physical page in the second storage medium.
  • the second migration detection result is used to indicate the number of times the third physical page has been accessed. In some embodiments, the second migration detection result is also used to indicate whether the first physical page supports data migration. In some embodiments, the second migration detection result is also used to indicate that there is data in the third physical page that has been cached by the cached physical page.
  • the manager performs a data migration test on the third physical page in the second storage medium to obtain the second migration test result, and then determines whether the third physical page is a memory physical page to be involved in data migration based on the second migration test result.
  • the manager periodically obtains access statistics of the third physical page to perform data migration detection on the third physical page.
  • the manager uses the first time length as a migration cycle. At the end of each migration cycle, the manager obtains access statistics corresponding to the media address in the second storage medium recorded in the page mapping table, wherein the media address in the second storage medium recorded in the page mapping table is also the media address of the memory physical page in the second storage medium.
  • the access information corresponding to the media address of the third physical page in the second storage medium is obtained, the data migration detection of the third physical page is completed.
  • the manager uses the second duration as the migration cycle, and at the end of each migration cycle, obtains each memory address recorded in the cache mapping table or the media address in the second storage medium, and each memory address obtained is also the memory address associated with a memory physical page in the first storage medium, and each media address obtained is also the media address of a memory physical page in the second storage medium.
  • the manager queries the access statistics corresponding to the any media address in the page mapping table to complete the data migration detection of a memory physical page in the second storage medium associated with the any address. If the memory physical page in the second storage medium associated with the any address is the third physical page, the data migration detection of the third physical page is also completed.
  • the second duration may be equal to the first duration, or may not be equal to the first duration.
  • the data migration detection on the third physical page can be performed simultaneously with the data migration detection on the first physical page, or can be performed at different times, that is, step 401 and step 405 can be performed simultaneously, or can be performed at different times.
  • step 401 the manager performs data migration detection on the first physical page in the first storage medium and the third physical page in the second storage medium, and no longer executes step 405, and the process shown in steps 402 to 404 is processed in parallel with the process shown in steps 406 to 411 described below.
  • the manager After the manager obtains the access statistics information of the third physical page, the number of accesses of the third physical page in the access statistics is compared with the second migration threshold. If the number of accesses of the third physical page is greater than or equal to the second migration threshold, it means that the third physical page is frequently accessed, and the data stored in the third physical page is hot data.
  • the third physical page is a hot page, then the manager is triggered to migrate the hot data to the first storage medium with high access performance, so that the hot data can be quickly accessed in the first storage medium later.
  • the migration process is shown in steps 406 to 409 below.
  • Step 406 If the second migration detection result meets the second data migration condition, the manager selects a fourth physical page from the first storage medium, where the fourth physical page is a cache of the third physical page in the first storage medium.
  • the second migration detection result satisfies the second data migration condition, which includes any one of the following situations 1 to 3.
  • Case 1 The number of accesses to the third physical page is greater than or equal to the second migration threshold.
  • Case 2 The number of accesses to the third physical page is greater than or equal to the second migration threshold, and the third physical page supports data migration.
  • Case 3 The number of accesses to the third physical page is greater than or equal to the second migration threshold, the third physical page supports data migration, and the third physical page contains data that has been cached by the cached physical page.
  • the manager obtains the number of accesses to the third physical page from the page mapping table, or obtains the number of accesses to the third physical page from the statistical unit. If the obtained number of accesses to the third physical page is greater than or equal to the second migration threshold, the second migration detection result satisfies the second data migration condition.
  • the manager obtains the number of accesses and the migration capability identifier of the third physical page from the page mapping table.
  • the number of accesses of the third physical page is greater than or equal to the second migration threshold, if the migration capability identifier is the first migration capability identifier, it means that the third physical page supports data migration, and the second migration detection result satisfies the second data migration condition.
  • the manager obtains the number of accesses and the migration capability identifier of the third physical page from the page mapping table. If the number of accesses of the third physical page is greater than or equal to the second migration threshold and the migration capability identifier is the first migration capability identifier, the manager determines The fourth physical page associated with the third physical page in the first storage medium can be understood to be a cache physical page associated with the third physical page in the first storage medium. Afterwards, the first page cache state of the fourth physical page is queried from the cache mapping table, and if the query finds that the first page cache state indicates that the cache line in the fourth physical page stores data, then the second migration detection result satisfies the second data migration condition.
  • the first storage medium includes at least one cache physical page, each cache physical page is associated with a physical page used as memory in the second storage medium, and each cache physical page is used as a cache for the associated physical page. It can be understood that the at least one cache physical page is a cache physical page recorded by a valid cache page table entry in the cache mapping table.
  • the manager determines the cache physical page associated with the third physical page in the at least one cache physical page as the fourth physical page. For example, the manager queries the second cache page table entry including the media address of the third physical page in at least one (valid) cache page table entry in the cache mapping table, and if the second cache page table entry is found, the cache physical page indicated by the media address in the first storage medium recorded in the second cache page table entry is used as the fourth physical page.
  • the manager queries the first page cache status of multiple cache physical pages from the cache mapping table. If the first page cache status of any cache physical page indicates that the cache row in the cache physical page stores data, the cache physical page is taken as the fourth physical page, and the number of times the third physical page is accessed and the migration capability identifier are queried from the page mapping table according to the memory address of the third physical page associated with the fourth physical page in the cache mapping table. If the number of times the third physical page is accessed is greater than or equal to the second migration threshold, and the migration capability identifier is the first migration capability identifier, then the second migration detection result satisfies the second data migration condition.
  • Step 407 The manager queries the third physical page for data that has not been cached to the fourth physical page, and migrates the queried data to the fourth physical page.
  • the manager determines whether there is data in the third physical page that has not been cached to the fourth physical page by querying the cache line status of each cache line in the fourth physical page, and then migrates the uncached data to the fourth physical page.
  • the manager obtains the cache line status of the cache line of the fourth physical page, where the cache line status is used to indicate whether the cache line stores data. If the cache line status indicates that the cache line does not store data, the data in the storage space corresponding to the cache line in the third physical page is migrated to the cache line.
  • the cache line state of the cache line is the first cache line state of the cache line.
  • the manager obtains the first cache line state of each cache line in the fourth physical page from the second cache table entry in the cache mapping table. For any cache line in the fourth physical page, if the first cache line state of any cache line indicates that any cache line does not store data, the manager queries whether the storage space corresponding to the cache line in the third physical page stores data. If data is stored in the storage space, the manager stores the data in the storage space to the any cache line.
  • a data cache request is made to the second storage medium, and the data cache request is used to indicate caching the data in the storage space corresponding to the at least one cache line in the second storage medium.
  • the manager stores the data in the storage space corresponding to any cache line to the any cache line.
  • the second storage medium will not return the data in the storage space corresponding to any cache line to the manager based on the data cache request. At this time, the manager does not store data in any cache line.
  • the manager does not perform step 407 .
  • Step 408 The manager uses the fourth physical page as memory.
  • the manager implements step 408 by converting the state of the fourth physical page, such as the following steps 4081 to 4082.
  • Step 4081 The manager releases the association between the third physical page and the fourth physical page.
  • the fourth mapping relationship between the media address of the third physical page and the media address of the fourth physical page is invalidated.
  • the fourth mapping relationship is used to indicate that the fourth physical page is a cache of the associated third physical page.
  • the association between the third physical page and the fourth physical page is released, and the fourth physical page is not in a cache state.
  • the fourth mapping relationship is stored through the second cache mapping table entry in the cache mapping table, and the method of invalidating the fourth mapping relationship includes changing the valid identifier in the second cache mapping table entry from the first valid identifier to the second valid identifier to indicate that the second cache mapping table entry is invalid, or deleting the second cache mapping table entry in the cache mapping table.
  • Step 4082 The manager converts the cache state of the fourth physical page to a memory state.
  • mapping relationship between the medium address of the third physical page and the second memory address in the hybrid memory system.
  • the relationship is used to indicate that the third physical page is in a memory state
  • the second memory address is used to indicate the location of the third physical page in the memory when it is used as memory. It can be understood that the second memory address is the physical address or virtual address associated with the third physical page in the hybrid memory system.
  • the manager modifies the media address of the third physical page in the third mapping relationship into the media address of the fourth physical page.
  • the manager uses the memory address recorded in the second cache entry and the media address in the second storage medium as the second memory address and the media address associated with the third physical page, respectively. For any of the second memory address and the media address associated with the third physical page, the manager queries the second mapping entry including the any address in the page mapping table, so that the second mapping entry records the second memory address and the media address associated with the third physical page. Therefore, the second mapping entry is used to record the third mapping relationship.
  • the manager modifies the media address of the third physical page in the second mapping entry to the media address of the fourth physical page, and modifies the media attribute identifier of the second storage medium in the second mapping entry to the media attribute identifier of the first storage medium, so that the fourth physical page is associated with the second memory address in the second mapping entry, and the fourth physical page replaces the third physical page and becomes the memory physical page indicated by the second memory address.
  • the manager also modifies the access statistics information of the third physical page in the second mapping entry to the access statistics information of the fourth physical page, and also modifies the migration capability identifier of the third physical page in the second mapping entry to the migration capability identifier of the fourth physical page.
  • the manager does not modify the media address of the first physical page in the third mapping relationship, but deletes the third mapping relationship and establishes a mapping relationship between the second memory address associated with the third physical page and the media address of the fourth physical page.
  • the establishment method of this mapping relationship can refer to the establishment method of the first mapping relationship, which will not be repeated here.
  • Step 409 The manager uses the third physical page as a candidate physical page.
  • the manager deletes the data in the third physical page, making the third physical page an idle physical page, and then records the state of the third physical page as a candidate state to indicate that the third physical page is a candidate physical page.
  • the manager does not delete the data in the third physical page for the time being, and records the state of the third physical page as a candidate state.
  • the third physical page switches from the candidate state to the memory state, when the application writes data to the memory address associated with the third physical page, the data stored in the third physical page is first deleted, and then the data is written to the third physical page, or data is written to the third physical page in an overwrite manner.
  • the state of the third physical page is recorded as a candidate state in, for example, the manager adds the medium address of the third physical page to the candidate list of the second storage medium, such as adding the medium address of the third physical page to the end of the candidate list.
  • the data to be migrated in the storage medium with low access performance is first read, and then the data to be migrated is written to the storage medium with high access performance.
  • the data in the third physical page needs to be migrated to the first storage medium.
  • the fourth physical page associated with the third physical page in the first storage medium is a cache of the third physical page
  • the fourth physical page may cache the data of the third physical page.
  • the manager uses the fourth physical page as memory and the third physical page as a candidate physical page, so that the fourth physical page replaces the third physical page as memory.
  • the manager will at most migrate the data that has not been cached to the fourth physical page of the first storage medium, without migrating all the data in the third physical page, thereby reducing the overhead caused by transmitting data during the data migration process and improving the data migration efficiency.
  • the fourth physical page is used as memory instead of the third physical page to ensure that the memory visible to the application remains unchanged, thereby avoiding a page fault when the application accesses the second memory address previously associated with the third physical page.
  • the manager after the manager obtains the access statistics of the third physical page, it compares the number of accesses of the third physical page in the access statistics with the third migration threshold. If the number of accesses of the third physical page is less than or equal to the third migration threshold, it means that the third physical page is not frequently accessed, and the data stored in the third physical page is cold data.
  • the third physical page is a cold page. To avoid the cold data in the third physical page occupying the cache physical page, the manager is triggered to migrate the cold data in the cache physical page associated with the third physical page to the third physical page. The migration process is shown in steps 410 to 411 below.
  • Step 410 If the second migration detection result meets the third data migration condition, the manager writes the data stored in the fourth physical page into the third physical page.
  • the second migration detection result satisfies the third data migration condition, including that the number of accesses to the third physical page is less than or equal to a third migration threshold, and that the third physical page contains data that has been cached by the cached physical page.
  • the manager obtains the number of accesses to the third physical page from the page mapping table, or obtains the number of accesses to the third physical page from the statistical unit. If the obtained number of accesses to the third physical page is less than or equal to the third migration threshold, the manager queries the cache mapping table for a fourth physical page associated with the third physical page in the first storage medium, and queries the cache mapping table for the fourth physical page. If the query finds that the first page cache state indicates that the cache line in the fourth physical page stores data, the second migration detection result satisfies the third data migration condition, and the manager writes the data stored in the fourth physical page into the third physical page.
  • the manager changes the memory physical page indicated by the media address of the second storage medium recorded in the valid cache page table entry to the third physical page, and changes the memory physical page indicated by the media address of the first storage medium recorded in the valid cache page table entry to the fourth physical page, and obtains the access statistical number of the third physical page from the page mapping table according to the media address or memory address of the second storage medium recorded in the valid cache page table entry, wherein the access statistical number of the third physical page is also the access statistical number of the fourth physical page, and if the access statistical number is less than or equal to the third migration threshold, the second migration detection result satisfies the third data migration condition, triggering the manager to write the data stored in the fourth physical page to the third physical page.
  • the manager writes the data stored in the fourth physical page to the third physical page.
  • the manager generates a first data write request based on the data stored in the fourth physical page, and the first data write request is used to indicate that the data is written to the third physical page.
  • the manager sends the first data write request to the controller of the second storage medium, and the controller writes the data to the third physical page according to the first data write request.
  • Step 411 The manager releases the association between the third physical page and the fourth physical page.
  • this step 411 is similar to 4081, and here, the embodiment of the present application will not repeat step 411.
  • the manager After the association between the third physical page and the fourth physical page is released, the manager adds the medium of the fourth physical page to the cache list of the first storage medium, and the cache list is used to store the cache physical pages in the first storage medium that are in the cache state and have not been used. Afterwards, when there is a demand for caching a memory physical page in the second storage medium to a cache physical page, the manager obtains the media address of an unused cache physical page from the cache list, establishes a mapping relationship between the media address of the cache physical page and the media address of the memory physical page, and uses the cache physical page as the cache of the memory physical page. Afterwards, the manager caches the data in the memory physical page to the cache physical page, and when receiving an access request to the memory physical page, caches the data in the memory physical page to the cache physical page.
  • the manager When the second migration detection result meets the third data migration condition, the manager writes the data stored in the fourth physical page to the third physical page, releases the association between the third physical page and the fourth physical page, and releases the occupation of the fourth physical page by the third physical page, thereby reclaiming the cache space provided by the fourth physical page, so that the fourth physical page can be allocated as a new cache for use by other memory physical pages in the second storage medium.
  • steps 406 to 409 and steps 410 to 411 may also be processed in parallel.
  • the data processing method shown in Figure 4 uses the first physical page as a cache of a candidate physical page in the second storage medium and uses the candidate physical page as a memory physical page in the second storage medium when the first migration detection result of the first physical page in the first storage medium meets the first data migration condition, so that the data in the first physical page becomes the cache data of the memory physical page in the second storage medium, avoiding the data in the first physical page from being written back to the second storage medium later, and also avoiding the written-back data from being migrated to the first storage medium again, thereby simplifying the data migration process, reducing the overhead of reading and writing data back and forth during the data migration process, and improving the data migration efficiency.
  • Figure 4 introduces the process of simplifying the data migration process by converting the state of the memory physical page in the first storage medium.
  • the application may also access the memory physical page in the first storage medium or the second storage medium.
  • Figure 6 the process of the application accessing the memory physical page in the hybrid memory system is introduced as follows.
  • FIG. 6 is a flow chart of a method for accessing a hybrid memory system provided by the present application, and the access method includes the following steps.
  • Step 601 A processor in an electronic device sends an access request to a first target physical page in a hybrid memory system to a manager.
  • the first target physical page is any memory physical page in the first storage medium or the second storage medium.
  • the access request includes a third memory address associated with the first physical target page.
  • the memory address in the page mapping table as the physical address of the memory physical page as an example
  • the application when the processor is running an application, if the application has an access requirement for a virtual address in the hybrid memory system, the application generates an access request including the virtual address, and the processor obtains the physical address corresponding to the virtual address (i.e., the third memory address) by querying the page mapping table, converts the virtual address in the access request into the third memory address, and then sends an access request including the third memory address to the manager.
  • the memory physical page associated with the third memory address is also the first target physical page.
  • the access request may be a data read request or a data write request, wherein the data read request is used to indicate reading the data stored in the memory address, and the data write request is used to indicate writing target data to the memory address.
  • the data write request also includes the target data to be written.
  • Step 602 The manager obtains an access request to a first target physical page in the hybrid memory system.
  • the manager searches the page mapping table for a third mapping table entry including the third memory address in the access request, obtains the media address of the first target physical page from the queried third mapping table entry, and converts the physical address in the access request into the media address. If the third mapping table entry records the number of times the first target physical page has been accessed, the manager will be accessed 1.
  • Step 603 If the first target physical page belongs to the first storage medium, the manager accesses the first target physical page based on the access request.
  • the access request hits the first storage medium.
  • the manager accesses the first target physical page in the first storage medium based on the access request. For example, the manager sends an access request including the media address of the first target physical page to the controller of the first storage medium (referred to as the first controller), and the first controller accesses the first target physical page based on the received access request, and returns the access result of the third memory address to the manager. The manager then returns the access result to the processor.
  • accessing the target physical page refers to data read from the first target physical page
  • the access result includes data read from the first target physical page based on the data read request.
  • accessing the first target physical page refers to writing target data to the first target physical page, and the access result is used to indicate that writing to the first target physical page is completed.
  • Step 604 If the first target physical page belongs to the second storage medium, the manager accesses a second target physical page associated with the first target physical page in the first storage medium based on the access request, where the second target physical page is a cache of the first target physical page.
  • the media attribute identifier in the third mapping table entry is the media attribute identifier of the second storage medium, it means that the first target physical page is a memory physical page in the second storage medium, not a memory physical page in the first storage medium, then the access request hits the second storage medium but not the first storage medium.
  • step 604 is described as follows.
  • the manager accesses the cache physical page in the first storage medium to determine whether the data write request hits the cache physical page in the first storage medium. For example, based on the third memory address or media address of the first target physical, the manager queries the third memory address or media address in the valid cache table entry of the cache mapping table. If the third cache page table entry including the third memory address or media address is queried, then the data write request hits the cache physical page in the first storage medium. For example, the cache physical page indicated by the first storage medium address in the third cache page table entry is the cache physical page hit by the data write request, and the cache physical page is also the second target physical page. If the third cache page table entry cannot be queried, the data write request does not hit the cache physical page in the first storage medium.
  • the manager obtains the media address of the second target physical page from the third cache page table entry, modifies the media address of the first target physical page in the data write request to the media address of the second target physical page, and sends the modified data write request to the first controller.
  • the first controller writes the target data to the second target physical page in the first storage medium according to the received data write request, and returns the access result to the manager, which returns the access result to the processor.
  • the manager updates the first cache line state of any cache line so that the updated first cache line state indicates that there is data in the cache line, and also updates the second cache line state of any cache line so that the updated second cache line state indicates that the data in the cache line is different from the data in the corresponding storage space in the first target physical page. If the first cache line state of any cache line is used to indicate that the cache line stores data, the manager will no longer update the first cache line state. However, since new data is written to the first cache line, the manager will also update the second cache line state of any cache line, so that the updated second cache line state indicates that the data in the cache line is different from the data in the corresponding storage space in the first target physical page.
  • the manager allocates a cache physical page for the first target physical page. For example, the manager obtains a media address in the cache list and establishes a mapping relationship between the media address and the first target physical page in the cache mapping table to indicate that the third target physical page indicated by the media address is the cache of the first target physical page.
  • the manager modifies the media address of the first target physical page in the data write request to the media address of the third target physical page, and the manager sends the modified data write request to the first controller.
  • the first controller writes the target data to the third target physical page in the first storage medium according to the received data write request, and returns the access result to the manager, and the manager returns the access result to the processor.
  • the manager since the target data is new data, if the target data is written to at least one cache line of the third target physical page, for any cache line in the at least one cache line, the manager sets the first cache line state of any cache line to indicate that the cache line stores data, and sets the second cache line state of any cache line to indicate that the data in the cache line is different from the data in the corresponding storage space in the first target physical page.
  • the step 604 is repeated. The following is introduced.
  • the manager accesses the cached physical page in the first storage medium to determine whether the data read request hits the cached physical page in the first storage medium. This process can refer to the process of determining whether the data write request hits the cached physical page above.
  • the manager modifies the media address of the first target physical page in the data read request to the media address of the second target physical page, and sends the modified data read request to the first controller.
  • the first controller reads data from the second target physical page in the first storage medium based on the received data read request, and returns the access result to the manager, which returns the access result to the processor.
  • the manager sends a modified data read request to the controller of the second storage medium (referred to as the second controller), and the second controller reads data from the first target physical page in the second storage medium according to the received data read request, and returns the access result to the manager, and the manager returns the access result to the processor.
  • the manager also allocates a cache physical page to the first target physical page. Assuming that the third target physical page in the first storage medium is allocated to the first target physical page as the cache of the first target physical page, the manager obtains the data read from the first target physical page from the access result, and writes the read data to the third target physical page.
  • the manager sets the first cache line state of any cache line to indicate that the cache line stores data, and sets the second cache line state of any cache line to indicate that the data in the cache line is the same as the data in the corresponding storage space in the first target physical page.
  • the method shown in FIG6 is that after obtaining an access request to a first target physical page in a hybrid memory system, if the first target physical page to be accessed belongs to the first storage medium, the first target physical page is accessed based on the access request, and since the access performance of the first storage medium is higher than that of the second storage medium, the first target physical page in the first storage medium can be quickly accessed. If the first target physical page belongs to the second storage medium, based on the access request, the second target physical page associated with the first target physical page in the first storage medium is accessed, and since the access performance of the first storage medium is higher than that of the second storage medium, the second target physical page in the first storage medium can be quickly accessed.
  • FIG. 7 is a schematic diagram of the structure of a data processing device provided by the present application. As shown in FIG. 7 , the device 700 includes a mapping module 701 , a migration module 702 , a cache management module 703 and a media management module 704 .
  • the mapping module 701 is used to maintain the page mapping table, convert the memory address in the access request sent by the processor into a media address, and the media address is used to indicate the memory physical page to be accessed. If the memory physical page to be accessed is a memory physical page in the first storage medium, the access request is sent to the first storage medium; if the memory physical page to be accessed is a memory physical page in the second storage medium, the access request is sent to the cache management module 703.
  • the mapping module 701 is also used to perform data migration detection on the memory physical pages in the hybrid memory system. If a memory physical page that meets the data migration conditions is detected, the migration module 702 is notified to perform data migration on the memory physical page.
  • the process of the migration module 702 performing data migration on the memory physical page can refer to the data processing method shown in Figure 4.
  • the cache management module 703 is used to maintain the cache mapping table. After receiving an access request, it queries whether the access request hits the cache physical page (i.e., cache) in the first storage medium. If the cache physical page is hit, the medium address in the access request is modified to the medium address of the cache physical page that is hit, and the modified access request is sent to the first storage medium. If the cache physical page is not hit, a new cache physical page is allocated to the memory physical page to be accessed in the second storage medium. If the access request is a data write request, the data is written to the newly allocated cache physical page. If the access request is a data read request, the data is read from the memory physical page to be accessed in the second storage medium, the read data is written to the newly allocated cache physical page, and the read data is returned to the processor by the original path.
  • the cache physical page i.e., cache
  • the medium address in the access request is modified to the medium address of the cache physical page that is hit, and the modified access request is sent to the first storage medium. If the cache
  • the media management module 704 is used to initialize and manage other modules in the device 700, such as initializing the migration period, migration threshold, etc. In some embodiments, the media management module 704 is also used to maintain a candidate list of the second storage medium.
  • the device 700 also includes an access control module 705, and the access control module 705 is used to convert the data format of the received access request so that the data format of the converted access request can meet the requirements of the second storage medium or the controller of the second storage medium, send the converted access request to the second storage medium or the controller of the second storage medium, and return the access result via the original route.
  • the media management module 704 is also used to maintain the NVME queue of the NVME SSD, which is used to store blocking IO (BIO) requests.
  • the access control module 705 converts the access request into a BIO request, adds the BIO request to the NVME queue, notifies the NVME SSD to execute the BIO request in the NVME queue, and then the NVME SSD obtains the BIO request from the NVME queue and returns the access result to the access control module 705 based on the BIO request.
  • the access control module 705 converts the access request into an access command recognizable by the DDR interface and sends the access command to the PCM to read or write data to the PCM.
  • the access request received by the access control module 705 may be an access request sent by the migration module 702 to the second storage medium when performing data migration, or may be an access request sent by the cache management module 703 .
  • FIG8 is a schematic diagram of the structure of a data processing device provided by the present application.
  • the device 800 shown in FIG8 may be a manager or a part of a manager of the hybrid memory system of the previous embodiments, and is used to execute the data processing method executed by the manager.
  • the device 800 is applied to the hybrid memory system, and the hybrid memory system includes a first storage medium and a second storage medium.
  • the access performance of the first storage medium is better than the access performance of the second storage medium.
  • the device 800 includes:
  • An acquisition module 801 is configured to acquire a first migration detection result of a first physical page in the first storage medium, where the first physical page is a physical page used as a memory in the first storage medium;
  • a selection module 802 is configured to select a second physical page from the second storage medium if the first migration detection result satisfies a first data migration condition, where the second physical page is a candidate physical page used as a memory in the second storage medium;
  • the second processing module 804 is configured to use the first physical page as a cache for the second physical page.
  • the device 800 of the embodiment of the present application can be implemented by a CPU, an application-specific integrated circuit (ASIC), or a programmable logic device (PLD), and the above-mentioned PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a system on chip (SoC) or any combination thereof.
  • the device 800 can also implement the method shown in Figures 4 to 6 by software. When implemented by software, the device 800 and its various modules can also be software modules.
  • the first processing module 803 is used to: convert the candidate state of the second physical page into a memory state, the candidate state is used to indicate that the corresponding physical page is the candidate physical page, and the memory state is used to indicate that the corresponding physical page is used as the memory.
  • a first mapping relationship exists between the medium address of the first physical page and the first memory address in the hybrid memory system, the first mapping relationship is used to indicate that the first physical page is in the memory state, the medium address is used to indicate the position of the corresponding physical page in the storage medium, and the first memory address is used to indicate the position of the first physical page in the memory when the first physical page is used as a memory;
  • the first processing module 803 is used to: delete the media address of the second physical page in the candidate list, where the candidate list is used to store the media addresses of the candidate physical pages in the second storage medium used as the memory; and modify the media address in the first mapping relationship to the media address of the second physical page.
  • the second processing module 804 is used to: convert the memory state of the first physical page into a cache state, associate the second physical page with the first physical page, the memory state is used to indicate that the corresponding physical page is used as the memory, and the cache state is used to indicate that the corresponding physical page is the cache of the associated physical page.
  • the second processing module 804 is used to: invalidate a first mapping relationship between a media address of the first physical page and a first memory address in the hybrid memory system, the first mapping relationship being used to indicate that the first physical page is in the memory state, the media address being used to indicate a location of the corresponding physical page in a corresponding storage medium, and the memory address being used to indicate a location of the corresponding physical page in the memory when the corresponding physical page is used as memory; establish a second mapping relationship between the media address of the first physical page and the media address of the second physical page, the second mapping relationship being used to indicate that the first physical page is a cache of the associated second physical page.
  • the acquisition module 801 is further configured to acquire a second migration detection result of a third physical page in the second storage medium, where the third physical page is a physical page in the second storage medium used as the memory;
  • the selection module 802 is further configured to select a fourth physical page from the first storage medium if the second migration detection result satisfies a second data migration condition, wherein the fourth physical page is a cache of the third physical page in the first storage medium;
  • the first processing module 803 is further configured to use the fourth physical page as the memory;
  • the second processing module 804 is further configured to use the third physical page as the candidate physical page.
  • the first storage medium includes at least one cache physical page, each cache physical page is associated with a physical page used as the memory in the second storage medium, and each cache physical page is used as a cache of the associated physical page;
  • the selection module 802 is further configured to determine a cache physical page associated with the third physical page in the at least one cache physical page as a fourth physical page.
  • the first processing module 803 is further used to: disassociate the third physical page from the fourth physical page; convert the cache state of the fourth physical page into a memory state, wherein the cache state is used to indicate that the corresponding physical page is a cache of the associated physical page, and the memory state is used to indicate that the corresponding physical page is used as the memory.
  • a third mapping relationship is provided between the medium address of the third physical page and the second memory address in the hybrid memory system, the third mapping relationship is used to indicate that the third physical page is in the memory state, the medium address is used to indicate the position of the corresponding physical page in the storage medium to which it belongs, and the memory address is used to indicate the position of the corresponding physical page in the memory when the corresponding physical page is used as a memory;
  • the first processing module 803 is further configured to modify the medium address in the third mapping relationship to the medium address of the fourth physical page.
  • the device 800 further includes:
  • the data migration module is used to query the data in the third physical page that has not been cached to the fourth physical page, and migrate the queried data to the fourth physical page.
  • the data relocation module is used to: obtain a cache line status of the cache line of the fourth physical page, the cache line status being used to indicate whether the cache line stores data; if the cache line status indicates that the cache line does not store data, migrate data in the storage space corresponding to the cache line in the third physical page to the cache line.
  • the device 800 further includes:
  • a writing module configured to write the data stored in the fourth physical page into the third physical page if the second migration detection result satisfies a third data migration condition
  • the releasing module is used to release the association between the third physical page and the fourth physical page.
  • the release module is used to: invalidate a fourth mapping relationship between the media address of the third physical page and the media address of the fourth physical page, where the media address is used to indicate a location of a corresponding physical page in a corresponding storage medium.
  • the apparatus 800 further includes an access module
  • the acquisition module 801 is further used to acquire an access request to a first target physical page in the hybrid memory system
  • the access module is used to: if the first target physical page belongs to the first storage medium, access the first target physical page based on an access request; if the first target physical page belongs to the second storage medium, access the second target physical page associated with the first target physical page in the first storage medium based on the access request, and the second target physical page is a cache of the first target physical page.
  • the device corresponds to the manager in the above-mentioned method embodiment, and the modules in the device and the above-mentioned other operations and/or functions are respectively various steps and methods implemented by the manager in the method embodiment.
  • the specific details can be found in the above-mentioned method embodiment, and for the sake of brevity, they will not be repeated here.
  • any device in the device 700 and the device 800 when the device performs data processing, only the division of the above-mentioned functional modules is used as an example.
  • the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the device provided in the above embodiment and the above method embodiment belong to the same concept, and the specific implementation process is detailed in the above method embodiment, which will not be repeated here.
  • any one of the apparatuses 700 and 800 may be equivalent to the managers 13, 13a and 13b in FIG. 1 to FIG. 3, or equivalent to the execution components in the managers 13, 13a and 13b.
  • FIG9 is a schematic diagram of the structure of a chip provided by the present application.
  • the chip 900 includes a processor 901 and an interface circuit 902, wherein the interface circuit 902 is used to receive instructions and transmit them to the processor 901.
  • the processor 901 for example, can be a specific implementation form of the device 700 or the device 800, and can be used to execute the above-mentioned data processing method.
  • the processor 901 is coupled to the memory 903, and the memory 903 is used to store program code.
  • the chip system composed of the processor 901, the interface circuit 902 and the memory 903 implements the operation steps of the method in any of the method embodiments in FIG4 to FIG6.
  • processor 901 there is at least one processor 901 in the chip system.
  • the processor 901 may be a CPU or other general-purpose processor.
  • the processor 901 may also be one or more integrated circuits for implementing the solution of the present application, such as a digital signal processor (DSP), ASIC, PLD, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc.
  • DSP digital signal processor
  • ASIC application specific integrated circuits
  • PLD programmable logic device
  • PLD programmable logic device
  • discrete gate or transistor logic device discrete hardware component
  • the general-purpose processor may be a microprocessor or any conventional processor, etc.
  • the memory 903 in the chip system may be one or more.
  • the memory 903 may be integrated with the processor 901, or may be separately arranged with the processor 901, which is not limited in this application.
  • the memory 903 may be integrated with the processor 901 on the same chip, as shown in FIG9 , or the memory 903 may be arranged on different chips from the processor 901, and this application does not specifically limit the type of the memory 903 and the arrangement of the memory 903 and the processor 901.
  • the memory 903 may include a read-only memory and a random access memory, and provide instructions and data to the processor 901.
  • the memory 903 may also include a non-volatile random access memory.
  • the memory 903 may also store information about the device type.
  • the memory 903 may also be a volatile memory, or may include both volatile and non-volatile memories.
  • the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory.
  • the volatile memory can be a random access memory (RAM), which is used as an external cache.
  • RAM random access memory
  • many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous connection dynamic random access memory (SLDRAM) and direct memory bus random access memory (DR RAM).
  • the chip system can be FPGA, ASIC, SoC, CPU, network processor (NP), digital signal processor (DSP), microcontroller unit (MCU), PLD) or other integrated chips.
  • NP network processor
  • DSP digital signal processor
  • MCU microcontroller unit
  • PLD PLD
  • the present application also provides a computer-readable storage medium, such as a memory including a program code, which can be executed by a processor in an electronic device (or chip) to complete the data processing method in the above embodiment.
  • a computer-readable storage medium such as a memory including a program code, which can be executed by a processor in an electronic device (or chip) to complete the data processing method in the above embodiment.
  • the implementation of the computer-readable storage medium can refer to the memory 903 in Figure 9.
  • the present application also provides a computer program product or a computer program, which includes a program code, and the program code is stored in a computer-readable storage medium.
  • a processor reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the chip or electronic device where the processor is located executes the above-mentioned data processing method.
  • the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor can execute the computer execution instructions stored in the memory so that the chip executes the data processing method in the above-mentioned method embodiments.
  • the devices, equipment, computer-readable storage media, computer program products or chips provided in this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
  • the above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination.
  • the above embodiments can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present application of the present invention is generated in whole or in part.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device.
  • the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.).
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets.
  • the available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD) or a semiconductor medium.
  • the semiconductor medium can be a solid state disk (SSD).

Abstract

L'invention concerne un procédé et un appareil de traitement de données, et une puce et un support de stockage lisible par ordinateur. Le procédé est appliqué à un système de mémoire hybride, le système de mémoire hybride comprend un premier support de stockage et un second support de stockage, et les performances d'accès du premier support de stockage sont supérieures aux performances d'accès du second support de stockage. Le procédé consiste à : acquérir un premier résultat de détection de migration d'une première page physique dans un premier support de stockage, la première page physique étant une page physique utilisée en tant que mémoire dans le premier support de stockage ; si le premier résultat de détection de migration satisfait une première condition de migration de données, sélectionner une deuxième page physique à partir d'un second support de stockage, la deuxième page physique étant une page physique candidate utilisée en tant que mémoire dans le second support de stockage ; utiliser la deuxième page physique en tant que mémoire ; et utiliser la première page physique en tant que cache de la deuxième page physique.
PCT/CN2023/103852 2022-10-20 2023-06-29 Procédé et appareil de traitement de données, puce et support de stockage lisible par ordinateur WO2024082702A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211289255.5 2022-10-20
CN202211289255.5A CN117917649A (zh) 2022-10-20 2022-10-20 数据处理方法、装置、芯片以及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2024082702A1 true WO2024082702A1 (fr) 2024-04-25

Family

ID=90729557

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/103852 WO2024082702A1 (fr) 2022-10-20 2023-06-29 Procédé et appareil de traitement de données, puce et support de stockage lisible par ordinateur

Country Status (2)

Country Link
CN (1) CN117917649A (fr)
WO (1) WO2024082702A1 (fr)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092534A (zh) * 2013-02-04 2013-05-08 中国科学院微电子研究所 一种内存结构的调度方法和装置
CN107193646A (zh) * 2017-05-24 2017-09-22 中国人民解放军理工大学 一种基于混合主存架构的高效动态页面调度方法
CN108804350A (zh) * 2017-04-27 2018-11-13 华为技术有限公司 一种内存访问方法及计算机系统
CN110347510A (zh) * 2019-07-09 2019-10-18 中国科学院微电子研究所 一种混合内存的管理方法、系统、设备及介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092534A (zh) * 2013-02-04 2013-05-08 中国科学院微电子研究所 一种内存结构的调度方法和装置
CN108804350A (zh) * 2017-04-27 2018-11-13 华为技术有限公司 一种内存访问方法及计算机系统
CN107193646A (zh) * 2017-05-24 2017-09-22 中国人民解放军理工大学 一种基于混合主存架构的高效动态页面调度方法
CN110347510A (zh) * 2019-07-09 2019-10-18 中国科学院微电子研究所 一种混合内存的管理方法、系统、设备及介质

Also Published As

Publication number Publication date
CN117917649A (zh) 2024-04-23

Similar Documents

Publication Publication Date Title
US11954043B2 (en) Memory system and method for controlling nonvolatile memory
US11797436B2 (en) Memory system and method for controlling nonvolatile memory
CN110555001B (zh) 数据处理方法、装置、终端及介质
EP3115904A1 (fr) Procédé de gestion d'une antémémoire distribuée
CN115794669A (zh) 一种扩展内存的方法、装置及相关设备
CN115904212A (zh) 数据处理的方法、装置、处理器和混合内存系统
US20220107752A1 (en) Data access method and apparatus
JP6343722B2 (ja) マルチコアシステムにおいてデータ訪問者ディレクトリにアクセスするための方法及びデバイス
CN114546898A (zh) 一种tlb管理方法、装置、设备及存储介质
US20230088344A1 (en) Storage medium management method and apparatus, device, and computer-readable storage medium
WO2024082702A1 (fr) Procédé et appareil de traitement de données, puce et support de stockage lisible par ordinateur
WO2024061344A1 (fr) Procédé et appareil de migration de données, puce et support de stockage lisible par ordinateur
CN116644006B (zh) 一种内存页面管理方法、系统、装置、设备及计算机介质
WO2024066575A1 (fr) Procédé et dispositif de distinction de pages physiques froides et chaudes, puce et support de stockage
WO2024060710A1 (fr) Procédé et appareil de permutation de page
CN116880754A (zh) 数据访问热度统计方法及装置
CN115858422A (zh) 页表的处理方法、电子设备和存储介质
CN116339611A (zh) 缓存管理的方法、装置、系统及存储介质
CN115827688A (zh) 数据访问方法及装置