Shortcut input/output in virtual machine systems
First Claim
Patent Images
1. A method of processing read I/O requests in a computer system having applications running therein, the applications including virtual memory pages mapped to machine memory pages, the method comprising:
- maintaining a tracking data structure for a first group of machine memory pages, each having at least two virtual memory pages mapped thereto, and a second group of machine memory pages, each having only one virtual memory page mapped thereto, the tracking data structure indicating, for each of said machine memory pages, a corresponding location in a storage volume from which its contents were read or are being read;
receiving a read request;
identifying a first location of the storage volume indicated in the read request;
calculating, using the tracking data structure, a likelihood that the first location of the storage volume will be shared;
determining that the likelihood exceeds a threshold value;
based on the determination that the likelihood exceeds the threshold value;
determining, using the tracking data structure, that a machine memory page in the first group or the second group contains or will contain data stored in the first location of the storage volume indicated in the read request;
based on the determination that a machine memory page in the first group or the second group contains or will contain data stored in a location of the storage volume indicated in the read request, determining not to process the read request; and
based on the determination to not process the read request, mapping a virtual memory page associated with the read request to the machine memory page; and
in response to a first memory write request, copying the contents of a machine memory page in the first group to a first machine memory page, and mapping a virtual memory page associated with the first memory write request to the first machine memory page; and
in response to a second memory write request, copying the contents of a machine memory page in the second group to a second machine memory page, and mapping a virtual memory page associated with the second memory write request to the second machine memory page.
2 Assignments
0 Petitions
Accused Products
Abstract
Read requests to a commonly accessed storage volume are conditionally issued, depending on whether or not a requested data block is already stored in memory from a prior access or to be stored in memory upon completion of a pending request. A data structure is maintained in memory to track physical memory pages and to indicate for each physical memory page the corresponding location in the storage volume from which the contents of the physical memory were read and the number of virtual memory pages that are mapped thereto.
-
Citations
20 Claims
-
1. A method of processing read I/O requests in a computer system having applications running therein, the applications including virtual memory pages mapped to machine memory pages, the method comprising:
-
maintaining a tracking data structure for a first group of machine memory pages, each having at least two virtual memory pages mapped thereto, and a second group of machine memory pages, each having only one virtual memory page mapped thereto, the tracking data structure indicating, for each of said machine memory pages, a corresponding location in a storage volume from which its contents were read or are being read; receiving a read request; identifying a first location of the storage volume indicated in the read request; calculating, using the tracking data structure, a likelihood that the first location of the storage volume will be shared; determining that the likelihood exceeds a threshold value; based on the determination that the likelihood exceeds the threshold value; determining, using the tracking data structure, that a machine memory page in the first group or the second group contains or will contain data stored in the first location of the storage volume indicated in the read request; based on the determination that a machine memory page in the first group or the second group contains or will contain data stored in a location of the storage volume indicated in the read request, determining not to process the read request; and based on the determination to not process the read request, mapping a virtual memory page associated with the read request to the machine memory page; and in response to a first memory write request, copying the contents of a machine memory page in the first group to a first machine memory page, and mapping a virtual memory page associated with the first memory write request to the first machine memory page; and in response to a second memory write request, copying the contents of a machine memory page in the second group to a second machine memory page, and mapping a virtual memory page associated with the second memory write request to the second machine memory page. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A method of processing read I/O requests in a computer system having applications running therein, the applications including virtual memory pages mapped to machine memory pages, the method comprising:
-
maintaining a tracking data structure for a first group of machine memory pages, each having at least two virtual memory pages mapped thereto, a second group of machine memory pages, each having only one virtual memory page mapped thereto, and a third group of machine memory pages, each having no virtual memory pages mapped thereto, the tracking data structure indicating, for each of said machine memory pages, a corresponding location in a storage volume from which its contents were read or are being read, and a reference count indicating how many virtual memory pages are mapped to the machine memory page; receiving a read request; identifying a first location of the storage volume indicated in the read request; calculating, using the tracking data structure, a likelihood that the first location of the storage volume will be shared; determining that the likelihood exceeds a threshold value; and based on the determination that the likelihood exceeds the threshold value, mapping a virtual memory page associated with the read request to a machine memory page in one of the first, second, and third groups, and incrementing the reference count associated with the machine memory page. - View Dependent Claims (11, 12, 13, 14)
-
-
15. A method of processing read I/O requests in a computer system having virtual machines running therein, the virtual machines including guest virtual memory pages mapped to machine memory pages via guest physical memory pages, the method comprising:
-
maintaining a tracking data structure for a set of machine memory pages, the tracking data structure indicating, for each of said machine memory pages, a corresponding location in a storage volume from which its contents were read or are being read, a reference count indicating how many virtual memory pages are mapped to the machine memory page, and a pending status flag indicating whether or not a read from the storage volume is pending; receiving a read request; identifying a first location of the storage volume indicated in the read request; calculating, using the tracking data structure, a likelihood that the first location of the storage volume will be shared; determining that the likelihood exceeds a threshold value; and based on the determination that the likelihood exceeds the threshold value; determining, using the tracking data structure, if one of the machine memory pages being tracked contains or will contain data stored in a location of the storage volume indicated in the read request; based on the determination one of the machine memory pages being tracked contains or will contain data stored in a location of the storage volume indicated in the read request, determining not to process the read request; and based on the determination to not process the read request, mapping a guest physical memory page associated with the read request to the machine memory page; and if there is no machine memory page being tracked that contains or will contain data stored in a location of the storage volume indicated in the read request, issuing a request to the storage volume for the data stored in the first location of the storage volume indicated in the read request, mapping a guest physical memory page associated with the read request to the machine memory page in which the requested data will be stored, and adding a new entry to a data structure containing page sharing hints, the new entry identifying the guest physical memory page associated with the read request and the virtual machine associated with the guest physical memory page. - View Dependent Claims (16)
-
-
17. A computer system comprising:
-
a host platform for virtual machines; and a storage volume connected thereto, the host platform for virtual machines including one or more processors and machine memory, the machine memory having stored therein a tracking data structure for a first group of machine memory pages, each having at least two virtual memory pages mapped thereto, a second group of machine memory pages, each having only one virtual memory page mapped thereto, and a third group of machine memory pages, each having no virtual memory pages mapped thereto, the tracking data structure indicating, for each of said machine memory pages, a corresponding location in a storage volume from which its contents were read or are being read, and a reference count indicating how many virtual memory pages are mapped to the machine memory page, and a pending status flag indicating whether or not a read from the storage volume is pending, wherein a read request issued by any of the virtual machines is conditionally issued to the storage volume based on the tracking data structure; and wherein the one or more processors are programmed to; receiving a read request; identifying a first location of the storage volume indicated in the read request; calculating, using the tracking data structure, a likelihood that the first location of the storage volume will be shared; determining that the likelihood exceeds a threshold value; and based on the determination that the likelihood exceeds the threshold value, map a virtual memory page associated with the read request to a machine memory page in one of the first, second, and third groups. - View Dependent Claims (18, 19, 20)
-
Specification