Hot page recognition method and related device

By identifying the most frequently accessed address range in the mapping table and updating the mapping relationship, the problem of low accuracy of hot page identification methods under intensive access is solved, the efficiency and accuracy of hot page identification are improved, and memory utilization is optimized.

WO2026040403A1PCT designated stage Publication Date: 2026-02-26HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/085095
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-20
Filing Date
2025-03-26
Publication Date
2026-02-26

AI Technical Summary

Technical Problem

Existing hot page identification methods have low accuracy under intensive access conditions, resulting in low hot page identification efficiency.

Method used

By obtaining the access frequency of each memory block in the mapping table, a mapping relationship between the memory access address and the mapping table group is established. The address segment with the highest change frequency among multiple historical memory access requests is identified, and the preset mapping relationship is updated to avoid mapping conflicts, thus ensuring the accuracy of hot page identification.

Benefits of technology

It improves the accuracy and efficiency of hot page recognition, avoids missing hot pages, and optimizes memory utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025085095_26022026_PF_FP_ABST
    Figure CN2025085095_26022026_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present application belong to the technical field of computers. Disclosed are a hot page recognition method and a related device, which are used for improving the efficiency of hot page recognition. The method comprises: acquiring an access frequency corresponding to each memory block in a mapping table, the mapping table comprising a plurality of groups, each group comprising a plurality of memory blocks, the access frequency corresponding to a first memory block representing the number of times of, in response to a first memory access request, using the first memory block to map a first memory address to a physical memory region within a preset time period, a preset mapping relationship comprising a mapping relationship between a first address segment among memory access addresses and the groups in the mapping table, and the first address segment comprising an address segment having the highest data change frequency among memory access addresses indicated by a plurality of historical memory access requests; and, on the basis of the memory block in the mapping table whose access frequency meets a preset condition, determining a hot page among virtual memory pages, different memory blocks in the mapping table corresponding to different virtual memory pages, and the first memory access request being used for applying for a virtual memory page corresponding to the first memory access address.
Need to check novelty before this filing date? Find Prior Art

Description

A hot page identification method and related device

[0001] The present application claims priority from the Chinese patent application No. 202411148230.2 filed on August 20, 2024, and entitled "A hot page identification method and related device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] Embodiments of the present application relate to the field of computer technology, and in particular, to a hot page identification method and related device. BACKGROUND

[0003] With the derivation of various cloud scenarios and data center services, the capacity and bandwidth requirements of memory are increasingly high. However, not all application programs will frequently read the memory during application program running, and most of the memory only occupies space and will not be frequently accessed. At the beginning of server configuration, the memory is usually configured according to the maximum capacity of the service scenario, but the server will only run in the peak scenario for a small part of the time, which results in low memory utilization.

[0004] Therefore, the concept of memory hierarchical storage is proposed. In the memory hierarchical storage, the data frequently accessed by the central processing unit (CPU) is stored on the storage medium closer to the CPU side, which has high speed and low delay, but is expensive. The data not frequently accessed by the CPU is stored on the storage medium far away from the CPU side, which has low cost, but poor performance parameters such as bandwidth and latency. As can be seen from the above, the key technical point is to store the data in different storage media according to the frequency of data access. In the related technology, the virtual memory page can be used as a unit to identify and migrate hot and cold pages, and to realize memory hierarchical storage.

[0005] However, the above method may occur intensive access, and due to the significant increase in the number of hot page data, it will cause hot page missing, reduce the accuracy of hot page identification, and thus reduce the efficiency of hot page identification. SUMMARY

[0006] Embodiments of the present application provide a hot page identification method and related device, which can improve the accuracy of hot page identification, and thus improve the efficiency of hot page identification.

[0007] In a first aspect, a hot page identification method is provided, which is applied to a computing device and includes: obtaining a frequency of access corresponding to each memory block in a mapping table; the mapping table includes a plurality of groups, each group includes a plurality of memory blocks, and each memory block is used to indicate a physical memory region; the frequency of access corresponding to a first memory block represents a number of times that the first memory block is used to map a first memory access address to a physical memory region in response to a first memory access request within a preset time period; the first memory block is a memory block corresponding to the first memory access address and determined according to a preset mapping relationship; the first memory access address is a memory address indicated by the first memory access request; the preset mapping relationship includes a mapping relationship between a first address segment in the memory access address and a group in the mapping table; the first address segment includes an address segment with the highest data change frequency in memory access addresses indicated by a plurality of historical memory access requests; a hot page in a virtual memory page is determined according to a memory block in the mapping table whose frequency of access meets a preset condition; different memory blocks in the mapping table correspond to different virtual memory pages; and the first memory access request is used to apply for a virtual memory page corresponding to the first memory access address.

[0008] As can be seen from the above, the mapping relationship between the memory access address and each group in the mapping table is established by using the address segment with the highest data change frequency in the memory access addresses indicated by a plurality of historical memory access requests, which can balance the mapping relationship between the memory access address and each group in the mapping table, avoid dense access of any group in the mapping table, and prevent the memory access address with the same frequency from being recorded, thereby avoiding hot page omission, improving the accuracy of hot page identification, and further improving the efficiency of hot page identification.

[0009] In a possible implementation manner, before the hot page in the virtual memory page is determined according to the memory block in the mapping table whose frequency of access meets the preset condition, the method further includes: determining whether there is a mapping conflict in each group in the mapping table within the preset time period, wherein the first group has a mapping conflict includes that the number of memory access addresses mapped to the first group by using the preset mapping relationship within the preset time period is greater than the number of memory blocks in the first group, and the first group is any group in the mapping table; updating the preset mapping relationship in the case that at least one group in the mapping table has a mapping conflict within the preset time period; and the address segment in the updated preset mapping relationship is different from the address segment in the preset relationship before the update.

[0010] As can be seen from the above, before the hot page in the virtual memory page is determined according to the memory block in the mapping table whose frequency of access meets the preset condition, whether the preset mapping relationship at the current time can avoid hot page omission can be determined by judging whether there is a mapping conflict in each group in the mapping table within the preset time period. If there is a mapping conflict in each group in the mapping table within the preset time period, the preset mapping relationship is updated, which can further improve the accuracy of hot page identification.

[0011] In a possible implementation, the number of times of mapping conflicts of each group in the mapping table in a preset time period is obtained; the number of times of mapping conflicts of the first group is the number of times that a memory access address mapped to the first group by using the preset mapping relationship does not match a physical memory region indicated by a memory block in the first group; and in a case where the number of times of mapping conflicts of the first group is greater than a first threshold, it is determined that the first group has mapping conflicts.

[0012] As can be seen, by judging whether the number of times of mapping conflicts of each group in the mapping table in a preset time period is greater than a first threshold, it can be determined whether each group in the mapping table has intensive access, which provides a more accurate basis for updating the preset mapping relationship, thereby improving the efficiency of hot page identification.

[0013] In a possible implementation, in a case where the sum of the number of times of mapping conflicts of each group in the mapping table is greater than a second threshold, the preset mapping relationship is updated.

[0014] As can be seen, by judging whether the sum of the number of times of mapping conflicts of each group in the mapping table is greater than a second threshold, it is determined whether to update the preset mapping relationship. In a case where the sum of the number of times of mapping conflicts of each group in the mapping table is greater than the second threshold, the preset mapping relationship is updated. The implementability and flexibility of the hot page identification method are improved.

[0015] In a possible implementation, a second address segment with the highest frequency of changes in a plurality of memory access addresses in a preset time period is determined; and the preset mapping relationship is updated according to the second address segment, and the updated preset mapping relationship includes a mapping relationship between the second address segment in the memory access address and a group in the mapping table.

[0016] As can be seen, by determining a second address segment with the highest frequency of changes in a plurality of memory access addresses in a preset time period and updating the preset relationship according to the second address segment, the mapping relationship between the memory access address and each group in the mapping table in the preset time period can be balanced, intensive access to an arbitrary group can be avoided, and hot page selection can be improved, thereby improving the accuracy of hot page identification.

[0017] In a possible implementation, a first mapping set is obtained; the first mapping set includes a plurality of candidate mapping relationships; the preset mapping relationship is updated according to the first mapping set; and the updated preset mapping relationship is one of the plurality of candidate mapping relationships.

[0018] As can be seen, before the frequency of access of each memory block in the mapping table is obtained, the first mapping set is obtained, the preset mapping relationship is updated by using the first mapping set, and the second address segment does not need to be determined, thereby improving the efficiency of updating the preset relationship.

[0019] In a possible implementation, in a case where no mapping conflict exists in each group in the mapping table within the preset time period, the hot page in the virtual memory page is determined according to the memory block in the mapping table whose access frequency satisfies a preset condition.

[0020] As can be seen from the above, in a case where no mapping conflict exists in each group in the mapping table within the preset time period, the hot page in the virtual memory page is determined through the memory block in the mapping table whose access frequency satisfies a preset condition, which can avoid hot page omission and improve the efficiency of hot page identification.

[0021] In a possible implementation, in a case where the sum of the number of mapping conflicts of each group in the mapping table is less than or equal to a second threshold, the hot page in the virtual memory page is determined according to the memory block in the mapping table whose access frequency satisfies a preset condition; wherein the number of mapping conflicts of the first group is the number of times that the memory address mapped to the first group by using the preset mapping relationship does not match the physical memory region indicated by the memory block in the first group.

[0022] As can be seen from the above, in a case where the sum of the number of mapping conflicts of each group in the mapping table is less than or equal to a second threshold, the hot page in the virtual memory page is determined through the memory block in the mapping table whose access frequency satisfies a preset condition, which can improve the realizability and flexibility of the hot page identification method.

[0023] In a second aspect, a hot page identification apparatus is provided. The embodiments of the present application can divide the function modules of the hot page identification apparatus according to the method provided in the first aspect. The apparatus comprises: an acquisition module configured to acquire the access frequency corresponding to each memory block in a mapping table; wherein the mapping table comprises a plurality of groups, each group comprises a plurality of memory blocks, and one memory block is used to indicate one physical memory region; the access frequency corresponding to the first memory block indicates the number of times that the first memory address is mapped to the physical memory region by using the first memory block in response to the first memory access request within a preset time period; the first memory block is the memory block corresponding to the first memory address and determined according to a preset mapping relationship; the first memory address is the memory address indicated by the first memory access request; the preset mapping relationship comprises the mapping relationship between the first address segment in the memory access address and the group in the mapping table; the first address segment comprises the address segment with the highest data change frequency in the memory access address indicated by a plurality of historical memory access requests;

[0024] The identification module is configured to determine the hot page in the virtual memory page according to the memory block in the mapping table whose access frequency satisfies a preset condition; different memory blocks in the mapping table correspond to different virtual memory pages; and the first memory access request is used to apply for the virtual memory page corresponding to the first memory address.

[0025] In a possible implementation, the obtaining module is further configured to obtain a number of times of mapping conflicts of each group in the mapping table within a preset time period; and the number of times of mapping conflicts of the first group is a number of times that a memory access address mapped to the first group by using the preset mapping relationship does not match a physical memory region indicated by a memory block in the first group.

[0026] In a possible implementation, the obtaining module is further configured to obtain a first mapping set; and the first mapping set includes a plurality of candidate mapping relationships.

[0027] In a possible implementation, the identifying module is further configured to, in a case where there is no mapping conflict of each group in the mapping table within a preset time period, determine a hot page in the virtual memory page according to a memory block in the mapping table that has a frequency of access satisfying a preset condition.

[0028] In a possible implementation, the identifying module is further configured to, in a case where a sum of the number of times of mapping conflicts of each group in the mapping table is less than or equal to a second threshold value, determine a hot page in the virtual memory page according to a memory block in the mapping table that has a frequency of access satisfying a preset condition; and the number of times of mapping conflicts of the first group is a number of times that a memory access address mapped to the first group by using the preset mapping relationship does not match a physical memory region indicated by a memory block in the first group.

[0029] In a possible implementation, the hot page identifying apparatus further includes a processing module configured to determine whether there is a mapping conflict of each group in the mapping table within a preset time period, where the first group has a mapping conflict includes that a number of memory access addresses mapped to the first group by using the preset mapping relationship within the preset time period is greater than a number of memory blocks in the first group, and the first group is any group in the mapping table; and in a case where at least one group in the mapping table has a mapping conflict within the preset time period, update the preset mapping relationship; and an address segment in the updated preset mapping relationship is different from an address segment in the preset relationship before the update.

[0030] In a possible implementation, the processing module is further configured to, in a case where the number of times of mapping conflicts of the first group is greater than a first threshold value, determine that the first group has a mapping conflict.

[0031] In a possible implementation, the processing module is further configured to, in a case where a sum of the number of times of mapping conflicts of each group in the mapping table is greater than a second threshold value, update the preset mapping relationship.

[0032] In a possible implementation, the processing module is further configured to determine a second address segment with a highest frequency of change in a plurality of memory access addresses within a preset time period; and update the preset mapping relationship according to the second address segment, where the updated preset mapping relationship includes a mapping relationship between the second address segment in the memory access address and a group in the mapping table.

[0033] In a possible implementation, the processing module is further configured to update the preset mapping relationship according to the first mapping set; and the updated preset mapping relationship is one of the plurality of candidate mapping relationships.

[0034] The possible technical solutions and beneficial effects of each function module described above can be referred to the technical solutions provided in the first aspect or the corresponding possible implementation manners thereof, which will not be described herein again.

[0035] In a third aspect, an embodiment of the present application provides a computing device cluster, the computing device cluster comprising at least one computing device, each computing device comprising a processor and a memory storing processor-executable instructions; the processor is configured to execute the instructions to cause the computing device to perform the hot page identification method described above.

[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium storing at least one computer program, the computer program being loaded and executed by a processor to implement the hot page identification method of the above aspect.

[0037] In a fifth aspect, an embodiment of the present application provides a computer program product or a computer program, the computer program product or the computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computing node reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computing node to perform the hot page identification method provided in the various optional implementation manners of the above aspect.

[0038] The specific description of the second aspect to the fifth aspect and the various implementation manners thereof in the embodiments of the present application can refer to the detailed description in the first aspect and the various implementation manners thereof; and the beneficial effects of the second aspect to the fifth aspect and the various implementation manners thereof can refer to the beneficial effect analysis in the various implementation manners of the first aspect, which will not be described herein again.

[0039] These aspects or other aspects of the embodiments of the present application will be more apparent in the following description. BRIEF DESCRIPTION OF DRAWINGS

[0040] FIG. 1 shows a schematic diagram of a hot page identification provided by the related art;

[0041] FIG. 2 shows a schematic diagram of a memory access address mapping relationship provided by the related art;

[0042] FIG. 3 shows a schematic diagram of a hardware interaction framework 100 provided by an embodiment of the present application;

[0043] FIG. 4 shows a schematic diagram of a collection function backhaul framework 200 provided by an embodiment of the present application;

[0044] Fig. 5 shows an implementation of the collection function backhaul framework 200 on a medium module according to an embodiment of the present application;

[0045] Fig. 6 shows an implementation of the collection function backhaul framework 200 in a CPU according to an embodiment of the present application;

[0046] Fig. 7 shows an implementation of the collection function backhaul framework 200 in a separate hardware module according to an embodiment of the present application;

[0047] Fig. 8 shows a hardware structure of a hot page identification system 300 according to an embodiment of the present application;

[0048] Fig. 9 shows a flow of a hot page identification method according to an embodiment of the present application;

[0049] Fig. 10 shows a mapping conflict occurrence according to an embodiment of the present application;

[0050] Fig. 11 shows an update of a preset mapping relationship according to an embodiment of the present application;

[0051] Fig. 12 shows a logic of a hot page identification method according to an embodiment of the present application;

[0052] Fig. 13 shows a mapping process of a mapping table according to an embodiment of the present application;

[0053] Fig. 14 shows a migration flow according to an embodiment of the present application;

[0054] Fig. 15 shows a hot page migration according to an embodiment of the present application;

[0055] Fig. 16 shows a structure of a hot page identification apparatus according to an embodiment of the present application;

[0056] Fig. 17 shows a hardware of a computing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0057] In the specification and claims of the present application and the above-described drawings, the terms "first", "second", "third", and "fourth" and the like are used to distinguish different objects, and are not used to define a specific sequence.

[0058] In the embodiments of the present application, the words "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design presented as "exemplary" or "for example" in the embodiments of the present application is not necessarily to be construed as preferred or advantageous over other embodiments or design solutions. Rather, use of the words "exemplary" or "for example" is intended to present concepts in a particular manner.

[0059] First, the application scenario of the embodiments of the present application is exemplarily introduced.

[0060] In software services, the server usually configures the memory according to the maximum service capacity scenario, but the server only runs in the peak scenario in a small part of time, and the hot data may only account for 10%-20% of the memory, or even as low as 5%-10%, while most of the memory is only occupied by space and not accessed, which leads to low memory utilization and waste of resources. In order to save memory cost, the concept of memory grading is proposed, that is, according to the frequency of data access, the data is stored in different memory media, which not only guarantees the requirements of memory capacity and bandwidth of the business scenario, but also improves the memory utilization and saves the memory cost.

[0061] Generally, the core of the CPU accesses the memory using a virtual address, and converts it into a physical address through a memory management unit (MMU). When the virtual address is converted into the physical address, a page is queried, and the common page size is 4K, 6K or 2M. For the operating system, each application program needs to apply for a page from the operating system if it needs to use the memory. That is, the access of the page is associated with the access of the memory by the actual application program. Therefore, in the related art, the cold page or the hot page can be identified using the page as a unit, and then the hierarchical storage of the memory is realized. For example, FIG. 1 shows a schematic diagram of hot page identification provided by the related art. As shown in FIG. 1, in the case of using a set-associative structure for the cache, there are three sets, set0, set1 and set2; each set includes four memory blocks, way. At the same time, each way corresponds to a counter for recording the frequency of access of the corresponding way.

[0062] If the operating system sends an access request to the cache, wherein the access request includes a memory access address 10. According to the mapping relationship between the memory access address 10 and the set in the cache, if the memory access address 10 can hit the way 2 in the cache set 1, it means that the page corresponding to the way 2 has a historical access record, and the memory access address can directly access the way 2 in the set 1, and the counter 6 in the counting file is increased by 1 to record the access frequency of the access request corresponding to the memory access address 10. According to the above method, the hot page can be identified according to the frequency of page access.

[0063] However, in the related art, in the case of intensive access, hot page leakage selection is caused, and the hot page identification accuracy is reduced. For example, FIG. 2 shows a memory access address mapping relationship diagram provided by the related art. As shown in FIG. 2, in the case of a cache cache using a set associative structure (x-set*y-way), for example, 512-set*4-way, that is, including 512 sets, and each set includes 4 memory blocks. The low 9 bits of the memory access address are one-to-one mapped with the 512-set, and 4 memory access addresses with the same low 9 bits can be stored in each set. As the hot area becomes wider, the data amount of the hot data of the same low 9 bit memory access address increases significantly, and each set still maintains 4-way. If the number of data with the same frequency of the same low 9 bit memory access address is greater than 4, set mapping conflict will occur at this time, causing hot page leakage selection, and seriously affecting the accuracy of hot page identification.

[0064] Therefore, the embodiment of the present application provides a hot page identification method, which is applied to a computing device. The method comprises the following steps: the computing device acquires the access frequency corresponding to each memory block in a mapping table. The mapping table comprises a plurality of sets, and each set comprises a plurality of memory blocks. One memory block is used to indicate one physical memory region. The access frequency corresponding to a first memory block represents the number of times that the first memory block is used to map a first memory access address to a physical memory region in response to a first memory access request in a preset time period. The first memory block is a memory block corresponding to the first memory access address, which is determined according to a preset mapping relationship. The first memory access address is a memory address indicated by the first memory access request. The preset mapping relationship comprises a mapping relationship between the data at a target position in the memory access address and the sets in the mapping table. The target position is at least one data position with the highest change frequency in the memory access addresses indicated by a plurality of historical memory access requests. The computing device determines a hot page in a virtual memory page according to the memory blocks in the mapping table whose access frequencies satisfy a preset condition. Different memory blocks in the mapping table correspond to different virtual memory pages. The first memory access request is used to apply for a virtual memory page corresponding to the first memory access address. The above method can effectively reduce the intensive access of each set, balance the mapping relationship between the memory access address and the set, ensure that the pages with the same access frequency are not missed in the process of identifying the hot page in the case of intensive access, improve the accuracy of hot page identification, and thus improve the efficiency of hot page identification.

[0065] Secondly, the system architecture of the embodiment of the present application is exemplarily introduced.

[0066] FIG. 3 shows a schematic diagram of a hardware interaction framework 100 according to an embodiment of the present application. As shown in FIG. 3, the hardware interaction framework 100 includes a central processing unit (CPU) 310 and a memory medium module 320.

[0067] The CPU 310 is a core component in a computing device, responsible for the instructions and data of an application program, and the operation and processing. The CPU 310 includes at least one core, and an operating system is running on the CPU 310. The CPU 310 is configured to obtain a frequency of access corresponding to each memory block in a mapping table in the memory medium module 320, and determine a hot page in a virtual memory page according to a memory block in the mapping table whose frequency of access satisfies a preset condition. The mapping table includes a plurality of groups, each group includes a plurality of memory blocks, and one memory block is used to indicate one physical memory region. The frequency of access corresponding to a first memory block indicates a number of times that the first memory block is used to map a first memory access address to a physical memory region in response to a first memory access request in a preset time period. The first memory block is a memory block corresponding to the first memory access address and determined according to a preset mapping relationship. The first memory access address is a memory address indicated by the first memory access request. The preset mapping relationship includes a mapping relationship between data at a target position in the memory access address and a group in the mapping table. The target position is at least one data position with the highest frequency of change in a plurality of historical memory access addresses indicated by memory access requests. Different memory blocks in the mapping table correspond to different virtual memory pages. The first memory access request is used to apply for a virtual memory page corresponding to the first memory access address. The operating system is configured to send a memory access request to the memory medium module 320.

[0068] The memory medium module 320 is a form of memory in a computing device, and is connected to the CPU 310 through a specific interface. The memory medium module 320 includes a plurality of memory media, and mainly functions to store application programs and data for the CPU 310 to access.

[0069] FIG. 4 shows a schematic diagram of a collection function feedback framework 200 according to an embodiment of the present application. As shown in FIG. 4, the collection function feedback framework 200 is configured to implement a core of the CPU 310 to issue a memory access request to an operating system, and the CPU 310 to collect a frequency of access of each memory block. The memory access request includes a memory access address. The collection function feedback framework 200 includes the CPU 310, a collection module 410, and a storage 420.

[0070] The CPU 310 includes a CPU core, and the core of the CPU 310 is configured to send a memory access request. The CPU 310 is configured to acquire the access frequency corresponding to each memory block in the mapping table, and determine a hot page in the virtual memory page according to the memory block in the mapping table whose access frequency meets a preset condition. The collection module 410 is configured to acquire the memory access address sent by the CPU core and the access frequency corresponding to each memory block in the mapping table. The memory 420 is configured to store the memory access address sent by the CPU core and the access frequency corresponding to each memory block in the mapping table, and return the memory access address and the access frequency to the CPU 310. The memory 420 can be a random access memory (RAM).

[0071] Optionally, the collection function return framework 200 further includes a compression module configured to compress the memory access address and the access frequency stored in the memory 420, and return the memory access address and the access frequency to the CPU 310.

[0072] For example, the collection function return framework 200 can have different hardware forms, for example, can be on the memory medium module 320, can be in the CPU 310, or can be on a separate hardware module.

[0073] For example, the collection function return framework 200 can have different hardware forms, for example, can be on the memory medium module 320, can be in the CPU 310, or can be on a separate hardware module.

[0074] FIG. 6 shows an implementation schematic diagram of the collection function return framework 200 in the CPU according to an embodiment of the present application. As shown in FIG. 6, the collection module 410 and the memory 420 in the collection function return framework 200 are in the CPU 310, and the CPU core directly reads the memory 420 to acquire the memory access address and the access frequency of the mapping table. The upper software in the CPU 310 can analyze the data to determine the hot page in the virtual memory page.

[0075] FIG. 7 shows an implementation schematic diagram of the collection function backhaul framework 200 on a separate hardware module according to an embodiment of the present application. As shown in FIG. 7, the collection function backhaul framework 200 is on a separate hardware module 710, and includes the collection module 410 and the memory 420. The hardware module 710 transmits the access address of the collected mapping table and the access frequency to the CPU 310 through an out-of-band manner; the upper layer software in the CPU 310 can analyze the data and determine the hot page in the virtual memory page.

[0076] For example, FIG. 8 shows a hardware structure schematic diagram of a hot page identification system 300 according to an embodiment of the present application. As shown in FIG. 8, the hot page identification system 300 includes a CPU 310, a counter 810, a change counter 820, a memory medium 830, and a register 840.

[0077] The CPU 310 includes a CPU core, which is configured to send a memory access request to the memory medium 830. The CPU 310 is configured to obtain the access frequency of each memory block in the mapping table, and determine the hot page in the virtual memory page according to the memory block in the mapping table whose access frequency meets a preset condition.

[0078] The counter 810 is configured to obtain the number of mapping conflicts of each group in the mapping table in a preset time period. The number of mapping conflicts of the first group is the number of times that the memory access address mapped to the first group by the preset mapping relationship does not match the physical memory region indicated by the memory block in the first group.

[0079] The change counter 820 includes a single-bit change counter or a multi-bit change counter, and is configured to determine the address segment with the highest data change frequency from the memory access addresses indicated by a plurality of historical memory access requests.

[0080] The register 840 is configured to implement a parameter-configurable interleaving matrix, which is used to update the preset mapping relationship. Alternatively, a complex programmable logic device (CPLD) or a field programmable gate array (FPGA) can be used to implement the parameter-configurable interleaving matrix, which is used to update the preset mapping relationship. Here, only an example is provided, and the present application is not limited in this regard.

[0081] Specifically, the CPU 310 can obtain the number of mapping conflicts of each group in the mapping table in a preset time period from the counter 810, so as to determine whether there is a mapping conflict in each group in the mapping table in the preset time period. In the case that there is a mapping conflict in at least one group in the mapping table in the preset time period, the CPU 310 can obtain the address segment with the highest data change frequency in the memory access address indicated by the memory access request in the preset time period from the change counter 820, so as to determine the second address segment with the highest change frequency in the plurality of memory access addresses in the preset time period; and the CPU 310 updates the preset mapping relationship by configuring the register 840 according to the second address segment. The updated preset mapping relationship includes the mapping relationship between the second address segment in the memory access address and the group in the mapping table.

[0082] It should be noted that the system architecture and application scenarios described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems as the system architecture evolves and new business scenarios appear.

[0083] For the convenience of understanding, the hot page identification method provided by the present application is exemplarily introduced below in combination with the accompanying drawings. The hot page identification method is applicable to the hardware interaction framework 100 shown in FIG. 3.

[0084] FIG. 9 shows a flow diagram of a hot page identification method according to an embodiment of the present application. As shown in FIG. 9, the hot page identification method can include the following steps:

[0085] S101, the computing device obtains the accessed frequency corresponding to each memory block in the mapping table.

[0086] The mapping table includes a plurality of groups, and each group includes a plurality of memory blocks. One memory block is used to indicate one physical memory region. The accessed frequency corresponding to the first memory block represents the number of times that the first memory block is used to map the first memory access address to the physical memory region in response to the first memory access request in a preset time period; the first memory block is the memory block corresponding to the first memory access address determined according to the preset mapping relationship; the first memory access address is the memory address indicated by the first memory access request; the preset mapping relationship includes the mapping relationship between the first address segment in the memory access address and the group in the mapping table; and the first address segment includes the address segment with the highest data change frequency in the memory access address indicated by a plurality of historical memory access requests.

[0087] The hot page identification method provided in the embodiments of the present application can not only be used for cache with set-associative structure, but also be used in other storage structures or storage scenarios that do not require data consistency.

[0088] In a possible implementation, before determining the hot page in the virtual memory page according to the memory block in the mapping table whose access frequency satisfies the preset condition, the method further includes: determining, by the computing device, whether each group in the mapping table has a mapping conflict in a preset time period, where the first group has a mapping conflict includes that the number of access addresses mapped to the first group by using the preset mapping relationship in the preset time period is greater than the number of memory blocks in the first group, and the first group is any group in the mapping table. In a case where at least one group in the mapping table has a mapping conflict in the preset time period, updating the preset mapping relationship; and a target position in the updated preset mapping relationship is different from a target position in the preset relationship before the updating.

[0089] For example, in a case where each group in the mapping table has a mapping conflict in the preset time period, intensive access of the access addresses occurs. That is, a large number of access addresses hit the same group in the mapping table by using the mapping relationship. Since the number of memory blocks included in one group is fixed, if hot page identification is performed at this time, access addresses exceeding the number of memory blocks included in one group will be missed, and thus memory blocks with the same access frequency are missed, and the accuracy of hot page identification is low. Therefore, in a case where at least one group in the mapping table has a mapping conflict in the preset time period, the preset mapping relationship is updated; and a target position in the updated preset mapping relationship is different from a target position in the preset relationship before the updating.

[0090] For example, FIG. 10 shows a mapping conflict occurrence diagram provided by an embodiment of the present application. As shown in FIG. 10, the mapping table includes the 0th group and the 1st group, and the 0th group and the 1st group each include four memory blocks. If the preset mapping relationship includes a mapping relationship between a low 1-bit address segment in the access address and a group in the mapping table. Wherein, the low 1-bit represents the last bit in the access address. The access address is a 4-bit address, including 0001, 0011, 0101, 0111, 1001 and 1011. The access addresses 0001, 0011, 0101, 0111, 1001 and 1011 are all mapped to the 1st group, and no access address is mapped to the 0th group, and at this time, a mapping conflict occurs. Therefore, the preset mapping relationship is updated, which can solve the case where a large number of access addresses are mapped to the same group. Wherein, an address segment in the updated preset mapping relationship is different from an address segment in the preset relationship before the updating.

[0091] In a possible implementation, the computing device obtains the number of times of mapping conflicts of each group in the mapping table in a preset time period. In a case where the number of times of mapping conflicts of the first group is greater than a first threshold, the computing device determines that the first group has a mapping conflict.

[0092] The first group of mapping conflicts occurs a number of times, and the number of times that the memory access address mapped to the first group by using the preset mapping relationship does not match the physical memory region indicated by the memory block in the first group.

[0093] For example, the computing device determines whether each group in the mapping table in the preset time period exists mapping conflicts according to the number of times that each group in the mapping table in the preset time period occurs mapping conflicts. In a case where the number of times that the first group occurs mapping conflicts is greater than the first threshold value, the computing device determines that the first group exists mapping conflicts, and thus determines that each group in the mapping table in the preset time period exists mapping conflicts.

[0094] For example, the mapping table includes the 0th group and the 1st group, and the 0th group and the 1st group each include 4 memory blocks, and the preset mapping relationship includes the mapping relationship between the low 1-bit address segment in the memory access address and the group in the mapping table. In a case where the memory access addresses 0001, 0011, 0101, and 0111 each hit the 4 memory blocks in the 1st group, it indicates that the 4 memory blocks are accessed. At this time, the memory access address in the memory access request includes 1001, which is also mapped to the 1st group, and at this time, 1001 is not included in the record of the 4 memory blocks in the 1st group that are accessed. It can be determined that the number of times that the first group occurs mapping conflicts is 1. In a case where the number of times that the first group occurs mapping conflicts is greater than 1, the computing device determines that the first group exists mapping conflicts.

[0095] In a possible implementation manner, in a case where the sum of the number of times that each group in the mapping table occurs mapping conflicts is greater than a second threshold value, the computing device updates the preset mapping relationship.

[0096] For example, the computing device obtains the number of times that each group in the mapping table occurs mapping conflicts in a preset time, and determines the sum of the number of times that each group occurs mapping conflicts. In a case where the sum of the number of times that each group in the mapping table occurs mapping conflicts is greater than a second threshold value, the computing device updates the preset mapping relationship. The second threshold value can be an empirical value.

[0097] For example, in a case where the second threshold value includes 10, the mapping table includes 4 groups, and each group has 4 memory blocks, according to the above-mentioned method of obtaining mapping conflicts, it is obtained that the number of times that the first group in the mapping table occurs mapping conflicts is 6, the number of times that the second group occurs mapping conflicts is 4, the number of times that the third group occurs mapping conflicts is 2, and the number of times that the fourth group occurs mapping conflicts is 0. It can be determined that the sum of the number of times that each group in the mapping table occurs mapping conflicts is 12. At this time, the sum of the number of times that each group in the mapping table occurs mapping conflicts is greater than the second threshold value, and the computing device updates the preset mapping relationship.

[0098] Optionally, in a case where the proportion of the groups in the mapping table that exist mapping conflicts in the preset time period is greater than a third threshold value, the computing device updates the preset mapping relationship.

[0099] The proportion of the group with the mapping conflict is, that is, the ratio of the number of the group with the mapping conflict to the number of all groups in the mapping table.

[0100] In a possible implementation, the computing device determines a second address segment with the highest frequency of change in the plurality of access addresses in the preset time period; and the computing device updates the preset mapping relationship according to the second address segment.

[0101] The updated preset mapping relationship includes the mapping relationship between the second address segment in the access address and the groups in the mapping table.

[0102] For example, the computing device obtains the plurality of access addresses in the preset time period, and determines a second address segment with the highest frequency of change in the plurality of access addresses. The preset mapping relationship is updated to one-to-one mapping between the second address segment and each group in the mapping table according to the second address segment.

[0103] For example, FIG. 11 shows a schematic diagram of updating a preset mapping relationship according to an embodiment of the present application. As shown in FIG. 11, the mapping table includes a 0th group and a 1st group, and the access address is 4-bit bit. In the case where the preset relationship includes the mapping relationship between a first address segment with the highest frequency of data change in the plurality of historical access request indicating access addresses and the groups in the mapping table, that is, in the case where the mapping relationship is between the low 1 bit of the access address and the groups in the mapping table, as shown in the figure, the access addresses in the preset time period include 1011, 0011, 0111, 0101, 1101 and 0001. Before updating the preset mapping relationship, according to the mapping relationship, all hits are to the 1st group.

[0104] Since a mapping conflict occurs at this time, the computing device obtains the access addresses 1011, 0011, 0111, 0101, 1101 and 0001 in the preset time period, and determines a second address segment with the highest frequency of change in the access addresses. The frequency of change in the access address represents the number of changes of the same bit of the address segment. According to the access addresses in the preset time period, the number of times that the address corresponding to the low 1 bit changes from 1 to 0 is 0, the number of times that the address corresponding to the low 2 bit changes from 1 to 0 is 3, the number of times that the address corresponding to the high 1 bit changes from 1 to 0 is 4, and the number of times that the address corresponding to the high 2 bit changes from 1 to 0 is 3. Therefore, the computing device can determine that the second address segment is the high 1 bit, and the updated preset mapping relationship includes the mapping relationship between the high 1 bit in the access address and each group in the mapping table. As can be seen from the figure, the access addresses 1011 and 1101 are mapped to the 1st group according to the updated preset mapping relationship; and the access addresses 0011, 0111, 0101 and 0001 are mapped to the 0th group according to the updated preset mapping relationship.

[0105] From the above, the address segment with the highest frequency of change among the plurality of access addresses in the preset time period can be determined, and the preset mapping relationship can be updated, thereby solving the problem of mapping conflict in the case of intensive access, avoiding the omission of access addresses with the same access frequency, and improving the accuracy of hot page identification.

[0106] In a possible implementation, the computing device obtains a first mapping set; and the computing device updates the preset mapping relationship according to the first mapping set.

[0107] The first mapping set includes a plurality of candidate mapping relationships; and the updated preset mapping relationship is one of the plurality of candidate mapping relationships.

[0108] For example, before obtaining the access frequencies of each memory block in the mapping table, the application program is pre-tested and investigated to determine the first mapping set. The computing device runs the application program and identifies the access situation of the application program by the user. The access situation includes access addresses and access frequencies. The computing device determines the first mapping set according to the access situation of the application program by the user, and the first mapping set includes a plurality of candidate mapping relationships. The computing device updates the preset mapping relationship according to the first mapping set.

[0109] For example, the first mapping set includes a first candidate mapping relationship, a second candidate mapping relationship, and a third candidate mapping relationship according to the access situation of the application program by the user. In the case that at least one group in the mapping table has mapping conflict in the preset time period, the computing device updates the preset mapping relationship according to the first mapping set. The updated preset mapping relationship can be the second candidate mapping relationship.

[0110] From the above method, the preset mapping relationship can be updated according to the first mapping set, which can improve the efficiency of updating the preset mapping relationship, thereby improving the efficiency of hot page identification.

[0111] S102, the computing device determines the hot page in the virtual memory page according to the memory block in the mapping table whose access frequency meets the preset condition.

[0112] Different memory blocks in the mapping table correspond to different virtual memory pages; and the first access request is used to apply for the virtual memory page corresponding to the first access address.

[0113] In a possible implementation, in the case that each group in the mapping table does not have mapping conflict in the preset time period, the computing device determines the hot page in the virtual memory page according to the memory block in the mapping table whose access frequency meets the preset condition.

[0114] For example, the computing device obtains the access frequencies of each memory block in the mapping table, and determines the memory block whose access frequency meets the preset condition as the hot page.

[0115] For example, the computing device screens the pages in the mapping table with the access frequency greater than a specified threshold value through a sliding window algorithm, and determines the pages as hot pages. For example, the mapping table includes a 0th group and a 1st group, each of which includes 4 memory blocks. The access frequencies of the memory blocks in the 0th group are 8 times, 6 times, 10 times and 0 times respectively, and the access frequencies of the memory blocks in the 1st group are 7 times, 3 times, 12 times and 0 times respectively. By using a sliding window with a sliding window granularity of 7 and a replacement algorithm, the access frequencies of the memory blocks in the 0th group and the 1st group can be sorted as 12 times, 10 times, 8 times, 7 times, 6 times, 3 times, 0 times and 0 times. Thus, the memory blocks with the access frequencies of 12 times, 10 times, 8 times and 7 times can be determined as hot pages of the virtual memory page.

[0116] In a possible implementation, in a case where the sum of the numbers of mapping conflicts of the groups in the mapping table is less than or equal to the second threshold value, the computing device determines the hot pages in the virtual memory page according to the memory blocks in the mapping table with the access frequencies satisfying the preset condition.

[0117] The number of mapping conflicts of the first group is the number of times that the memory access address mapped to the first group by using the preset mapping relationship does not match the physical memory region indicated by the memory block in the first group.

[0118] That is, after the preset mapping relationship is updated, the sum of the numbers of mapping conflicts of the groups in the mapping table is obtained again. If the sum of the numbers of mapping conflicts of the groups in the mapping table is greater than the second threshold value, it indicates that the updated preset mapping relationship will cause more hot pages to be missed, and the preset mapping relationship needs to be updated again until the sum of the numbers of mapping conflicts of the groups in the mapping table is less than or equal to the second threshold value. At this time, the computing device can obtain the access frequencies of the memory blocks in the mapping table, and determine the hot pages in the virtual memory page according to the memory blocks in the mapping table with the access frequencies satisfying the preset condition.

[0119] As can be seen from the above, by judging the relationship between the sum of the numbers of mapping conflicts of the groups in the mapping table and the second threshold value, in a case where the sum of the numbers of mapping conflicts of the groups in the mapping table is less than or equal to the second threshold value, the hot pages in the virtual memory page are determined according to the memory blocks in the mapping table with the access frequencies satisfying the preset condition, which can improve the accuracy of hot page identification, thereby improving the efficiency of hot page identification.

[0120] The hot page identification method is described from the perspective of the flow of the method above. The following will be described from the perspective of a complete and specific implementation.

[0121] Taking the hot page identification by using the sliding window heat judgment method as an example, FIG. 12 shows a logic diagram of a hot page identification method provided in an embodiment of the present application. As shown in FIG. 12, before the hot page identification process starts, the application is pre-operated and investigated to determine the first mapping set. Specifically, the computing device runs the application and identifies the access of the application by the user. The access includes the memory access address and the access frequency. The computing device determines the first mapping set according to the access of the application by the user, and the first mapping set includes the first candidate mapping relationship, the second candidate mapping relationship, and the third candidate mapping relationship. Then, the configuration process is entered. The configuration process includes configuring the granularity of the sliding window statistical page and configuring the second threshold. The computing device acquires a plurality of memory access addresses in a preset time period (S201), and collects the memory access addresses and the access frequencies. The computing device acquires the number of mapping conflicts of each group in the mapping table (S202). Specifically, a conflict counter is arranged in each group in the mapping table to acquire the number of mapping conflicts. Optionally, the computing device collects the number of mapping conflicts of each group and the memory access addresses in the preset time period by the CPU in the interrupt enabled mode or the polling mode, and the specific enabling mode is not limited.

[0122] For example, FIG. 13 shows a mapping collection process diagram of a mapping table provided in an embodiment of the present application. As shown in FIG. 13, the mapping table includes set0, set1, and set2, and each set includes four memory blocks. The counting file includes a counter and a conflict counter, and is usually maintained by the RAM. Each memory block corresponds to a counter, which is used to record the access frequency of the corresponding memory block. At the same time, each set also corresponds to a conflict counter, which is used to record the number of mapping conflicts of the corresponding set. If the first memory access address can hit the memory block 2 in set1 in the mapping table according to the mapping relationship, at this time, the counter 6 corresponding to the memory block 2 is incremented by 1 to record the access frequency of the memory block 2. If the first memory access address can hit set1 in the mapping table according to the mapping relationship, but the first memory access address cannot match the memory access addresses recorded in each memory block in set1, at this time, the first memory access address maps to set1 to cause a mapping conflict, and the conflict counter 1 corresponding to set1 is incremented by 1 to record the number of mapping conflicts of set1.

[0123] The computing device determines whether the sum of the number of mapping conflicts of each group in the mapping table is greater than the second threshold according to the number of mapping conflicts of each group in the mapping table (S203). If the sum of the number of mapping conflicts of each group in the mapping table is greater than the second threshold, the computing device determines whether all candidate mapping relationships in the first mapping set have been called (S204). If all candidate mapping relationships in the first mapping set have not been called, the computing device calls the candidate mapping relationship in the first mapping set that has not been called (S205) and updates the preset mapping relationship (S207). Specifically, in the case of calling the second candidate mapping relationship in the first mapping set, the computing device obtains the number of mapping conflicts of each group in the mapping table under the second candidate mapping relationship, and determines whether the sum of the number of mapping conflicts of each group in the mapping table is greater than the second threshold (S203). If the sum of the number of mapping conflicts of each group in the mapping table under the second candidate mapping relationship is greater than the second threshold, the computing device determines whether all candidate mapping relationships in the first mapping set have been called (S204). If all candidate mapping relationships in the first mapping set have been called, the computing device determines the second address segment with the highest frequency of changes among the plurality of memory access addresses in the preset time period according to the plurality of memory access addresses in the preset time period (S206). The computing device updates the preset mapping relationship according to the second address segment (S207). At this time, in the case where the preset mapping relationship includes the second address segment, the computing device determines whether the sum of the number of mapping conflicts of each group in the mapping table is greater than the second threshold (S203). If the sum of the number of mapping conflicts of each group in the mapping table is not greater than the second threshold, the computing device determines the hot page of the virtual memory (S208). Specifically, the computing device determines the hot page in the virtual memory page according to the memory block in the mapping table whose access frequency satisfies the preset condition. For example, the computing device obtains the count file in FIG. 13, determines the hot page in the virtual memory page by using the sliding window method according to the access frequency of each memory page recorded by the counter in the count file and the granularity of the sliding window statistical page, and determines the memory block in the mapping table whose access frequency satisfies the granularity of the sliding window statistical page as the hot page in the virtual memory page.

[0124] Optionally, FIG. 14 shows a migration process diagram provided by an embodiment of the present application. As shown in FIG. 14, the computing device obtains the access frequency of each memory block in the mapping table (S301), and determines the hot pages in the virtual memory pages (S302). Specifically, the virtual memory pages corresponding to the memory blocks in the mapping table that meet the preset condition are determined as the hot pages. For example, the mapping table includes the 0th group and the 1st group, and each group includes four memory blocks. According to the above method, the virtual memory pages corresponding to the memory block 2 and the memory block 3 in the 0th group and the memory block 1 and the memory block 2 in the 1st group are determined as the hot pages. The computing device migrates the hot pages in the virtual memory pages (S303). For example, the data in the virtual memory pages corresponding to the memory block 2 and the memory block 3 in the 0th group and the memory block 1 and the memory block 2 in the 1st group are copied to new pages, and the mapping table is updated. The memory medium indicated by the new page has a better performance than the memory medium indicated by the 0th group and the 1st group.

[0125] For example, FIG. 15 shows a hot page migration diagram provided by an embodiment of the present application. As shown in FIG. 15, the first-level storage medium is the storage medium with the best performance; the second-level storage medium is the storage medium with suboptimal performance; and the third-level storage medium is the storage medium with poor performance. The CPU 310 can determine the hot pages of the virtual memory in the second-level storage medium and the third-level storage medium by using the above hot page identification method, and migrate the hot pages of the virtual memory to the upper-level storage medium. That is, the hot pages of the virtual memory corresponding to the second-level storage medium are migrated to the first-level storage medium; the hot pages of the virtual memory corresponding to the third-level storage medium are migrated to the second-level storage medium; and the hierarchical storage of the memory is realized, thereby improving the memory utilization.

[0126] In summary, the embodiment of the present application provides a hot page identification method, applied to a computing device, for improving the hot page identification efficiency. The method comprises: the computing device obtaining the access frequency corresponding to each memory block in a mapping table. According to the memory blocks in the mapping table whose access frequency satisfies a preset condition, the hot page in the virtual memory page is determined. The mapping table comprises a plurality of groups, each group comprises a plurality of memory blocks, and one memory block is used to indicate one physical memory region; the access frequency corresponding to the first memory block represents the number of times that the first memory block is used to map the first memory address to the physical memory region in response to the first memory access request in a preset time period; the first memory block is the memory block corresponding to the first memory address determined according to a preset mapping relationship; the first memory address is the memory address indicated by the first memory access request; the preset mapping relationship comprises the mapping relationship between the first address segment in the memory address and the groups in the mapping table; the first address segment comprises the address segment with the highest data change frequency in the memory address indicated by a plurality of historical memory access requests; different memory blocks in the mapping table correspond to different virtual memory pages; and the first memory access request is used to apply for the virtual memory page corresponding to the first memory address. The above can effectively reduce the intensive access of each group in the mapping table, dilute the mapping relationship between the memory address and the group, ensure that the virtual memory page with the same access frequency will not be missed under intensive access, improve the accuracy of hot page identification, and further improve the efficiency of hot page identification.

[0127] The above mainly describes the scheme of the embodiment of the present application from the perspective of the method. It can be understood that the hot page identification device comprises at least one of the hardware structure and the software module for executing the corresponding functions. Those skilled in the art should easily realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driven hardware depends on the specific application of the technical scheme and the design constraints. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0128] The embodiment of the present application can divide the functional units of the hot page identification device according to the above method examples. For example, each functional unit can be divided according to each function, or two or more functions can be integrated in one processing unit. The integrated unit can be realized in the form of hardware or software functional unit. It should be noted that the division of units in the embodiment of the present application is illustrative, and is only a logical function division. When actually implemented, there can be another division method.

[0129] Exemplarily, FIG. 16 shows a structural schematic diagram of a hot page identification device provided in an embodiment of the present application. As shown in FIG. 16, the hot page identification device can be applied in a computing device, and the hot page identification device 400 includes:

[0130] The obtaining module 401 is configured to obtain a frequency of being accessed corresponding to each memory block in a mapping table; the mapping table includes a plurality of groups, each group includes a plurality of memory blocks, and one memory block is used to indicate one physical memory region; the frequency of being accessed corresponding to a first memory block indicates a number of times that the first memory block is used to map a first memory access address to a physical memory region in response to a first memory access request within a preset time period; the first memory block is a memory block corresponding to the first memory access address and determined according to a preset mapping relationship; the first memory access address is a memory address indicated by the first memory access request; the preset mapping relationship includes a mapping relationship between a first address segment in the memory access address and a group in the mapping table; the first address segment includes an address segment with a highest frequency of data change in memory access addresses indicated by a plurality of historical memory access requests;

[0131] The identification module 402 is configured to determine a hot page in a virtual memory page according to a memory block in the mapping table whose frequency of being accessed satisfies a preset condition; different memory blocks in the mapping table correspond to different virtual memory pages; and the first memory access request is used to apply for a virtual memory page corresponding to the first memory access address.

[0132] In a possible implementation, the obtaining module 401 is further configured to obtain a number of times of mapping conflicts of each group in the mapping table within a preset time period; the number of times of mapping conflicts of the first group is a number of times that a memory access address mapped to the first group by using the preset mapping relationship does not match a physical memory region indicated by a memory block in the first group.

[0133] In a possible implementation, the obtaining module 401 is further configured to obtain a first mapping set; the first mapping set includes a plurality of candidate mapping relationships.

[0134] In a possible implementation, the identification module 402 is further configured to, in a case where there is no mapping conflict of each group in the mapping table within a preset time period, determine a hot page in a virtual memory page according to a memory block in the mapping table whose frequency of being accessed satisfies a preset condition.

[0135] In a possible implementation, the identification module 402 is further configured to, in a case where a sum of the number of times of mapping conflicts of each group in the mapping table is less than or equal to a second threshold value, determine a hot page in a virtual memory page according to a memory block in the mapping table whose frequency of being accessed satisfies a preset condition; the number of times of mapping conflicts of the first group is a number of times that a memory access address mapped to the first group by using the preset mapping relationship does not match a physical memory region indicated by a memory block in the first group.

[0136] In a possible implementation, the hot page identification apparatus further includes a processing module configured to determine whether each group in the mapping table has a mapping conflict in a preset time period, where the first group has a mapping conflict includes that the number of access addresses mapped to the first group by using the preset mapping relationship in the preset time period is greater than the number of memory blocks in the first group, and the first group is any group in the mapping table; and the preset mapping relationship is updated in a case where at least one group in the mapping table has a mapping conflict in the preset time period; and the address segment in the updated preset mapping relationship is different from the address segment in the preset mapping relationship before the update.

[0137] In a possible implementation, the processing module is further configured to determine that the first group has a mapping conflict in a case where the number of times of mapping conflicts of the first group is greater than a first threshold.

[0138] In a possible implementation, the processing module is further configured to update the preset mapping relationship in a case where the sum of the number of times of mapping conflicts of each group in the mapping table is greater than a second threshold.

[0139] In a possible implementation, the processing module is further configured to determine a second address segment with the highest frequency of changes in the plurality of access addresses in the preset time period; and update the preset mapping relationship according to the second address segment, where the updated preset mapping relationship includes a mapping relationship between the second address segment in the access address and the group in the mapping table.

[0140] In a possible implementation, the processing module is further configured to update the preset mapping relationship according to the first mapping set, where the updated preset mapping relationship is one of the plurality of candidate mapping relationships.

[0141] FIG. 17 shows a hardware schematic diagram of a computing device according to an embodiment of the present application. As shown in FIG. 17, the computing device 800 includes a bus 801, a processor 802, a memory 803, and a communication interface 804. The processor 802, the memory 803, and the communication interface 804 communicate with each other through the bus 801. The computing device 800 can be a server or a terminal device. It should be understood that the number of processors and memories in the computing device 800 is not limited in the present application.

[0142] The bus 801 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is represented in FIG. 17, but it does not mean that there is only one bus or only one type of bus. The bus 801 can include a path for transmitting information between various components (e.g., the processor 802, the memory 803, the communication interface 804) of the computing device 800.

[0143] The processor 802 can include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP), etc.

[0144] The memory 803 can include a volatile memory (e.g., a random access memory (RAM)) and a non-volatile memory (e.g., a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD)).

[0145] The memory 803 stores executable program codes, and the processor 802 executes the executable program codes to respectively implement the functions of the obtaining module and the identifying module, thereby implementing the hot page identifying method. That is, the memory 803 stores instructions for executing the hot page identifying method.

[0146] Alternatively, the memory 803 stores executable program codes, and the processor 802 executes the executable program codes to respectively implement the functions of the foregoing hot page identifying apparatus, thereby implementing the hot page identifying method. That is, the memory 803 stores instructions for executing the hot page identifying method.

[0147] The communication interface 804 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 800 and other devices or communication networks.

[0148] As an example, in connection with FIG. 17, the functions in the acquiring module 401 and the identifying module 402 of the hot page identifying apparatus 400 can be implemented by the computing device in FIG. 17.

[0149] The embodiments of the present application further provide a computer readable storage medium, wherein instructions are stored in the computer readable storage medium, and when the instructions are executed on a computer, the computer is caused to perform the operations of any one of the embodiments corresponding to FIG. 9-FIG. 15 and various possible implementation manners thereof.

[0150] The embodiments of the present application further provide a computer program product comprising instructions, and when the instructions are executed on a computer, the computer is caused to perform the operations of any one of the embodiments corresponding to FIG. 9-FIG. 15 and various possible implementation manners thereof.

[0151] Those skilled in the art can realize that the units and algorithm steps of each example described in connection with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0152] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, apparatus and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.

[0153] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions, which, when loaded and executed by a computer, generate all or part of the processes or functions described in the embodiments of the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable apparatus. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one network site, computer, server or data center to another network site, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, microwave, etc.) manner. The computer-readable storage medium can be any available medium accessible by a computer, and can also be a data storage device such as a server, data center, etc. integrated with one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (such as a DVD, etc.), or a semiconductor medium (such as a solid-state disk), etc.

[0154] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0155] The above is merely a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A hot page identification method, characterized by, The method is applied to a computing device and comprises: obtaining a frequency of access corresponding to each memory block in a mapping table; wherein the mapping table comprises a plurality of groups, each of the groups comprises a plurality of memory blocks, and each of the memory blocks is used to indicate a physical memory region; the frequency of access corresponding to a first memory block represents a number of times that a first memory address is mapped to a physical memory region by using the first memory block in response to a first memory access request within a preset time period; the first memory block is a memory block corresponding to the first memory address and determined according to a preset mapping relationship; the first memory address is a memory address indicated by the first memory access request; the preset mapping relationship comprises a mapping relationship between a first address segment in a memory access address and a group in the mapping table; the first address segment comprises an address segment with the highest frequency of data change among memory access addresses indicated by a plurality of historical memory access requests; determining a hot page in a virtual memory page according to a memory block in the mapping table that satisfies a preset condition; different memory blocks in the mapping table correspond to different virtual memory pages; and the first memory access request is used to apply for a virtual memory page corresponding to the first memory address.

2. The method of claim 1, wherein, Before the determining of the hot page in the virtual memory page according to the memory block in the mapping table that satisfies the preset condition, the method further comprises: determining whether a mapping conflict exists in each group in the mapping table within the preset time period; wherein a first group exists a mapping conflict includes that a number of memory access addresses mapped to the first group by using the preset mapping relationship within the preset time period is greater than a number of memory blocks in the first group; and the first group is any group in the mapping table; in a case where the mapping conflict exists in at least one group in the mapping table within the preset time period, updating the preset mapping relationship; an address segment in the updated preset mapping relationship is different from an address segment in the preset relationship before the updating.

3. The method of claim 2, wherein, The determining of whether the mapping conflict exists in each group in the mapping table within the preset time period comprises: obtaining a number of times of the mapping conflict occurring in each group in the mapping table within the preset time period; wherein the number of times of the mapping conflict occurring in the first group is a number of times that a memory access address mapped to the first group by using the preset mapping relationship does not match a physical memory region indicated by a memory block in the first group; in a case where the number of times of the mapping conflict occurring in the first group is greater than a first threshold value, determining that the first group exists the mapping conflict.

4. The method of claim 3, wherein, The updating of the preset mapping relationship in a case where the mapping conflict exists in at least one group in the mapping table within the preset time period comprises: in a case where a sum of the number of times of the mapping conflict occurring in each group in the mapping table is greater than a second threshold value, updating the preset mapping relationship.

5. The method according to any one of claims 2-4, characterized in that, The updating of the preset mapping relationship comprises: determining a second address segment with the highest frequency of change among a plurality of memory access addresses within the preset time period; updating the preset mapping relationship according to the second address segment; and the updated preset mapping relationship comprises a mapping relationship between the second address segment in a memory access address and a group in the mapping table.

6. The method according to any one of claims 2-4, characterized in that, The updating of the preset mapping relationship comprises: obtaining a first mapping set; the first mapping set comprises a plurality of candidate mapping relationships; updating the preset mapping relationship according to the first mapping set; wherein the updated preset mapping relationship is one of the plurality of candidate mapping relationships.

7. The method according to any one of claims 2-4, characterized in that, The method further comprises: In the case that there is no mapping conflict in each group of the mapping table within the preset time period, determining a hot page in a virtual memory page according to the memory block in the mapping table whose access frequency satisfies a preset condition.

8. The method of claim 7, wherein, In the case that there is no mapping conflict in each group of the mapping table within the preset time period, determining a hot page in a virtual memory page according to the memory block in the mapping table whose access frequency satisfies a preset condition, comprising: In the case that the sum of the number of times of the mapping conflict in each group of the mapping table is less than or equal to a second threshold, determining a hot page in a virtual memory page according to the memory block in the mapping table whose access frequency satisfies a preset condition; wherein the number of times of the mapping conflict in the first group is the number of times that the memory address mapped to the first group by using the preset mapping relationship does not match the physical memory region indicated by the memory block in the first group.

9. A hot page identification apparatus, characterized by comprising: The apparatus comprises: The obtaining module is configured to obtain an access frequency corresponding to each memory block in a mapping table; wherein the mapping table comprises a plurality of groups, each of the groups comprises a plurality of memory blocks, and each of the memory blocks is configured to indicate a physical memory region; the access frequency corresponding to a first memory block represents the number of times that the first memory block is used to map a first memory address to a physical memory region in response to a first memory access request within a preset time period; the first memory block is a memory block corresponding to the first memory address and determined according to a preset mapping relationship; the first memory address is a memory address indicated by the first memory access request; the preset mapping relationship comprises a mapping relationship between a first address segment in a memory address and a group in the mapping table; the first address segment comprises an address segment with the highest data change frequency among address segments indicated by a plurality of historical memory access requests; The identifying module is configured to determine a hot page in a virtual memory page according to a memory block in the mapping table whose access frequency satisfies a preset condition; different memory blocks in the mapping table correspond to different virtual memory pages; and the first memory access request is configured to apply for a virtual memory page corresponding to the first memory address.

10. A computing device, comprising: The computing device comprises a processor and a memory for storing processor-executable instructions; The processor is configured to execute the instructions, so that the computing device performs the hot page identification method according to any one of claims 1-8.

11. A computer program product, characterised in that, The computer program product comprises instructions which, when executed by a computing device, cause the computing device to perform the hot page identification method according to any one of claims 1-8.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium comprises computer program instructions which, when executed by a computing device, cause the computing device to perform the hot page identification method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Cold and hot page management acceleration device and method, MMU, processor and electronic device

    CN115794397A

  • Address mapping method, data processing method, device, equipment and medium

    CN116126749A

  • Cold and hot memory page identification method, memory recovery method and related equipment

    CN116860662A

  • System and method for providing page migration

    CN117120991A

  • Solid state disk address mapping method, device and product

    CN118170327A