Resource allocation method and electronic device

By dynamically determining the target processor and resource nodes, the inaccuracy caused by changes in processors and resource nodes in server resource allocation is resolved, achieving more efficient resource allocation.

CN121029430BActive Publication Date: 2026-03-03INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511555906.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2026-03-03
Estimated Expiration
2045-10-29

AI Technical Summary

Technical Problem

In existing technologies, when servers allocate external component resources according to a preset resource configuration table, they cannot adapt to changes in processors and resource nodes, resulting in poor allocation performance.

Method used

By determining the server model, processor operating status, and type of external components, the target processor and target resource nodes are dynamically determined, and resource allocation is dynamically adapted.

Benefits of technology

It improves the accuracy and effectiveness of external component resource allocation and reduces allocation inaccuracies caused by changes in processors and resource nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121029430B_ABST
    Figure CN121029430B_ABST
Patent Text Reader

Abstract

The application discloses a resource allocation method and an electronic device, and relates to the technical field of servers, and comprises the following steps: a server determines a target processor and a target resource node according to the model of the server, the working state of at least one processor and the type of an external component. Compared with the mode of determining the processor and the resource node connected with the external component in the server through a preset resource configuration table, the application can determine the target processor and the target resource node actually connected with the external component, and reduces the possibility that the determined target processor and target resource node are inaccurate after the processor and the resource node connected with the slot in the server are changed. Therefore, in the application, the resource allocation effect for the external component is improved by the mode of allocating resources for the external component through the more accurate target processor and target resource node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of server technology, and in particular to a resource allocation method and electronic device. Background Technology

[0002] To meet the hardware expansion needs of servers, server motherboards or chassis typically have slots for connecting various external components. These external components can include, for example, Peripheral Component Interconnect Express (PCIe) cards and Non-Volatile Memory Express (NVMe) hard drives. In some scenarios, servers need to allocate resources to these external components to ensure they have the hardware support required for stable operation.

[0003] In related technologies, servers store resource configuration tables that indicate the processors, management buses, etc., connected to slots within the server. These resource configuration tables are preset at the factory. When an external component is connected, the server, upon startup, can determine the processors, management buses, etc., connected to that component based on the resource configuration table and the slot it resides in, and allocate resources to the component accordingly. However, to meet different user or business needs, the processors, management buses, etc., connected to slots may change. Therefore, the effectiveness of the server in allocating resources to external components based on the preset resource allocation table is relatively poor. Summary of the Invention

[0004] This application provides a resource allocation method and electronic device to improve the efficiency of server resource allocation to external components.

[0005] This application provides a resource allocation method, including:

[0006] The operating state of at least one processor in the server and the type of external component are determined; wherein the operating state of the processor is a normal state or an abnormal state; the external component is a component connected to the server through a first slot; the first slot is one of the slots deployed on the server;

[0007] Based on the server model and the operating status of at least one processor, identify the target processor connected to the external component among at least one processor;

[0008] Based on the server model and the type of external component, identify the target resource node connected to the external component from at least one resource node in the server; wherein, the target resource node is the node in the server that provides data interaction and management control for the external component;

[0009] Allocate resources to the external components based on their type, target processor, and target resource node.

[0010] This application also provides a resource allocation device, including:

[0011] A determination module is used to determine the operating state of at least one processor in the server, and the type of external component; wherein the operating state of the processor is a normal state or an abnormal state; the external component is a component connected to the server through a first slot; the first slot is one of the slots deployed on the server;

[0012] The first processing module is used to determine the target processor connected to the external component in at least one processor, based on the server model and the operating status of at least one processor.

[0013] The second processing module is used to determine, based on the server model and the type of external component, the target resource node connected to the external component in at least one resource node in the server; wherein, the target resource node is a node in the server that provides data interaction and management control for the external component;

[0014] The resource allocation module is used to allocate resources to external components based on the type of the external component, the target processor, and the target resource node.

[0015] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any of the above-described resource allocation methods when executing the computer program.

[0016] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described resource allocation methods.

[0017] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described resource allocation methods.

[0018] This application determines the target processor and target resource node based on the server model, the operating status of at least one processor, and the type of external component. Compared to determining the processor and resource node connected to the external component in the server through a preset resource configuration table, this application can determine the actual target processor and target resource node connected to the external component, reducing the possibility of inaccurate determination of the target processor and target resource node due to changes in the processor and resource node connected to the slot in the server. Therefore, this application improves the resource allocation efficiency of external components by allocating resources to them through a more accurate method of targeting the target processor and target resource node. Attached Figure Description

[0019] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A flowchart illustrating the process of allocating resources to external components for related technologies;

[0021] Figure 2 A schematic diagram illustrating a change in the slot deployment position, provided for an embodiment of this application;

[0022] Figure 3 This is a schematic diagram illustrating an application scenario provided in the embodiments of this application;

[0023] Figure 4 A flowchart illustrating a resource allocation method provided in an embodiment of this application;

[0024] Figure 5 A flowchart illustrating the determination of a target processor is provided for an embodiment of this application;

[0025] Figure 6 A schematic diagram of a process for determining a target resource node is provided for an embodiment of this application;

[0026] Figure 7 A flowchart illustrating another resource allocation method provided in an embodiment of this application;

[0027] Figure 8 This is a schematic diagram of the structure of a resource allocation device provided in an embodiment of this application;

[0028] Figure 9 A schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation

[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0030] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0031] To meet the hardware expansion needs of servers, various expansion boards and cables can be designed for different server motherboard and Central Processing Unit (CPU) architectures. Servers can connect to various external components through different expansion slots and cables. In some scenarios, servers require external components to allocate resources to ensure that these external components have the hardware support necessary for stable operation.

[0032] In related technologies, servers store a preset resource configuration table. This table is pre-defined at the factory and indicates the processors and resource nodes connected to slots within the server. Upon startup, the server can determine the processor connected to the external component from at least one processor and the resource node connected to the external component from at least one resource node, based on the preset resource configuration table and the slot where the external component resides. Then, the server allocates resources to the external component according to the target processor and target resource node connected to it.

[0033] It should be noted that the server deploys a Complex Programmable Logic Device (CPLD), a Baseboard Management Controller (BMC), and a Basic Input / Output System (BIOS). The CPLD serves as the server's information reading and control center. After the server starts, the CPLD can directly communicate with hardware such as the fan board and power supply, reading model information and controlling hardware specifications without relying on software drivers. The BMC is the server's remote operation and maintenance and hardware monitoring module, responsible for real-time monitoring of the server's hardware status and implementing maintenance functions such as fault indicator lights. The BIOS is the module in the server that starts and initializes the server hardware, responsible for allocating resources to the server's hardware components and external components.

[0034] In some embodiments, during server startup, resources can be allocated to external components via the CPLD, BMC, and BIOS within the server. This process mainly consists of two stages. The first stage involves the CPLD loading a preset resource configuration table after server startup. Then, the BMC determines the processor identifier and resource node identifier connected to the external component based on the preset resource configuration table and sends these identifiers to the CPLD. Simultaneously, this stage also initializes the timing of hardware components in the server, such as the power supply and clock, preparing for BIOS startup.

[0035] The second stage is the BIOS startup stage. In this stage, the BIOS determines the preset resource configuration table, then obtains the presence information of external components from the CPLD through a specific communication protocol. Based on the preset resource configuration table and the presence information of the external components, the BIOS determines the processor identifier and resource node identifier connected to the external components. Then, the BIOS allocates resources to the external components according to the processor identifier and resource node identifier connected to the external components.

[0036] Specifically, it can be combined with Figure 1 To understand, Figure 1 This is a flowchart illustrating a process for allocating resources to external components, provided for related technologies. For example... Figure 1 As shown, the process may include the following steps:

[0037] S101, CPLD determines the presence information of external components.

[0038] The presence information is used to indicate the slots connected to external components.

[0039] S102, CPLD determines the preset resource configuration table.

[0040] In some embodiments, a CPLD is deployed in the server. After the server is powered on, the CPLD in the server determines a preset resource configuration table stored in the server. The preset resource configuration table is used to indicate the processors connected to the slots and the resource nodes connected to the slots in the server.

[0041] S103, BMC sends a first acquisition request to CPLD; wherein, the first acquisition request is used to request the acquisition of the preset resource configuration table and the on-site information of external components.

[0042] S104, BMC receives the preset resource configuration table and the presence information of external components sent by CPLD.

[0043] S105 and BMC determine the processor identifier and resource node identifier connected to the external component based on the preset resource configuration table and the location information of the external component.

[0044] S106, BMC sends the processor identifier and resource node identifier connected to the external component to CPLD.

[0045] S107, BIOS determines the preset resource configuration table.

[0046] S108, the BIOS sends a second acquisition request to the CPLD based on a specific communication method. The second acquisition request is used to obtain the presence information of the external components determined by the CPLD.

[0047] S109, The BIOS receives the presence information of external components sent by the CPLD.

[0048] S110 and BIOS determine the processor identifier and resource node identifier connected to the external component based on the in-situ information of the external component and the preset resource configuration table.

[0049] S111: The BIOS allocates resources to external components based on the processor identifier and resource node identifier connected to the external components.

[0050] However, due to the diversity of CPU architectures and the need to meet different user or business requirements, the processors and resource nodes connected to the slots in different servers may vary, or the processors and resource nodes connected to the slots in a server may change. For example, suppose the external component is an NVMe hard drive, and the server's default resource configuration table indicates that all slots corresponding to multiple NVMe hard drives are deployed in the back window of the server. During server operation, it is necessary to balance the performance of multiple NVMe hard drives. In this case, it is necessary to deploy some of the slots corresponding to the NVMe hard drives in the front window of the server to balance the performance of multiple NVMe hard drives.

[0051] Suppose the server's default resource configuration table indicates that some NVMe hard drives have slots deployed in the server's rear window, while others are deployed in the server's front window. During server operation, the server's front window needs to be used to balance the performance of other components. In this case, the slots for the NVMe hard drives that were deployed in the front window need to be deployed in the server's rear window.

[0052] Specifically, it can be combined with Figure 2 To understand, Figure 2 This is a schematic diagram illustrating a change in the slot deployment position as provided in an embodiment of this application. Figure 2 As shown, assume the server has a front window, a rear window, processor 1, slot a, and slot b deployed. The default resource configuration table indicates that slot a and slot b are both deployed in the front window. During server use, slot a is deployed in the rear window and slot b is deployed in the front window according to business needs.

[0053] If the processors and resource nodes connected to the slots in the server change, the server's resource allocation to external components based on the preset resource configuration table becomes less effective. Furthermore, the resource nodes connected to external components include indicator lights, such as those for Virtual Pin Ports (VPPs), which indicate whether the external component is functioning correctly. If the resource nodes connected to the slots change, the indicator lights determined according to the resource configuration table may be incorrect, causing inconvenience in the maintenance of the external components.

[0054] Based on this, this application provides a resource allocation method in which the server determines the target processor and target resource node according to the server model, the operating status of at least one processor, and the type of external component. Compared to determining the processor and resource node connected to the external component in the server through a preset resource configuration table, this application can determine the actual target processor and target resource node connected to the external component, reducing the possibility of inaccurate determination of the target processor and target resource node due to changes in the processor and resource node connected to the slot in the server. Therefore, this application improves the resource allocation effect of external components by allocating resources to them with more accurate target processors and target resource nodes.

[0055] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0056] This section describes the specific application environment architecture or hardware architecture upon which the resource allocation method depends. (References) Figure 3 , Figure 3 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application. For example... Figure 3 As shown, server 11 has slot a and slot b deployed.

[0057] In practical applications, server 11 can connect to external components via slot a and slot b. These external components may include, for example, PCIe cards and NVMe hard drives. For instance, a PCIe card can be connected to server 11 via slot a, and an NVMe hard drive can be connected to server 11 via slot b.

[0058] It should be noted that the execution subject in each embodiment of this application can be a processor, microprocessor, or a device integrating the aforementioned processor or microprocessor, such as a terminal device. The specific execution subject in each embodiment of this application is not limited and can be selected and set according to actual needs. In the following embodiments, a terminal device integrating the aforementioned processor or microprocessor is used as an example for description, which does not constitute a limitation on the actual execution subject.

[0059] It should be noted that, Figure 3 This is merely an example to illustrate one application scenario, and is not intended to limit the application scenario.

[0060] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0061] Figure 4 This is a flowchart illustrating a resource allocation method provided in an embodiment of this application. Figure 4 As shown, the method may include the following steps:

[0062] S401. Determine the operating state of at least one processor in the server, and the type of external component; wherein the operating state of the processor is a normal state or an abnormal state; the external component is a component connected to the server through a first slot; the first slot is one of the slots deployed on the server.

[0063] The server has at least one processor deployed, such as a CPU. In some embodiments, after the server starts up, the server can determine the operating state of at least one processor. Where there are multiple processors, the operating state of at least one processor is used to indicate the operating state of each of the multiple processors; where there is only one processor, the operating state of at least one processor is used to indicate the operating state of that processor.

[0064] For any one of the at least one processors, if the processor is in a normal operating state, it means that the processor is in place, the power supply is stable, and it can manage the hardware resource nodes under the processor normally, that is, the processor is available at this time; if the processor is in an abnormal operating state, it means that the processor has at least one of the following problems: not installed, power supply failure, or inability to manage the hardware resource nodes under the processor normally, that is, the processor is unavailable at this time.

[0065] In some embodiments, the server has multiple slots for connecting external components. These external components may include, for example, PCIe cards, NVMe hard drives, etc. The first slot is the slot among the multiple slots used to connect the external component.

[0066] For example, suppose a server has slots a, b, and c deployed, where an external component is connected to slot a. In this case, slot a is identified as the first slot.

[0067] The type of external component indicates the functionality and hardware specifications of the external component. For example, assuming the external component is a PCIe card, the type of external component indicates that the PCIe card functions as a PCIe graphics card, that the PCIe card relies on the PCIe 4.0 protocol, and that it requires a bandwidth specification of x16.

[0068] In some embodiments, the server can determine the operating state through hardware signal detection, bus communication, or other methods. Taking the determination of the operating state of any one of at least one processor as an example, the server sends a status detection signal to the server's CPLD via a dedicated pin. The status detection signal is used to indicate the operating state of the processor. After receiving the status detection signal, the server's CPLD determines whether the processor's operating state is normal or abnormal by detecting the voltage level of the pins connected to the processor.

[0069] In some embodiments, the server can determine the type of the external component through hardware identifiers, interface protocols, and firmware information. In some embodiments, there is a correlation between the physical interface of the external component and the type of the external component. The server can determine the type of the external component by determining its physical interface at the connection port with the first slot.

[0070] S402. Based on the server model and the operating status of at least one processor, determine the target processor connected to the external component among at least one processor.

[0071] Server models can be categorized by their physical form factor and core purpose. For example, based on physical form factor, server models can be 1U (1U = 4.445cm) servers, 2U servers, etc.

[0072] The target processor is at least one processor that establishes a connection with an external component and provides the external component with computing power and other resources.

[0073] In some embodiments, the server model determines the physical / electrical connection between the processor and the slot where the external components are located. Therefore, at least one candidate processor connected to the first slot can be determined based on the server model, and then the processor among the at least one candidate processor that is in a normal operating state can be determined as the target processor.

[0074] S403. Based on the server model and the type of external component, determine the target resource node connected to the external component in at least one resource node in the server; wherein, the target resource node is a node in the server that provides data interaction and management control for the external component.

[0075] Resource nodes can be, for example, the PCIe root port, the system management bus, and the NVMe controller. The PCIe root port is the main entry point for the data channel between the server and external components. In some embodiments, the PCIe root port provides a high-speed serial data transmission link, acting as a bridge between the processor's I / O controllers and external components. The system management bus is a simple communication bus in the server used for low-speed device management and status monitoring; it is the data transmission channel between the BMC and external components. The NVMe controller is a data transmission and protocol conversion hub specifically designed for NVMe hard drives, responsible for efficient communication between the NVMe hard drives and the processor in the server.

[0076] Since the target resource node is connected to external components, it serves as a bridge for data interaction between the external components and the server architecture, and the server can manage and control the external components through the target resource node.

[0077] In some embodiments, at least one resource node type and performance parameters differ across different server models. Therefore, the server can determine at least one candidate resource node from at least one resource node based on the server model, and then determine the target resource node from the at least one candidate resource node that is compatible with the type of the external component.

[0078] S404. Allocate resources to the external component based on the type of the external component, the target processor, and the target resource node.

[0079] In some embodiments, the server can determine the resource requirements of the external component based on its type. Then, based on these resource requirements, the server determines the resources allocated to the external component in the target processor. Finally, based on the resource requirements and the resources allocated to the external component, the server determines the resources belonging to the external component in the target resource node, thereby achieving resource allocation to the external component.

[0080] For example, assuming the external component is an NVMe hard drive, the resource requirements for the NVMe hard drive, determined based on its type, include: PCIe 4.0 x4 data channel bandwidth, NVMe 1.4 protocol, system management bus addresses 0x40-0x4F, and 256GB of memory space (contiguous physical addresses). The server determines the corresponding memory space (256GB, contiguous physical addresses) for the NVMe hard drive in the target processor based on these resource requirements, and allocates PCIe 4.0 x4 bandwidth to the NVMe hard drive in the target processor. Then, based on the resource requirements and the resources allocated to the external component, the server configures a data link with x4 bandwidth and a PCIe 4.0 transmission rate for the external component in the target resource node, binds it to system management bus addresses 0x40-0x4F, and establishes the association between the external component and indicator lights.

[0081] In some embodiments, after the server completes resource allocation for the external components, the external components have the hardware support required for stable operation. At this point, the external components begin to operate normally.

[0082] exist Figure 4 In the illustrated embodiment, the server determines the target processor and target resource node based on the server model, the operating status of at least one processor, and the type of external component. Compared to determining the processors and resource nodes connected to the external component in the server through a preset resource configuration table, this application can determine the actual target processors and target resource nodes connected to the external component, reducing the possibility of inaccurate determination of the target processors and target resource nodes due to changes in the processors and resource nodes connected to the slots in the server. Therefore, this application improves the resource allocation efficiency for external components by allocating resources to them using more accurate target processors and target resource nodes.

[0083] exist Figure 4 Based on the illustrated embodiment, the following, in conjunction with Figure 5 The process of determining the target processor connected to the external component in at least one processor is further described.

[0084] Figure 5 This is a schematic flowchart illustrating the process of determining a target processor, as provided in an embodiment of this application. Figure 5 As shown, the process may include the following steps:

[0085] S501. Based on the server model and the operating status of at least one processor, determine at least one first processor that is allowed to connect to external components.

[0086] At least one of the first processors may be connected to an external component. In some embodiments, the at least one first processor may be determined as follows: depending on the server model, at least one second processor that is allowed to connect to the first slot is determined among the at least one processor; depending on the operating state of the at least one processor, the processor among the at least one second processor that is in a normal operating state is determined as at least one first processor.

[0087] In some embodiments, the connection rules between the first socket and the processor are fixed through hardware circuitry during the server model design process, and different processors can be connected to the first socket in different server models. Therefore, at least one second processor that may be connected to the first socket can be determined from at least one processor, depending on the server model.

[0088] For example, for a server of model A, which includes processor 1 and processor 2, and the processor that can be connected to the first slot is only processor 1, then at least one second processor is determined to be processor 1; for a server of model B, which includes processor 3 and processor 4, and the processor that can be connected to the first slot in the server includes processor 3 and processor 4, then at least one second processor includes processor 3 and processor 4.

[0089] In some embodiments, after determining at least one second processor, the server filters the at least one second processor, selects a processor that can function normally from the at least one second processor, and determines that processor as the first processor.

[0090] Therefore, the server can determine the operating status of each of the at least one second processor by combining the operating status of at least one processor. Then, the server identifies the processor among the at least one second processor whose operating status is normal as at least one first processor.

[0091] For example, suppose at least one processor includes processor 1, processor 2, and processor 3, wherein the operating state of at least one processor indicates that the operating state of processor 1 is normal, the operating state of processor 2 is abnormal, and the operating state of processor 3 is normal. The server determines that at least one second processor includes processor 1 and processor 2 among the at least one processor. Since the operating state of processor 1 is normal and the operating state of processor 2 is abnormal, the server determines that at least one first processor is processor 1.

[0092] S502. Based on the server model, determine the target processor in at least one first processor.

[0093] In some embodiments, the server may determine the target processor in at least one first processor in the following manner: determining a target mapping relationship between the server model and the processor based on the server model; and determining the target processor in at least one first processor based on the server model and the target mapping relationship.

[0094] In some embodiments, operators can pre-define the mapping relationships between various server models and their corresponding processors, and store these mapping relationships in the server. The server can then determine the target mapping relationship between the server model and the processor based on the current server model.

[0095] Specifically, the server determines the target mapping relationship between the machine type and the processor in the following way: if the server type is a preset machine type, the mapping relationship between the machine type and the processor under the preset machine type is determined as the target mapping relationship; if the server type is not a preset machine type, the server type is determined, and the target mapping relationship is determined according to the server type.

[0096] The default server model is a predefined server model belonging to the "standard model". In some embodiments, the hardware configuration of the default server model is highly standardized. For servers with the default server model, the mapping relationship between the server model and the processor is the default mapping relationship.

[0097] Therefore, when the server model is the default model, the default mapping relationship can be determined as the target mapping relationship, that is, the mapping relationship between the model and the processor when the model is the default model can be determined as the target mapping relationship.

[0098] If the server model is not the default model, it is necessary to further determine the server type, and then determine the target mapping relationship based on the server type.

[0099] The server type is specified as either single-processor or dual-processor. A single-processor type indicates that the server has one processor or that only one processor is functioning normally; a dual-processor type indicates that the server has two processors or that both processors are functioning normally.

[0100] In some embodiments, the method for determining the target mapping relationship based on the server type can be as follows: if the server type is a single-processor type, the mapping relationship between the machine type and the processor in the single-processor type is determined as the target mapping relationship; if the server type is a dual-processor type, the mapping relationship between the machine type and the processor in the dual-processor type is determined as the target mapping relationship.

[0101] If the server is in a single-processor state, it means that both data processing and resource management are handled by that single processor, and resource balancing is not a concern. If the server is in a dual-processor state, both processors share the responsibilities of data processing and resource management, requiring the server to distribute these tasks evenly across both processors. In summary, the mapping relationship between server type and processor differs depending on whether the server is in a single-processor or dual-processor state. Therefore, the target mapping relationship can be determined based on whether the server is a single-processor or dual-processor type.

[0102] In some embodiments, the operator may pre-determine the mapping relationship between the machine type and the processor for various server types, including: the mapping relationship between the machine type and the processor in the case of a single-processor type and the mapping relationship between the machine type and the processor in the case of a dual-processor type.

[0103] When the server determines that the server is in a single-processor state, it will determine the mapping relationship between the machine type and the processor in the single-processor state as the target mapping relationship.

[0104] When the server determines that the server is in a dual-processor state, it determines the mapping relationship between the machine type and the processor in the dual-processor type as the target mapping relationship.

[0105] exist Figure 5 In the illustrated embodiment, the server determines the target processor from at least one processor based on the server's current model. Compared to determining the target processor through a preset resource configuration table, this application changes the method of determining the target processor from static pre-configuration to dynamic adaptation. Even if the processor connected to the slot in the server changes, the target processor can still be accurately determined. Therefore, this application improves the accuracy of determining the target processor.

[0106] Based on the above embodiments, the following, in conjunction with Figure 6 The process of determining the target resource node that is connected to the external component in at least one resource node in the server is further explained.

[0107] Figure 6 This is a schematic diagram illustrating a process for determining a target resource node, provided as an embodiment of this application. Figure 6 As shown, the process may include the following steps:

[0108] S601. Determine the bandwidth of the external components.

[0109] The bandwidth of an external component is used to indicate the maximum rate that the external component supports when transmitting data.

[0110] In some embodiments, the bandwidth of an external component is fixed within the external component, and the server can determine the bandwidth of the external component by obtaining its component information. In some embodiments, the server can determine the bandwidth of the external component by determining the connection link between the external component and the slot.

[0111] S602. Based on the server model, determine at least one first resource node that is allowed to connect to the first slot among at least one resource node.

[0112] The first resource node is a resource node that may be connected to the first slot among at least one resource node.

[0113] In some embodiments, the connection rules between slots and resource nodes are fixed through hardware circuitry during the server model design process, and different models can connect to different resource nodes for their first slots. Therefore, the server can determine at least one first resource node that may be connected to the first slot from at least one resource node, depending on the server model.

[0114] S603. Based on the bandwidth and type of the external component, determine at least one second resource node among at least one first resource node that is allowed to connect to the external component.

[0115] In some embodiments, after determining at least one first resource node, the server filters the at least one first resource node to select a resource node that matches the bandwidth and type of the external component from the at least one first resource node, and determines the resource node as the second resource node.

[0116] Therefore, for each of the at least one first resource nodes, the server can determine whether the first resource node meets the bandwidth and type requirements of the external component based on the bandwidth and type of the external component, and if the first resource node meets the bandwidth and type requirements of the external component, the server can designate the first resource node as a second resource node.

[0117] S604. Based on the server model, determine the target resource node in at least one second resource node.

[0118] In some embodiments, operators can pre-define mapping relationships between various server models and resource nodes, and store these mapping relationships on the server. The server can determine the mapping relationship between the server's current model and resource nodes. Then, the server determines the target resource node from at least one second resource node based on the target mapping relationship.

[0119] In some embodiments, the server determines the mapping relationship between machine type and resource nodes in a similar way to the server determines the target mapping relationship. If the server's machine type is a preset type, the mapping relationship between the machine type and resource nodes under the preset type is determined as the mapping relationship between the machine type and resource nodes corresponding to that server. If the server's machine type is not a preset type, it is determined whether the server type is a single-processor type or a dual-processor type.

[0120] Then, if the server type is single-processor, the mapping relationship between the machine type and the processor in the single-processor type is determined as the mapping relationship between the machine type and the resource node corresponding to the server; if the server type is dual-processor, the mapping relationship between the machine type and the resource node in the dual-processor type is determined as the mapping relationship between the machine type and the resource node corresponding to the server.

[0121] exist Figure 6 In the illustrated embodiment, the server determines the target resource node from at least one resource node based on the server's current model. Compared to determining the target resource node through a preset resource configuration table, this application changes the method of determining the target resource node from static pre-configuration to dynamic adaptation. Even if the resource node connected to the slot in the server changes, the resource node can still be accurately determined. Therefore, this application improves the accuracy of determining the target resource node.

[0122] In one possible implementation, the server allocates resources to the external component based on the type of the external component, the target processor, and the target resource node as follows: determine at least one resource allocation index value corresponding to the external component based on the type of the external component; allocate resources to the external component based on the target processor, the target resource node, and at least one resource allocation index value.

[0123] Resource allocation metrics are used to indicate the amount of resources required by an external component. For example, assuming the external component is an NVMe hard drive, at least one resource allocation metric value for the external component may include, for example, PCIe 4.0 x4, system management bus address 0x43, and 256MB address space.

[0124] In some embodiments, the type of external component determines its resource allocation requirements. Therefore, at least one resource allocation index value can be determined based on the type of external component.

[0125] In some embodiments, allocating resources to an external component is equivalent to converting at least one resource allocation metric value into the hardware configuration of the external component. Specifically, the server can determine the resources corresponding to the external component in the target processor based on at least one resource allocation metric value, and establish an association between these resources and the external component, thereby ensuring that these resources are allocated to the external component.

[0126] In addition, the server can determine the resources corresponding to the external components in the target resource node based on at least one resource allocation indicator, and establish the association between the resources and the external components, thereby ensuring that the resources are allocated to the external components.

[0127] In one possible implementation, the server is also used to determine the server model, and the server model can be determined as follows: determine the configuration information of the fan plate in the server; determine the server model based on the configuration information.

[0128] In some embodiments, a fan plate is deployed in the server for heat dissipation. It should be noted that due to differences in the structural layout of different server models, different server models have different heat dissipation requirements; that is, the configuration information of the fan plate differs for different server models. Therefore, the configuration information of the fan plate is related to the server model.

[0129] The fan board configuration information indicates the hardware parameters and layout features related to the fans in the server. The server model can be determined based on the fan board configuration information and the relationship between the fan board configuration information and the server model.

[0130] In some embodiments, the server is equipped with a CPLD, BMC, and BIOS. After the server starts up, the CPLD, BMC, and BIOS can allocate resources to external components. This process mainly consists of two stages. The first stage involves the CPLD determining the server's model, the operating status of at least one processor, and the types of external components after server startup. Then, the BMC, based on the server's model, the operating status of at least one processor, and the types of external components, determines the target processor and target resource nodes and sends these to the CPLD. Simultaneously, this stage also completes the timing initialization of hardware components in the server, such as the power supply and clock, preparing for BIOS startup.

[0131] The second stage is the BIOS startup stage. In this stage, the BIOS determines the server model, the operating status of at least one processor, and the types of external components. It also identifies the target processor and target resource nodes and sends these to the CPLD. Then, the BIOS allocates resources to the external components based on the target processor and target resource nodes.

[0132] Specifically, it can be combined with Figure 7 To combine. Figure 7 A flowchart illustrating another resource allocation method provided in this application embodiment is shown below. Figure 7 As shown, the process may include the following steps:

[0133] S701 and CPLD obtain the configuration information of the fan board in the server.

[0134] In some embodiments, the fan board is typically equipped with a memory that stores configuration information. The CPLD can send a configuration retrieval request to the memory to obtain the fan board's configuration information. Upon receiving the configuration retrieval request, the memory sends the fan board's configuration information to the CPLD.

[0135] S702 and CPLD determine the server model based on the configuration information.

[0136] For detailed information on determining the server model through configuration information, please refer to the implementation examples for determining the server model; these will not be repeated here.

[0137] S703, CPLD obtains the operating status of at least one processor and the type of external component.

[0138] In some embodiments, for each processor in at least one processor, the processor can output its operating status through a corresponding pin. The CPLD can obtain the operating status of the processor by connecting to the corresponding pin.

[0139] In some embodiments, after an external component is inserted into the first slot, it sends its type to the motherboard via the interface bus. The CPLD can then detect the type of the external component by monitoring the interface bus.

[0140] S704 and BMC send a third acquisition request to CPLD. The third acquisition request is used to request the server model, the operating status of at least one processor, and the type of external components.

[0141] S705, BMC receives the server model sent by CPLD, the operating status of at least one processor, and the type of external components.

[0142] S706 and BMC determine the target processor to be connected to the external component in at least one processor, based on the server model and the operating status of at least one processor.

[0143] For detailed information on identifying the target processor, please refer to [link / reference]. Figure 5 The embodiments shown will not be described in detail here.

[0144] S707 and BMC determine the target resource node to be connected to the external component in at least one resource node in the server, based on the server model and the type of external component.

[0145] For detailed information on identifying target resource nodes, please refer to [link / reference]. Figure 6 The embodiments shown will not be described in detail here.

[0146] S708 and BMC send the target processor and target resource node to CPLD.

[0147] S709, the BIOS sends a fourth acquisition request to the COLD. The fourth acquisition request is used to request the server model, the operating status of at least one processor, and the type of external components.

[0148] The S710 BIOS receives information from the CPLD regarding the server model, the operating status of at least one processor, and the type of external components.

[0149] S711, the BIOS determines the target processor to be connected to the external component in at least one processor, based on the server model and the operating status of at least one processor.

[0150] For detailed information on identifying the target processor, please refer to [link / reference]. Figure 5 The embodiments shown will not be described in detail here.

[0151] S712, the BIOS determines the target resource node to be connected to the external component in at least one resource node in the server, based on the server model and the type of external component.

[0152] For detailed information on identifying target resource nodes, please refer to [link / reference]. Figure 6 The embodiments shown will not be described in detail here.

[0153] The S713 BIOS allocates resources to external components based on the target processor and target resource nodes.

[0154] For a detailed explanation of how to allocate resources to external components, please refer to the implementation examples of allocating components to external components, which will not be repeated here.

[0155] exist Figure 7 In the illustrated embodiment, the server determines the target processor and target resource node actually connected to the external component based on the server model, the operating state of at least one processor, and the type of external component. This reduces the possibility of inaccurate determination of the target processor and target resource node due to changes in the processor and resource node connected to the slot in the server. Therefore, this application improves the resource allocation efficiency of external components by allocating resources to them using more accurate target processors and target resource nodes.

[0156] Furthermore, since this application can more accurately identify the target resource node, when an external component fails, the server can accurately transmit the fault information of the external component through the indicator light of the external component, avoiding the transmission of the fault information of the external component through the wrong indicator light, thereby improving the operation and maintenance effect of the external component.

[0157] Figure 8 This is a schematic diagram of a resource allocation device provided in an embodiment of this application. Figure 8 As shown, embodiments of this application also provide a resource allocation device 80, which includes a determination module 81, a first processing module 82, a second processing module 83, and a resource allocation module 84, wherein:

[0158] The determining module 81 is used to determine the operating state of at least one processor in the server and the type of external component; wherein the operating state of the processor is a normal state or an abnormal state; the external component is a component connected to the server through a first slot; the first slot is one of the slots deployed on the server;

[0159] The first processing module 82 is used to determine the target processor connected to the external component in at least one processor based on the server model and the operating status of at least one processor.

[0160] The second processing module 83 is used to determine, based on the server model and the type of external component, a target resource node connected to the external component in at least one resource node in the server; wherein, the target resource node is a node in the server that provides data interaction and management control for the external component;

[0161] Resource allocation module 84 is used to allocate resources to external components based on the type of external component, the target processor, and the target resource node.

[0162] In one possible implementation, the first processing module 82 is specifically used for:

[0163] Based on the server model and the operating status of at least one processor, at least one first processor that is allowed to connect to external components is identified among the at least one processor.

[0164] Depending on the server model, the target processor is determined in at least one first processor.

[0165] In one possible implementation, the first processing module 82 is specifically used for:

[0166] Determine the target mapping relationship between the server model and the processor based on the server model;

[0167] Based on the server model and target mapping relationship, the target processor is determined in at least one first processor.

[0168] In one possible implementation, the first processing module 82 is specifically used for:

[0169] If the server model is a preset model, the mapping relationship between the model and the processor under the preset model is determined as the target mapping relationship;

[0170] If the server model is not the default model, determine the server type and determine the target mapping relationship based on the server type.

[0171] In one possible implementation, the first processing module 82 is specifically used for:

[0172] When the server type is single-processor, the mapping relationship between the machine type and the processor in the case of single-processor type is determined as the target mapping relationship;

[0173] When the server is a dual-processor type, the mapping relationship between the machine type and the processor is determined as the target mapping relationship.

[0174] In one possible implementation, the first processing module 82 is specifically used for:

[0175] Depending on the server model, at least one second processor is identified among at least one processor that is allowed to connect to the first slot;

[0176] Based on the operating state of at least one processor, the processor in the normal operating state among at least one second processor is determined as at least one first processor.

[0177] In one possible implementation, the second processing module 83 is specifically used for:

[0178] Determine the bandwidth of the external components;

[0179] Based on the server model, at least one first resource node is identified among at least one resource node that is allowed to connect to the first slot;

[0180] Based on the bandwidth and type of the external component, at least one second resource node is determined from at least one first resource node that is allowed to connect to the external component;

[0181] Based on the server model, the target resource node is determined in at least one second resource node.

[0182] In one possible implementation, the resource allocation module 84 is specifically used for:

[0183] Based on the type of external component, determine at least one resource allocation index value corresponding to the external component;

[0184] Allocate resources to external components based on the target processor, the target resource node, and at least one resource allocation metric value.

[0185] In one possible implementation, the determining module 81 is further configured to:

[0186] Determine the configuration information of the fan board in the server;

[0187] Determine the server model based on the configuration information.

[0188] For a description of the features in the embodiment corresponding to the resource allocation device 80, please refer to the relevant description in the embodiment corresponding to the resource allocation method, which will not be repeated here.

[0189] Figure 9 A schematic diagram of the structure of the electronic device provided in this application. Figure 9 As shown, the electronic device 90 provided in this embodiment includes at least one processor 901 and a memory 902. Optionally, the electronic device 90 further includes a communication component 903. The processor 901, memory 902, and communication component 903 are connected via a bus.

[0190] In a specific implementation, at least one processor 901 executes computer execution instructions stored in memory 902, causing at least one processor 901 to execute the above-described resource allocation method embodiment.

[0191] The specific implementation process of processor 901 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0192] In the above embodiments, it should be understood that the processor can be a CPU, or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules within the processor.

[0193] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0194] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0195] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described resource allocation method embodiments at runtime.

[0196] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0197] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described resource allocation method embodiments.

[0198] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described resource allocation method embodiments.

[0199] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0200] The resource allocation method and electronic device provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A resource allocation method, characterized by, The method comprises: determining the working state of at least one processor in the server and the type of the external component; wherein the working state of the processor is a normal state or an abnormal state; the external component is a component connected to the server through a first slot; the first slot is one of the slots deployed on the server; determining at least one second processor allowed to be connected to the first slot in the at least one processor according to the model of the server; determining the processor in the at least one second processor with the normal state as the at least one first processor according to the working state of the at least one processor; determining a target processor in the at least one first processor according to the model of the server; determining a target resource node connected to the external component in at least one resource node in the server according to the model of the server and the type of the external component; wherein the target resource node is a node in the server providing data interaction and management control for the external component; allocating resources for the external component according to the type of the external component, the target processor and the target resource node; the determining of the target processor in the at least one first processor according to the model of the server comprises: in the case that the model of the server is a preset model, determining a mapping relationship between the model and the processor in the case that the model is the preset model as a target mapping relationship; in the case that the model of the server is not the preset model, determining the type of the server and determining the target mapping relationship according to the type of the server; determining the target processor in the at least one first processor according to the model of the server and the target mapping relationship.

2. The method of claim 1, wherein, the type of the server is a single-processor type or a dual-processor type, and the determining of the target mapping relationship according to the type of the server comprises: in the case that the type of the server is the single-processor type, determining a mapping relationship between the model and the processor in the case that the type of the server is the single-processor type as the target mapping relationship; in the case that the type of the server is the dual-processor type, determining a mapping relationship between the model and the processor in the case that the type of the server is the dual-processor type as the target mapping relationship.

3. The method according to claim 1 or 2, characterized in that, the determining of the target resource node connected to the external component in at least one resource node in the server according to the model of the server and the type of the external component comprises: determining the bandwidth of the external component; determining at least one first resource node allowed to be connected to the first slot in the at least one resource node according to the model of the server; determining at least one second resource node allowed to be connected to the external component in the at least one first resource node according to the bandwidth of the external component and the type of the external component; determining the target resource node in the at least one second resource node according to the model of the server.

4. The method according to claim 1 or 2, characterized in that, The method further comprises: determining configuration information of a fan board in the server; determining a model of the server according to the configuration information.

5. The method according to claim 1 or 2, characterized in that, The method further comprises: determining configuration information of a fan board in the server; determining a model of the server according to the configuration information.

6. An electronic device, comprising: The method further comprises: determining configuration information of a fan board in the server; determining a model of the server according to the configuration information. The method further comprises: determining configuration information of a fan board in the server; determining a model of the server according to the configuration information. The method further comprises: determining configuration information of a fan board in the server; determining a model of the server according to the configuration information. The method further comprises: determining configuration information of a fan board in the server; determining a model of the server according to the configuration information. The method further comprises: determining configuration information of a fan board in the server; determining a model of the server according to the configuration information. The method further comprises: determining configuration information of a fan board in the server; determining a model of the server according to the configuration information. The method further comprises: determining configuration information of a fan board in the server; determining a model of the server according to the configuration information. The method further comprises: determining configuration information of a fan board in the server; determining a model of the server according to the configuration information. The method further comprises: determining configuration information of a fan board in the server; determining a model of the server according to the configuration information. The method further comprises

Citation Information

Patent Citations

  • Peripheral configuration identification method and device of server, screen printing layout method and device of server and server

    CN115904884A