IP Library Granted Patent US 9,996,370
Granted Patent B1
US 9,996,370 · App. 13/860,581 · Granted Jun 12, 2018

Page swapping in virtual machine environment

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,996,370
App. No.
13/860,581
Granted
Jun 12, 2018
Kind
B1
Abstract

Disclosed are examples of memory allocation and reallocation for virtual machines operating in a shared memory configuration creating a swap file for at least one virtual machine. One example method may include allocating guest physical memory to the swap file to permit the at least one virtual machine to access host physical memory previously occupied by the guest physical memory. The example method may also include determining whether an amount of available host physical memory is below a minimum acceptable level threshold, and if so then freeing at least one page of host physical memory and intercepting a memory access attempt performed by the at least one virtual machine and allocating host physical memory to the virtual machine responsive to the memory access attempt.

Claims (40)

1. A method comprising:

creating, via a processor, a swap file for at least one virtual machine;

allocating guest physical memory to the swap file to permit the at least one virtual machine to access host physical memory previously occupied by the guest physical memory;

determining whether an amount of available host physical memory for a client operating system is below a minimum acceptable level threshold, and if so then freeing at least one page of host physical memory;

retrieving available guest virtual memory levels for each client operating system of a plurality of client operating systems;

identifying whether any of the plurality of client operating systems' current guest virtual memory levels have fallen below an acceptable predefined threshold;

when at least one of the plurality of client operating systems' current guest virtual memory levels has fallen below the acceptable predefined threshold, then identifying at least one page of guest virtual memory from at least one client operating system that is not operating below the acceptable predefined threshold and that is identified as being least active;

swapping the at least one page of guest virtual memory from the at least one client operating system that is not operating below the acceptable predefined threshold and that is least active and allocating the at least one page of guest virtual memory to the client operating system that has fallen below the acceptable predefined threshold; and

intercepting a memory access attempt performed by the at least one virtual machine and allocating host physical memory to the at least one virtual machine responsive to a memory access attempt by the at least one virtual machine.

2. The method of claim 1 , wherein if the amount of free host physical memory is not below the minimum acceptable level threshold then periodically re-determining whether the amount of free host physical memory is below the minimum acceptable level threshold.

3. The method of claim 1 , wherein the at least one virtual machine comprises a plurality of virtual machines.

4. The method of claim 3 , wherein the plurality of client operating systems are different operating systems having different default memory page sizes.

5. The method of claim 1 , wherein the allocating of guest physical memory is performed by a hypervisor managing a plurality of virtual machines.

6. An apparatus comprising:

a processor configured to

create a swap file for at least one virtual machine;

allocate guest physical memory to the swap file to permit the at least one virtual machine to access host physical memory previously occupied by the guest physical memory,

determine whether an amount of available host physical memory is below a minimum acceptable level threshold, and if so then freeing at least one page of host physical memory,

retrieve available guest virtual memory levels for each client operating system of a plurality of client operating systems,

identify whether any of the plurality of client operating systems' current guest virtual memory levels have fallen below an acceptable predefined threshold,

when at least one of the plurality of client operating systems' current guest virtual memory levels has fallen below the acceptable predefined threshold, then identify at least one page of guest virtual memory from at least one client operating system that is not operating below the acceptable predefined threshold at that is identified as being least active;

swap the at least one page of guest virtual memory from the at least one client operating system that is not operating below the acceptable predefined threshold and that is least active and allocate the at least one page of guest virtual memory to the client operating system that has fallen below the acceptable predefined threshold, and

intercept a memory access attempt performed by the at least one virtual machine and allocate host physical memory to the at least one virtual machine responsive to a memory access attempt by the at least one virtual machine; and

a memory configured to be allocated to provide the guest physical memory and the host physical memory.

7. The apparatus of claim 6 , wherein if the amount of free host physical memory is not below the minimum acceptable level threshold then the processor periodically re-determines whether the amount of free host physical memory is below the minimum acceptable level threshold.

8. The apparatus of claim 6 , wherein the at least one virtual machine comprises a plurality of virtual machines.

9. The apparatus of claim 6 , wherein the plurality of client operating systems are different operating systems having different default memory page sizes.

10. The apparatus of claim 6 , wherein the allocation of guest physical memory is performed by a hypervisor managing a plurality of virtual machines.

11. A non-transitory computer readable storage medium configured to store instructions that when executed cause a processor to perform:

creating, via a processor, a swap file for at least one virtual machine;

allocating guest physical memory to the swap file to permit the at least one virtual machine to access host physical memory previously occupied by the guest physical memory;

determining whether an amount of available host physical memory for a client operating system is below a minimum acceptable level threshold, and if so then freeing at least one page of host physical memory;

retrieving available guest virtual memory levels for each client operating system of a plurality of client operating systems;

identifying whether any of the plurality of client operating systems' current guest virtual memory levels have fallen below an acceptable predefined threshold;

when at least one of the plurality of client operating systems' current guest virtual memory levels has fallen below the acceptable predefined threshold, then identifying at least one page of guest virtual memory from at least one client operating system that is not operating below the acceptable predefined threshold and that is identified as being least active;

swapping the at least one page of guest virtual memory from the at least one client operating system that is not operating below the acceptable predefined threshold and that is least active and allocating the at least one page of guest virtual memory to the client operating system that has fallen below the acceptable predefined threshold; and

intercepting a memory access attempt performed by the at least one virtual machine and allocating host physical memory to the at least one virtual machine responsive to a memory access attempt by the at least one virtual machine.

12. The non-transitory computer readable storage medium of claim 11 , wherein if the amount of free host physical memory is not below the minimum acceptable level threshold then periodically re-determining whether the amount of free host physical memory is below the minimum acceptable level threshold.

13. The non-transitory computer readable storage medium of claim 11 , wherein the at least one virtual machine comprises a plurality of virtual machines.

14. The non-transitory computer readable storage medium of claim 11 , wherein the plurality of client operating systems are different operating systems having different default page sizes and the allocating of guest physical memory is performed by a hypervisor managing a plurality of virtual machines.

Assignments (3)
CORRECTIVE ASSIGNMENT TO CORRECT THE EFFECTIVE DATE OF THE PATENT ASSIGNMENT AGREEMENT DATED NOVEMBER 30, 2021 PREVIOUSLY RECORDED AT REEL: 058426 FRAME: 0791. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Jan 14, 2022
From: OPEN INVENTION NETWORK LLC
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 058736/0436 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2021
From: OPEN INVENTION NETWORK LLC
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 058426/0791 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 11, 2013
From: KHAFIZOV, FARID; MOKHOV, ANDREY
To: OPEN INVENTION NETWORK LLC
Reel/Frame 030193/0983 →