# US 2024/0193088 A1 · Memory prefetch based on machine learning

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

- Number: US 2024/0193088 A1
- Document ID: US20240193088A1
- Status: Published application
- Kind: A1
- Application number: 18/231,730
- Filed: 2023-08-08
- Published: 2024-06-13
- Earliest claimed: 2022-12-07
- Assignees: Western Digital Technologies, Inc.
- Applicants: Western Digital Technologies, Inc.
- Inventors: Chao Sun; Qingbo Wang; Minghai Qin; Jaco Hofmann; Anand Kulkarni; Dejan Vucinic; Zvonimir Bandic
- Web page: https://patentgrep.com/patent/US20240193088A1

## CPC

- G06F 12/0862: with prefetch
- G06N 3/08: Learning methods
- G06N 20/00: Machine learning
- G06F 2212/1016: Performance improvement
- G06F 2212/1024: Latency reduction
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A memory device includes a first memory and a second memory that caches data stored in the first memory. At least one controller of the memory device receives page fault information from a host. The page fault information results from a request for data by the host that is stored in the first memory but is not cached in the second memory when requested by the host. The memory device uses the received page fault information for one or more inputs into a prefetch model trained by Machine Learning (ML) to generate at least one inference. Based at least in part on the at least one inference, prefetch data is cached in the second memory. In one aspect, the page fault information is used to train the prefetch model. In another aspect, the page fault information includes at least one virtual address used by the host for the requested data.

## Claims

### Claim 1

A memory device, comprising:
a first memory configured to store data;
a second memory configured to cache data stored in the first memory; and
at least one controller configured to:
receive page fault information from a host, wherein the page fault information results from a request for data by the host that is stored in the first memory but is not cached in the second memory when requested by the host;
use the received page fault information for one or more inputs into a prefetch model trained by Machine Learning (ML) to generate at least one inference; and
based at least in part on the at least one inference, cache prefetch data in the second memory that is stored in the first memory.

### Claim 2 (depends on 1)

The memory device of claim 1, wherein the received page fault information includes at least one virtual address used by the host for the requested data.

### Claim 3 (depends on 1)

The memory device of claim 1, wherein the at least one controller is further configured to:
add the received page fault information to a collection of page fault information received from the host; and
provide the collection of page fault information to the host to train the prefetch model using ML.

### Claim 4 (depends on 3)

The memory device of claim 3, wherein the at least one controller is further configured to:
receive one or more updated weights from the host based on the collection of page fault information provided to the host; and
update the prefetch model using the one or more received updated weights.

### Claim 5 (depends on 1)

The memory device of claim 1, wherein the page fault information includes at least one of a process ID indicating a process executed by the host that generated a request that caused a page fault, a thread ID indicating a thread executed by the host that generated the request that caused the page fault, a program counter value indicating at least one physical address for a next instruction that was to be fetched following the request that caused the page fault, at least one physical address in the memory device for the request that caused the page fault, and an indication of a permission for data to be accessed for the request that caused the page fault.

### Claim 6 (depends on 1)

The memory device of claim 1, wherein the at least one controller receives the page fault information from the host using a Compute Express Link (CXL) protocol.

### Claim 7 (depends on 1)

The memory device of claim 1, wherein the at least one controller is further configured to:
receive Operating System (OS) metadata from an OS of the host including at least one of a page fault rate, a plurality of timestamps indicating occurrences of page faults, and resource usage information; and
based on the received OS metadata, determine at least one of an amount of data to prefetch from the first memory to cache in the second memory and when to prefetch data from the first memory to cache in the second memory.

### Claim 8 (depends on 1)

The memory device of claim 1, wherein the second memory includes a host coherent memory region, a prefetch memory region, and an indirection table memory region for mapping data stored in the first memory.

### Claim 9 (depends on 1)

The memory device of claim 1, wherein the second memory stores a reverse lookup table and wherein the at least one controller is further configured to:
receive at least one physical address from the host as at least part of the received page fault information;
use the reverse lookup table to translate the at least one physical address into at least one virtual address used by the host for the data requested by the host; and
use the at least one virtual address for at least one of an input into the prefetch model and a collection of page fault information for training the prefetch model.

### Claim 10

A method, comprising:
determining whether data requested by a process is stored in a first memory of a memory device but is not cached in a second memory of the memory device;
in response to determining that the requested data is stored in the first memory but is not cached in the second memory, generating page fault information related to a request for the requested data; and
sending the page fault information to the memory device, wherein the memory device uses the page fault information to generate at least one inference from a prefetch model for caching prefetch data in the second memory.

### Claim 11 (depends on 10)

The method of claim 10, wherein the page fault information sent to the memory device includes at least one virtual address used by a host executing the process for the requested data.

### Claim 12 (depends on 10)

The method of claim 10, wherein the page fault information sent to the memory device includes at least one of a process ID indicating the process that generated the request, a thread ID indicating a thread that generated the request, a program counter value indicating at least one physical address for a next instruction that was to be fetched following the request, at least one physical address in the memory device for the requested data, and an indicator of a permission for the requested data.

### Claim 13 (depends on 10)

The method of claim 10, wherein a host executing the process sends the page fault information to the memory device using a Compute Express Link (CXL) protocol.

### Claim 14 (depends on 10)

The method of claim 10, further comprising:
adding the page fault information to a collection of page fault information generated from previous requests for data by a host executing the process that is stored in the first memory of the memory device but is not cached in the second memory of the memory device when the data is requested by the host; and
using the collection of page fault information to train the prefetch model using Machine Learning (ML).

### Claim 15 (depends on 10)

The method of claim 10, further comprising:
using at least one core of a host processor executing the process to test run one or more applications;
collecting information on memory accesses of the one or more applications during the test run; and
using the collected information on memory accesses to train the prefetch model using ML.

### Claim 16 (depends on 10)

The method of claim 10, wherein the page fault information includes at least one physical address in the memory device for the data to be accessed by the request, and wherein an Operating System (OS) of a host executing the process uses a page size greater than or equal to two megabytes.

### Claim 17 (depends on 10)

The method of claim 10, further comprising sending OS metadata from the OS of a host executing the process to the memory device, wherein the OS metadata includes at least one of a page fault rate, a plurality of timestamps indicating occurrences of page faults, and resource usage information, and wherein the memory device uses the OS metadata to determine at least one of an amount of data to prefetch from the first memory to cache in the second memory and when to prefetch data from the first memory to cache in the second memory.

### Claim 18

A system, comprising:
a memory device including:
a first memory configured to store data; and
a second memory configured to cache data stored in the first memory;
a host configured to:
determine whether a request for data by the host is stored in the first memory of the memory device but is not cached in the second memory of the memory device; and
in response to determining that the request for data is stored in the first memory of the memory device but is not cached in the second memory of the memory device, generate page fault information related to the request for data; and
means for using the generated page fault information to train a prefetch model for caching prefetch data in the second memory.

### Claim 19 (depends on 18)

The system of claim 18, wherein the host is further configured to:
send the page fault information to the memory device; and
wherein the memory device is configured to use the page fault information to generate at least one inference from the prefetch model for caching prefetch data in the second memory.

### Claim 20 (depends on 18)

The system of claim 18, wherein the page fault information includes at least one virtual address used by the host for the requested data.
