# US 2020/0349078 A1 · Directory processing method and apparatus, and storage system

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

- Number: US 2020/0349078 A1
- Document ID: US20200349078A1
- Status: Published application
- Kind: A1
- Application number: 16/932,318
- Filed: 2020-07-17
- Published: 2020-11-05
- Earliest claimed: 2018-01-19
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Yongbo CHENG; Chenghong HE; Tao HE
- Web page: https://patentgrep.com/patent/US20200349078A1

## CPC

- G06F 12/0824: {Distributed directories, e.g. linked lists of caches}
- G06F 9/542: {Event management; Broadcasting; Multicasting; Notifications}
- G06F 12/0813: with a network or matrix configuration
- G06F 12/0817: using directory methods
- G06F 12/082: {Associative directories (G06F12/0822 takes precedence)}
- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 12/0895: of parts of caches, e.g. directory or tag array
- G06F 2212/7201: Logical to physical mapping or translation of blocks or pages
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A directory processing method and apparatus are provided to resolve a problem that a directory occupies a relatively large quantity of caches in an existing directory processing solution. The method includes: receiving, by a first data node, a first request sent by a second data node; searching for, by the first data node, a matched directory entry in a directory of the first data node based on tag information and index information in a first physical address; creating, when no matched directory entry is found, a first directory entry of the directory based on the first request, where the first directory entry includes the tag information, first indication information, first pointer information, and first status information, the first pointer information is used to indicate that data in the memory address corresponding to the indication bit that is set to valid is read by the second data node.

## Claims

### Claim 1

A directory processing method, comprising:
receiving, by a first data node, a first request sent by a second data node, wherein the first request is used to indicate that the second data node requests to read first data in a first physical address, wherein the first physical address comprises tag information, index information, and first associated address information, wherein the first associated address information is used to indicate that the first physical address corresponds to a first memory address in N memory addresses of a memory of the first data node, and wherein N is greater than 1;
searching for, by the first data node, a matched directory entry in a directory of the first data node based on the tag information and the index information; and
creating, by the first data node when no matched directory entry is found, a first directory entry of the directory based on the first request, wherein the first directory entry comprises the tag information, first indication information, first pointer information, and first status information, wherein the first indication information comprises N indication bits that are in one-to-one correspondence with the N memory addresses, wherein a first indication bit corresponding to the first memory address in the N indication bits is set to valid, wherein the other indication bits other than the first indication bit are set to invalid, and wherein the first pointer information is used to indicate that data in the memory address corresponding to the indication bit that is set to valid in the first indication information is read by the second data node.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the first status information is used to indicate a type of the first request, and wherein the type of the first request is an exclusive request or a share request.

### Claim 3 (depends on 1)

The method according to claim 1, wherein after the creating, by the first data node, a first directory entry of the directory based on the first request, the method further comprises:
receiving, by the first data node, a second request sent by the second data node, wherein a type of the second request is the same as the type of the first request, the second request is used to indicate that the second data node requests to read second data in a second physical address, wherein the second physical address comprises the tag information, the index information, and second associated address information, and wherein the second associated address information is used to indicate that the second physical address corresponds to a second memory address in the N memory addresses;
searching for, by the first data node, a matched directory entry in the directory based on the second request, to find the first directory entry; and
setting, by the first data node based on the second request, a second indication bit corresponding to the second memory address in the first indication information to valid.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the searching for, by the first data node, a matched directory entry in the directory based on the second request, to find the first directory entry comprises:
searching for, by the first data node, the first directory entry based on the tag information and the index information;
determining, by the first data node, that a data node indicated by the first pointer information in the first directory entry is the second data node that sends the second request, and determining that the type of the first request indicated by the first status information in the first directory entry is the same as the type of the second request; and
determining, by the first data node, the first directory entry as the matched directory entry.

### Claim 5 (depends on 1)

The method according to claim 1, wherein after the creating, by the first data node, a first directory entry of the directory based on the first request, the method further comprises:
receiving, by the first data node, a third request sent by the second data node, wherein a type of the third request is different from the type of the first request, wherein the third request is used to indicate that the second data node requests to read third data in a third physical address, wherein the third physical address comprises the tag information, the index information, and third associated address information, and wherein the third associated address information is used to indicate that the third physical address corresponds to a third memory address in the N memory addresses;
searching for, by the first data node, a matched directory entry in the directory based on the third request; and
creating, by the first data node when no matched directory entry is found, a second directory entry of the directory based on the third request, wherein the second directory entry comprises the tag information, second indication information, second pointer information, and second status information, wherein the second indication information comprises N indication bits that are in one-to-one correspondence with the N memory addresses, wherein a third indication bit corresponding to the third memory address in the N indication bits is set to valid, wherein the other indication bits other than the third indication bit are set to invalid, wherein the second pointer information is used to indicate that data in the memory address corresponding to the indication bit that is set to valid in the second indication information is read by the second data node, and wherein the second status information is used to indicate the type of the third request.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the searching for, by the first data node, a matched directory entry in the directory based on the third request comprises:
searching for, by the first data node, the first directory entry based on the tag information and the index information;
determining, by the first data node, that the data node indicated by the first pointer information in the first directory entry is the second data node that sends the third request, and determining that the type of the first request indicated by the first status information in the first directory entry is different from the type of the third request; and
determining, by the first data node, that no matched directory entry is found.

### Claim 7 (depends on 1)

The method according to claim 1, wherein after the creating, by the first data node, a first directory entry of the directory based on the first request, the method further comprises:
receiving, by the first data node, a fourth request sent by a third data node, wherein the fourth request is used to indicate that the third data node requests to read fourth data in a fourth physical address, wherein the fourth physical address comprises the tag information, the index information, and fourth associated address information, and wherein the fourth associated address information is used to indicate that the fourth physical address corresponds to a fourth memory address in the N memory addresses;
searching for, by the first data node, a matched directory entry in the directory based on the fourth request; and
creating, by the first data node when no matched directory entry is found, a third directory entry of the directory based on the fourth request, wherein the third directory entry comprises the tag information, third indication information, third pointer information, and third status information, wherein the third indication information comprises N indication bits that are in one-to-one correspondence with the N memory addresses, wherein a fourth indication bit corresponding to the fourth memory address in the N indication bits is set to valid, wherein the other indication bits other than the fourth indication bit are set to invalid, wherein the third pointer information is used to indicate that data stored in the memory address corresponding to the indication bit that is set to valid in the third indication information is read by the third data node, and wherein the third status information is used to indicate a type of the fourth request.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the searching for, by the first data node, a matched directory entry in the directory based on the fourth request comprises:
searching for, by the first data node, the first directory entry based on the tag information and the index information;
determining, by the first data node, that the data node indicated by the first pointer information in the first directory entry is not the third data node that sends the fourth request; and
determining, by the first data node, that no matched directory entry is found.

### Claim 9 (depends on 1)

The method according to claim 1, wherein after the creating, by the first data node, a first directory entry of the directory based on the first request, the method further comprises:
receiving, by the first data node, a fifth request sent by a fourth data node, wherein the fifth request is used to indicate that the fourth data node requests to read the first data;
searching for, by the first data node, a matched directory entry in the directory based on the fifth request, to find the first directory entry; and
after determining, based on the first directory entry, that the first data is read by the second data node, notifying, by the first data node, the fourth data node to initiate listening to the second data node, to read the first data.

### Claim 10

A directory processing apparatus, comprising:
a memory storage comprising instructions; and
one or more processors in communication with the memory, wherein the one or more processors execute the instructions to:
receive a first request sent by a second data node, wherein the first request is used to indicate that the second data node requests to read first data in a first physical address, wherein the first physical address comprises tag information, index information, and first associated address information, wherein the first associated address information is used to indicate that the first physical address corresponds to a first memory address in N memory addresses of a memory of the apparatus, and wherein N is greater than 1;
search for a matched directory entry in a directory of the apparatus based on the tag information and the index information; and
create, when no matched directory entry is found, a first directory entry of the directory based on the first request, wherein the first directory entry comprises the tag information, first indication information, first pointer information, and first status information, wherein the first indication information comprises N indication bits that are in one-to-one correspondence with the N memory addresses, wherein a first indication bit corresponding to the first memory address in the N indication bits is set to valid, wherein the other indication bits other than the first indication bit are set to invalid, and wherein the first pointer information is used to indicate that data in the memory address corresponding to the indication bit that is set to valid in the first indication information is read by the second data node.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the first status information is used to indicate a type of the first request, and the type of the first request is an exclusive request or a share request.

### Claim 12 (depends on 10)

The apparatus according to claim 10, wherein the one or more processors execute the instructions to:
after creating the first directory entry of the directory based on the first request, receive a second request sent by the second data node, wherein a type of the second request is the same as the type of the first request, wherein the second request is used to indicate that the second data node requests to read second data in a second physical address, wherein the second physical address comprises the tag information, the index information, and second associated address information, and wherein the second associated address information is used to indicate that the second physical address corresponds to a second memory address in the N memory addresses;
search for a matched directory entry in the directory based on the second request, to find the first directory entry; and
set, based on the second request, a second indication bit corresponding to the second memory address in the first indication information to valid.

### Claim 13 (depends on 12)

The apparatus according to claim 12, wherein the one or more processors execute the instructions to:
search for the first directory entry based on the tag information and the index information;
determine that a data node indicated by the first pointer information in the first directory entry is the second data node that sends the second request, and determine that the type of the first request indicated by the first status information in the first directory entry is the same as the type of the second request; and
determine the first directory entry as the matched directory entry.

### Claim 14 (depends on 10)

The apparatus according to claim 10, wherein the one or more processors execute the instructions to:
after creating the first directory entry of the directory based on the first request, receive a third request sent by the second data node, wherein a type of the third request is different from the type of the first request, wherein the third request is used to indicate that the second data node requests to read third data in a third physical address, wherein the third physical address comprises the tag information, the index information, and third associated address information, and wherein the third associated address information is used to indicate that the third physical address corresponds to a third memory address in the N memory addresses;
search for a matched directory entry in the directory based on the third request; and
create, when no matched directory entry is found, a second directory entry of the directory based on the third request, wherein the second directory entry comprises the tag information, second indication information, second pointer information, and second status information, wherein the second indication information comprises N indication bits that are in one-to-one correspondence with the N memory addresses, wherein a third indication bit corresponding to the third memory address in the N indication bits is set to valid, wherein the other indication bits other than the third indication bit are set to invalid, wherein the second pointer information is used to indicate that data in the memory address corresponding to the indication bit that is set to valid in the second indication information is read by the second data node, and wherein the second status information is used to indicate the type of the third request.

### Claim 15 (depends on 14)

The apparatus according to claim 14, wherein the one or more processors execute the instructions to:
search for the first directory entry based on the tag information and the index information;
determine that the data node indicated by the first pointer information in the first directory entry is the second data node that sends the third request, and determine that the type of the first request indicated by the first status information in the first directory entry is different from the type of the third request; and
determine that no matched directory entry is found.

### Claim 16 (depends on 10)

The apparatus according to claim 10, wherein the one or more processors execute the instructions to:
after creating the first directory entry of the directory based on the first request, receive a fourth request sent by a third data node, wherein the fourth request is used to indicate that the third data node requests to read fourth data in a fourth physical address, wherein the fourth physical address comprises the tag information, the index information, and fourth associated address information, and wherein the fourth associated address information is used to indicate that the fourth physical address corresponds to a fourth memory address in the N memory addresses;
search for a matched directory entry in the directory based on the fourth request; and
create, when no matched directory entry is found, a third directory entry of the directory based on the fourth request, wherein the third directory entry comprises the tag information, third indication information, third pointer information, and third status information, wherein the third indication information comprises N indication bits that are in one-to-one correspondence with the N memory addresses, wherein a fourth indication bit corresponding to the fourth memory address in the N indication bits is set to valid, wherein the other indication bits other than the fourth indication bit are set to invalid, wherein the third pointer information is used to indicate that data stored in the memory address corresponding to the indication bit that is set to valid in the third indication information is read by the third data node, and wherein the third status information is used to indicate a type of the fourth request.

### Claim 17 (depends on 16)

The apparatus according to claim 16, wherein the one or more processors execute the instructions to:
search for the first directory entry based on the tag information and the index information;
determine that the data node indicated by the first pointer information in the first directory entry is not the third data node that sends the fourth request; and
determine that no matched directory entry is found.

### Claim 18 (depends on 10)

The apparatus according to claim 10, wherein the one or more processors execute the instructions to:
after creating the first directory entry of the directory based on the first request, receive a fifth request sent by a fourth data node, wherein the fifth request is used to indicate that the fourth data node requests to read the first data;
search for a matched directory entry in the directory based on the fifth request, to find the first directory entry; and
after determining, based on the first directory entry, that the first data is read by the second data node, notify the fourth data node to initiate listening to the second data node, to read the first data.

### Claim 19

A non-transitory machine-readable medium having instructions stored therein, which when executed by a processor, cause the processor to perform operations, the operations comprising:
receiving, by a first data node, a first request sent by a second data node, wherein the first request is used to indicate that the second data node requests to read first data in a first physical address, wherein the first physical address comprises tag information, index information, and first associated address information, wherein the first associated address information is used to indicate that the first physical address corresponds to a first memory address in N memory addresses of a memory of the first data node, and wherein N is greater than 1;
searching for, by the first data node, a matched directory entry in a directory of the first data node based on the tag information and the index information; and
creating, by the first data node when no matched directory entry is found, a first directory entry of the directory based on the first request, wherein the first directory entry comprises the tag information, first indication information, first pointer information, and first status information, wherein the first indication information comprises N indication bits that are in one-to-one correspondence with the N memory addresses, wherein a first indication bit corresponding to the first memory address in the N indication bits is set to valid, wherein the other indication bits other than the first indication bit are set to invalid, and wherein the first pointer information is used to indicate that data in the memory address corresponding to the indication bit that is set to valid in the first indication information is read by the second data node.

### Claim 20 (depends on 19)

The medium according to claim 19, wherein the first status information is used to indicate a type of the first request, and wherein the type of the first request is an exclusive request or a share request.
