US11455247B1ActiveUtility

Systems and methods for providing applications seamless access to local and remote memory

53
Assignee: TORMEM INCPriority: Mar 14, 2022Filed: Mar 14, 2022Granted: Sep 27, 2022
Est. expiryMar 14, 2042(~15.7 yrs left)· nominal 20-yr term from priority
G06F 12/1009G06F 2212/6024G06F 12/0862G06F 2212/251G06F 12/06G06F 12/0802
53
PatentIndex Score
0
Cited by
1
References
20
Claims

Abstract

Disclosed is a controller for providing applications seamless access to local and remote memory so that data of a particular application that is moved out of the Random Access Memory (“RAM”) of a local device may be stored and accessed in RAM of a remote device rather than on higher latency and slower performing storage mediums. The controller provides an application with a first allocation of RAM from the local device running the application, and a second allocation of RAM from the remote device. The controller registers to receive a page fault notification for a particular page that the application attempts to access and that is not stored in the first allocation of RAM. The controller retrieves the particular page from the second allocation of RAM, and loads it into the first allocation of RAM where it becomes accessible by the application.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A method comprising:
 allocating a first amount of memory from a physical memory of a local device to a particular application that runs on the local device, and a second amount of memory from a physical memory of a remote device to the particular application, wherein the remote device is connected to the local device via one or more interconnect fabrics; 
 registering a controller to receive page fault notifications from an operating system (“OS”) of the local device; 
 receiving, at the controller from the OS, a page fault notification for a particular page of data that the particular application attempts to access and that is not in the first amount of memory allocated for the particular application from the physical memory of the local device; 
 retrieving, by the controller, the particular page of data from the second amount of memory of the remote device using the one or more interconnect fabrics; and 
 loading, by the controller, the particular page of data into the first amount of memory of the local device. 
 
     
     
       2. The method of  claim 1 ,
 wherein the physical memory of the local device comprises a first set of Dual In-line Memory Modules (“DIMMs”) or Random Access Memory (“RAM”) modules that are installed on the local device; and 
 wherein the physical memory of the remote device comprises a larger second set of DIMMs or RAM modules that are installed on the remote device. 
 
     
     
       3. The method of  claim 1  further comprising:
 mapping references to a plurality of pages in a virtual memory of the particular application to a first set of pages associated with the first amount of memory that is allocated from the physical memory of the local device, and to a second set of pages associated with the second amount of memory that is allocated from the physical memory of the remote device. 
 
     
     
       4. The method of  claim 3  further comprising:
 modifying a particular reference to the particular page of data in the virtual memory, wherein modifying the particular reference comprises changing a mapping of the particular page of data from a first page in the second set of pages to a second page in the first set of pages in response to loading the particular page of data into the first amount of memory. 
 
     
     
       5. The method of  claim 1 , wherein registering the controller comprises:
 requesting a file descriptor from which to access the page fault notifications generated by the particular application; and 
 reading the page fault notification using the file descriptor. 
 
     
     
       6. The method of  claim 1  further comprising:
 launching the controller before launching the particular application, wherein launching the controller comprises overriding a first set of memory allocation functions of the OS with a second set of memory allocation functions of the controller, and wherein the remote device is not referenced in the first set of memory allocation functions of the OS and is referenced in the second set of memory allocation functions of the controller. 
 
     
     
       7. The method of  claim 1  further comprising:
 configuring a dynamic linker of the OS to route memory allocation requests issued by the particular application from a first dynamic link library (“DLL”) of the OS to a second DLL of the controller; and 
 executing the memory allocation requests issued by the particular application by calling one or more functions defined within the second DLL of the controller. 
 
     
     
       8. The method of  claim 1 , wherein allocating the first amount of memory and the second amount of memory comprises:
 expanding a virtual memory of the particular application to include the first amount of memory that is allocated from the physical memory of the local device and the second amount of memory that is allocated from the physical memory of the remote device. 
 
     
     
       9. The method of  claim 1  further comprising:
 receiving, at the controller, a second page fault notification for a second page of data of the particular application that the OS ejects from the first amount of memory; 
 transferring the second page of data from a first address in the first amount of memory to a second address in the second amount of memory using a Remote Direct Memory Access (“RDMA”) transport mechanism over the one or more interconnect fabrics; and 
 updating a paging table to change a physical memory address where the second page of data is accessible from the first address to the second address. 
 
     
     
       10. The method of  claim 1  further comprising:
 blocking execution of the particular application in response to receiving the page fault notification; and 
 resuming execution of the particular application in response to loading the particular page of data into the first amount of memory. 
 
     
     
       11. The method of  claim 1 , wherein allocating the first amount of memory and the second amount of memory comprises:
 allocating memory from the physical memory of the local device in response to memory allocation requests for less than a specified amount of memory; and 
 allocating memory from the physical memory of the remote device in response to memory allocation requests for more than the specified amount of memory. 
 
     
     
       12. The method of  claim 1 , wherein allocating the first amount of memory and the second amount of memory comprises:
 allocating the first amount of memory from the physical memory of the local device in response to a first set of memory allocation requests; and 
 allocating the second amount of memory from the physical memory of the remote device in response to a second set of memory allocation requests and the physical memory allocated from the local device exceeding the first amount of memory. 
 
     
     
       13. A local device comprising:
 a physical memory formed from a plurality of Random Access Memory (“RAM”) modules installed on the local device; 
 one or more interconnect fabrics connecting the local device to a remote device; and 
 one or more processors configured to:
 allocate a first amount of memory from the physical memory of the local device to a particular application that runs on the local device, and a second amount of memory from a physical memory of the remote device to the particular application; 
 register a controller to receive page fault notifications from an operating system (“OS”) of the local device; 
 receive, at the controller from the OS, a page fault notification for a particular page of data that the particular application attempts to access and that is not in the first amount of memory allocated for the particular application from the physical memory of the local device; 
 retrieve, by the controller, the particular page of data from the second amount of memory of the remote device using the one or more interconnect fabrics; and 
 load, by the controller, the particular page of data into the first amount of memory of the local device. 
 
 
     
     
       14. The local device of  claim 13 , wherein the one or more processors are further configured to:
 map references to a plurality of pages in a virtual memory of the particular application to a first set of pages associated with the first amount of memory that is allocated from the physical memory of the local device, and to a second set of pages associated with the second amount of memory that is allocated from the physical memory of the remote device. 
 
     
     
       15. The local device of  claim 14 , wherein the one or more processors are further configured to:
 modify a particular reference to the particular page of data in the virtual memory, wherein modifying the particular reference comprises changing a mapping of the particular page of data from a first page in the second set of pages to a second page in the first set of pages in response to loading the particular page of data into the first amount of memory. 
 
     
     
       16. The local device of  claim 13 , wherein registering the controller comprises:
 requesting a file descriptor from which to access the page fault notifications generated by the particular application; and 
 reading the page fault notification using the file descriptor. 
 
     
     
       17. The local device of  claim 13 , wherein the one or more processors are further configured to:
 launch the controller before launching the particular application, wherein launching the controller comprises overriding a first set of memory allocation functions of the OS with a second set of memory allocation functions of the controller, and wherein the remote device is not referenced in the first set of memory allocation functions of the OS and is referenced in the second set of memory allocation functions of the controller. 
 
     
     
       18. The local device of  claim 13 , wherein the one or more processors are further configured to:
 configure a dynamic linker of the OS to route memory allocation requests issued by the particular application from a first dynamic link library (“DLL”) of the OS to a second DLL of the controller; and 
 execute the memory allocation requests issued by the particular application by calling one or more functions defined within the second DLL of the controller. 
 
     
     
       19. The local device of  claim 13 , wherein allocating the first amount of memory and the second amount of memory comprises:
 expanding a virtual memory of the particular application to include the first amount of memory that is allocated from the physical memory of the local device and the second amount of memory that is allocated from the physical memory of the remote device. 
 
     
     
       20. A non-transitory computer-readable medium, storing a plurality of processor-executable instructions to:
 allocate a first amount of memory from a physical memory of a local device to a particular application that runs on the local device, and a second amount of memory from a physical memory of a remote device to the particular application, wherein the remote device is connected to the local device via one or more interconnect fabrics; 
 register a controller to receive page fault notifications from an operating system (“OS”) of the local device; 
 receive, at the controller from the OS, a page fault notification for a particular page of data that the particular application attempts to access and that is not in the first amount of memory allocated for the particular application from the physical memory of the local device; 
 retrieve, by the controller, the particular page of data from the second amount of memory of the remote device using the one or more interconnect fabrics; and 
 load, by the controller, the particular page of data into the first amount of memory of the local device.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.