# US 12,223,169 B2 · Far memory direct caching

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

- Number: US 12,223,169 B2
- Document ID: US12223169B2
- Status: Granted
- Kind: B2
- Application number: 17/696,951
- Filed: 2022-03-17
- Published: 2023-09-21
- Granted: 2025-02-11
- Earliest claimed: 2022-03-17
- Assignees: Lenovo Global Technology (United States) Inc.
- Applicants: Lenovo Global Technology (United States) Inc.
- Inventors: Jonathan Hinkle
- Web page: https://patentgrep.com/patent/US12223169B2

## CPC

- G06F 3/061: {Improving I/O performance}
- G06F 3/0611: {in relation to response time}
- G06F 3/064: {Management of blocks}
- G06F 3/0656: {Data buffering arrangements}
- G06F 3/0658: {Controller construction arrangements}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0673: {Single storage device}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 12/0284: {Multiple user address space allocation, e.g. using different base addresses (interprocessor communication G06F15/163)}
- G06F 12/0292: {using tables or multilevel address translation means (G06F12/023 takes precedence; address translation in virtual memory systems G06F12/10)}
- G06F 12/08: in hierarchically structured memory systems, e.g. virtual memory systems
- G06F 12/0888: using selective caching, e.g. bypass
- G06F 12/121: using replacement algorithms
- G06F 12/0868: Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
- G06F 12/0897: with two or more cache hierarchy levels (with multilevel cache hierarchies G06F12/0811)
- G06F 2212/1016: Performance improvement
- G06F 2212/205: Hybrid memory, e.g. using both volatile and non-volatile memory
- G06F 2212/214: Solid state disk
- G06F 2212/7201: Logical to physical mapping or translation of blocks or pages
- G06F 2212/7208: Multiple device management, e.g. distributing data over multiple flash devices
- G11C 7/1075: {for multiport memories each having random access ports and serial ports, e.g. video RAM}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G11C: STATIC STORES (semiconductor memory devices H10B)

## Abstract

A far memory device includes a far memory controller, a memory device coupled to the controller, a first port coupled to the far memory controller to support communication with a host processor over a first serial computer expansion bus, and a second port coupled to the far memory controller to support communication with a non-volatile data storage drive over a second serial computer expansion bus. The far memory device serves as a cache between the host processor and the non-volatile data storage drive and may perform aspects of cache management on behalf of the host processor.

## Claims

### Claim 1

An apparatus, comprising:
a dual-ported far memory device including a far memory controller, one or more memory devices coupled to the far memory controller, a first external port coupled to the far memory controller to support communication with a host processor over a first serial computer expansion bus, a second external port coupled to the far memory controller to support communication with a non-volatile data storage drive over a second serial computer expansion bus, and at least one non-transitory storage device storing program instructions, wherein the far memory controller includes at least one processor configured to process the program instructions, and wherein the program instructions are configured to, when processed by the at least one processor, cause the processor to perform operations comprising:
receiving, from the host processor over the first serial computer expansion bus, a first write instruction, data to be written to the one or more memory devices, an identity of a namespace and a logic block within the namespace that are associated with the data, and a memory address range associated with the namespace and logic block;
writing the data to the one or more memory devices at the memory address range;
storing, for the data written to the one or more memory devices, the namespace and the logic block within the namespace in association with the memory address range;
marking the logic block within the namespace as being dirty in response to writing the data to the one or more memory devices; and
sending a second write instruction to the non-volatile data storage drive over the second serial computer expansion bus, wherein the second write instruction includes the data associated with the logic block marked as being dirty and the identity of the namespace and the logic block within the namespace where the data is to be stored on the non-volatile data storage drive.

### Claim 2 (depends on 1)

The apparatus of claim 1, the operations further comprising:
managing communication with the host processor over the first serial computer expansion bus using a cache coherent protocol.

### Claim 3 (depends on 2)

The apparatus of claim 2, wherein the cache coherent protocol is a Compute Express Link protocol.

### Claim 4 (depends on 1)

The apparatus of claim 1, wherein the one or more memory devices coupled to the far memory controller are volatile memory devices.

### Claim 5 (depends on 1)

The apparatus of claim 1, wherein the one or more memory devices coupled to the far memory controller are non-volatile memory devices.

### Claim 6 (depends on 1)

The apparatus of claim 1, the operations further comprising:
presenting the one or more memory device to the host processor as byte-addressable memory.

### Claim 7 (depends on 1)

The apparatus of claim 1, the operations further comprising:
mapping the data written in the far memory device to a location on the non-volatile data storage drive; and
storing a lookup table on the one or more memory devices, wherein the lookup table includes a plurality of records, each record associating a memory address range on the far memory device with a namespace and logic block on the non-volatile data storage drive.

### Claim 8 (depends on 1)

The apparatus of claim 1, wherein the far memory controller manages caching of data being written to the non-volatile data storage device.

### Claim 9 (depends on 1)

The apparatus of claim 1, wherein the far memory controller allows the host processor to use a first portion of capacity of the one or more memory devices as supplemental main memory while the far memory controller reserves a second portion of the capacity of the one or more memory devices to use as cache for the non-volatile data storage drive.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein the far memory controller identifies the first portion of the far memory that is available for the host processor to use as regular memory and prevents the host processor from writing over data in the second portion of the far memory device.

### Claim 11

A computer program product comprising a non-volatile computer readable medium and non-transitory program instructions embodied therein, the non-transitory program instructions being configured to be executable by a processor of a far memory controller in a dual-ported far memory device to cause the processor to perform operations comprising:
receiving, from a host processor over a first serial computer expansion bus coupled to a first external port of the far memory device, a first write instruction, data to be written to one or more memory devices, an identity of a namespace and a logic block within the namespace that are associated with the data, and a memory address range associated with the namespace and logic block;
writing the data to the one or more memory devices at the memory address range;
storing, for the data written to the one or more memory devices, the namespace and the logic block within the namespace in association with the memory address range;
marking the logic block within the namespace as being dirty in response to writing the data to the one or more memory devices; and
sending a second write instruction to a non-volatile data storage drive over a second serial computer expansion bus coupled to a second external port of the far memory device, wherein the second write instruction includes the data associated with the logic block marked as being dirty and the identity of the namespace and the logic block within the namespace where the data is to be stored on the non-volatile data storage drive.

### Claim 12 (depends on 11)

The computer program product of claim 11, the operations further comprising:
managing communication with the host processor over the first serial computer expansion bus using a cache coherent protocol.

### Claim 13 (depends on 11)

The computer program product of claim 11, the operations further comprising:
presenting the one or more memory device to the host processor as byte-addressable memory.

### Claim 14 (depends on 11)

The computer program product of claim 11, the operations further comprising:
mapping the data written in the far memory device to a location on the non-volatile data storage drive; and
storing a lookup table on the one or more memory devices, wherein the lookup table includes a plurality of records, each record associating a memory address range on the far memory device with a namespace and logic block on the non-volatile data storage drive.

### Claim 15 (depends on 11)

The computer program product of claim 11, the operations further comprising:
managing caching of data being written to the non-volatile data storage drive.

### Claim 16 (depends on 11)

The computer program product of claim 11, the operations further comprising:
allowing the host processor to use a first portion of capacity of the one or more memory devices as supplemental main memory and reserving a second portion of the capacity of the one or more memory devices to use as cache for the non-volatile data storage drive.

### Claim 17

A computer program product comprising a non-volatile computer readable medium and non-transitory program instructions embodied therein, the non-transitory program instructions being configured to be executable by a processor to cause the processor to perform operations comprising:
identifying an address of particular data to be read;
determining whether the particular data is stored in a dual-ported far memory device accessible over a first serial computer expansion bus coupled to a first external port of the dual-ported far memory device or stored in a dual-ported non-volatile data storage drive accessible over a second serial computer expansion bus coupled to a first external port of the dual-ported non-volatile data storage drive, wherein a second external port of the dual-ported far memory device is coupled to a second external port of the dual-ported non-volatile data storage drive via a third serial computer expansion bus for saving data from the dual-ported far memory device to the dual-ported non-volatile data storage drive;
reading the particular data from the far memory device over the first serial computer expansion bus in response to determining that the particular data is stored on the far memory device; and
reading the particular data directly from the non-volatile data storage drive over the second serial computer expansion bus in response to determining that the particular data is not stored on the far memory device.

### Claim 18 (depends on 17)

The computer program product of claim 17, the operations further comprising:
writing all data to the far memory device over the first serial computer expansion bus; and
providing a memory address range for the particular data being written to the far memory device.

### Claim 19 (depends on 17)

The computer program product of claim 17, the operations further comprising:
identifying target data to be evicted from near memory in a host system including the processor;
determining whether the host system is likely to request the target data within a predetermined immediately subsequent time period;
evicting the target data from the near memory in the host system to the far memory device over the first serial computer expansion bus in response to determining that the host system is likely to request the target data in the predetermined immediately subsequent time period; and
evicting the target data from the near memory in the host system directly to the non-volatile data storage drive over the second serial computer expansion bus in response to determining that the host system is not likely to request the target data in the predetermined immediately subsequent time period.

### Claim 20 (depends on 17)

The computer program product of claim 17, the operations further comprising:
directing read and write operations to a first portion of memory capacity of the far memory device as supplemental RAM; and
directing read and write operations to a second portion of memory capacity of the far memory device as cache for the non-volatile data storage drive.
