# US 2022/0291875 A1 · Pinned physical memory supporting direct memory access for virtual memory backed containers

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

- Number: US 2022/0291875 A1
- Document ID: US20220291875A1
- Status: Published application
- Kind: A1
- Application number: 17/628,117
- Filed: 2020-08-25
- Published: 2022-09-15
- Earliest claimed: 2019-08-26
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Gerardo DIAZ-CUELLAR; Omar CARDONA; Jacob Kappeler OSHINS; John STARKS; Craig Daniel WILHITE
- Web page: https://patentgrep.com/patent/US20220291875A1

## CPC

- G06F 3/0664: {at device level, e.g. emulation of a storage device or system}
- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0631: {by allocating resources to storage systems}
- G06F 3/0673: {Single storage device}
- G06F 9/455: Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F 12/0284: {Multiple user address space allocation, e.g. using different base addresses (interprocessor communication G06F15/163)}
- G06F 2212/206: Memory mapped I/O
- G06F 2212/657: Virtual address space management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Examples described herein generally relate to hosting virtual memory backed kernel isolated containers. A server includes at least one physical processor and at least one physical computer memory addressable via physical memory addresses. The at least one physical computer memory stores executable code configured to provide at least one host including a kernel and at least one kernel isolated container within the at least one host. The host allocates virtual memory having virtual memory addresses to a respective container of the at least one kernel isolated container. The host pins a subset of the virtual memory addresses to a subset of the physical memory addresses. The host performs a direct memory access operation or device memory-mapped input-output operation of the respective container on the subset of the physical memory addresses. At least part of the physical computer memory that is not pinned is oversubscribed.

## Claims

### Claim 1

A server for hosting kernel isolated containers, comprising:
at least one physical processor; and
at least one physical computer memory addressable via physical memory addresses, the at least one physical computer memory storing executable code for execution by the at least one physical processor, the executable code configured to provide at least one host including a kernel and at least one kernel isolated container within the at least one host, wherein the executable code providing the at least one host is configured to:
allocate virtual memory having virtual memory addresses to a respective container of the at least one kernel isolated container;
pin a subset of the virtual memory addresses to a subset of the physical memory addresses; and
perform a direct memory access operation or device memory-mapped input-output operation of the respective container on the subset of the physical memory addresses.

### Claim 2 (depends on 1)

The server of claim 1, wherein the at least one host is configured to allocate the virtual memory such that at least part of the at least one physical computer memory is oversubscribed and the at least one host is configured to pin the subset of the virtual memory addresses to part of the at least one physical computer memory which is not oversubscribed.

### Claim 3 (depends on 1)

The server of claim 1, wherein an amount of the subset of the physical memory addresses is allocated based on the direct memory access operation or device memory-mapped input-output operation configured for the respective container.

### Claim 4 (depends on 1)

The server of claim 1, wherein the subset of the virtual memory addresses is statically pinned to the subset of the physical memory addresses for a life of the respective container.

### Claim 5 (depends on 1)

The server of claim 1, wherein the subset of the virtual memory addresses is dynamically pinned to the subset of the physical memory addresses based on the subset of the virtual memory addresses being allocated to the direct memory access operation or the device memory-mapped input-output operation.

### Claim 6 (depends on 1)

The server of claim 1, further comprising a physical network interface controller (NIC) including a physical NIC switch configured to distribute incoming data packets to a plurality of functions, wherein the plurality of functions includes a physical function and virtual functions, at least one of the virtual functions assigned to the respective container within the at least one host.

### Claim 7 (depends on 6)

The server of claim 6, wherein the physical NIC switch is configured to perform policy and quality of service (QoS) controls for the respective container via general flow tables (GFT).

### Claim 8 (depends on 1)

The server of claim 1, wherein the executable code providing the at least one host is configured to pin the subset of the virtual memory addresses to the subset of the physical memory addresses in response to a hardware driver request of the respective container.

### Claim 9

A method of hosting kernel isolated containers on a server including at least one physical processor and at least one physical computer memory addressable via physical memory addresses, the method comprising:
instantiating at least one kernel and at least one kernel isolated container within a host;
allocating virtual memory having virtual memory addresses to a respective container of the at least one kernel isolated container;
pinning a subset of the virtual memory addresses to a subset of the physical memory addresses; and
performing a direct memory access operation or device memory-mapped input-output operation of the respective container on the subset of the physical memory addresses.

### Claim 10 (depends on 9)

The method of claim 9, further comprising allocating an amount of the subset of the physical memory addresses based on the direct memory access operation or device memory-mapped input-output operation configured for the respective container.

### Claim 11 (depends on 10)

The method of claim 10, wherein pinning the subset of virtual memory addresses to the subset of the physical memory addresses comprises statically pinning the amount of virtual memory addresses in the subset of the virtual memory addresses based on a size of a queue for a hardware operation to the subset of the physical memory addresses for a life of the respective container.

### Claim 12 (depends on 10)

The method of claim 10, wherein pinning the subset of virtual memory addresses to the subset of the physical memory addresses comprises dynamically pinning the subset of virtual memory addresses to the subset of the physical memory addresses based on the subset of the virtual memory addresses being allocated to the direct memory access operation or the device memory-mapped input-output operation via an application programming interface receiving memory requirements of the respective container.

### Claim 13 (depends on 9)

The method of claim 9, further comprising distributing incoming data packets to a plurality of functions via a physical network interface controller (NIC) including a physical NIC switch, wherein the plurality of functions includes a physical function and virtual functions, at least one of the virtual functions is assigned to the respective container within the host.

### Claim 14 (depends on 9)

The method of claim 9, wherein pinning the subset of the virtual memory addresses to the subset of the physical memory addresses is in response to a hardware driver request of the respective container.

### Claim 15

A non-transitory computer-readable medium storing computer executable instructions that, when executed by a processor of a server including at least one physical processor and at least one physical computer memory addressable via physical memory addresses, cause the server to:
instantiate at least one kernel and at least one kernel isolated container within a host;
allocate virtual memory having virtual memory addresses to a respective container of the at least one kernel isolated container;
pin a subset of the virtual memory addresses to a subset of the physical memory addresses; and
perform a direct memory access operation or device memory-mapped input-output operation of the respective container on the subset of the physical memory addresses.

### Claim 16 (depends on 15)

The non-transitory computer-readable medium of claim 15, further comprising instructions to allocate an amount of the subset of the physical memory addresses based on the direct memory access operation or device memory-mapped input-output operation configured for the respective container.

### Claim 17 (depends on 16)

The non-transitory computer-readable medium of claim 16, wherein the instructions to pin the subset of virtual memory addresses to the subset of the physical memory addresses comprise instructions to statically pin the amount of virtual memory addresses in the subset of the virtual memory addresses based on a size of a queue for a hardware operation to the subset of the physical memory addresses for a life of the respective container.

### Claim 18 (depends on 16)

The non-transitory computer-readable medium of claim 16, wherein the instructions to pin the subset of virtual memory addresses to the subset of the physical memory addresses comprise instructions to dynamically pin the subset of virtual memory addresses to the subset of the physical memory addresses based on the subset of the virtual memory addresses being allocated to the direct memory access operation or the device memory-mapped input-output operation via an application programming interface receiving memory requirements of the respective container.

### Claim 19 (depends on 15)

The non-transitory computer-readable medium of claim 15, further comprising instructions to distribute incoming data packets to a plurality of functions via a physical network interface controller (NIC) including a physical NIC switch, wherein the plurality of functions includes a physical function and virtual functions, at least one of the virtual functions is assigned to the respective container within the host.

### Claim 20 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein pinning the subset of the virtual memory addresses to the subset of the physical memory addresses is in response to a hardware driver request of the respective container.
