A page table data compression method, address translation method, chip

By compressing page table data and storing it in cache blocks, the problems of page table lookup latency and cache capacity in the GPU memory management unit are solved, improving hit rate and address translation speed, and reducing chip area and power consumption.

CN116049038BActive Publication Date: 2026-11-20NANJING ILUVATAR COREX TECH CO LTD (DBA ILUVATAR COREX INC NANJING)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211557703.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-06
Publication Date
2026-11-20
Estimated Expiration
2042-12-06

AI Technical Summary

Technical Problem

In the GPU's memory management unit, the page table lookup process has a large latency, which affects system performance. Increasing the MMU page table cache capacity will bring chip area and power consumption issues. How to improve the page table hit rate without increasing the cache capacity is a challenge.

Method used

By compressing page table data, using compression rules and multiple compression algorithms, compressible data is determined based on the physical address and attribute characteristics of page table entries, and then stored in cache blocks, thereby improving cache utilization and address translation speed.

Benefits of technology

Without increasing cache capacity, the page table hit rate and address translation speed are improved, cache space usage is reduced, and chip area and power consumption are decreased.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116049038B_ABST
    Figure CN116049038B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a page table data compression method, an address conversion method and a chip. The page table data compression method is applied to a memory management unit, and comprises the following steps: if it is confirmed that to-be-cached page table data is compressible data, then the to-be-cached page table data is compressed according to a compression rule to obtain compressed data; and the compressed data is stored in a cache block on the memory management unit. Some embodiments of the application improve the page table data stored in the same cache block by compressing the page table data to be stored, thereby improving the hit rate of the memory management unit when address conversion is performed by using the cache data, and finally improving the address conversion speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of virtual address translation, and more specifically, embodiments of this application relate to a page table data compression method, an address translation method, and a chip. Background Technology

[0002] The Memory Management Unit (MMU) of a GPU processor supports functions such as virtual-to-physical address translation and multi-process space. It is an important unit for the GPU to achieve versatility and is a part of the close interaction between hardware and software.

[0003] Virtual memory addresses are translated from virtual addresses to physical addresses by the Memory Management Unit (MMU). The functions of the MMU are as follows: 1) Hiding and protection: User-mode programs can only access data in restricted memory areas, while other areas can only be accessed by kernel-mode programs. With the introduction of memory management, different programs appear to be using independent memory areas and do not affect each other. In addition, the paging memory management method has individual write protection for each page, and the kernel-mode operating system can prevent user programs from arbitrarily modifying their own code segments. 2) Allocating contiguous memory space for programs: The MMU can construct contiguous virtual memory space from scattered physical pages, managing physical memory allocation in units of pages. 3) Expanding the address space: In a 32-bit system, if only a linear mapping method of virtual and physical address mapping is used, the maximum physical memory space that can be accessed is 4GB, while through the MMU translation, a larger physical memory space can be accessed. 4) Saving physical memory: Programs can save physical memory through reasonable mapping. Paging memory management is a common and efficient method. The operating system divides the memory space into several fixed-size pages and maintains the mapping relationship between virtual page addresses and physical page addresses (i.e., page tables). Page size involves the granularity of page allocation and the space occupied by the page table. GPUs support various page sizes: 4KB / 16K / 64K / 2M / 32M / 512M / 1G. In this case, the virtual memory address can be represented by two parts: the virtual page address and the offset within the page. During address translation, the virtual page address is replaced with the physical page address by looking up a table to obtain the corresponding physical memory address.

[0004] The GPU's memory management unit uses a multi-level page table structure to translate virtual addresses into physical addresses. Figure 1 This is a diagram illustrating the translation of a 48-bit virtual address into a physical address based on a 4-level page table. Figure 1 It includes five virtual address ranges, of which the four most significant virtual address ranges (i.e., ...) Figure 1 The virtual address ranges 47:39, 38:30, 29:21, and 20:12 are used to point to the 4th level page table (i.e., ...). Figure 1The first-level page table, second-level page table, third-level page table, and fourth-level page table are used. Finally, the virtual address range 11:0 points to the physical address output by the physical address generation module. The base address also needs to be configured at the input of the first-level page table module.

[0005] During page table lookups, the actual virtual address range used by each level of the page table is different. In the example shown above, the virtual address range corresponding to the first-level page table is 47-39, the virtual address range corresponding to the second-level page table is 38-30, the virtual address range corresponding to the third-level page table is 29-21, and the range corresponding to the fourth-level page table is 20-12.

[0006] The following is a brief explanation of the address translation process of the 4-level page table in the diagram above: 1) When a virtual address is sent to the MMU, the first level page table is queried to obtain the first level page table.

[0007] 2) Based on the obtained first-level page table and the corresponding virtual address offset, issue a read request for the second-level page table and read back the second-level page table. 3) Based on the read-back second-level page table and the corresponding virtual address offset, issue a read request for the third-level page table and read back the third-level page table. 4) Based on the read-back third-level page table and the corresponding virtual address offset, issue a read request for the fourth-level page table and read back the fourth-level page table. 5) Select a page table entry from the fourth-level page table and combine it with the offset of the virtual address to form the physical address.

[0008] The complete 4-level page table address translation process requires four data reads from external storage. Since reading data from external storage incurs significant latency, it has a substantial impact on the overall system performance. Therefore, to reduce the performance impact of page table data read latency, such as... Figure 2The page table lookup circuit shown in the diagram allocates corresponding caches for each level of page table to store them. When the MMU performs virtual-to-physical address translation, each level of page table first performs a matching lookup in the cache allocated by the MMU. During the page table lookup process, the virtual address range corresponding to the page table generates an address identifier. The address identifier to be queried and its corresponding process ID are compared with the address identifier and process ID already stored in the cache. If the corresponding state is valid in the cache and the address identifier and process ID in the cache match the incoming virtual address, then the MMU finds a page table entry. If no entry is found, the current page table entry is refilled. If a match is found, the page size of the match entry and the virtual address to be queried determine which page the current virtual address falls on. The corresponding page table entry is read from multiple page table entries to obtain the physical base address of the next level page table. Then, a similar operation is performed on the next level page table, and so on until the last level page table. After reading the last-level page table, the final physical address can be generated based on the virtual address offset and the corresponding physical base address. During the MMU's page table lookup process, a page miss may occur. If a page miss occurs, the MMU needs to issue a page table refill request to read the data from external memory.

[0009] A larger page table cache capacity in the MMU generally translates to a higher hit rate. However, a larger cache capacity also introduces other problems, such as a larger chip area, higher power consumption, and lower chip yield. Balancing the MMU page table cache capacity with increasing the page table hit rate without significantly increasing the cache size is a key challenge in MMU design. Summary of the Invention

[0010] The purpose of this application is to provide a page table data compression method, an address translation method, and a chip. The embodiments of this application provide a page table compression-based technology that increases the storage page table capacity without changing the MMU page table cache capacity.

[0011] In a first aspect, embodiments of this application provide a page table data compression method applied to a memory management unit. The page table data compression method includes: if it is confirmed that the page table data to be cached is compressible data, then compressing the page table data to be cached according to compression rules to obtain compressed data; and storing the compressed data in a cache block on the memory management unit.

[0012] Some embodiments of this application improve the page table data stored on the same cache block by compressing the page table data that needs to be stored, thereby improving the hit rate of the memory management unit when using cache data for address translation, and ultimately improving the address translation speed.

[0013] In some embodiments, confirming that the page table data to be cached belongs to compressible data includes: determining that the page table data to be cached belongs to the compressible data based on the page table physical address characteristics and / or page table attribute characteristics of the multiple page table entries included in the page table data to be cached.

[0014] Some embodiments of this application determine whether the corresponding page table data is compressible by checking whether the physical addresses or page table attributes of multiple page table entries in the page table data have commonalities, thereby increasing the probability of successful data compression.

[0015] In some embodiments, the page table data to be cached includes multiple page table entries, and the compression rule is used to define the storage method for all physical addresses and page table attributes included in the page table data to be cached on the cache block.

[0016] The compression rules in some embodiments of this application are used to define the specific storage method for all physical addresses and page table attributes included in the page table data to be cached.

[0017] In some embodiments, the step of compressing the page table data to be cached according to compression rules to obtain compressed data includes: selecting a target compression algorithm from multiple compression algorithms based on the physical address characteristics and page table attribute characteristics of the page table data to be cached; and compressing the page table data to be cached according to compression rules corresponding to the target compression algorithm to obtain the compressed data.

[0018] Some embodiments of this application provide a variety of compression algorithms, each corresponding to a different compression rule, thereby improving the differentiated compression of various types of data and effectively adapting to the compression processing methods of various cached data to improve the versatility of the technical solution.

[0019] In some embodiments, selecting a target compression algorithm from multiple compression algorithms based on the physical address characteristics and page table attribute characteristics of the page table data to be cached includes: if the page table physical addresses of multiple adjacent page table entries included in the page table data to be cached are consecutive and the page table attributes are all first attributes, then confirming the first compression algorithm as the target compression algorithm; compressing the page table data to be cached according to the compression rules corresponding to the target compression algorithm to obtain the compressed data includes: using the first attribute as common page table attribute data of the multiple adjacent page table entries; using the physical address of any one of the multiple adjacent page table entries as the target physical address corresponding to the multiple adjacent page table entries; and using the common page table attribute data and the target physical address as the compressed data.

[0020] Some embodiments of this application merge multiple page table entries with the same page table attributes and consecutive physical addresses into one page table entry. In the merged page table entry, a first attribute is used as the common page table attribute of these page table entries, and a physical address is used to represent multiple consecutive physical addresses in the merged page table entry. Then, through the storage compression rules, other physical addresses among the multiple consecutive physical addresses can be obtained based on the physical address during decompression.

[0021] In some embodiments, confirming that a target compression algorithm corresponding to the page table data to be cached exists among multiple compression algorithms includes: if the page table attributes of multiple page table entries included in the page table data to be cached are all second attributes and the interval range of the physical offset addresses corresponding to each page table entry in the multiple page table entries is less than a first threshold, then confirming that the second compression algorithm is the target compression algorithm; the step of compressing the page table data to be cached according to the compression rules of the target compression algorithm to obtain compressed data includes: using the second attribute as the common page table attribute data of the multiple page table entries; determining the physical base address of all physical addresses included in the multiple page table entries, wherein the physical base address is the same data bit of all physical addresses; determining the physical offset address of each physical address in the multiple page table entries relative to the physical base address, wherein the physical offset address is obtained based on the physical base address; and using the common page table attribute data, the physical base address, and each physical offset address as the compressed data.

[0022] Some embodiments of this application contain common attributes corresponding to each entry, a physical base address, and the offset of the physical base address corresponding to the physical address in each page table entry. Compared with the scheme of directly storing the page table entry data to be cached, this reduces the required cache space.

[0023] In some embodiments, confirming that a target compression algorithm corresponding to the page table data to be cached exists among multiple compression algorithms includes: if the page table attributes of multiple page table entries included in the page table data to be cached all include the same first part and the interval range of the physical offset addresses corresponding to each page table entry is less than a second threshold, then confirming that a third compression algorithm is the target compression algorithm; the step of compressing the page table data to be cached according to the compression rules of the target compression algorithm includes: using the first part as the common page table attribute data of the multiple page table entries; using the remaining part of the page table attribute data of each page table entry in the multiple page table entries, excluding the first part, as the independent part of the corresponding page table entry, to obtain multiple independent page table attribute data; determining the physical base address corresponding to the physical address of the multiple page table entries; determining the physical offset address of the physical address of the multiple page table entries relative to the physical base address, to obtain multiple physical address offsets; and using the common page table attribute data, the multiple independent page table attribute data, the physical base address, and each physical offset address as the compressed data.

[0024] The compressed data in some embodiments of this application includes some common attributes corresponding to each entry, a physical base address, the offset of the physical address corresponding to the physical base address in each page table entry, and the unique attributes of each page table entry, thereby reducing the cache space occupied by the page table data to be cached.

[0025] In some embodiments, confirming that a target compression algorithm corresponding to the page table data to be cached exists among multiple compression algorithms includes: if the page table data to be cached includes multiple page table entries whose page table attributes have no common parts and the interval range of the physical offset addresses corresponding to each page table entry is less than a third threshold, then confirming that a fourth compression algorithm is the target compression algorithm; the step of compressing the compressible data according to the compression rules of the target compression algorithm includes: determining the physical base address corresponding to all physical addresses of the multiple page table entries; determining the physical offset address of the physical address of the multiple page table entries relative to the physical base address to obtain multiple physical offset addresses; and using the page table attributes of each of the multiple page table entries, the physical base address, and the multiple physical offset addresses as the compressed data.

[0026] The compressed data in some embodiments of this application includes a physical base address, the offset of the physical address corresponding to the physical base address in each page table entry, and all attributes of each page table entry, thereby reducing the cache space occupied by the page table data to be cached. Some embodiments of this application also require determining whether the physical address is compressible for multiple page table entries with no common content in their page table attributes, thereby improving the compression effect on this type of data.

[0027] In some embodiments, the cache block is also used to store the compression principles of the target compression algorithm for decompression according to the compression principles.

[0028] In some embodiments of this application, compressed data is used to store page table data to be cached. Therefore, when these data are needed for address translation, they need to be decompressed first. Thus, the corresponding compression rules need to be stored in the cache block.

[0029] In some embodiments, selecting a target compression algorithm from multiple compression algorithms based on the physical address characteristics and page table attribute characteristics of the page table data to be cached includes: if it is determined that multiple algorithms can compress the compressible data based on the physical address characteristics and page table attribute characteristics of the page table data to be cached, then the target compression algorithm is determined according to the following priority order: a first compression algorithm, a second compression algorithm, a third compression algorithm, and a fourth compression algorithm. The first compression algorithm is used to compress data where the physical addresses of multiple adjacent page table entries are consecutive and the page table attributes are all of the first attribute. The second compression algorithm is used to compress data where the page table attributes of multiple page table entries are all of the second attribute and the interval range of the physical offset addresses included in each page table entry is less than a first threshold. The third compression algorithm is used to compress data where the page table attributes of multiple page table entries all include the same first part and the interval range of the physical offset addresses corresponding to each page table is less than a second threshold. The fourth compression algorithm is used to compress data where the page table attributes of multiple page table entries have no common part and the interval range of the physical offset addresses corresponding to each page table is a third threshold.

[0030] In some embodiments of this application, if it is confirmed that multiple compression algorithms can be used to compress the page table data to be cached, the corresponding target compression algorithm is selected according to the above priority rules, which can maximize the compression effect on the same data.

[0031] Secondly, some embodiments of this application provide a virtual address translation method, the virtual address translation method comprising: decompressing compressed data obtained by the compression method described in any embodiment of the first aspect to obtain decompressed page table data; and performing virtual address translation based on the decompressed page table data.

[0032] Thirdly, some embodiments of this application provide a page table compression device, the page table compression device comprising: a compression processing module configured to, if it is confirmed that the page table data to be cached is compressible data, compress the page table data to be cached according to compression rules to obtain compressed data; and a storage module configured to store the compressed data into a cache block on the memory management unit.

[0033] Fourthly, some embodiments of this application provide a virtual address translation device, the virtual address translation device comprising: a decompression module configured to decompress compressed data after the page table data to be cached has been compressed, to obtain decompressed page table data; and an address translation module configured to perform virtual address translation based on the decompressed page table data.

[0034] Fifthly, some embodiments of this application provide a memory management device, the memory management device comprising: a reading module configured to read page table data to be cached from system memory; a compression processing module configured to: if it is confirmed that the page table data to be cached is compressible data, then compress the page table data to be cached according to compression rules to obtain compressed data; and at least one cache block configured to cache the compressed data.

[0035] Sixthly, some embodiments of this application provide a chip that includes the memory management device as described in any embodiment of the fifth aspect. Attached Figure Description

[0036] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 A schematic diagram illustrating the process of address translation using multi-level page tables based on multi-bit virtual addresses, provided for related technologies; Figure 2 A schematic diagram illustrating the address translation process based on a multi-level page table of a cache, provided for related technologies; Figure 3 A schematic diagram of the structure of a 64-bit page table entry provided in an embodiment of this application; Figure 4 A flowchart illustrating the page table data compression method provided in this application embodiment; Figure 5 A block diagram illustrating the composition of the page table compression apparatus provided in the embodiments of this application; Figure 6 A block diagram illustrating the composition of the virtual address translation apparatus provided in the embodiments of this application; Figure 7 This is a block diagram of the memory management device provided in the embodiments of this application. Detailed Implementation

[0038] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0039] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0040] This application provides a page table compression-based technique to increase the storage page table capacity without changing the page table cache capacity of the memory management unit (MMU). The algorithms in some embodiments of this application mainly include the following aspects: 1. Compression is performed based on page table cache blocks. After page table compression, the number of page tables that can be stored in the cache block increases compared to before compression. 2. If page table compression in the cache block fails, the current cache block remains uncompressed. 3. The physical addresses and page table attributes in the page table entries are compressed separately. 4. When multiple page table compression methods are successful, the storage format with the highest compression ratio is selected. 5. Page tables at all levels are compressed.

[0041] Figure 3 An example page table entry is provided, but the actual practice is not limited to this definition. Figure 3 63:12 represents the storage range occupied by the physical address, which is 4K aligned. Figure 3 11:2 represents various page table attributes. Figure 3 The 1:1 ratio is used to indicate whether it is a directory page table. Figure 3 A 0:0 indicates whether the page table is valid. Page table attributes can be customized according to the design, typically including read attributes, write attributes, privileged attributes, page table contiguous attributes, etc. Other attributes can be added according to design requirements. The page table type indicates whether it is the last-level page table. For example, in some embodiments of this application, each cache block in the MMU cache is defined with a capacity of 512 bits (not limited to this capacity), which can store 8 page tables without compression. With compression, at least 16 page tables or 16 directory page tables can be stored.

[0042] The compression process described below in some embodiments of this application also employs... Figure 3 This will be illustrated using page table entries as an example.

[0043] Please refer to Figure 4 , Figure 4This application provides a page table data compression method applied to a memory management unit. The method includes: S101, if it is confirmed that the page table data to be cached is compressible, then compressing the page table data according to compression rules to obtain compressed data; S102, storing the compressed data in a cache block on the memory management unit. In other words, some embodiments of this application improve the page table data stored in the same cache block by compressing the page table data that needs to be stored, thereby improving the hit rate of the memory management unit when using cached data for address translation, and ultimately improving the address translation speed.

[0044] Understandably, if the page table data to be cached is determined to be incompressible, then the page table data to be cached will not be compressed, but will be stored as is.

[0045] It should be noted that some embodiments of this application are analyzed as follows: Figure 3 The compression strategy is determined by whether the multiple page table entries share common characteristics. For example, in some embodiments of this application, the process of confirming that the page table data to be cached belongs to compressible data in S101 includes: determining that the page table data to be cached belongs to the compressible data based on the page table physical address characteristics and / or page table attribute characteristics of the multiple page table entries included in the page table data to be cached. That is, in some embodiments of this application, it can be determined whether the data is compressible based on the physical address characteristics of the multiple page table entries included in the page table data to be cached; in some embodiments of this application, it can be determined whether the page table attribute data is compressible based on the page table attribute characteristics of the multiple page table entries; and in some embodiments of this application, it can be determined whether the data is compressible based on the page table attribute characteristics and physical address characteristics of the multiple page tables.

[0046] In other words, some embodiments of this application determine whether the corresponding page table data is compressible by whether the physical addresses or page table attributes of multiple page table entries in the page table data have commonalities, thereby increasing the probability of successful data compression.

[0047] It is understood that in some embodiments of this application, the page table data to be cached in S101 includes multiple page table entries, and the compression rule in S101 is used to define the storage method for all physical addresses and page table attributes included in the page table data to be cached on the cache block. In other words, the compression rule in some embodiments of this application is used to define the specific storage method for all physical addresses and page table attributes included in the page table data to be cached.

[0048] Some embodiments of this application provide various compression algorithms to improve the compression efficiency of multiple types of page table data to be cached. For example, in some embodiments of this application, the process of compressing the page table data to be cached according to compression rules in step S101 to obtain compressed data includes, for example: The first step is to select a target compression algorithm from multiple compression algorithms based on the physical address characteristics and page table attribute characteristics of the page table data to be cached.

[0049] The second step is to compress the page table data to be cached according to the compression rules corresponding to the target compression algorithm to obtain the compressed data.

[0050] Some embodiments of this application provide a variety of compression algorithms, each corresponding to a different compression rule, thereby improving the differentiated compression of various types of data and effectively adapting to the compression processing methods of various cached data to improve the versatility of the technical solution.

[0051] The following examples illustrate various compression algorithms provided by some embodiments of this application.

[0052] Example 1 In some embodiments of this application, the first step of selecting a target compression algorithm from multiple compression algorithms based on the physical address characteristics and page table attribute characteristics of the page table data to be cached includes, for example, the following steps: if the physical addresses of multiple adjacent page table entries included in the page table data to be cached are consecutive and the page table attributes are all the first attribute, then the first compression algorithm is confirmed as the target compression algorithm; the second step of compressing the page table data to be cached according to the compression rules corresponding to the target compression algorithm to obtain the compressed data includes, for example, (i.e., the compression process of the first compression algorithm): using the first attribute as the common page table attribute data of the multiple adjacent page table entries; using the physical address of any one of the multiple adjacent page table entries as the target physical address corresponding to the multiple adjacent page table entries; and using the common page table attribute data and the target physical address as the compressed data.

[0053] In other words, some embodiments of this application merge multiple page table entries with the same page table attributes and consecutive physical addresses into one page table entry. In the merged page table entry, a first attribute is used as the common page table attribute of these page table entries, and a physical address is used to represent multiple consecutive physical addresses in the merged page table entry. Then, through the storage compression rules, other physical addresses among the multiple consecutive physical addresses can be obtained according to the physical address during decompression.

[0054] It is understandable that Example 1 of this application is based on compression using the contiguous physical addresses of page table entries and shared page table attributes. These page table data to be cached, i.e., the consecutive page table entries being read, also have contiguous physical addresses and consistent page table attributes. Contiguous physical addresses of page table entries mean that the page tables are contiguous, and the physical addresses within those page tables are also contiguous. For example, if the physical address of the first page table entry is A, then the physical address of the second consecutive page table entry is (A+1), and the physical address of the nth page table entry is (A+n-1). Simultaneously, since the attributes of each page table are identical, this compression method is used.

[0055] The following example illustrates the compression process of Example 1 using 16 page table entries as an example. 16 page tables (each page table is 64 bits) are read. Since the physical addresses of two consecutive page tables are adjacent, 512 bits of space can store 16 page tables. If every four entries are adjacent, then 512 bits of space can hold 32 page tables. Table 1 shows the compression format based on the premise that every two page tables have adjacent physical addresses and identical attributes.

[0056] Table 1

[0057] It should be noted that the compression format (i.e., compression rule) of page tables 1-8 stored in the above cache block is the compression method of Example 1. Based on this compression format, subsequent decompression can be completed to obtain the data before compression, so as to complete the address translation based on the data before compression.

[0058] Example 2 In some embodiments of this application, the first step of confirming that a target compression algorithm corresponding to the page table data to be cached exists among multiple compression algorithms includes, for example, the following steps: if the page table attributes of multiple page table entries included in the page table data to be cached are all second attributes and the interval range of the physical offset addresses included in each page table entry is less than a first threshold, then the second compression algorithm is confirmed as the target compression algorithm. Correspondingly, the second step of compressing the page table data to be cached according to the compression rules of the target compression algorithm to obtain compressed data includes, for example, the following steps: using the second attribute as common page table attribute data for the multiple page table entries; determining the physical base address of all physical addresses included in the multiple page table entries, wherein the physical base address is the same data bit of all physical addresses; determining the physical offset address of each physical address in the multiple page table entries, wherein the physical offset address is obtained based on the physical base address; and using the common page table attribute data, the physical base address, and each physical offset address as the compressed data.

[0059] The following example illustrates the algorithm for confirming the physical base address in the second compression algorithm in some embodiments of this application.

[0060] In some embodiments of the second compression algorithm of this application, the attributes of each page table entry are completely identical. In this example, assuming each page table entry is 64 bits, the eight incoming page table entries are shown in Table 2 below: Table 2 Each page table entry is 64 bits, containing physical address 63:12, attribute 11:1, and 1 significant bit. Eight page table entries total 512 bits.

[0061] Assuming that 11 bits of the page table attributes are shared, and 1 bit is used to indicate data validity (this bit does not need to be stored), then the physical base address is determined first. In this case, the physical base address is the physical address [51:41] in the page table entry. The compression condition must be met: the physical addresses [51:41] of each page table entry must be the same, and bits [63:52] must be 0. Therefore, the physical memory address width cannot exceed 52 bits. A 52-bit memory address can cover 4096T, which is sufficient.

[0062] In this case, as long as the physical addresses 51:41 in each page table entry are consistent, this physical address [51:41] will be the physical base address used for compression. If the attributes in each page table entry are consistent, then compression can be performed as follows, storing eight 64-bit page table entries within 256 bits.

[0063] The compressed data is shown in Table 3: Table 3

[0064] The algorithm for decompressing the nth PTE is as follows: The nth PTE = { 12'd0, Physical base address [51:41], Page table entry n offset [40:12], Page table entries share the attribute [9:0]. 1 significant bit} In this example, the first threshold is 2^29 (aligned to 4K), the physical address offset of the page table entry is less than 2^29 (aligned to 4K), all attributes are consistent, and the effective physical memory address is no more than 52 bits, this method can be used.

[0065] In other words, some embodiments of this application use a page table attribute data as page table attribute data shared by multiple page table entries, and store the physical address of each page table entry by determining the physical base address and physical offset address of the multiple page table entries. Therefore, compared with storing the shared page table attributes once for each page table entry and storing each physical address composed of the physical base address and physical offset address separately, the technical solution of this application improves compression efficiency by storing the common part of multiple page table entries for multiple page table entries to share.

[0066] It is understandable that the compression algorithm in Example 2 is based on the physical base address offset and consistent page table attributes. Specifically, the page table data to be cached that can be compressed using Example 2 is characterized by multiple page table entries having consistent page table attributes, and the physical offset address intervals corresponding to each page table entry being less than a certain range. In this example, the address offset range is less than 2T, and the external storage capacity is less than 4096T bytes, making this compression format suitable. In some embodiments of this application, the compressed data, i.e., the compressed page table, only stores shared attribute addresses, shared physical base addresses, and the physical offset addresses corresponding to each page table entry.

[0067] For example, the physical addresses in the compressed page table of Example 2 of this application are split in the following format: Page table physical address [63:12] = {12'd0, Page table physical address [51:41], Page table physical address [40:12]}; Page table physical address [51:41] serves as the shared physical address base address; Page table physical address [40:12] serves as the physical address offset of each page table. Table 4 shows the storage format in a 512-bit cache entry (not limited to a 512-bit cache entry), where 16 page tables totaling 1024 bits are stored in 512 bits.

[0068] Table 4

[0069] Table 4 above also stores the compression format, i.e., compression rules, for multiple page table entries. These rules are used for subsequent decompression of the compressed data. The physical address offset length in Table 4 is aligned to 4KB. Under this compression, a 52-bit physical address width is supported. 51:12 represents the physical address width, so 63:52 is 0, and the valid data is 51:12. Under this compression method, the high-order physical address bits [51:41] of each page table entry must remain consistent; this is the physical base address. The physical addresses [40:12] of each page table entry can be different; this is the physical address offset. The physical address base address combined with the physical address offsets of each entry constitutes the physical address of that entry.

[0070] Example 3 In some embodiments, the first step of confirming that there is a target compression algorithm among the multiple compression algorithms corresponding to the page table data to be cached includes, for example, the following steps: if the page table attributes of the multiple page table entries included in the page table data to be cached all include the same first part and the interval range of the physical offset addresses corresponding to each page table entry is less than a second threshold, then the third compression algorithm is confirmed as the target compression algorithm; the second step of compressing the page table data to be cached according to the compression rules of the target compression algorithm includes, for example, the following steps: using the first part as the common page table attribute data of the multiple page table entries; using the remaining part of the page table attribute data of each page table entry in the multiple page table entries, excluding the first part, as the independent part of the corresponding page table entry, to obtain multiple independent page table attribute data; determining the physical base address corresponding to the physical address of the multiple page table entries; determining the physical offset address of the physical address of the multiple page table entries relative to the physical base address, to obtain multiple physical address offsets; and using the common page table attribute data, the multiple independent page table attribute data, the physical base address, and each physical offset address as the compressed data.

[0071] The method for determining the physical base address in the third compression algorithm is illustrated below with a specific example.

[0072] In some embodiments of this application, the third compression algorithm has some consistent attributes and some inconsistent attributes. Inconsistent attributes cannot be compressed and must all be stored. In this example, assuming each page table entry is 64 bits, the eight incoming page table entries are shown in Table 5: Table 5 Each page table entry is 64 bits, containing physical address 63:12, attribute 11:1, and 1 significant bit. Sixteen page table entries total 512 bits.

[0073] Assuming that 6 bits of the page table attributes are shared, 5 bits are unique, and 1 bit is used to indicate that the data is valid and does not need to be stored, the first step is to determine the physical base address. In this case, the physical base address is the physical address [63:37] in the page table entry. For compression to be successful, the physical addresses [63:37] of all page table entries must be the same, and bits [63:44] must be 0. Therefore, the physical address memory address bit width cannot exceed 44 bits. Otherwise, compression is impossible. With current memory capacity, a 44-bit memory address can cover 16TB of capacity, so 44 bits is usually sufficient.

[0074] In this case, as long as the physical addresses 43:37 in each page table entry are consistent, this physical address [43:37] is the physical base address used for compression. If 6 bits of the attributes in each page table entry are consistent, then compression can be performed as follows to store 8 64-bit page table entries within 256 bits. The compressed data is shown in Table 6 below: Table 6

[0075] The algorithm for decompressing the nth PTE is as follows: The nth PTE = { 20'd0, Physical base address [43:38], Page table entry n offset [37:12], Page table entry n has a unique attribute [4:0]. Page table entries share the attribute [5:0]. 1 significant bit} In this example, the second threshold is 2^25 (aligned to 4K), the physical address offset of the page table entry is less than 2^25 (aligned to 4K), and the attribute parts are consistent. The effective bit width of the physical memory address is no more than 44 bits. This method can be used.

[0076] In other words, some embodiments of this application use multiple page table attribute data with partially identical content as compression objects, and use the physical addresses of multiple page table entries whose page table physical address offsets are within a certain range as compression objects. For example, if multiple page table attribute data have partially identical content, the extracted common attribute part is stored as the common content of multiple page table entries once, and the independent attribute parts of each page table entry's page table attributes other than the common attribute data are stored separately. The physical addresses of multiple page table entries are represented as a common page table base address and the physical offset address of each page table entry relative to this base address, which significantly improves the compression effect of this type of page table data.

[0077] It should be noted that Example 3 above is based on compression of physical base address offset and some common attributes. For example, in some embodiments of this application, the page table attributes of the page table data to be cached, i.e., the page table entries read from memory, are not completely consistent, and the physical offset address interval corresponding to the physical address of each page table entry is less than 128G, and the external storage capacity is less than 32T bytes, so this compression format can be applied. The page table corresponding to the compressed data in some embodiments of this application is used to store the page table attributes shared by each page table entry, the inconsistent page table attributes included by each page table entry, the physical base address shared by the page table entries, and the physical offset address corresponding to each page table entry.

[0078] For example, in some embodiments of this application, the physical addresses in the page tables corresponding to the compressed data are split in the following format: page table physical address [63:12] = {20'd0, page table physical address [44:37], page table physical address [36:12]}; page table physical address [44:37] is used as a shared physical address base address; page table physical address [36:12] is used as the physical address offset of each page table; page table attributes [11:2] are partially shared and partially not shared.

[0079] Table 7 shows the storage format in a 512-bit cache entry (not limited to 512-bit cache entries). The 512-bit cache stores 16 page tables totaling 1024 bits. The common attribute here is assumed to be 5 bits.

[0080] Table 7

[0081] Table 7 above also stores the compression format, i.e., compression rules, for multiple page table entries, which are used for subsequent decompression of the compressed data.

[0082] Example 4 In some embodiments of this application, the first step of confirming that there is a target compression algorithm among multiple compression algorithms that corresponds to the page table data to be cached includes, for example, the following steps: if the page table data to be cached includes multiple page table entries whose page table attributes have no common parts and the interval range of the physical offset addresses corresponding to each page table entry is less than a third threshold, then the fourth compression algorithm is confirmed as the target compression algorithm; the second step of compressing the compressible data according to the compression rules of the target compression algorithm includes, for example, the following steps: determining the physical base address corresponding to all physical addresses of the multiple page table entries; determining the physical offset address of the physical address of the multiple page table entries relative to the physical base address, thereby obtaining multiple physical offset addresses; and using the page table attributes of each of the multiple page table entries, the physical base address, and the multiple physical offset addresses as the compressed data.

[0083] In other words, some embodiments of this application require determining whether the physical address is compressible for multiple page table entries with no common content in the page table attributes, thereby improving the compression effect of such data.

[0084] Example 4 of this application is based on compression using physical base address offset and without shared attributes. For example, the page table data to be cached in Example 4, i.e., the page table being read, has no shared page table attributes, the offset address interval of the physical address corresponding to each page table entry is less than 8G, and the external storage capacity is less than 256G bytes, making this compression format applicable. The page table of the compressed data storage has the following attributes: each page table stores its own page table attributes, the physical base address shared by the page tables, and the physical offset address corresponding to each page table. For example, the physical address in the page table is split in the following format: page table physical address [63:12] = {26'd0, page table physical address [37:33], page table physical address [32:12]}; page table physical address [37:33] is used as the shared physical address base address; page table physical address [32:12] is used as the physical address offset of each page table; page table attributes [11:2] are all saved.

[0085] Table 8 shows the storage format in a 512-bit cache entry (not limited to 512-bit cache entries). The 512 bits store 16 page tables totaling 1024 bits, and the shared attributes are assumed to be 11 bits.

[0086] Table 8

[0087] Table 8 above also stores the compression format, i.e., compression rules, for multiple page table entries, which are used for subsequent decompression of the compressed data.

[0088] It is understood that, in order to decompress the compressed data, in some embodiments of this application, the cache block is also used to store the compression principles of the target compression algorithm, so as to decompress the data according to the compression principles. That is to say, in some embodiments of this application, since the compressed data is used to store page table data to be cached, when these data are needed for address translation, these data need to be decompressed first. Therefore, the corresponding compression rules need to be stored in the cache block.

[0089] It should be noted that the compression algorithms mentioned in the four examples above prioritize compression based on contiguous physical addresses and shared attributes in the page table, followed by compression based on physical base address offset and consistent attributes, then compression based on physical base address offset and partially consistent attributes, and finally compression based on physical address offset and no shared attributes. If no compression scheme is available, the data is stored uncompressed. In some embodiments of this application, the physical base address is the high-order bit of the physical address. If compression can be achieved, the high-order bits of the physical address of each page table entry are consistent, and the physical address offset is the low-order bit of the physical address of each page table entry. The physical address of each page table entry is a combination of the shared physical base address and the physical address offset of each page table entry.

[0090] In other words, in some embodiments of this application, the step of selecting a target compression algorithm from multiple compression algorithms based on the physical address characteristics and page table attribute characteristics of the page table data to be cached includes: if it is determined that multiple algorithms can compress the compressible data based on the physical address characteristics and page table attribute characteristics of the page table data to be cached, then the target compression algorithm is determined according to the following priority order: a first compression algorithm, a second compression algorithm, a third compression algorithm, and a fourth compression algorithm. The first compression algorithm is used to compress data where the physical addresses of multiple adjacent page table entries are consecutive and the page table attributes are all of the first attribute. The second compression algorithm is used to compress data where the page table attributes of multiple page table entries are all of the second attribute and the interval range of the physical offset addresses included in each page table entry is less than a first threshold. The third compression algorithm is used to compress data where the page table attributes of multiple page table entries all include the same first part and the interval range of the physical offset addresses corresponding to each page table is less than a second threshold. The fourth compression algorithm is used to compress data where the page table attributes of multiple page table entries have no common part and the interval range of the physical offset addresses corresponding to each page table is a third threshold.

[0091] In some embodiments of this application, if it is confirmed that multiple compression algorithms can be used to compress the page table data to be cached, the corresponding target compression algorithm is selected according to the above priority rules, which can maximize the compression effect on the same data.

[0092] It is easy to understand that the MMU in some embodiments of this application stores page tables by compressing them, compressing page tables at all levels, thereby increasing the capacity of the MMU page table cache. Some embodiments of this application involve the following algorithms for MMU page table compression: a. Compression based on contiguous physical addresses and shared attributes (i.e., the first compression algorithm); b. Compression based on consistent physical base addresses and attributes (i.e., the second compression algorithm); c. Compression based on partially consistent physical base addresses and attributes (i.e., the third compression algorithm); d. Compression based on physical addresses and no shared attributes (the fourth compression algorithm). Some embodiments of this application also provide principles for selecting a compression strategy based on priority when cached page table data satisfying multiple compression algorithms is processed.

[0093] Some embodiments of this application provide a virtual address translation method, which includes: decompressing compressed data obtained as described in any embodiment of the page table data compression method above to obtain decompressed page table data; and performing virtual address translation based on the decompressed page table data.

[0094] like Figure 5As shown, some embodiments of this application provide a page table compression device, which includes: a compression processing module 101 configured to compress the page table data to be cached according to compression rules to obtain compressed data if it is confirmed that the page table data to be cached is compressible data; and a storage module 102 configured to store the compressed data in a cache block on the memory management unit.

[0095] For details on the implementation of this device, please refer to the description of the corresponding method section above. To avoid repetition, we will not go into further detail here.

[0096] like Figure 6 As shown, some embodiments of this application provide a virtual address translation device, which includes: a decompression module 201 configured to decompress compressed data (i.e., compressed data obtained by the above-described page table data compression method) after the page table data to be cached has been compressed, to obtain decompressed page table data; and an address translation module 202 configured to complete virtual address translation based on the decompressed page table data.

[0097] For details on the implementation of this device, please refer to the description of the corresponding method section above. To avoid repetition, we will not go into further detail here.

[0098] like Figure 7 As shown, some embodiments of this application provide a memory management device, which includes: a reading module 301 configured to read page table data to be cached from system memory; a compression processing module 302 configured to: if it is confirmed that the page table data to be cached is compressible data, then compress the page table data to be cached according to compression rules to obtain compressed data; and at least one cache block 303 configured to cache the compressed data.

[0099] The compression processing module 302 described above can be implemented in either software or hardware, and the implementation logic of this module can refer to the processing procedure of the page table data compression method described above.

[0100] For details on the implementation of this device, please refer to the description of the corresponding method section above. To avoid repetition, we will not go into further detail here.

[0101] Some embodiments of this application provide a chip, the chip comprising, as shown in the following... Figure 7 The memory management unit (MMU) shown is shown.

[0102] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0103] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0104] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0105] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0106] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0107] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A page table data compression method, applied to a memory management unit, characterized in that, The page table data compression method includes: If it is confirmed that the page table data to be cached is compressible, then the page table data to be cached is compressed according to the compression rules to obtain compressed data; The compressed data is stored in a cache block on the memory management unit; The confirmation that the page table data to be cached is compressible data includes: Based on the page table physical address characteristics and / or page table attribute characteristics of the multiple page table entries included in the page table data to be cached, it is determined that the page table data to be cached belongs to the compressible data; The step of compressing the page table data to be cached according to compression rules to obtain compressed data includes: Based on the physical address characteristics and page table attribute characteristics of the page table data to be cached, a target compression algorithm is selected from multiple compression algorithms; The compressed data is obtained by compressing the page table data to be cached according to the compression rules corresponding to the target compression algorithm; The step of selecting a target compression algorithm from multiple compression algorithms includes: If the page table attributes of the multiple page table entries included in the page table data to be cached are all the second attribute and the interval range of the physical offset addresses corresponding to each page table entry in the multiple page table entries is less than the first threshold, then the second compression algorithm is confirmed as the target compression algorithm. The step of compressing the page table data to be cached according to the compression rule corresponding to the target compression algorithm to obtain the compressed data includes: The second attribute is used as the shared page table attribute data for the plurality of page table entries; Determine the physical base address of all physical addresses included in the plurality of page table entries, wherein the physical base address is the same data bit position of all physical addresses; Determine the physical offset address of each physical address in the plurality of page table entries relative to the physical base address; The shared page table attribute data, the physical base address, and each physical offset address are used as the compressed data.

2. The page table data compression method as described in claim 1, characterized in that, The page table data to be cached includes multiple page table entries, and the compression rule is used to define the storage method for all physical addresses and page table attributes included in the page table data to be cached on the cache block.

3. The page table data compression method as described in claim 1, characterized in that, The step of selecting a target compression algorithm from multiple compression algorithms based on the physical address characteristics and page table attribute characteristics of the page table data to be cached includes: If the page table physical addresses of multiple adjacent page table entries included in the page table data to be cached are consecutive and the page table attributes are all the first attribute, then the first compression algorithm is confirmed as the target compression algorithm. The step of compressing the page table data to be cached according to the compression rule corresponding to the target compression algorithm to obtain the compressed data includes: The first attribute is used as the common page table attribute data of the multiple adjacent page table entries; The physical address of any one of the multiple adjacent page table entries is used as the target physical address corresponding to the multiple adjacent page table entries; The common page table attribute data and the target physical address are used as the compressed data.

4. The page table data compression method as described in claim 1, characterized in that, The step of selecting a target compression algorithm from multiple compression algorithms further includes: If the page table attributes of multiple page table entries included in the page table data to be cached all include the same first part and the interval range of the physical offset addresses corresponding to each page table entry is less than the second threshold, then the third compression algorithm is confirmed as the target compression algorithm. The step of compressing the page table data to be cached according to the compression rule corresponding to the target compression algorithm to obtain the compressed data includes: The first part is used as the shared page table attribute data of the plurality of page table entries; The remaining part of the page table attribute data of each page table entry, excluding the first part, is taken as the independent part of the corresponding page table entry to obtain multiple independent page table attribute data. Determine the physical base address corresponding to the physical address of the plurality of page table entries; Determine the physical offset address of the physical address of the plurality of page table entries relative to the physical base address to obtain a plurality of physical address offsets; The shared page table attribute data, the multiple independent page table attribute data, the physical base address, and each physical offset address are used as the compressed data.

5. The page table data compression method as described in claim 1, characterized in that, The step of selecting a target compression algorithm from multiple compression algorithms further includes: If the page table data to be cached includes multiple page table entries whose page table attributes have no common part and the interval range of the physical offset addresses corresponding to each page table entry is less than the third threshold, then the fourth compression algorithm is confirmed as the target compression algorithm. The step of compressing the page table data to be cached according to the compression rule corresponding to the target compression algorithm to obtain the compressed data includes: Determine the physical base address corresponding to all physical addresses of the plurality of page table entries; Determine the physical offset address of the physical address of the plurality of page table entries relative to the physical base address to obtain a plurality of physical offset addresses; The page table attributes of each of the plurality of page table entries, the physical base address, and the plurality of physical offset addresses are used as the compressed data.

6. The page table data compression method according to any one of claims 3-5, characterized in that, The cache block is also used to store the compression principles of the target compression algorithm, so as to decompress the data according to the compression principles.

7. The page table data compression method as described in claim 1, characterized in that, The step of selecting a target compression algorithm from multiple compression algorithms based on the physical address characteristics and page table attribute characteristics of the page table data to be cached includes: If, based on the physical address characteristics and page table attribute characteristics of the page table data to be cached, multiple algorithms are determined to be capable of compressing the compressible data, then the target compression algorithm is determined according to the following priority order: a first compression algorithm, a second compression algorithm, a third compression algorithm, and a fourth compression algorithm. The first compression algorithm is used to compress data where the physical addresses of multiple adjacent page table entries are consecutive and the page table attributes are all of the first attribute. The second compression algorithm is used to compress data where the page table attributes of multiple page table entries are all of the second attribute and the interval range of the physical offset addresses included in each page table entry is less than a first threshold range. The third compression algorithm is used to compress data where the page table attributes of multiple page table entries all include the same first part and the interval range of the physical offset addresses corresponding to each page table is less than a second threshold. The fourth compression algorithm is used to compress data where the page table attributes of multiple page table entries have no common part and the interval range of the physical offset addresses corresponding to each page table is within a third threshold range.

8. A virtual address translation method, the virtual address translation method comprising: Decompress the compressed data obtained by the compression method as described in any one of claims 1-7 to obtain decompressed page table data; Virtual address translation is performed based on the decompressed page table data.

9. A page table compression device, characterized in that, The page table compression device includes: The compression processing module is configured to, if it is confirmed that the page table data to be cached is compressible data, compress the compressible data according to the compression rules to obtain compressed data. The storage module is configured to store the compressed data into a cache block on the memory management unit; The step of compressing the page table data to be cached according to compression rules to obtain compressed data includes: Based on the physical address characteristics and page table attribute characteristics of the page table data to be cached, a target compression algorithm is selected from multiple compression algorithms; The compressed data is obtained by compressing the page table data to be cached according to the compression rules corresponding to the target compression algorithm; The step of selecting a target compression algorithm from multiple compression algorithms includes: If the page table attributes of the multiple page table entries included in the page table data to be cached are all the second attribute and the interval range of the physical offset addresses corresponding to each page table entry in the multiple page table entries is less than the first threshold, then the second compression algorithm is confirmed as the target compression algorithm. The step of compressing the page table data to be cached according to the compression rule corresponding to the target compression algorithm to obtain the compressed data includes: The second attribute is used as the shared page table attribute data for the plurality of page table entries; Determine the physical base address of all physical addresses included in the plurality of page table entries, wherein the physical base address is the same data bit position of all physical addresses; Determine the physical offset address of each physical address in the plurality of page table entries relative to the physical base address; The shared page table attribute data, the physical base address, and each physical offset address are used as the compressed data.

10. A virtual address translation device, characterized in that, The virtual address translation device includes: The decompression module is configured to decompress the compressed data after the page table data to be cached has been compressed, to obtain decompressed page table data; the compressed data is obtained based on the compression method described in any one of claims 1-7. The address translation module is configured to perform virtual address translation based on the decompressed page table data.

11. A memory management device, characterized in that, The memory management device includes: The read module is configured to read cached page table data from system memory; The compression processing module is configured to: if it is confirmed that the page table data to be cached is compressible data, then compress the compressible data according to the compression rules to obtain compressed data; the compressed data is obtained based on the compression method described in any one of claims 1-7; At least one cache block is configured to cache the compressed data.

12. A chip, characterized in that, The chip includes the memory management device as described in claim 11.

Citation Information

Patent Citations

  • Method for automatic page table compression

    US9569348B1