Online classification of memory pages based on activity level represented by one or more bits
First Claim
1. A method of classifying an activity level of memory pages that are accessed by one or more virtual machines executing in a host machine, comprising:
- setting a scan rate that defines how frequently page table entries of hypervisor-managed page tables corresponding to the memory pages are to be scanned;
scanning the page table entries over multiple scan periods at the scan rate, wherein the page table entries are scanned once during a scan period; and
for each of the memory pages and at each scan period in the multiple scan periods, determining an activity level of the memory page using a finite state machine that includes a plurality of states, wherein, at each scan period, the finite state machine determines access information for the memory page at each scan period based on whether the memory page has been accessed since a prior scan period, the memory page being determined to have been accessed according to a setting of an accessed or dirty bit of the scanned page table entry of the memory page, and determines a state transition for the memory page to another state based on a current state of the memory page and the access information for the memory page as determined for each scan period; and
storing the activity level of the memory page.
2 Assignments
0 Petitions
Accused Products
Abstract
Activity level of memory pages is classified in virtual machine environment, so that processes such as live VM migration and checkpointing, among others, can be carried out more efficiently. The method includes the steps of scanning page table entries of hypervisor-managed page tables continuously over repeating scan periods to determine whether memory pages have been accessed or not, and for each memory page, determining an activity level of the memory page based on whether the memory page has been accessed or not since a prior scan and storing the activity level of the memory page. The activity level of the memory page may be represented by one or more bits of its page table entry and may be classified as having at least two states ranging from hot to cold.
40 Citations
36 Claims
-
1. A method of classifying an activity level of memory pages that are accessed by one or more virtual machines executing in a host machine, comprising:
-
setting a scan rate that defines how frequently page table entries of hypervisor-managed page tables corresponding to the memory pages are to be scanned; scanning the page table entries over multiple scan periods at the scan rate, wherein the page table entries are scanned once during a scan period; and for each of the memory pages and at each scan period in the multiple scan periods, determining an activity level of the memory page using a finite state machine that includes a plurality of states, wherein, at each scan period, the finite state machine determines access information for the memory page at each scan period based on whether the memory page has been accessed since a prior scan period, the memory page being determined to have been accessed according to a setting of an accessed or dirty bit of the scanned page table entry of the memory page, and determines a state transition for the memory page to another state based on a current state of the memory page and the access information for the memory page as determined for each scan period; and storing the activity level of the memory page. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26)
-
-
27. A computer system including one or more virtual machines running therein, and a hypervisor for managing page tables that provide mappings from guest physical memory pages to machine memory pages, wherein the hypervisor is programmed to:
-
scan entries of the pages tables once over repeating scan periods in accordance with a scan rate and determine an activity level of a machine memory page corresponding to the scanned page table entry using a finite state machine that includes a plurality of states, wherein, at each scan period, the finite state machine determines access information for the memory page at each scan period based on whether an access or dirty bit of the scanned page table entry of the memory page is set and determines a state transition to another state for the machine memory page based on a current state of the machine memory page and the access information for the machine memory page as determined whether the access or dirty bit of the scanned page table entry is set for each scan period; and store the activity level of the machine memory page. - View Dependent Claims (28, 29, 30)
-
-
31. A non-transitory computer-readable storage medium comprising instructions, which when executed in a computer system including a hypervisor for managing page tables that provide mappings from guest physical memory pages to machine memory pages, causes the computer system to carry out the steps of:
-
scanning the page table entries of hypervisor-managed page tables over multiple scan periods according to a pre-defined scan rate, wherein the page table entries are scanned once during a scan period; and for each of the memory pages and at each scan period in the multiple scan periods, determining an activity level of the memory page using a finite state machine that includes a plurality of states, wherein, at each scan period, the finite state machine determines access information for the memory page at each scan period based on whether the memory page has been accessed since a prior scan period, the memory page being determined to have been accessed according to a setting of an accessed or dirty bit of the scanned page table entry of the memory page, and determines a state transition for the memory page to another state based on a current state of the memory page and the access information for the memory page as determined for each scan period; and storing the activity level of the memory page. - View Dependent Claims (32, 33, 34, 35, 36)
-
Specification