WO2016015583A1 - 一种内存管理方法、装置以及内存控制器 - Google Patents
一种内存管理方法、装置以及内存控制器 Download PDFInfo
- Publication number
- WO2016015583A1 WO2016015583A1 PCT/CN2015/084798 CN2015084798W WO2016015583A1 WO 2016015583 A1 WO2016015583 A1 WO 2016015583A1 CN 2015084798 W CN2015084798 W CN 2015084798W WO 2016015583 A1 WO2016015583 A1 WO 2016015583A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- virtual address
- memory
- page
- page table
- address
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
- G06F13/1668—Details of memory controller
- G06F13/1673—Details of memory controller using buffers
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/10—Address translation
- G06F12/1009—Address translation using page tables, e.g. page table structures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/0292—User address space allocation, e.g. contiguous or non contiguous base addressing using tables or multilevel address translation means
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/10—Address translation
- G06F12/1027—Address translation using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/3004—Arrangements for executing specific machine instructions to perform operations on memory
- G06F9/30047—Prefetch instructions; cache control instructions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1016—Performance improvement
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/68—Details of translation look-aside buffer [TLB]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/68—Details of translation look-aside buffer [TLB]
- G06F2212/681—Multi-level TLB, e.g. microTLB and main TLB
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/68—Details of translation look-aside buffer [TLB]
- G06F2212/684—TLB miss handling
Definitions
- the present invention relates to the field of computers, and in particular, to a memory management method, apparatus, and memory controller.
- the memory controller is mainly responsible for data interaction between the CPU and the memory, and the real address management of the memory is implemented by the operating system.
- the operating system allocates a virtual address to a process. If the virtual address is not cached in the Translation Look-aside Buffer (TLB), the memory management unit (MMU) does not find the virtual address.
- TLB Translation Look-aside Buffer
- MMU memory management unit
- the page table entry causes a page fault and the CPU is trapped in the operating system kernel. After the page fault is interrupted, the operating system enters the interrupt service routine, performs on-site protection, pushes various status information of the current instruction such as the program counter onto the stack, and then checks the validity of the virtual address. If it is determined that the access is illegal, the operating system usually The process feeds back a signal or kills the process directly.
- Embodiments of the present invention provide a memory management method, apparatus, and memory controller for improving memory management efficiency.
- the present invention provides a memory management method, which is applied to a memory management device, and the memory management device is located in a memory controller, and the method includes:
- the virtual address is determined to be legal, and when the virtual address is determined to be valid, a blank page is applied.
- the method further includes: if the application for the blank page is successful, starting the memory reading and writing; if the application for the blank page fails, selecting the replacement page and providing the operating system to the operating system to the page Replace it.
- determining whether the virtual address is legal specifically, determining whether the virtual address falls in the allocated virtual address space If yes, it is determined that the virtual address is legal; if not, it is found whether there is a virtual address in the virtual memory address VMA space, and if so, it is determined that the virtual address is legal.
- the method further includes: counting each blank page of the cache The frequency of use within the preset time; when applying for a blank page, select the blank page with the lowest frequency used within the preset time.
- the method further includes: updating the page table to make the page table include the virtual address carried by the memory access request, and The page table is stored in the TLB.
- the method further includes: depositing the page table into the TLB.
- the present invention provides a memory management device, where the memory management device is located in a memory controller, and the memory management device includes: a fast translation buffer TLB, a memory management unit MMU, and a microcontroller;
- the TLB is configured to receive a memory access request sent by the processor, and the memory access request carries a virtual address, and searches whether the page table corresponding to the virtual address carried by the memory access request is cached in the TLB, and if yes, obtains the virtual page from the page table. a real address corresponding to the address, where the page table includes a correspondence between the virtual address and the real address;
- the MMU is configured to: when the page table corresponding to the virtual address carried by the access request is not cached in the TLB, obtain a base address field of the page table and look up the page table, and obtain a virtual address corresponding to the virtual address when the page table has a virtual address Real address
- the microcontroller is configured to determine whether the virtual address is legal when the page table has no virtual address, and apply for a blank page when determining that the virtual address is legal.
- the microcontroller is further configured to start memory reading and writing when the blank page is successfully applied, and if the blank page fails to be applied, the replacement page is selected and provided to the operating system to enable the operation. The system replaces the page.
- the microcontroller is specifically configured to determine whether the virtual address falls in the allocated virtual address space, if The virtual address is determined to be valid. If not, the virtual memory address is found to have a virtual address in the VMA space. If it exists, the virtual address is determined to be valid.
- the microcontroller is further configured to receive a memory access request, obtain a visit
- the base address field of the page table of the process corresponding to the virtual address carried by the request is stored, and the base address field is sent to the MMU, so that the MMU searches the page table according to the base address field.
- the micro controller is further configured to count each blank page of the cache at a preset time The frequency of use inside, when applying for a blank page, select the blank page with the lowest frequency in the preset time.
- the present invention provides a memory controller, comprising: any one of the memory management devices provided by the second aspect.
- the memory is managed by the storage management device, which can reduce the burden on the operating system.
- the storage management device determines that there is no virtual address carried in the page table in the page table, the interrupt of the operating system is not triggered, but The memory management device manages the memory.
- the virtual address is determined to be valid, a blank page is applied.
- the memory management device is located in the memory controller and is closer to the physical memory, which can effectively improve the memory management efficiency.
- FIG. 2 is a schematic flowchart of a memory management method according to an embodiment of the present invention.
- FIG. 3 is another schematic flowchart of a memory management method provided in an embodiment of the present invention.
- FIG. 4 is a schematic structural diagram of a memory management apparatus according to an embodiment of the present invention.
- the memory management method provided by the embodiment of the present invention can be applied to a communication system, and the memory management method can be applied to a memory management device, where the memory management device is located in a memory controller.
- FIG. 1 is a schematic structural diagram of an applicable embodiment of the present invention.
- the memory controller 100 proposed by the present invention may include a memory management device 101, a mapping scheduler 102, and a physical layer protocol PHY 103.
- the mapping scheduler 102 is mainly responsible for address mapping (such as translation of linear addresses into ranks, banks, rows, and columns of dynamic random access memory), request scheduling, refresh control, etc.
- the PHY 103 is responsible for the memory controller 100 and the memory chip.
- the mapping scheduler 102 and the PHY 103 can be referred to the prior art, and details are not described herein again.
- the memory can be accessed by sending a memory access request to the memory controller 100 through the request path, which is mainly managed by the memory management device 101 in the memory controller 100 according to the cache request. .
- a memory management method is applied to the memory management device 101.
- the memory management device 101 is located in the memory controller 100.
- the method includes: receiving a memory access request sent by the processor, the memory access request carrying a virtual address; and searching for a fast translation buffer ( Whether the page table corresponding to the virtual address carried by the memory access request is cached in the TLB (Translation Look-aside Buffer), and if so, the real address corresponding to the virtual address is obtained from the page table, and if not, the base of the page table is obtained.
- the address field finds a page table.
- the page table has a virtual address carried by the memory access request, the real address corresponding to the virtual address is obtained, where the page table includes a correspondence between the virtual address and the real address, and the TLB is located in the memory management device; If there is no virtual address carried in the page table, the virtual address is determined to be legal, and when the virtual address is determined to be valid, a blank page is applied.
- FIG. 2 is a schematic flowchart of a memory management method according to an embodiment of the present invention. Methods can include:
- Step S201 Receive a memory access request sent by the processor, where the memory access request carries a virtual address.
- the memory may be accessed by sending a memory access request to the memory management device 101 in the memory controller 100, where the memory access request carries a virtual address.
- the Quick Look Buffer (TLB) and the microcontroller in the memory management apparatus 101 can receive the memory access request sent by the processor, and the TLB is mainly responsible for fast address translation and page table searching, and the micro control
- the device is mainly responsible for memory management (including checking the legitimacy of the memory access request, etc.), that is, when the relevant page table is not cached in the TLB, the memory management operation by the microcontroller is required.
- the processor may be a CPU core.
- Step S202 Query whether the page table corresponding to the virtual address carried in the memory access request is cached in the fast translation buffer TLB. If not, execute step S203. If yes, execute step S205, where the page table includes the virtual address and the real page. Correspondence of addresses;
- the page table is generally stored in the main memory, and the correspondence between the virtual address and the real address is stored in the page table.
- the TLB can cache the page table file. Therefore, if the TLB is cached in the TLB, the real address corresponding to the virtual address can be directly obtained from the TLB. If the page table is not cached in the TLB, the memory management device 101 can be used.
- the Memory Management Unit (MMU) looks up the page table.
- the page table corresponding to the virtual address carried in the cache access request is not cached, and the page table is obtained. Take the base address field of the page table;
- the MMU may not be able to know the base address field of the page table and thus cannot directly search the page table.
- the base address field of the page table can be provided by the microcontroller to the MMU.
- the page table entry address base address field + the high number of virtual addresses.
- the microcontroller obtains the base address field of the page table of the process corresponding to the virtual address carried by the memory access request after receiving the cache request, and provides the base address field of the page table to the page address table.
- the MMU causes the MMU to look up the page table based on the base address field of the page table.
- the microcontroller can search the process table, obtain a base address field of the page table of the process corresponding to the virtual address, and send the page table base address field to the MMU.
- Step S204 according to the base address field of the page table to find the page table, if the page table is found to have a virtual address carried by the memory access request, step S205 is performed, if not, step S206 is performed;
- step 205 is performed to obtain the real address corresponding to the virtual address, and then the memory data can be read according to the real address. If the page table does not have a virtual address carried by the memory access request, step 206 is performed.
- Step S205 Obtain a real address corresponding to the virtual address carried in the memory access request.
- step S202 the page table corresponding to the virtual address carried by the memory access request cached in the fast translation buffer TLB is searched, and in step S205, the real address corresponding to the virtual address is obtained from the page table by the TLB; in step S204, the MMU The page table is found to have a virtual address carried by the memory access request. In step S205, the MMU obtains the real address corresponding to the virtual address carried in the memory access request.
- step S206 if the virtual address carried by the access request is not found in the page table, it is determined whether the virtual address is legal, and when the virtual address is determined to be legal, a blank page is applied.
- the microcontroller may determine whether the virtual address carried in the memory access request is legal.
- the content of the virtual address carried in the memory access request is legal, including:
- VMA virtual memory address
- the page fault interrupt can be fed back. Give the operating system, and then apply for a blank page by the microcontroller.
- the microcontroller requests a blank page. If the blank page of the application is successful, the memory can be directly read and written. If the application for a blank page fails, the replacement page is selected and the replacement page is provided to the operating system, and the operating system writes the data from the memory to the hard disk. If the eliminated page is "clean”, the operating system can modify its page table item and use it directly; if the page is "dirty”, the operating system needs to write the "dirty" page back to disk and generate context. Switching, suspending the process until the end of the disk operation; then the state before the page fault interrupt occurs will pop up the stack, since the process enters the ready state, ready to be executed by the operating system.
- the method may further include: determining whether the blank page of the application is the first legal access, and if so, directly starting the memory read and write operation; if not, the feedback operating system blank page is ready, Causes the operating system in the processor to write data from the hard disk to the memory.
- step S206 If it is found that there is no virtual address in the VMA space in step S206, it is determined that the virtual address is illegal, that is, the memory access request is determined to be an illegal access, and the interrupt is fed back to the operating system, and the next step is performed by the operating system.
- the storage management device determines that there is no virtual address carried in the page table in the page table, the interrupt of the operating system is not triggered, but the memory management device manages the memory, and determines the virtual When the address is legal, apply for a blank page.
- the memory management device is located in the memory controller and is closer to the physical memory, which can effectively improve the memory management efficiency.
- FIG. 3 is another schematic flowchart of a memory management method according to an embodiment of the present invention.
- Step S301 The TLB receives a memory access request sent by the processor, where the memory access request carries a virtual address.
- Step S302 the TLB searches whether the page table corresponding to the virtual address carried in the memory access request is cached in the TLB, if not, executing step S303, if yes, executing step S305;
- Step S303 The microcontroller receives the memory access request sent by the processor, and the memory access request carries the virtual address, and the microcontroller searches the process table to obtain the page table base of the process corresponding to the virtual address. Address field, and send the page table base address field to the MMU; step S304;
- the process table refers to a data structure table maintained locally by the memory management processor core, and can be stored in the on-chip SRAM, and specifically includes: a process ID, a processor core ID, a physical space quota, and a management policy. These entries are transmitted to the memory controller through the interactive channel when the operating system switches processes. The entry base address of the page table is created and maintained by the memory management processor, and the process table is invisible to the operating system.
- Table 1 The specific implementation can be seen in Table 1:
- the microcontroller receives the memory access request sent by the processor, and the cache request can carry the process ID, and the microcontroller can find the location of the page table corresponding to the process according to the process ID, obtain the base address field of the page table, and provide the MMU to the MMU.
- the MMU can find the page table according to the virtual address carried by the memory access request.
- steps S301 and S303 are time-independent, and the microcontroller and the TLB can simultaneously receive the memory access request sent by the processor.
- Step S304 the MMU searches the page table according to the base address field of the page table sent by the microcontroller, if it hits, step S305 is performed, if not, step S306 is performed;
- the MMU searches the page table according to the base address field of the page table sent by the microcontroller, and the hit indicates that the virtual address carried by the memory access request is included in the page table, and the real address corresponding to the virtual address can be obtained.
- Step S305 Obtain a real address corresponding to the virtual address.
- the real address corresponding to the virtual address can be used to access the memory data; if the step 304 is to the step S305, the MMU obtains the virtual address corresponding to the virtual address. The real address can be used to access the memory data.
- Step S306 the microcontroller checks whether the virtual address carried in the memory access request falls in the recently allocated virtual address space, if not, then proceeds to step S307, and if so, determines that the virtual address is legal, then step S310;
- a memory allocation table may be integrated in the memory controller, and the contents of the entry of the memory allocation table may include: a process ID, a virtual address of the process Malloc, and a virtual address size. This information is passed to the memory controller by the operating system through the interactive interface when the process calls the Malloc function.
- the microcontroller looks up the memory allocation table.
- the microcontroller can also look up the memory allocation table after receiving the memory access request, that is, during the processing of the TLB and the MMU, the microcontroller simultaneously processes.
- the memory allocation table hits, it indicates that the memory access request is legal and is accessed for the first time. The page has not been allocated yet, and the microcontroller can directly apply for a blank page for the request.
- step S307 is executed, and the microcontroller needs to go to the memory to view the VMA space of the process, thereby further determining the cause of the MMU miss.
- the memory allocation table can implement certain replacement strategies, such as the simplest first-in-first-out (FIFO) strategy.
- FIFO first-in-first-out
- Step S307 the microcontroller finds the virtual memory address VMA space of the process in memory, determines whether the virtual address exists, and if so, proceeds to step S309, and if not, proceeds to step S308;
- Step S308 the microcontroller determines that the request is an illegal access, and feeds back an interrupt to the operating system
- the next step is performed by the operating system to end the process.
- Step S309 the microcontroller determines that the request virtual address data is in the SWAP partition or file, feedback operating system page fault interrupt, and step S310;
- Step S310 the microcontroller searches for the free list, apply for a blank page, if the application fails, then go to step S311, if the application is successful, then go to step S313;
- Step S311 the microcontroller runs a page replacement algorithm, and selects a page to swap out the memory
- Step S312 the microcontroller updates the page table entry and the TLB, and the selected page to be replaced is selected.
- the address is written into the register of the feedback space, and the operating system replaces the signal that the page has been prepared;
- the operating system After the operating system replaces the signal that the page has been prepared, the operating system performs the next step to end the process.
- Step S313 the microcontroller updates the TLB and the page table entry
- Step S314 the microcontroller determines whether it is the first time to apply for a blank page, if the memory access request is not the first legal access, skip to step S315, and if so, proceed to step S316;
- Step S315 the microcontroller writes the register value to the feedback space, and sends a signal that the blank page has been prepared to the operating system;
- the operating system determines the next step by reading various information in the feedback space.
- step S316 the microcontroller directly starts the memory read and write operation.
- the embodiment of the present invention further provides an apparatus based on the foregoing memory management method.
- the meaning of the noun is the same as that in the above memory management.
- a memory management device 101 is located in the memory controller.
- the memory management device 101 specifically includes a fast translation buffer TLB 1011, a memory management unit MMU 1012, and a microcontroller 1013. Please refer to FIG. 4, which is a schematic structural diagram of the memory management device. .
- the TLB1011 is configured to receive a memory access request sent by the processor, and the memory access request carries a virtual address, and searches whether the page table corresponding to the virtual address carried by the memory access request is cached in the TLB, and if yes, obtains the virtual page from the page table. a real address corresponding to the address, where the page table includes a correspondence between the virtual address and the real address;
- the MMU 1012 is configured to: when the page table corresponding to the virtual address carried by the access request is not cached in the TLB, obtain a base address field of the page table and look up the page table, and obtain a virtual address corresponding to the virtual address when the page table has a virtual address Real address
- the microcontroller 1013 is configured to determine whether the virtual address is legal when the page table has no virtual address, and apply for a blank page when determining that the virtual address is legal.
- the microcontroller 1013 is further configured to select a replacement page and provide the operating system to cause the operating system to replace the page when the application for the blank page fails.
- the microcontroller 1013 is specifically configured to determine whether the virtual address falls within the allocated virtual address space. If yes, the virtual address is determined to be valid. If not, the virtual memory address is found to have a virtual space in the VMA space. The address, if it exists, determines that the virtual address is valid.
- the microcontroller 1013 is further configured to receive a memory access request, obtain a base address field of a page table of a process corresponding to the virtual address carried by the memory access request, and send the base address field to the MMU, so that The MMU looks up the page table based on the base address field.
- the microcontroller 1013 is further configured to count the frequency of use of each blank page of the cache in a preset time. When applying for a blank page, select a blank page with the lowest frequency used in the preset time.
- the memory management apparatus 101 may further include: a configuration space 1014 and a feedback space 1015, wherein the configuration space and the feedback space are spaces for direct information interaction between the operating system and the memory controller.
- the implementation of configuration space and feedback space can be a bunch of addressable registers.
- the operating system can send information to the configuration space through the interactive path, and can also obtain information from the feedback space.
- the microcontroller can read configuration space information directly or write information to the feedback space.
- the memory management apparatus 101 may further include: a data buffering module 1016, configured to buffer read and write bidirectional data.
- the code of the microcontroller can run on an on-chip SRAM.
- the TLB and the MMU in the embodiment of the present invention are all located in the memory controller, which is closer to the physical memory, and is convenient for hardware to implement memory management.
- the storage management device manages the memory, which can reduce the burden on the operating system, and when the storage management device determines that there is no memory access request in the page table.
- the virtual address is carried, the interruption of the operating system is not triggered, but the memory management device manages the memory.
- the virtual address is determined to be valid, a blank page is applied, and the memory management device is located in the memory controller, closer to the physical Memory can effectively improve the efficiency of memory management.
- the present invention further provides a memory controller.
- the memory controller may include any of the memory management devices provided above, and the memory management device may include: a fast translation buffer TLB, a memory management unit.
- TLB fast translation buffer
- the MMU and the microcontroller, and the specific implementation thereof can be referred to the foregoing embodiment, and details are not described herein again.
- the memory controller in the embodiment of the present invention may be integrated into the CPU or may be a separate chip.
- the disclosed system, apparatus, and method may be implemented in other manners.
- the device embodiments described above are merely illustrative.
- the division of the unit is only a logical function division.
- there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
- the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
Claims (12)
- 一种内存管理方法,其特征在于,所述方法应用在内存管理装置上,所述内存管理装置位于内存控制器中,所述方法包括:接收处理器发送的访存请求,所述访存请求携带虚地址;查找快速翻译缓冲器TLB中是否缓存有所述访存请求携带的虚地址对应的页表,若有,则从所述页表中获取与所述虚地址对应的实地址,若无,则获取所述页表的基地址域并查找所述页表,若所述页表有所述访存请求携带的虚地址,则获取与所述虚地址对应的实地址,其中,所述页表包括虚地址与实地址的对应关系,所述TLB位于所述内存管理装置中;若所述页表中没有所述访存请求携带的虚地址,则确定所述虚地址是否合法,并在确定所述虚地址合法时,申请空白页。
- 根据权利要求1所述的方法,其特征在于,还包括:若申请空白页成功,则启动内存读写;若申请空白页失败,则选择替换页并提供给操作系统以使得所述操作系统对页面进行替换。
- 根据权利要求1或2所述的方法,其特征在于,所述确定所述虚地址是否合法,具体包括:确定所述虚地址是否落在已分配的虚地址空间中,若是,则确定所述虚地址合法;若否,则查找虚拟内存地址VMA空间中是否存在所述虚地址,若存在,则确定所述虚地址合法。
- 根据权利要求1-3任一所述的方法,其特征在于,所述申请空白页之前,还包括:统计缓存的每个空白页在预置时间内的使用频率;当申请空白页时,选择在所述预置时间内使用频率最低的空白页。
- 根据权利要求2所述的方法,其特征在于,申请空白页成功之后,还包括:更新所述页表以使得所述页表包括所述访存请求携带的虚地址, 并将所述页表存入所述TLB。
- 根据权利要求1-5任一所述的方法,其特征在于,若查找到所述页表有所述访存请求携带的虚地址,则在所述获取与所述虚地址对应的实地址的步骤之前,还包括:将所述页表存入所述TLB。
- 一种内存管理装置,其特征在于,所述内存管理装置位于内存控制器中,所述内存管理装置包括:快速翻译缓冲器TLB、内存管理单元MMU和微控制器;所述TLB,用于接收处理器发送的访存请求,所述访存请求携带虚地址,并查找所述TLB中是否缓存有所述访存请求携带的虚地址对应的页表,若有,则从所述页表中获取与所述虚地址对应的实地址,其中,所述页表包括虚地址与实地址的对应关系;所述MMU,用于当所述TLB中未缓存有所述访存请求携带的虚地址对应的页表时,获取所述页表的基地址域并查找所述页表,并在所述页表有所述虚地址时,获取与所述虚地址对应的实地址;所述微控制器,用于当所述页表无所述虚地址时,确定所述虚地址是否合法,并在确定所述虚地址合法时,申请空白页。
- 根据权利要求7所述的装置,其特征在于,所述微控制器,还用于当申请空白页成功,则启动内存读写,申请空白页失败,则选择替换页并提供给操作系统以使得所述操作系统对页面进行替换。
- 根据权利要求7或8所述的装置,其特征在于,所述微控制器,具体用于确定所述虚地址是否落在已分配的虚地址空间中,若是,则确定所述虚地址合法,若否,则查找虚拟内存地址VMA空间中是否存在所述虚地址,若存在,则确定所述虚地址合法。
- 根据权利要求7-9任一所述的装置,其特征在于,所述微控制器,还用于接收所述访存请求,获得与所述访存请求携带的虚地址对应的进程的页表的基地址域,并将所述基地址域发送给MMU,以使得所述MMU根据所述基地址域查找页表。
- 根据权利要求7-10任一所述的装置,其特征在于,所述微控制器,还用于统计缓存的每个空白页在预置时间内的使用频率,当申请空白页时,选择在所述预置时间内使用频率最低的空白页。
- 一种内存控制器,其特征在于,包括:如权利要求7-11所述的任一种内存管理装置。
Priority Applications (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| ES15828139T ES2704751T3 (es) | 2014-07-31 | 2015-07-22 | Método y dispositivo de gestión de memoria y controlador de memoria |
| KR1020177003800A KR101893966B1 (ko) | 2014-07-31 | 2015-07-22 | 메모리 관리 방법 및 장치, 및 메모리 컨트롤러 |
| EP15828139.4A EP3163451B1 (en) | 2014-07-31 | 2015-07-22 | Memory management method and device, and memory controller |
| US15/415,344 US10108553B2 (en) | 2014-07-31 | 2017-01-25 | Memory management method and device and memory controller |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410373858.2 | 2014-07-31 | ||
| CN201410373858.2A CN105446889B (zh) | 2014-07-31 | 2014-07-31 | 一种内存管理方法、装置以及内存控制器 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/415,344 Continuation US10108553B2 (en) | 2014-07-31 | 2017-01-25 | Memory management method and device and memory controller |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016015583A1 true WO2016015583A1 (zh) | 2016-02-04 |
Family
ID=55216758
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2015/084798 Ceased WO2016015583A1 (zh) | 2014-07-31 | 2015-07-22 | 一种内存管理方法、装置以及内存控制器 |
Country Status (6)
| Country | Link |
|---|---|
| US (1) | US10108553B2 (zh) |
| EP (1) | EP3163451B1 (zh) |
| KR (1) | KR101893966B1 (zh) |
| CN (1) | CN105446889B (zh) |
| ES (1) | ES2704751T3 (zh) |
| WO (1) | WO2016015583A1 (zh) |
Families Citing this family (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107977577B (zh) * | 2016-10-21 | 2020-03-13 | 龙芯中科技术有限公司 | 访存指令访问检测方法及装置 |
| CN110389911A (zh) * | 2018-04-23 | 2019-10-29 | 珠海全志科技股份有限公司 | 一种设备内存管理单元的预取方法、装置及系统 |
| CN108710584B (zh) * | 2018-05-22 | 2021-08-31 | 郑州云海信息技术有限公司 | 一种提高tlb刷新效率的方法 |
| CN111143900B (zh) * | 2019-12-24 | 2023-09-26 | 海光信息技术(苏州)有限公司 | 数据处理、访问控制方法、系统、器件、设备、存储介质 |
| US12120021B2 (en) | 2021-01-06 | 2024-10-15 | Enfabrica Corporation | Server fabric adapter for I/O scaling of heterogeneous and accelerated compute systems |
| WO2022261325A2 (en) * | 2021-06-09 | 2022-12-15 | Enfabrica Corporation | Transparent remote memory access over network protocol |
| EP4385191A4 (en) | 2021-08-11 | 2025-07-02 | Enfabrica Corp | SYSTEM AND METHOD FOR CONTROLLING CONGESTION USING A FLOW LEVEL TRANSMISSION MECHANISM |
| US12248424B2 (en) | 2022-08-09 | 2025-03-11 | Enfabrica Corporation | System and method for ghost bridging |
| CN115794667B (zh) * | 2023-01-19 | 2023-04-18 | 北京象帝先计算技术有限公司 | 内存管理方法、系统、组件及设备 |
| US12542735B1 (en) | 2024-10-18 | 2026-02-03 | Enfabrica Corporation | System and method for optimally balanced network multipathing |
| US12417154B1 (en) | 2025-01-22 | 2025-09-16 | Enfabrica Corporation | Input/output system interconnect redundancy and failover |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6760909B1 (en) * | 1996-04-29 | 2004-07-06 | Microsoft Corporation | Virtual memory system and methods |
| CN101013404A (zh) * | 2007-01-26 | 2007-08-08 | 浙江大学 | 面向异构多核体系的分页式存储空间管理方法 |
| US20070283123A1 (en) * | 2006-06-05 | 2007-12-06 | Sun Microsystems, Inc. | Function-based virtual-to-physical address translation |
| CN101539869A (zh) * | 2009-04-13 | 2009-09-23 | 浙江大学 | 与调度性能直接相关的内存管理核的硬件化的方法 |
| CN102929796A (zh) * | 2012-06-01 | 2013-02-13 | 杭州中天微系统有限公司 | 同时支持软件回填与硬件回填的内存管理模块 |
Family Cites Families (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5388244A (en) * | 1992-09-17 | 1995-02-07 | International Business Machines Corporation | Controls for initial diversion of page-frame logical content as part of dynamic virtual-to-real translation of a virtual page address |
| US5897664A (en) * | 1996-07-01 | 1999-04-27 | Sun Microsystems, Inc. | Multiprocessor system having mapping table in each node to map global physical addresses to local physical addresses of page copies |
| KR19980072720A (ko) | 1997-03-07 | 1998-11-05 | 류첸쾅 | 저주파 복사방지용 전원 전환장치 |
| US6490671B1 (en) * | 1999-05-28 | 2002-12-03 | Oracle Corporation | System for efficiently maintaining translation lockaside buffer consistency in a multi-threaded, multi-processor virtual memory system |
| US6961840B2 (en) * | 2002-09-30 | 2005-11-01 | International Business Machines Corporation | Method and apparatus for managing a dynamic alias page table |
| US7047320B2 (en) | 2003-01-09 | 2006-05-16 | International Business Machines Corporation | Data processing system providing hardware acceleration of input/output (I/O) communication |
| US7080220B2 (en) * | 2003-07-03 | 2006-07-18 | International Business Machines Corporation | Page replacement with a re-reference indicator |
| US20070094445A1 (en) * | 2005-10-20 | 2007-04-26 | Trika Sanjeev N | Method to enable fast disk caching and efficient operations on solid state disks |
| US8074045B2 (en) * | 2008-05-30 | 2011-12-06 | Vmware, Inc. | Virtualization with fortuitously sized shadow page tables |
| US9355023B2 (en) * | 2011-03-15 | 2016-05-31 | Anirudh Badam | Virtual address pager and method for use with a bulk erase memory |
| KR20120129695A (ko) * | 2011-05-20 | 2012-11-28 | 삼성전자주식회사 | 메모리 관리 유닛, 이를 포함하는 장치들 및 이의 동작 방법 |
-
2014
- 2014-07-31 CN CN201410373858.2A patent/CN105446889B/zh active Active
-
2015
- 2015-07-22 WO PCT/CN2015/084798 patent/WO2016015583A1/zh not_active Ceased
- 2015-07-22 KR KR1020177003800A patent/KR101893966B1/ko active Active
- 2015-07-22 EP EP15828139.4A patent/EP3163451B1/en active Active
- 2015-07-22 ES ES15828139T patent/ES2704751T3/es active Active
-
2017
- 2017-01-25 US US15/415,344 patent/US10108553B2/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6760909B1 (en) * | 1996-04-29 | 2004-07-06 | Microsoft Corporation | Virtual memory system and methods |
| US20070283123A1 (en) * | 2006-06-05 | 2007-12-06 | Sun Microsystems, Inc. | Function-based virtual-to-physical address translation |
| CN101013404A (zh) * | 2007-01-26 | 2007-08-08 | 浙江大学 | 面向异构多核体系的分页式存储空间管理方法 |
| CN101539869A (zh) * | 2009-04-13 | 2009-09-23 | 浙江大学 | 与调度性能直接相关的内存管理核的硬件化的方法 |
| CN102929796A (zh) * | 2012-06-01 | 2013-02-13 | 杭州中天微系统有限公司 | 同时支持软件回填与硬件回填的内存管理模块 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105446889B (zh) | 2019-02-12 |
| US20170132148A1 (en) | 2017-05-11 |
| EP3163451B1 (en) | 2018-10-10 |
| EP3163451A4 (en) | 2017-07-26 |
| CN105446889A (zh) | 2016-03-30 |
| KR101893966B1 (ko) | 2018-08-31 |
| KR20170029594A (ko) | 2017-03-15 |
| US10108553B2 (en) | 2018-10-23 |
| EP3163451A1 (en) | 2017-05-03 |
| ES2704751T3 (es) | 2019-03-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2016015583A1 (zh) | 一种内存管理方法、装置以及内存控制器 | |
| US10963387B2 (en) | Methods of cache preloading on a partition or a context switch | |
| US10474580B2 (en) | Memory management supporting huge pages | |
| US9720839B2 (en) | Systems and methods for supporting a plurality of load and store accesses of a cache | |
| JP6696987B2 (ja) | 仮想アドレスを使用してアクセスされるキャッシュ | |
| US9858192B2 (en) | Cross-page prefetching method, apparatus, and system | |
| TWI531912B (zh) | 具有用於多上下文計算引擎的轉譯後備緩衝之處理器、用於致能多執行緒以存取於處理器中之資源之系統和方法 | |
| US8185692B2 (en) | Unified cache structure that facilitates accessing translation table entries | |
| JP2018504694A5 (zh) | ||
| US20170262374A1 (en) | System and methods of a cpu-efficient cache replacement algorithm | |
| US20070061549A1 (en) | Method and an apparatus to track address translation in I/O virtualization | |
| US20120210043A1 (en) | Systems and Methods for Managing Data Input/Output Operations | |
| US20120173843A1 (en) | Translation look-aside buffer including hazard state | |
| CN113039531A (zh) | 缓存存储器请求流 | |
| KR102482516B1 (ko) | 메모리 어드레스 변환 | |
| CN106326150A (zh) | 内存访问处理方法及装置 | |
| JP2024510127A (ja) | ページ再マッピングおよびローテーションによるアドレス空間配置のランダム化エントロピーの増大 | |
| US11249914B2 (en) | System and methods of an efficient cache algorithm in a hierarchical storage system | |
| WO2021008552A1 (zh) | 数据读取方法和装置、计算机可读存储介质 | |
| CN115080464B (zh) | 数据处理方法和数据处理装置 | |
| JP2019096307A (ja) | 複数のデータ・タイプのためのデータ・ストレージ | |
| HK40100521A (zh) | 支持巨页的内存管理 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15828139 Country of ref document: EP Kind code of ref document: A1 |
|
| REEP | Request for entry into the european phase |
Ref document number: 2015828139 Country of ref document: EP |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2015828139 Country of ref document: EP |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 20177003800 Country of ref document: KR Kind code of ref document: A |
