# US 2023/0053968 A1 · Memory data migration method and apparatus

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

- Number: US 2023/0053968 A1
- Document ID: US20230053968A1
- Status: Published application
- Kind: A1
- Application number: 17/893,499
- Filed: 2022-08-23
- Published: 2023-02-23
- Earliest claimed: 2018-10-31
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Jin XIE; Gang LIU
- Web page: https://patentgrep.com/patent/US20230053968A1

## CPC

- G06F 3/0647: {Migration mechanisms}
- G06F 3/061: {Improving I/O performance}
- G06F 3/067: {Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]}
- G06F 3/0683: {Plurality of storage devices}
- G06F 15/167: using a common memory, e.g. mailbox
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A memory data migration method, apparatus, and system are provided. During memory migration, data is classified into two parts based on a hot and cold degree of the data. Hot data is directly migrated, and cold data is written into a shared storage device shared by memories. When needing to be used in a destination-end memory, the cold data may be read from the shared storage device. This reduces an amount of data that needs to be migrated to the destination-end memory, thereby improving memory migration efficiency.

## Claims

### Claim 1

A data migration method applied to a computing system, the computing system comprising a first memory and a second memory, and the method comprises:
dividing to-be-migrated data into first to-be-migrated data and second to-be-migrated data, wherein the to-be-migrated data is located in the first memory;
migrating the first to-be-migrated data to the second memory; and
writing the second to-be-migrated data into the storage device, wherein the storage device is a shared storage device of the first memory and the second memory.

### Claim 2 (depends on 1)

The data migration method according to claim 1, wherein the computing system comprises a service process and a migration process, the migration process is used to migrate the to-be-migrated data, the service process is a process using the to-be-migrated data, and before the migrating of the first to-be-migrated data to the second memory, and the method further comprises:
adjusting a priority of the migration process or a priority of the service process to enable the priority of the migration process to be higher than the priority of the service process.

### Claim 3 (depends on 2)

The data migration method according to claim 2, wherein
after the migrating of the first to-be-migrated data to the second memory, the method further comprises:
restoring the priority of the migration process or the priority of the service process.

### Claim 4 (depends on 2)

The data migration method according to claim 2, wherein the data migration method is executed by a plurality of threads of the migration process when an amount of the to-be-migrated data is greater than a preset value, or the to-be-migrated data is discontinuous in the first memory.

### Claim 5 (depends on 1)

The data migration method according to claim 1, further comprising:
generating, by the computing system, new data; and
writing the new data into the storage device.

### Claim 6 (depends on 1)

The data migration method according to claim 1, wherein the computing system comprises at least two computer apparatuses, the first memory is located in a first computer apparatus of the at least two computer apparatuses, and the second memory is located in a second computer apparatus of the at least two computer apparatuses.

### Claim 7 (depends on 1)

The data migration method according to claim 1, wherein the dividing of the to-be-migrated data into first to-be-migrated data and second to-be-migrated data comprises:
dividing the to-be-migrated data into the first to-be-migrated data and the second to-be-migrated data based on a least recently used (LRU) algorithm or a least frequently used (LFU) algorithm.

### Claim 8 (depends on 1)

The data migration method according to claim 1, further comprising:
reading third data from the storage device, and writing the third data into the second memory, wherein the second to-be-migrated data comprises the third data.

### Claim 9

A data migration apparatus, comprising:
a first memory; and
a processor coupled to the first memory and configured to execute instructions to:
divide to-be-migrated data into first to-be-migrated data and second to-be-migrated data, wherein the to-be-migrated data is located in the first memory;
migrate the first to-be-migrated data to a second memory, and
write the second to-be-migrated data into the storage device, wherein the storage device is a shared storage device of the first memory and the second memory.

### Claim 10 (depends on 9)

The apparatus according to claim 9, wherein the data migration apparatus runs a service process and a migration process, the migration process is used to migrate the to-be-migrated data, the service process is a process using the to-be-migrated data, and the processor is configured to execute instructions to:
before the first to-be-migrated data is migrated to the second memory, adjust a priority of the migration process or a priority of the service process, to enable the priority of the migration process to be higher than the priority of the service process.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the processor further configured to execute instructions to:
after the first to-be-migrated data is migrated to the second memory, restore the priority of the migration process or the priority of the service process.

### Claim 12 (depends on 9)

The apparatus according to claim 9, wherein the processor further configured to execute instructions to:
when the computing system generates new data, write the new data into the storage device.

### Claim 13 (depends on 10)

The apparatus according to claim 10, wherein the apparatus runs a plurality of threads of the migration process in response to an amount of the to-be-migrated data is greater than a preset value, or the to-be-migrated data is discontinuous in the first memory.

### Claim 14 (depends on 9)

The apparatus according to claim 9, wherein the processor further configured to execute instructions to:
divide the to-be-migrated data into the first to-be-migrated data and the second to-be-migrated data based on a least recently used (LRU) algorithm or a least frequently used (LFU) algorithm.

### Claim 15 (depends on 9)

The apparatus according to claim 9, wherein the processor further configured to execute instructions to:
read third data from the storage device and write the third data into the second memory, wherein the second to-be-migrated data comprises the third data.

### Claim 16

A computing system, comprising a migration apparatus, a first memory, a second memory, and a storage device, wherein
the migration apparatus is configured to:
divide to-be-migrated data into first to-be-migrated data and second to-be-migrated data, wherein the to-be-migrated data is located in the first memory,
migrate the first to-be-migrated data to the second memory, and write the second to-be-migrated data into the storage device;
the storage device is configured to receive the second to-be-migrated data, wherein the storage device is a shared storage device of the first memory and the second memory.

### Claim 17 (depends on 16)

The computing system according to claim 16, wherein the computing system comprises a service process and a migration process, the migration process is used to migrate the to-be-migrated data, the service process is a process using the to-be-migrated data, and
the migration apparatus is configured to: before the first to-be-migrated data is migrated to the second memory, adjust a priority of the migration process or a priority of the service process to enable the priority of the migration process to be higher than the priority of the service process.

### Claim 18 (depends on 17)

The computing system according to claim 17, wherein the migration apparatus is configured to run a plurality of threads of the migration process in response to an amount of the to-be-migrated data is greater than a preset value, or the to-be-migrated data is discontinuous in the first memory.

### Claim 19 (depends on 16)

The computing system according to claim 16, wherein the computing system comprises at least two computer apparatuses, the first memory is located in a first computer apparatus of the at least two computer apparatuses, and the second memory is located in a second computer apparatus of the at least two computer apparatuses.

### Claim 20 (depends on 16)

The computing system according to claim 16, wherein,
the migration apparatus is further configured to: divide the to-be-migrated data into the first to-be-migrated data and the second to-be-migrated data based on a least recently used (LRU) algorithm or a least frequently used (LFU) algorithm.
