CN117033254A - Memory page access frequency determining method and computing device - Google Patents
Memory page access frequency determining method and computing device Download PDFInfo
- Publication number
- CN117033254A CN117033254A CN202310804111.7A CN202310804111A CN117033254A CN 117033254 A CN117033254 A CN 117033254A CN 202310804111 A CN202310804111 A CN 202310804111A CN 117033254 A CN117033254 A CN 117033254A
- Authority
- CN
- China
- Prior art keywords
- page
- memory
- address
- bucket
- ownership table
- 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.)
- Pending
Links
- 230000015654 memory Effects 0.000 title claims abstract description 545
- 238000000034 method Methods 0.000 title claims abstract description 99
- 238000013507 mapping Methods 0.000 claims abstract description 36
- 230000004044 response Effects 0.000 claims abstract description 19
- 230000009286 beneficial effect Effects 0.000 description 19
- 238000012545 processing Methods 0.000 description 19
- 238000010586 diagram Methods 0.000 description 17
- 230000008569 process Effects 0.000 description 12
- 238000005516 engineering process Methods 0.000 description 11
- 230000003993 interaction Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/10—Address translation
- G06F12/1009—Address translation using page tables, e.g. page table structures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域Technical field
本申请实施例涉及服务器技术领域,尤其涉及一种内存页面的访问次数确定方法及计算设备。Embodiments of the present application relate to the field of server technology, and in particular to a method for determining the number of accesses to a memory page and a computing device.
背景技术Background technique
基于不同存储介质具有不同的性能,用户期望将内存中的频繁访问的内存页面(热页)中的数据,放入到性能较好的存储介质中。为此,需要确定内存中的每个内存页面的访问次数。Based on the different performance of different storage media, users expect to put the data in frequently accessed memory pages (hot pages) in the memory into storage media with better performance. To do this, the number of accesses to each memory page in memory needs to be determined.
相关技术在确定内存页面的访问次数的过程中,将一个连续的设备物理地址(Device Physical Address,简称DPA)区域视为一个分桶,通过确定该分桶的访问次数,确定内存页面的访问次数。In the process of determining the number of accesses to a memory page, the related technology regards a continuous device physical address (DPA) area as a bucket, and determines the number of accesses to the memory page by determining the number of accesses to the bucket. .
但是,相关技术中,当同一任务的热数据(高频访问的数据)被分散到不同的分桶,且每个分桶内包括多个内存页面时,会导致这多个分桶所包括的每个内存页面的访问次数的统计,皆会受到热数据的影响,从而导致相关技术中的内存页面的访问次数的确定方法,存在准确率低的问题。However, in related technologies, when the hot data (highly accessed data) of the same task is dispersed into different buckets, and each bucket includes multiple memory pages, it will cause the multiple buckets to include The statistics of the number of accesses to each memory page will be affected by hot data, which leads to the problem of low accuracy in the method of determining the number of accesses to a memory page in related technologies.
发明内容Contents of the invention
本申请实施例提供一种内存页面的访问次数确定方法及计算设备。能够提高确定内存页面的访问次数的准确率。Embodiments of the present application provide a method and computing device for determining the number of access times of a memory page. Can improve the accuracy of determining the number of accesses to a memory page.
第一方面,本申请实施例提供一种内存页面的访问次数确定方法,方法包括:In the first aspect, embodiments of the present application provide a method for determining the number of accesses to a memory page. The method includes:
响应于接收到处理器发送的第一指令,获取页面归属表的存储地址;其中,第一指令包括内存页面的地址;第一指令用于指示访问内存页面的地址;页面归属表用于记录内存页面的地址和分桶标识的映射关系;In response to receiving the first instruction sent by the processor, obtain the storage address of the page ownership table; wherein the first instruction includes the address of the memory page; the first instruction is used to indicate access to the address of the memory page; the page ownership table is used to record the memory The mapping relationship between the page address and the bucket identifier;
基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识;Based on the storage address of the page ownership table and the address of the memory page, determine the bucket identifier corresponding to the address of the memory page;
将分桶标识对应的计数器的计数值按照预设步进值递增;其中,预设步进值为1。The count value of the counter corresponding to the bucket identification is incremented according to a preset step value; wherein, the preset step value is 1.
提供一种页面归属表,该页面归属表描述了内存页面的物理地址和分桶标识的映射关系。访存控制器可以在接收到第一指令时,从页面归属表中查找到与内存页面的地址对应的分桶标识,并将分桶标识对应的计数器的计数值按照预设步进值递增。通过上述由软件灵活定义分桶标识映射关系的方式,使得内存分桶和内存页面具有灵活的映射关系,可以实现冷热数据放置在不同分桶,可以实现非均匀划分分桶的大小,保证了内存页面访问次数确定的准确性。A page ownership table is provided, which describes the mapping relationship between the physical address of the memory page and the bucket identifier. When receiving the first instruction, the memory access controller can find the bucket identifier corresponding to the address of the memory page from the page ownership table, and increment the count value of the counter corresponding to the bucket identifier according to a preset step value. Through the above-mentioned method of flexibly defining the mapping relationship of bucket identifiers by software, memory buckets and memory pages have a flexible mapping relationship. Hot and cold data can be placed in different buckets, and the size of the buckets can be divided non-uniformly, ensuring Accuracy of memory page access count determination.
在一种实现方式中,页面归属表为多级页表;In one implementation, the page ownership table is a multi-level page table;
多级页表包括第一页面归属表、第二页面归属表和第三页面归属表;The multi-level page table includes the first page ownership table, the second page ownership table and the third page ownership table;
其中,第一页面归属表为首级页表;第二页面归属表为中间级页表;第三页面归属表为末级页表;第二页面归属表为一级或多级页表;Among them, the first page ownership table is the first-level page table; the second page ownership table is the intermediate-level page table; the third page ownership table is the last-level page table; the second page ownership table is one-level or multi-level page tables;
第一页面归属表和第二页面归属表的每个页表项用于存储下一级页面归属表的存储地址;第三页面归属表的每个页表项用于存储分桶标识。Each page table entry in the first page ownership table and the second page ownership table is used to store the storage address of the next-level page ownership table; each page table entry in the third page ownership table is used to store the bucket identification.
通过设置末级页面归属表的每个页表项包括分桶标识,首级页面归属表和中间级页面归属表的每个页表项包括下一级页面归属表的存储地址的方式,可以将页面归属表进行离散存储,避免了需要连续的内存空间存放页面归属表的全部内容,提高了内存的空间使用率。By setting each page table entry in the last-level page ownership table to include a bucket identifier, and each page table entry in the first-level page ownership table and intermediate-level page ownership table to include the storage address of the next-level page ownership table, you can The page ownership table is stored discretely, which avoids the need for continuous memory space to store all the contents of the page ownership table and improves memory space usage.
在一种实现方式中,页面归属表的存储地址为第一页面归属表的存储地址;In one implementation, the storage address of the page ownership table is the storage address of the first page ownership table;
基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识,包括:Based on the storage address of the page ownership table and the address of the memory page, determine the bucket identifier corresponding to the address of the memory page, including:
基于页面归属表的存储地址和内存页面的地址中的前K位,在第一页面归属表中确定第二页面归属表的存储地址;Based on the storage address of the page ownership table and the first K bits of the address of the memory page, determine the storage address of the second page ownership table in the first page ownership table;
基于第二页面归属表的存储地址和内存页面地址中的中间M位,在第二页面归属表中确定第三页面归属表的存储地址;Based on the storage address of the second page ownership table and the middle M bits in the memory page address, determine the storage address of the third page ownership table in the second page ownership table;
基于第三页面归属表的存储地址和内存页面地址中的后N位,在第三页面归属表中确定内存页面的地址对应的分桶标识。Based on the storage address of the third page ownership table and the last N bits of the memory page address, the bucket identifier corresponding to the address of the memory page is determined in the third page ownership table.
可以基于页面归属表的存储地址和内存页面的地址,逐级查找内存页面的地址对应的分桶标识。Based on the storage address of the page ownership table and the address of the memory page, the bucket identifier corresponding to the address of the memory page can be searched step by step.
在一种实现方式中,页面归属表存储在内存中。In one implementation, the page ownership table is stored in memory.
通过将占用空间较大的页面归属表存储于内存,降低访存控制器的存储压力。By storing the page ownership table that takes up a large amount of space in the memory, the storage pressure on the memory access controller is reduced.
在一种实现方式中,在确定内存页面的地址对应的分桶标识之后,方法还包括:In one implementation, after determining the bucket identifier corresponding to the address of the memory page, the method further includes:
将内存页面的地址对应的分桶标识,存储至第一存储器中。Store the bucket identifier corresponding to the address of the memory page in the first memory.
在确定出内存页面的存储地址对应的分桶标识后,将内存页面的存储地址以及其对应的分桶标识,存储至访存控制器的第一存储器中,以便后续可以直接确定内存页面的地址对应的分桶标识,提高了获取分桶标识的速度。After determining the bucket identifier corresponding to the storage address of the memory page, the storage address of the memory page and its corresponding bucket identifier are stored in the first memory of the memory access controller, so that the address of the memory page can be directly determined subsequently. The corresponding bucket identification improves the speed of obtaining the bucket identification.
在一种实现方式中,在获取页面归属表的存储地址之前,方法还包括:In one implementation, before obtaining the storage address of the page ownership table, the method further includes:
确定第一存储器是否存储内存页面的地址对应的分桶标识;Determine whether the first memory stores the bucket identifier corresponding to the address of the memory page;
在第一存储器存储内存页面的地址对应的分桶标识的情况下,将分桶标识对应的计数器的计数值按照预设步进值递增,其中,预设步进值为1。When the first memory stores the bucket identifier corresponding to the address of the memory page, the count value of the counter corresponding to the bucket identifier is incremented according to a preset step value, where the preset step value is 1.
可以在接收到第一指令时,识别访存控制器的第一存储器是否存储内存页面的地址对应的分桶标识,以确定是否可以快速获取分桶标识。在识别到第一存储器存储内存页面的地址对应的分桶标识的基础上,可以直接获取分桶标识,提高了分桶标识的获取速度,进而提高了基于第一指令,对内存页面的访问次数进行加1的速度。When receiving the first instruction, it can be identified whether the first memory of the memory access controller stores the bucket identifier corresponding to the address of the memory page, so as to determine whether the bucket identifier can be quickly obtained. On the basis of identifying the bucket identifier corresponding to the address of the memory page stored in the first memory, the bucket identifier can be obtained directly, which improves the acquisition speed of the bucket identifier, thereby increasing the number of accesses to the memory page based on the first instruction. The speed is increased by 1.
在一种实现方式中,方法还包括:In one implementation, the method also includes:
在第一存储器未存储内存页面的地址对应的分桶标识的情况下,获取页面归属表的存储地址。When the first memory does not store the bucket identification corresponding to the address of the memory page, obtain the storage address of the page ownership table.
在识别到访存控制器的第一存储器未存储内存页面的地址对应的分桶标识的情况下,可以查找页面归属表以确定内存页面对应的分桶标识。When it is recognized that the first memory of the memory access controller does not store the bucket identifier corresponding to the address of the memory page, the page ownership table can be searched to determine the bucket identifier corresponding to the memory page.
在将分桶标识对应的计数器的计数值按照预设步进值递增之后,方法还包括:After incrementing the count value of the counter corresponding to the bucket identifier according to the preset step value, the method also includes:
将分桶标识对应的计数器的计数值存储至第二存储器中。The count value of the counter corresponding to the bucket identification is stored in the second memory.
可以通过将分桶标识对应的计数器的计数值存储至第二存储器的方式,对分桶标识对应的计数器的计数值(分桶标识对应的内存页面的访问次数)进行安全存储处理。The count value of the counter corresponding to the bucket identifier (the number of accesses to the memory page corresponding to the bucket identifier) can be safely stored by storing the count value of the counter corresponding to the bucket identifier in the second memory.
在一种实现方式中,方法还包括:In one implementation, the method also includes:
响应于接收到处理器发送的第二指令,向处理器发送分桶标识对应的计数器的计数值;In response to receiving the second instruction sent by the processor, send the count value of the counter corresponding to the bucket identification to the processor;
其中,第二指令用于指示获取内存页面的访问次数。The second instruction is used to indicate the number of accesses to obtain the memory page.
可以响应于接收到处理器发送的第二指令,向处理器发送分桶标识对应的计数器的计数值,以供处理器基于分桶标识对应的计数器的计数值,统计冷热页。In response to receiving the second instruction sent by the processor, the count value of the counter corresponding to the bucket identifier is sent to the processor, so that the processor counts hot and cold pages based on the count value of the counter corresponding to the bucket identifier.
第二方面,本申请实施例提供一种访存控制器,包括:In a second aspect, embodiments of the present application provide a memory access controller, including:
收发模块,用于响应于接收到处理器发送的第一指令,获取页面归属表的存储地址;其中,第一指令包括内存页面的地址;第一指令用于指示访问内存页面的地址;页面归属表用于记录内存页面的地址和分桶标识的映射关系;A transceiver module, configured to obtain the storage address of the page ownership table in response to receiving the first instruction sent by the processor; wherein the first instruction includes the address of the memory page; the first instruction is used to indicate access to the address of the memory page; the page ownership The table is used to record the mapping relationship between the address of the memory page and the bucket identifier;
处理模块,用于基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识;The processing module is used to determine the bucket identification corresponding to the address of the memory page based on the storage address of the page ownership table and the address of the memory page;
处理模块,还用于将分桶标识对应的计数器的计数值按照预设步进值递增;其中,预设步进值为1。The processing module is also used to increment the count value of the counter corresponding to the bucket identification according to a preset step value; wherein the preset step value is 1.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,页面归属表为多级页表;In one implementation, the page ownership table is a multi-level page table;
多级页表包括第一页面归属表、第二页面归属表和第三页面归属表;The multi-level page table includes the first page ownership table, the second page ownership table and the third page ownership table;
其中,第一页面归属表为首级页表;第二页面归属表为中间级页表;第三页面归属表为末级页表;第二页面归属表为一级或多级页表;Among them, the first page ownership table is the first-level page table; the second page ownership table is the intermediate-level page table; the third page ownership table is the last-level page table; the second page ownership table is one-level or multi-level page tables;
第一页面归属表和第二页面归属表的每个页表项用于存储下一级页面归属表的存储地址;第三页面归属表的每个页表项用于存储分桶标识。Each page table entry in the first page ownership table and the second page ownership table is used to store the storage address of the next-level page ownership table; each page table entry in the third page ownership table is used to store the bucket identification.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,页面归属表的存储地址为第一页面归属表的存储地址;处理模块,具体用于:In one implementation, the storage address of the page ownership table is the storage address of the first page ownership table; the processing module is specifically used for:
基于页面归属表的存储地址和内存页面的地址中的前K位,在第一页面归属表中确定第二页面归属表的存储地址;Based on the storage address of the page ownership table and the first K bits of the address of the memory page, determine the storage address of the second page ownership table in the first page ownership table;
基于第二页面归属表的存储地址和内存地址中的中间M位,在第二页面归属表中确定第三页面归属表的存储地址;Based on the storage address of the second page ownership table and the middle M bits in the memory address, determine the storage address of the third page ownership table in the second page ownership table;
基于第三页面归属表的存储地址和内存地址中的后N位,在第三页面归属表中确定内存页面的地址对应的分桶标识。Based on the storage address of the third page ownership table and the last N bits of the memory address, the bucket identifier corresponding to the address of the memory page is determined in the third page ownership table.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,页面归属表存储在内存中。In one implementation, the page ownership table is stored in memory.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,在确定内存页面的地址对应的分桶标识之后,处理模块,还用于:In one implementation, after determining the bucket identifier corresponding to the address of the memory page, the processing module is also used to:
将内存页面的地址对应的分桶标识,存储至第一存储器中。Store the bucket identifier corresponding to the address of the memory page in the first memory.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,In one implementation,
在获取页面归属表的存储地址之前,处理模块,还用于:Before obtaining the storage address of the page ownership table, the processing module is also used to:
确定第一存储器是否存储内存页面的地址对应的分桶标识;Determine whether the first memory stores the bucket identifier corresponding to the address of the memory page;
在第一存储器存储内存页面的地址对应的分桶标识的情况下,将分桶标识对应的计数器的计数值按照预设步进值递增,其中,预设步进值为1。When the first memory stores the bucket identifier corresponding to the address of the memory page, the count value of the counter corresponding to the bucket identifier is incremented according to a preset step value, where the preset step value is 1.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,处理模块,还用于:In one implementation, the processing module is also used to:
在第一存储器未存储内存页面的地址对应的分桶标识的情况下,获取页面归属表的存储地址。When the first memory does not store the bucket identification corresponding to the address of the memory page, obtain the storage address of the page ownership table.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,在将分桶标识对应的计数器的计数值按照预设步进值递增之后,处理模块,还用于:In one implementation, after incrementing the count value of the counter corresponding to the bucket identifier according to a preset step value, the processing module is also used to:
将分桶标识对应的计数器的计数值存储至第二存储器中。The count value of the counter corresponding to the bucket identification is stored in the second memory.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,收发模块,还用于:In one implementation, the transceiver module is also used to:
响应于接收到处理器发送的第二指令,向处理器发送分桶标识对应的计数器的计数值;In response to receiving the second instruction sent by the processor, send the count value of the counter corresponding to the bucket identification to the processor;
其中,第二指令用于指示获取内存页面的访问次数。The second instruction is used to indicate the number of accesses to obtain the memory page.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
第三方面,本申请实施例还提供一种计算设备,计算设备包括:内存、访存控制器和处理器;其中,内存和访存控制器电连接;访存控制器和处理器电连接;In a third aspect, embodiments of the present application also provide a computing device. The computing device includes: a memory, a memory access controller and a processor; wherein the memory and the memory access controller are electrically connected; the memory access controller and the processor are electrically connected;
访存控制器用于执行第一方面的内存页面的访问次数确定方法。The memory access controller is configured to perform the method for determining the number of access times of the memory page in the first aspect.
本实施例提供的计算设备中的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller in the computing device provided by this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the technical solutions in the embodiments of the present application or related technologies, a brief introduction will be made below to the drawings that need to be used in the description of the embodiments or related technologies. Obviously, the drawings in the following description are of the present invention. For some embodiments of the application, those of ordinary skill in the art can also obtain other drawings based on these drawings without exerting any creative effort.
图1a为相关技术适用的一种内存页面的访问次数确定方法的场景示意图;Figure 1a is a schematic diagram of a scenario of a method for determining the number of access times of a memory page applicable to related technologies;
图1b为相关技术适用的另一种内存页面的访问次数确定方法的场景示意图;Figure 1b is a schematic diagram of a scenario of another method for determining the number of access times of a memory page applicable to related technologies;
图2为本申请实施例提供的一种计算设备的系统架构图;Figure 2 is a system architecture diagram of a computing device provided by an embodiment of the present application;
图3为本申请实施例提供的一种内存页面的访问次数确定方法实施例一的流程示意图;Figure 3 is a schematic flow chart of Embodiment 1 of a method for determining the number of accesses to a memory page provided by an embodiment of the present application;
图4a为本申请实施例提供的一种页面归属表中各级页表中的页表项的结构示意图;Figure 4a is a schematic structural diagram of page table entries in page tables at all levels in a page ownership table provided by an embodiment of the present application;
图4b为本申请实施例提供的一种查找分桶标识的原理示意图;Figure 4b is a schematic diagram of the principle of searching for bucket identification provided by an embodiment of the present application;
图4c为本申请实施例提供的另一种页面归属表中各级页表中的页表项的结构示意图;Figure 4c is a schematic structural diagram of page table entries in page tables at all levels in another page ownership table provided by an embodiment of the present application;
图5为本申请实施例提供的一种内存页面的访问次数确定方法实施例三的流程示意图;Figure 5 is a schematic flowchart of Embodiment 3 of a method for determining the number of accesses to a memory page provided by an embodiment of the present application;
图6为本申请实施例提供的一种内存页面的访问次数确定方法实施例四的流程示意图;Figure 6 is a schematic flowchart of Embodiment 4 of a method for determining the number of accesses to a memory page provided by an embodiment of the present application;
图7为本申请实施例适用的一种构建页面归属表的场景示意图;Figure 7 is a schematic diagram of a scenario for building a page attribution table applicable to the embodiment of the present application;
图8为本申请实施例提供的一种访存控制器的结构示意图。Figure 8 is a schematic structural diagram of a memory access controller provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在根据本实施例的启示下作出的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments These are part of the embodiments of this application, but not all of them. Based on the embodiments in this application, all other embodiments made by those of ordinary skill in the art based on the inspiration of this embodiment fall within the scope of protection of this application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if present) in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used for Describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus that encompasses a series of steps or units and need not be limited to those explicitly listed. Those steps or elements may instead include other steps or elements not expressly listed or inherent to the process, method, product or apparatus.
图1a为相关技术适用的一种内存页面的访问次数确定方法的场景示意图。图1a示出了三个分桶(分别为分桶1、分桶2以及分桶3)和三个计数器(分桶1计数器、分桶2计数器以及分桶3计数器)。每个分桶(连续的物理地址区域)包括四个内存页面。A、B、C、D代表四个不同的任务。Figure 1a is a schematic diagram of a scenario of a method for determining the number of accesses to a memory page that is applicable to related technologies. Figure la shows three buckets (Bucket 1, Bucket 2 and Bucket 3 respectively) and three counters (Bucket 1 counter, Bucket 2 counter and Bucket 3 counter). Each bucket (contiguous area of physical addresses) consists of four memory pages. A, B, C, and D represent four different tasks.
其中,分桶1的四个内存页面分别存放了A任务的数据、B任务的数据、C任务的数据以及D任务的数据。分桶2的四个内存页面分别存放了A任务的数据、B任务的数据、C任务的数据以及D任务的数据;分桶3的四个内存页面分别存放了A任务的数据、B任务的数据、C任务的数据以及D任务的数据。Among them, the four memory pages of bucket 1 store the data of task A, data of task B, data of task C and data of task D respectively. The four memory pages of bucket 2 store the data of task A, the data of task B, the data of task C and the data of task D respectively; the four memory pages of bucket 3 store the data of task A and task B respectively. data, data of task C and data of task D.
在A任务的数据为热数据,B任务的数据、C任务的数据以及D任务的数据均为冷数据的情况下,由于分桶1、分桶2以及分桶3皆包括A任务的数据,因此,分桶1、分桶2以及分桶3皆会被识别包括了热数据。也就是说,这多个分桶所包括的每个内存页面的访问次数的确定,皆会受到热数据的影响,从而导致相关技术中的内存页面的访问次数确定方法存在准确率低的问题,同时,影响冷热数据的确定的准确性。When the data of task A is hot data, and the data of task B, task C and data of task D are all cold data, since bucket 1, bucket 2 and bucket 3 all include the data of task A, Therefore, bucket 1, bucket 2, and bucket 3 will all be identified as containing hot data. That is to say, the determination of the number of access times for each memory page included in these multiple buckets will be affected by hot data, which leads to the problem of low accuracy in the method of determining the number of access times for memory pages in related technologies. At the same time, it affects the accuracy of determining hot and cold data.
图1b为相关技术适用的另一种内存页面的访问次数确定方法的场景示意图。图1b示出了三个分桶(分别为分桶4、分桶5以及分桶6)和三个计数器(分桶4计数器、分桶5计数器以及分桶6计数器)。每个分桶(连续的物理地址区域)可以均匀划分为四个内存页面。E、F、G、H代表四个不同的任务。Figure 1b is a schematic diagram of a scenario of another method for determining the number of access times of a memory page applicable to the related technology. Figure 1b shows three buckets (Bucket 4, Bucket 5 and Bucket 6 respectively) and three counters (Bucket 4 counter, Bucket 5 counter and Bucket 6 counter). Each bucket (contiguous physical address area) can be evenly divided into four memory pages. E, F, G, and H represent four different tasks.
其中,分桶4的四个内存页面中,三个内存页面存放了E任务的数据、一个内存页面存放了H任务的数据。分桶5的四个内存页面中,两个内存页面存放了F任务的数据、一个内存页面存放了G任务的数据,一个内存页面中存放了H任务的数据。分桶6的四个内存页面中,四个内存页面存放了H任务的数据。Among them, among the four memory pages in bucket 4, three memory pages store the data of the E task, and one memory page stores the data of the H task. Among the four memory pages in bucket 5, two memory pages store the data of the F task, one memory page stores the data of the G task, and one memory page stores the data of the H task. Among the four memory pages in bucket 6, four memory pages store the data of the H task.
在H任务的数据为热数据,E任务的数据、F任务的数据以及G任务的数据为冷数据的情况下,由于分桶4、分桶5和分桶6皆包括H任务的数据,分桶4、分桶5以及分桶6皆会被识别包括了热数据。也就是说,也就是说,这多个分桶所包括的每个内存页面的访问次数的确定,皆会受到热数据的影响。When the data of task H is hot data, and the data of task E, task F and data of task G are cold data, since bucket 4, bucket 5 and bucket 6 all include the data of H task, the data of bucket 4, bucket 5 and bucket 6 all include the data of task H. Bucket 4, bucket 5 and bucket 6 will all be identified as containing hot data. In other words, the determination of the number of accesses for each memory page included in these multiple buckets will be affected by hot data.
总之,相关技术中是将一个连续的设备物理地址区域视为一个分桶,且每个分桶对应的连续的设备物理地址区域的所占内存空间大小相同,该种均匀划分分桶,且将一个连续设备物理地址视为一种分桶的方式,存在确定内存页面访问次数的准确率低的问题。In short, in the related art, a continuous device physical address area is regarded as a bucket, and the memory space occupied by the continuous device physical address area corresponding to each bucket is the same size. This method divides the buckets evenly, and divides the buckets evenly. A continuous device physical address is regarded as a bucketing method, which has the problem of low accuracy in determining the number of memory page accesses.
另外,需要说明的是,硬件(如访存控制器)缺乏足够的启发信息(分桶逻辑方法)以进行非均匀分桶,只能是硬件基于软件传递的信息,进行非均匀分桶。需要说明的是,软件也可以通过和硬件的多次交互告知硬件如何进行非均匀分桶。例如,软件可以告知硬件,针对第一设备物理地址区域(如地址段A),按照4KB大小划分分桶。针对第二设备物理地址区域(如地址段B),按照8KB大小划分分桶。但是,当设备物理地址区域(地址段)较为零碎时,需要软件和硬件之间的多次交互,才可以完成分桶过程,分桶过程比较繁琐。In addition, it should be noted that the hardware (such as the memory access controller) lacks sufficient heuristic information (bucketing logic method) to perform non-uniform bucketing. The hardware can only perform non-uniform bucketing based on the information transferred by the software. It should be noted that the software can also tell the hardware how to perform non-uniform bucketing through multiple interactions with the hardware. For example, the software can inform the hardware to divide the first device physical address area (such as address segment A) into buckets according to the size of 4KB. For the physical address area of the second device (such as address segment B), buckets are divided into buckets according to the size of 8KB. However, when the physical address area (address segment) of the device is fragmented, multiple interactions between software and hardware are required to complete the bucketing process, which is cumbersome.
基于上述技术问题,本申请实施例提供一种内存页面的访问次数确定方法,该方法中,提供一种记录了内存页面的地址和分桶标识的映射关系的页面归属表。访存控制器可以在接收到包括内存页面的地址的第一指令时,基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识,并将分桶标识对应的计数器的计数值按照预设步进值递增。通过上述由软件灵活定义分桶编号映射关系的方式,使得分桶和内存页面具有灵活的映射关系,可以实现冷热数据放置在不同分桶,可以实现非均匀划分分桶的大小,保证了内存页面访问次数确定的准确性。Based on the above technical problems, embodiments of the present application provide a method for determining the number of accesses to a memory page. In this method, a page ownership table is provided that records the mapping relationship between the address of the memory page and the bucket identifier. When receiving the first instruction including the address of the memory page, the memory access controller can determine the bucket identifier corresponding to the address of the memory page based on the storage address of the page ownership table and the address of the memory page, and assign the bucket identifier corresponding to the bucket identifier The count value of the counter increases according to the preset step value. Through the above-mentioned method of flexibly defining the bucket number mapping relationship by software, the buckets and memory pages have a flexible mapping relationship. Hot and cold data can be placed in different buckets, and the size of the buckets can be divided non-uniformly, ensuring the memory Accuracy of determining the number of page visits.
下面对本申请实施例的内存页面的访问次数确定方案进行详细的说明。The following is a detailed description of the method for determining the number of access times of a memory page in the embodiment of the present application.
图2为本申请实施例提供的一种计算设备的系统架构图。Figure 2 is a system architecture diagram of a computing device provided by an embodiment of the present application.
如图2所示,该计算设备400包括:访存控制器200以及分别与访存控制器200电连接的处理器100和内存300。As shown in FIG. 2 , the computing device 400 includes: a memory access controller 200 and a processor 100 and a memory 300 that are electrically connected to the memory access controller 200 respectively.
其中,访存控制器200用于控制内存300,以及负责内存300和处理器100之间的数据交换。Among them, the memory access controller 200 is used to control the memory 300 and is responsible for data exchange between the memory 300 and the processor 100 .
处理器100:可以为中央处理器(central processing unit,简称CPU),也可以为带外控制器,还可以为其他具体处理能力的器件。Processor 100: It can be a central processing unit (CPU for short), an out-of-band controller, or other devices with specific processing capabilities.
访存控制器200:访存控制器200可以为内存控制器,也可以为计算快速链路(computer express link,简称CXL)访存控制器,还可以为其他类型的可以控制内存以及负责内存与处理器进行数据交换的控制器。Memory access controller 200: The memory access controller 200 can be a memory controller, a computer express link (CXL) memory access controller, or other types of memory controllers that can control memory and be responsible for memory and Processor controller for data exchange.
内存300:也称内存储器。内存300是计算设备400的重要部件,用于暂时存放处理器中的运算数据以及处理器与外部存储器交换的数据,是外部存储器(或称为辅助存储器)与处理器进行沟通的桥梁。内存300可以为CXL内存,也可以为动态随机存取存储器(dynamic random acccess memory,简称DRAM)。Memory 300: also called internal memory. The memory 300 is an important component of the computing device 400. It is used to temporarily store operation data in the processor and data exchanged between the processor and external memory. It is a bridge for communication between the external memory (or auxiliary memory) and the processor. The memory 300 can be a CXL memory or a dynamic random access memory (dynamic random access memory, DRAM for short).
需要说明的是,处理器100上可以运行一个或多个软件,示例性地,处理器100上可以运行管理软件101、应用软件103以及应用软件104。处理器100还可以包括第三存储器102,用于存储页面归属表。其中,页面归属表描述了内存页面的地址与分桶标识的映射关系。It should be noted that one or more software can be run on the processor 100. For example, the management software 101, application software 103 and application software 104 can be run on the processor 100. The processor 100 may also include a third memory 102 for storing the page ownership table. Among them, the page ownership table describes the mapping relationship between the address of the memory page and the bucket identifier.
访存控制器200可以包括访存接口201、设置接口202以及查询接口203。上述三个接口可以是一个接口的复用,也可以是多个独立的接口。The memory access controller 200 may include a memory access interface 201, a setting interface 202, and a query interface 203. The above three interfaces can be a multiplexed interface, or they can be multiple independent interfaces.
访存控制器200还可以包括第一存储器205。The memory access controller 200 may also include a first memory 205 .
在一种可实现的方式中,第一存储器205可以用于存储内存页面的地址及其对应的分桶标识的映射关系表。In an implementable manner, the first memory 205 may be used to store a mapping relationship table between addresses of memory pages and their corresponding bucket identifiers.
在一种可实现的方式中,第一存储器205还可以用于存储页面归属表的存储地址。In an implementable manner, the first memory 205 can also be used to store the storage address of the page ownership table.
在一种可实现的方式中,第一存储器205可以为两个,其中,一个第一存储器205存储内存页面的地址及其对应的分桶标识的映射关系表;示例性的,用于存储内存页面的地址及其对应的分桶标识的映射关系表的存储器可以为闪存等存储器;另一个第一存储器205用于存储页面归属表的存储地址;示例性的,用于存储页面归属表的存储地址的存储器可以为寄存器。In an implementable manner, there may be two first memories 205, wherein one first memory 205 stores the mapping relationship table of the address of the memory page and its corresponding bucket identification; for example, it is used to store the memory page. The memory of the mapping relationship table of the address of the page and its corresponding bucket identification can be a memory such as a flash memory; the other first memory 205 is used to store the storage address of the page ownership table; for example, it is used to store the page ownership table. The address memory can be a register.
访存控制器200可以包括第二存储器206,第二存储器206中可以存储分桶标识对应的计数器的计数值。需要说明的是,第一存储器205和第二存储器206可以为同一存储器,可以为不同存储器。The memory access controller 200 may include a second memory 206, and the second memory 206 may store the count value of the counter corresponding to the bucket identification. It should be noted that the first memory 205 and the second memory 206 may be the same memory or different memories.
访存控制器200上可以运行映射关系查找逻辑204(程序)。The mapping relationship search logic 204 (program) can be run on the memory access controller 200.
访存控制器200还可以运行计数器207(程序)(每个分桶标识可以对应一个计数器)。计时器的计数值可以按照预设步进值递增。The memory access controller 200 can also run a counter 207 (program) (each bucket identifier can correspond to a counter). The timer's count value can be incremented according to a preset step value.
访存控制器200可以获取处理器100发送的页面归属表和页面归属表的存储地址。访存控制器200可以将页面归属表的存储地址存储至第一存储器205中,并将页面归属表存储至内存300中。具体地,处理器100上的管理软件101可以通过设置接口202向访存控制器200发送页面归属表的存储地址和页面归属表。访存控制器200可以将页面归属表的存储地址,存储至第一存储器205中。访存控制器200可以将页面归属表存储至内存300中。The memory access controller 200 may obtain the page ownership table and the storage address of the page ownership table sent by the processor 100 . The memory access controller 200 may store the storage address of the page ownership table in the first memory 205 and store the page ownership table in the memory 300 . Specifically, the management software 101 on the processor 100 can send the storage address of the page ownership table and the page ownership table to the memory access controller 200 through the setting interface 202 . The memory access controller 200 may store the storage address of the page ownership table in the first memory 205 . The memory access controller 200 may store the page ownership table into the memory 300 .
访存控制器200可以响应于主机100发送的第一指令,从内存100中存储的页面归属表中,查找与第一指令中的内存页面的地址对应的分桶标识,并将分桶标识对应的计数器的计数值按照预设步进值递增。具体地,当处理器100的应用软件103或应用软件104通过访存控制器200的访存接口201访问内存300时,会触发映射关系查找逻辑204查找第一存储器205中记录的页面归属表的存储地址,进而基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识,并将分桶标识对应的计数器的计数值按照预设步进值递增。The memory access controller 200 may respond to the first instruction sent by the host 100, search for the bucket identifier corresponding to the address of the memory page in the first instruction from the page ownership table stored in the memory 100, and match the bucket identifier to The count value of the counter increases according to the preset step value. Specifically, when the application software 103 or the application software 104 of the processor 100 accesses the memory 300 through the memory access interface 201 of the memory access controller 200, the mapping relationship search logic 204 is triggered to search for the page ownership table recorded in the first memory 205. Storage address, and then based on the storage address of the page ownership table and the address of the memory page, determine the bucket ID corresponding to the address of the memory page, and increment the count value of the counter corresponding to the bucket ID according to the preset step value.
访存控制器200可以响应于处理器100发送的第二指令,将每个分桶标识对应的计数器的计数值发送至处理器100,以供处理器100根据每个分桶标识对应的计数器的计数值统计冷热页。具体地,处理器100上的管理软件101可以通过访存控制器200的查询接口203,获取第二存储器206中存储的分桶标识对应的计数器的计数值。The memory access controller 200 may respond to the second instruction sent by the processor 100 and send the count value of the counter corresponding to each bucket identification to the processor 100, so that the processor 100 can use the counter value corresponding to each bucket identification according to the count value of the counter. The count value counts hot and cold pages. Specifically, the management software 101 on the processor 100 can obtain the count value of the counter corresponding to the bucket identification stored in the second memory 206 through the query interface 203 of the memory access controller 200 .
需要说明的是,图2示出的处理器100、访存控制器200以及内存300,归属于同一计算设备。处理器100、访存控制器200以及内存300,也可以归属于不同计算设备。It should be noted that the processor 100, the memory access controller 200 and the memory 300 shown in Figure 2 belong to the same computing device. The processor 100, the memory access controller 200 and the memory 300 may also belong to different computing devices.
在一种可实现方式中,当处理器100、访存控制器200以及内存300归属于同一计算设备时,访存控制器200和内存300可以集成在同一内存设备中,例如二者集成在同一个板卡上。In an implementation manner, when the processor 100, the memory access controller 200 and the memory 300 belong to the same computing device, the memory access controller 200 and the memory 300 can be integrated into the same memory device, for example, they are integrated into the same computer. on a board.
在一种可实现方式中,当处理器100、访存控制器200以及内存300归属于同一计算设备时,处理器100和访存控制器200可以集成在一起;例如,访存控制器200可以为内存控制器,内存控制器200可以集成到处理器100中。In an implementation manner, when the processor 100, the memory access controller 200 and the memory 300 belong to the same computing device, the processor 100 and the memory access controller 200 can be integrated together; for example, the memory access controller 200 can As a memory controller, memory controller 200 may be integrated into processor 100 .
在一种可实现方式中,当处理器100、访存控制器200以及内存300归属于不同计算设备时,处理器100可以归属于第一计算设备,访存控制器200和内存300可以归属于第二计算设备(示例性地,第二计算设备可以为CXL设备),访存控制器200和内存300可以集成在同一内存设备。第一计算设备和第二计算设备可以通过线缆进行连接。In an implementable manner, when the processor 100, the memory access controller 200 and the memory 300 belong to different computing devices, the processor 100 can belong to the first computing device, and the memory access controller 200 and the memory 300 can belong to the first computing device. In the second computing device (for example, the second computing device may be a CXL device), the memory access controller 200 and the memory 300 may be integrated in the same memory device. The first computing device and the second computing device may be connected by a cable.
还需要说明的是,计算设备400可以为服务器,也可以为终端设备(如计算机等)。It should also be noted that the computing device 400 may be a server or a terminal device (such as a computer, etc.).
还需要说明的是,图2仅是本申请实施例提供的一种计算设备的系统架构图,本申请实施例不对图2中包括的各种设备的实际形态进行限定,也不对图2中设备之间的交互方式进行限定,在方案的应用中,可以根据实际需求设定。It should also be noted that FIG. 2 is only a system architecture diagram of a computing device provided by an embodiment of the present application. The embodiment of the present application does not limit the actual form of various devices included in FIG. 2, nor does it The interaction mode between them is limited, and in the application of the solution, it can be set according to actual needs.
下面,通过具体实施例对本申请的技术方案进行详细说明。需要说明的是,下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。Below, the technical solution of the present application will be described in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
图3为本申请实施例提供的一种内存页面的访问次数确定方法实施例一的流程示意图。FIG. 3 is a schematic flowchart of Embodiment 1 of a method for determining the number of accesses to a memory page provided by an embodiment of the present application.
参见图3,该方法具体包括以下步骤:Referring to Figure 3, the method specifically includes the following steps:
S301:响应于接收到处理器发送的第一指令,获取页面归属表的存储地址。S301: In response to receiving the first instruction sent by the processor, obtain the storage address of the page ownership table.
在本实施例中,访存控制器可以响应于接收到处理器发送的第一指令,获取页面归属表的存储地址。In this embodiment, the memory access controller may obtain the storage address of the page ownership table in response to receiving the first instruction sent by the processor.
其中,页面归属表用于记录内存页面的地址和分桶编号的映射关系。Among them, the page ownership table is used to record the mapping relationship between the address of the memory page and the bucket number.
第一指令包括内存的地址,第一指令用于指示访问内存页面的地址。需要说明的是,由于内存的地址包括内存页面的地址,因此,第一指令包括内存页面的地址。The first instruction includes the address of the memory, and the first instruction is used to indicate the address of accessing the memory page. It should be noted that since the address of the memory includes the address of the memory page, the first instruction includes the address of the memory page.
另外,访存控制器在接收到存储器发送的第一指令时,还可以基于第一指令中的内存页面的地址,从内存中读取内存页面中的数据,并将内存页面中的数据反馈至处理器。In addition, when receiving the first instruction sent by the memory, the memory access controller can also read the data in the memory page from the memory based on the address of the memory page in the first instruction, and feed back the data in the memory page to processor.
需要说明的是,访问控制器可以预先获取处理器发送的页面归属表,并将页面归属表存储至内存中。访存控制器还可以预先获取处理器发送的页面归属表的存储地址,并将页面归属表的存储地址存储至访存控制器的第一存储器中。It should be noted that the access controller can obtain the page ownership table sent by the processor in advance and store the page ownership table in the memory. The memory access controller may also obtain in advance the storage address of the page ownership table sent by the processor, and store the storage address of the page ownership table in the first memory of the memory access controller.
还需要说明的是,处理器可以基于用户需求,灵活构建页面归属表。其中,页面归属表描述了内存页面的地址和分桶标识的映射关系。需要说明的是,每个分桶标识对应的分桶所占的内存空间的大小可以相同,也可以不同。It should also be noted that the processor can flexibly construct the page ownership table based on user needs. Among them, the page ownership table describes the mapping relationship between the address of the memory page and the bucket identifier. It should be noted that the size of the memory space occupied by the buckets corresponding to each bucket ID can be the same or different.
通过上述由软件灵活定义分桶编号映射关系的方式,使得内存分桶和内存页面具有灵活的映射关系,可以实现冷热数据放置在不同分桶,可以实现非均匀划分分桶的大小,保证了内存页面访问次数确定的准确性。Through the above-mentioned method of flexibly defining the bucket number mapping relationship by software, memory buckets and memory pages have a flexible mapping relationship. Hot and cold data can be placed in different buckets, and the size of the buckets can be divided non-uniformly, ensuring Accuracy of memory page access count determination.
示例性地,处理器可以基于用户需求(每个分桶标识对应的全部的内存页面中的数据为同一任务的数据的需求),识别每个任务的数据对应的内存页面的地址,以划分每个任务的数据对应的内存页面的地址所对应的分桶标识。在划分过程中,将每个任务的数据对应的多个内存页面的地址对应至同一分桶标识,或者对应至不同分桶标识。将不同任务的数据对应的内存页面的地址对应至不同分桶标识。也就是说,同一任务的数据可以存储于同一分桶,也可以存储于不同分桶,同一分桶存储的数据为同一任务的数据。在一种实现方式中,处理器可以基于用户输入的内存页面的地址与分桶标识的映射关系,构建页面归属表。通过该种同一分桶仅包括同一任务的数据的页面归属表的设置方式,可以实现冷热数据放置在不同分桶,保证了内存页面访问次数确定的准确性,进而提高了后续处理器基于内存页面的访问次数,统计冷热页的准确率。For example, the processor can identify the address of the memory page corresponding to the data of each task based on user requirements (the requirement that all the data in the memory pages corresponding to each bucket identification be data of the same task) to divide each The bucket ID corresponding to the address of the memory page corresponding to the data of each task. During the partitioning process, the addresses of multiple memory pages corresponding to the data of each task are mapped to the same bucket ID, or to different bucket IDs. Map the addresses of memory pages corresponding to data of different tasks to different bucket identifiers. In other words, the data of the same task can be stored in the same bucket or in different buckets. The data stored in the same bucket is the data of the same task. In one implementation, the processor can construct a page ownership table based on the mapping relationship between the address of the memory page input by the user and the bucket identifier. By setting the page ownership table in which the same bucket only includes data for the same task, hot and cold data can be placed in different buckets, ensuring the accuracy of determining the number of memory page accesses, thereby improving the memory-based performance of subsequent processors. The number of visits to the page, and the accuracy of counting hot and cold pages.
S302:基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识。S302: Based on the storage address of the page ownership table and the address of the memory page, determine the bucket identifier corresponding to the address of the memory page.
在本实施例中,访存控制器可以在获取页面归属表的存储地址和内存页面的地址后,基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识。也就是说,访存控制器可以基于页面归属表的存储地址和内存页面的地址,查找内存中存储的页面归属表,以确定内存页面的地址对应的分桶标识。示例性地,分桶标识可以为分桶编号。本实施例不对分桶标识的具体形式进行限定。In this embodiment, the memory access controller may, after obtaining the storage address of the page ownership table and the address of the memory page, determine the bucket identifier corresponding to the address of the memory page based on the storage address of the page ownership table and the address of the memory page. That is to say, the memory access controller can search the page ownership table stored in the memory based on the storage address of the page ownership table and the address of the memory page to determine the bucket identifier corresponding to the address of the memory page. For example, the bucket identifier may be a bucket number. This embodiment does not limit the specific form of the bucket identification.
需要说明的是,在一种实现方式中,访存控制器中也可以存储页面归属表。在访存控制器存储页面归属表的情况下,访存控制器可以响应于处理器发送的第一指令,直接从访存控制器存储的页面归属表中,查找与内存页面的地址对应的分桶标识,并将分桶标识对应的计数器的计数值按照预设步进值递增。还需要说明的是,访存控制器在从页面归属表中,查找与第一指令中的内存页面的地址对应的分桶标识之前,可以获取处理器发送的页面归属表,并将页面归属表存储至访存控制器的第一存储器中。It should be noted that, in an implementation manner, the page ownership table can also be stored in the memory access controller. In the case where the memory access controller stores the page ownership table, the memory access controller can respond to the first instruction sent by the processor and directly search for the segment corresponding to the address of the memory page from the page ownership table stored by the memory access controller. Bucket ID, and the count value of the counter corresponding to the bucket ID is incremented according to the preset step value. It should also be noted that the memory access controller can obtain the page ownership table sent by the processor before searching for the bucket identification corresponding to the address of the memory page in the first instruction from the page ownership table, and convert the page ownership table Stored in the first memory of the memory access controller.
S303:将分桶标识对应的计数器的计数值按照预设步进值递增。S303: Increment the count value of the counter corresponding to the bucket identification according to the preset step value.
在本实施例中,访存控制器在确定内存页面的地址对应的分桶标识后,可以将分桶标识对应的计数器的计数值按照预设步进值递增。其中,预设步进值为1。In this embodiment, after determining the bucket identifier corresponding to the address of the memory page, the memory access controller may increment the count value of the counter corresponding to the bucket identifier according to a preset step value. Among them, the default step value is 1.
换言之,访存控制器可以将分桶标识对应的访问次数加1。In other words, the memory access controller can increase the number of accesses corresponding to the bucket ID by 1.
本实施例中,提供一种页面归属表,该页面归属表描述了内存页面的地址和分桶标识的映射关系。访存控制器可以在接收到包括内存页面的地址的第一指令时,获取页面归属表的存储地址,基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识,并将该分桶标识对应的计数器的计数值按照预设步进值递增,以对内存页面的访问次数进行加1处理。通过上述由软件灵活定义分桶编号映射关系的方式,使得内存分桶和内存页面具有灵活的映射关系,可以实现冷热数据放置在不同分桶,可以实现非均匀划分分桶的大小,从而保证了冷热数据的识别准确性,进而提高后续处理器统计冷热页的准确率。In this embodiment, a page ownership table is provided, which describes the mapping relationship between the address of the memory page and the bucket identifier. The memory access controller can obtain the storage address of the page ownership table when receiving the first instruction including the address of the memory page, and determine the bucket identification corresponding to the address of the memory page based on the storage address of the page ownership table and the address of the memory page. , and increment the count value of the counter corresponding to the bucket identifier according to the preset step value to increase the number of accesses to the memory page by 1. Through the above-mentioned method of flexibly defining the mapping relationship between bucket numbers by software, memory buckets and memory pages have a flexible mapping relationship. Hot and cold data can be placed in different buckets, and the size of the buckets can be divided non-uniformly, thereby ensuring This improves the accuracy of identifying hot and cold data, thereby improving the accuracy of subsequent processor statistics on hot and cold pages.
下面通过方法实施例二,对访存控制器基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识的过程进行详细说明。The following is a detailed description of the process in which the memory access controller determines the bucket identifier corresponding to the address of the memory page based on the storage address of the page ownership table and the address of the memory page through the second method embodiment.
在本实施例中,页面归属表可以为多级页表。页面归属表存储在内存中。In this embodiment, the page ownership table may be a multi-level page table. The page ownership table is stored in memory.
在页面归属表为多级页表的情况下,该多级页表包括第一页面归属表、第二页面归属表和第三页面归属表。其中,第一页面归属表为首级页表;第二页面归属表为中间级页表;第三页面归属表为末级页表;第二页面归属表为一级或多级页表。When the page ownership table is a multi-level page table, the multi-level page table includes a first page ownership table, a second page ownership table and a third page ownership table. Among them, the first page ownership table is a first-level page table; the second page ownership table is an intermediate-level page table; the third page ownership table is a last-level page table; and the second page ownership table is one-level or multi-level page tables.
示例性地,图4a为本申请实施例提供的一种页面归属表中各级页表中的页表项的结构示意图。第一页面归属表和第二页面归属表的每个页表项用于存储下一级页面归属表的存储地址;第三页面归属表的每个页表项用于存储分桶标识。Exemplarily, FIG. 4a is a schematic structural diagram of page table entries in page tables at each level in a page ownership table provided by an embodiment of the present application. Each page table entry in the first page ownership table and the second page ownership table is used to store the storage address of the next-level page ownership table; each page table entry in the third page ownership table is used to store the bucket identification.
访存控制器在基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识的过程中:In the process of determining the bucket ID corresponding to the address of the memory page based on the storage address of the page ownership table and the address of the memory page, the memory access controller:
访存控制器在获取页面归属表的存储地址(第一页面归属表的存储地址)后,基于页面归属表的存储地址(第一页面归属表的存储地址)和内存页面的地址中的前K位,在第一页面归属表中确定第二页面归属表的存储地址。也就是说,访存控制器可以基于第一页面归属表的存储地址和内存页面的地址中的前K位,确定第一页面归属表中的某个页表项为第一目标页表项,并将第一目标页表项中存储的下一级页面归属表的存储地址,作为第二页面归属表的存储地址。After obtaining the storage address of the page ownership table (the storage address of the first page ownership table), the memory access controller obtains the first K of the storage address of the page ownership table (the storage address of the first page ownership table) and the address of the memory page. bit to determine the storage address of the second page ownership table in the first page ownership table. That is to say, the memory access controller can determine a certain page table item in the first page ownership table as the first target page table item based on the storage address of the first page ownership table and the first K bits of the address of the memory page. And the storage address of the next-level page ownership table stored in the first target page table entry is used as the storage address of the second page ownership table.
访存控制器基于第二页面归属表的存储地址和内存地址中的中间M位,在第二页面归属表中确定第三页面归属表的存储地址。也就是说,访存控制器可以基于第二页面归属表的存储地址和内存页面的地址中的中间M位,确定第二页面归属表中的某个页表项为第二目标页表项,并将第二目标页表项中存储的下一级页面归属表的存储地址,作为第三页面归属表的存储地址。The memory access controller determines the storage address of the third page ownership table in the second page ownership table based on the storage address of the second page ownership table and the middle M bits in the memory address. That is to say, the memory access controller can determine that a certain page table entry in the second page ownership table is the second target page table entry based on the storage address of the second page ownership table and the middle M bits of the address of the memory page. And the storage address of the next-level page ownership table stored in the second target page table entry is used as the storage address of the third page ownership table.
访存控制器基于第三页面归属表的存储地址和内存地址中的后N位,在第三页面归属表中确定内存页面的地址对应的分桶标识。也就是说,访存控制器可以基于第三页面归属表的存储地址和内存页面的地址中的后N位,确定第三页面归属表中的某个页表项为第三目标页表项,并将第三目标页表项中存储的分桶标识,作为内存页面的地址对应的分桶标识。The memory access controller determines the bucket identifier corresponding to the address of the memory page in the third page ownership table based on the storage address of the third page ownership table and the last N bits of the memory address. That is to say, the memory access controller can determine that a certain page table entry in the third page ownership table is the third target page table entry based on the storage address of the third page ownership table and the last N bits of the address of the memory page. And the bucket identification stored in the third target page table entry is used as the bucket identification corresponding to the address of the memory page.
图4b为本申请实施例提供的一种查找分桶标识的原理示意图。如图4b所示,针对第一内存页面的地址和第二内存页面的地址,访存控制器可以确定第一内存页面的地址对应的分桶标识,并确定第二内存页面的地址对应的分桶标识。Figure 4b is a schematic diagram of the principle of searching for bucket identifiers provided by an embodiment of the present application. As shown in Figure 4b, for the address of the first memory page and the address of the second memory page, the memory access controller can determine the bucket identifier corresponding to the address of the first memory page, and determine the bucket identifier corresponding to the address of the second memory page. Bucket ID.
具体地,在页面归属表为三级页表的情况下,在确定第一内存页面的地址对应的分桶标识的过程中:Specifically, when the page ownership table is a three-level page table, in the process of determining the bucket identification corresponding to the address of the first memory page:
访存控制器可以基于页面归属表的存储地址(第一页面归属表的存储地址),以及第一内存页面的地址的前K位,确定第一页面归属表中的多个页表项中的第四个页表项为第一目标页表项。访存控制器可以将第一目标页表项中的下一级页面归属表的存储地址确定为第二页面归属表的存储地址。访存控制器可以基于第二页面归属表的存储地址和第一内存页面的地址的中间M位,确定第二页面归属表中的多个页表项中的第二个页表项为第二目标页表项。访存控制器可以将第二目标页表项中的下一级页面归属表的存储地址确定为第三页面归属表的存储地址。访存控制器可以基于第三页面归属表的存储地址和第一内存页面的地址的后N位,确定第三页面归属表中的多个页表项中的第三个页表项为第三目标页表项。访存控制器可以将第三目标页表项中存储的分桶标识(分桶标识1),确定为第一内存页面的地址对应的分桶标识。The memory access controller may determine which of the plurality of page table entries in the first page ownership table is based on the storage address of the page ownership table (the storage address of the first page ownership table) and the first K bits of the address of the first memory page. The fourth page table entry is the first target page table entry. The memory access controller may determine the storage address of the next-level page ownership table in the first target page table entry as the storage address of the second page ownership table. The memory access controller may determine, based on the middle M bits of the storage address of the second page ownership table and the address of the first memory page, that the second page table entry among the plurality of page table entries in the second page ownership table is the second page table entry. Target page table entry. The memory access controller may determine the storage address of the next-level page ownership table in the second target page table entry as the storage address of the third page ownership table. The memory access controller may determine, based on the storage address of the third page ownership table and the last N bits of the address of the first memory page, that the third page table entry among the plurality of page table entries in the third page ownership table is the third page table entry. Target page table entry. The memory access controller may determine the bucket identifier (bucket identifier 1) stored in the third target page table entry as the bucket identifier corresponding to the address of the first memory page.
在页面归属表为三级页表的情况下,在确定第二内存页面的地址对应的分桶标识的过程中:When the page ownership table is a three-level page table, in the process of determining the bucket identifier corresponding to the address of the second memory page:
访存控制器可以基于页面归属表的存储地址(第一页面归属表的存储地址),以及第二内存页面的地址的前K位,确定第一页面归属表中的多个页表项中的第四个页表项为第一目标页表项。访存控制器可以将第一目标页表项中的下一级页面归属表的存储地址确定为第二页面归属表的存储地址。访存控制器可以基于第二页面归属表的存储地址和第二内存页面的地址的中间M位,确定第二页面归属表中的多个页表项中的第四个页表项为第二目标页表项。访存控制器可以将第二目标页表项中的下一级页面归属表的存储地址确定为第三页面归属表的存储地址。访存控制器可以基于第三页面归属表的存储地址,第二内存页面的地址的后N位,确定第三页面归属表中的多个页表项中的第五个页表项为第三目标页表项。访存控制器可以将第三目标页表项中存储的分桶标识(分桶标识4),确定为第一内存页面的地址对应的分桶标识。在一种实现方式中,在页面归属表为多级页表的情况下,第一页面归属表和第二页面归属表的每个页表项用于存储下一级页面归属表的存储地址,以及下一级页面归属表对应的分桶标识。The memory access controller may determine which of the plurality of page table entries in the first page ownership table is based on the storage address of the page ownership table (the storage address of the first page ownership table) and the first K bits of the address of the second memory page. The fourth page table entry is the first target page table entry. The memory access controller may determine the storage address of the next-level page ownership table in the first target page table entry as the storage address of the second page ownership table. The memory access controller may determine, based on the middle M bits of the storage address of the second page ownership table and the address of the second memory page, that the fourth page table entry among the plurality of page table entries in the second page ownership table is the second page table entry. Target page table entry. The memory access controller may determine the storage address of the next-level page ownership table in the second target page table entry as the storage address of the third page ownership table. The memory access controller may determine, based on the storage address of the third page ownership table and the last N bits of the address of the second memory page, that the fifth page table entry among the plurality of page table entries in the third page ownership table is the third page table entry. Target page table entry. The memory access controller may determine the bucket identifier (bucket identifier 4) stored in the third target page table entry as the bucket identifier corresponding to the address of the first memory page. In one implementation, when the page ownership table is a multi-level page table, each page table entry of the first page ownership table and the second page ownership table is used to store the storage address of the next level page ownership table, And the bucket identification corresponding to the next-level page attribution table.
图4c为本申请实施例提供的另一种页面归属表中各级页表中的页表项的结构示意图。如图4c所示,在页面归属表为三级页表的情况下,第一页面归属表的每个页表项包括下一级页面归属表(第二页面归属表)的存储地址和对应的分桶标识。第二页面归属表的每个页表项包括下一级页面归属表(第三页面归属表)的存储地址和对应的分桶标识。第三页面归属表的每个页表项包括分桶标识。Figure 4c is a schematic structural diagram of page table entries in page tables at all levels in another page ownership table provided by an embodiment of the present application. As shown in Figure 4c, when the page ownership table is a three-level page table, each page table entry in the first page ownership table includes the storage address of the next-level page ownership table (the second page ownership table) and the corresponding Bucket ID. Each page table entry in the second page ownership table includes the storage address of the next-level page ownership table (the third page ownership table) and the corresponding bucket identifier. Each page table entry in the third page ownership table includes a bucket identifier.
在查找内存页面的地址对应的分桶标识的过程中:In the process of finding the bucket ID corresponding to the address of the memory page:
基于第一页面归属表(首级页面归属表)的每个页表项中包括下一级页面归属表的存储地址和对应的分桶标识,访存控制器可以直接基于页面归属表的存储地址(第一页面归属表的存储地址),以及内存页面的地址中的前K位,在第一页面归属表中确定内存页面的地址对应的分桶标识。Each page table entry based on the first page ownership table (first-level page ownership table) includes the storage address of the next-level page ownership table and the corresponding bucket identifier. The memory access controller can be directly based on the storage address of the page ownership table. (the storage address of the first page ownership table), and the first K bits of the address of the memory page, determine the bucket identifier corresponding to the address of the memory page in the first page ownership table.
需要说明的是,在某级页面归属表中的所有的页表项皆对应相同的分桶标识的情况下,可以在该页面归属表对应的上一级页面归属表的页表项中直接登记该分桶标识,从而使得内存不必存储该级页面归属表,达到了节约内存的效果。It should be noted that when all page table entries in a page ownership table of a certain level correspond to the same bucket identifier, they can be directly registered in the page table entries of the page ownership table of the upper level corresponding to the page ownership table. This bucket identification eliminates the need for the memory to store the page ownership table of this level, thus achieving the effect of saving memory.
另外,还需要说明的是,由于很容易区分分桶标识和下一级页面归属表的存储地址,一个页表项中包括的下一级页面归属表的存储地址可以和分桶标识复用相同的内存单元,从而进一步节省存储页面归属表所需要的内存空间。示例性地,一个页表项中包括的下一级页面归属表的存储地址可以和分桶标识存储在同一页(Page)中,其中,页(Page)表示内存中的最小的读写单元。In addition, it should be noted that since it is easy to distinguish the bucket identifier and the storage address of the next-level page ownership table, the storage address of the next-level page ownership table included in a page table entry can be reused with the same bucket identifier. memory unit, thereby further saving the memory space required to store the page ownership table. For example, the storage address of the next-level page ownership table included in a page table entry may be stored in the same page (Page) as the bucket identifier, where the page (Page) represents the smallest read-write unit in the memory.
本实施例中,将占用空间较大的页面归属表存储于内存中,将占用空间较小的页面归属表的存储地址存储于访存控制器中。访存控制器可以通过读取访存控制器存储的页面归属表的存储地址,以及内存页面的地址,从页面归属表中查找与内存页面的地址对应的分桶标识。本申请实施例通过将页面归属表的存储地址存储于访存控制器中,将页面归属表存储于存储空间较大的内存中的方式,降低访存控制器的存储压力。In this embodiment, the page ownership table that occupies a larger space is stored in the memory, and the storage address of the page ownership table that occupies a smaller space is stored in the memory access controller. The memory access controller can read the storage address of the page ownership table stored by the memory access controller and the address of the memory page, and find the bucket identifier corresponding to the address of the memory page from the page ownership table. The embodiment of the present application reduces the storage pressure of the memory access controller by storing the storage address of the page ownership table in the memory access controller and storing the page ownership table in a memory with a larger storage space.
图5为本申请实施例提供的一种内存页面的访问次数确定方法实施例三的流程示意图。FIG. 5 is a schematic flowchart of Embodiment 3 of a method for determining the number of accesses to a memory page provided by an embodiment of the present application.
参见图5,该方法具体包括以下步骤:Referring to Figure 5, the method specifically includes the following steps:
S501:响应于接收到处理器发送第一指令,确定第一存储器是否存储内存页面的地址对应的分桶标识。S501: In response to receiving the first instruction sent by the processor, determine whether the first memory stores the bucket identification corresponding to the address of the memory page.
在本实施例中,访存控制器响应于接收到处理器发送第一指令,可以确定第一存储器是否存储内存页面的地址对应的分桶标识。In this embodiment, in response to receiving the first instruction sent by the processor, the memory access controller may determine whether the first memory stores the bucket identification corresponding to the address of the memory page.
访存控制器在确定第一存储器未存储内存页面的地址对应的分桶标识的情况下,执行S502;访存控制器在确定第一存储器存储内存页面的地址对应的分桶标识的情况下,执行S506。When the memory access controller determines that the first memory does not store the bucket identifier corresponding to the address of the memory page, S502 is executed; when the memory access controller determines that the first memory stores the bucket identifier corresponding to the address of the memory page, Execute S506.
S502:获取页面归属表的存储地址。S502: Obtain the storage address of the page ownership table.
在本实施例中,访存控制器在确定第一存储器未存储内存页面的地址对应的分桶标识的情况下,可以获取页面归属表的存储地址。In this embodiment, when the memory access controller determines that the first memory does not store the bucket identifier corresponding to the address of the memory page, it may obtain the storage address of the page ownership table.
S503:基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识。S503: Based on the storage address of the page ownership table and the address of the memory page, determine the bucket identifier corresponding to the address of the memory page.
在本实施例中,访存控制器在获取页面归属表的存储地址后,可以根据页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识。其具体执行情况与S302相同,此处不再赘述。In this embodiment, after obtaining the storage address of the page ownership table, the memory access controller can determine the bucket identifier corresponding to the address of the memory page based on the storage address of the page ownership table and the address of the memory page. Its specific execution is the same as S302 and will not be described again here.
S504:将分桶标识对应的计数器的计数值按照预设步进值递增。S504: Increment the count value of the counter corresponding to the bucket identification according to the preset step value.
在本实施例中,访存控制器可以将分桶标识对应的计数器的计数值按照预设步进值递增。其中,预设步进值为1。其具体执行情况与S303相同,此处不再赘述。In this embodiment, the memory access controller may increment the count value of the counter corresponding to the bucket identifier according to a preset step value. Among them, the default step value is 1. Its specific execution is the same as S303 and will not be described again here.
S505:将内存页面的地址及其对应的分桶标识,存储至第一存储器中。S505: Store the address of the memory page and its corresponding bucket identifier in the first memory.
在本实施例中,访存控制器可以在确定出内存页面的地址对应的分桶标识后,将内存页面的地址以及其对应的分桶标识,存储至访存控制器的第一存储器中,例如,将内存页面的地址以及其对应的分桶标识存储至映射表中,以便后续可以快速获取内存页面对应的分桶标识。In this embodiment, the memory access controller may, after determining the bucket identifier corresponding to the address of the memory page, store the address of the memory page and its corresponding bucket identifier into the first memory of the memory access controller, For example, the address of the memory page and its corresponding bucket identifier are stored in the mapping table, so that the bucket identifier corresponding to the memory page can be quickly obtained later.
需要说明的是,本申请实施例不对S504和S505的执行先后顺序进行限定。访存控制器可以先执行S504,再执行S505;访存控制器也可以先执行S505,再执行S504。It should be noted that the embodiment of the present application does not limit the execution order of S504 and S505. The memory access controller can execute S504 first, and then execute S505; the memory access controller can also execute S505 first, and then execute S504.
S506:将分桶标识对应的计数器的计数值按照预设步进值递增。S506: Increment the count value of the counter corresponding to the bucket identification according to the preset step value.
在本实施例中,访存控制器在确定第一存储器存储内存页面的地址对应的分桶标识的情况下,可以将分桶标识对应的计数器的计数值按照预设步进值递增。其中,预设步进值为1。在一种实现方式中,访存控制器还可以将内存页面的地址对应的调用次数加1。访存控制器可以依据每个内存页面的地址对应的调用次数,对访存控制器存储的多个内存页面的地址进行排序,并将排序小于预设序号的内存页面的地址与其对应的分桶标识进行删除处理。In this embodiment, when the memory access controller determines the bucket identifier corresponding to the address of the memory page stored in the first memory, the count value of the counter corresponding to the bucket identifier can be incremented according to a preset step value. Among them, the default step value is 1. In one implementation, the memory access controller can also increase the number of calls corresponding to the address of the memory page by 1. The memory access controller can sort the addresses of multiple memory pages stored by the memory access controller based on the number of calls corresponding to the address of each memory page, and sort the addresses of memory pages smaller than the preset serial number and their corresponding buckets Identity for deletion processing.
在一种实现方式中,访存控制器可以建立内存页面的地址与调用时间信息的映射关系。访存控制器可以筛选对应的调用时间信息与当前时间信息的时间间隔大于预设时间间隔的内存页面,并将该筛选出的内存页面与分桶标识的映射关系进行删除处理。In one implementation, the memory access controller can establish a mapping relationship between the address of the memory page and the call time information. The memory access controller can filter memory pages whose time interval between the corresponding calling time information and the current time information is greater than the preset time interval, and delete the mapping relationship between the filtered memory pages and the bucket identifier.
本实施例中,访存控制器可以在接收到第一指令时,确定第一存储器中是否存储内存页面的地址对应的分桶标识。在第一存储器中存储内存页面的地址对应的分桶标识的情况下,将分桶标识对应的计数器的计数值按照预设步进值递增;在第一存储器中未存储内存页面的地址对应的分桶标识的情况下,获取页面归属表的存储地址,基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识,并将分桶标识对应的计数器的计数值按照预设步进值递增。通过上述直接根据访存控制器的第一存储器中存储的内存页面的地址对应的分桶标识,获取分桶标识的方式,提高了分桶标识的获取速度,进而提高了基于第一指令,对内存页面的访问次数进行加1的速度。In this embodiment, the memory access controller may determine whether the bucket identifier corresponding to the address of the memory page is stored in the first memory when receiving the first instruction. When the bucket identifier corresponding to the address of the memory page is stored in the first memory, the count value of the counter corresponding to the bucket identifier is incremented according to the preset step value; if the bucket identifier corresponding to the address of the memory page is not stored in the first memory, In the case of bucket identification, the storage address of the page ownership table is obtained. Based on the storage address of the page ownership table and the address of the memory page, the bucket identification corresponding to the address of the memory page is determined, and the count value of the counter corresponding to the bucket identification is determined. Increment according to the preset step value. Through the above method of obtaining the bucket identifier directly based on the bucket identifier corresponding to the address of the memory page stored in the first memory of the memory access controller, the acquisition speed of the bucket identifier is improved, and thus the processing speed of the bucket identifier based on the first instruction is improved. The number of accesses to a memory page is increased by 1.
图6为本申请实施例提供的一种内存页面的访问次数确定方法实施例四的流程示意图。FIG. 6 is a schematic flowchart of Embodiment 4 of a method for determining the number of accesses to a memory page provided by an embodiment of the present application.
参见图6,该方法具体包括以下步骤:Referring to Figure 6, the method specifically includes the following steps:
S601:响应于接收到处理器发送的第一指令,获取页面归属表的存储地址。S601: In response to receiving the first instruction sent by the processor, obtain the storage address of the page ownership table.
在本实施例中,访存控制器响应于接收到处理器发送的第一指令,获取页面归属表的存储地址;其中,第一指令包括内存页面的地址;第一指令用于指示访问内存页面的地址;页面归属表用于记录内存页面的地址和分桶标识的映射关系。In this embodiment, the memory access controller obtains the storage address of the page ownership table in response to receiving the first instruction sent by the processor; wherein the first instruction includes the address of the memory page; the first instruction is used to instruct access to the memory page. The address; the page ownership table is used to record the mapping relationship between the address of the memory page and the bucket identifier.
其具体实现方式与S301相同,此处不再赘述。The specific implementation method is the same as S301 and will not be described again here.
S602:基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识。S602: Based on the storage address of the page ownership table and the address of the memory page, determine the bucket identifier corresponding to the address of the memory page.
在本实施例中,访存控制器可以基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识。In this embodiment, the memory access controller may determine the bucket identifier corresponding to the address of the memory page based on the storage address of the page ownership table and the address of the memory page.
其具体实现方式与S302相同,此处不再赘述。The specific implementation method is the same as S302 and will not be described again here.
S603:将分桶标识对应的计数器的计数值按照预设步进值递增。S603: Increment the count value of the counter corresponding to the bucket identification according to the preset step value.
在本实施例中,访存控制器可以将分桶标识对应的计数器的计数值按照预设步进值递增。其中,预设步进值为1。In this embodiment, the memory access controller may increment the count value of the counter corresponding to the bucket identifier according to a preset step value. Among them, the default step value is 1.
其具体实现方式与S303相同,此处不再赘述。The specific implementation method is the same as S303 and will not be described again here.
S604:将分桶标识对应的计数器的计数值存储至第二存储器中。S604: Store the count value of the counter corresponding to the bucket identification into the second memory.
在本实施例中,访存控制器可以将分桶标识对应的计数器的计数值存储至访存控制器的第二存储器中,以对分桶编号对应的计数器的计数值进行保存处理。In this embodiment, the memory access controller may store the count value of the counter corresponding to the bucket ID into the second memory of the memory access controller to save the count value of the counter corresponding to the bucket number.
S605:响应于接收到处理器发送的第二指令,向处理器发送分桶标识对应的计数器的计数值。S605: In response to receiving the second instruction sent by the processor, send the count value of the counter corresponding to the bucket identification to the processor.
在本实施例中,访存控制器可以响应于接收到处理器发送的第二指令,向处理器发送分桶标识对应的计数器的计数值,其中,第二指令用于指示获取内存页面的访问次数。In this embodiment, the memory access controller may send the count value of the counter corresponding to the bucket identification to the processor in response to receiving a second instruction sent by the processor, where the second instruction is used to instruct access to obtain the memory page. frequency.
需要说明的是,处理器可以根据分桶标识对应的计数器的计数值,统计冷热页。It should be noted that the processor can count hot and cold pages based on the count value of the counter corresponding to the bucket identifier.
在一种实现方式中,处理器在接收到分桶标识对应的计数器的计数值后,将计数值大于预设阈值的分桶标识,对应的内存页面,确定为热页;将计数值小于或者等于预设阈值的分桶标识,对应的内存页面,确定为冷页。In one implementation, after receiving the count value of the counter corresponding to the bucket identifier, the processor determines the bucket identifier and the corresponding memory page whose count value is greater than the preset threshold as a hot page; The bucket ID equal to the preset threshold and the corresponding memory page are determined to be cold pages.
具体地,处理器中的管理软件可以基于用户需求中的预设阈值,根据访存控制器发送的分桶标识对应的计数器的计数值,确定每个分桶标识对应的冷热页情况,从而确定每个内存页面对应的冷热页情况。Specifically, the management software in the processor can determine the hot and cold pages corresponding to each bucket identifier based on the count value of the counter corresponding to the bucket identifier sent by the memory access controller based on the preset threshold value in the user demand, thereby Determine the hot and cold pages corresponding to each memory page.
处理器中的管理软件在对冷热页进行统计后,可以将热页中的数据由内存迁移至处理器直连的动态随机存取存储器(Dynamic Random Access Memory,简称DRAM)中。具体地,处理器中的管理软件可以在DRAM中分配一个新的页面,然后将旧页面(被统计为热页的内存页面)中的数据拷贝至新的页面中。处理器中的管理软件可以解除旧页面的映射关系(逻辑地址和物理地址的映射关系),将映射关系映射到新页面,并释放旧页面。After the management software in the processor counts the hot and cold pages, it can migrate the data in the hot pages from the memory to the dynamic random access memory (Dynamic Random Access Memory, referred to as DRAM) directly connected to the processor. Specifically, the management software in the processor can allocate a new page in the DRAM, and then copy the data in the old page (memory page counted as a hot page) to the new page. The management software in the processor can unmap the old page (the mapping between logical address and physical address), map the mapping to the new page, and release the old page.
本实施例中,提供一种页面归属表,该页面归属表描述了内存页面的地址和分桶标识的映射关系。访存控制器响应于接收到处理器发送的第一指令,获取页面归属表的存储地址。访存控制器基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识。访存控制器将分桶标识对应的计数器的计数值按照预设步进值递增。访存控制器将分桶标识对应的计数器的计数值存储至第二存储器中。访存控制器可以响应于接收到处理器发送的第二指令,向处理器发送分桶标识对应的计数器的计数值。通过上述由软件灵活定义分桶标识映射关系的方式,可以提供更为精细的分桶规则,从而提高了后续处理器基于分桶标识对应的计数器的计数值,统计冷热页的准确率。In this embodiment, a page ownership table is provided, which describes the mapping relationship between the address of the memory page and the bucket identifier. The memory access controller obtains the storage address of the page ownership table in response to receiving the first instruction sent by the processor. The memory access controller determines the bucket identifier corresponding to the address of the memory page based on the storage address of the page ownership table and the address of the memory page. The memory access controller increments the count value of the counter corresponding to the bucket identifier according to a preset step value. The memory access controller stores the count value of the counter corresponding to the bucket identification into the second memory. The memory access controller may send the count value of the counter corresponding to the bucket identification to the processor in response to receiving the second instruction sent by the processor. Through the above method of flexibly defining the bucket ID mapping relationship by software, more refined bucketing rules can be provided, thereby improving the accuracy of subsequent processors based on the counter value corresponding to the bucket ID and counting hot and cold pages.
下面通过方法实施例五,详述访存控制器获取处理器发送的页面归属表,并将页面归属表存储至内存的过程。The following is a detailed description of the process in which the memory access controller obtains the page ownership table sent by the processor and stores the page ownership table into the memory through the fifth method embodiment.
在本实施例中,访存控制器可以获取处理器发送的页面归属表,并将页面归属表存储至内存中。In this embodiment, the memory access controller may obtain the page ownership table sent by the processor and store the page ownership table in the memory.
以内存为CXL type3型存储设备为例。访存控制器可以获取处理器发送的页面归属表,该页面归属表可以为四级页表,包括第一页面归属表、第二页面归属表以及第三页面归属表,其中,第二页面归属表可以为两级页表。Take the memory as a CXL type3 storage device as an example. The memory access controller can obtain the page ownership table sent by the processor. The page ownership table can be a four-level page table, including a first page ownership table, a second page ownership table and a third page ownership table, where the second page ownership table The table can be a two-level page table.
每级页面归属表的大小均为4KB,第一页面归属表的每个页表项长度为2个字节,对应最多支持65536个分桶(2个字节16位,可表示216=65536个状态)。其余各级页表的页表项长度均为8个字节,整个页面归属表最多可以描述512*512*512*2048个内存页面的分桶映射关系 The size of each level of page ownership table is 4KB. The length of each page table entry in the first page ownership table is 2 bytes, corresponding to a maximum of 65536 buckets (2 bytes 16 bits, which can represent 2 16 = 65536 status). The length of page table entries in other levels of page tables is 8 bytes. The entire page ownership table can describe the bucket mapping relationship of up to 512*512*512*2048 memory pages.
在一种实现方式中,访存控制器中可以包括256个计数器,也就说,支持使用256个分桶标识。In one implementation, the memory access controller may include 256 counters, that is, it supports the use of 256 bucket identifiers.
图7为本申请实施例适用的一种构建页面归属表的场景示意图。Figure 7 is a schematic diagram of a scenario for building a page attribution table applicable to the embodiment of the present application.
如图7所示,任务1的虚拟地址空间(逻辑地址范围)分别为0x1000-0x6000,以及0x21000-0x23000。As shown in Figure 7, the virtual address space (logical address range) of task 1 is 0x1000-0x6000, and 0x21000-0x23000 respectively.
0x1000-0x6000对应的内存页面为0x800000、0x802000、0x900000、0x901000以及0x902000。0x21000-0x23000对应的内存页面为0x801000以及0x803000。The memory pages corresponding to 0x1000-0x6000 are 0x800000, 0x802000, 0x900000, 0x901000 and 0x902000. The memory pages corresponding to 0x21000-0x23000 are 0x801000 and 0x803000.
任务2的虚拟地址空间分别为0x1000-0x2000,以及0x41000-0x45000。The virtual address spaces of task 2 are 0x1000-0x2000 and 0x41000-0x45000 respectively.
0x1000-0x2000对应的内存页面为0x804000。0x41000-0x45000对应的内存页面为0x805000、0x903000、0x904000以及0x905000。The memory pages corresponding to 0x1000-0x2000 are 0x804000. The memory pages corresponding to 0x41000-0x45000 are 0x805000, 0x903000, 0x904000 and 0x905000.
处理器中的管理软件可以构建页面归属表,该页面归属表中描述了内存页面的地址与分桶标识的映射关系。也就是说,页面归属表描述了内存页面0x800000、0x802000、0x90000、0x901000、0x902000、0x801000、0x803000、0x804000、0x805000、0x903000、0x904000以及0x905000所对应的分桶标识。The management software in the processor can construct a page ownership table, which describes the mapping relationship between the address of the memory page and the bucket identifier. In other words, the page ownership table describes the bucket identifiers corresponding to memory pages 0x800000, 0x802000, 0x90000, 0x901000, 0x902000, 0x801000, 0x803000, 0x804000, 0x805000, 0x903000, 0x904000 and 0x905000. .
在一种实现方式中,0x800000、0x802000、0x90000、0x901000以及0x902000,对应到分桶标识1;0x801000以及0x803000对应到分桶标识2;0x804000对应到分桶标识3;0x805000、0x903000、0x904000以及0x905000对应到分桶标识4。In one implementation, 0x800000, 0x802000, 0x90000, 0x901000 and 0x902000 correspond to bucket identification 1; 0x801000 and 0x803000 correspond to bucket identification 2; 0x804000 correspond to bucket identification 3; 0x805000, 0x903000, 0x904000 And corresponding to 0x905000 Go to bucket ID 4.
处理器在构建页面归属表后,可以将页面归属表发送至访存控制器。访存控制器可以在接收到页面归属表后,以直接内存访问(Direct Memory Access,简称DMA)的方式读入页面归属表,并将页面归属表存储至内存中。After building the page ownership table, the processor can send the page ownership table to the memory access controller. After receiving the page ownership table, the memory access controller can read the page ownership table in a direct memory access (DMA) manner and store the page ownership table in the memory.
本实施例中,处理器可以基于用户需求,灵活构建页面归属表。通过上述由软件灵活定义分桶标识映射关系的方式,可以提供更为精细的分桶规则,从而提高了后续处理器基于分桶标识对应的计数器的计数值,统计冷热页的准确率。In this embodiment, the processor can flexibly construct the page ownership table based on user needs. Through the above method of flexibly defining the bucket ID mapping relationship by software, more refined bucketing rules can be provided, thereby improving the accuracy of subsequent processors based on the counter value corresponding to the bucket ID and counting hot and cold pages.
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are device embodiments of the present application, which can be used to execute method embodiments of the present application. For details not disclosed in the device embodiments of this application, please refer to the method embodiments of this application.
本申请实施例还提供一种访存控制器。图8为本申请实施例提供的一种访存控制器的结构示意图;如图8所示,该访存控制器80包括:收发模块81,处理模块82。其中,收发模块81,用于响应于接收到处理器发送的第一指令,获取页面归属表的存储地址;其中,第一指令包括内存页面的地址;第一指令用于指示访问内存页面的地址;页面归属表用于记录内存页面的地址和分桶标识的映射关系;处理模块82,用于基于页面归属表的存储地址和内存页面的地址,确定内存页面的地址对应的分桶标识;处理模块82,还用于将分桶标识对应的计数器的计数值按照预设步进值递增;其中,预设步进值为1。An embodiment of the present application also provides a memory access controller. FIG. 8 is a schematic structural diagram of a memory access controller provided by an embodiment of the present application; as shown in FIG. 8 , the memory access controller 80 includes: a transceiver module 81 and a processing module 82 . Among them, the transceiver module 81 is used to obtain the storage address of the page ownership table in response to receiving the first instruction sent by the processor; wherein the first instruction includes the address of the memory page; the first instruction is used to indicate access to the address of the memory page. ; The page ownership table is used to record the mapping relationship between the address of the memory page and the bucket identifier; the processing module 82 is used to determine the bucket identifier corresponding to the address of the memory page based on the storage address of the page ownership table and the address of the memory page; processing Module 82 is also used to increment the count value of the counter corresponding to the bucket identification according to a preset step value; wherein the preset step value is 1.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,页面归属表为多级页表;多级页表包括第一页面归属表、第二页面归属表和第三页面归属表;其中,第一页面归属表为首级页表;第二页面归属表为中间级页表;第三页面归属表为末级页表;第二页面归属表为一级或多级页表;第一页面归属表和第二页面归属表的每个页表项用于存储下一级页面归属表的存储地址;第三页面归属表的每个页表项用于存储分桶标识。In one implementation, the page ownership table is a multi-level page table; the multi-level page table includes a first page ownership table, a second page ownership table and a third page ownership table; where the first page ownership table is a first-level page table ;The second page ownership table is an intermediate-level page table; the third page ownership table is the last-level page table; the second page ownership table is one-level or multi-level page tables; each of the first page ownership table and the second page ownership table Each page table entry is used to store the storage address of the next-level page ownership table; each page table entry of the third page ownership table is used to store the bucket identification.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,页面归属表的存储地址为第一页面归属表的存储地址;处理模块82,具体用于:基于页面归属表的存储地址和内存页面的地址中的前K位,在第一页面归属表中确定第二页面归属表的存储地址;基于第二页面归属表的存储地址和内存页面地址中的中间M位,在第二页面归属表中确定第三页面归属表的存储地址;基于第三页面归属表的存储地址和内存页面地址中的后N位,在第三页面归属表中确定内存页面的地址对应的分桶标识。In one implementation, the storage address of the page ownership table is the storage address of the first page ownership table; the processing module 82 is specifically used to: based on the storage address of the page ownership table and the first K bits of the address of the memory page, The storage address of the second page belonging table is determined in the first page belonging table; based on the storage address of the second page belonging table and the middle M bits in the memory page address, the storage of the third page belonging table is determined in the second page belonging table Address; based on the storage address of the third page ownership table and the last N bits of the memory page address, determine the bucket identifier corresponding to the address of the memory page in the third page ownership table.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,页面归属表存储在内存中。In one implementation, the page ownership table is stored in memory.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,在确定内存页面的地址对应的分桶标识之后,处理模块82,还用于:将内存页面的地址对应的分桶标识,存储至第一存储器中。In one implementation, after determining the bucket identifier corresponding to the address of the memory page, the processing module 82 is further configured to: store the bucket identifier corresponding to the address of the memory page into the first memory.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,在获取页面归属表的存储地址之前,处理模块82,还用于:确定第一存储器是否存储内存页面的地址对应的分桶标识;在第一存储器存储内存页面的地址对应的分桶标识的情况下,将分桶标识对应的计数器的计数值按照预设步进值递增,其中,预设步进值为1。In one implementation, before obtaining the storage address of the page ownership table, the processing module 82 is also used to: determine whether the first memory stores the bucket identifier corresponding to the address of the memory page; store the address of the memory page in the first memory In the case of a corresponding bucket identifier, the count value of the counter corresponding to the bucket identifier is incremented according to a preset step value, where the preset step value is 1.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,处理模块82,还用于:在第一存储器未存储内存页面的地址对应的分桶标识的情况下,获取页面归属表的存储地址。In one implementation, the processing module 82 is also configured to: obtain the storage address of the page ownership table when the first memory does not store the bucket identification corresponding to the address of the memory page.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,在将分桶标识对应的计数器的计数值按照预设步进值递增之后,处理模块82,还用于:将分桶标识对应的计数器的计数值存储至第二存储器中。In one implementation, after incrementing the count value of the counter corresponding to the bucket identifier according to the preset step value, the processing module 82 is also configured to: store the count value of the counter corresponding to the bucket identifier into the second memory. middle.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
在一种实现方式中,收发模块81,还用于:响应于接收到处理器发送的第二指令,向处理器发送分桶标识对应的计数器的计数值;其中,第二指令用于指示获取内存页面的访问次数。In one implementation, the transceiver module 81 is also configured to: in response to receiving the second instruction sent by the processor, send the count value of the counter corresponding to the bucket identification to the processor; wherein the second instruction is used to instruct the acquisition The number of memory page accesses.
本实施例提供的访存控制器,可以执行上述方法实施例中的技术方案,其有益效果类似,此处不再进行赘述。The memory access controller provided in this embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, and will not be described again here.
本申请实施例还提供一种计算设备,包括:内存、访存控制器和处理器;其中,内存和访存控制器电连接;访存控制器和处理器电连接;Embodiments of the present application also provide a computing device, including: a memory, a memory access controller and a processor; wherein the memory and the memory access controller are electrically connected; the memory access controller and the processor are electrically connected;
访存控制器用于执行前述方法实施例中的技术方案,其实现原理和技术效果类似,在此不再赘述。The memory access controller is used to execute the technical solutions in the foregoing method embodiments. Its implementation principles and technical effects are similar and will not be described again here.
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、磁碟或者光盘等各种可以存储程序代码的介质。Persons of ordinary skill in the art can understand that all or part of the steps to implement the above method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps including the above-mentioned method embodiments are executed; and the aforementioned storage media include: ROM, magnetic disks, optical disks and other media that can store program codes.
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或对其中部分或全部技术特征进行等同替换;这些修改或替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application, but not to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features can be equivalently replaced; these modifications or substitutions do not cause the essence of the corresponding technical solutions to depart from the scope of the technical solutions of the embodiments of the present application. .
Claims (10)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310804111.7A CN117033254A (en) | 2023-06-30 | 2023-06-30 | Memory page access frequency determining method and computing device |
PCT/CN2023/134456 WO2025000868A1 (en) | 2023-06-30 | 2023-11-27 | Method for determining number of times of access to memory page, and computing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310804111.7A CN117033254A (en) | 2023-06-30 | 2023-06-30 | Memory page access frequency determining method and computing device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117033254A true CN117033254A (en) | 2023-11-10 |
Family
ID=88637947
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310804111.7A Pending CN117033254A (en) | 2023-06-30 | 2023-06-30 | Memory page access frequency determining method and computing device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117033254A (en) |
WO (1) | WO2025000868A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2025000868A1 (en) * | 2023-06-30 | 2025-01-02 | 超聚变数字技术有限公司 | Method for determining number of times of access to memory page, and computing device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5542089A (en) * | 1994-07-26 | 1996-07-30 | International Business Machines Corporation | Method and apparatus for estimating the number of occurrences of frequent values in a data set |
US6026475A (en) * | 1997-11-26 | 2000-02-15 | Digital Equipment Corporation | Method for dynamically remapping a virtual address to a physical address to maintain an even distribution of cache page addresses in a virtual address space |
US20070100873A1 (en) * | 2005-10-27 | 2007-05-03 | Hitachi, Ltd. | Information retrieving system |
CN104657362A (en) * | 2013-11-18 | 2015-05-27 | 深圳市腾讯计算机系统有限公司 | Method and device for storing and querying data |
US20210073123A1 (en) * | 2019-09-11 | 2021-03-11 | EMC IP Holding Company LLC | Method, device, and computer program product for managing address mapping in storage system |
US20210073131A1 (en) * | 2019-09-10 | 2021-03-11 | Arm Limited | Partition identifiers for page table walk memory transactions |
CN114969062A (en) * | 2021-02-24 | 2022-08-30 | 北京金山云网络技术有限公司 | Data processing method and device, electronic equipment and computer storage medium |
CN116319839A (en) * | 2023-02-13 | 2023-06-23 | 上海霄云信息科技有限公司 | Bucket cross-pool access method and equipment for distributed storage system |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014146246A (en) * | 2013-01-30 | 2014-08-14 | Fujitsu Ltd | Number of accesses management program, number of accesses management device, and method for managing number of accesses |
CN106294191B (en) * | 2015-05-26 | 2019-07-09 | 华为技术有限公司 | The method for handling table, the method and apparatus for accessing table |
CN111291291B (en) * | 2018-12-07 | 2023-05-02 | 阿里巴巴集团控股有限公司 | Page loading time processing method, device and system |
CN112214805B (en) * | 2020-10-15 | 2024-02-02 | 华中科技大学 | Secure ORAM memory based on hybrid DRAM-NVM memory and access method thereof |
CN117033254A (en) * | 2023-06-30 | 2023-11-10 | 超聚变数字技术有限公司 | Memory page access frequency determining method and computing device |
-
2023
- 2023-06-30 CN CN202310804111.7A patent/CN117033254A/en active Pending
- 2023-11-27 WO PCT/CN2023/134456 patent/WO2025000868A1/en unknown
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5542089A (en) * | 1994-07-26 | 1996-07-30 | International Business Machines Corporation | Method and apparatus for estimating the number of occurrences of frequent values in a data set |
US6026475A (en) * | 1997-11-26 | 2000-02-15 | Digital Equipment Corporation | Method for dynamically remapping a virtual address to a physical address to maintain an even distribution of cache page addresses in a virtual address space |
US20070100873A1 (en) * | 2005-10-27 | 2007-05-03 | Hitachi, Ltd. | Information retrieving system |
CN104657362A (en) * | 2013-11-18 | 2015-05-27 | 深圳市腾讯计算机系统有限公司 | Method and device for storing and querying data |
US20210073131A1 (en) * | 2019-09-10 | 2021-03-11 | Arm Limited | Partition identifiers for page table walk memory transactions |
US20210073123A1 (en) * | 2019-09-11 | 2021-03-11 | EMC IP Holding Company LLC | Method, device, and computer program product for managing address mapping in storage system |
CN112486860A (en) * | 2019-09-11 | 2021-03-12 | 伊姆西Ip控股有限责任公司 | Method, apparatus and computer program product for managing address mapping for a storage system |
CN114969062A (en) * | 2021-02-24 | 2022-08-30 | 北京金山云网络技术有限公司 | Data processing method and device, electronic equipment and computer storage medium |
CN116319839A (en) * | 2023-02-13 | 2023-06-23 | 上海霄云信息科技有限公司 | Bucket cross-pool access method and equipment for distributed storage system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2025000868A1 (en) * | 2023-06-30 | 2025-01-02 | 超聚变数字技术有限公司 | Method for determining number of times of access to memory page, and computing device |
Also Published As
Publication number | Publication date |
---|---|
WO2025000868A1 (en) | 2025-01-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11068455B2 (en) | Mapper tree with super leaf nodes | |
CN109983449B (en) | Data processing method and storage system | |
US20220129189A1 (en) | Data Storage Method in Flash Device and Flash Device | |
US8725961B2 (en) | Systems, methods, and devices for configuring a device | |
CN100590609C (en) | A Dynamic Memory Management Method Based on Discontinuous Pages | |
CN107111452B (en) | Data migration method and device applied to computer system and computer system | |
EP3608790B1 (en) | Modifying nvme physical region page list pointers and data pointers to facilitate routing of pcie memory requests | |
CN107665095B (en) | Apparatus, method and readable storage medium for memory space management | |
US20250068562A1 (en) | Data access method and apparatus, device, and non-transitory readable storage medium | |
CN112148665B (en) | Cache allocation method and device | |
WO2024078429A1 (en) | Memory management method and apparatus, computer device, and storage medium | |
CN110674051A (en) | A data storage method and device | |
WO2024169286A1 (en) | Copy-on-write method, apparatus and device, and non-volatile readable storage medium | |
CN110147203A (en) | A file management method, device, electronic device and storage medium | |
WO2024099448A1 (en) | Memory release method and apparatus, memory recovery method and apparatus, and computer device and storage medium | |
WO2022068760A1 (en) | Method for memory management, and apparatus for same | |
CN113138941A (en) | Memory exchange method and device | |
CN117033254A (en) | Memory page access frequency determining method and computing device | |
WO2021062982A1 (en) | Method and apparatus for managing hmb memory, and computer device and storage medium | |
CN113253939B (en) | Data processing method, device, electronic equipment and storage medium | |
WO2017054714A1 (en) | Method and apparatus for reading disk array | |
WO2020000734A1 (en) | Space management method and apparatus for storage object, and computer apparatus and storage medium | |
CN117577163A (en) | SSD bad block detection method, SSD bad block detection device, computer equipment and storage medium | |
JP2024103198A (en) | Memory System | |
CN115586943A (en) | Hardware marking implementation method for dirty pages of virtual machine of intelligent network card |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |