# US 10,956,335 B2 · Non-volatile cache access using RDMA

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

- Number: US 10,956,335 B2
- Document ID: US10956335B2
- Status: Granted
- Kind: B2
- Application number: 15/720,972
- Filed: 2017-09-29
- Published: 2019-04-04
- Granted: 2021-03-23
- Earliest claimed: 2017-09-29
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Zuoyu Tao; Jia Shi; Kothanda Umamageswaran; Juan R. Loaiza
- Web page: https://patentgrep.com/patent/US10956335B2

## CPC

- G06F 12/0873: Mapping of cache memory to specific storage devices or parts thereof
- G06F 12/0238: {Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory}
- G06F 12/0864: using pseudo-associative means, e.g. set-associative or hashing
- G06F 12/0868: Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
- G06F 12/0871: Allocation or management of cache space
- G06F 15/17331: {Distributed shared memory [DSM], e.g. remote direct memory access [RDMA]}
- G06F 16/2255: {Hash tables}
- G06F 16/24552: {Database cache management}
- G06F 2212/154: Networked environment
- G06F 2212/222: Non-volatile memory
- G06F 2212/313: In storage device
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Data blocks are cached in a persistent cache (“NV cache”) allocated from as non-volatile RAM (“NVRAM”). The data blocks may be accessed in place in the NV cache of a “source” computing element by another “remote” computing element over a network using remote direct memory access (“RMDA”). In order for a remote computing element to access the data block in NV cache on a source computing element, the remote computing element needs the memory address of the data block within the NV cache. For this purpose, a hash table is stored and maintained in RAM on the source computing element. The hash table identifies the data blocks in the NV cache and specifies a location of the cached data block within the NV cache.

## Claims

### Claim 1

A method, comprising:
a first computing node using remote direct memory access (RDMA) to access a first hash table bucket from a hash table stored in random access memory (RAM) of a second computing node and to write the first hash table bucket to a target memory address in local memory of said first computing node;
wherein said hash table comprises a plurality of hash table buckets, each hash table bucket of said plurality of hash table buckets comprising a respective plurality of elements that correspond to a respective plurality of data blocks cached in a nonvolatile cache (NV cache) allocated from NV RAM of said second computing node, each element of said respective plurality of elements specifying both a home location in primary persistent storage and a cache location within said NV cache of a data block of said respective plurality of data blocks;
in response to a notification that the first hash table bucket has been written to said target memory address:
reading one or more elements from said first hash table bucket,
determining that a first element of said one or more elements from said first hash table bucket corresponds to a first data block stored at a particular cache location within said NV cache, wherein said determining that a first element in said first hash table bucket corresponds to a first data block includes determining that a home location of said first data block matches a home location specified by said first element,
determining that said first element includes a flag indicating that said first element is valid;
in response to at least (a) determining that said first element corresponds to said first data block and (b) determining that said first element includes said flag indicating that said first element is valid, said first computing node reading using RDMA at least a portion of said first data block from said particular cache location in said NV cache;
said second computing node selecting said first data block for replacement within said NV cache;
in response to selecting said first data block for replacement:
said second computing node setting the flag in said first element to specify that said first element is not valid; and
after setting the flag, said second computing node waiting at least an expiration period before replacing said first data block in said NV cache.

### Claim 2 (depends on 1)

The method of claim 1, further including:
while said first computing node reading using RDMA at least a portion of said first data block, determining that said expiration period has expired;
in response to determining that said expiration period has expired, ceasing to read said first data block.

### Claim 3 (depends on 1)

The method of claim 1, wherein for each hash table bucket of said plurality of hash table buckets, each element of said respective plurality of elements is stored as an array element in an array, said array being stored in a contiguous region of said NVRAM.

### Claim 4 (depends on 3)

The method of claim 3, wherein to write the first hash table bucket to a target memory address includes writing the array in entirety at said target memory address in said local memory.

### Claim 5 (depends on 4)

The method of claim 4, wherein reading one or more elements from said first hash table bucket includes reading each array element of one or more array elements of said array to determine whether a home location stored as an attribute of said each array element matches said home location of said first data block.

### Claim 6 (depends on 5)

The method of claim 5, wherein said home location of said first data block is a storage location of said first data block in persistent storage of said second computing node, said NV cache being used to cache data blocks stored in said persistent storage.

### Claim 7 (depends on 1)

The method of claim 1, wherein the method further includes applying a hash function to said home location of said first data block to identify said first hash table bucket as corresponding to said first data block.

### Claim 8

One or more non-transitory computer-readable media storing sequences of instructions that, when executed by one or more hardware processors, cause:
a first computing node using remote direct memory access (RDMA) to access a first hash table bucket from a hash table stored in random access memory (RAM) of a second computing node and to write the first hash table bucket to a target memory address in local memory of said first computing node;
wherein said hash table comprises a plurality of hash table buckets, each hash table bucket of said plurality of hash table buckets comprising a respective plurality of elements that correspond to a respective plurality of data blocks cached in a nonvolatile cache (NV cache) allocated from NV RAM of said second computing node, each element of said respective plurality of elements specifying both a home location in primary persistent storage and a cache location within said NV cache of a data block of said respective plurality of data blocks;
in response to a notification that the first hash table bucket has been written to said target memory address:
reading one or more elements from said first hash table bucket,
determining that a first element of said one or more elements from said first hash table bucket corresponds to a first data block stored at a particular cache location within said NV cache, wherein said determining that a first element in said first hash table bucket corresponds to a first data block includes determining that a home location of said first data block matches a home location specified by said first element,
determining that said first element includes a flag indicating that said first element is valid;
in response to at least (a) determining that said first element corresponds to said first data block and (b) determining that said first element includes said flag indicating that said first element is valid, said first computing node reading using RDMA at least a portion of said first data block from said particular cache location in said NV cache;
said second computing node selecting said first data block for replacement within said NV cache;
in response to selecting said first data block for replacement:
said second computing node setting the flag in said first element to specify that said first element is not valid; and
after setting the flag, said second computing node waiting at least an expiration period before replacing said first data block in said NV cache.

### Claim 9 (depends on 8)

The one or more non-transitory computer-readable media of claim 8, wherein the sequences of instructions include instructions that, when executed by said one or more hardware processors, cause:
while said first computing node reading using RDMA at least a portion of said first data block, determining that said expiration period has expired;
in response to determining that said expiration period has expired, ceasing to read said first data block.

### Claim 10 (depends on 8)

The one or more non-transitory computer-readable media of claim 8, wherein for each hash table bucket of said plurality of hash table buckets, each element of said respective plurality of elements is stored as an array element in an array, said array being stored in a contiguous region of said NVRAM.

### Claim 11 (depends on 10)

The one or more non-transitory computer-readable media of claim 10, wherein to write the first hash table bucket to a target memory address includes writing the array in entirety at said target memory address in said local memory.

### Claim 12 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein reading one or more elements from said first hash table bucket includes reading each array element of one or more array elements of said array to determine whether a home location stored as an attribute of said each array element matches said home location of said first data block.

### Claim 13 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, wherein said home location of said first data block is a storage location of said first data block in persistent storage of said second computing node, said NV cache being used to cache data blocks stored in said persistent storage.

### Claim 14 (depends on 8)

The one or more non-transitory computer-readable media of claim 8, wherein the sequences of instructions include instructions that, when executed by said one or more hardware processors, cause applying a hash function to said home location of said first data block to identify said first hash table bucket as corresponding to said first data block.
