# US 2020/0401433 A1 · Self-determination for cancellation of in-progress memory removal from a virtual machine

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2020/0401433 A1
- Document ID: US20200401433A1
- Status: Published application
- Kind: A1
- Application number: 16/445,278
- Filed: 2019-06-19
- Published: 2020-12-24
- Earliest claimed: 2019-06-19
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Walter Church, IV; Ronald C. Pierson; Thomas Mathias
- Web page: https://patentgrep.com/patent/US20200401433A1

## CPC

- G06F 9/45533: {Hypervisors; Virtual machine monitors}
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 12/0238: {Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory}
- G06F 12/0284: {Multiple user address space allocation, e.g. using different base addresses (interprocessor communication G06F15/163)}
- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An aspect of the invention is a method that includes receiving a request from a requestor to reclaim a portion of a memory assigned to a virtual machine (VM). The memory includes real memory that is divided into a plurality of increments. An amount of paging space that will be occupied by the VM subsequent to reclaiming the portion of the memory is predicted. Based on the predicted amount of paging space exceeding a threshold, the requestor is notified that the portion of the memory cannot be reclaimed. Based on the predicted amount of paging space not exceeding the threshold, a reclamation of the portion of the memory is initiated. The reclamation includes vacating an increment of the plurality of increments and removing an assignment of the increment to the VM.

## Claims

### Claim 1

A method comprising:
receiving a request from a requestor to reclaim a portion of a memory assigned to a virtual machine (VM), the memory comprising real memory divided into a plurality of increments;
predicting an amount of paging space that will be occupied by the VM subsequent to reclaiming the portion of the memory;
based on the predicted amount of paging space exceeding a threshold, notifying the requestor that the portion of the memory cannot be not reclaimed; and
based on the predicted amount of paging space not exceeding the threshold, initiating a reclamation of the portion of the memory, the reclamation comprising vacating an increment of the plurality of increments and removing an assignment of the increment to the VM.

### Claim 2 (depends on 1)

The method of claim 1, wherein the predicting is based at least in part on a size of the paging space and an amount of the paging space that is currently occupied.

### Claim 3 (depends on 2)

The method of claim 2, wherein the predicting is further based at least in part on a current paging rate of the VM.

### Claim 4 (depends on 1)

The method of claim 1, further comprising, prior to the reclamation of the portion of the memory completing:
updating the predicted amount of paging space that will be occupied by the VM subsequent to reclaiming the portion of the memory; and
based on the updated predicted amount of paging space exceeding the threshold, halting the reclamation.

### Claim 5 (depends on 4)

The method of claim 4, wherein the updating is performed periodically prior to the reclamation of the portion of the memory completing.

### Claim 6 (depends on 4)

The method of claim 4, wherein the portion is specified as a number of increments and the updating is performed prior to vacating an additional increment of the plurality of increments.

### Claim 7 (depends on 1)

The method of claim 1, wherein the threshold is a user defined threshold included in the request.

### Claim 8 (depends on 1)

The method of claim 1, wherein the vacating comprises:
moving contents of the increment to existing free space on other increments of the plurality of increments; and
based on consuming all of the existing free space on the other increments, moving remaining contents of the increment to the paging space.

### Claim 9 (depends on 1)

The method of claim 1, wherein the threshold is maximum paging percentage.

### Claim 10

A system comprising:
a memory having computer readable instructions; and
one or more processors for executing the computer readable instructions, the computer readable instructions controlling the one or more processors to perform operations comprising:
receiving a request from a requestor to reclaim a portion of a memory assigned to a virtual machine (VM), the memory comprising real memory divided into a plurality of increments;
predicting an amount of paging space that will be occupied by the VM subsequent to reclaiming the portion of the memory;
based on the predicted amount of paging space exceeding a threshold, notifying the requestor that the portion of the memory cannot be not reclaimed; and
based on the predicted amount of paging space not exceeding the threshold, initiating a reclamation of the portion of the memory, the reclamation comprising vacating an increment of the plurality of increments and removing an assignment of the increment to the VM.

### Claim 11 (depends on 10)

The system of claim 10, wherein the predicting is based at least in part on a size of the paging space and an amount of the paging space that is currently occupied.

### Claim 12 (depends on 11)

The system of claim 11, wherein the predicting is further based at least in part on a current paging rate of the VM.

### Claim 13 (depends on 10)

The system of claim 10, wherein the operations further comprise, prior to the reclamation of the portion of the memory completing:
updating the predicted amount of paging space that will be occupied by the VM subsequent to reclaiming the portion of the memory; and
based on the updated predicted amount of paging space exceeding the threshold, halting the reclamation.

### Claim 14 (depends on 13)

The system of claim 13, wherein the updating is performed periodically prior to the reclamation of the portion of the memory completing.

### Claim 15 (depends on 13)

The system of claim 13, wherein the portion is specified as a number of increments and the updating is performed prior to vacating an additional increment of the plurality of increments.

### Claim 16 (depends on 10)

The system of claim 10, wherein the threshold is a user defined threshold included in the request.

### Claim 17 (depends on 10)

The system of claim 10, wherein the vacating comprises:
moving contents of the increment to existing free space on other increments of the plurality of increments; and
based on consuming all of the existing free space on the other increments, moving remaining contents of the increment to the paging space.

### Claim 18 (depends on 10)

The system of claim 10, wherein the threshold is maximum paging percentage.

### Claim 19

A computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to perform operations comprising:
receiving a request from a requestor to reclaim a portion of a memory assigned to a virtual machine (VM), the memory comprising real memory divided into a plurality of increments;
predicting an amount of paging space that will be occupied by the VM subsequent to reclaiming the portion of the memory;
based on the predicted amount of paging space exceeding a threshold, notifying the requestor that the portion of the memory cannot be not reclaimed; and
based on the predicted amount of paging space not exceeding the threshold, initiating a reclamation of the portion of the memory, the reclamation comprising vacating an increment of the plurality of increments and removing an assignment of the increment to the VM.

### Claim 20 (depends on 19)

The computer program product of claim 19, wherein the operations further comprise, prior to the reclamation of the portion of the memory completing:
updating the predicted amount of paging space that will be occupied by the VM subsequent to reclaiming the portion of the memory; and
based on the updated predicted amount of paging space exceeding the threshold, halting the reclamation.
