IP Library Granted Patent US 12693798
Granted Patent B2
US 12693798 · App. 18/935,397 · Granted Jul 28, 2026

Resource allocation method and apparatus, electronic device, and storage medium

Inventors: Yinting Yu (Beijing, CN); Xiangming Chen (Beijing, CN); Qi Chen (Beijing, CN)
Assignee: New H3C Information Technologies Co., Ltd.
G06F3/0631G06F3/0604G06F3/0673
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 12693798
App. No.
18/935,397
Granted
Jul 28, 2026
Kind
B2
Abstract

Disclosed in the present disclosure are a resource allocation method and apparatus, an electronic device, and a storage medium, which relates to the field of computer technology. The method includes: determining one or more unallocated compute express link (CXL) memory logical blocks in a CXL memory resource pool in response to determining that a remaining memory capacity of a first host is less than a remaining memory capacity threshold of the first host; selecting a target CXL memory logical block from among the one or more unallocated CXL memory logical blocks in the CXL memory resource pool; and allocating a memory resource corresponding to the target CXL memory logical block to the first host via a CXL switch. This solves the problem of complex management of the CXL memory resource pool.

Claims (50)

1 . A resource allocation method, performed by a compute express link (CXL) fabric manager (FM) and the method comprising:

determining one or more unallocated CXL memory logical blocks in a CXL memory resource pool in response to a determination that a remaining memory capacity of a first host is less than a remaining memory capacity threshold of the first host;

selecting a target CXL memory logical block from among the one or more unallocated CXL memory logical blocks in the CXL memory resource pool;

allocating a memory resource corresponding to the target CXL memory logical block to the first host via a CXL switch,

wherein a plurality of hosts are managed by the CXL FM, and a remaining memory capacity and a remaining memory capacity threshold of each of the plurality of hosts are stored by the CXL FM,

wherein the determining one or more unallocated CXL memory logical blocks in a CXL memory resource pool in response to a determination that a remaining memory capacity of a first host is less than a remaining memory capacity threshold of the first host comprises:

for each of the plurality of hosts, determining whether the remaining memory capacity of the host is less than the remaining memory capacity threshold of the host; and

determining the one or more unallocated CXL memory logical blocks in the CXL memory resource pool in response to a determination that the remaining memory capacity of the first host is less than the remaining memory capacity threshold of the first host.

2 . The method according to claim 1 , wherein the determining one or more unallocated CXL memory logical blocks in a CXL memory resource pool in response to a determination that a remaining memory capacity of a first host is less than a remaining memory capacity threshold of the first host remaining memory capacity threshold comprises:

receiving a memory resource request sent from the first host via the CXL switch; wherein the memory resource request is sent by the first host in response to a determination that a memory management component of the first host determines that the remaining memory capacity is less than the remaining memory capacity threshold of the first host, or the memory resource request is sent by the first host in response to a determination that an operating system of the first host determines that available memory is insufficient; and

determining the one or more unallocated CXL memory logical blocks in the CXL memory resource pool in response to the memory resource request.

3 . The method according to claim 2 , wherein the selecting a target CXL memory logical block from among the one or more unallocated CXL memory logical blocks in the CXL memory resource pool comprises:

selecting, based on a single allocation granularity for the first host, a preset number of CXL memory logical blocks from the one or more unallocated CXL memory logical blocks in the CXL memory resource pool as the target CXL memory logical block.

4 . The method according to claim 2 , wherein the selecting a target CXL memory logical block from among the one or more unallocated CXL memory logical blocks in the CXL memory resource pool comprises:

obtaining an increment of an amount of memory resources occupied by the first host within a preset duration;

in response to the increment being greater than or equal to a preset increment threshold, selecting the target CXL memory logical block from among the one or more unallocated CXL memory logical blocks in the CXL memory resource pool based on the increment; and

in response to the increment being less than the preset increment threshold, selecting, based on a single allocation granularity for the first host, a preset number of CXL memory logical blocks from the one or more unallocated CXL memory logical blocks in the CXL memory resource pool as the target CXL memory logical block.

5 . The method according to claim 2 , wherein a required resource amount is carried in the memory resource request; and the selecting a target CXL memory logical block from among the one or more unallocated CXL memory logical blocks in the CXL memory resource pool comprises:

selecting, from the one or more unallocated CXL memory logical blocks in the CXL memory resource pool, a CXL memory logical block satisfying the required resource amount as the target CXL memory logical block.

6 . The method according to claim 1 , wherein the selecting a target CXL memory logical block from among the one or more unallocated CXL memory logical blocks in the CXL memory resource pool comprises:

selecting, based on a single allocation granularity for the first host, a preset number of CXL memory logical blocks from the one or more unallocated CXL memory logical blocks in the CXL memory resource pool as the target CXL memory logical block.

7 . The method according to claim 1 , wherein the selecting a target CXL memory logical block from among the one or more unallocated CXL memory logical blocks in the CXL memory resource pool comprises:

obtaining an increment of an amount of memory resources occupied by the first host within a preset duration;

in response to the increment being greater than or equal to a preset increment threshold, selecting the target CXL memory logical block from among the one or more unallocated CXL memory logical blocks in the CXL memory resource pool based on the increment; or

in response to the increment being less than the preset increment threshold, selecting, based on a single allocation granularity for the first host, a preset number of CXL memory logical blocks from the one or more unallocated CXL memory logical blocks in the CXL memory resource pool as the target CXL memory logical block.

8 . An electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

the processor is to execute the machine-executable instructions to perform:

determine one or more unallocated compute express link (CXL) memory logical blocks in a CXL memory resource pool in response to a determination that a remaining memory capacity of a first host is less than a remaining memory capacity threshold of the first host;

select a target CXL memory logical block from among the one or more unallocated CXL memory logical blocks in the CXL memory resource pool; and

allocate a memory resource corresponding to the target CXL memory logical block to the first host via a CXL switch,

wherein a plurality of hosts are managed by the electronic device, and a remaining memory capacity and a remaining memory capacity threshold of each of the plurality of hosts are stored by the electronic device, the processor is to:

for each of the plurality of hosts, determine whether the remaining memory capacity of the host is less than the remaining memory capacity threshold of the host; and

determine the one or more unallocated CXL memory logical blocks in the CXL memory resource pool in response to a determination that the remaining memory capacity of the first host is less than the remaining memory capacity threshold of the first host.

9 . The electronic device according to claim 8 , wherein the processor is to:

receive a memory resource request sent from the first host via the CXL switch; wherein the memory resource request is sent by the first host in response to a determination that a memory management component of the first host determines that the remaining memory capacity is less than the remaining memory capacity threshold of the first host, or the memory resource request is sent by the first host in response to a determination that an operating system of the first host determines that available memory is insufficient; and

determine the one or more unallocated CXL memory logical blocks in the CXL memory resource pool in response to the memory resource request.

10 . The electronic device according to claim 9 , wherein the processor is to:

select, based on a single allocation granularity for the first host, a preset number of CXL memory logical blocks from the one or more unallocated CXL memory logical blocks in the CXL memory resource pool as the target CXL memory logical block.

11 . The electronic device according to claim 9 , wherein the processor is to:

obtain an increment of an amount of memory resources occupied by the first host within a preset duration;

in response to the increment being greater than or equal to a preset increment threshold, select the target CXL memory logical block from among the one or more unallocated CXL memory logical blocks in the CXL memory resource pool based on the increment; and

in response to the increment being less than the preset increment threshold, select, based on a single allocation granularity for the first host, a preset number of CXL memory logical blocks from the one or more unallocated CXL memory logical blocks in the CXL memory resource pool as the target CXL memory logical block.

12 . The electronic device according to claim 9 , wherein a required resource amount is carried in the memory resource request;

the processor is to select, from the one or more unallocated CXL memory logical blocks in the CXL memory resource pool, a CXL memory logical block satisfying the required resource amount as the target CXL memory logical block.

13 . The electronic device according to claim 8 , wherein the processor is to:

select, based on a single allocation granularity for the first host, a preset number of CXL memory logical blocks from the one or more unallocated CXL memory logical blocks in the CXL memory resource pool as the target CXL memory logical block.

14 . The electronic device according to claim 8 , wherein the processor is to:

obtain an increment of an amount of memory resources occupied by the first host within a preset duration;

in response to the increment being greater than or equal to a preset increment threshold, select the target CXL memory logical block from among the one or more unallocated CXL memory logical blocks in the CXL memory resource pool based on the increment; and

in response to the increment being less than the preset increment threshold, select, based on a single allocation granularity for the first host, a preset number of CXL memory logical blocks from the one or more unallocated CXL memory logical blocks in the CXL memory resource pool as the target CXL memory logical block.