# US 2019/0171473 A1 · Resetting persistent balloon memory for fragmentation reduction

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

- Number: US 2019/0171473 A1
- Document ID: US20190171473A1
- Status: Published application
- Kind: A1
- Application number: 15/829,020
- Filed: 2017-12-01
- Published: 2019-06-06
- Earliest claimed: 2017-12-01
- Assignees: Red Hat, Inc.
- Applicants: Red Hat, Inc.
- Inventors: David Hildenbrand; Michael Tsirkin
- Web page: https://patentgrep.com/patent/US20190171473A1

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 12/023: {Free address space management}
- G06F 12/08: in hierarchically structured memory systems, e.g. virtual memory systems
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F 2212/1016: Performance improvement
- G06F 2212/1044: Space efficiency improvement
- G06F 2212/152: Virtualized environment, e.g. logically partitioned system
- G06F 2212/657: Virtual address space management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A balloon memory fragmentation reduction system includes a memory, at least one processor in communication with the memory, a guest operating system (OS) including a device driver, and a hypervisor executing on the at least one processor. The hypervisor is configured to record an amount of memory allocated by the device driver of the guest OS, locate a contiguous region of guest memory addresses according to the amount of memory allocated by the device driver, reserve the contiguous region of guest memory addresses, and notify the guest OS that the contiguous region of guest memory addresses is reserved.

## Claims

### Claim 1

A system comprising;
a memory;
at least one processor in communication with the memory;
a guest operating system (OS) including a device driver; and
a hypervisor executing on the at least one processor, wherein the hypervisor is configured to:
record an amount of memory allocated by the device driver of the guest OS,
locate a contiguous region of guest memory addresses according to the amount of memory allocated by the device driver,
reserve the contiguous region of guest memory addresses, and
notify the guest OS that the contiguous region of guest memory addresses is reserved.

### Claim 2 (depends on 1)

The system of claim 1, wherein the hypervisor is further configured to locate a second contiguous region of guest memory addresses.

### Claim 3 (depends on 2)

The system of claim 2, wherein the contiguous region of guest memory addresses and the second contiguous region of guest memory addresses are reserved.

### Claim 4 (depends on 2)

The system of claim 2, wherein the second contiguous region of guest memory addresses is associated with the usable memory.

### Claim 5 (depends on 1)

The system of claim 1, wherein the guest OS is disabled from using the contiguous region of memory as the guest OS initializes.

### Claim 6 (depends on 1)

The system of claim 1, wherein the hypervisor is further configured to expose a balloon device to the guest OS, and the contiguous region of memory is associated with the balloon device.

### Claim 7 (depends on 6)

The system of claim 6, wherein the balloon device is associated with a non-uniform memory access node.

### Claim 8 (depends on 6)

The system of claim 6, wherein the hypervisor is further configured to:
expose a second balloon device to the guest OS,
locate a second contiguous region of guest memory addresses according to the amount of memory allocated by the device driver,
reserve the contiguous region of memory addresses for the balloon device,
reserve a the second contiguous region of memory addresses for the second balloon device, and
notify the guest OS that the second contiguous region of memory addresses is reserved.

### Claim 9 (depends on 8)

The system of claim 8, wherein the guest OS is disabled from using the second contiguous region of memory addresses.

### Claim 10

A method comprising:
recording, by the hypervisor, an amount of memory allocated by a device driver of a guest OS,
locating, by the hypervisor, a contiguous region of guest memory addresses according to the amount of memory allocated by the device driver,
reserving, by the hypervisor, the contiguous region of memory addresses, and
notifying, by the hypervisor, the guest OS that the contiguous region of memory addresses is reserved.

### Claim 11 (depends on 10)

The method of claim 10, further comprising:
locating a second contiguous region of guest memory addresses.

### Claim 12 (depends on 11)

The method of claim 11, further comprising:
disabling, by the hypervisor, the guest OS from using the contiguous region of guest memory addresses and the second region of guest memory addresses as the guest OS initializes.

### Claim 13 (depends on 11)

The method of claim 11, further comprising:
disabling, by the hypervisor, the guest OS from using the contiguous region of guest memory addresses as the guest OS initializes; and
exposing, by the hypervisor, the second contiguous region of guest memory addresses as the usable memory as the guest OS initializes.

### Claim 14 (depends on 10)

The method of claim 10, further comprising:
disabling, by the hypervisor, the guest OS from using the contiguous region of guest memory addresses as the guest OS initializes.

### Claim 15 (depends on 10)

The method of claim 10, further comprising:
exposing, by the hypervisor, a balloon device to the guest OS, wherein the contiguous region of guest memory addresses is associated with the balloon device.

### Claim 16 (depends on 15)

The method of claim 15, wherein the balloon device is associated with a non-uniform memory access node.

### Claim 17 (depends on 15)

The method of claim 15, further comprising:
exposing, by the hypervisor, a second balloon device to the guest OS;
locating, by the hypervisor, a second contiguous region of guest memory addresses according to the amount of memory allocated by the device driver;
reserving, by the hypervisor, the contiguous region of memory addresses for the balloon device;
reserving, by the hypervisor, a second contiguous region of memory addresses for the second balloon device; and
notifying, by the hypervisor, the guest OS that the second contiguous region of memory addresses is reserved.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
disabling, by hypervisor, the guest OS from using second contiguous memory addresses.

### Claim 19

A non-transitory machine readable medium storing code, which when executed by a processor, is configured to:
record an amount of memory allocated by a device driver of a guest OS, locate a contiguous region of guest memory addresses according to the amount of memory allocated by the device driver,
reserve the contiguous region of memory addresses, and
notify the guest OS that the contiguous region of memory addresses is reserved.

### Claim 20 (depends on 15)

The non-transitory machine readable of claim 15, further configured to:
expose a second balloon device to the guest OS;
locate a second contiguous region of guest memory addresses according to the amount of memory allocated by the device driver;
reserve the contiguous region of memory addresses for the balloon device;
reserve a second contiguous region of memory addresses for the second balloon device; and
notify the guest OS that the second contiguous region of memory addresses is reserved.
