WO2024139385A1 - 数据处理方法、装置、芯片和计算机可读存储介质 - Google Patents

数据处理方法、装置、芯片和计算机可读存储介质 Download PDF

Info

Publication number
WO2024139385A1
WO2024139385A1 PCT/CN2023/117603 CN2023117603W WO2024139385A1 WO 2024139385 A1 WO2024139385 A1 WO 2024139385A1 CN 2023117603 W CN2023117603 W CN 2023117603W WO 2024139385 A1 WO2024139385 A1 WO 2024139385A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
physical address
target
identification number
process identification
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2023/117603
Other languages
English (en)
French (fr)
Inventor
覃朗
杨瑞
祝晓平
陈欢
赵兵
王官皓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to EP23909323.0A priority Critical patent/EP4632587A4/en
Publication of WO2024139385A1 publication Critical patent/WO2024139385A1/zh
Priority to US19/251,088 priority patent/US20250335366A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1027Address translation using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0862Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with prefetch
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1027Address translation using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
    • G06F12/1036Address translation using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB] for multiple virtual address spaces, e.g. segmentation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • G06F2212/1024Latency reduction
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/30Providing cache or TLB in specific location of a processing system
    • G06F2212/304In main memory subsystem
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/50Control mechanisms for virtual memory, cache or TLB
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/65Details of virtual memory and virtual address translation
    • G06F2212/654Look-ahead translation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/65Details of virtual memory and virtual address translation
    • G06F2212/657Virtual address space management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/68Details of translation look-aside buffer [TLB]
    • G06F2212/681Multi-level TLB, e.g. microTLB and main TLB

Definitions

  • DRAM Dynamic random access memory
  • a hybrid memory system is usually composed of dynamic random access memory and storage-level memory. It is necessary to count the memory access information, transfer the cold data to the extended storage medium, and then transfer it to DRAM on demand for access when needed.
  • the memory access instruction By identifying and analyzing the memory access instruction, it is determined whether the memory access instruction corresponds to a memory pointer, and the indicated access area is located in the storage-level memory.
  • the indicated memory pointer is a storage-level memory
  • data prefetching is performed to prefetch the data of the target memory page to be accessed into the dynamic random access memory.
  • the memory page to be accessed in the future is promoted to the dynamic random access memory, which improves the accuracy of data prefetching and the acceleration performance of subsequent data processing.
  • the mapping table may include a page table, or the mapping table includes a page table and a translation lookaside buffer table (TLB).
  • the translation lookaside buffer table may be an existing translation lookaside buffer table in the multiplexing processor, or a separately set translation lookaside buffer table, which is not specifically limited here.
  • the process of querying the mapping table includes: querying the translation lookaside buffer table according to the target virtual address and the target process identification number. If the first physical address is not included in the translation lookaside buffer table, querying the page table according to the target virtual address and the target process identification number.
  • mapping table includes a page table and a translation lookaside buffer table
  • implementation of the translation lookaside buffer table which enriches the implementation methods of the technical solution of the present application and improves the flexibility and practicality of the technical solution.
  • the table includes a page table and a translation lookaside buffer table
  • the translation lookaside buffer table is searched first, taking advantage of the fast query speed of the translation lookaside buffer table to improve the data processing speed.
  • pre-fetching the data of the target memory page corresponding to the first physical address to the dynamic random access memory includes: pre-fetching the data of the target memory page to the second physical address, and the second physical address is included in the physical address range corresponding to the dynamic random access memory. Based on this, the physical address corresponding to the target virtual address and the target process number has changed, that is, the corresponding relationship has changed. Therefore, the mapping table needs to be updated. In other words, the corresponding relationship between the target virtual address, the target process identification number and the first physical address in the mapping table needs to be updated to the corresponding relationship between the target virtual address, the target process identification number and the second physical address.
  • mapping table After pre-fetching the data in the storage-level memory to the dynamic random access memory, the corresponding relationship in the mapping table will be updated to adapt the mapping table to the actual data processing process.
  • the specific update method varies with the type of mapping table. While enriching the implementation method of the solution, it can also ensure that subsequent access operations can proceed smoothly, improving the feasibility of the technical solution.
  • mapping table before obtaining the query mapping table, it is also necessary to construct the mapping table. Specifically, the correspondence between at least one virtual address, at least one process identification number and at least one physical address can be obtained. And based on the correspondence between at least one virtual address, at least one process identification number and at least one physical address, the mapping table is constructed.
  • the storage-level memory controller can obtain the correspondence between at least one virtual address, at least one process identification number and at least one physical address, and build a mapping table based on this, which provides technical support for the implementation of the technical solution of the present application and improves the feasibility of the technical solution of the present application.
  • the present application provides a data processing device, which includes various modules for executing the data processing method in the first aspect or any possible implementation of the first aspect.
  • a chip including a processing unit and a power supply circuit, wherein the power supply circuit supplies power to the processing unit, and the processing unit is used to implement the method shown in the aforementioned first aspect and any possible implementation manner of the first aspect.
  • FIG6 is a schematic structural diagram of a chip provided by the present application.
  • FIG. 1a and FIG. 1b are schematic diagrams of the system architecture provided in this application.
  • the processor 101 obtains the memory access instruction and sends the memory access instruction to the storage-level memory controller 102.
  • the storage-level memory controller 102 will parse the memory access instruction and perform corresponding operations, thereby accessing the data corresponding to the memory access instruction in the storage-level memory 103 or the dynamic random access memory 104. The specific process will be described in detail later and will not be expanded here.
  • the storage-class memory 103 has multiple memory forms, which can be data center persistent memory (DC PMem), such as AEP; it can also be other storage-class memory, such as phase-change memory (PCM), persistent memory (PMem), non-volatile memory (NVM), etc., which are not limited here.
  • DC PMem data center persistent memory
  • AEP can also be other storage-class memory, such as phase-change memory (PCM), persistent memory (PMem), non-volatile memory (NVM), etc., which are not limited here.
  • PCM phase-change memory
  • PMem persistent memory
  • NVM non-volatile memory
  • the correspondence between at least one virtual address, at least one process identification number and at least one physical address is stored in the page table, wherein at least one virtual address corresponds to at least one physical address one-to-one, and each process identification number may correspond to one or more virtual addresses and physical addresses. This is because the data corresponding to a business process can be stored in multiple storage areas.
  • the mapping table includes the page table and the translation lookaside buffer table.
  • the translation lookaside buffer table described in the embodiment of the present application can be a translation lookaside buffer table in an existing processor that is reused, that is, the function of the existing translation lookaside buffer table is expanded to enable it to store corresponding relationships; it can also be a separately set translation lookaside buffer table.
  • the separately set translation lookaside buffer table can be called a mini translation lookaside buffer (miniTLB) table to distinguish it from the existing translation lookaside buffer table in the processor.
  • miniTLB mini translation lookaside buffer
  • the specific implementation of the translation lookaside buffer table can be selected according to the needs of the actual application, and is not specifically limited here.
  • the operation of the storage-level memory controller pre-fetching the data of the target memory page corresponding to the first physical address to the dynamic random access memory is specifically manifested as first releasing the correspondence between the first physical address and the target virtual address and the target process identification number included in the first memory access instruction, and then establishing the correspondence between the second physical address and the target virtual address and the target process identification number included in the first memory access instruction.
  • the operation of releasing the correspondence between the first physical address and the target virtual address and the target process identification number included in the first memory access instruction can be called an unmap operation; the operation of establishing the correspondence between the second physical address and the target virtual address and the target process identification number included in the first memory access instruction can be called a map operation.
  • the first physical address corresponding to the target virtual address and the target process identification number in the page table may be updated to the second physical address.
  • Figure 2 mainly uses the storage-level memory controller as the execution subject, and illustrates a series of operations (including table lookup, data prefetching, etc.) performed by the storage-level memory controller after obtaining the memory access instruction.
  • Figure 3, which will be introduced next, focuses on the change process of the corresponding relationship from the perspective of registration, use and migration of the corresponding relationship between the virtual address, physical address and target process number.
  • Figures 2 and 3 are both descriptions of the data processing process, with slightly different emphases. Below, please refer to Figure 3, which is a flow chart of the data processing method provided by this application.
  • the SCM controller determines that the physical address corresponding to the memory access instruction is a memory pointer and is included in the physical address range of the SCM, the SCM control will release the previous correspondence of the physical address and initiate a prefetch, pointing the physical address to the memory page, and migrating the memory page and the data in the memory page to DRAM, and then refresh the corresponding page table entry, that is, establishing a new PA->VA->PID correspondence. Based on this, when the CPU performs subsequent page access, it can directly access it from the DRAM side.
  • FIG4 is a flowchart of the data processing method provided in the present application.
  • the determination module 501 is used to obtain a first memory access instruction, which carries a target virtual address and a target process identification number, and the target process identification number indicates the process corresponding to the first memory access instruction; according to the target virtual address and the target process identification number, a mapping table is queried, and the mapping table includes a correspondence between at least one virtual address, at least one process identification number and at least one physical address.
  • the prefetch module 502 is specifically configured to prefetch data of the target memory page to a second physical address, where the second physical address is included in a physical address range corresponding to the dynamic random access memory.
  • FIG. 6 is a schematic diagram of the structure of the chip provided in this application.
  • the present application also provides a data processing system, as shown in FIG7 , which is a schematic diagram of the structure of a data processing system 700 provided by the present application.
  • the first memory access instruction carries a target virtual address and a target process identification number, the target process identification number indicates the process corresponding to the first memory access instruction; query a mapping table according to the target virtual address and the target process identification number, the mapping table includes a mapping relationship between at least one virtual address, at least one process identification number and at least one physical address; if there is a first physical address corresponding to the target virtual address and the target process identification number in the mapping table, and the first physical address is included in the physical address range corresponding to the storage-level memory, then pre-fetch the data of the target memory page corresponding to the first physical address to the dynamic random access memory.
  • the corresponding processes executed by the SCM controller in each method in Figures 2 to 4 can also be implemented, which will not be repeated here for the sake of brevity.
  • dynamic random access memory 706 there are many types of dynamic random access memory 706, such as synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data date SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synchlink DRAM, SLDRAM), etc., which are not limited here.
  • synchronous dynamic random access memory synchronous DRAM, SDRAM
  • double data rate synchronous dynamic random access memory double data date SDRAM, DDR SDRAM
  • enhanced synchronous dynamic random access memory enhanced SDRAM
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link dynamic random access memory
  • bus 704 may also include a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as bus 704 in the figure.
  • the bus 704 may be a Peripheral Component Interconnect Express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect protocol (CCIe), or a 32-bit 4 ...
  • PCIe Peripheral Component Interconnect Express
  • EISA extended industry standard architecture
  • Ubus or UB unified bus
  • CXL compute express link
  • CCIe cache coherent interconnect protocol
  • 32-bit 4 ...
  • the bus 704 can be divided into an address bus, a data bus, a control bus, etc.
  • the SCM controller 701 of the embodiment of the present application may correspond to the data processing device 500 in the embodiment of the present application, and may correspond to the corresponding subject in the method of executing the embodiment of the present application, and the above-mentioned and other operations and/or functions of each module in the data processing device 500 are respectively for realizing the corresponding processes of each method in Figures 1a to 4, and for the sake of brevity, they will not be repeated here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

数据处理方法、装置、芯片和计算机可读存储介质,涉及计算机领域,用于提升数据预取的准确度和数据后续处理的加速性能。该方法应用于包括存储级内存和动态随机存取内存的混合内存系统,包括:获取携带目标虚拟地址和目标进程识别号的第一访存指令,目标进程识别号指示第一访存指令对应的进程。根据目标虚拟地址和目标进程识别号,查询映射表,映射表包括至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系。若映射表中存在对应于目标虚拟地址和目标进程识别号的第一物理地址,且第一物理地址包含于存储级内存对应的物理地址范围,则将第一物理地址对应的目标内存页的数据预取至动态随机存取内存。

Description

数据处理方法、装置、芯片和计算机可读存储介质
本申请要求于2022年12月27日提交中国国家知识产权局、申请号为CN202211687803.X、发明名称为“数据处理方法、装置、芯片和计算机可读存介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,尤其涉及一种数据处理方法、装置、芯片以及和计算机可读存储介质。
背景技术
大数据时代催生了大量的数据密集型应用,对于内存子系统的容量和带宽的需求也日益增加,动态随机存取内存(dynamic random access memory,DRAM)在服务器的总持有成本中的占比也越来越大。为了提升内存系统的综合性价比,通常采用动态随机存取内存和存储级内存构成混合内存系统,需要对访存信息进行统计,将冷数据转存至扩展存储介质,在需要的时候再按需转存至DRAM中进行访问。
现有的一种数据处理的方法中,主要以内存页存取位标识存储级内存中内存页的热度,进而执行数据的迁移。例如,在一个扫描周期内,如果存储级内存中的某个内存页被访问,则将该内存页存取位(access bit)的取值置为1。该内存页再次被访问时,由于存取位置为1,认为该内存页为热内存页,将该内存页中的数据预取至动态随机存取内存中。
在上述数据处理方法中,存取位的取值只能表示在当前扫描周期中某个内存页是否被访问,仅基于此判定冷热内存页并不准确,降低了数据预取的准确度。
发明内容
本申请提供了一种数据处理方法、装置、芯片和计算机可读存储介质,在数据处理方法中,通过确定访存指令对应的第一物理地址,在第一物理地址包含于存储级内存对应的物理地址范围的情况下,将第一物理地址对应的目标内存页的数据预取至动态随机存取内存。也就是说,通过识别访存指令对应的物理地址,将未来即将访问的内存页提升至动态随机存取内存,提升了数据预取的准确度和数据后续处理的加速性能。
第一方面,提供了一种数据处理方法,该方法应用于混合内存系统,混合内存系统中包括了不同类型的内存,具体包括存储级内存和动态随机存取内存。获取第一访存指令,触发访问数据的过程,数据访问包括了寻址、读取数据或者写入数据等步骤。第一访存指令中携带目标虚拟地址(virtual address,VA)和目标进程识别号(process identification,PID),目标PID指示第一访存指令所对应的进程。在多进程同时运行的情况下,通过进程识别号,能够区分不同进程的访存指令,从而避免数据操作出现错误。在读取数据或者写入数据之前,会确定即将访问的内存区域是否位于SCM中,以及第一访存指令对应的物理地址是否为一个内存指针,来确定是否需要进行数据预取。具体来说,根据目标虚拟地址和目标进程设备号查询映射表,该映射表中包括至少一个虚拟地址、至少一个物理地址和至少一个进程识别号之间的对应关系。如果在映射表中存在与目标虚拟地址和目标进程识别号对应的第一物理地址,并且该第一物理地址包含于SCM的物理地址范围,那么意味着第一物理地址为内存指针,且第一访存指令所要访问的内存页位于SCM中,基于此,将第一物理地址对应的目标内存页的数据预取至DRAM中。
从以上技术方案可以看出,本申请具有以下优点:
通过对访存指令中进行识别分析,确定访存指令是否对应内存指针,且指示的访问区域位于存储级内存,在指示的是存储级内存的内存指针的情况下,进行数据预取,将被访问的目标内存页的数据预取至动态随机存取内存。也就是说,通过识别访存指令对应的物理地址,将未来即将访问的内存页提升至动态随机存取内存,提升了数据预取的准确度和数据后续处理的加速性能。
在一种可能的实现方式中,映射表可以包括页表,或者映射表包括页表和转译后备缓冲器表(translation lookaside buffer,TLB)。该转译后备缓冲器表既可以是复用处理器中已有的转译后备缓冲器表,也可以是单独设置的转译后备缓冲器表,具体此处不做限定。在映射表包括页表和转译后备缓冲器表的情况下,查询映射表的过程包括:根据目标虚拟地址和目标进程识别号,查询转译后备缓冲器表。如果转译后备缓冲器表中不包括第一物理地址,则根据目标虚拟地址和目标进程识别号,查询页表。
映射表有多种可能,在映射表包括页表和转译后备缓冲器表的情况下,转译后备缓冲器表的实现也有多种可能,均丰富了本申请技术方案的实现方式,提升了技术方案的灵活性和实用性。另外,在映射 表包括页表和转译后备缓冲器表的情况下,优先查询转译后备缓冲器表,利用了转译后备缓冲器表查询速度快的优势,提升了数据处理的速度。
在一种可能的实现方式中,将第一物理地址对应的目标内存页的数据预取至动态随机存取内存,包括:将目标内存页的数据预取至第二物理地址,第二物理地址包含于动态随机存取内存对应的物理地址范围。基于此,目标虚拟地址、目标进程号对应的物理地址发生了改变,也即出现了对应关系的改变。因此,需要更新映射表。也就是说,需要将映射表中目标虚拟地址、目标进程识别号与第一物理地址的对应关系,更新为目标虚拟地址、目标进程识别号与第二物理地址的对应关系。
在一种可能的实现方式中,随着映射表的类型不同,更新映射表的方式有所不同。如果映射表包括页表,则是将页表中目标虚拟地址、目标进程识别号与第一物理地址的对应关系,更新为目标虚拟地址、目标进程识别号与第二物理地址的对应关系。如果映射表包括页表和转译后备缓冲器表,则除了需要将页表中目标虚拟地址、目标进程识别号与第一物理地址的对应关系,更新为目标虚拟地址、目标进程识别号与第二物理地址的对应关系之外,还需要将目标虚拟地址、目标进程识别号与第二物理地址的对应关系存储至转译后备缓冲器表。
在将存储级内存中的数据预取至动态随机存取内存之后,还会更新映射表中的对应关系,使得映射表与实际的数据处理过程适配。随着映射表的类型不同,具体的更新方式也有所不同,在丰富方案的实现方式的同时,也能保证后续的访问操作可以顺利进行,提升了技术方案的可实现性。
在一种可能的实现方式中,在获取查询映射表之前,还需要构建映射表。具体来说,能够获取至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系。并基于至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系,构建映射表。
存储级内存控制器能够获取至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系,并基于此构建映射表,为本申请技术方案的实现提供了技术支持,提升了本申请技术方案的可实现性。
第二方面,本申请提供了一种数据处理装置,所述数据处理装置包括用于执行第一方面或第一方面任一种可能实现方式中的数据处理方法的各个模块。
第三方面,提供了一种芯片,包括处理单元和供电电路,供电电路为处理单元供电,处理单元用于实现前述第一方面以及第一方面的任一种可能的实现方式所示的方法。
第四方面,提供了一种计算机可读存储介质,计算机可读存储介质中保存有指令,当指令在处理器上运行时,实现第一方面以及第一方面的任一种可能的实现方式所示的方法。
第五方面,提供了一种计算机程序产品,当计算机程序产品在处理器上执行时,实现第一方面以及第一方面的任一种可能的实现方式所示的方法。
第二方面至第五方面所示的有益效果与第一方面实现第一方面以及第一方面的任一种可能的实现方式类似,此处不再赘述。
本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。
附图说明
图1a为本申请应用的一个系统架构示意图;
图1b为本申请应用的另一个系统架构示意图;
图2为本申请提供的数据处理方法的一个流程示意图;
图3为本申请提供的数据处理方法的另一个流程示意图;
图4为本申请提供的数据处理方法的另一个流程示意图;
图5本申请提供的数据处理装置的一个结构示意图;
图6本申请提供的芯片的一个结构示意图;
图7为本申请提供的数据处理系统的一个示意图。
具体实施方式
为了提升数据预取的准确度,本申请提供了一种数据处理方法、装置、芯片和计算机可读存储介质,通过对访存指令中进行识别分析,确定访存指令是否对应内存指针,且指示的访问区域位于存储级内存,在指示的是存储级内存的内存指针的情况下,进行数据预取,将被访问的目标内存页的数据预取至动态 随机存取内存。也就是说,通过识别访存指令对应的物理地址,将未来即将访问的内存页提升至动态随机存取内存,提升了数据预取的准确度和数据后续处理的加速性能。
下面结合附图,对本申请的实施例进行描述。
首先,请参阅图1a和图1b,图1a和图1b均为本申请提供的系统架构示意图。
如图1a所示,本申请实施例提供的数据处理方法应用于混合内存系统,在混合内存系统中包括多种类型的内存,例如存储级内存103和动态随机存取内存104。其中,存储级内存103是一种物理计算机内存,存储级内存103将非易失性内存视为动态随机存取内存104。在读写速度和数据处理上,动态随机存取内存104的表现比存储级内存103好。
在数据处理的过程中,处理器101获取访存指令,并将访存指令下发给存储级内存控制器102,在本申请实施例中,存储级内存控制器102会解析访存指令,并执行相应的操作,从而在存储级内存103或者动态随机存取内存104中访问访存指令对应的数据。具体的过程会在后文进行详细说明,此处不做展开。
需要注意的是,图1a只是对系统架构的是一个示意图,并不构成对本申请实施例应用的系统的限定。在图1a所示实施例中,存储级内存控制器102与处理器101解耦;在实际应用中,如图1b所示,存储级内存控制器102还可以与处理器101耦合,具体此处不做限定。
需要注意的是,存储级内存103有多种内存形态,可以是数据中心持久内存(data center persistent memory,DC PMem),例如AEP;还可以是其他存储级内存,例如相变内存(phase-change memory,PCM)、持久化内存(persistent memory,PMem)、非易失性内存(non-volatile memory,NVM)等,具体此处不做限定。
需要注意的是,动态随机存储内存104有多种内存形态,可以是同步动态存取内存(synchronous dynamic random access memory,SDRAM)、也可以是双倍速率(double data rate,DDR)。除此之外,还可是其他类型的内存形态,例如远程直接数据存取(remote direct memory access,RDMA)内存,或者节点外扩展内存(memory fabric)等,具体此处不做限定。
需要注意的是,在本申请实施例中,存储级内存控制器102与处理器101、存储级内存103、动态随机存储内存104建立连接的总线协议有多种可能,例如:双列直插式内存模块(dual in-line memory module,DIMM)总线协议、DDR-T、开放性互联协议(compute express link,CXL)、开放式相关处理器接口(open coherent accelerator processor interface,OpenCAPI)协议、Gen-Z协议、缓存一致互联(cache coherent interconnect for accelerators,CCIX)协议,除此之外,还可以有其他的总线协议,例如:InfiniBand/RoCE、QuickPath、NVLink等,具体此处不做限定。
本申请实施例提供的数据处理方法可以应用在上文介绍的架构中,下面结合示意图,进行详细说明。请参阅图2,图2为本申请提供的数据处理方法的一个流程示意图,至少包括以下步骤:
201.存储级内存控制器获取来自于处理器的第一访存指令。
处理器获取第一访存指令后,将第一访存指令下发给存储级内存控制器,由存储级内存控制器进行对第一访存指令进行分析,确定第一访存指令所指示的被访问区域位于混合内存区域中的存储级内存还是动态随机存取内存,以及确定第一访存指令对应的内存地址(也即物理地址)是否为内存指针。
其中,内存指针意味着,该内存地址中存储的并不是实际要访问的数据,而是指示数据量大的内存块,该内存块的数据量大于内存指针本身所占用的内存空间。内存指针的内容通常为某个内存页的地址指向的对象为内存分配前期申请的大块内存空间。
另外,第一访存指令携带目标虚拟地址和目标进程识别号,目标进程识别号指示第一访存指令对应的进程,使得存储级内存控制器能够区分不同的业务进程所对应的访存指令,即时在多业务并发的情况下,也能避免访问出错。
202.存储级内存控制器基于第一访存指令查询映射表。
存储级内存控制器在获取第一访存指令之后,会基于第一访存指令包括的目标虚拟地址和目标进程识别号,查询映射表,以确定第一访存指令所指示的被访问区域位于混合内存区域中的存储级内存还是动态随机存取内存,以及确定第一访存指令对应的物理地址是否为内存指针。其中,映射表中包括至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系。
在本申请实施例中,映射表有多种情况,可以包括页表,或者包括页表和转译后备缓冲器(translation lookaside buffer,TLB)表。对于不同的情况,查表的方式也有所不同,下面分别对可能的情况进行说明。
1)映射表包括页表。
在这种情况下,存储级内存控制器根据目标虚拟地址和目标进程识别号,查询页表。其中,页表可以存储于控制寄存器(control register,CR)中。具体来说,存储级内存控制器可以向CR控制器发送查询指令,在该查询指令中携带目标虚拟地址和目标进程识别号,查询指令指示查询目标虚拟地址和目标进程识别号对应的物理地址。
在页表中存储至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系,其中,至少一个虚拟地址与至少一个物理地址一一对应,每个进程识别号则可以对应一个或者多个虚拟地址和物理地址,这也是因为,一个业务进程所对应的数据可以存储在多个存储区域。
2)映射表包括页表和转译后备缓冲器表。
考虑到转译后备缓冲器表的性能表现(主要是查询速度)优于页表,因此,在映射表包括页表和转译后备缓冲器表的情况下,存储级内存控制器会先查找转译后备缓冲器表,如果在转译后备缓冲器表查不到满足条件的第一物理地址,再查询页表。第一物理地址需要满足的条件在步骤203中进行说明,此处不再赘述。
需要注意的是,本申请实施例所说的转译后备缓冲器表,既可以是复用已有的处理器中的转译后备缓冲器表,也即扩展已有的转译后备缓冲器表的功能,使其能够存储对应关系;也可以是单独设置的转译后备缓冲器表,在这种情况下,单独设置的转译后备缓冲器表可以称为迷你转译后备缓冲器(miniTLB)表,以与处理器中已有的转译后备缓冲器表进行区分。转译后备缓冲器表的具体实现方式可以根据实际应用的需要选择,具体此处不做限定。
本申请实施例中,映射表有多种可能,在映射表包括页表和转译后备缓冲器表的情况下,转译后备缓冲器表的实现也有多种可能,均丰富了本申请技术方案的实现方式,提升了技术方案的灵活性和实用性。另外,在映射表包括页表和转译后备缓冲器表的情况下,优先查询转译后备缓冲器表,利用了转译后备缓冲器表查询速度快的优势,提升了数据处理的速度。
203.存储级内存控制器确定映射表中是否存在对应于第一访存指令,且包含于存储级内存的物理地址范围的第一物理地址,若是,则执行步骤204。
上文提到的满足条件的第一物理地址,是指在映射表中与第一访存指令对应,且包含于存储级内存的物理地址范围的物理地址。其中,与第一访存指令对应,是指对应于第一访存指令携带的目标虚拟地址和目标进程识别号。
如果在映射表中,存在这样的第一物理地址,意味着第一物理地址为内存指针,并且第一访存指令指示访问的数据区域位于存储级内存中。也就是说,即将被访问的数据不仅数据量大且存储于处理性能较弱的存储级内存中。
204.将第一物理地址对应的目标内存页的数据预取至动态随机存取内存。
在存储级内存控制器确定映射表中存在对应于第一访存指令,且包含于存储级内存的物理地址范围的第一物理地址的情况下,存储级内存控制器会将第一物理地址对应的目标内存页的数据预取至动态随机存储内存中。其中,第一物理地址对应的目标内存页可以是存储于存储级内存的一个内存页,也可以是多个内存页,具体此处不做限定。
进行内存页的预取,是考虑到存储级内存的数据处理性能弱于动态随机存取内存,且第一访存指令所要访问的数据量较大,不预取的话,处理器是在存储级内存中进行数据访问,处理速度较慢,性能表现差,而预取之后则可以解决这个问题。
将第一物理地址对应的目标内存页预取至动态随机存取内存,也可以理解为,把即将被访问的目标内存页识别为热内存页,该内存页中的数据识别为热数据。将目标内存页的数据预取至动态随机存取内存,实际上是将目标内存页的数据预取至第二物理地址,第二物理地址包含于动态随机存取内存对应的物理地址范围,也就是说,改变了目标内存页的数据的存储位置。
本申请实施例中,通过对访存指令中进行识别分析,确定访存指令是否对应内存指针,且指示的访 问区域位于存储级内存,在指示的是存储级内存的内存指针的情况下,进行数据预取,将被访问的目标内存页的数据预取至动态随机存取内存。也就是说,通过识别访存指令对应的物理地址,将未来即将访问的内存页提升至动态随机存取内存,提升了数据预取的准确度和数据后续处理的加速性能。
在一些可选的实施方式中,在查询映射表之前,也即在步骤202之前,存储级内存控制器会构建映射表。存储级内存控制器会获取至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系,并基于至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系,构建映射表。不论映射表包括页表,还是包括页表和转译后备缓冲器表,在初始化阶段(也即处理器上运行的操作系统分配新内存空间时),都会显式地将虚拟地址、物理地址和进程识别号的对应关系配置给存储级内存控制器。这里的物理地址在包含于存储级内存的物理地址范围时,指示的是内存指针。存储级内存控制器基于此构建页表,并将页表的地址放置在CR寄存器中。
本申请实施例中,存储级内存控制器能够获取至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系,并基于此构建映射表,为本申请技术方案的实现提供了技术支持,提升了本申请技术方案的可实现性。
在一些可选的实施方式中,存储级内存控制器还会对映射表进行更新。具体来说,在将第一物理地址对应的目标内存页的数据预取至动态随机存取内存之后,也就是在步骤204之后,与目标虚拟地址和目标进程识别号对应的物理地址发生了改变,因此需要更新映射表。
其中,存储级内存控制器将第一物理地址对应的目标内存页的数据预取至动态随机存储内存的操作,具体表现为先解除第一物理地址与第一访存指令包括的目标虚拟地址和目标进程识别号的对应关系,然后再建立第二物理地址与第一访存指令包括的目标虚拟地址和目标进程识别号的对应关系。解除第一物理地址与第一访存指令包括的目标虚拟地址和目标进程识别号的对应关系的操作,可以称为unmap操作;建立第二物理地址与第一访存指令包括的目标虚拟地址和目标进程识别号的对应关系的操作,可以称为map操作。
由于映射表有多种可能,因此,映射表的更新也有多种可能,下面分别进行说明。
1)映射表包括页表。
在这种情况下,将页表中目标虚拟地址和目标进程识别号对应的第一物理地址更新为第二物理地址即可。
2)映射表包括页表和转译后备缓冲器表。
在这种情况下,需要将页表中目标虚拟地址和目标进程识别号对应的第一物理地址更新为第二物理地址。另外,由于在初始化阶段,转译后备缓冲器表中并没有存储对应关系,发生预取之后,将新建立的对应关系存储至转译后备缓冲器表即可。对应到前面的实施例中,也就是将目标虚拟地址、目标进程识别号与第二物理地址的对应关系存储至转译后备缓冲器表。
本申请实施例中,在将存储级内存中的数据预取至动态随机存取内存之后,还会更新映射表中的对应关系,使得映射表与实际的数据处理过程适配。随着映射表的类型不同,具体的更新方式也有所不同,在丰富方案的实现方式的同时,也能保证后续的访问操作可以顺利进行,提升了技术方案的可实现性。
数据预取之后,处理器进行后续的页面访问时,可以直接从动态随机存取内存侧访问。也就是说,在步骤204之后,还可以执行步骤205.处理器通过动态随机存取内存访问目标内存页。
在步骤204中,存储级内存控制器将第一物理地址对应的目标内存页的数据预取到了动态随机存取内存中,那么基于第一访存指令对应的被访问的数据也就位于动态随机存取内存中,因此,处理器通过访问随机存取内存,以访问目标内存页。具体来说,在预取之后,目标内页页对应的物理地址由第一物理地址变更为第二物理地址,处理器实际上访问的是第二物理地址的数据。
需要注意的是,图2主是以存储级内存控制器为执行主体,说明了存储级内存控制器在获取访存指令之后所执行的一系列操作(包括查表、数据预取等)。而接下来要介绍的图3,则是以虚拟地址、物理地址和目标进程号之间的对应关系的注册、使用和迁移的角度,着重说明对应关系的变化过程。也就是说,图2和图3均是对数据处理过程的说明,侧重点略有不同。下面,请参阅图3,图3为本申请提供的数据处理方法的流程示意图。
如图3所示,在注册阶段,SCM控制器会发起内存申请,处理器(central processing unit,CPU) 进行新内存空间的分配,显式将PA->VA->PID的对应关系配置给SCM控制器,由SCM控制器记录并基于对应关系构建映射表。
在使用阶段,也即在CPU向SCM控制器下发访存指令之后,SCM控制器会根据访存指令携带的VA和PID查询映射表,以确定访存指令对应的物理地址是否为内存指针,且是否包含于SCM的物理地址范围。其中,访存指令指示访问混合内存中的数据,具体可以是下载(load)指令,或者存储(store)指令,具体此处不做限定。
在SCM控制器判定访存指令对应的物理地址为内存指针,且包含于SCM的物理地址范围的情况下,SCM控制会解除该物理地址之前的对应关系,并发起预取,将该物理地址指向内存页面,并将该内存页面、以及内存页面中的数据迁移至DRAM,再刷新对应的页表项,也即建立新的PA->VA->PID的对应关系。基于此,CPU进行后续页面访问时,就可以直接从DRAM侧访问。
在前文的说明中,说明了在映射表中存在满足条件的物理地址的情况,也即在映射表中存在与访存指令中的虚拟地址和进程识别号对应,且包含于SCM的物理地址范围的物理地址的情况。但是在实际应用中,SCM控制器还可以处理其他类型的访存指令,下面结合示意图,进行说明。
请参阅图4,图4为本申请提供的数据处理方法的流程示意图。
如图4所示,VA#1对应的物理地址,指示的是SCM中的一个内存页,也就是说,VA#1对应的物理地址为SCM中的内存指针。在本申请实施例中,SCM控制器,能够识别该内存指针,并将该内存指针对应的内存页的数据预取至DRAM中。具体的过程,在上文已经说明,此处不再赘述。需要注意的是,图4中省略了进程识别号,在实际应用中,确定是否为内存指针,依旧需要使用进程识别号。
SCM控制器,还能够识别对应其他数据类型的虚拟地址,例如,SCM控制器可以识别指示DRAM中存储的数据的VA#2,和/或指示SCM中存储的数据的VA#3。在前者的情况在,数据已经位于性能表现好的DRAM中了,并不需要进行迁移。在后者的情况下,所指示的是数据本身,并不是内存指针,该数据的数据量通常较小,为1字节。预取与否对数据处理过程的影响不大,出于节约运算资源的考虑,可以不对该数据进行预取。
上文中结合图2至图4,详细描述了根据本申请所提供的数据处理方法,下面将结合图5至图6,描述根据本发明本申请实施例所提供的数据处理装置和芯片。
图5为本申请提供的数据处理装置的一个结构示意图。如图5所示,数据处理装置500包括判定模块501和预取模块502。
判定模块501,用于获取第一访存指令,第一访存指令携带目标虚拟地址和目标进程识别号,目标进程识别号指示第一访存指令对应的进程;根据目标虚拟地址和目标进程识别号,查询映射表,映射表包括至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系。
预取模块502,用于若映射表中存在对应于目标虚拟地址和目标进程识别号的第一物理地址,且第一物理地址包含于存储级内存对应的物理地址范围,则将第一物理地址对应的目标内存页的数据预取至动态随机存取内存。
应理解的是,本发明本申请实施例的数据处理装置500可以通过中央处理单元(central processing unit,CPU)实现,也可以通过专用集成电路(application-specific integrated circuit,ASIC)实现,或可编程逻辑器件(programmable logic device,PLD)实现,上述PLD可以是复杂程序逻辑器件(complex programmable logical device,CPLD),现场可编程门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)、数据处理单元(data processing unit,DPU)、片上系统(system on chip,SoC)或其任意组合。也可以通过软件实现图2至图4所示的数据处理方法时,数据处理装置500及其各个模块也可以为软件模块。
在一些可选的实施方式中,映射表包括页表,或者映射表包括页表和转译后备缓冲器表。若映射表包括页表和转译后备缓冲器表,则判定模块501,具体用于:根据目标虚拟地址和目标进程识别号,查询转译后备缓冲器表;若转译后备缓冲器表中不包括第一物理地址,则根据目标虚拟地址和目标进程识别号,查询页表。
在一些可选的实施方式中,预取模块502,具体用于将目标内存页的数据预取至第二物理地址,第二物理地址包含于动态随机存取内存对应的物理地址范围。
判定模块501,还用于将映射表中目标虚拟地址、目标进程识别号与第一物理地址的对应关系,更新为目标虚拟地址、目标进程识别号与第二物理地址的对应关系。
在一些可选的实施方式中,判定模块501,具体用于若映射表包括页表和转译后备缓冲器表,则将页表中目标虚拟地址、目标进程识别号与第一物理地址的对应关系,更新为目标虚拟地址、目标进程识别号与第二物理地址的对应关系;将目标虚拟地址、目标进程识别号与第二物理地址的对应关系存储至转译后备缓冲器表。
在一些可选的实施方式中,判定模块501,还用于获取至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系;基于至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系,构建映射表。
根据本申请实施例的数据处理装置500可对应于执行本发明本申请实施例中描述的方法,并且数据处理装置500中的各个单元的上述和其它操作和/或功能分别为了实现图2至图4中的各个方法中SCM控制器所执行的相应流程,为了简洁,在此不再赘述。
请参阅图6,图6为本申请提供的芯片的一个结构示意图。
如图6所示,芯片600包括供电电路601和处理单元602。供电电路601为处理单元602供电,处理单元602用于实现前述图1a至图4所示的方法,具体此处不再赘述。
本申请还提供一种数据处理系统,如图7所示,图7为本申请还提供一种数据处理系统700的结构示意图。
如图7所示,数据处理系统700包括SCM控制器701、存储器702、通信接口703和总线704、存储级内存705和动态随机存取内存706。其中,SCM控制器701、存储器702、通信接口703、存储级内存705和动态随机存取内存706通过总线704进行通信,也可以通过无线传输等其他手段实现通信。该存储器702用于存储指令,该SCM控制器701用于执行该存储器702存储的指令。该存储器702存储程序代码,且SCM控制器701可以调用存储器702中存储的程序代码执行以下操作:
获取第一访存指令,第一访存指令携带目标虚拟地址和目标进程识别号,目标进程识别号指示第一访存指令对应的进程;根据目标虚拟地址和目标进程识别号,查询映射表,映射表包括至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的映射关系;若映射表中存在对应于目标虚拟地址和目标进程识别号的第一物理地址,且第一物理地址包含于存储级内存对应的物理地址范围,则将第一物理地址对应的目标内存页的数据预取至动态随机存取内存。此外,还能够实现图2至图4中的各个方法中SCM控制器所执行的相应流程,为了简洁,在此不再赘述。
应理解,在本申请实施例中,SCM控制器701可以是CPU,SCM控制器701还可以是其他数字信号处理器(digital signal processing,DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。
存储器702可以是磁盘或者硬盘,并向SCM控制器701提供指令和数据。存储器702还可以包括非易失性随机存取存储器。例如,存储器702还可以存储设备类型的信息。存储器702可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。
动态随机存取内存706有多种类型,例如同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data date SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)等,具体此处不做限定。
总线704除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线704。
总线704可以是快捷外围部件互连标准(Peripheral Component Interconnect Express,PCIe)总线,或扩展工业标准结构(extended industry standard architecture,EISA)总线、统一总线(unified bus,Ubus或UB)、计算机快速链接(compute express link,CXL)、缓存一致互联协议(cache coherent  interconnect for accelerators,CCIX)等。总线704可以分为地址总线、数据总线、控制总线等。
应理解,本申请实施例的SCM控制器701可对应于本申请实施例中的数据处理装置500,并可以对应于执行本申请实施例的方法中的相应主体,并且数据处理装置500中的各个模块的上述和其它操作和/或功能分别为了实现图1a至图4中的各个方法的相应流程,为了简洁,在此不再赘述。
上述实施例,可以全部或部分地通过软件、硬件、固件或其他任意组合来实现。当使用软件实现时,上述实施例可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载或执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质。半导体介质可以是固态硬盘(solid state drive,SSD)。
以上所述,仅为本发明本申请的具体实施方式。熟悉本技术领域的技术人员根据本发明本申请提供的具体实施方式,可想到变化或替换,都应涵盖在本发明本申请的保护范围之内。

Claims (12)

  1. 一种数据处理方法,其特征在于,所述方法应用于混合内存系统,所述混合内存系统包括存储级内存和动态随机存取内存,所述方法包括:
    获取第一访存指令,所述第一访存指令携带目标虚拟地址和目标进程识别号,所述目标进程识别号指示所述第一访存指令对应的进程;
    根据所述目标虚拟地址和所述目标进程识别号,查询映射表,所述映射表包括至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系;
    若所述映射表中存在对应于所述目标虚拟地址和所述目标进程识别号的第一物理地址,且所述第一物理地址包含于所述存储级内存对应的物理地址范围,则将所述第一物理地址对应的目标内存页的数据预取至所述动态随机存取内存。
  2. 根据权利要求1所述的方法,其特征在于,所述映射表包括页表,或者所述映射表包括页表和转译后备缓冲器表;
    若所述映射表包括所述页表和所述转译后备缓冲器表,则所述根据所述目标虚拟地址和所述目标进程识别号,查询映射表,包括:
    根据所述目标虚拟地址和所述目标进程识别号,查询所述转译后备缓冲器表;
    若所述转译后备缓冲器表中不包括所述第一物理地址,则根据所述目标虚拟地址和所述目标进程识别号,查询所述页表。
  3. 根据权利要求1或2所述的方法,其特征在于,所述将所述第一物理地址对应的目标内存页的数据预取至动态随机存取内存,包括:
    将所述目标内存页的数据预取至第二物理地址,所述第二物理地址包含于所述动态随机存取内存对应的物理地址范围;
    所述方法还包括:
    将所述映射表中所述目标虚拟地址、所述目标进程识别号与所述第一物理地址的对应关系,更新为所述目标虚拟地址、所述目标进程识别号与所述第二物理地址的对应关系。
  4. 根据权利要求3所述的方法,其特征在于,所述将所述映射表中所述目标虚拟地址、所述目标进程识别号与所述第一物理地址的对应关系,更新为所述目标虚拟地址、所述目标进程识别号与所述第二物理地址的对应关系,包括:
    若所述映射表包括所述页表和所述转译后备缓冲器表,则将所述页表中所述目标虚拟地址、所述目标进程识别号与所述第一物理地址的对应关系,更新为所述目标虚拟地址、所述目标进程识别号与所述第二物理地址的对应关系;
    所述方法还包括:
    将所述目标虚拟地址、所述目标进程识别号与所述第二物理地址的对应关系存储至所述转译后备缓冲器表。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,在所述查询映射表之前,所述方法还包括:
    获取至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系;
    基于所述至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系,构建所述映射表。
  6. 一种数据处理装置,其特征在于,包括:
    判定模块,用于获取第一访存指令,所述第一访存指令携带目标虚拟地址和目标进程识别号,所述目标进程识别号指示所述第一访存指令对应的进程;
    所述判定模块,还用于根据所述目标虚拟地址和所述目标进程识别号,查询映射表,所述映射表包括至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系;
    所述预取模块,用于若所述映射表中存在对应于所述目标虚拟地址和所述目标进程识别号的第一物理地址,且所述第一物理地址包含于所述存储级内存对应的物理地址范围,则将所述第一物理地址对应 的目标内存页的数据预取至所述动态随机存取内存。
  7. 根据权利要求6所述的装置,其特征在于,所述映射表包括页表,或者所述映射表包括页表和转译后备缓冲器表;
    若所述映射表包括所述页表和所述转译后备缓冲器表,则所述判定模块,具体用于:
    根据所述目标虚拟地址和所述目标进程识别号,查询所述转译后备缓冲器表;
    若所述转译后备缓冲器表中不包括所述第一物理地址,则根据所述目标虚拟地址和所述目标进程识别号,查询所述页表。
  8. 根据权利要求6或7所述的装置,其特征在于,所述预取模块,具体用于将所述目标内存页的数据预取至第二物理地址,所述第二物理地址包含于所述动态随机存取内存对应的物理地址范围;
    所述判定模块,还用于将所述映射表中所述目标虚拟地址、所述目标进程识别号与所述第一物理地址的对应关系,更新为所述目标虚拟地址、所述目标进程识别号与所述第二物理地址的对应关系。
  9. 根据权利要求8所述的装置,其特征在于,判定模块,具体用于若所述映射表包括所述页表和所述转译后备缓冲器表,则将所述页表中所述目标虚拟地址、所述目标进程识别号与所述第一物理地址的对应关系,更新为所述目标虚拟地址、所述目标进程识别号与所述第二物理地址的对应关系;
    所述判定模块,还用于将所述目标虚拟地址、所述目标进程识别号与所述第二物理地址的对应关系存储至所述转译后备缓冲器表。
  10. 根据权利要求6至9中任一项所述的装置,其特征在于,所述判定模块,还用于:
    获取至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系;
    基于所述至少一个虚拟地址、至少一个进程识别号与至少一个物理地址的对应关系,构建所述映射表。
  11. 一种芯片,其特征在于,包括:处理单元和供电电路;
    所述供电电路为所述处理单元供电;
    所述处理单元,用于执行前述权利要求1至5中任一项所述的方法。
  12. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有指令,当所述指令在处理器上运行时,实现权利要求1至5中任一项所述的方法。
PCT/CN2023/117603 2022-12-27 2023-09-08 数据处理方法、装置、芯片和计算机可读存储介质 Ceased WO2024139385A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP23909323.0A EP4632587A4 (en) 2022-12-27 2023-09-08 Data processing method and apparatus, and chip and computer-readable storage medium
US19/251,088 US20250335366A1 (en) 2022-12-27 2025-06-26 Data Processing Method and Apparatus, Chip, and Computer-Readable Storage Medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211687803.X 2022-12-27
CN202211687803.XA CN118260218A (zh) 2022-12-27 2022-12-27 数据处理方法、装置、芯片和计算机可读存介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US19/251,088 Continuation US20250335366A1 (en) 2022-12-27 2025-06-26 Data Processing Method and Apparatus, Chip, and Computer-Readable Storage Medium

Publications (1)

Publication Number Publication Date
WO2024139385A1 true WO2024139385A1 (zh) 2024-07-04

Family

ID=91604035

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/117603 Ceased WO2024139385A1 (zh) 2022-12-27 2023-09-08 数据处理方法、装置、芯片和计算机可读存储介质

Country Status (4)

Country Link
US (1) US20250335366A1 (zh)
EP (1) EP4632587A4 (zh)
CN (1) CN118260218A (zh)
WO (1) WO2024139385A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119883954A (zh) * 2025-03-26 2025-04-25 山东云海国创云计算装备产业创新中心有限公司 一种数据预取方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120017039A1 (en) * 2010-07-16 2012-01-19 Plx Technology, Inc. Caching using virtual memory
US20140149677A1 (en) * 2012-11-26 2014-05-29 Advanced Micro Devices, Inc. Prefetch Kernels on Data-Parallel Processors
CN107168654A (zh) * 2017-05-26 2017-09-15 华中科技大学 一种基于数据对象热度的异构内存分配方法及系统
CN108196790A (zh) * 2017-12-28 2018-06-22 深圳市得微电子有限责任公司 数据管理方法、存储设备及计算机可读存储介质
CN108804350A (zh) * 2017-04-27 2018-11-13 华为技术有限公司 一种内存访问方法及计算机系统
CN115495394A (zh) * 2022-09-09 2022-12-20 Oppo广东移动通信有限公司 数据预取方法和数据预取装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6538650B1 (en) * 2000-01-10 2003-03-25 Intel Corporation Efficient TLB entry management for the render operands residing in the tiled memory
US10120812B2 (en) * 2016-02-03 2018-11-06 Nutanix, Inc. Manipulation of virtual memory page table entries to form virtually-contiguous memory corresponding to non-contiguous real memory allocations

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120017039A1 (en) * 2010-07-16 2012-01-19 Plx Technology, Inc. Caching using virtual memory
US20140149677A1 (en) * 2012-11-26 2014-05-29 Advanced Micro Devices, Inc. Prefetch Kernels on Data-Parallel Processors
CN108804350A (zh) * 2017-04-27 2018-11-13 华为技术有限公司 一种内存访问方法及计算机系统
CN107168654A (zh) * 2017-05-26 2017-09-15 华中科技大学 一种基于数据对象热度的异构内存分配方法及系统
CN108196790A (zh) * 2017-12-28 2018-06-22 深圳市得微电子有限责任公司 数据管理方法、存储设备及计算机可读存储介质
CN115495394A (zh) * 2022-09-09 2022-12-20 Oppo广东移动通信有限公司 数据预取方法和数据预取装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4632587A1

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119883954A (zh) * 2025-03-26 2025-04-25 山东云海国创云计算装备产业创新中心有限公司 一种数据预取方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
EP4632587A1 (en) 2025-10-15
CN118260218A (zh) 2024-06-28
EP4632587A4 (en) 2026-03-04
US20250335366A1 (en) 2025-10-30

Similar Documents

Publication Publication Date Title
CN113342709B (zh) 在多处理器系统中访问数据的方法和多处理器系统
WO2023098032A1 (zh) 一种内存空间扩展方法、装置及电子设备和存储介质
US9785545B2 (en) Method and apparatus for providing dual memory access to non-volatile memory
US8185692B2 (en) Unified cache structure that facilitates accessing translation table entries
EP4439312A1 (en) Data storage method and system, storage access configuration method and related device
CN112631961A (zh) 一种内存管理单元、地址转译方法以及处理器
CN114063934B (zh) 数据更新装置、方法及电子设备
CN114218132B (zh) 信息预取方法、处理器、电子设备
CN116055429B (zh) 基于pcie的通信数据处理方法、装置、设备及存储介质
CN115481054A (zh) 数据处理方法、装置及系统、系统级soc芯片及计算机设备
WO2024066195A1 (zh) 缓存管理方法及装置、缓存装置、电子装置和介质
US7472253B1 (en) System and method for managing table lookaside buffer performance
CN115061955A (zh) 处理器、电子设备、地址翻译方法以及缓存页表项方法
CN117331853A (zh) 缓存处理方法、装置、电子设备及介质
WO2024061344A1 (zh) 数据迁移方法、装置、芯片以及计算机可读存储介质
CN116340203A (zh) 数据预读取方法、装置、处理器及预取器
CN119201004A (zh) 数据读写处理方法、装置、设备及介质
CN117873921B (zh) 一种基于远程直接内存访问的队列页表管理方法及装置
US20250335366A1 (en) Data Processing Method and Apparatus, Chip, and Computer-Readable Storage Medium
US11940917B2 (en) System and method for network interface controller based distributed cache
CN107577492A (zh) 加速文件系统读写的nvm块设备驱动方法及系统
CN117271107A (zh) 数据处理方法、装置、电子设备以及计算机可读存储介质
CN119271618B (zh) 一种rdma网卡请求队列的实现方法及系统
CN115357525A (zh) 探听过滤器、处理单元、计算设备和相关方法
US20100268921A1 (en) Data collection prefetch device and methods thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23909323

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023909323

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2023909323

Country of ref document: EP

Effective date: 20250708

NENP Non-entry into the national phase

Ref country code: DE

WWP Wipo information: published in national office

Ref document number: 2023909323

Country of ref document: EP