Testing method and device for operating performance of expansion module
By controlling the connection reset between the central processor and the expansion module and obtaining the bus operating parameters, the performance of the expansion module is quickly evaluated, which solves the problem of low test efficiency in the existing technology and realizes efficient expansion module operating performance testing.
Patent Information
- Application Number
- CN202410696812.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-05-31
AI Technical Summary
In the existing technology, the efficiency of running performance tests of expansion modules is low, requiring a long time to complete a round of testing, and relying on device restarts, which takes a long time.
By controlling the connection reset between the central processor and the expansion module, it triggers the link training state machine reset of the target communication bus and obtains the bus operating parameters to quickly evaluate the current operating performance of the expansion module and avoid the time-consuming restart of the device. .
The time consumption of the expansion module running performance test is optimized, the test efficiency is improved, the dependence on restarting the device running system is reduced, and the test cycle is significantly shortened.
Smart Images

Figure CN118260131B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and more specifically, to a method and device for testing the operating performance of an expansion module. Background Art
[0002] With the development of technology, many application scenarios have a high demand for the data transmission rate of the hardware devices deployed in the device. In order to meet the demand for data transmission rate between hardware devices in the device, communication bus technology came into being. By deploying the communication bus, data is transmitted between hardware devices through the communication bus. In order to enable more hardware devices to access the target communication bus, relevant technicians have developed a bus extension module. By connecting the bus extension module to the communication bus, an access interface is extended for other hardware devices on the communication bus. Therefore, the bus extension module is crucial for the data transmission function of the device through the communication bus. However, due to the expansion module's own firmware BUG (program error), design defects of the communication bus, BIOS (Basic Input Output System) resource allocation abnormality, CPU (Central Processing Unit, central processing unit) and expansion module incompatibility and other problems, the expansion module cannot run normally on the device. Therefore, before the device leaves the factory, the operation performance of the expansion module of the communication bus deployed on the device needs to be tested. The current way to verify the operating performance of the expansion module in the industry is to restart the operating system of the device in this way, by executing relevant scripts under the OS (Operating System) to repeatedly restart the operating system or power on and off the entire machine, and then capture the information in the communication bus after each system restart to judge the operating performance of the expansion module. Since the system startup time is long, generally more than ten minutes, it takes about 3.5 days to complete a round of testing if the test is performed 500 times. Obviously, this way of testing the performance of the expansion card requires a lot of testing time. Summary of the invention
[0003] The embodiments of the present application provide a method and device for testing the operating performance of an extension module, so as to at least solve the problem of low efficiency in testing the operating performance of an extension module in the related art.
[0004] According to one embodiment of the present application, a method for testing the operating performance of an extension module is provided, which is applied to a basic input / output system, wherein the basic input / output system, a central processing unit and an extension module are deployed on a mainboard of a target device, wherein the basic input / output system is connected to the central processing unit, wherein the central processing unit is connected to the extension module via a target communication bus, wherein the central processing unit is used to control the bus operating state of the target communication bus, and wherein the extension module is used to expand the number of hardware devices connected to the central processing unit via the target communication bus. The method comprises: in the process of repeatedly testing the operating performance of the extension module, obtaining a reference test result of the extension module obtained in a reference test round before the current test round; and wherein the reference test result is used to indicate In the case where the operating performance of the extension module in the reference test round meets the target performance requirement, control the connection reset between the central processing unit and the extension module, wherein the connection reset between the central processing unit and the extension module allows triggering the reset of the training state of the link training state machine in the target communication bus, and the link training state machine is used to control the data transmission state of the target communication bus; in the case where it is determined that the connection reset between the central processing unit and the extension module is completed, obtain the bus operation parameters of the target communication bus, wherein the bus operation parameters are used to indicate the data transmission status between the central processing unit and the extension module; determine the current operation performance of the extension module in the current test round according to the bus operation parameters.
[0005] Optionally, the controlling the connection between the central processor and the expansion module to be reset includes:
[0006] Controlling the central processing unit to perform a reconnection operation on the target communication bus;
[0007] In the case where it is determined that the central processor is reconnected to the target communication bus, detecting a first operating parameter in the target communication bus, wherein the first operating parameter is used to indicate a data transmission status between the central processor and the expansion module;
[0008] determining a current operating state of the expansion module according to the first operating parameter;
[0009] When the operating status indicates that the data transmission performance of the expansion module meets the target performance condition, the expansion module is restarted by the central processing unit.
[0010] Optionally, the expansion module includes a plurality of expansion cards, a first control module is further deployed on the mainboard of the target device, the first control module is connected to the central processing unit, a plurality of expansion cards are respectively connected to the target communication bus, and the first control module is respectively connected to each of the expansion cards.
[0011] The step of restarting the expansion module by the central processor includes:
[0012] Obtaining a target expansion card to be restarted currently in a restart sequence of the multiple expansion cards;
[0013] A target instruction is sent to the first control module through the central processing unit, wherein the target instruction is used to instruct the first control module to control the target expansion card to restart.
[0014] Optionally, the first control module includes an editable logic device, the editable logic device is connected to the central processing unit, and the editable logic device is also connected to the expansion card through a first signal line and a second signal line, the first signal line is used to control the power-on state of the expansion card, and the second signal line is used to control the reset state of the expansion card.
[0015] The sending of the target instruction to the first control module by the central processor includes:
[0016] Sending a first instruction to the editable logic device through the central processor, wherein the first instruction is used to instruct the editable logic device to lower the level values on the first signal line and the second signal line;
[0017] After a first delay, sending a second instruction to the editable logic device through the central processor, wherein the second instruction is used to instruct the editable logic device to increase the level value of the first signal line;
[0018] After a second delay, a third instruction is sent to the editable logic device through the central processing unit, wherein the third instruction is used to instruct the editable logic device to increase the level value of the second signal line, and the target instruction includes the first instruction, the second instruction and the third instruction.
[0019] Optionally, controlling the central processor to perform a reconnection operation on the target communication bus includes:
[0020] Sending a fourth instruction to the central processing unit, wherein the fourth instruction is used to instruct the central processing unit to close a signal input port to the target communication bus;
[0021] After a delay of a third time, a fifth instruction is sent to the central processing unit, wherein the fifth instruction is used to instruct the central processing unit to start a signal input port to the target communication bus.
[0022] Optionally, determining the current operating state of the expansion module according to the first operating parameter includes:
[0023] In the case where the expansion module includes a plurality of expansion cards, determining a current operating state of each expansion card according to the first operating parameter corresponding to each expansion card;
[0024] In the case that there is an expansion card in an abnormal operation state among the plurality of expansion cards, determining that the data transmission performance of the expansion module does not meet the target performance condition;
[0025] In a case where there is no expansion card in an abnormal operation state among the plurality of expansion cards, it is determined that the data transmission performance of the expansion module meets a target performance condition.
[0026] Optionally, determining the current operating state of each expansion card according to the first operating parameter corresponding to each expansion card includes:
[0027] matching the first operating parameter of the expansion card with the second operating parameter of the expansion card in the reference test round;
[0028] When the parameter difference value between the first operating parameter and the second operating parameter is greater than the target threshold, it is determined that the expansion card is currently in an abnormal operating state.
[0029] Optionally, determining the current operating performance of the expansion module in the current test round according to the bus operating parameters includes:
[0030] In the case where the expansion module includes a plurality of expansion cards, determining the current operating state of each expansion card according to the bus operating parameter corresponding to each expansion card;
[0031] In the case that there is an expansion card in an abnormal operation state among the plurality of expansion cards, determining that the current operation performance of the expansion module does not meet the target performance requirement;
[0032] In the case that there is no expansion card in an abnormal operation state among the plurality of expansion cards, it is determined that the current operation performance of the expansion module meets the target performance requirement.
[0033] Optionally, determining the current operating state of each expansion card according to the bus operating parameter corresponding to each expansion card includes:
[0034] Matching the bus operating parameters with reference operating parameters of the expansion card in a reference test round;
[0035] When the parameter difference value between the bus operation parameter and the reference operation parameter is greater than a set threshold, it is determined that the expansion card is in an abnormal operation state.
[0036] Optionally, a second control module is further disposed on the mainboard of the target device, the second control module is connected to the central processing unit, and the second control module is used to control the running state of the central processing unit.
[0037] After determining the current operating performance of the expansion module in the current test round according to the bus operating parameters, the method further includes:
[0038] Sending a sixth instruction to the second control module through the central processor, wherein the sixth instruction is used to instruct the second control module to perform a restart operation on the central processor;
[0039] When it is detected that the central processor completes the restart operation, obtaining a third operating parameter in the target communication bus, wherein the third operating parameter is used to indicate the data transmission status between the central processor and the expansion module;
[0040] The operating performance of the expansion module is determined according to the third operating parameter.
[0041] Optionally, determining the operating performance of the expansion module according to the third operating parameter includes:
[0042] matching the third operating parameter with a first parameter threshold of the target communication bus;
[0043] When the third operating parameter matches the first parameter threshold, it is determined that the operating performance of the expansion module meets the target performance requirement.
[0044] Optionally, a third control module is further disposed on the mainboard of the target device, the third control module is connected to the central processing unit, and the third control module is used to control the power supply state of the target device.
[0045] After determining the current operating performance of the expansion module in the current test round according to the bus operating parameters, the method further includes:
[0046] Sending a seventh instruction to the third control module through the central processor, wherein the seventh instruction is used to instruct the third control module to perform a device power-off operation on the target device, and to perform a device power-on operation on the target device after a target delay;
[0047] After determining that the target device is powered on again, obtaining a second operating parameter in the target communication bus, wherein the second operating parameter is used to indicate the data transmission status between the central processing unit and the expansion module;
[0048] The operating performance of the expansion module is determined according to the second operating parameter.
[0049] Optionally, determining the operating performance of the expansion module according to the fourth operating parameter includes:
[0050] matching the fourth operating parameter with a second parameter threshold of the target communication bus;
[0051] When the fourth operating parameter matches the second parameter threshold, it is determined that the operating performance of the expansion module meets the target performance requirement.
[0052] According to another embodiment of the present application, there is provided a testing device for the operating performance of an extension module, which is applied to a basic input / output system. The basic input / output system, a central processing unit and an extension module are deployed on a mainboard of a target device. The basic input / output system is connected to the central processing unit, and the central processing unit is connected to the extension module via a target communication bus. The central processing unit is used to control the bus operating state of the target communication bus. The extension module is used to expand the number of hardware devices connected to the central processing unit via the target communication bus. The device includes: a first acquisition module, which is used to acquire a reference test result of the extension module obtained in a reference test round before a current test round during repeated tests of the operating performance of the extension module; a control module, which is used to obtain a reference test result of the extension module obtained in a reference test round before a current test round when the reference test result is used to indicate The expansion module controls the connection reset between the central processing unit and the expansion module when the operating performance of the reference test round meets the target performance requirement, wherein the connection reset between the central processing unit and the expansion module allows triggering the reset of the training state of the link training state machine in the target communication bus, and the link training state machine is used to control the data transmission state of the target communication bus; a second acquisition module is used to acquire the bus operation parameters of the target communication bus when it is determined that the connection reset between the central processing unit and the expansion module is completed, wherein the bus operation parameters are used to indicate the data transmission status between the central processing unit and the expansion module; a first determination module is used to determine the current operation performance of the expansion module in the current test round according to the bus operation parameters.
[0053] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0054] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0055] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0056] According to the present application, a basic input / output system, a central processing unit and an expansion module are deployed on the mainboard of the target device. The central processing unit is connected to the expansion module through a target communication bus. The bus operation state of the target communication bus is controlled by the central processing unit, and the number of hardware connected to the central processing unit through the target communication bus is expanded through the expansion module. Then, by deploying a test method for extended operation performance in the basic input / output system, in the process of repeatedly testing the operation performance of the expansion module, when determining whether the operation performance of a reference test round before the current test round meets the target performance requirement, the connection between the central processing unit and the expansion module is reset, triggering the reset of the training state of the link training state machine in the target communication bus, thereby realizing data on the target communication bus. The outgoing state is retrained, and then when it is determined that the connection reset is completed, the bus operation parameters of the target communication bus are obtained, so as to determine the current operation performance of the expansion module in the current training round according to the bus operation parameters, that is, the training state reset of the link training state machine of the target communication bus is triggered by controlling the connection reset between the central processing unit and the expansion module, so as to quickly reset the data transmission state of the target communication bus, optimize the time consumption problem in the test process of the operation performance of the extension module, avoid the time-consuming problem of resetting the target communication bus by restarting the operating system of the device in the related technology, and can solve the problem of low test efficiency of the operation performance of the extension module in the related technology, so as to improve the test efficiency of the operation performance of the extension module. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is a hardware structure block diagram of a server device of a method for testing the operating performance of an extension module according to an embodiment of the present application;
[0058] Figure 2 is a flow chart of a method for testing the operating performance of an expansion module according to an embodiment of the present application;
[0059] Figure 3 is an optional PCIE link training schematic diagram according to an embodiment of the present application;
[0060] Figure 4 is a schematic diagram of an optional connection reset according to an embodiment of the present application;
[0061] Figure 5 is a schematic diagram of an optional hardware device according to an embodiment of the present application;
[0062] Figure 6 This is an optional performance test process according to an embodiment of the present application. Figure 1 ;
[0063] Figure 7 This is an optional performance test process according to an embodiment of the present application. Figure 2 ;
[0064] Figure 8 This is an optional performance test process according to an embodiment of the present application. Figure 3 ;
[0065] Fig. 9 It is a structural block diagram of a testing device for the operating performance of an extension module according to an embodiment of the present application. DETAILED DESCRIPTION
[0066] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0067] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0068] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a method for testing the operating performance of an expansion module according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1More or fewer components as shown, or with Figure 1 Different configurations shown.
[0069] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the test method for the operating performance of the expansion module in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0070] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0071] In this embodiment, a method for testing the operating performance of an expansion module is provided. Figure 2 is a flow chart of a method for testing the operating performance of an expansion module according to an embodiment of the present application, such as Figure 2 As shown, it is applied to a basic input / output system, the basic input / output system, the central processing unit and the expansion module are deployed on the mainboard of the target device, the basic input / output system is connected to the central processing unit, the central processing unit is connected to the expansion module through a target communication bus, the central processing unit is used to control the bus operation state of the target communication bus, and the expansion module is used to expand the number of hardware devices connected to the central processing unit through the target communication bus. The process includes the following steps:
[0072] Step S202, in the process of repeatedly testing the operating performance of the extension module, obtaining a reference test result of the extension module obtained in a reference test round before the current test round;
[0073] Step S204, when the reference test result is used to indicate that the running performance of the extension module in the reference test round meets the target performance requirement, controlling the connection between the central processing unit and the extension module to be reset, wherein the connection between the central processing unit and the extension module is reset, allowing the triggering of the reset of the training state of the link training state machine in the target communication bus, and the link training state machine is used to control the data transmission state of the target communication bus;
[0074] Step S206, when it is determined that the connection reset between the central processor and the expansion module is completed, obtaining bus operation parameters of the target communication bus, wherein the bus operation parameters are used to indicate the data transmission status between the central processor and the expansion module;
[0075] Step S208: determining the current operating performance of the expansion module in the current test round according to the bus operating parameters.
[0076] Through the above steps, a basic input / output system, a central processing unit and an expansion module are deployed on the mainboard of the target device. The central processing unit is connected to the expansion module through the target communication bus. The bus operation state of the target communication bus is controlled by the central processing unit, and the number of hardware connected to the central processing unit through the target communication bus is expanded through the expansion module. Then, by deploying a test method for extended operation performance in the basic input / output system, in the process of repeatedly testing the operation performance of the expansion module, when determining whether the operation performance of the reference test round before the current test round meets the target performance requirement, the connection between the central processing unit and the expansion module is reset, triggering the training state reset of the link training state machine in the target communication bus, thereby realizing data on the target communication bus. The outgoing state is retrained, and then when it is determined that the connection reset is completed, the bus operation parameters of the target communication bus are obtained, so as to determine the current operation performance of the expansion module in the current training round according to the bus operation parameters, that is, the training state reset of the link training state machine of the target communication bus is triggered by controlling the connection reset between the central processing unit and the expansion module, so as to quickly reset the data transmission state of the target communication bus, optimize the time consumption problem in the test process of the operation performance of the extension module, avoid the time-consuming problem of resetting the target communication bus by restarting the operating system of the device in the related technology, and can solve the problem of low test efficiency of the operation performance of the extension module in the related technology, so as to improve the test efficiency of the operation performance of the extension module.
[0077] Optionally, in an embodiment of the present application, the target communication bus may be, but is not limited to, a PCIe (peripheral component interconnect express, a high-speed serial computer expansion bus standard) bus. In an embodiment of the present application, an expansion module is used to expand the number of hardware devices connected to the PCIe bus, and the expansion module may include, but is not limited to, one or more expansion cards. PCIE is a high-speed serial computer expansion bus standard proposed by Intel. Its main advantage is point-to-point serial transmission and high transmission rate. The PCIE system defines a layered architecture, including a data link layer (DLL), a transaction layer (TL) and a physical layer (PL). The physical layer (PL) is the bottom layer of the PCIE link, which is mainly responsible for serial-to-parallel conversion, 8 / 10b or 128 / 130b encoding and decoding, link training state machine (LTSSM), etc. Therefore, the robustness of the physical layer link is the basis for the reliability of the entire PCIE system. If the PCIE link is not robust enough, serious problems such as high link bit error rate, reduced bandwidth, and reduced speed may occur. These problems may cause PCIE performance degradation at the least, or even cause abnormal restart of the entire system. The LTSSM state machine is responsible for the training of the entire PCIE link, realizing the initialization process from reset to normal operation (L0) of the device, so that the data packet can be transmitted normally on the link. LTSSM mainly includes 11 states such as detection, polling, configuration, recovery, and L0. If the PCIE link is not robust enough, the LTSSM state machine training will have probabilistic abnormalities, such as link failure, lane reduction, speed reduction, etc. Based on the defects in the design of the LTSSM state machine of the component or CPU manufacturer, or the unreasonable design of the PCIE link of the OEM manufacturer itself, the LTSSM state machine will inevitably have abnormalities, and this abnormality may be probabilistic, so it is necessary to repeatedly test the LTSSM state machine to ensure the reliability of the LTSSM state machine. The existing method of verifying the stability of the PCIE link is usually to detect the link rate, bandwidth, and bit error rate through commands such as LSPCI in the OS state. The PCIE expansion card is an important component of the storage system, mainly responsible for connecting the front-end server and the back-end storage device. The stability of the PCIE card is one of the key factors determining the reliability of the entire storage system. PCIE expansion card firmware bugs, OEM manufacturer PCIE link design defects, BIOS resource allocation anomalies, CPU and PCIE expansion card compatibility issues can all cause the PCIE expansion card to fail to work properly in the storage system.
[0078] In the embodiment provided in the above step S202, the test method for the operating performance of the extension module is a test method for performing multiple rounds of repeated tests on the operating performance of the extension module. Since the training process of the link training state machine may have probabilistic abnormalities, the operating performance of the extension module can be tested by multiple rounds of repeated tests, that is, the above method is repeatedly executed until it is tested that the link operating performance is lower than the target performance requirement or the number of repeated tests reaches a preset number of tests, or the above test method can also be executed according to a preset number of tests, and the final operating performance of the extension module is determined according to the test results of multiple rounds of tests. This solution does not limit this.
[0079] Optionally, in an embodiment of the present application, the number of test rounds of repeated testing may be a fixed value set according to demand, or may also be set according to parameters of the extension module, where the parameters of the extension module are used to indicate the importance of the extension module in the target device. The parameters of the extension module may include but are not limited to the number of deployed extension modules, the data transmission rate of the extension module, etc., and this solution does not limit this.
[0080] Optionally, in the embodiment of the present application, the operating performance of the expansion module may include, but is not limited to, the reliability of the expansion module and the stability of the bus after the expansion module is connected to the target bus.
[0081] In the embodiment provided in the above step S204, the connection reset method is used to indicate that the training state of the link training state machine of the target communication bus is reset without restarting the operating system of the target device, thereby resetting the data transmission state of the target communication bus. The connection reset method may include but is not limited to resetting the bus link of the target communication bus, and / or controlling the expansion module to restart, and / or controlling the upstream port of the expansion module to restart, and / or controlling the root port to restart, etc., and this solution does not limit this.
[0082] In the embodiment provided in the above step S206, the bus operation parameters may include but are not limited to link rate, bandwidth, bit error rate, etc., and this solution does not limit this.
[0083] In the embodiment provided in the above step S208, the bus operation parameters and the reference operation parameters can be matched. When the bus operation parameters and the reference operation parameters match consistently, it is determined that the current operation performance meets the target performance requirement. When the bus operation parameters and the reference operation parameters do not match consistently, it is determined that the current operation performance does not meet the target performance requirement. In this embodiment, the reference operation parameters can be parameter values set according to requirements, or can also be operation parameters collected from reference test rounds. By matching the similarity between the bus operation parameters and the reference operation parameters, when the similarity is greater than the target threshold, it is determined that the bus operation parameters and the reference operation parameters match consistently. This solution does not limit this.
[0084] As an optional embodiment, the controlling the connection between the central processor and the expansion module to be reset includes:
[0085] Controlling the central processing unit to perform a reconnection operation on the target communication bus;
[0086] In the case where it is determined that the central processor is reconnected to the target communication bus, detecting a first operating parameter in the target communication bus, wherein the first operating parameter is used to indicate a data transmission status between the central processor and the expansion module;
[0087] determining a current operating state of the expansion module according to the first operating parameter;
[0088] When the operating status indicates that the data transmission performance of the expansion module meets the target performance condition, the expansion module is controlled to restart by the central processing unit.
[0089] Optionally, in an embodiment of the present application, controlling the central processor to perform a reconnection operation on the target communication bus may be achieved by first disabling and then enabling the upstream port of the expansion module, or may be achieved by first disabling and then enabling the root port of the expansion module, which is not limited in this solution.
[0090] Optionally, in an embodiment of the present application, the method of controlling the expansion module to restart by the central processing unit may be, but is not limited to, controlling the expansion module to perform a power-off operation first by the central processing unit, and then performing a power-on operation after powering off; when there are multiple expansion modules deployed on the target device, the multiple expansion modules perform the restart operation in sequence according to the target sequence, which is not limited in this solution.
[0091] Optionally, in an embodiment of the present application, a method for quickly testing the stability of a PCIE link (target communication bus) and the reliability of a PCIE expansion card (expansion module) without relying on an operating system (OS) is proposed. Figure 3 is an optional PCIE link training schematic diagram according to an embodiment of the present application, such as Figure 3 As shown, the main idea of the PCIE link stability test is to verify through repeated tests of the PCIE link training process. The entire process of PCIE link training includes: detect, polling, configuration, L0 recovery (change speed), L0. Figure 4 is an optional connection reset schematic diagram according to an embodiment of the present application, such as Figure 4 As shown in the figure, the link stability verification process based on rebooting the operating system or powering on and off the device is essentially to let the entire link re-execute the process from detect to L0 each time. By disabling the uplink port or root port first and then enabling it, the entire process will be retrained (the state machine changes from detect to L0). Powering off and then powering on the PCIE expansion card will also complete the retraining of the entire process (the state machine changes from detect to L0). The specific state machine jump process is as follows: Figure 2As shown. For the PCIE expansion card link stability verification, the BIOS first executes disable on the PCIE expansion card upstream port. After the disable is executed, the LTSSM state machine will jump from L0 to detect. After a delay of 50ms, the enable is executed again. After the enable is executed, the LTSSM state machine will jump from detect to L0 again. Through the above process, the entire retraining process of the PCIE link is completed. The BIOS judges the status of the PCIE expansion card and the upstream port according to the link status (rate, bandwidth, bit error rate, etc.). If the link is normal, the PCIE expansion card status bit of the corresponding slot is set to 1. If there are situations such as speed reduction, lane reduction, bit error, etc., the status bit of the corresponding slot is set to 0. In order to facilitate the location of problems and observe the test process, the BIOS prints the PCIE link information with the slot number as the index after each status judgment, including status bit, rate, bandwidth, bit error, etc. If the link status of a slot is abnormal, the BIOS terminates the test process and prints the test failure. Optionally, after completing the above test, if the status of all slots is normal, the BIOS sends the status information (the value after the AND of all card status bits) to the CPLD through the IIC bus between the CPU and the CPLD. After receiving the status signal, the CPLD pulls down the SLOT_POWER_EN and SLOT_PEREST signals of the PCIE expansion card. At this time, the LTSSM state machine jumps from the L0 to the detect state; after a delay of 100ms, the SLOT_POWER_EN signal is pulled high again, and the SLOT_POWER_EN signal is pulled high again, and the SLOT_PEREST signal is pulled high again after a delay of 100ms. Under normal circumstances, the LTSSM state machine jumps from the detect state to the L0 state within 50ms. After the CPLD pulls up the SLOT_PEREST signal again for 1S, it sends the PCIE expansion card reset completion flag to the BIOS through the IIC. After receiving the flag information sent by the CPLD, the BIOS starts to confirm the PCIE link status information (bandwidth, rate, bit error). If the status information is abnormal, the test is terminated and the relevant information is printed; if the status information is normal, the current round of testing ends and the next round of testing begins. In summary, the present invention completes a round of PCIE expansion card link stability test including two processes. First, a LTSSM state machine jump is completed by disabling / enabling the port. If no abnormality is found, the card power-on and power-off operation is performed to complete another LTSSM state machine jump. If any of the two processes fails, the test is terminated. Through the IIC link between the BMC and the CPU, the BMC sets the start link stability test process and the number of tests.The reliability verification of the card mainly involves power-on and power-off tests and reboot tests of the whole machine. Traditionally, these test items need to be completed by executing corresponding scripts under the operating system. The test method of the present invention does not rely on the operating system, and the test can be performed after the BIOS completes the enumeration of the device.
[0092] Through the above content, by including two test processes in a round of expansion module operation performance test, that is, first restarting the communication bus to make the LTSSM state machine complete a jump, and if there is no problem, restarting the expansion module and completing the jump of the LTSSM state machine again, thereby ensuring the stability of the communication bus test, the operation reliability of the expansion module is tested, and the influence of the operation of the communication bus on the reliability of the expansion module during the operation of the expansion module is avoided, thereby improving the efficiency of the performance test of the expansion module.
[0093] As an optional embodiment, the expansion module includes multiple expansion cards, a first control module is further deployed on the mainboard of the target device, the first control module is connected to the central processing unit, multiple expansion cards are respectively connected to the target communication bus, and the first control module is respectively connected to each of the expansion cards.
[0094] The step of restarting the expansion module by the central processor includes:
[0095] Obtaining a target expansion card to be restarted currently in a restart sequence of the multiple expansion cards;
[0096] A target instruction is sent to the first control module through the central processing unit, wherein the target instruction is used to instruct the first control module to control the target expansion card to restart.
[0097] Optionally, in an embodiment of the present application, when the expansion module includes multiple expansion cards, it is necessary to test the operating performance of each expansion card. In order to avoid interference between the operating performances of different expansion cards, a sequential testing method is adopted, that is, the multiple expansion cards are restarted in sequence, thereby testing the multiple expansion cards in sequence.
[0098] Optionally, in an embodiment of the present application, the first control module may be, but is not limited to, a switch on a power supply circuit connected between each expansion card and a power supply for the expansion card, and the on and off of the power supply circuit is controlled by the switch, thereby achieving control over the restart of the corresponding expansion card. This solution does not limit this.
[0099] Optionally, in an embodiment of the present application, the restart order can be a fixed restart order set according to demand, and each round of testing is restarted according to the restart order, or the restart order can be a randomly generated restart order, which is randomly generated before each round of testing is executed, and restarted according to the randomly generated restart order, so as to discover unknown influence relationships between expansion cards and cover the subsequent usage scenarios of multiple expansion cards as much as possible. This solution does not limit this.
[0100] Through the above content, when the expansion module includes multiple expansion cards, the corresponding expansion card is controlled to restart by sending a target instruction to the first control module, thereby realizing orderly testing of the operating performance of multiple expansion cards, avoiding test interference between expansion cards, and improving test efficiency.
[0101] As an optional embodiment, the first control module includes an editable logic device, the editable logic device is connected to the central processing unit, and the editable logic device is also connected to the expansion card through a first signal line and a second signal line, the first signal line is used to control the power-on state of the expansion card, and the second signal line is used to control the reset state of the expansion card.
[0102] The sending of the target instruction to the first control module by the central processor includes:
[0103] Sending a first instruction to the editable logic device through the central processor, wherein the first instruction is used to instruct the editable logic device to lower the level values on the first signal line and the second signal line;
[0104] After a first delay, sending a second instruction to the editable logic device through the central processor, wherein the second instruction is used to instruct the editable logic device to increase the level value of the first signal line;
[0105] After a second delay, a third instruction is sent to the editable logic device through the central processing unit, wherein the third instruction is used to instruct the editable logic device to increase the level value of the second signal line, and the target instruction includes the first instruction, the second instruction and the third instruction.
[0106] Optionally, in an embodiment of the present application, the first time and the second time are experimental delays to ensure that the expansion card completes power-off and power-on settings. They can be fixed values pre-set according to requirements, or they can be values set according to the model of the expansion card deployed on the target device. This solution does not limit this.
[0107] Optionally, in an embodiment of the present application, an editable logic device is deployed, and a first instruction is sent to the editable logic device to control the expansion card to power off, and then a second instruction and a third instruction are sent to the editable logic device, so as to control the expansion card to power on again, thereby restarting the expansion card, ensuring the accuracy of the restart operation, and further ensuring the test effect of the expansion card.
[0108] As an optional embodiment, controlling the central processor to perform a reconnection operation on the target communication bus includes:
[0109] Sending a fourth instruction to the central processing unit, wherein the fourth instruction is used to instruct the central processing unit to close a signal input port to the target communication bus;
[0110] After a delay of a third time, a fifth instruction is sent to the central processing unit, wherein the fifth instruction is used to instruct the central processing unit to start a signal input port to the target communication bus.
[0111] Optionally, in an embodiment of the present application, the third time is a time value set to ensure the reset of the training state of the link training state machine. It can be a fixed value set according to demand, or it can also be a time value set according to the bus properties of the target communication bus. This solution does not limit this.
[0112] Through the above content, after sending the fourth instruction to the central controller to instruct the central processor to close the signal input port of the target communication bus, the fifth instruction is sent to the central processor by delaying the third time to instruct the central processor to start the signal input port, thereby ensuring the effective restart of the target communication bus.
[0113] As an optional embodiment, determining the current operating state of the expansion module according to the first operating parameter includes:
[0114] In the case where the expansion module includes a plurality of expansion cards, determining a current operating state of each expansion card according to the first operating parameter corresponding to each expansion card;
[0115] In the case that there is an expansion card in an abnormal operation state among the plurality of expansion cards, determining that the data transmission performance of the expansion module does not meet the target performance condition;
[0116] In a case where there is no expansion card in an abnormal operation state among the plurality of expansion cards, it is determined that the data transmission performance of the expansion module meets a target performance condition.
[0117] As an optional embodiment, determining the current operating state of each expansion card according to the first operating parameter corresponding to each expansion card includes:
[0118] matching the first operating parameter of the expansion card with the second operating parameter of the expansion card in the reference test round;
[0119] When the parameter difference value between the first operating parameter and the second operating parameter is greater than the target threshold, it is determined that the expansion card is currently in an abnormal operating state.
[0120] As an optional embodiment, determining the current operating performance of the expansion module in the current test round according to the bus operating parameters includes:
[0121] In the case where the expansion module includes a plurality of expansion cards, determining the current operating state of each expansion card according to the bus operating parameter corresponding to each expansion card;
[0122] In the case that there is an expansion card in an abnormal operation state among the plurality of expansion cards, determining that the current operation performance of the expansion module does not meet the target performance requirement;
[0123] In the case that there is no expansion card in an abnormal operation state among the plurality of expansion cards, it is determined that the current operation performance of the expansion module meets the target performance requirement.
[0124] As an optional embodiment, determining the current operating state of each expansion card according to the bus operating parameter corresponding to each expansion card includes:
[0125] Matching the bus operating parameters with reference operating parameters of the expansion card in a reference test round;
[0126] When the parameter difference value between the bus operation parameter and the reference operation parameter is greater than a set threshold, it is determined that the expansion card is in an abnormal operation state.
[0127] Optionally, in an embodiment of the present application, the value of the reference operating parameter may be the same as the value of the second operating parameter in the above-mentioned embodiment, or the reference operating parameter and the second operating parameter may be set to different parameter values as required, which is not limited in this scheme.
[0128] As an optional embodiment, a second control module is further disposed on the mainboard of the target device, the second control module is connected to the central processing unit, and the second control module is used to control the running state of the central processing unit.
[0129] After determining the current operating performance of the expansion module in the current test round according to the bus operating parameters, the method further includes:
[0130] Sending a sixth instruction to the second control module through the central processor, wherein the sixth instruction is used to instruct the second control module to perform a restart operation on the central processor;
[0131] When it is detected that the central processor completes the restart operation, obtaining a third operating parameter in the target communication bus, wherein the third operating parameter is used to indicate the data transmission status between the central processor and the expansion module;
[0132] The operating performance of the expansion module is determined according to the third operating parameter.
[0133] Optionally, in an embodiment of the present application, during the actual use of the expansion module, the operation of the central processing unit will affect the operation of the expansion card. Therefore, for the scenario of rebooting the CPU, the BIOS obtains the presence, bandwidth, rate, and error information of the PCIE expansion card. If the information of the expansion cards in all slots is normal, the BIOS sends the relevant signal of the reset CPU through the IIC link between the CPU and the CPLD. After the CPLD receives the signal sent by the BIOS requesting the reset CPU, it triggers the reset signal of the CPU. The CPU receives the reset signal and restarts. The CPLD records the number of times the reset is triggered. The CPLD sets a threshold internally. When the number of resets triggered exceeds the threshold, the signal of the reset CPU is stopped, and the BIOS is notified through the IIC bus that the test cycle is completed, and the BIOS prints the test completion information. If it is found that the link status of a certain slot is abnormal, the BIOS does not send the relevant signal of the reset CPU to the CPLD, the test process ends, and prints the relevant information of the test failure.
[0134] Through the above content, by executing a restart operation on the central processing unit, after executing the restart operation, by detecting the third operating parameter of the extension module on the target bus, the operating performance of the extension module in the central processing unit restart scenario is determined according to the third operating parameter, covering the test scenario of the operating performance of the extension module, and ensuring the performance of the extension module in subsequent use.
[0135] As an optional embodiment, determining the operating performance of the expansion module according to the third operating parameter includes:
[0136] matching the third operating parameter with a first parameter threshold of the target communication bus;
[0137] When the third operating parameter matches the first parameter threshold, it is determined that the operating performance of the expansion module meets the target performance requirement.
[0138] As an optional embodiment, a third control module is further disposed on the mainboard of the target device, the third control module is connected to the central processing unit, and the third control module is used to control the power supply state of the target device.
[0139] After determining the current operating performance of the expansion module in the current test round according to the bus operating parameters, the method further includes:
[0140] Sending a seventh instruction to the third control module through the central processor, wherein the seventh instruction is used to instruct the third control module to perform a device power-off operation on the target device, and to perform a device power-on operation on the target device after a target delay;
[0141] After determining that the target device is powered on again, acquiring a fourth operating parameter in the target communication bus, wherein the fourth operating parameter is used to indicate a data transmission status between the central processing unit and the expansion module;
[0142] The operating performance of the expansion module is determined according to the fourth operating parameter.
[0143] Optionally, in an embodiment of the present application, during the actual use of the expansion module, the overall operating state of the target device will affect the operation of the expansion card. Therefore, for the situation where the entire machine is powered on and off, the BIOS also obtains the presence, bandwidth, rate, and error information of the PCIE expansion card. If the information of the expansion cards in all slots is normal, the BIOS notifies the CPLD to power off the entire machine through the IIC link between the CPU and the CPLD. After receiving the relevant signal, the CPLD sends a power control signal to the power control module. The power control module is responsible for powering off the entire machine. The power control module has a timing function. After the timing exceeds 5S, it will automatically trigger powering on again. Powering on again means the start of the next round of testing. If it is found that the link status of a certain slot is abnormal, the BIOS will no longer send a notification to the CPLD to power off the entire machine, and the test process ends and prints relevant information.
[0144] Through the above content, by performing a restart operation on the target device, after the restart operation is completed, by detecting the fourth operating parameter of the extension module on the target bus, the operating performance of the extension module in the CPU restart scenario is determined according to the fourth operating parameter, covering the test scenario of the extension module operating performance, and ensuring the performance of the extension module in subsequent use.
[0145] As an optional embodiment, determining the operating performance of the expansion module according to the fourth operating parameter includes:
[0146] matching the fourth operating parameter with a second parameter threshold of the target communication bus;
[0147] When the fourth operating parameter matches the second parameter threshold, it is determined that the operating performance of the expansion module meets the target performance requirement.
[0148] The embodiment of the present application provides a method for quickly testing the operating performance of an expansion module of a target communication bus by an operating system (OS). The test of the operating performance of the expansion module is performed in a baseboard management controller. Figure 5 is a schematic diagram of an optional hardware device according to an embodiment of the present application; Figure 5 As shown, a BMC (Board Management Controller), a CPU (Central Processing Unit), a CPLD (Complex Programmable Logic Device), a PCIe link (target communication bus), and an expansion module are deployed in the server. The expansion module includes multiple expansion cards (only three are shown in the figure, and the number can be increased according to demand in actual applications). The BMC sets the startup test and test number requirements through the IIC link between the BMC and the CPU. The CPLD is used to connect with the CPU. On the one hand, it can receive the control instructions of the CPU to control the expansion card, and on the other hand, it can also control the running state of the CPU. Three signal lines are deployed between the CPLD and the expansion card, namely, the first signal line (SLOT_PEREST), the second signal line (SLOT_PEREST) and the third signal line (SLOT_PERESET). The first signal line is used to control the power-on state of the expansion card, and the second signal line is used to control the reset state of the expansion card.
[0149] For the restart test of the extension module, Figure 6 This is an optional performance test process according to an embodiment of the present application. Figure 1 ,like Figure 6 As shown, it includes at least the following contents:
[0150] (1) BMC sets the startup test and test frequency requirements through the IIC link between BMC and CPU;
[0151] (2) After receiving the test start command, BIOS records the test times;
[0152] (3) BIOS executes the instruction to disable the PCIE expansion card upstream port. After the instruction is issued, the LTSSM state machine jumps from L0 to detect;
[0153] (4) After a delay of 50ms, the BIOS executes the instruction to enable the PCIE expansion card upstream port. After the instruction is issued, the LTSSM state machine jumps from decet to L0;
[0154] (5) BIOS collects the link information of the relevant PCIE expansion card, including bandwidth, rate, and bit error, and prints the link status information of the PCIE expansion card;
[0155] (6) BIOS determines the link status based on the configuration information of the upstream port and PCIE expansion card;
[0156] (7) If the link is abnormal, the test process ends and the BIOS prints a test failure message; if the link is normal, the BIOS sends a normal status signal to the CPLD through the link between the CPU and CPLD, and the CPLD performs power-on and power-off operations on the card.
[0157] (8) CPLD pulls down the SLOT_POWER_EN and SLOT_PEREST signals of the card, and the LSTTM state machine of the PCIE expansion card jumps from the L0 state to the detect state;
[0158] (9) After a delay of 100ms, the CPLD pulls up the SLOT_POWER_EN signal of the PCIE expansion card again;
[0159] (10) After SLOT_POWER_EN is pulled high for 100ms, the CPLD pulls high the SLOT_PERESET signal of the PCIE expansion card. Under normal circumstances, the LSTTM state machine of the PCIE expansion card jumps from detect to L0 within 50ms;
[0160] (11) After CPLD pulls up the SLOT_PERESET signal of the PCIE expansion card, it delays for 1S and then sends the PCIE expansion card reset completion flag information;
[0161] (12) After receiving the PCIE expansion card reset completion flag information sent by CPLD, BIOS starts to confirm the link information of the expansion card;
[0162] (13) If a link abnormality is found in a PCIE expansion card in a certain slot, the test is terminated, the test number record is cleared, and relevant information is printed;
[0163] (14) If the slot information of all cards is normal, continue to determine whether the test times have reached the test times set by the BMC. If so, terminate the test and print information such as test completion. If not, jump to step 2 to continue the test cycle until the threshold is reached to complete the entire test or the test exits abnormally.
[0164] In order to cover the performance test requirements of the expansion module in the reboot CPU scenario, Figure 7 This is an optional performance test process according to an embodiment of the present application. Figure 2 ,like Figure 7 As shown, it includes at least the following contents:
[0165] (1) The device is powered on, the BIOS completes the enumeration of the PCIE expansion card, and the CPLD sets the test cycle threshold internally;
[0166] (2) BIOS collects and determines the link status information of the PCIE expansion card, and prints the PCIE link information according to the slot as the index;
[0167] (3) BIOS determines the card status. If the card status is abnormal, the test process is terminated;
[0168] (4) BIOS further determines whether the link bandwidth is X0 based on the in-place signal. If it is X0, it reports a card loss fault. If it is not X0, it reports that the PCIE card has reduced bandwidth or speed, and BIOS prints relevant information.
[0169] (5) If the status of the PCIE expansion card is normal, the BIOS sends a command to trigger CPUreset through the IIC link between the CPU and CPLD;
[0170] (6) CPLD receives the instruction to trigger CPU reset sent by BIOS, and CPLD records the number of times CPU reset is triggered;
[0171] (7) After the CPU receives the reset signal sent by the CPLD, it completes the CPU restart;
[0172] (8) CPLD determines whether the number of reset triggering times exceeds the threshold. If so, CPLD notifies CPU through IIC bus to complete the test, and BIOS prints the test completion information.
[0173] (9) If the threshold is not reached, jump to step (2) to continue testing until the test threshold is reached and the entire test is completed or the test exits abnormally.
[0174] In order to cover the testing requirements of the whole machine test scenarios, Figure 8 This is an optional performance test process according to an embodiment of the present application. Figure 3 ,like Figure 8 As shown, at least the following steps are included:
[0175] (1) The device is powered on and BIOS completes the enumeration of the PCIE expansion card;
[0176] (2) BIOS collects and determines the link status information of the PCIE expansion card, and prints the PCIE link information according to the slot as the index;
[0177] (3) BIOS determines the card status. If the card status is abnormal, the test process is terminated;
[0178] (4) BIOS further determines whether the link bandwidth is X0 based on the in-place signal. If it is X0, it reports a card loss fault. If it is not X0, it reports that the PCIE card has reduced bandwidth or speed, and BIOS prints relevant information.
[0179] (5) If the status of the PCIE expansion card is normal, the BIOS sends a command to trigger the power-off of the entire machine to the CPLD through the IIC link between the CPU and CPLD;
[0180] (6) The CPLD receives the command from the BIOS to trigger the power-off of the entire machine and completes the power-off of the entire machine;
[0181] (7) The power-off module of the whole machine has an automatic timing function. If the timing reaches 5 seconds, the power-on is automatically completed. After the power-on is completed, the process starting from step (1) is continued;
[0182] (8) Since the whole machine is powered off, the system equipment cannot record the number of tests and the test needs to be manually terminated through the BMC; if the CPU receives the termination test instruction sent by the BMC, the test is terminated, otherwise the test will continue in a loop or exit abnormally.
[0183] The PCIE expansion card is an important component of the storage system, which is mainly responsible for connecting the front-end server and the back-end storage device. The stability of the PCIE card is one of the key factors that determine the reliability of the entire storage system. The traditional technology for link stability and reliability verification of PCIE expansion cards is based on the operating system, and the corresponding scripts are executed under the operating system to complete the test. Obviously, this operating system-dependent test seriously affects the test efficiency and even takes up most of the time of the entire test cycle. The present invention proposes a PCIE expansion card link stability and reliability test method that does not rely on the operating system. Only the BMC, BIOS, and CPLD need to cooperate with each other to complete the test, which greatly shortens the test cycle and has a significant improvement on the storage device test efficiency.
[0184] Through the above embodiments, for the PCIE expansion card link stability test, the present invention proposes a test method that does not rely on the operating system. Under the BIOS, the operation of disabling the upstream port is first executed, and then the operation of enabling the upstream port is executed. After executing the operation, the state machine will complete the entire PCIE link training process. In order to cover the scenario of hot plugging of the PCIE expansion card and the scenario of powering on and off the PCIE expansion card at the same time, the CPLD control card completes the power on and off, and the BIOS is responsible for monitoring the link information of the PCIE expansion card. Through the above process, the stability and robustness of the PCIE link can be quickly verified, the test cycle is greatly shortened, and the test efficiency is greatly improved. For the reliability test of the PCIE expansion card, the present invention proposes a method for rapid verification that does not rely on the operating system. After the BIOS enumeration is completed, the reboot test and the whole machine power on and off test for the PCIE expansion card can be completed. The test cycle is short and the test efficiency is greatly improved.
[0185] 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 a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0186] In this embodiment, a test device for the operating performance of an expansion module is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0187] Fig. 9 is a structural block diagram of a device for testing the operating performance of an expansion module according to an embodiment of the present application, such as Fig. 9 As shown, it is applied to a basic input and output system, the basic input and output system, the central processing unit and the expansion module are deployed on the mainboard of the target device, the basic input and output system is connected to the central processing unit, the central processing unit is connected to the expansion module through a target communication bus, the central processing unit is used to control the bus operation state of the target communication bus, and the expansion module is used to expand the number of hardware devices connected to the central processing unit through the target communication bus. The device includes:
[0188] A first acquisition module, used for acquiring a reference test result of the extension module obtained in a reference test round before a current test round during repeated testing of the running performance of the extension module;
[0189] a control module, configured to control the connection reset between the central processing unit and the extension module when the reference test result indicates that the running performance of the extension module in the reference test round meets the target performance requirement, wherein the reset of the training state of the link training state machine in the target communication bus is allowed to be triggered when the connection between the central processing unit and the extension module is reset, and the link training state machine is used to control the data transmission state of the target communication bus;
[0190] A second acquisition module is used to acquire bus operation parameters of the target communication bus when it is determined that the connection reset between the central processing unit and the expansion module is completed, wherein the bus operation parameters are used to indicate the data transmission status between the central processing unit and the expansion module;
[0191] The first determining module is used to determine the current operating performance of the expansion module in the current test round according to the bus operating parameters.
[0192] According to the above content, a basic input / output system, a central processing unit and an expansion module are deployed on the mainboard of the target device. The central processing unit is connected to the expansion module through a target communication bus. The bus operation state of the target communication bus is controlled by the central processing unit, and the number of hardware connected to the central processing unit through the target communication bus is expanded by the expansion module. Then, by deploying a test method for extended operation performance in the basic input / output system, in the process of repeatedly testing the operation performance of the expansion module, when determining that the operation performance of the reference test round before the current test round meets the target performance requirement, the connection between the central processing unit and the expansion module is reset, triggering the training state reset of the link training state machine in the target communication bus, thereby realizing data on the target communication bus. The outgoing state is retrained, and then when it is determined that the connection reset is completed, the bus operation parameters of the target communication bus are obtained, so as to determine the current operation performance of the expansion module in the current training round according to the bus operation parameters, that is, the training state reset of the link training state machine of the target communication bus is triggered by controlling the connection reset between the central processing unit and the expansion module, so as to quickly reset the data transmission state of the target communication bus, optimize the time consumption problem in the test process of the operation performance of the extension module, avoid the time-consuming problem of resetting the target communication bus by restarting the operating system of the device in the related technology, and can solve the problem of low test efficiency of the operation performance of the extension module in the related technology, so as to improve the test efficiency of the operation performance of the extension module.
[0193] Optionally, the control module includes:
[0194] A control unit, configured to control the central processing unit to perform a reconnection operation on the target communication bus;
[0195] a detection unit, configured to detect a first operating parameter in the target communication bus when it is determined that the central processing unit is reconnected to the target communication bus, wherein the first operating parameter is used to indicate a data transmission status between the central processing unit and the expansion module;
[0196] a first determining unit, configured to determine a current operating state of the expansion module according to the first operating parameter;
[0197] A restart unit is used to restart the expansion module through the central processor when the operating state is used to indicate that the data transmission performance of the expansion module meets the target performance condition.
[0198] Optionally, the expansion module includes a plurality of expansion cards, a first control module is further deployed on the mainboard of the target device, the first control module is connected to the central processing unit, a plurality of expansion cards are respectively connected to the target communication bus, and the first control module is respectively connected to each of the expansion cards.
[0199] The restart unit is used for:
[0200] Obtaining a target expansion card to be restarted currently in a restart sequence of the multiple expansion cards;
[0201] A target instruction is sent to the first control module through the central processing unit, wherein the target instruction is used to instruct the first control module to control the target expansion card to restart.
[0202] Optionally, the first control module includes an editable logic device, the editable logic device is connected to the central processing unit, and the editable logic device is also connected to the expansion card through a first signal line and a second signal line, the first signal line is used to control the power-on state of the expansion card, and the second signal line is used to control the reset state of the expansion card.
[0203] The restart unit is used for:
[0204] Sending a first instruction to the editable logic device through the central processor, wherein the first instruction is used to instruct the editable logic device to lower the level values on the first signal line and the second signal line;
[0205] After a first delay, sending a second instruction to the editable logic device through the central processor, wherein the second instruction is used to instruct the editable logic device to increase the level value of the first signal line;
[0206] After a second delay, a third instruction is sent to the editable logic device through the central processing unit, wherein the third instruction is used to instruct the editable logic device to increase the level value of the second signal line, and the target instruction includes the first instruction, the second instruction and the third instruction.
[0207] Optionally, the control unit is used to:
[0208] Sending a fourth instruction to the central processing unit, wherein the fourth instruction is used to instruct the central processing unit to close a signal input port to the target communication bus;
[0209] After a delay of a third time, a fifth instruction is sent to the central processing unit, wherein the fifth instruction is used to instruct the central processing unit to start a signal input port to the target communication bus.
[0210] Optionally, the first determining unit is configured to:
[0211] In the case where the expansion module includes a plurality of expansion cards, determining a current operating state of each expansion card according to the first operating parameter corresponding to each expansion card;
[0212] In the case that there is an expansion card in an abnormal operation state among the plurality of expansion cards, determining that the data transmission performance of the expansion module does not meet the target performance condition;
[0213] In a case where there is no expansion card in an abnormal operation state among the plurality of expansion cards, it is determined that the data transmission performance of the expansion module meets a target performance condition.
[0214] Optionally, the first determining unit is configured to:
[0215] matching the first operating parameter of the expansion card with the second operating parameter of the expansion card in the reference test round;
[0216] When the parameter difference value between the first operating parameter and the second operating parameter is greater than the target threshold, it is determined that the expansion card is currently in an abnormal operating state.
[0217] Optionally, the determining module includes:
[0218] A second determining unit, configured to determine a current operating state of each expansion card according to the bus operating parameter corresponding to each expansion card when the expansion module includes a plurality of expansion cards;
[0219] a third determining unit, configured to determine, when there is an expansion card in an abnormal operating state among the plurality of expansion cards, that the current operating performance of the expansion module does not meet the target performance requirement;
[0220] The fourth determining unit is used to determine whether the current operating performance of the expansion module meets the target performance requirement when there is no expansion card in an abnormal operating state among the plurality of expansion cards.
[0221] Optionally, the second determining unit is configured to:
[0222] Matching the bus operating parameters with reference operating parameters of the expansion card in a reference test round;
[0223] When the parameter difference value between the bus operation parameter and the reference operation parameter is greater than a set threshold, it is determined that the expansion card is in an abnormal operation state.
[0224] Optionally, a second control module is further disposed on the mainboard of the target device, the second control module is connected to the central processing unit, and the second control module is used to control the running state of the central processing unit.
[0225] The device also includes:
[0226] A first sending module, configured to send a sixth instruction to the second control module through the central processor after determining the current operating performance of the expansion module in the current test round according to the bus operating parameters, wherein the sixth instruction is used to instruct the second control module to perform a restart operation on the central processor;
[0227] A third acquisition module, configured to acquire a third operating parameter in the target communication bus when detecting that the central processor completes the restart operation, wherein the third operating parameter is used to indicate the data transmission status between the central processor and the expansion module;
[0228] The second determining module is used to determine the operating performance of the expansion module according to the third operating parameter.
[0229] Optionally, the second determining module includes:
[0230] A first matching unit, configured to match the third operating parameter with a first parameter threshold of the target communication bus;
[0231] The fifth determining unit is used to determine whether the operating performance of the expansion module meets the target performance requirement when the third operating parameter matches the first parameter threshold.
[0232] Optionally, a third control module is further disposed on the mainboard of the target device, the third control module is connected to the central processing unit, and the third control module is used to control the power supply state of the target device.
[0233] The device also includes:
[0234] a second sending module, configured to send a seventh instruction to the third control module through the central processor after determining the current operating performance of the expansion module in the current test round according to the bus operating parameters, wherein the seventh instruction is used to instruct the third control module to perform a device power-off operation on the target device and to perform a device power-on operation on the target device after a delay of a target time;
[0235] a fourth acquisition module, configured to acquire a fourth operating parameter in the target communication bus after determining that the target device is powered on again, wherein the fourth operating parameter is used to indicate a data transmission status between the central processing unit and the expansion module;
[0236] The third determining module is used to determine the operating performance of the expansion module according to the fourth operating parameter.
[0237] Optionally, the third determining module includes:
[0238] A second matching unit, configured to match the fourth operating parameter with a second parameter threshold of the target communication bus;
[0239] The sixth determining unit is used to determine whether the operating performance of the expansion module meets the target performance requirement when the fourth operating parameter matches the second parameter threshold.
[0240] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0241] An embodiment of the present application further provides a 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 method embodiments when running.
[0242] In an exemplary embodiment, the 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.
[0243] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0244] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0245] 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 in any one of the above method embodiments are implemented.
[0246] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0247] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.
[0248] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0249] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0250] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for testing the operating performance of an extension module, characterized in that: Applied to a basic input / output system, the basic input / output system, a central processing unit and an expansion module are deployed on a mainboard of a target device, the basic input / output system is connected to the central processing unit, the central processing unit is connected to the expansion module via a target communication bus, the central processing unit is used to control the bus operation state of the target communication bus, and the expansion module is used to expand the number of hardware devices connected to the central processing unit via the target communication bus. The method includes: In the process of repeatedly testing the operating performance of the extension module, obtaining a reference test result of the extension module obtained in a reference test round before the current test round; When the reference test result is used to indicate that the running performance of the extension module in the reference test round meets the target performance requirement, control the connection between the central processing unit and the extension module to be reset, wherein the reset of the training state of the link training state machine in the target communication bus is allowed to be triggered when the connection between the central processing unit and the extension module is reset, and the link training state machine is used to control the data transmission state of the target communication bus; When it is determined that the connection reset between the central processing unit and the expansion module is completed, obtaining a bus operation parameter of the target communication bus, wherein the bus operation parameter is used to indicate the data transmission status between the central processing unit and the expansion module; The current operating performance of the expansion module in the current test round is determined according to the bus operating parameters.
2. The method according to claim 1, characterized in that The controlling the connection between the central processor and the expansion module to be reset includes: Controlling the central processing unit to perform a reconnection operation on the target communication bus; In the case where it is determined that the central processor is reconnected to the target communication bus, detecting a first operating parameter in the target communication bus, wherein the first operating parameter is used to indicate a data transmission status between the central processor and the expansion module; determining a current operating state of the expansion module according to the first operating parameter; When the operating status indicates that the data transmission performance of the expansion module meets the target performance condition, the expansion module is controlled to restart by the central processing unit.
3. The method according to claim 2, characterized in that The expansion module includes a plurality of expansion cards. A first control module is also disposed on the mainboard of the target device. The first control module is connected to the central processor. The plurality of expansion cards are respectively connected to the target communication bus. The first control module is respectively connected to each of the expansion cards. The step of controlling the expansion module to restart by the central processor includes: Obtaining a target expansion card to be restarted currently in a restart sequence of the multiple expansion cards; A target instruction is sent to the first control module through the central processing unit, wherein the target instruction is used to instruct the first control module to control the target expansion card to restart.
4. The method according to claim 3, characterized in that The first control module includes an editable logic device, the editable logic device is connected to the central processing unit, and the editable logic device is also connected to the expansion card through a first signal line and a second signal line, the first signal line is used to control the power-on state of the expansion card, and the second signal line is used to control the reset state of the expansion card. The sending of the target instruction to the first control module by the central processor includes: Sending a first instruction to the editable logic device through the central processor, wherein the first instruction is used to instruct the editable logic device to lower the level values on the first signal line and the second signal line; After a first delay, sending a second instruction to the editable logic device through the central processor, wherein the second instruction is used to instruct the editable logic device to increase the level value of the first signal line; After a second delay, a third instruction is sent to the editable logic device through the central processing unit, wherein the third instruction is used to instruct the editable logic device to increase the level value of the second signal line, and the target instruction includes the first instruction, the second instruction and the third instruction.
5. The method according to claim 2, characterized in that: The controlling the central processor to perform a reconnection operation on the target communication bus includes: Sending a fourth instruction to the central processing unit, wherein the fourth instruction is used to instruct the central processing unit to close a signal input port to the target communication bus; After a delay of a third time, a fifth instruction is sent to the central processing unit, wherein the fifth instruction is used to instruct the central processing unit to start a signal input port to the target communication bus.
6. The method according to claim 2, characterized in that The determining the current operating state of the expansion module according to the first operating parameter includes: In the case where the expansion module includes a plurality of expansion cards, determining a current operating state of each expansion card according to the first operating parameter corresponding to each expansion card; In the case that there is an expansion card in an abnormal operation state among the plurality of expansion cards, determining that the data transmission performance of the expansion module does not meet the target performance condition; In a case where there is no expansion card in an abnormal operation state among the plurality of expansion cards, it is determined that the data transmission performance of the expansion module meets a target performance condition.
7. The method according to claim 6, characterized in that The determining the current operating state of each expansion card according to the first operating parameter corresponding to each expansion card includes: matching the first operating parameter of the expansion card with the second operating parameter of the expansion card in the reference test round; When the parameter difference value between the first operating parameter and the second operating parameter is greater than the target threshold, it is determined that the expansion card is currently in an abnormal operating state.
8. The method according to claim 1, characterized in that The determining, according to the bus operation parameters, the current operation performance of the expansion module in the current test round includes: In the case where the expansion module includes a plurality of expansion cards, determining the current operating state of each expansion card according to the bus operating parameter corresponding to each expansion card; In the case that there is an expansion card in an abnormal operation state among the plurality of expansion cards, determining that the current operation performance of the expansion module does not meet the target performance requirement; In the case that there is no expansion card in an abnormal operating state among the plurality of expansion cards, it is determined that the current operating performance of the expansion module meets the target performance requirement.
9. The method according to claim 8, characterized in that Determining the current operating state of each expansion card according to the bus operating parameters corresponding to each expansion card includes: Matching the bus operating parameters with reference operating parameters of the expansion card in a reference test round; When the parameter difference value between the bus operation parameter and the reference operation parameter is greater than a set threshold, it is determined that the expansion card is in an abnormal operation state.
10. The method according to claim 1, characterized in that A second control module is also disposed on the mainboard of the target device, the second control module is connected to the central processing unit, and the second control module is used to control the running state of the central processing unit. After determining the current operating performance of the expansion module in the current test round according to the bus operating parameters, the method further includes: Sending a sixth instruction to the second control module through the central processor, wherein the sixth instruction is used to instruct the second control module to perform a restart operation on the central processor; When it is detected that the central processor completes the restart operation, obtaining a third operating parameter in the target communication bus, wherein the third operating parameter is used to indicate the data transmission status between the central processor and the expansion module; The operating performance of the expansion module is determined according to the third operating parameter.
11. The method according to claim 10, characterized in that The determining the operating performance of the expansion module according to the third operating parameter includes: matching the third operating parameter with a first parameter threshold of the target communication bus; When the third operating parameter matches the first parameter threshold, it is determined that the operating performance of the expansion module meets the target performance requirement.
12. The method according to claim 1, characterized in that A third control module is also disposed on the mainboard of the target device, the third control module is connected to the central processing unit, and the third control module is used to control the power supply state of the target device. After determining the current operating performance of the expansion module in the current test round according to the bus operating parameters, the method further includes: Sending a seventh instruction to the third control module through the central processor, wherein the seventh instruction is used to instruct the third control module to perform a device power-off operation on the target device, and to perform a device power-on operation on the target device after a target delay; After determining that the target device is powered on again, acquiring a fourth operating parameter in the target communication bus, wherein the fourth operating parameter is used to indicate a data transmission status between the central processing unit and the expansion module; The operating performance of the expansion module is determined according to the fourth operating parameter.
13. The method according to claim 12, characterized in that The step of determining the operating performance of the expansion module according to the fourth operating parameter includes: matching the fourth operating parameter with a second parameter threshold of the target communication bus; When the fourth operating parameter matches the second parameter threshold, it is determined that the operating performance of the expansion module meets the target performance requirement.
14. A device for testing the operating performance of an extension module, characterized in that: Applied to a basic input / output system, the basic input / output system, a central processing unit and an expansion module are deployed on a mainboard of a target device, the basic input / output system is connected to the central processing unit, the central processing unit is connected to the expansion module via a target communication bus, the central processing unit is used to control the bus operation state of the target communication bus, the expansion module is used to expand the number of hardware devices connected to the central processing unit via the target communication bus, and the device comprises: A first acquisition module, used for acquiring a reference test result of the extension module obtained in a reference test round before a current test round during repeated testing of the running performance of the extension module; a control module, configured to control the connection reset between the central processing unit and the extension module when the reference test result indicates that the running performance of the extension module in the reference test round meets the target performance requirement, wherein the reset of the training state of the link training state machine in the target communication bus is allowed to be triggered when the connection between the central processing unit and the extension module is reset, and the link training state machine is used to control the data transmission state of the target communication bus; A second acquisition module is used to acquire bus operation parameters of the target communication bus when it is determined that the connection reset between the central processing unit and the expansion module is completed, wherein the bus operation parameters are used to indicate the data transmission status between the central processing unit and the expansion module; The first determining module is used to determine the current operating performance of the expansion module in the current test round according to the bus operating parameters.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 13 when executed by a processor.
16. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 13 are implemented.
17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 13 are implemented.
