A computer system for bandwidth allocation, a bandwidth allocation method and a product
Through the coordinated work of the monitoring module and the substrate management controller, the bandwidth resources of the central processor are allocated adaptively, solving the problem of PCIe resource waste caused by the CPU to directly provide the maximum bandwidth, and achieving more efficient bandwidth allocation and resource utilization.
Patent Information
- Application Number
- CN202411183104.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-08-27
AI Technical Summary
In the prior art, the bandwidth provided by the CPU directly to the PCIe x8 slot and the PCIe x16 slot is the maximum bandwidth, which makes it impossible to effectively identify when inserting an expansion card with a small number of Lane, resulting in wasted PCIe resources and loss of CPU functions.
By identifying the bandwidth configuration information of the expansion unit through the monitoring module, a bandwidth allocation information table is generated, and the option configuration file is generated by the substrate management controller. The basic input and output system configures the bandwidth resources of the central processor during startup, and adaptively allocates the server to the server. bandwidth resources.
It reduces the waste of PCIe resources, avoids CPU function loss, and improves the adaptability of expansion units and bandwidth allocation, and reduces the process cost of PCIe's automatic identification of allocating bandwidth.
Smart Images

Figure CN118714015B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of computer systems, and in particular, to a bandwidth allocation computer system, a bandwidth allocation method, and a product. Background Art
[0002] With the development of technology, CPU (Central Processing Unit) can also support different versions of PCIe (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard) channels. The bandwidth of PCIe is closely related to the PCIe version and the number of data path Lanes. The bandwidth of different versions of PCIe is also different. For example, the online bit transmission rate of PCIe 4.0 is increased to 16GT / s, while the online bit transmission rate of PCIe 5.0 can reach up to 32GT / s.
[0003] In addition, the bandwidth of PCIe is also related to the number of lanes in its data path. For example, when a PCIe device requires high bandwidth, multiple lanes are used; if a PCIe device does not require high bandwidth, one lane can be allocated; among them, the physical slots connected to PCIe devices, such as the PCIe x8 slot, have a theoretical maximum bandwidth of 8GB / s; the PCIe x16 slot has the highest theoretical maximum bandwidth of 16GB / s.
[0004] The PICe slots on the server motherboard generally use PCIe x8 slots and PCIe x16 slots to facilitate the later insertion of different types of expansion cards. However, since the CPU currently directly provides the maximum bandwidth to the PCIe x8 slot and PCIe x16 slot, expansion cards with a small number of lanes cannot be effectively identified. The CPU also allocates the maximum bandwidth, resulting in a waste of PCIe resources and a loss of CPU function. Summary of the invention
[0005] The embodiments of the present application provide a computer system, a bandwidth allocation method, and a product for bandwidth allocation, which are intended to automatically allocate bandwidth resources.
[0006] In a first aspect, an embodiment of the present application provides a computer system for bandwidth allocation, which is applied to a computer system, wherein the computer system includes a central processing unit, a monitoring module, a baseboard management controller, and a basic input and output system;
[0007] When the mainboard of the computer system is powered on, the monitoring module is used to identify that the application of each expansion unit plugged into the mainboard has changed, and generate a bandwidth allocation information table corresponding to the central processing unit according to the bandwidth configuration information corresponding to each expansion unit, and the expansion unit is used to allocate the bandwidth resources of any connection port of the central processing unit to the connected device slot;
[0008] When the mainboard of the computer system is powered on, the baseboard management controller is used to generate an option configuration file according to the bandwidth allocation information table, wherein the option configuration file includes an expansion unit corresponding to any connection port of the central processing unit;
[0009] After the host of the computer system is triggered, the basic input and output system is used to configure any connection port of the central processing unit according to the option configuration file during the startup process to allocate the bandwidth resources of the central processing unit to each expansion unit.
[0010] Optionally, the monitoring module is further used for:
[0011] Identify configuration information of each expansion unit currently plugged into the mainboard;
[0012] When the configuration information of each expansion unit currently plugged into the mainboard is inconsistent with the historical configuration information of each expansion unit plugged last time, it is determined that the application of each expansion unit currently plugged into the mainboard has changed.
[0013] Optionally, when identifying the configuration information of each expansion unit currently plugged into the mainboard, the monitoring module is used to:
[0014] In the configuration space of the extension unit, the bandwidth configuration information and the plug-in position information of any extension unit are obtained as the configuration information of the extension unit.
[0015] Optionally, when identifying the configuration information of each expansion unit currently plugged into the mainboard, the monitoring module is used to:
[0016] The bandwidth configuration information and the plug-in position information of any extension unit are obtained through the integrated circuit bus or the system management bus as the configuration information of the extension unit.
[0017] Optionally, when identifying the configuration information of each expansion unit currently plugged into the mainboard, the monitoring module is used to:
[0018] For any extension unit including a configuration signal line, the bandwidth configuration information and the plugging position information of the extension unit are obtained as the configuration information of the extension unit through the configuration signal line connected to the extension unit.
[0019] Optionally, after identifying the configuration information of each expansion unit currently plugged into the mainboard, the monitoring module is further used to:
[0020] The configuration information of each currently plugged-in expansion unit is compared with the configuration information of each last plugged-in expansion unit, and when any currently plugged-in expansion unit is a newly added expansion unit, it is determined that the application of each currently plugged-in expansion unit in the mainboard has changed.
[0021] Optionally, after identifying the configuration information of each expansion unit currently plugged into the mainboard, the monitoring module is further used to:
[0022] The configuration information of each currently plugged-in expansion unit is compared with the configuration information of each last plugged-in expansion unit, and when any last plugged-in expansion unit is removed, it is determined that the application of each currently plugged-in expansion unit in the mainboard has changed.
[0023] Optionally, after identifying the configuration information of each expansion unit currently plugged into the mainboard, the monitoring module is further used to:
[0024] The configuration information of the currently connected expansion units is compared with the configuration information of the last connected expansion units. If the plugging position information of any currently connected expansion unit is inconsistent with the plugging position information at the last time it was plugged in, it is determined that the application of the currently connected expansion units in the mainboard has changed.
[0025] Optionally, in the process of generating the option configuration file according to the bandwidth allocation information table, the baseboard management controller is used to:
[0026] When the mainboard of the computer system is powered on, obtaining the bandwidth allocation information table from the monitoring module;
[0027] When the bandwidth allocation information table is inconsistent with the historical bandwidth allocation information table, generating bandwidth configuration strategies corresponding to each connection port of the central processor according to the bandwidth allocation information table;
[0028] According to the bandwidth configuration strategy corresponding to each connection port of the central processing unit, an option configuration file corresponding to each connection port of the central processing unit is generated. The option configuration file is a file in a key-value pair data format transmitted based on the management standard protocol of the hypertext transfer security service.
[0029] Optionally, the basic input and output system is used to send a first request to the baseboard management controller based on a management standard protocol of Hypertext Transfer Protocol Security Service during the startup process of the basic input and output system;
[0030] When the first response returned by the baseboard management controller after responding to the first request indicates that there is an option change, the basic input and output system is used to send a second request to the baseboard management controller based on the hypertext transfer service security management standard protocol;
[0031] The baseboard management controller is used for sending the option configuration file to the basic input and output system in response to the second request;
[0032] The basic input and output system is used to configure the expansion unit connected to any connection port of the central processing unit according to the option configuration file during the self-test phase.
[0033] Optionally, the monitoring module comprises a complex programmable logic element integrated in the baseboard management controller.
[0034] In a second aspect, an embodiment of the present application provides a bandwidth allocation method, which is applied to a computer system for bandwidth allocation described in the first aspect of the embodiment, wherein the computer system includes a central processing unit, a monitoring module, a baseboard management controller, and a basic input and output system, and the method includes:
[0035] When the mainboard of the computer system is powered on, when the monitoring module identifies that the application of each expansion unit plugged into the mainboard has changed, a bandwidth allocation information table corresponding to the central processing unit is generated according to the bandwidth configuration information corresponding to each expansion unit, and the expansion unit is used to allocate the bandwidth resources of any connection port of the central processing unit to the connected device slot;
[0036] When the mainboard of the computer system is powered on, the baseboard management controller generates an option configuration file according to the bandwidth allocation information table, wherein the option configuration file includes an expansion unit corresponding to any connection port of the central processing unit;
[0037] After the host of the computer system is triggered, the basic input and output system configures any connection port of the central processing unit according to the option configuration file during the startup process to allocate the bandwidth resources of the central processing unit to each expansion unit.
[0038] In a third aspect, an embodiment of the present application provides a computer device, comprising: at least one processor, and a memory, wherein the memory stores a computer program that can be run on the processor, wherein when the processor executes the computer program, the bandwidth allocation method described in the second aspect of the embodiment is executed.
[0039] In a fourth aspect, an embodiment of the present application provides a non-volatile readable storage medium, wherein the non-volatile readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the bandwidth allocation method described in the second aspect of the embodiment is executed.
[0040] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the bandwidth allocation method described in the second aspect of the embodiment.
[0041] Beneficial effects:
[0042] When the mainboard of the computer system is powered on, the monitoring module is used to identify changes in the applications of the various expansion units plugged into the mainboard, and generate a bandwidth allocation information table corresponding to the central processing unit according to the bandwidth configuration information corresponding to the various expansion units. The expansion unit is used to allocate the bandwidth resources of any connection port of the central processing unit to the connected device slot.
[0043] When the mainboard of the computer system is powered on, the baseboard management controller is used to generate an option configuration file according to the bandwidth allocation information table, and the option configuration file includes an expansion unit corresponding to any connection port of the central processing unit.
[0044] After the host of the computer system is triggered, the basic input and output system is used to configure any connection port of the central processing unit according to the option configuration file during the startup process to allocate the bandwidth resources of the central processing unit to each expansion unit.
[0045] The computer system provided in this embodiment can allocate and change the connection port of the central processing unit for each expansion unit when the expansion unit changes, thereby adaptively allocating bandwidth resources in the server. Compared with the maximum bandwidth directly provided by the CPU to the PCIe x8 slot and the PCIe x16 slot, the waste of PCIe resources can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art.
[0047] Figure 1 A schematic diagram of the architecture of a computer system for bandwidth allocation provided in an embodiment of the present application is shown;
[0048] Figure 2 A flow chart showing the steps of the bandwidth allocation method provided by an embodiment of the present application is shown;
[0049] Figure 3A schematic diagram of a computer device provided in an embodiment of the present application is shown;
[0050] Figure 4 A schematic diagram of a non-volatile readable storage medium provided in an embodiment of the present application is shown;
[0051] Figure 5 A schematic diagram of a computer program product provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0052] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0053] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, each embodiment of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in each embodiment of the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not constitute any limitation, and the various embodiments can be combined with each other and referenced to each other without contradiction.
[0054] CPU: Central Processing Unit, central processing unit;
[0055] BIOS: Basic Input Output System, basic input output system;
[0056] IPMI: Intelligent Platform Management Interface, intelligent platform management interface;
[0057] ACL: Access Control Lists, access control list;
[0058] PCIe: Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard;
[0059] PCI: Peripheral Component Interconnect, a standard for local buses;
[0060] Redfish - a standard protocol for managing HTTPs-based services.
[0061] BMC: Baseboard Management Controller, baseboard management controller;
[0062] CPLD: Complex Programmable Logic Device, complex programmable logic device;
[0063] GPIO: General-purpose input / output, general-purpose input and output;
[0064] SMBus: System Management Bus.
[0065] BMC is a hardware component dedicated to monitoring and managing servers and other computer systems. As an independent system, it is located on the system's motherboard and has its own processor and memory. It can run independently of the host system and can be remotely accessed through a network interface. The main functions and features of BMC include:
[0066] 1. Remote monitoring and management: BMC allows administrators to remotely monitor the health status of the server, including temperature, fan speed, power status, hard disk status, and chassis cover switch status, and can even manage it when the operating system is not working;
[0067] 2. Fault diagnosis and alarm: When a system anomaly is detected, such as overheating, voltage anomaly, or hardware failure, the BMC can generate an alarm and send it to the management system via the network, facilitating rapid response and troubleshooting;
[0068] 3. Hardware control: BMC can control the server's startup, shutdown, restart and other operations, as well as adjust hardware configurations such as fan speed, thereby optimizing system performance and energy efficiency;
[0069] 4. Event log record: record all important events during system operation, including hardware status changes, error information, etc., to provide historical data for system maintenance;
[0070] 5. Firmware update: BMC itself also supports firmware update to fix vulnerabilities, add new features or optimize performance, usually through the network remote update;
[0071] 6. Comply with industry standards: BMC complies with standards such as the Intelligent Platform Management Interface (IPMI) to ensure interoperability between hardware and management software from different manufacturers;
[0072] 7. Security features: Considering the remote access capability of BMC, modern BMC designs usually include security measures such as encrypted communications, access control lists (ACLs), and authentication mechanisms to protect the server from unauthorized access and attacks;
[0073] In short, the baseboard management controller is an indispensable part of the infrastructure of modern data centers and enterprise information technology. It greatly improves the efficiency of server maintenance and system reliability by providing powerful remote management capabilities.
[0074] PCIe has made fundamental changes in bus structure, which are mainly reflected in two aspects: one is the change from parallel bus to serial bus; the other is the use of point-to-point interconnection; specifically, the bus connecting the devices under the bridge in the original parallel bus structure is changed into a link. A link can contain one or more paths. Each path consists of two pairs of differential signal lines to form a dual-simplex serial transmission channel. There are no dedicated data, address, control and clock lines. Various transactions on the bus are organized into information packets for transmission; PCIe adopts a point-to-point interconnection method. Each device is connected by an independent link and has exclusive bandwidth, thereby improving the transmission rate.
[0075] PCIe (Peripheral Component Interconnect Express) is a high-speed serial computer expansion card standard, mainly used to connect the CPU and various expansion cards, such as graphics cards, sound cards and network adapters. The PCIe bus structure regards a link as a bus, thus maintaining compatibility with the traditional PCI bus in terms of address space, configuration mechanism and software. One PCIe device occupies one bus (link), so in a PCIe-based computer, there are many bridges and buses, and traditional PCI devices can also run on the PCIe platform. Through the PCIe to PCI (or PCI-X) bridge, the PCI (or PCI-X) bus can be brought out, and traditional PCI devices can be integrated into the PCI Express structure by hanging on such a bus. Compared with the shared parallel architecture of PCI and earlier computer buses, each device based on PCIe has its own dedicated connection, does not need to request bandwidth from the entire bus, and can increase the data transfer rate to a very high frequency, achieving a high bandwidth that PCI cannot provide.
[0076] With the development of technology, CPUs can also support different versions of PCIe channels. The bandwidth of PCIe is closely related to its version and the number of Lanes. The following are the details of different versions of PCIe and their bandwidth:
[0077] PCIe 1.0: The online bit transfer rate is 2.5Gb / s, using 8 / 10 encoding, so the bandwidth of PCIe 1.0x1 is 250MB / s; PCIe 2.0: The online bit transfer rate is doubled to 5Gb / s, using 8 / 10 encoding, so the bandwidth of PCIe 2.0x 1 is 500MB / s; PCIe 3.0: The online bit transfer rate is 8Gb / s, using 128 / 130 encoding, so the bandwidth of PCIe 3.0x1 is 1GB / s; PCIe 4.0: The online bit transfer rate is increased to 16GT / s; PCIe 5.0: The online bit transfer rate can reach up to 32GT / s.
[0078] In addition, the bandwidth of PCIe is also related to the number of lanes in its data path. If the device requires very high bandwidth, multiple lanes (such as graphics cards) will be used; if a particularly high bandwidth is not required, only one lane will be sufficient; among them, the theoretical maximum bandwidth of the PCIe x1 slot is 1GB / s, which is suitable for devices with low requirements for data transmission; the theoretical maximum bandwidth of the PCIe x4 slot is 4GB / s, which is suitable for devices with medium bandwidth requirements; the theoretical maximum bandwidth of the PCIe x8 slot is 8GB / s, which is suitable for devices with higher requirements for data transmission speed; the PCIe x16 slot has the highest theoretical maximum bandwidth of 16GB / s and is widely used to connect high-performance graphics cards.
[0079] The PICe interface on the server motherboard generally uses a PCIe x8 slot and a PCIe x16 slot, which is convenient for plugging in different types of expansion cards later. Even if the gold finger on the expansion card is x2 or x4, it can also be plugged into a PCIe x8 slot or a PCIex16 slot.
[0080] However, because the CPU currently directly provides the maximum bandwidth to the PCIe x8 slot and PCIe x16 slot, expansion cards with a small number of lanes cannot be effectively identified, and the CPU also allocates the maximum bandwidth, resulting in a waste of PCIe resources and CPU function loss. For example, two PCIE x8 devices are inserted into two PCIE x16 slots, and it is impossible to support two x8 devices on one x16 slot.
[0081] Although there are methods for PCIe to automatically identify and allocate bandwidth, the methods are based on GPIO expansion chips (such as the PCA9555 GPIO expansion chip) to dynamically configure bandwidth, or use physical detection circuit board resistors to control current or voltage detection methods to determine the required bandwidth; however, in the current method, it is necessary to add a bandwidth allocation table in the detection non-matching program, and after obtaining the change data, the expansion chip detection or physical resistance detection needs to match the numerical value with the corresponding number of Lanes in the pre-set bandwidth allocation table, and then the CPU analyzes the corresponding bandwidth and allocates it. Therefore, it is necessary to count the data of different expansion cards in the early stage to simulate and build a table, which not only has a large workload, but also when an expansion card that does not store data in the bandwidth allocation table is inserted, there is still an identification error, and the hardware detection needs to customize different bandwidth allocation module standards for different types of servers, so the adaptability is poor, and the later development work is much, resulting in a high cost of the PCIe automatic identification and allocation of bandwidth process.
[0082] Therefore, in order to adaptively allocate bandwidth resources in a server while reducing the cost of the process of PCIe automatic identification and allocation of bandwidth, an embodiment of the present application provides a computer system for bandwidth allocation.
[0083] Reference Figure 1 , showing a schematic diagram of the architecture of a bandwidth allocation computer system provided in an embodiment of the present application, the computer system includes a central processing unit, a monitoring module, a baseboard management controller and a basic input and output system; the computer system can be a server system, etc., and multiple expansion units can be plugged into the computer system to allocate or expand the PCIe bandwidth of the central processing unit, such as dividing a PCIe x16 into 2 PCIe x8 channels through an expansion unit, etc.
[0084] The BMC in a computer system consists of two parts: the BMC chip and the BMC firmware. It independently monitors and manages the computer system, including monitoring operating status, recording events and performing fault analysis, and deploying and configuring the system. It also provides a series of other remote management functions.
[0085] When the mainboard of the computer system is powered on, the monitoring module is used to identify that the application of each expansion unit plugged into the mainboard has changed, and generate a bandwidth allocation information table corresponding to the central processing unit according to the bandwidth configuration information corresponding to each expansion unit, and the expansion unit is used to allocate the bandwidth resources of any connection port of the central processing unit to the connected device slot;
[0086] When the mainboard of the computer system is powered on, the baseboard management controller is used to generate an option configuration file according to the bandwidth allocation information table, wherein the option configuration file includes an expansion unit corresponding to any connection port of the central processing unit;
[0087] After the host of the computer system is triggered, the basic input and output system is used to configure any connection port of the central processing unit according to the option configuration file during the startup process to allocate the bandwidth resources of the central processing unit to each expansion unit.
[0088] Reference Figure 2 , shows a flow chart of the steps of a bandwidth allocation method provided in an embodiment of the present application, the method is applied to the computer system described in this embodiment, and the method may include the following steps:
[0089] S101: When the mainboard of the computer system is powered on, when the monitoring module recognizes that the application of each expansion unit plugged into the mainboard changes, a bandwidth allocation information table corresponding to the central processing unit is generated according to the bandwidth configuration information corresponding to each expansion unit, and the expansion unit is used to allocate the bandwidth resources of any connection port of the central processing unit to the connected device slot.
[0090] Specifically, the expansion unit is used to expand any bandwidth provided by the CPU. For example, expansion unit A can be connected to the PCIe x16 connection port of the CPU, and then divide the PCIe x16 into 2 PCIe x8 channels, and then connect two PCIex8 devices. Expansion unit B can be connected to the PCIe x16 connection port of the CPU, and divide the PCIe x16 into 4 PCIex4 channels, and then connect 4 PCIe x4 devices.
[0091] Therefore, when allocating bandwidth resources to each expansion unit, it is first necessary to detect whether the application of each expansion unit plugged into the mainboard has changed.
[0092] In a feasible implementation, when the mainboard of the computer system is powered on, the monitoring module of the computer system identifies the configuration information of each expansion unit currently plugged into the mainboard, and then compares the configuration information of each expansion unit currently plugged into with the historical configuration information of each expansion unit plugged into the mainboard of the computer system when the computer system was last powered on.
[0093] When the configuration information of each expansion unit currently plugged into the mainboard is inconsistent with the historical configuration information of each expansion unit plugged last time, it is determined that the application of each expansion unit currently plugged into the mainboard has changed.
[0094] In the actual implementation process, the monitoring module can be a complex programmable logic element, namely CPLD, integrated in the baseboard management controller. CPLD is a programmable device. Usually, it can be programmed according to needs to enable CPLD to implement complex logical functions. In this embodiment, the CPLD is programmed through the software of the CPLD so that when the motherboard of the computer system is powered on, the CPLD first obtains the configuration information of the expansion unit plugged into the motherboard; in other implementation methods, a separate module with a software program can also be set as a monitoring module.
[0095] In a feasible implementation, when identifying the configuration information of each expansion unit currently plugged into the mainboard, the monitoring module of the computer system obtains the bandwidth configuration information and plug-in position information of any expansion unit in the configuration space of the expansion unit as the configuration information of the expansion unit.
[0096] Specifically, an expansion unit such as an expansion card is a PCI device, and the bandwidth configuration information and plug-in position information of the expansion unit are stored in the configuration space, namely the PCI configuration space. A monitoring module such as a CPLD can read the bandwidth configuration information and plug-in position information of any expansion unit in the PCI configuration space.
[0097] For example, the pseudo code for CPLD to identify any riser card in the PCI configuration space and read the configuration information of the riser card is as follows:
[0098] c#include<linux / pci.h>
[0099] struct pci_dev *riser_detect(struct pci_dev *pdev) {
[0100] struct pci_dev *riser_pdev=NULL;
[0101] while((riser_pdev = pci_get_device(PCI_VENDOR_ID_VENDER, PCI_DEVICE_ID_RISER, riser_pdev))) {
[0102] if (pci_dev_driver(riser_pdev) == NULL) {
[0103] verilog / / Assume there is a signal line_detected for detecting expansion cards
[0104] module riser_detector(
[0105] input line_detected,
[0106] output reg riser_present );
[0108] / / Initialize the state of the state machine
[0109] localparam IDLE = 2'b00;
[0110] localparam DETECTING = 2'b01;
[0111] localparam DETECTED = 2'b10;
[0112] reg [1:0] state, next_state;
[0113] / / State transition logic
[0114] always @ (posedge line_detected or negedge line_detected) begin
[0115] if (!line_detected)
[0116] next_state<=IDLE;
[0117] else
[0118] next_state<= DETECTING;
[0119] end
[0120] / / State machine status update
[0121] always @ (posedge clk or negedge rst_n) begin
[0122] if (!rst_n)
[0123] state<=IDLE;
[0124] else
[0125] state<= next_state;
[0126] end
[0127] / / Determine the value of riser_present according to the state of the state machine
[0128] always @ (state or line_detected) begin
[0129] if (state == DETECTING&&line_detected)
[0130] riser_present<= 1'b1;
[0131] else if (state == DETECTED&&!line_detected)
[0132] riser_present<= 1'b0;
[0133] end
[0134] }
[0135] }
[0136] return riser_pdev;
[0137] }
[0138] In the above example, PCI_VENDOR_ID_VENDER indicates the manufacturer ID of the riser card; PCI_DEVICE_ID_RISER indicates the product ID of the riser card; the function pci_get_device is used to find the matching riser card on the PCI bus. After finding the corresponding riser card, the identification logic is added, and the CPLD can actively identify the changes of the riser card; the above pseudo code uses a Moore state machine to identify the rising edge of the line_detected signal. When the signal of the line is detected to represent the connection of the riser card, the state machine enters the DETECTING state and remains in the DETECTED state after the riser card is detected; the riser_present output will reflect the existence of the riser card accordingly.
[0139] In a feasible implementation, when identifying the configuration information of each expansion unit currently plugged into the mainboard, the monitoring module of the computer system obtains the bandwidth configuration information and plug-in position information of any expansion unit as the configuration information of the expansion unit through the integrated circuit bus or the system management bus.
[0140] For example, some expansion cards include an I2C interface and an SMBus interface, and a monitoring module such as a CPLD can obtain bandwidth configuration information and plug-in position information of the expansion card through an integrated circuit bus or a system management bus.
[0141] In a feasible implementation, when identifying the configuration information of each expansion unit currently plugged into the mainboard, for any expansion unit including a configuration signal line, the monitoring module of the computer system obtains the bandwidth configuration information and plug-in position information of the expansion unit as the configuration information of the expansion unit through the connected configuration signal line.
[0142] For example, some expansion cards also provide a configuration signal line specifically used for identification, and a monitoring module such as a CPLD can read the bandwidth configuration information and the plug-in position information on the expansion card through the configuration signal line.
[0143] After the monitoring module of the computer system identifies the configuration information of each expansion unit currently plugged in the mainboard, it compares the configuration information of each expansion unit currently plugged in with the configuration information of each expansion unit plugged in last time, and when any of the currently plugged in expansion units is a newly added expansion unit, it determines that the application of each expansion unit currently plugged in the mainboard has changed.
[0144] For example, during this startup, it is detected that a new expansion unit is added, which is used to divide PCIe x16 into two PCIe x8 channels. Therefore, a CPU PCIe x16 bandwidth resource needs to be allocated to the expansion unit.
[0145] The configuration information of each currently plugged-in expansion unit is compared with the configuration information of each last plugged-in expansion unit, and when any last plugged-in expansion unit is removed, it is determined that the application of each currently plugged-in expansion unit in the mainboard has changed.
[0146] For example, when the computer is started up this time, it is detected that one extension unit is reduced compared with the last time the computer is started up, and the reduced extension's broadband resources need to be released, and the released broadband resources can be reallocated.
[0147] The configuration information of the currently connected expansion units is compared with the configuration information of the last connected expansion units. If the plugging position information of any currently connected expansion unit is inconsistent with the plugging position information at the last time it was plugged in, it is determined that the application of the currently connected expansion units in the mainboard has changed.
[0148] For example, when the plug-in position of expansion unit A that divides PCIe x16 into two PCIe x8 channels is swapped with the plug-in position of expansion unit C that divides PCIex8 into two PCIe x4 channels, it is necessary to adjust the expansion unit connected to the CPU's connection port to avoid providing PCIe x8 bandwidth resources to expansion unit A and providing PCIe x16 bandwidth to expansion unit C, resulting in a mismatch between bandwidth resources and bandwidth requirements of the expansion units.
[0149] When a monitoring module such as CPLD identifies changes in the applications of the expansion units plugged into the mainboard, a bandwidth allocation information table corresponding to the central processor is generated based on the bandwidth configuration information corresponding to the expansion units. The bandwidth allocation information table includes the allocation of PCIe bandwidth resources provided by the CPU.
[0150] S102: When the mainboard of the computer system is powered on, the baseboard management controller generates an option configuration file according to the bandwidth allocation information table, wherein the option configuration file includes an expansion unit corresponding to any connection port of the central processing unit.
[0151] Specifically, when the mainboard of the computer system is powered on, the BMC obtains the bandwidth allocation information table from the monitoring module such as the CPLD.
[0152] In this embodiment, CPLD is integrated into BMC, which can reduce the number of circuit boards, save space and cost. In this integration mode, the functions performed by CPLD are completely replaced by BMC, and BMC realizes the functions of CPLD through software control. The communication interface used between BMC and CPLD is I2C interface, that is, BMC communicates with CPLD through I2C bus to realize control and monitoring of CPLD. In the actual implementation process, it is necessary to add I2C controller in BMC to control and monitor CPLD.
[0153] Then the BMC determines whether the current bandwidth allocation information table is consistent with the historical bandwidth allocation information table. If they are consistent, there is no need to generate a new option configuration file for changing the BIOS option.
[0154] If the current bandwidth allocation information table is inconsistent with the historical bandwidth allocation information table, it is necessary to generate bandwidth configuration strategies corresponding to each connection port of the central processing unit, i.e., the PE port, according to the bandwidth allocation information table. For example, the PE port with the port number of port1 of the CPU is provided with the bandwidth of PCIe x16, and is allocated to the expansion unit A with a bandwidth requirement of PCIe x16; the PE port with the port number of port2 is provided with the bandwidth of PCIe x16, and is allocated to the expansion unit B with a bandwidth requirement of PCIe x16; the PE port with the port number of port3 is provided with the bandwidth of PCIe x8, and is allocated to the expansion unit A with a bandwidth requirement of PCIe x8.
[0155] Then, the BMC generates an option configuration file corresponding to each connection port of the central processor according to the bandwidth configuration strategy corresponding to each connection port of the central processor, wherein the option configuration file is a file in a key-value pair data format transmitted based on the management standard protocol of the hypertext transfer security service.
[0156] Subsequently, BIOS synchronizes the option configuration file from BMC to implement the modification option for bandwidth configuration method, including but not limited to other BIOS and BMC interaction methods such as H2B communication and IPMI communication. However, the embodiment of the present application adopts BMC and BIOS to communicate through the management standard protocol based on hypertext transfer security service, namely Redfish protocol.
[0157] Redfish is a standard management protocol based on HTTPs services, which uses RESTful interfaces to implement device management. Each HTTPs operation submits or returns a resource or result in UTF-8 encoded JSON format. The communication between BMC and BIOS is implemented based on the Redfish protocol, which reduces development complexity, is easy to implement and use, and is scalable, leaving flexibility for subsequent designs.
[0158] The option configuration file generated by the BMC is a JSON file. JSON is a key-value pair data format.
[0159] In the actual implementation process, the Redfish Hi Driver module, the Redfish Collection Driver module, the Redfish JSON schema to C Strtcture convertor module and the Redfish DXE Driver module can be integrated on the BIOS side, and the Redfish host is set on the BMC side.
[0160] Among them, the Redfish Hi Driver driver module is used to send network requests to the BMC, receive data sent by the BMC, and push BIOS asset information data, which is similar to using a browser to send an http request; the Redfish CollectionDriver driver module is used to collect BIOS asset information. The way to collect asset information varies from manufacturer to manufacturer; the Redfish JSON schema to C Strtcture convertor module is used to convert the received BIOS asset information into JSON structured data.
[0161] The essence of Redfish host on the BMC side is a service program under the Linux system, which manages a database (Redis, which stores BTos asset information); when the computer system is turned on, the BIOS side (Client) will collect the asset information (after the Redfish DXE Driver requests BMC data), organize it into JSON format, and then send it to the BMC through network transmission such as Post / Patch.
[0162] S103: After the host of the computer system is triggered, the basic input and output system configures any connection port of the central processing unit according to the option configuration file during the startup process, so as to allocate the bandwidth resources of the central processing unit to each expansion unit.
[0163] Specifically, after the host of the computer system is triggered, the Redfish DXE Driver driver module on the BIOS side sends a first request to the BMC during the startup of the basic input and output system; when the first response returned by the baseboard management controller in response to the first request indicates that there is an option change, the first response is such as the Post / Patch request of the BMC, indicating that the BIOS option is modified; then the BIOS sends a second request to the baseboard management controller, and the BMC sends the option configuration file to the BIOS after responding to the second request; during the self-test phase of the BIOS, i.e., the POST process, the expansion unit connected to any connection port of the central processing unit is configured according to the option configuration file, that is, the JSON file obtained from the BMC is effective to each PE port of the CPU, thereby completing the adaptive allocation of PCIe resources of the computer system motherboard.
[0164] For example, a sample JSON file looks like this:
[0165] {
[0166] "FixedBootPriorities": {
[0167] "UefiPriorities": [
[0168] "HDD",
[0169] "NetWork",
[0170] "CDROM",
[0171] "Other" ]
[0173] },
[0174] "IIO_Bifurcation_Setting": [
[0175] {
[0176] "CPU0 IOU0 (IIO PCIe Br1)": {
[0177] "Option_Help": "CPU0 PCIe PE0 IIO Bifurcation Setting",
[0178] "Option_value": [
[0179] "Auto",
[0180] "x16",
[0181] "x8x8",
[0182] "x8x4x4"
[0183] "x4x4x8",
[0184] "x4x4x4x4",
[0185] "x2x2x4x8",
[0186] "x4x2x2x8",
[0187] "x8x2x2x4",
[0188] "x8x4x2x2",
[0189] "x2x2x4x4x4",
[0190] "x4x2x2x4x4",
[0191] "x4x4x2x2x4",
[0192] "x4x4x4x2x2",
[0193] "x2x2x2x2x8",
[0194] "x8x2x2x2x2",
[0195] "x2x2x2x2x4x4",
[0196] "x2x2x4x2x2x4",
[0197] "x2x2x4x4x2x2",
[0198] "x4x2x2x2x2x4",
[0199] "x4x2x2x4x2x2",
[0200] "x4x4x2x2x2x2",
[0201] "x2x2x2x2x2x2x4",
[0202] "x2x2x2x2x4x2x2",
[0203] "x2x2x4x2x2x2x2",
[0204] "x4x2x2x2x2x2x2",
[0205] "x2x2x2x2x2x2x2x2"
[0207] }
[0208] },
[0209] ,
[0210] }
[0211] Examples of BIOS PCIe bandwidth setting options are as follows:
[0212] Setup Question= IOU0 (IIO PCIe Br1)
[0213] Map String= IIOS003
[0214] Token=93 / / Do NOT change this line
[0215] Offset=C1
[0216] Width=01
[0217] BIOS Default =
[03] x8x8
[0218] Options=
[00] x4x4x4x4 / / Move "*" to the desired Option
[0219]
[01] x4x4x8
[0220]
[02] x8x4x4
[0221] *
[03] x8x8
[0222]
[04] x16
[0223] [FF]Auto
[0224] Setup Question= IOU1 (IIO PCIe Br2)
[0225] Map String= IIOS007
[0226] Token=94 / / Do NOT change this line
[0227] Offset=C3
[0228] Width=01
[0229] BIOS Default =
[04] x16
[0230] Options=
[00] x4x4x4x4 / / Move "*" to the desired Option
[0231]
[03] x8x8
[0232] *
[04] x16
[0233] Setup Question= IOU2 (IIO PCIe Br3)
[0234] Map String= IIOS00B
[0235] Token=95 / / Do NOT change this line
[0236] Offset=C5
[0237] Width=01
[0238] BIOS Default =[FF]Auto
[0239] Options=
[00] x4x4x4x4 / / Move "*" to the desired Option
[0240]
[01] x4x4x8
[0241]
[02] x8x4x4
[0242]
[03] x8x8
[0243]
[04] x16
[0244] *[FF]Auto
[0245] Setup Question= IOU0 (IIO PCIe Br1)
[0246] Map String= IIOS004
[0247] Token=B4 / / Do NOT change this line
[0248] Offset=C2
[0249] Width=01
[0250] BIOS Default =
[04] x16
[0251] Options=
[00] x4x4x4x4 / / Move "*" to the desired Option
[0252]
[03] x8x8
[0253] *
[04] x16
[0254] Setup Question= IOU1 (IIO PCIe Br2)
[0255] Map String= IIOS008
[0256] Token=B5 / / Do NOT change this line
[0257] Offset=C4
[0258] Width=01
[0259] BIOS Default =
[04] x16
[0260] Options=
[00] x4x4x4x4 / / Move "*" to the desired Option
[0261]
[03] x8x8
[0262] *
[04] x16
[0263] Setup Question= IOU2 (IIO PCIe Br3)
[0264] Map String = IIOS00C
[0265] Token=B6 / / Do NOT change this line
[0266] Offset=C6
[0267] Width=01
[0268] BIOS Default =
[00] x4x4x4x4
[0269] Options=*
[00] x4x4x4x4 / / Move "*" to the desired Option
[0270]
[01] x4x4x8
[0271]
[02] x8x4x4
[0272]
[03] x8x8
[0273]
[04] x16
[0274] [FF]Auto
[0275] The bandwidth allocation method provided in this embodiment has at least the following beneficial effects:
[0276] 1. When the computer is turned on, it can automatically detect the expansion unit and adaptively allocate bandwidth resources in the computer system. Compared with the maximum bandwidth directly provided by the CPU to the PCIe x8 slot and PCIe x16 slot, it can reduce the waste of PCIe resources.
[0277] 2. It avoids the redundant and complicated work of redeveloping the BIOS each time a new computer system model is developed in order to adapt the PE port resource allocation of each model of the computer system. The bandwidth allocation method provided in this embodiment only needs to develop a standard BMC module for setting BIOS bandwidth options once, and the bandwidth adaptation work for each model only needs to develop the program logic of the CPLD to generate the bandwidth allocation information table required by the model.
[0278] 3. Compared with the traditional BIOS that actively obtains bandwidth allocation information from GPIO, CPLD or BMC, this method standardizes the design standards of bandwidth allocation related code modules of BIOS and BMC, and achieves the effect that the bandwidth allocation program module can be reused for each model.
[0279] 4. The bandwidth allocation method adopts a standardized design and is applicable to any computer system model.
[0280] Reference Figure 3 , shows a schematic diagram of a computer device provided in an embodiment of the present application, the computer device comprising: at least one processor 301, and a memory 302, the memory 302 storing a computer program that can be run on the processor 301, wherein the processor 301 executes the bandwidth allocation method described in the embodiment when executing the computer program.
[0281] Reference Figure 4 , shows a schematic diagram of a non-volatile readable storage medium provided in an embodiment of the present application, wherein the non-volatile readable storage medium 400 stores a computer program 401, wherein the computer program, when executed by a processor, executes the bandwidth allocation method described in the embodiment.
[0282] Reference Figure 5 , shows a schematic diagram of a computer program product provided in an embodiment of the present application, wherein the computer program product 500 includes a computer program / instruction 501, which implements the bandwidth allocation method described in the embodiment when executed by a processor.
[0283] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0284] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0285] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0286] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0287] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0288] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0289] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0290] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A computer system for bandwidth allocation, characterized in that: Applicable to a computer system, the computer system comprising a central processing unit, a monitoring module, a baseboard management controller and a basic input and output system; When the mainboard of the computer system is powered on, the monitoring module is used to identify that the application of each expansion unit plugged into the mainboard has changed, and generate a bandwidth allocation information table corresponding to the central processing unit according to the bandwidth configuration information corresponding to each expansion unit, and the expansion unit is used to allocate the bandwidth resources of any connection port of the central processing unit to the connected device slot; When the mainboard of the computer system is powered on, the baseboard management controller is used to generate an option configuration file according to the bandwidth allocation information table, wherein the option configuration file includes an expansion unit corresponding to any connection port of the central processing unit; After the host of the computer system is triggered, the basic input and output system is used to configure any connection port of the central processing unit according to the option configuration file during the startup process to allocate the bandwidth resources of the central processing unit to each expansion unit.
2. The computer system according to claim 1, characterized in that The monitoring module is also used for: Identify configuration information of each expansion unit currently plugged into the mainboard; When the configuration information of each expansion unit currently plugged into the mainboard is inconsistent with the historical configuration information of each expansion unit plugged last time, it is determined that the application of each expansion unit currently plugged into the mainboard has changed.
3. The computer system according to claim 2, characterized in that: When identifying the configuration information of each expansion unit currently plugged into the mainboard, the monitoring module is used to: In the configuration space of the extension unit, the bandwidth configuration information and the plug-in position information of any extension unit are obtained as the configuration information of the extension unit.
4. The computer system according to claim 3, characterized in that: When identifying the configuration information of each expansion unit currently plugged into the mainboard, the monitoring module is used to: The bandwidth configuration information and the plug-in position information of any extension unit are obtained through the integrated circuit bus or the system management bus as the configuration information of the extension unit.
5. The computer system according to claim 4, characterized in that: When identifying the configuration information of each expansion unit currently plugged into the mainboard, the monitoring module is used to: For any extension unit including a configuration signal line, the bandwidth configuration information and the plugging position information of the extension unit are obtained as the configuration information of the extension unit through the configuration signal line connected to the extension unit.
6. The computer system according to any one of claims 3 to 5, characterized in that: After identifying the configuration information of each expansion unit currently plugged into the mainboard, the monitoring module is further used to: The configuration information of each currently plugged-in expansion unit is compared with the configuration information of each last plugged-in expansion unit, and when any currently plugged-in expansion unit is a newly added expansion unit, it is determined that the application of each currently plugged-in expansion unit in the mainboard has changed.
7. The computer system according to claim 6, characterized in that: After identifying the configuration information of each expansion unit currently plugged into the mainboard, the monitoring module is further used to: The configuration information of each currently plugged-in expansion unit is compared with the configuration information of each last plugged-in expansion unit, and when any last plugged-in expansion unit is removed, it is determined that the application of each currently plugged-in expansion unit in the mainboard has changed.
8. The computer system according to claim 7, characterized in that: After identifying the configuration information of each expansion unit currently plugged into the mainboard, the monitoring module is further used to: The configuration information of the currently connected expansion units is compared with the configuration information of the last connected expansion units. If the plugging position information of any currently connected expansion unit is inconsistent with the plugging position information at the last time it was plugged in, it is determined that the application of the currently connected expansion units in the mainboard has changed.
9. The computer system according to claim 1, characterized in that: In the process of generating the option configuration file according to the bandwidth allocation information table, the baseboard management controller is used to: When the mainboard of the computer system is powered on, obtaining the bandwidth allocation information table from the monitoring module; When the bandwidth allocation information table is inconsistent with the historical bandwidth allocation information table, generating bandwidth configuration strategies corresponding to each connection port of the central processing unit according to the bandwidth allocation information table; According to the bandwidth configuration strategy corresponding to each connection port of the central processing unit, an option configuration file corresponding to each connection port of the central processing unit is generated. The option configuration file is a file in a key-value pair data format transmitted based on the management standard protocol of the hypertext transfer security service.
10. The computer system according to claim 9, characterized in that: The basic input and output system is used to send a first request to the baseboard management controller based on the hypertext transfer security service management standard protocol during the startup process of the basic input and output system; When the first response returned by the baseboard management controller after responding to the first request indicates that there is an option change, the basic input and output system is used to send a second request to the baseboard management controller based on the hypertext transfer service security management standard protocol; The baseboard management controller is used for sending the option configuration file to the basic input and output system in response to the second request; The basic input and output system is used to configure the expansion unit connected to any connection port of the central processing unit according to the option configuration file during the self-test phase.
11. The computer system according to claim 1, characterized in that: The monitoring module includes a complex programmable logic element integrated in the baseboard management controller.
12. A bandwidth allocation method, characterized in that: A computer system for bandwidth allocation according to any one of claims 1 to 11, wherein the computer system comprises a central processing unit, a monitoring module, a baseboard management controller and a basic input and output system, and the method comprises: When the mainboard of the computer system is powered on, when the monitoring module identifies that the application of each expansion unit plugged into the mainboard has changed, a bandwidth allocation information table corresponding to the central processing unit is generated according to the bandwidth configuration information corresponding to each expansion unit, and the expansion unit is used to allocate the bandwidth resources of any connection port of the central processing unit to the connected device slot; When the mainboard of the computer system is powered on, the baseboard management controller generates an option configuration file according to the bandwidth allocation information table, wherein the option configuration file includes an expansion unit corresponding to any connection port of the central processing unit; After the host of the computer system is triggered, the basic input and output system configures any connection port of the central processing unit according to the option configuration file during the startup process to allocate the bandwidth resources of the central processing unit to each expansion unit.
13. A computer device, characterized in that: include: At least one processor, and a memory, wherein the memory stores a computer program that can be run on the processor, wherein the bandwidth allocation method according to claim 12 is performed when the processor executes the computer program.
14. A non-volatile readable storage medium, characterized in that: The non-volatile readable storage medium stores a computer program, wherein the computer program executes the bandwidth allocation method according to claim 12 when executed by a processor.
15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the bandwidth allocation method of claim 12 is implemented.