Server slot resource allocation system, method, server, device and medium
By introducing register components and firmware components into the server and dynamically allocating resources, the problems of resource waste and slot limitations in the existing technology are solved, and resource utilization and deployment flexibility are improved.
Patent Information
- Application Number
- CN202511031996.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-07-25
AI Technical Summary
In the existing technology, in server resource allocation systems, the resource allocation method of physical slots depends on the static pre-allocation performed by BIOS during the system startup phase, resulting in resource waste and slot limitations, which cannot meet the flexibility requirements of modern data centers and heterogeneous computing scenarios.
By introducing register components and firmware components into the server, the register components are used to store the global identification and resource allocation parameters of the physical slots. The firmware components read this information after the server is powered on and dynamically allocate resources, thus achieving on-demand resource allocation and security management, and avoiding slot restrictions.
It realizes dynamic allocation of resources, improves resource utilization and deployment flexibility, and solves the problems of resource waste and slot limitations caused by static allocation.
Smart Images

Figure CN120523767B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a server slot resource allocation system, method, server, device and medium. Background Art
[0002] In server design, resource allocation (including the number of PCIe lanes, memory address space, and I / O (Input / Output) mapping) for add-in cards (such as network cards, PCIe (Peripheral Component Interconnect Express) accelerator cards, and JBOF (Just a Bunch of Flash / Fabric) storage expansion devices) typically relies on static pre-allocation by the Basic Input / Output System (BIOS) during system startup.
[0003] In related technologies, the BIOS allocates fixed resources to each physical slot based on preset rules embedded in the code. This approach typically reserves large amounts of resources for high-bandwidth devices, such as 16 PCIe lanes or large blocks of contiguous memory address space. However, this rigid binding of resource allocation to physical slots results in rigid resource reservations, limiting hardware deployment flexibility. Furthermore, unused slots continue to occupy significant resources for extended periods, leading to resource fragmentation and waste. Furthermore, adjusting resource allocation requires modifying and recompiling the BIOS code, resulting in inefficient operations and maintenance. Summary of the Invention
[0004] The present application provides a server slot resource allocation system, method, server, device and medium to at least solve technical problems such as resource waste and slot limitation caused by static allocation in related technologies.
[0005] The present application provides a server slot resource allocation system, comprising: at least one physical slot of a server; a register component, the register component comprising at least one first register and at least one second register, the first register being used to store a global identifier of the physical slot, the global identifier being used to determine a resource allocation method for the physical slot, each physical slot being configured with a second register, the second register being used to store resource allocation parameters for the physical slot; and a firmware component being used to read the first register and the second register after the server is powered on, and to allocate resources to the at least one physical slot according to the resource allocation method and the resource allocation parameters.
[0006] The present application also provides a server, including the above-mentioned server slot resource allocation system.
[0007] The present application also provides a server slot resource allocation method, which is applied to the firmware component in the above-mentioned server slot resource allocation system. The method includes: after the server is powered on, reading a first register and a second register, the first register is used for the global identification of the physical slot, the global identification is used to determine the resource allocation method of the physical slot, each physical slot is configured with a second register, and the second register is used to store the resource allocation parameters of the physical slot; determining the resource allocation method of the physical slot according to the global identification, and allocating resources to at least one physical slot according to the resource allocation method and the resource allocation parameters.
[0008] The present application also provides a server slot resource allocation method, which is applied to the control component in the above-mentioned server slot resource allocation system, and the method includes: during the operation of the server, obtaining the resource adjustment instruction of the target slot; responding to the resource adjustment instruction of the target slot, determining the target register according to the identifier of the target slot, reading the upper limit total amount of resources pre-set by the firmware component, and verifying the legality of the adjustment resources corresponding to the resource adjustment instruction according to the upper limit total amount of resources; if the adjustment resources are verified to be legal, writing the custom allocation parameters of the target slot into the target register, and updating the global identifier of the physical slot to the second identifier.
[0009] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned server slot resource allocation methods when executing the computer program.
[0010] The present application also provides a non-volatile computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned server slot resource allocation methods are implemented.
[0011] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned server slot resource allocation methods when executed by a processor.
[0012] Through this application, the first register of the register component can be used for the global identification of the physical slot, the resource allocation method of the physical slot can be determined, and the second register can be configured in each physical slot to store the resource allocation parameters of the physical slot. Using the firmware component, after the server is powered on, the first register and the second register are read, and resources are allocated to at least one physical slot according to the resource allocation method and resource allocation parameters, thereby realizing on-demand resource allocation and security management without being restricted by slots. Therefore, it can solve the technical problems of resource waste and slot limitation caused by static allocation in related technologies, and achieve technical effects such as dynamic resource allocation, significantly improved resource utilization and deployment flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0014] Figure 1 A schematic diagram of the structure of a server slot resource allocation system provided in an embodiment of the present application;
[0015] Figure 2 A schematic diagram of the structure of a server slot resource allocation system provided in one embodiment of the present application;
[0016] Figure 3 A schematic diagram of a flow chart for controlling the hard disk light status according to an embodiment of the present application;
[0017] Figure 4 A flow chart of a server slot resource allocation method for a firmware component in a server slot resource allocation system provided in an embodiment of the present application;
[0018] Figure 5 A flow chart of a server slot resource allocation method for a control component in a server slot resource allocation system provided in an embodiment of the present application;
[0019] Figure 6 A block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0021] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0022] In related technologies, the peripheral resource configuration method is BIOS static slot resource binding (Static Slot Resource Binding). The core mechanism of this method is: during the system power-on process, the basic input and output system BIOS allocates fixed hardware resources to each physical slot (such as a PCIe slot) according to preset configuration rules. These resources include but are not limited to the following categories:
[0023] The number of PCIe channels (also known as lanes) determines the communication bandwidth between the device and the CPU (Central Processing Unit). For example, a PCIe 4.0 x8 connection (refers to an interface configuration using the fourth generation of the PCIe standard, where "x8" indicates that the physical slot and corresponding connection have eight data transmission channels) can provide a theoretical bandwidth of approximately 8GB / s, which is crucial for high-performance storage devices such as JBOF or GPUs (Graphics Processing Units).
[0024] Memory Mapped I / O: The address range used for data exchange between devices and the host. This type of resource is usually mapped into the system's address space in the form of physical memory addresses, allowing devices to directly read and write main memory, improving data transmission efficiency.
[0025] I / O Mapping Space: used to control and access device registers. This part of the address space is usually used for low-bandwidth, low-latency control operations, such as device status query or command issuance;
[0026] Interrupts: These are used by devices to notify the CPU of events. For example, when a network card receives a data packet, the CPU can be notified through the interrupt mechanism for processing.
[0027] The above resource configuration is completed once by the BIOS during system startup and remains unchanged throughout the entire operating cycle, unable to be dynamically adjusted. Although this static binding mechanism is simple to implement and highly stable, it exposes a series of flaws in modern data centers and heterogeneous computing scenarios. The flaw of this solution is that resource allocation is strictly bound to physical slots, resulting in resource fragmentation. Specifically:
[0028] A significant problem with static resource binding is that resource allocation is strictly tied to physical slots. This means that the BIOS reserves fixed resources for each slot, regardless of whether a device is actually installed. This directly leads to resource fragmentation. For example, on a server motherboard with four PCIe slots, the BIOS might allocate eight PCIe lanes to each slot (i.e., x8 per slot). Even if only the first two slots are populated with high-bandwidth devices (such as JBOF or GPUs), and the last two slots are empty, the 16 PCIe lanes they occupy are still reserved and cannot be used by other devices.
[0029] In this case, although the system has a total of 32 PCIe lanes (theoretically sufficient to support multiple high-performance devices), due to the static binding mechanism, only 16 are actually available, resulting in resource waste and performance bottlenecks. Similarly, the memory and I / O address spaces face the same problem. Even though unused slots are not connected to devices, their corresponding address spaces remain "locked," unable to be released for use by other devices requiring more resources. This not only reduces overall resource utilization but also limits the server's flexibility and scalability.
[0030] To improve server remote management capabilities and operational efficiency, servers commonly incorporate a Baseboard Management Controller (BMC). A BMC is an independent microcontroller with a dedicated network interface and operating system, enabling remote monitoring and management of servers. Using standard protocols such as IPMI (Intelligent Platform Management Interface) or Redfish (a new management protocol based on RESTful APIs), the BMC can remotely perform the following operations:
[0031] Check the server operating status (such as temperature, power status, fan speed, etc.);
[0032] Remote power on / off;
[0033] Modify BIOS parameters (such as boot order, power consumption mode, security settings, etc.).
[0034] However, although BMC has certain remote configuration management capabilities, it cannot directly intervene in the allocation logic of hardware resources. Specifically:
[0035] The BMC can remotely trigger a BIOS reconfiguration, but the resource configuration rules in the BIOS remain static and determined by preset code. Even if the BMC detects that a slot is not populated with a card, it cannot proactively release the PCIe lane or memory address space occupied by that slot. Resource scheduling still relies on a one-time static allocation by the BIOS at system startup and lacks the ability to dynamically adjust resources during runtime. While this management model improves the server's maintainability and remote control capabilities, it still struggles to cope with issues like low resource utilization and poor deployment flexibility.
[0036] In summary, the main technical defects in related technologies stem from two core problems brought about by the static resource configuration mechanism:
[0037] (1) Low resource utilization, specifically:
[0038] High-value resources (such as PCIe channels and memory address space) are occupied by unused slots for a long time and cannot be flexibly allocated to actual plug-in cards. This leads to low overall system resource utilization and the formation of resource "dead zones". This is particularly noticeable in high-bandwidth demand scenarios such as multiple GPUs.
[0039] (2) Strict deployment restrictions, specifically:
[0040] Devices with high resource requirements (such as JBOF) are forcibly bound to specific slots, limiting the server's scalability and adaptability to heterogeneous computing scenarios. Users must strictly follow the slot resource planning preset by the BIOS when deploying devices. Otherwise, problems such as insufficient resources and device activation may occur. For application environments such as data centers and AI training clusters that require flexible adjustment of resource layout, this restriction greatly affects deployment efficiency and system performance.
[0041] Therefore, there is an urgent need for a technical solution that can dynamically adjust resource configuration according to the actual card insertion status, break the limitations of static binding, improve resource utilization efficiency and system flexibility, and better meet the needs of diverse application scenarios such as modern data centers, edge computing, and AI acceleration.
[0042] In response to the shortcomings of related technologies, the embodiments of the present application propose a server slot resource allocation system, method, server, device and medium to achieve dynamic resource allocation without slot restrictions, and solve the technical problems of resource waste and slot restrictions caused by static allocation in related technologies, which will be described in detail below.
[0043] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0044] Figure 1A schematic diagram of a server slot resource allocation system provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the server slot resource allocation system 10 includes: a physical slot 101 , a register component 102 , a first register 1021 , a second register 1022 and a firmware component 103 .
[0045] In which, the server includes at least one physical slot 101; the register component 102 includes at least one first register 1021 and at least one second register 1022, the first register 1021 is used to store the global identifier of the physical slot 101, the global identifier is used to determine the resource allocation method of the physical slot 101, each physical slot 101 is configured with a second register 1022, the second register 1022 is used to store the resource allocation parameters of the physical slot 101; the firmware component 103 is used to read the first register 1021 and the second register 1022 after the server is powered on, and allocate resources to at least one physical slot 101 according to the resource allocation method and resource allocation parameters.
[0046] Among them, the server is a device that provides computing services, including hardware and the software running on it; physical slot 101 is the actual location on the server motherboard for inserting expansion cards (such as network cards, memory cards, etc.); firmware component 103 is the server's basic input and output system BIOS; the global identifier will be described in detail below and will not be repeated here.
[0047] It can be understood that the embodiment of the present application includes a server, at least one physical slot 101, a register component 102, a first register 1021, a second register 1022 and a firmware component 103, wherein the server has at least one physical slot 101 built in; the register component 102 is composed of at least one first register 1021 and at least one second register 1022, the first register 1021 is used to set the global identifier of the physical slot 101, and this global identifier determines the resource allocation policy of the physical slot 101, and each physical slot 101 is configured with a second register 1022 for storing the specific resource allocation parameters of the slot. After the server is started, the firmware component 103 reads the information in the first register 1021 and the second register 1022, and allocates resources to each physical slot 101 according to the obtained resource allocation method and parameters, thereby realizing on-demand resource allocation and security management.
[0048] In the embodiment of the present application, the firmware component 103 is used to pre-set the default allocation parameters of each physical slot 101 before the server is powered on.
[0049] It is understood that default allocation parameters generally refer to a set of standard resource configuration parameters preset by the system in the absence of custom configuration by the administrator. These are predefined resource allocation policies designed to ensure normal operation in most common scenarios. Specific settings are based on actual conditions and are not specifically defined here. Default allocation parameters include the number of PCIe channels, memory allocation size and starting address, and I / O allocation size and starting address. The number of PCIe channels, commonly referred to as "Lane," refers to the number of data transmission paths. Each PCIe device requires a certain number of Lanes to ensure its normal operation. The number of Lanes directly affects the maximum data transmission rate that the device can achieve. More Lanes means higher potential bandwidth, but it also means more system resources are occupied.
[0050] For example, a high-performance graphics card may require 16 lanes to support high-bandwidth data transmission, while some low-speed devices may only need 1 or 4 lanes; the memory allocation size refers to the memory capacity allocated to a specific hardware device, which is usually used to store data or status information required for device operation. The memory start address = refers to the starting address of the memory area allocated to the device. All operations on this memory will be offset based on this starting address; the IO allocation size refers to the amount of space allocated for input and output operations for a specific hardware device. This space is different from the memory space and is mainly used to process direct hardware interaction requests; the concept of the IO start address is similar to that of the memory start address, which is the starting point of a unique I / O (Input / Output) address range specified for the device.
[0051] Therefore, the firmware component 103 of the embodiment of the present application needs to pre-set the default allocation parameters of each physical slot 101 before the server is powered on, that is, before the server is started, the firmware component 103 will define a set of standard resource configuration parameters for each physical slot 101 and store this information in the second register 1022 so that the default values can be used for initialization during subsequent resource allocation.
[0052] In an embodiment of the present application, the global identifier includes a first identifier and a second identifier, wherein the first identifier indicates that the resource allocation parameters of all physical slots 101 are default allocation parameters, and the second identifier indicates that the resource allocation parameters of at least one physical slot 101 are custom allocation parameters.
[0053] It can be understood that the global identifier of the embodiment of the present application includes a first identifier and a second identifier, wherein the first identifier indicates that the resource allocation parameters of all physical slots 101 are default allocation parameters, which means that the server will allocate resources to each physical slot according to the preset default configuration when it starts; the second identifier indicates that the resource allocation parameters of at least one physical slot 101 are based on custom settings, which means that the resource allocation of these slots is not based on the default values, but is adjusted according to the specific needs of the administrator.
[0054] For example, after the firmware component 103 is powered on the server, it will read the global identifier in the first register 1021. If the global identifier is the first identifier (such as the value is 0), it means that all slot resource allocation parameters use the default allocation parameters; if the global identifier is the second identifier (such as the value is 1), it means that the resource allocation parameters of at least one slot are custom allocation parameters.
[0055] In an embodiment of the present application, the resource allocation method includes a first allocation method and a second allocation method, wherein the first allocation method includes: reading the default allocation parameters pre-set by the firmware component 103, allocating resources to the physical slot 101 according to the default allocation parameters, and writing the default allocation parameters into the second register 1022; the second allocation method includes: traversing all physical slots 101, reading the second register 1022 corresponding to each physical slot 101, and allocating resources to the physical slot 101 according to the resource allocation parameters stored in the second register 1022.
[0056] It can be understood that the resource allocation method of the embodiment of the present application includes a first allocation method and a second allocation method, wherein the first allocation method includes: reading the default allocation parameters pre-set by the firmware component 103, including the number of PCIe channels, memory allocation size and starting address, IO allocation size and starting address, allocating resources to the physical slot 101 according to these default allocation parameters, and at the same time writing these default allocation parameters into the second register 1022 of the corresponding physical slot; the second allocation method includes: traversing all physical slots 101 on the server, reading the resource allocation parameters stored in the second register 1022 corresponding to each physical slot in turn, and then allocating resources to each physical slot 101 according to these specific resource allocation parameters. By selecting the first allocation method or the second allocation method, the system can flexibly manage the resource configuration of each physical slot 101 according to the preset default allocation parameters or the parameters customized by the administrator.
[0057] In the embodiment of the present application, the first identifier is used to determine that the resource allocation mode of the physical slot 101 is the first allocation mode, and the second identifier is used to determine that the resource allocation mode of the physical slot 101 is the second allocation mode.
[0058] It can be understood that the first identifier of the embodiment of the present application is used to determine that the resource allocation method of the physical slot 101 is the first allocation method, which means that all physical slots 101 will be allocated resources according to the default allocation parameters pre-set in the firmware component 103; and the second identifier is used to determine that the resource allocation method of the physical slot 101 is the second allocation method, which means that at least one physical slot 101 needs to be allocated resources according to the specific resource allocation parameters stored in its corresponding second register 1022.
[0059] For example, when the global identifier is the first identifier, the first allocation method is adopted, that is, the default resource allocation parameters in the firmware component 103 are read and applied; when the global identifier is the second identifier, the second allocation method is adopted, that is, all physical slots 101 are traversed, and the resource allocation parameters in the second register 1022 corresponding to each slot are read, and resources are allocated to each slot accordingly. By selecting the first identifier or the second identifier, the system can flexibly choose to use the default configuration or the custom configuration to manage the resource configuration of each physical slot 101.
[0060] In the embodiment of the present application, after the firmware component 103 completes allocating resources according to the second allocation method, it resets the global identifier to the first identifier.
[0061] It can be understood that in the embodiment of the present application, after the firmware component 103 completes resource allocation according to the second allocation method, the global identifier will be reset to the first identifier. This means that after executing the resource allocation process based on the administrator's custom configuration, the system will automatically restore the global identifier to the default state. If it is subsequently started again or reconfigured, the preset default allocation parameters will be used by default for resource allocation. For example, during the startup process, the firmware component 103 detects that the global identifier is the second identifier and adopts the second allocation method, that is, traversing all physical slots 101, reading the resource allocation parameters in the second register 1022 corresponding to each slot, and allocating resources to each slot according to these parameters. After completing the resource allocation, the global identifier is reset to the first identifier. This means that if the server is restarted or the next time resource allocation is performed, unless there is a new custom configuration, the system will automatically use the default allocation parameters preset in the firmware component 103 for resource allocation, ensuring that even after specific adjustments are made, the system can still return to a stable and preset state for easy management and maintenance.
[0062] In an embodiment of the present application, the register component 102 includes at least one third register, which is used to store the total amount of available resources of the server. During the allocation process according to the second allocation method, the firmware component 103 reads the third register and verifies the resource allocation process of the second allocation method based on the total amount of available resources.
[0063] The total available resources are the total resources available for the physical slot 101, including the total number of PCIe channels, the size and total range of the memory address space, the size and total range of the IO address space, and the like.
[0064] It can be understood that the register component 102 of the embodiment of the present application also includes at least one third register, which is used to store the total amount of available resources of the server. When the firmware component 103 allocates resources according to the second allocation method, it will read the total amount of available resources in the third register and verify the resource allocation process under the second allocation method based on this total amount to ensure that the allocated resources do not exceed the actual available resources of the server. By introducing the third register and incorporating it into the verification mechanism in the resource allocation process, refined control and security of resource usage are achieved. On the one hand, it ensures that even in the case of concurrent configuration of multiple slots and multiple devices, there will be no system instability or hardware conflict caused by resource overruns; on the other hand, it improves the transparency and controllability of resource configuration, so that the firmware component can flexibly adjust resource policies in a dynamic environment while maintaining high availability and stability of the system.
[0065] In the embodiment of the present application, after the server is powered on, the firmware component 103 obtains the total amount of available resources of the server and writes the total amount of available resources into the third register.
[0066] The total amount of available resources can be obtained through the following technical means: directly reading from the hardware platform. The server's hardware platform (such as a chipset, PCIe root complex, etc.) usually has built-in read-only registers or configuration space fields for describing the upper limit of system resources. These fields store the maximum resource capacity defined when the server leaves the factory. During the server startup process, the firmware component 103 can directly access these hardware registers or configuration spaces, read the corresponding resource upper limit values therefrom, and summarize these values as the total amount of available resources of the server; reading from a non-volatile storage medium. In some customized server platforms, the manufacturer may pre-write the server's available resource information into a non-volatile storage medium, such as NVRAM (non-volatile random access memory) or SPI Flash (for storing firmware code). The firmware component 103 can read these preset values through a standard interface in the early stage of startup and use them as the total amount of available resources of the current system. In addition, other solutions can be obtained through a baseboard management controller (BMC) and real-time identification through a dynamic detection mechanism. These solutions are used according to actual needs and are not specifically limited here.
[0067] It can be understood that after the firmware component 103 is powered on the server, the embodiment of the present application obtains the total amount of available resources of the server and writes these total amounts of available resources into the third register in the register component 102 to ensure that the subsequent resource allocation process can be verified and allocated based on the accurate total amount of available resources, thereby achieving refined control and security of the server resource allocation process, ensuring the real-time and accuracy of resource configuration information, and enabling the server to achieve efficient, safe and reliable resource scheduling and management in complex and changeable application scenarios.
[0068] In an embodiment of the present application, the firmware component 103 calculates the total amount of required resources for all physical slots 101. If the total amount of required resources is less than or equal to the total amount of available resources, resources are allocated to the physical slots 101 according to the resource allocation parameters stored in the second register 1022. If the total amount of required resources is greater than the total amount of available resources, resource allocation is stopped.
[0069] The total required resource amount is the sum of the resources requested by all physical slots 101 according to their configurations, which will be described in detail below and will not be repeated here.
[0070] It can be understood that when the firmware component 103 of the embodiment of the present application performs resource allocation, it needs to calculate the total amount of required resources for all physical slots 101. If the total amount of required resources is less than or equal to the total amount of available resources read from the third register, it means that the resource request under the current configuration is within the system carrying capacity. At this time, the firmware component 103 will continue to execute the subsequent resource allocation process and strictly allocate corresponding system resources to each physical slot 101 in accordance with the resource configuration parameters stored in the second register 1022; if the total amount of required resources is greater than the total amount of available resources, it indicates that there is a risk of resource overrun, which may cause system instability, failure of device initialization normally, or resource conflicts. In this case, the firmware component 103 will actively terminate the resource allocation process and may feedback error information (such as "resources exceed limits" or "configuration conflict") to the administrator or management module to prompt the user to check and adjust the resource allocation plan.
[0071] In an embodiment of the present application, the total upper limit resource amount includes the total upper limit channel amount, the upper limit memory address space and the upper limit input / output address space, and the total required resource amount includes the total required channel amount, the required memory address space and the required input / output address space, wherein the firmware component 103 stops allocating resources when it recognizes that the sum of the total required channel amount, the required memory address space and any one of the required input / output address space is greater than the corresponding total upper limit resource amount, otherwise it allocates resources to the physical slot 101 according to the resource allocation parameters stored in the second register 1022. For example, if it is required to increase the number of PCIe channels for the first physical slot to 24 and expand the memory address space to 32GB, the firmware component 103 will first check the total available resources in the third register when processing this request to confirm the currently available PCIe Whether the number of channels is sufficient to provide 24 channels for the first slot, and whether there is sufficient unallocated memory address space to meet the 32GB requirement. If the requirement is met, resources can be allocated to each physical slot 101 according to the resource allocation parameters stored in the second register 1022; if the requirement is not met, resource allocation is stopped to avoid resource overrun. In this way, effective management and reasonable allocation of resources can be ensured to avoid operation failure or system instability caused by resource overrun.
[0072] Among them, the upper limit of the total number of channels is the maximum number of PCIe channels supported by the server; the upper limit of the memory address space is the maximum memory address space size supported by the server; the upper limit of the input and output address space is the maximum I / O address space size supported by the server; the required total number of channels is the sum of the number of PCIe channels requested by all physical slots 101; the required memory address space is the sum of the memory address space sizes requested by all physical slots 101; the required input and output address space is the sum of the I / O address space sizes requested by all physical slots 101.
[0073] It can be understood that when the firmware component 103 of the embodiment of the present application is allocating resources, it is necessary to calculate the total amount of required resources for all physical slots. If the total number of required channels, the sum of required memory address spaces, or any one of the required input and output address spaces exceeds the corresponding upper limit of the total amount of resources, the resource allocation will be stopped; otherwise, resources will be allocated to each physical slot according to the resource allocation parameters stored in the second register 1022.
[0074] For example, if the required number of channels for the first physical slot 101 is to increase the number of PCIe channels to 24, and the required memory address space is to expand the memory address space to 32GB, the firmware component 103 will check the upper limit of the total number of channels and the upper limit of the memory address space when processing this request, and confirm that the sum of the required total number of channels and the sum of the required memory address space is less than the upper limit of the total number of channels and the upper limit of the memory address space. If so, resources can be allocated to each physical slot 101 according to the resource allocation parameters stored in the second register 1022; if so, resource allocation will be stopped to avoid resource overrun. In this way, effective management and reasonable allocation of resources can be ensured, and operation failure or system instability caused by resource overrun can be avoided.
[0075] In the embodiment of the present application, the firmware component 103 is used to pre-set the upper limit of the total amount of resources of the server before the server is powered on.
[0076] It can be understood that the firmware component 103 of the embodiment of the present application needs to pre-set the upper limit of the total amount of resources of the server before the server is powered on, that is, before the server is started, the firmware component 103 will define the maximum value of all resources that the server can provide, and store this information in the third register of the register component 102 for verification and management during subsequent resource allocation.
[0077] In an embodiment of the present application, it also includes: a control component, which is used to obtain a resource adjustment instruction of the target slot during the operation of the server, and adjust the resources allocated to the target slot according to the resource adjustment instruction.
[0078] Among them, the control component, namely the baseboard management controller BMC, can provide the function of remote management and monitoring of server hardware. It is responsible for receiving resource adjustment instructions issued by the administrator through the network interface, and working in conjunction with the firmware component 103 and the register component 102 to realize dynamic adjustment of resources; the target slot refers to the specific physical slot 101 that needs to be adjusted for resources; the resource adjustment instruction is a command sent by the administrator through the control component, which is used to specify the new resource configuration parameters of the target slot, such as the number of PCIe Lanes, the size and starting address of the memory address space, the size and starting address of the IO address space, etc.
[0079] It can be understood that the control component of the embodiment of the present application is used to obtain resource adjustment instructions of the target slot during the operation of the server, and adjust the resources allocated to the target slot according to these instructions. Specifically, during the operation of the server, the control component will receive resource adjustment instructions from the administrator, and based on the instructions, update the resource configuration parameters in the second register 1022 corresponding to the physical slot 101, and set the global update identification register at the same time, so that the next time the server is restarted, the firmware component 103 can allocate resources to each physical slot according to the new configuration.
[0080] In an embodiment of the present application, the control component responds to the resource adjustment instruction of the target slot, determines the target register based on the identifier of the target slot, writes the custom allocation parameters of the target slot into the target register, and updates the global identifier of the physical slot 101 to the second identifier.
[0081] The target register refers to the second register 1022 corresponding to the target slot, and is a register for storing specific resource configuration parameters of the target slot.
[0082] It can be understood that the control component of the embodiment of the present application responds to the resource adjustment instruction of the target slot, determines the target register according to the identifier of the target slot, and writes the custom allocation parameters of the target slot into the target register, and updates the global identifier of the physical slot 101 to the second identifier. This means that when the administrator submits a resource adjustment request through the control component, the control component will identify the specific physical slot 101 that needs to be adjusted, and write the new resource configuration parameters into the corresponding second register 1022, and update the global identifier to the second identifier to notify the firmware component 103 to read the custom allocation parameters in the target register corresponding to the target slot at the next startup, and allocate resources to the target slot accordingly, thereby realizing the management of the resource configuration of each physical slot 101 through custom configuration.
[0083] In the embodiment of the present application, before adjusting the resources allocated to the target slot, the control component reads the upper limit resource amount preset by the firmware component 103 and verifies the legitimacy of the adjusted resources corresponding to the resource adjustment instruction based on the upper limit resource amount.
[0084] Among them, verifying the legality means that the control component reads the upper limit of the total amount of resources and checks whether the resource adjustment instruction will cause resource over-limit based on this information. If the new resource configuration does not exceed the upper limit of the total amount of resources, the adjustment is considered legal.
[0085] It can be understood that before adjusting the resources allocated to the target slot, the control component of the embodiment of the present application will read the upper limit total amount of resources pre-set by the firmware component 103, and verify the legitimacy of the adjusted resources corresponding to the resource adjustment instruction based on these upper limit values. That is, before performing any resource adjustment, the control component will confirm that the new resource configuration will not exceed the maximum resource limit of the server to ensure the stability and reliability of the system.
[0086] In an embodiment of the present application, the total upper limit of resources includes the total upper limit of channels, the upper limit of memory address space, and the upper limit of input and output address space. Before adjusting the resources allocated to the target slot, the control component calculates the sum of the total number of channels, the sum of the memory address space, and the sum of the input and output address space of all physical slots 101 after resource modulation based on the adjustment resources corresponding to the resource adjustment instruction. It is determined that the adjustment resources corresponding to the resource adjustment instruction are illegal, the execution of the write operation of the custom allocation parameters is prohibited, and an error prompt is generated. Otherwise, it is determined that the adjustment resources corresponding to the resource adjustment instruction are legal, and the write operation of the custom allocation parameters is executed.
[0087] It can be understood that before adjusting the resources allocated to the target slot, the control component of the embodiment of the present application needs to calculate the sum of the total number of channels, the sum of the memory address space, and the sum of the input and output address space of all physical slots 101 after the resource adjustment based on the adjustment resources corresponding to the resource adjustment instruction. If the calculation result shows that any sum exceeds the corresponding upper limit resource total amount, it is determined that the adjustment resource corresponding to the resource adjustment instruction is illegal, and it is necessary to prohibit the execution of the custom allocation parameter write operation and generate an error prompt; otherwise, it is determined that the adjustment resource corresponding to the resource adjustment instruction is legal, and the custom allocation parameter write operation is executed. In this way, the control component can ensure that the new configuration will not exceed the resource upper limit of the server before adjusting the resources, thereby ensuring the stability of the system and the effective use of resources.
[0088] According to the server slot resource allocation system of the embodiment of the present application, the first register of the register component can be used for the global identification of the physical slot, the resource allocation method of the physical slot is determined, and the second register is configured in each physical slot to store the resource allocation parameters of the physical slot. Using the firmware component, after the server is powered on, the first register and the second register are read, and resources are allocated to at least one physical slot according to the resource allocation method and resource allocation parameters, thereby realizing on-demand resource allocation and security management, and is not restricted by slots. Therefore, it can solve the technical problems of resource waste and slot limitation caused by static allocation in related technologies, and achieve technical effects such as dynamic resource allocation, significantly improved resource utilization and deployment flexibility.
[0089] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0090] The server slot resource allocation system is further described below through a specific embodiment.
[0091] This embodiment proposes a method for dynamically allocating server plug-in card resources based on the collaboration of BIOS, CPLD (Complex Programmable Logic Device) and BMC. The corresponding structural diagram is shown in FIG. Figure 2 As shown, CPLD, or register component, is designed to address the resource waste and slot limitations caused by traditional static allocation. Its core features are:
[0092] The total amount of resources and default values are fixed in the BIOS, that is, the firmware component: the firmware component pre-stores the global total amount of resources (such as the total number of PCIe lanes and memory address range) and the default resource allocation policy for each slot.
[0093] The register component is used to mark dynamic configurations: It sets a resource register (the second register) for each slot and adds a global update flag register (a 1-bit flag) (the first register). When an administrator submits a new configuration through the BMC control component, the register component writes the new parameters to the corresponding slot register and sets the flag (for example, to 1) to notify the firmware component that the new configuration needs to be loaded.
[0094] Firmware component on-demand loading strategy: When the firmware component starts, it first checks the global identifier of the register component: If the identifier is the first identifier, that is, the default value (such as 0), resources are allocated according to the default configuration preset in the firmware component; if the identifier is the second identifier, that is, a non-default value (such as 1), the configuration value of the second register of each slot in the register component is read to allocate resources, and the identifier is reset after completion.
[0095] Dynamic adjustment of control components: Administrators remotely modify slot resources through the BMC. Register components verify the legitimacy of the total resource amount in real time to ensure that the dynamically adjusted total resource does not exceed the global upper limit preset by the BIOS.
[0096] The embodiment of the present application can realize on-demand resource allocation and security management through closed-loop collaboration between the hardware layer (register component CPLD) and the firmware layer (firmware component BIOS) and the management control layer (control component BMC), thereby significantly improving resource utilization and deployment flexibility.
[0097] The flowchart of controlling the hard disk light status in the embodiment of the present application is as follows: Figure 3 As shown, the details are as follows:
[0098] Step 1: Before power on - preset resource configuration.
[0099] (1) Firmware component solidification resource parameters.
[0100] a. Global resource capacity: The BIOS pre-defines the upper limit of the total server resources, including the total number of PCIe lanes, the memory address space size and total range, and the I / O address space size and total range (for example, total PCIe lanes: 64, total memory address space: 256GB range 0x00000000 to 0x3FFFFFFF, total I / O address space: 256MB range 0x80000000 to 0x8FFFFFFF).
[0101] b. Default slot configuration: Pre-allocates default resource values for each physical slot, including the number of PCIe lanes, memory allocation size and starting address, and I / O allocation size and starting address.
[0102] (2) Register component initialization.
[0103] a. Configure the register group for the global resource amount, that is, the third register, and configure an independent register group for each slot, that is, the second register, which contains the following fields:
[0104] Resource parameters: number of PCIe channels, memory allocation value, and IO allocation value.
[0105] b. Set the global update flag register (1 bit), that is, the first register, with an initial value of 0 (no dynamic configuration needs to be loaded).
[0106] Step 2: After power-up – firmware components start up and resources are allocated.
[0107] (1) The firmware component updates the global resource amount register.
[0108] After the firmware component is powered on, the total amount of resources available for all external card slots will be written into the third register of the register component.
[0109] (2) The firmware component reads the update identifier.
[0110] When the firmware component starts, it checks the first register of the register component. If the global identifier is the first identifier, that is, identifier = 0, it enters the static allocation process. If the global identifier is the second identifier, that is, identifier = 1, it enters the dynamic allocation process, as follows:
[0111] Dynamic resource allocation logic (when flag = 1):
[0112] a. Read register component: traverse all slots and read the resource parameters of each slot in the register component (number of PCIe channels, memory allocation size and starting address, IO allocation size and starting address);
[0113] b. Resource verification and allocation: Calculate the total resources of all slots (number of PCIe lanes, memory allocation size and starting address, I / O allocation size and starting address) to ensure that they do not exceed the global total preset by the firmware component;
[0114] c. Reset update flag: After the allocation is completed, the second flag in the first register of the register component is reset to 0, that is, the first flag.
[0115] Static resource allocation logic (when flag = 0):
[0116] Allocate resources according to the default configuration of the firmware component, and write the default resource allocation parameters of each slot into the register component.
[0117] Step 3: System operation phase - dynamic adjustment of the control component BMC.
[0118] (1) The administrator submits an adjustment request.
[0119] a. Send commands through the controller's web interface (a graphical user interface accessed through a web browser) or API (Application Programming Interface) to specify the target slot and new resource parameters (number of PCIe lanes, memory allocation size and starting address, and I / O allocation size and starting address).
[0120] (2) The control component verifies the legitimacy.
[0121] a. Read global totals: Obtain the total resource limits for the number of PCIe channels, memory allocation size and starting address, and I / O allocation size and starting address from the firmware component.
[0122] b. Calculate new resource usage: Based on the current resource allocation values for each slot, calculate whether the adjusted total usage exceeds the limit.
[0123] c. Confirm the verification result: if it is legal, the write process will begin; if it is illegal, an error message will be returned and the operation will be terminated.
[0124] (3) Write to the register component and mark it updated.
[0125] a. Write the new resource parameters to the second register of the target slot.
[0126] b. Set the global update flag to 1 to indicate that a new configuration needs to be loaded.
[0127] (4) Restart to take effect.
[0128] The administrator restarts the server, triggering the firmware component to reallocate resources.
[0129] The embodiments of the present application adopt a dynamic resource allocation mechanism to replace the static resource reservation method commonly used in traditional servers. Under the traditional resource configuration mode, each physical slot is usually preset with a fixed resource quota (such as the number of PCIe channels, memory address space, etc.). Even if the slot is not currently inserted with a device or the actual demand of the device is lower than the reserved value, this part of the resources cannot be reused by other slots, resulting in serious resource waste and fragmentation problems.
[0130] This embodiment implements real-time monitoring and management of the resource configuration of each physical slot by introducing a CPLD register component (including the first, second, and third registers). Combined with the firmware component's mechanism for loading resource configuration parameters during the startup phase, this achieves true on-demand allocation. When a slot requires more resources, the system can flexibly adjust its resource configuration without exceeding the server's overall resource limit, ensuring maximum resource utilization.
[0131] This embodiment improves the flexibility of server hardware deployment by implementing a decoupling design between physical slots and resource configuration. In traditional server architectures, high-performance devices (such as JBOF storage expansion modules and GPU accelerator cards) often need to be inserted into specific "dedicated slots" to obtain sufficient PCIe bandwidth or other key resources. This limitation not only reduces system scalability but also increases the complexity of operation and maintenance deployment.
[0132] This embodiment allows administrators to dynamically configure resources for any physical slot based on business needs. For example, the number of PCIe lanes in a slot can be increased from the default 8 to 16 or even 24 to meet the access needs of high-bandwidth devices. Furthermore, because resource configuration information is independently stored in register components and uniformly loaded by firmware components at startup, resource adaptation can be completed without relying on the physical location of the slot or factory settings. This flexible resource scheduling capability enables the server to support mixed deployment of heterogeneous accelerator cards. Whether it is a GPU, FPGA (Field-Programmable Gate Array), or high-speed storage expansion device, they can be freely inserted into any available slot and obtain the required system resources through remote configuration before operation. This greatly simplifies the device deployment process and improves the adaptability and compatibility of the server platform.
[0133] Furthermore, resource adjustments achieve zero-code-modification, maintenance-free operation. Traditional servers often require recompiling BIOS / UEFI firmware, updating configuration files, and even shutting down and restarting when resource configuration adjustments are needed. This process is cumbersome and prone to human error. However, with this embodiment, administrators can directly issue resource adjustment commands while the server is running through remote management interfaces such as the BMC (Baseboard Management Controller). The system automatically verifies the validity of the new resource configuration parameters and writes them to the registers in the corresponding slots. These configurations take effect the next time the server boots, eliminating the need to modify firmware source code or interrupt service operations. This significantly shortens the operation and maintenance cycle and reduces the risks associated with manual intervention.
[0134] Finally, this embodiment constructs a complete hardware-level resource verification mechanism. Before each resource configuration operation is performed, the system reads the total amount of available server resources stored in the third register and compares it with the currently requested resource configuration to ensure that resource overruns do not occur. This mechanism effectively prevents system instability, device conflicts, and even crashes caused by configuration errors or illegal requests. In addition, it adopts a state isolation design concept: all dynamic configuration information is stored in the CPLD register component rather than directly written into the firmware code. The firmware component only loads valid resource configuration information when the server is started, and does not modify the register contents during operation, thereby avoiding the risks caused by misoperation at runtime and enhancing the system's fault tolerance and stability.
[0135] In summary, the technical solution of this embodiment can achieve the following effects:
[0136] 1. Improve resource utilization and avoid resource waste
[0137] Dynamic allocation replaces static reservation: Resources are allocated based on actual card insertion needs, eliminating the resource fragmentation caused by fixed reservations in traditional solutions. CPLD registers monitor and verify total resources in real time, ensuring dynamic resource allocation when multiple cards are inserted, maximizing server resource utilization.
[0138] 2. Enhance deployment flexibility and break slot limitations
[0139] Slot decoupling: Devices with high resource requirements (such as JBOF and GPUs) can be inserted into any slot without relying on the manufacturer's preset "dedicated slots", supporting mixed deployment of heterogeneous accelerator cards.
[0140] On-demand expansion: Within the permitted range of total resources, administrators can dynamically adjust the resource specifications of a single slot (for example, increasing the number of PCIe lanes in a slot from 8 to 24) to adapt to changes in business load.
[0141] 3. Simplify operation and maintenance processes and reduce operating costs
[0142] No code modification required: Remotely adjust resource configurations through the BMC without recompiling firmware components or downtime for maintenance, significantly shortening the operation and maintenance cycle.
[0143] 4. Enhance system security and reliability
[0144] Hardware-level verification mechanism: The CPLD register component verifies the total global resource amount before allocating resources to avoid hardware conflicts or system crashes caused by configuration over-limits.
[0145] State isolation design: Dynamic configuration is stored in the CPLD register component, and the firmware component only loads the valid configuration at startup to prevent malfunctions caused by incorrect operations during operation.
[0146] In summary, this embodiment solves the core pain points of traditional solutions, such as resource rigidity, low utilization, and complex operation and maintenance, through dynamic allocation, cross-layer collaboration, and security verification mechanisms, and provides a flexible, efficient, and reliable solution for server peripheral resource management.
[0147] An embodiment of the present application further provides a server, comprising the above-mentioned server slot resource allocation system.
[0148] The embodiment of the present application further provides a server slot resource allocation method, which is applied to the firmware component in the above-mentioned server slot resource allocation system. Figure 4 The flowchart of the server slot resource allocation method for the firmware component in the server slot resource allocation system is as follows: Figure 4 As shown, the method includes:
[0149] In step S201, after the server is powered on, the first register and the second register are read. The first register is used for the global identification of the physical slot, and the global identification is used to determine the resource allocation method of the physical slot. Each physical slot is configured with a second register, and the second register is used to store the resource allocation parameters of the physical slot.
[0150] It can be understood that after the server is powered on in the embodiment of the present application, the firmware component first reads the first register and the second register. The first register is used to store the global identifier of the physical slot, which is used to determine the resource allocation method of the physical slot; each physical slot is configured with a second register, and the second register is used to store the specific resource allocation parameters of the slot. That is, when the server starts, the firmware component will decide whether to use the default configuration or the custom configuration based on the global identifier, and read the specific resource configuration parameters from the corresponding second register to perform resource allocation, realizing intelligent identification and flexible control of the physical slot resource configuration during the server startup phase, supporting the mixed use of default configuration and custom configuration on the same platform, meeting the personalized needs in different business scenarios, while also ensuring the accurate loading of resource configuration information, and improving the stability, compatibility and maintainability of the system.
[0151] In step S202, a resource allocation mode of the physical slot is determined according to the global identifier, and resources are allocated to at least one physical slot according to the resource allocation mode and resource allocation parameters.
[0152] Among them, the resource allocation method includes a first allocation method and a second allocation method. The first allocation method is based on the default resource allocation parameters preset in the firmware component; the second allocation method is based on the custom resource allocation parameters set by the administrator through the control component and written into the register.
[0153] It can be understood that the embodiment of the present application determines the resource allocation method of the physical slot based on the global identifier stored in the first register obtained in the above steps; then, according to the resource allocation method and the resource allocation parameters stored in the second register, corresponding system resources are allocated to at least one physical slot, that is, when the server starts, the firmware component will first read the global identifier to determine whether the default configuration or the custom configuration should be used, and complete the resource initialization process in combination with the resource configuration parameters corresponding to each slot. Through the above mechanism, a high degree of flexibility and controllability of resource allocation is achieved, and it supports flexible selection of the default configuration or the custom configuration according to the actual needs of different slots on the same hardware platform. At the same time, it also enhances the adaptability of the server in a multi-task load environment, and improves the system resource utilization and operation and maintenance efficiency.
[0154] According to the embodiment of the present application, a server slot resource allocation method for a firmware component in a server slot resource allocation system can be used. After the server is powered on, the first register and the second register can be read. According to the global identifier of the physical slot of the first register, the resource allocation method of the physical slot can be determined. Each physical slot is configured with a second register that stores resource allocation parameters. Resources are allocated to at least one physical slot according to the resource allocation method and resource allocation parameters, thereby realizing on-demand resource allocation and security management without being restricted by slots, and achieving technical effects such as dynamic resource allocation, significantly improved resource utilization and deployment flexibility.
[0155] For the description of the features of the embodiment corresponding to the server slot resource allocation method applied to the firmware component in the server slot resource allocation system, please refer to the relevant description of the embodiment corresponding to the server slot resource allocation system, which will not be repeated here.
[0156] The embodiment of the present application further provides a server slot resource allocation method, which is applied to the control component in the above-mentioned server slot resource allocation system. Figure 5 FIG. 1 is a flow chart of a server slot resource allocation method for a control component in a server slot resource allocation system. Figure 5 As shown, the method includes:
[0157] In step S301, during the operation of the server, a resource adjustment instruction for a target slot is obtained.
[0158] The resource adjustment instruction is a command issued by the administrator through a web interface or API, and is used to modify the resource configuration parameters of the target slot, such as increasing the number of PCIe channels or adjusting the memory address space size.
[0159] It can be understood that during the normal operation of the server in the embodiment of the present application, the resource adjustment instruction from the administrator will be received. The instruction clearly specifies the target slot where the resource configuration needs to be adjusted and the specific resource configuration change content. Through this method, the server can dynamically adjust the hardware resources without shutting down, which not only greatly improves the flexibility and adaptability of the system, but also significantly enhances the operation and maintenance efficiency. Specifically, the administrator can respond to changes in business needs in real time, such as increasing or decreasing the number of PCIe channels of a specific device, adjusting the size of the memory address space, etc., without causing interruption or impact on the running services.
[0160] In step S302, in response to the resource adjustment instruction of the target slot, the target register is determined according to the identifier of the target slot, the upper limit resource amount preset by the firmware component is read, and the legitimacy of the adjustment resource corresponding to the resource adjustment instruction is verified according to the upper limit resource amount.
[0161] It can be understood that in the embodiment of the present application, after the system receives a resource adjustment instruction for a target slot, it will determine the corresponding register based on the unique identifier of the slot and read the server resource upper limit pre-set by the firmware component. Then, based on the upper limit value, it will determine whether the resource adjustment is legal to decide whether to perform subsequent resource write operations. Through this verification process, it is possible to accurately determine whether the resource adjustment is within the overall resource carrying capacity of the server. If the adjusted total resource demand does not exceed the server upper limit, the adjustment is considered legal and the system will continue to perform subsequent operations, that is, write the new resource configuration parameters to the register corresponding to the target slot and update the global identifier to notify the firmware component to adopt the new resource configuration plan at the next startup; if the adjustment exceeds the resource upper limit, it is determined to be an illegal operation, and the resource write is refused, and an error prompt message is returned to the administrator to prevent system instability or hardware conflicts due to resource limit excess. This not only ensures the security and stability of resource adjustment, but also realizes refined control of dynamic resource management, thereby improving the utilization rate and deployment flexibility of server resources.
[0162] In step S303, if the adjusted resources are verified to be legal, the user-defined allocation parameters of the target slot are written into the target register, and the global identifier of the physical slot is updated to the second identifier.
[0163] It can be understood that, after the embodiment of the present application confirms through the above steps that the resource adjustment request of the target slot is legal, that is, it does not exceed the resource upper limit of the server, the custom allocation parameters of the slot are written into its corresponding target register, that is, the second register, and the global identifier of the physical slot is updated to the second identifier to notify the firmware component to use the custom configuration to complete resource allocation when the server is started next time, rather than using the default configuration, thereby realizing flexible customization of resource configuration and ensuring the validity of custom settings after system restart. In addition, through the coordinated control of hardware registers and firmware identifiers, it can dynamically manage resource configuration at runtime while ensuring the accurate perception and response capabilities of the firmware layer to configuration changes, greatly improving the maintainability and adaptability of the server system.
[0164] According to the embodiment of the present application, a server slot resource allocation method for a control component in a server slot resource allocation system can obtain resource adjustment instructions of a target slot during server operation, respond to resource adjustment instructions of the target slot, and verify the legality of the adjustment resources corresponding to the resource adjustment instructions based on the total upper limit of resources. If the adjustment resources are verified to be legal, the custom allocation parameters of the target slot are written into the target register, thereby realizing on-demand resource allocation and security management without being restricted by slots, and achieving technical effects such as dynamic resource allocation, significantly improved resource utilization and deployment flexibility.
[0165] For the description of the features in the embodiment corresponding to the server slot resource allocation method applied to the control component in the server slot resource allocation system, please refer to the relevant description of the embodiment corresponding to the server slot resource allocation system, which will not be repeated here.
[0166] The embodiment of the present application also provides an electronic device, such as Figure 6 As shown, it includes a memory 401 and a processor 402. The memory 401 stores a computer program, and the processor 402 is configured to run the computer program to execute the steps in any of the above server slot resource allocation method embodiments.
[0167] An embodiment of the present application further provides a non-volatile computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned server slot resource allocation method embodiments when running.
[0168] In an exemplary embodiment, the non-volatile computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0169] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned server slot resource allocation method embodiments are implemented.
[0170] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in any of the above-mentioned server slot resource allocation method embodiments.
[0171] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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.
[0172] The above describes in detail the server slot resource allocation system, method, server, device, and medium provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A server slot resource allocation system, characterized in that: include: At least one physical slot for the server; a register component, the register component including at least one first register and at least one second register, the first register being used to store a global identifier of the physical slot, the global identifier being used to determine a resource allocation mode for the physical slot, each physical slot being configured with the second register, the second register being used to store a resource allocation parameter for the physical slot; The firmware component is used to read the first register and the second register after the server is powered on, and allocate resources to at least one of the physical slots according to the resource allocation method and the resource allocation parameters, wherein the resource allocation method includes a first allocation method and a second allocation method, wherein the first allocation method includes: reading a default allocation parameter pre-set by the firmware component, allocating resources to the physical slot according to the default allocation parameter, and writing the default allocation parameter into the second register; the second allocation method includes: traversing all physical slots, reading the second register corresponding to each physical slot, and allocating resources to the physical slot according to the resource allocation parameter stored in the second register.
2. The server slot resource allocation system according to claim 1, characterized in that: The global identifier includes a first identifier and a second identifier, wherein the first identifier indicates that the resource allocation parameters of all the physical slots are default allocation parameters, and the second identifier indicates that the resource allocation parameters of at least one of the physical slots are custom allocation parameters.
3. The server slot resource allocation system according to claim 2, characterized in that: The resource allocation mode includes a first allocation mode and a second allocation mode, wherein: The first allocation method includes: reading default allocation parameters preset by the firmware component, allocating resources to the physical slot according to the default allocation parameters, and writing the default allocation parameters into the second register; The second allocation method includes: traversing all physical slots, reading a second register corresponding to each physical slot, and allocating resources to the physical slot according to the resource allocation parameters stored in the second register.
4. The server slot resource allocation system according to claim 3, characterized in that: The first identifier is used to determine that the resource allocation mode of the physical slot is the first allocation mode, and the second identifier is used to determine that the resource allocation mode of the physical slot is the second allocation mode.
5. The server slot resource allocation system according to claim 3, characterized in that: After the firmware component completes allocating resources according to the second allocation method, it resets the global identifier to the first identifier.
6. The server slot resource allocation system according to claim 3, characterized in that: The register component includes at least one third register, which is used to store the total amount of available resources of the server. During the allocation process according to the second allocation method, the firmware component reads the third register and verifies the resource allocation process of the second allocation method based on the total amount of available resources.
7. The server slot resource allocation system according to claim 6, characterized in that: After the server is powered on, the firmware component obtains the total amount of available resources of the server and writes the total amount of available resources into the third register.
8. The server slot resource allocation system according to claim 6, characterized in that: The firmware component calculates the total amount of required resources for all physical slots. If the total amount of required resources is less than or equal to the total amount of available resources, resources are allocated to the physical slots according to the resource allocation parameters stored in the second register. If the total amount of required resources is greater than the total amount of available resources, resource allocation is stopped.
9. The server slot resource allocation system according to claim 8, characterized in that: The firmware component is used to pre-set the upper limit of the total amount of resources of the server before the server is powered on.
10. The server slot resource allocation system according to claim 8, characterized in that: The total upper limit resource amount includes the total upper limit channel amount, the upper limit memory address space and the upper limit input / output address space, and the required total resource amount includes the required total channel amount, the required memory address space and the required input / output address space. When the firmware component recognizes that the sum of the required total channel amount, the required memory address space and any one of the required input / output address space is greater than the corresponding total upper limit resource amount, it stops allocating resources; otherwise, it allocates resources to the physical slot according to the resource allocation parameters stored in the second register.
11. The server slot resource allocation system according to claim 3, characterized in that: The firmware component is used to pre-set default allocation parameters for each physical slot before the server is powered on.
12. The server slot resource allocation system according to claim 1, characterized in that: Also includes: The control component is used to obtain a resource adjustment instruction of a target slot during the operation of the server, and adjust the resources allocated to the target slot according to the resource adjustment instruction.
13. The server slot resource allocation system according to claim 12, characterized in that: The control component responds to the resource adjustment instruction of the target slot, determines the target register according to the identifier of the target slot, writes the custom allocation parameters of the target slot into the target register, and updates the global identifier of the physical slot to a second identifier.
14. The server slot resource allocation system according to claim 12, characterized in that: Before adjusting the resources allocated to the target slot, the control component reads the upper limit resource amount preset by the firmware component, and verifies the legality of the adjusted resources corresponding to the resource adjustment instruction based on the upper limit resource amount.
15. A server, characterized in that: A server slot resource allocation system comprising the server slot resource allocation system according to any one of claims 1 to 14.
16. A server slot resource allocation method, characterized in that: The method is applied to a firmware component in the server slot resource allocation system according to any one of claims 1 to 14, and the method comprises: After the server is powered on, a first register and a second register are read, where the first register is used for a global identifier of the physical slot, the global identifier is used to determine a resource allocation mode of the physical slot, and each physical slot is configured with a second register, the second register is used to store resource allocation parameters of the physical slot; Determine the resource allocation method of the physical slot according to the global identifier, and allocate resources to at least one of the physical slots according to the resource allocation method and the resource allocation parameters, wherein the resource allocation method includes a first allocation method and a second allocation method, wherein the first allocation method includes: reading default allocation parameters pre-set by the firmware component, allocating resources to the physical slot according to the default allocation parameters, and writing the default allocation parameters into the second register; the second allocation method includes: traversing all physical slots, reading the second register corresponding to each physical slot, and allocating resources to the physical slot according to the resource allocation parameters stored in the second register.
17. A server slot resource allocation method, characterized in that: The method is applied to a control component in a server slot resource allocation system according to any one of claims 1 to 14, and the method comprises: During server operation, obtain resource adjustment instructions for the target slot; In response to a resource adjustment instruction of a target slot, determining a target register according to an identifier of the target slot, reading an upper limit resource amount preset by a firmware component, and verifying the legitimacy of the adjusted resources corresponding to the resource adjustment instruction according to the upper limit resource amount; If the adjusted resource is verified to be legal, the user-defined allocation parameter of the target slot is written into the target register, and the global identifier of the physical slot is updated to a second identifier.
18. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the server slot resource allocation method according to any one of claims 16 to 17 when executing the computer program.
19. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the server slot resource allocation method according to any one of claims 16 to 17 are implemented.
20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the server slot resource allocation method according to any one of claims 16 to 17 are implemented.
Citation Information
Patent Citations
A post / BIOS solution for providing input and output capacity on demand
US20070260672A1
Resource allocation method of circuit board, apparatus, circuit board, and storage medium
US20250077293A1