IP Library › Granted Patent US 9,026,766
Granted Patent B2
US 9,026,766 · App. 14/282,576 · Granted May 5, 2015

Memory management method, memory management apparatus and NUMA system

Inventors: Wei Wang (Hangzhou, CN); Jiang Liu (Shenzhen, CN); Xishi Qiu (Hangzhou, CN); Jianguo Wu (Hangzhou, CN)
Assignee: Huawei Technologies Co., Ltd.
G06F12/023
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,026,766
App. No.
14/282,576
Granted
May 5, 2015
Kind
B2
Abstract

Embodiments of the present invention provide a memory management method, a memory management apparatus and a NUMA system. The memory management method includes: determining, according to a memory demand information which includes memory demand information sent by a processor, whether a memory controller meeting the memory demand information exists in a local processing node which the processor; and if exists, determining, in the memory controller meeting the memory demand information, a memory management area meeting the memory demand information, and allocating the memory management area meeting the memory demand information to the processor. Therefore, the memory controller and the memory management area do not need to be determined in a processing node that does not meet the requirements, which can rapidly find a storing area meeting the requirements, and improve the memory allocation efficiency.

Claims (69)

1. A memory management method, comprising:

receiving a memory allocation request message sent by a processor, wherein the memory allocation request message comprises memory demand information;

determining, according to the memory demand information and memory attribute information of a local node of the processor, whether a first memory unit corresponding to the local node meets the memory demand information;

determining, when the first memory unit does not meet the memory demand information, a node group meeting the memory demand information according to the memory demand information and third management information, wherein the third management information comprises an identifier of the node group and memory attribute information of the node group; and

determining fourth management information corresponding to the node group according to the identifier of the node group meeting the memory demand information, and determining that a node which is comprised in the node group meets the memory demand information according to the memory demand information and the fourth management information, wherein the fourth management information comprises an identifier of the node in the node group and memory attribute information of the node.

2. The method according to claim 1 , further comprising:

determining, when the first memory unit c meets the memory demand information, that a memory controller which is comprised in the local node meets the memory demand information according to the memory demand information and first management information corresponding to the local node, wherein the first management information comprises an identifier of the memory controller in the local node and memory attribute information of the memory controller;

determining at least one piece of second management information corresponding to the memory controller according to the identifier of the memory controller meeting the memory demand information, and determining a memory management area meeting the memory demand information and in the memory controller according to the memory demand information and the at least one piece of second management information, wherein the second management information comprises an identifier of a second memory unit corresponding to the memory controller and attribute information of the memory unit; and

allocating memory space corresponding to the memory management area to the processor according to an identifier of the memory management area meeting the memory demand information.

3. The method according to claim 2 , wherein determining the at least one piece of second management information, and determining the memory management area meeting the memory demand information and in the memory controller, comprises:

determining first second management information corresponding to the memory controller according to the identifier of the memory controller meeting the memory demand information, and determining that the memory management area which is comprised in the memory controller meets the memory demand information according to the memory demand information and the first second management information, wherein the first second management information comprises an identifier of the memory management area corresponding to the memory controller and memory attribute information of the memory management area.

4. The method according to claim 2 , wherein determining the at least one piece of second management information, and determining the memory management area meeting the memory demand information and in the memory controller, comprises:

determining first second management information corresponding to the memory controller according to the identifier of the memory controller meeting the memory demand information, and determining that a memory module which is comprised in the memory controller meets the memory demand information according to the memory demand information and the first second management information, wherein the first second management information comprises an identifier of the memory module corresponding to the memory controller and memory attribute information of the memory module; and determining second second management information corresponding to the memory module according to the identifier of the memory module meeting the memory demand information, and determining that the memory management area which is comprised in the memory module meets the memory demand information according to the memory demand information and the second second management information, wherein the second second management information comprises an identifier of the memory management area corresponding to the memory module and memory attribute information of the memory management area.

5. The method according to claim 1 , further comprising:

receiving a memory controller offline message sent by the processor, wherein the memory controller offline message comprises an identifier of a memory controller to go offline;

obtaining, according to the identifier of the memory controller to go offline, a type of a memory area corresponding to the memory controller to go offline;

migrating, when the type of the memory area is a non-floating area, data information in the memory area corresponding to the memory controller to go offline to an idle memory area, and recording the identifier of the memory controller to go offline and memory migration information corresponding to the memory controller to go offline; and

performing offline processing on the memory controller to go offline.

6. The method according to claim 5 , wherein before migrating the data information in the memory area corresponding to the memory controller to go offline to the idle memory area, the method further comprises:

performing isolation processing on the memory area corresponding to the memory controller to go offline; and

before the performing offline processing on the memory controller to go offline, the method further comprises:

performing de-isolation processing on the memory area corresponding to the memory controller to go offline.

7. The method according to claim 5 , wherein a size of the idle memory area is greater than or equal to a size of the memory area corresponding to the memory controller to go offline, and a memory controller corresponding to the idle memory area is not the memory controller to go offline.

8. The method according to claim 5 , further comprising:

receiving a memory controller online message sent by the processor, wherein the memory controller online message comprises an identifier of a memory controller to go online;

obtaining, according to the identifier of the memory controller to go online, memory migration information of the memory controller to go online;

migrating, according to the memory migration information of the memory controller to go online, data information in a memory area corresponding to the memory controller to go online back to the memory area corresponding to the memory controller to go online; and

performing online processing on the memory controller to go online.

9. The method according to claim 8 , wherein,

before the migrating, according to the memory migration information of the memory controller to go online, the data information in the memory area corresponding to the memory controller to go online back to the memory area corresponding to the memory controller to go online, the method further comprises:

performing isolation processing on the memory area corresponding to the memory controller to go online; and

before the performing online processing on the memory controller to go online, the method further comprises:

performing de-isolation processing on the memory area corresponding to the memory controller to go online.

10. A memory management apparatus, comprising a processor and a non-transitory processor-readable medium having processor-executable instructions stored thereon, the processor-executable instructions including a plurality of modules, the modules including:

a first receiving module, configured to receive a memory allocation request message sent by another processor, wherein the memory allocation request message comprises memory demand information, and send the memory allocation request message to a node management module;

the node management module, configured to receive the memory allocation request message sent by the first receiving module, and determine, according to the memory demand information in the memory allocation request message and memory attribute information of a local node of the another processor, whether a memory unit corresponding to the local node meets the memory demand information;

a node group management module, configured to, when the memory unit corresponding to the local node of the processor does not meet the memory demand information, determine a node group meeting the memory demand information according to the memory demand information and fifth management information, wherein the fifth management information comprises an identifier of the node group and memory attribute information of the node group; and

the node management module is further configured to determine sixth management information corresponding to the node group according to the identifier of the node group meeting the memory demand information, and determine that a node which is comprised in the node group meets the memory demand information according to the memory demand information and the sixth management information, wherein the sixth management information comprises an identifier of the node in the node group and memory attribute information of the node.

11. The apparatus according to claim 10 , further comprising:

a memory controller management module, configured to, when the memory unit corresponding to the local node of the processor meets the memory demand information, determine that a memory controller which is comprised in the local node meets the memory demand information according to the memory demand information and first management information corresponding to the local node, wherein the first management information comprises an identifier of the memory controller in the local node and memory attribute information of the memory controller, and send the identifier of the memory controller meeting the memory demand information to a memory management area management module;

the memory management area management module, configured to receive the identifier of the memory controller, determine at least one piece of second management information corresponding to the memory controller according to the identifier of the memory controller, determine that a memory management area which is comprised in the memory controller meets the memory demand information according to the memory demand information and the at least one piece of the second management information, wherein the second management information comprises an identifier of a memory unit corresponding to the memory controller and attribute information of the memory unit, and send an identifier of the memory management area meeting the memory demand information to a memory allocation module; and

the memory allocation module, configured to receive the identifier of the memory management area, and allocate memory space corresponding to the memory management area to the another processor according to the identifier of the memory management area.

12. The apparatus according to claim 11 , wherein the memory management area management module is configured to: determine first second management information corresponding to the memory controller according to the identifier of the memory controller meeting the memory demand information, and determine that the memory management area which is comprised in the memory controller meets the memory demand information according to the memory demand information and the first second management information, wherein the first second management information comprises an identifier of the memory management area corresponding to the memory controller and memory attribute information of the memory management area.

13. The apparatus according to claim 11 , wherein the memory management area management module comprises:

a memory module management unit, configured to determine first second management information corresponding to the memory controller according to the identifier of the memory controller meeting the memory demand information, and determine that a memory module which is comprised in the memory controller meets the memory demand information according to the memory demand information and the first second management information, wherein the first second management information comprises an identifier of the memory module corresponding to the memory controller and memory attribute information of the memory module; and

a memory management area management unit, configured to determine second second management information corresponding to the memory module according to the identifier of the memory module meeting the memory demand information, and determine the memory management area which is comprised in the memory module meets the memory demand information according to the memory demand information and the second second management information, wherein the second second management information comprises an identifier of the memory management area corresponding to the memory module and the memory attribute information of the memory management area.

14. The apparatus according to claim 10 , further comprising:

a second receiving module, configured to receive a memory controller offline message sent by the another processor, wherein the memory controller offline message comprises an identifier of a memory controller to go offline, and send the memory controller offline message to the memory controller management module; and

the memory controller management module is further configured to receive the memory controller offline message sent by the second receiving module, and obtain, according to the identifier of the memory controller to go offline, a type of a memory area corresponding to the memory controller to go offline; when the type of the memory area is a non-floating area, migrate data information in the memory area corresponding to the memory controller to go offline to an idle memory area, and record the identifier of the memory controller to go offline and memory migration information corresponding to the memory controller; and perform offline processing on the memory controller to go offline.

15. The apparatus according to claim 14 , wherein the memory controller management module is further configured to perform isolation processing on the memory area corresponding to the memory controller to go offline; and perform de-isolation processing on the memory area corresponding to the memory controller to go offline.

16. The apparatus according to claim 14 , further comprising:

a third receiving module, configured to receive a memory controller online message sent by the another processor, wherein the memory controller online message comprises an identifier of a memory controller to go online, and send the memory controller offline message to the memory controller management module; and

the memory controller management module is further configured to receive the memory controller online message sent by the third receiving module, and obtain, according to the identifier of the memory controller to go online, memory migration information of the memory controller to go online; migrate data information in a memory area corresponding to the memory controller to go online back to the memory area corresponding to the memory controller to go online according to the memory migration information of the memory controller to go online; and perform online processing on the memory controller to go online.

17. The apparatus according to claim 16 , wherein,

the memory controller management module is further configured to perform isolation processing on the memory area corresponding to the memory controller to go online; and

perform de-isolation processing on the memory area corresponding to the memory controller to go online.

18. A non-transitory computer-readable medium having computer usable instructions stored thereon for execution by a processor, wherein the instructions cause the processor to:

receive a memory allocation request message sent by another processor, wherein the memory allocation request message comprises memory demand information;

determine, according to the memory demand information and memory attribute information of a local node of the another processor, whether a memory unit corresponding to the local node meets the memory demand information;

determining, when the memory unit does not meet the memory demand information, a node group meeting the memory demand information according to the memory demand information and third management information, wherein the third management information comprises an identifier of the node group and memory attribute information of the node group; and

determining fourth management information corresponding to the node group according to the identifier of the node group meeting the memory demand information, and determining that a node which is comprised in the node group meets the memory demand information according to the memory demand information and the fourth management information, wherein the fourth management information comprises an identifier of the node in the node group and memory attribute information of the node.

19. The non-transitory computer-readable medium according to claim 18 , wherein the instructions further cause the processor to receive a memory controller offline message sent by the another processor, wherein the memory controller offline message comprises an identifier of a memory controller to go offline;

obtain, according to the identifier of the memory controller to go offline, a type of a memory area corresponding to the memory controller to go offline;

migrate, when the type of the memory area is a non-floating area, data information in the memory area corresponding to the memory controller to go offline to an idle memory area, and record the identifier of the memory controller to go offline and memory migration information corresponding to the memory controller to go offline; and

perform offline processing on the memory controller to go offline.

20. The non-transitory computer-readable medium according to claim 18 , wherein the instructions further cause the processor to receiving a memory controller online message sent by the another processor, wherein the memory controller online message comprises an identifier of a memory controller to go online;

obtaining, according to the identifier of the memory controller to go online, memory migration information of the memory controller to go online;

migrating, according to the memory migration information of the memory controller to go online, data information in a memory area corresponding to the memory controller to go online back to the memory area corresponding to the memory controller to go online; and

performing online processing on the memory controller to go online.

Priority Claims (1)
CN 2013 1 0052291 · Feb 18, 2013 · national
Continuity (3)
Continuation 14094360 · Dec 2, 2013
Continuation PCTCN2013079892 · Jul 23, 2013
Related Publication 20140258669A1 · Sep 11, 2014