Sub-page-granular cache coherency using shared virtual memory mechanism
First Claim
1. In a computerized device having (i) local physical memory and (ii) a page table which maps a local virtual memory range and a shared virtual memory range to the local physical memory, a method for accessing data, the method comprising:
- receiving a request for data and determining whether a page hit or a page fault has occurred based on an examination of virtual memory metadata;
in response to a determined page hit where the data resides in the physical memory, providing access to the data residing in the physical memory;
in response to a determined page fault where the data resides in the physical memory, providing access to the data residing in the physical memory; and
in response to a determined page fault where the data does not reside in the physical memory, moving the data (i) from secondary memory into the physical memory when the virtual address of the request falls within the local virtual memory range and (ii) from another computerized device into the physical memory when the virtual address of the request falls within the shared virtual memory range;
wherein moving the data includes transferring the data from the other computerized device into a shared portion of the physical memory, and updating the page table to indicate that the data now resides in the shared portion of the physical memory;
wherein the method further comprises;
receiving another request for the data and determining whether a page hit or a page fault has occurred based on an examination of virtual memory metadata associated with the virtual address of the other request, andin response to a determined page hit where the data now resides in the shared portion of the physical memory, providing access to the data now residing in the shared portion of the physical memory;
wherein the shared portion of the physical memory is a set of physical memory pages contiguously divided into equal-sized extents;
wherein providing access to the data residing in the physical memory includes;
when the virtual address of the request falls within the local virtual memory range, mapping the virtual address of the request to a page of the physical memory and enabling the data to be accessed from the page, andwhen the virtual address of the request falls within the shared virtual memory range, mapping the virtual address to an extent of the shared portion of the physical memory and enabling the data to be accessed from the extent;
wherein the secondary memory is magnetic disk drive memory; and
wherein moving the data in response to the determined page fault includes;
when the virtual address of the request falls within the local virtual memory range, transferring the data from the magnetic disk drive memory into the page of the physical memory and permitting access to the data from the page, andwhen the virtual address of the request falls within the shared virtual memory range, transferring the data from the other computerized device into the extent of the shared portion of the physical memory and permitting access the data to be accessed from the extent; and
wherein there are N computerized devices forming a distributed computer system;
wherein a shared physical memory range is divided into M extents;
wherein each of the N computerized devices is configured to be the home of a respective subset of the M extents in a predefined manner; and
wherein transferring the data from the other computerized device into the extent of the shared portion of the physical memory includes;
performing a set of masked atomic compare and swap operations to acquire, as the data, information which is shared among each of the N computerized devices forming the distributed computer system.
9 Assignments
0 Petitions
Accused Products
Abstract
A technique involves providing access to shared data based on enhanced standard virtual memory mechanisms. Once data from a shared area of memory is moved into primary memory of a first computerized device from a second computerized device, the first computerized device can retain that data in order to shorten the latency of subsequent accesses. Such a technique can be configured to handle shared data at the sub-page-granular level using sparse virtual pages to minimize memory access contention and thus improve the likelihood of quick re-hits. Furthermore, such a technique can be conveniently accomplished through an enhancement to a common page fault handler of an operating system and utilizing atomic remote access support from a standard communications protocol thus alleviating the need to employ more costly and complicated solutions such as inflexible hardware implementations or independent programs that could pose additional design burdens and reliability concerns.
105 Citations
24 Claims
-
1. In a computerized device having (i) local physical memory and (ii) a page table which maps a local virtual memory range and a shared virtual memory range to the local physical memory, a method for accessing data, the method comprising:
-
receiving a request for data and determining whether a page hit or a page fault has occurred based on an examination of virtual memory metadata; in response to a determined page hit where the data resides in the physical memory, providing access to the data residing in the physical memory; in response to a determined page fault where the data resides in the physical memory, providing access to the data residing in the physical memory; and in response to a determined page fault where the data does not reside in the physical memory, moving the data (i) from secondary memory into the physical memory when the virtual address of the request falls within the local virtual memory range and (ii) from another computerized device into the physical memory when the virtual address of the request falls within the shared virtual memory range; wherein moving the data includes transferring the data from the other computerized device into a shared portion of the physical memory, and updating the page table to indicate that the data now resides in the shared portion of the physical memory; wherein the method further comprises; receiving another request for the data and determining whether a page hit or a page fault has occurred based on an examination of virtual memory metadata associated with the virtual address of the other request, and in response to a determined page hit where the data now resides in the shared portion of the physical memory, providing access to the data now residing in the shared portion of the physical memory; wherein the shared portion of the physical memory is a set of physical memory pages contiguously divided into equal-sized extents; wherein providing access to the data residing in the physical memory includes; when the virtual address of the request falls within the local virtual memory range, mapping the virtual address of the request to a page of the physical memory and enabling the data to be accessed from the page, and when the virtual address of the request falls within the shared virtual memory range, mapping the virtual address to an extent of the shared portion of the physical memory and enabling the data to be accessed from the extent; wherein the secondary memory is magnetic disk drive memory; and wherein moving the data in response to the determined page fault includes; when the virtual address of the request falls within the local virtual memory range, transferring the data from the magnetic disk drive memory into the page of the physical memory and permitting access to the data from the page, and when the virtual address of the request falls within the shared virtual memory range, transferring the data from the other computerized device into the extent of the shared portion of the physical memory and permitting access the data to be accessed from the extent; and wherein there are N computerized devices forming a distributed computer system;
wherein a shared physical memory range is divided into M extents;
wherein each of the N computerized devices is configured to be the home of a respective subset of the M extents in a predefined manner; and
wherein transferring the data from the other computerized device into the extent of the shared portion of the physical memory includes;performing a set of masked atomic compare and swap operations to acquire, as the data, information which is shared among each of the N computerized devices forming the distributed computer system. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A computerized device, comprising:
-
local physical memory; an internodal communications interface; and a controller coupled to the physical memory and the internodal communications interface, the controller having virtual memory related components including (i) a translation lookaside buffer, (ii) a page table which maps a local virtual memory range and a shared virtual memory range to the physical memory, and (iii) a page fault handler, the page fault handler being configured to; receive a request for data and determining whether a page hit or a page fault has occurred based on an examination of virtual memory metadata, in response to a determined page hit where the data resides in the physical memory, provide access to the data residing in the physical memory, in response to a determined page fault where the data resides in the physical memory, provide access to the data residing in the physical memory, and in response to a determined page fault where the data does not reside in the physical memory, move the data (i) from secondary memory into the physical memory when the virtual address of the request falls within the local virtual memory range and (ii) from another computerized device through the internodal communications interface into the physical memory when the virtual address of the request falls within the shared virtual memory range; wherein the page fault handler, when moving the data, is configured to transfer the data from the other computerized device into a shared portion of the physical memory, and update the page table to indicate that the data now resides in the shared portion of the physical memory; wherein the page fault handler is further configured to; receive another request for the data and determining whether a page hit or a page fault has occurred based on an examination of virtual memory metadata associated with the virtual address of the other request; and in response to a determined page hit where the data now resides in the shared portion of the physical memory, provide access to the data now residing in the shared portion of the physical memory; wherein the shared portion of the physical memory is a set of physical memory pages contiguously divided into equal-sized extents; wherein the page fault handler, when providing access to the data residing in the physical memory, is configured to; when the virtual address of the request falls within the local virtual memory range, map the virtual address of the request to a page of the physical memory and enable the data to be accessed from the page, and when the virtual address of the request falls within the shared virtual memory range, map the virtual address to an extent of the shared portion of the physical memory and enable the data to be accessed from the extent; wherein the secondary memory is magnetic disk drive memory; and
wherein the page fault handler, when moving the data in response to the determined page fault, is configured to;when the virtual address of the request falls within the local virtual memory range, transfer the data from the magnetic disk drive memory into the page of the physical memory and permit access to the data from the page, and when the virtual address of the request falls within the shared virtual memory range, transfer the data from the other computerized device into the extent of the shared portion of the physical memory and permit access the data to be accessed from the extent; and wherein there are N computerized devices forming a distributed computer system;
wherein a shared physical memory range is divided into M extents;
wherein each of the N computerized devices is configured to be the home of a respective subset of the M extents in a predefined manner; and
wherein the page fault handler, when transferring the data from the other computerized device into the extent of the shared portion of the physical memory, is configured to;perform a set of masked atomic compare and swap operations to acquire, as the data, information which is shared among each of the N computerized devices forming the distributed computer system. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
-
21. A shared memory system, comprising:
-
multiple computerized devices; and a communications medium connecting the computerized devices to each other;
each computerized device having local physical memory, an internodal communications interface, and a controller coupled to the physical memory and the internodal communications interface, the controller having virtual memory related components including (i) a translation lookaside buffer, (ii) a page table which maps a local virtual memory range and a shared virtual memory range to the physical memory, and (iii) a page fault handler, the page fault handler being configured to;receive a request for data and determining whether a page hit or a page fault has occurred based on an examination of virtual memory metadata; in response to a determined page hit where the data resides in the physical memory, provide access to the data residing in the physical memory; in response to a determined page fault where the data resides in the physical memory, provide access to the data residing in the physical memory; and in response to a determined page fault where the data does not reside in the physical memory, move the data (i) from secondary memory into the physical memory when the virtual address of the request falls within the local virtual memory range and (ii) from another computerized device through the internodal communications interface and the communications medium into the physical memory when the virtual address of the request falls within the shared virtual memory range;
wherein moving the data from the other computerized device into the physical memory involves performing a set of masked atomic compare and swap operations to acquire, as the data, information which is distributed among the multiple computerized devices. - View Dependent Claims (22, 23, 24)
-
Specification