# US 2020/0401455 A1 · Virtual machine memory removal increment selection

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

- Number: US 2020/0401455 A1
- Document ID: US20200401455A1
- Status: Published application
- Kind: A1
- Application number: 16/445,281
- 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
- Web page: https://patentgrep.com/patent/US20200401455A1

## CPC

- G06F 9/5077: {Logical partitioning of resources; Management or configuration of virtualized resources (specific details on emulation or internal functioning of virtual machines G06F9/455)}
- G06F 3/0608: {Saving storage space on storage systems}
- G06F 3/0652: {Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0664: {at device level, e.g. emulation of a storage device or system}
- G06F 3/0665: {at area level, e.g. provisioning of virtual or logical volumes}
- G06F 3/0673: {Single storage device}
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 9/5022: {Mechanisms to release resources}
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F 2209/5011: Pool
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An aspect of the invention includes a method for receiving a request to reclaim a portion of a memory assigned to a virtual machine (VM). In response to receiving the request, an increment of the plurality of increments to vacate is selected. The selecting is based at least in part on the failure counts corresponding to each of the plurality of increments. An attempt is made to vacate all contents of the selected increment. Based at least in part on determining that all contents of the selected increment were not vacated, a failure count corresponding to the selected increment is incremented. Based at least in part on determining that all contents of the selected increment were vacated, an assignment of the selected increment to the VM is removed.

## Claims

### Claim 1

A computer-implemented method comprising:
receiving a request to reclaim a portion of a memory assigned to a virtual machine (VM), the memory divided into a plurality of increments, each increment having a corresponding failure count that indicates a number of failures associated with any previous attempts to vacate the increment;
in response to receiving the request, selecting an increment of the plurality of increments to vacate, the selecting based at least in part on the failure counts corresponding to each of the plurality of increments;
attempting to vacate all contents of the selected increment;
based at least in part on determining that all contents of the selected increment were not vacated, incrementing a failure count corresponding to the selected increment, the failure count one of the plurality of failure counts; and
based at least in part on determining that all contents of the selected increment were vacated, removing an assignment of the selected increment to the VM.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein vacating the selected increment comprises removing data stored in the increment.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein the failure count corresponding to the selected increment is lower than any other failure counts of the plurality of failure counts.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein the selecting is further based at least in part on an amount of unused space in each of the plurality of increments.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, wherein the failure count corresponding to the selected increment is one of a plurality of increments corresponding to a lowest failure count of the plurality of failure counts and the selected increment has more unused space than other increments of the plurality of increments having the lowest failure count.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein the portion is specified as a number of increments.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, wherein the selecting and attempting are repeated until a number of the plurality of increments corresponding to the size of the portion are vacated and their assignment to the VM removed.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, further comprising based at least in part on determining that all contents of the selected increment were not vacated, removing the assignment of the selected increment to the VM.

### Claim 9 (depends on 1)

The computer-implemented method of claim 1, wherein all of the contents of the selected increment were not vacated due to a time-out condition.

### 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 to reclaim a portion of a memory assigned to a virtual machine (VM), the memory divided into a plurality of increments, each increment having a corresponding failure count that indicates a number of failures associated with any previous attempts to vacate the increment;
in response to receiving the request, selecting an increment of the plurality of increments to vacate, the selecting based at least in part on the failure counts corresponding to each of the plurality of increments;
attempting to vacate all contents of the selected increment;
based at least in part on determining that all contents of the selected increment were not vacated, incrementing a failure count corresponding to the selected increment, the failure count one of the plurality of failure counts; and
based at least in part on determining that all contents of the selected increment were vacated, removing an assignment of the selected increment to the VM.

### Claim 11 (depends on 10)

The system of claim 10, wherein vacating the selected increment comprises removing data stored in the increment.

### Claim 12 (depends on 10)

The system of claim 10, wherein the failure count corresponding to the selected increment is lower than any other failure counts of the plurality of failure counts.

### Claim 13 (depends on 10)

The system of claim 10, wherein the selecting is further based at least in part on an amount of unused space in each of the plurality of increments.

### Claim 14 (depends on 10)

The system of claim 10, wherein the failure count corresponding to the selected increment is one of a plurality of increments corresponding to a lowest failure count of the plurality of failure counts and the selected increment has more unused space than other increments of the plurality of increments having the lowest failure count.

### Claim 15 (depends on 10)

The system of claim 10, wherein the selecting and attempting are repeated until a number of the plurality of increments corresponding to the size of the portion are vacated and their assignment to the VM removed.

### Claim 16 (depends on 10)

The system of claim 10, wherein the operations further comprise, based at least in part on determining that all contents of the selected increment were not vacated, removing the assignment of the selected increment to the VM.

### Claim 17 (depends on 10)

The system of claim 10, wherein all of the contents of the selected increment were not vacated due to a time-out condition.

### Claim 18

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 to reclaim a portion of a memory assigned to a virtual machine (VM), the memory divided into a plurality of increments, each increment having a corresponding failure count that indicates a number of failures associated with any previous attempts to vacate the increment;
in response to receiving the request, selecting a memory increment of the plurality of memory increments to vacate, the selecting based at least in part on the failure counts corresponding to each of the plurality of memory increments;
attempting to vacate all contents of the selected memory increment;
based at least in part on determining that all contents of the selected memory increment were not vacated, incrementing a failure count corresponding to the selected increment, the failure count one of the plurality of failure counts; and
based at least in part on determining that all contents of the selected increment were vacated, removing an assignment of the selected increment to the VM.

### Claim 19 (depends on 18)

The computer program product of claim 18, wherein the failure count corresponding to the selected increment is lower than any other failure counts of the plurality of failure counts.

### Claim 20 (depends on 18)

The computer program product of claim 18, wherein the failure count corresponding to the selected increment is one of a plurality of increments corresponding to a lowest failure count of the plurality of failure counts and the selected increment has more unused space than other increments of the plurality of increments having the lowest failure count.
