P
US9058287B2ActiveUtilityPatentIndex 62

Relocating page tables and data amongst memory modules in a virtualized environment

Assignee: JACOBS STUART ZPriority: Jan 13, 2010Filed: Aug 27, 2012Granted: Jun 16, 2015
Est. expiryJan 13, 2030(~3.5 yrs left)· nominal 20-yr term from priority
Inventors:JACOBS STUART ZLARSON DAVID AOUREN WADE BPROSSER EDWARD CVOSSEN KENNETH C
G06F 9/505G06F 12/1027G06F 12/1009G06F 9/5088
62
PatentIndex Score
3
Cited by
35
References
20
Claims

Abstract

Relocating data in a virtualized environment maintained by a hypervisor administering access to memory with a Cache Page Table (‘CPT’) and a Physical Page Table (‘PPT’), the CPT and PPT including virtual to physical mappings. Relocating data includes converting the virtual to physical mappings of the CPT to virtual to logical mappings; establishing a Logical Memory Block (‘LMB’) relocation tracker that includes logical addresses of an LMB, source physical addresses of the LMB, target physical addresses of the LMB, a translation block indicator for each relocation granule, and a pin count associated with each relocation granule; establishing a PPT entry tracker including PPT entries corresponding to the LMB to be relocated; relocating the LMB in a number of relocation granules including blocking translations to the relocation granules during relocation; and removing the logical addresses from the LMB relocation tracker.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A method of relocating page tables amongst memory modules in a virtualized environment, the page tables comprising a Cache Page Table (‘CPT’), the CPT comprising virtual to logical address mappings, the CPT accessible by an operating system executing in a partition of the virtualized environment maintained by a hypervisor, the method comprising:
 relocating the CPT in portions from a source memory location to a target memory location, each portion of the CPT including one or more CPT entries, wherein relocating the CPT in portions includes:
 initializing an index value representing a next CPT entry to be relocated; and 
 for each portion: suspending the partition, relocating the portion to the target memory location, setting the index value to represent the next CPT entry of the portion to be relocated, and resuming operation of the partition. 
 
 
     
     
       2. The method of  claim 1  wherein relocating the CPT in portions further comprises:
 prior to relocating all portions of the CPT: 
 receiving an access request for a particular entry of the CPT; 
 determining, in dependence upon the index value, whether the particular entry has been relocated; 
 if the particular entry has been relocated, accessing the entry at the target memory location; and 
 if the particular entry has not been relocated, accessing the particular entry at the source memory location. 
 
     
     
       3. The method of  claim 1  further comprising:
 forming, upon entering a virtualized partition memory (‘VPM’) mode, the CPT. 
 
     
     
       4. A method of relocating data amongst memory modules in a virtualized environment maintained by a hypervisor, the hypervisor administering access to memory by a partition with a Physical Page Table (‘PPT’), the PPT comprising virtual to physical address mappings, the PPT accessible by a computer processor, the method comprising:
 establishing a Logical Memory Block (‘LMB’) relocation tracker, the LMB relocation tracker comprising logical addresses of an LMB to be relocated, source physical addresses of the LMB to be relocated, target physical addresses of the LMB to be relocated, a translation block indicator for each relocation granule of the LMB, and a pin count associated with each relocation granule, the pin count representing a number of outstanding translations to the associated relocation granule; 
 establishing a PPT entry tracker including PPT entries corresponding to the LMB to be relocated; 
 relocating the LMB in a number of relocation granules in dependence upon the PPT entry tracker and the LMB relocation tracker including blocking translations to the relocation granules during relocation; and 
 upon relocation of all granules in the LMB, removing, from the LMB relocation tracker, the logical addresses of the LMB to be relocated. 
 
     
     
       5. The method of  claim 4  wherein relocating the LMB in a number of relocation granules further comprises:
 for each relocation granule of the LMB: 
 blocking translations to the relocation granule; 
 waiting for the pin count associated with the relocation granule to represent no outstanding translations to the relocation granule; 
 invalidating PPT entries for the relocation granule using the PPT entry tracker; and 
 relocating the relocation granule to a target physical address specified in the LMB relocation tracker. 
 
     
     
       6. The method of  claim 4  relocating the LMB in a number of relocation granules further comprises:
 receiving a translation request to a particular relocation granule that is presently relocating; 
 setting a virtual processor of the partition to sleep until relocation of the particular relocation granule is complete; and 
 upon relocation of the particular relocation granule in the LMB, releasing the virtual processor from sleep. 
 
     
     
       7. The method of  claim 4  wherein establishing a PPT entry tracker includes:
 initializing a PPT entry index value representing a first untracked PPT entry; 
 for each PPT entry corresponding to the LMB to relocated, beginning with the first untracked PPT entry:
 setting a lock blocking access to the PPT entry; 
 tracking the PPT entry in the PPT entry tracker; 
 incrementing the PPT entry index value; and 
 releasing the lock blocking access to the PPT entry; and 
 
 during the tracking of all PPT entries corresponding to the LMB to be relocated to the PPT entry tracker:
 receiving a request to add a PPT entry; 
 setting a lock blocking access to the PPT entry; 
 determining in dependence upon the PPT entry index value whether the PPT entry has been previously tracked in the PPT entry tracker; 
 if the PPT entry has been previously tracked in the PPT entry tracker, replacing the previously copied virtual to physical address mapping with a virtual to physical address mapping included in the request to add the PPT entry; and 
 if the PPT entry has not been previously tracked in the PPT entry tracker, adding the PPT entry without tracking the PPT entry in the PPT entry tracker. 
 
 
     
     
       8. The method of  claim 4  further comprising:
 after establishing the LMB relocation tracker, receiving an indication that all computer processors have returned from the hypervisor. 
 
     
     
       9. An apparatus for relocating data amongst memory modules in a virtualized environment maintained by a hypervisor, the hypervisor administering access to memory by a partition with a Physical Page Table (‘PPT’), the PPT comprising virtual to physical address mappings, the PPT accessible by a computer processor, the apparatus comprising the computer processor, computer memory operatively coupled to the computer processor, the computer memory having disposed within it computer program instructions capable of:
 establishing a Logical Memory Block (‘LMB’) relocation tracker, the LMB relocation tracker comprising logical addresses of an LMB to be relocated, source physical addresses of the LMB to be relocated, target physical addresses of the LMB to be relocated, a translation block indicator for each relocation granule of the LMB, and a pin count associated with each relocation granule, the pin count representing a number of outstanding translations to the associated relocation granule; 
 establishing a PPT entry tracker including PPT entries corresponding to the LMB to be relocated; 
 relocating the LMB in a number of relocation granules in dependence upon the PPT entry tracker and the LMB relocation tracker including blocking translations to the relocation granules during relocation; and 
 upon relocation of all granules in the LMB, removing, from the LMB relocation tracker, the logical addresses of the LMB to be relocated. 
 
     
     
       10. The apparatus of  claim 9  wherein relocating the LMB in a number of relocation granules further comprises:
 for each relocation granule of the LMB: 
 blocking translations to the relocation granule; 
 waiting for the pin count associated with the relocation granule to represent no outstanding translations to the relocation granule; 
 invalidating PPT entries for the relocation granule using the PPT entry tracker; and 
 relocating the relocation granule to a target physical address specified in the LMB relocation tracker. 
 
     
     
       11. The apparatus of  claim 9  relocating the LMB in a number of relocation granules further comprises:
 receiving a translation request to a particular relocation granule that is presently relocating; 
 setting a virtual processor of the partition to sleep until relocation of the particular relocation granule is complete; and 
 upon relocation of the particular relocation granule in the LMB, releasing the virtual processor from sleep. 
 
     
     
       12. The apparatus of  claim 9  wherein establishing a PPT entry tracker includes:
 initializing a PPT entry index value representing a first untracked PPT entry; 
 for each PPT entry corresponding to the LMB to relocated, beginning with the first untracked PPT entry:
 setting a lock blocking access to the PPT entry; 
 tracking the PPT entry in the PPT entry tracker; 
 incrementing the PPT entry index value; and 
 releasing the lock blocking access to the PPT entry; and 
 
 during the tracking of all PPT entries corresponding to the LMB to be relocated to the PPT entry tracker:
 receiving a request to add a PPT entry; 
 setting a lock blocking access to the PPT entry; 
 determining in dependence upon the PPT entry index value whether the PPT entry has been previously tracked in the PPT entry tracker; 
 if the PPT entry has been previously tracked in the PPT entry tracker, replacing the previously copied virtual to physical address mapping with a virtual to physical address mapping included in the request to add the PPT entry; and 
 if the PPT entry has not been previously tracked in the PPT entry tracker, adding the PPT entry without tracking the PPT entry in the PPT entry tracker. 
 
 
     
     
       13. The apparatus of  claim 9  further comprising computer program instructions capable of:
 after establishing the LMB relocation tracker, receiving an indication that all computer processors have returned from the hypervisor. 
 
     
     
       14. A computer program product for relocating data amongst memory modules in a virtualized environment maintained by a hypervisor, the hypervisor administering access to memory by a partition with a Physical Page Table (‘PPT’), the PPT comprising virtual to physical address mappings, the PPT accessible by a computer processor, the computer program product disposed in a computer readable storage medium, wherein the computer readable storage medium is not a signal, the computer program product comprising computer program instructions that, when executed by a computer, cause the computer to carry out the steps of:
 establishing a Logical Memory Block (‘LMB’) relocation tracker, the LMB relocation tracker comprising logical addresses of an LMB to be relocated, source physical addresses of the LMB to be relocated, target physical addresses of the LMB to be relocated, a translation block indicator for each relocation granule of the LMB, and a pin count associated with each relocation granule, the pin count representing a number of outstanding translations to the associated relocation granule; 
 establishing a PPT entry tracker including PPT entries corresponding to the LMB to be relocated; 
 relocating the LMB in a number of relocation granules in dependence upon the PPT entry tracker and the LMB relocation tracker including blocking translations to the relocation granules during relocation; and 
 upon relocation of all granules in the LMB, removing, from the LMB relocation tracker, the logical addresses of the LMB to be relocated. 
 
     
     
       15. The computer program product of  claim 14  wherein relocating the LMB in a number of relocation granules further comprises:
 for each relocation granule of the LMB: 
 blocking translations to the relocation granule; 
 waiting for the pin count associated with the relocation granule to represent no outstanding translations to the relocation granule; 
 invalidating PPT entries for the relocation granule using the PPT entry tracker; and 
 relocating the relocation granule to a target physical address specified in the LMB relocation tracker. 
 
     
     
       16. The computer program product of  claim 14  relocating the LMB in a number of relocation granules further comprises:
 receiving a translation request to a particular relocation granule that is presently relocating; 
 setting a virtual processor of the partition to sleep until relocation of the particular relocation granule is complete; and 
 upon relocation of the particular relocation granule in the LMB, releasing the virtual processor from sleep. 
 
     
     
       17. The computer program product of  claim 14  wherein establishing a PPT entry tracker includes:
 initializing a PPT entry index value representing a first untracked PPT entry; 
 for each PPT entry corresponding to the LMB to relocated, beginning with the first untracked PPT entry:
 setting a lock blocking access to the PPT entry; 
 tracking the PPT entry in the PPT entry tracker; 
 incrementing the PPT entry index value; and 
 releasing the lock blocking access to the PPT entry; and 
 
 during the tracking of all PPT entries corresponding to the LMB to be relocated to the PPT entry tracker:
 receiving a request to add a PPT entry; 
 setting a lock blocking access to the PPT entry; 
 determining in dependence upon the PPT entry index value whether the PPT entry has been previously tracked in the PPT entry tracker; 
 if the PPT entry has been previously tracked in the PPT entry tracker, replacing the previously copied virtual to physical address mapping with a virtual to physical address mapping included in the request to add the PPT entry; and 
 if the PPT entry has not been previously tracked in the PPT entry tracker, adding the PPT entry without tracking the PPT entry in the PPT entry tracker. 
 
 
     
     
       18. The computer program product of  claim 14  further comprising computer program instructions capable of:
 after establishing the LMB relocation tracker, receiving an indication that all computer processors have returned from the hypervisor. 
 
     
     
       19. The computer program product of  claim 14  wherein the computer readable storage medium comprises a recordable medium. 
     
     
       20. The computer program product of  claim 14  wherein the computer readable storage medium comprises a transmission medium.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.