Server instruction processing method and device, computer equipment and storage medium

By using kernel buffers to process server instructions in the server component management controller, the problem of additional resource overhead when data interaction between server BMC and component BMC is solved, which improves processing efficiency and accuracy and simplifies the communication process.

CN119088729APending Publication Date: 2024-12-06INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410977429.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The server BMC and component BMC generate a large number of additional interactive commands when interacting with data, resulting in large overhead of hardware and software resources and slowing down the system operation.

Method used

By setting a kernel buffer in the component management controller, obtaining the target data of the read address and writing the commands to be executed in the write instruction to the buffer, using the command execution interface to execute commands, reducing interactive commands and simplifying the communication process.

Benefits of technology

It reduces the waiting time of the server master control component, saves hardware resources, terminates software resources, improves instruction processing efficiency and accuracy, quickly responds to server BMC instructions, and reduces system resource usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088729A_ABST
    Figure CN119088729A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of servers, and discloses a server instruction processing method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining a reading address from a reading instruction under the condition that the reading instruction is received from a server main control part; acquiring target data corresponding to the read address from the kernel buffer area, and returning the target data to the server main control component according to a communication signal sent by the server main control component; under the condition that the slave server main control component receives the write-in instruction, writing a command to be executed in the write-in instruction into a kernel buffer area; and determining a command execution interface corresponding to the to-be-executed command in the kernel buffer area, and executing the to-be-executed command by using the command execution interface. According to the method and the device, the problem of extra resource overhead caused by a lot of extra interaction commands generated when the server BMC and the component BMC perform data interaction is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of servers, and in particular to a method, device, computer equipment and storage medium for processing server instructions. Background Art

[0002] With the continuous development of server components and the continuous expansion of functions, a BMC (Baseboard Management Controller) is introduced on components such as the smart network card of the server as a management controller of the component itself, such as the smart network card.

[0003] The server board is also equipped with a BMC. Therefore, the server BMC and the component BMC together form a multi-BMC system. In order to manage components such as the intelligent network card, the server will use the server BMC to send instructions to the component BMC to achieve data interaction between the server BMC and the component BMC. Currently, the data interaction between the server BMC and the component BMC usually relies on application layer protocols such as the IPMI (Intelligent platform management interface) protocol and the MCTP (Management Component Transport Protocol) to complete the data interaction. However, when using the above protocols for data interaction, many additional interaction commands will be generated, resulting in a lot of additional hardware and software resource overhead, slowing down the operation of the entire system.

[0004] Therefore, the related art has the problem that when the server BMC and the component BMC perform data interaction, many additional interaction commands are generated, resulting in additional resource overhead. Summary of the invention

[0005] In view of this, the present invention provides a method, apparatus, computer device and storage medium for processing server instructions to solve the problem that when the server BMC and the component BMC perform data interaction, many additional interaction commands are generated, resulting in additional resource overhead.

[0006] In a first aspect, the present invention provides a method for processing a server instruction, the method being applied to a component management controller, the method comprising:

[0007] When receiving a read instruction from the server main control component, obtaining a read address from the read instruction;

[0008] Obtain target data corresponding to the read address from the kernel buffer, and return the target data to the server main control component according to the communication signal sent by the server main control component;

[0009] When receiving a write instruction from the server main control component, writing the to-be-executed command in the write instruction into the kernel buffer;

[0010] Determine the command execution interface corresponding to the command to be executed in the kernel buffer, and use the command execution interface to execute the command to be executed.

[0011] The method for processing server instructions provided in this embodiment obtains a read address from a read instruction, obtains target data corresponding to the read address from a kernel buffer, and returns the target data to the server main control component according to a communication signal sent by the server main control component, thereby reducing the waiting time of the server main control component and saving hardware resources. The to-be-executed commands in the write instruction are written into the kernel buffer, and the to-be-executed commands are executed using the command execution interface. The component management controller does not generate additional interactive commands, and the software resources are released. The communication process between the server main control component and the server main control component when processing server instructions is simplified, and the server instructions of the server BMC are quickly responded to. This solves the problem that when the server BMC and the component BMC interact with each other for data, many additional interactive commands are generated, resulting in additional resource overhead.

[0012] In an optional implementation, the kernel buffer includes a first sub-buffer and a second sub-buffer, and obtaining target data corresponding to the read address from the kernel buffer includes:

[0013] Determine a target address of the target data in the first sub-buffer according to the read address and a preset mapping relationship;

[0014] Reading data at a target address in the first sub-buffer and writing the target data into a register of the component management controller as target data;

[0015] Write the commands to be executed in the write instruction into the kernel buffer, including:

[0016] The to-be-executed command is written into the to-be-executed command queue of the second sub-buffer, wherein the command execution interface is used to execute the to-be-executed command read from the to-be-executed command queue.

[0017] In this embodiment, the kernel buffer is divided into a first sub-buffer and a second sub-buffer, and the target data is read from the first sub-buffer to improve the efficiency of acquiring the target data; the commands to be executed are written into the command queue to be executed of the second sub-buffer to facilitate reading and executing the commands to be executed, and different sub-buffers are used to process the server read instructions and write instructions respectively, thereby improving the efficiency and accuracy of instruction processing.

[0018] In an optional implementation, before obtaining the target data corresponding to the read address from the kernel buffer, the method further includes:

[0019] Get component status information;

[0020] According to a preset data assembly format, assemble the status information into write data, and determine the write length of the write data and the start address in the first sub-buffer;

[0021] Executing a write thread to transfer the write data to a target position of the first sub-buffer according to the write length and the start address, wherein the target position is determined according to the write length and the start address;

[0022] After waiting for a preset time interval, subsequent steps are executed starting from obtaining the status information of the component until a termination command is received.

[0023] In this embodiment, the status information of the component is written into the first sub-buffer, so that when the read instruction of the server is subsequently processed, the target data can be obtained from the kernel buffer according to the read address in the read instruction. In addition, the data in the first sub-buffer is updated every preset time interval, so that the obtained target data is more accurate.

[0024] In an optional implementation, obtaining target data corresponding to the read address from the kernel buffer and returning the target data to the server main control component according to a communication signal sent by the server main control component includes:

[0025] Determine the target address of the target data in the kernel buffer according to the read address and the preset mapping relationship, and read the data of the target address in the kernel buffer as the target data;

[0026] Writing the target data into the register of the component management controller and sending the data in the register to the server main control component;

[0027] Execute the target data return operation cyclically until receiving a termination signal sent by the server main control component, and then end, wherein the termination signal is included in the communication signal;

[0028] Target data return operations include:

[0029] Determine whether a confirmation signal sent by the server main control component is received, and if received, read the data of the current target address in the kernel buffer as the target data, wherein the initial value of the current target address is the next address of the target address, and the confirmation signal is included in the communication signal;

[0030] Write the target data corresponding to the current target address into the register of the component management controller, and send the data in the register to the server main control component;

[0031] Returns the next address of the current target address as the next target data of the current target address.

[0032] In this embodiment, the target data is sent to the server main control component according to the termination signal and confirmation signal in the communication signal, so that the component management controller can quickly respond to the server read instruction without master-slave switching, avoiding additional resource overhead. The target data return operation is executed cyclically, and each time the target data return operation is executed, the next address of the current target address is used as the current target address of the next target data return operation, and the address is incremented, so that this embodiment can still return the target data required by the server main control component to the server main control component in the scenario where the server main control component needs to read multiple bytes of data continuously.

[0033] In an optional implementation, determining a command execution interface corresponding to a command to be executed in a kernel buffer, and executing the command to be executed using the command execution interface includes:

[0034] Execute the read thread, read the pending commands from the pending command queue, and delete the pending commands in the pending command queue;

[0035] Determine the command type of the command to be executed;

[0036] Match the command type with the preset command type, and if the match succeeds, determine the command execution interface corresponding to the command to be executed, and use the command execution interface to execute the command to be executed;

[0037] If the match fails, the pending commands are ignored and subsequent steps are executed starting from the execution read thread until the pending command queue is empty.

[0038] In this embodiment, the command type of the command to be executed is matched with the preset command type. If the match is successful, the command to be executed is executed using the command execution interface. If the match fails, the command to be executed is ignored. By matching the command type of the command to be executed with the preset command type, it is determined whether the command to be executed is a command that can be processed by the component management controller, thereby avoiding system freezes and resource waste caused by using the component management controller to process commands that it cannot process.

[0039] In an optional implementation, assembling the state information into write data according to a preset data assembly format, and determining the write length of the write data and the start address in the first sub-buffer, includes:

[0040] Obtaining addresses where different data in the status information needs to be transferred to the first sub-buffer;

[0041] The first address in the filled-in address is used as the starting address;

[0042] Sort the data according to the filled-in addresses. If there is another address with empty data between two adjacent filled-in addresses, add a preset value to the other address to obtain the written data.

[0043] Determines the write length of the written data.

[0044] In an optional implementation, when a read instruction is received from a server main control component, obtaining a read address from the read instruction includes:

[0045] When a read operation interrupt signal from the server main control component is identified, a read instruction is obtained from the server main control component, and a read address in the read instruction is temporarily stored;

[0046] When receiving a write instruction from the server main control component, writing the to-be-executed command in the write instruction into the kernel buffer includes:

[0047] When a write operation interrupt signal from the server main control component is identified, the data sent by the server main control component is temporarily stored until an end interrupt signal is received, then the temporarily stored data is used as a write instruction, and the commands to be executed in the write instruction are written into the kernel buffer.

[0048] In this embodiment, the component management controller distinguishes between read instructions and write instructions based on the interrupt signal of the server main control component, and then adopts corresponding strategies to process server instructions, so that the component management controller responds to server instructions quickly and accurately, saving system resources.

[0049] In a second aspect, the present invention provides a server component data interaction system, the system comprising: a server component and a server main control component;

[0050] The server main control component is connected to the server component, and is used to send a read instruction and a write instruction to the server component, and obtain the target data corresponding to the read address in the read instruction from the server component;

[0051] The server component includes a component management controller, which is used to execute the server instruction processing method of the first aspect or any corresponding implementation method thereof.

[0052] In this embodiment, the component management controller obtains the read address from the read instruction, obtains the target data corresponding to the read address from the kernel buffer, and returns the target data to the server main control component according to the communication signal sent by the server main control component, thereby reducing the waiting time of the server main control component and saving hardware resources. The pending commands in the write instruction are written into the kernel buffer, and the pending commands are executed using the command execution interface. The component management controller does not generate additional interactive commands, and the software resources are released. The communication process between the component management controller and the server main control component when processing server instructions is simplified, and the server instructions of the server BMC are quickly responded. This solves the problem that many additional interactive commands are generated when the server BMC and the component BMC interact with each other, resulting in additional resource overhead.

[0053] In a third aspect, the present invention provides a server instruction processing device, the device comprising:

[0054] An acquisition module, configured to acquire a read address from a read instruction when receiving a read instruction from a server main control component;

[0055] The data return module is used to obtain the target data corresponding to the read address from the kernel buffer, and return the target data to the server main control component according to the communication signal sent by the server main control component;

[0056] A write module, used for writing the to-be-executed commands in the write instruction into the kernel buffer when receiving the write instruction from the server main control component;

[0057] The execution module is used to determine the command execution interface corresponding to the command to be executed in the kernel buffer, and execute the command to be executed using the command execution interface.

[0058] In a fourth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the server instruction processing method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0059] In a fifth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute a method for processing server instructions of the above-mentioned first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0061] Figure 1 is a flow chart of a method for processing a server instruction according to an embodiment of the present invention;

[0062] Figure 2 is a schematic diagram of a component management controller processing a server instruction according to an embodiment of the present invention;

[0063] Figure 3 is a schematic diagram of the structure of a kernel buffer according to an embodiment of the present invention;

[0064] Figure 4 is a schematic diagram of the functional hierarchy of a component management controller according to an embodiment of the present invention;

[0065] Figure 5 is a schematic diagram of a component management controller acquiring a read instruction and a write instruction according to an interrupt signal according to an embodiment of the present invention;

[0066] Figure 6 is a structural diagram of a server component data interaction system according to an embodiment of the present invention;

[0067] Figure 7 is a structural block diagram of a server instruction processing device according to an embodiment of the present invention;

[0068] Figure 8 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0070] With the continuous development of server components and the continuous expansion of functions, BMC is introduced as the management controller of server components, for example, BMC is introduced into smart NIC. Before the introduction of BMC as a management controller for smart NIC, server BMC relies on directly reading the sensors or chips on the smart NIC to complete the monitoring function when monitoring the smart NIC. After the introduction of BMC as the management controller of smart NIC, the server BMC and smart NIC BMC actually form a multi-BMC system. BMC itself has rich management functions, so there are many possibilities for data interaction between multiple BMCs. The current interaction between server BMC and smart NIC BMC includes: obtaining basic board sensor information, such as voltage, temperature, and power consumption; manufacturer-customized smart NIC status information; server control smart NIC commands, etc.

[0071] Taking the server component as an intelligent network card as an example, the BMC that introduces the intelligent network card is called the intelligent network card BMC. At present, the server BMC and the intelligent network card BMC usually rely on application layer protocols such as the IPMI protocol and the MCTP protocol to complete data interaction. In most cases, these application layer protocols are implemented based on the I2C (Inter-integrated circuit, a serial communication protocol) protocol on the physical layer. However, the application layer protocol has done a lot of encapsulation. Taking the IPMI protocol as an example, if you access the peer BMC through I2C, many additional interaction commands will be generated in the protocol. When a large number of businesses access the peer BMC, this will cause a lot of additional hardware resources and software resources. Once the number of these additionally consumed resources is large enough, it is enough to slow down the operation of the entire system. In addition, when the MCTP and IPMI protocols communicate based on the I2C protocol, the server BMC and the intelligent network card BMC need to perform I2C master-slave switching operations. However, the BMC of some servers may not have the master-slave switching feature when accessing I2C, which will cause great resistance during communication debugging.

[0072] Based on the above content, an embodiment of the present invention provides a method for processing server instructions. On the one hand, by modifying the I2C function of the component BMC, when the component BMC communicates with the server BMC, the component BMC can intelligently act as a slave device, similar to an EEProm (Electrically Erasable Programmable read only memory) device, to simplify the communication process between the two BMCs. On the other hand, an application layer and a kernel layer are set in the component BMC, and the actual operation logic of the user layer and the kernel layer are separated to complete the decoupling. The kernel layer does not need to pay attention to the processing of the application layer, and can directly return the data required by the server BMC according to the preset driver, which reduces the waiting time on the hardware and saves hardware resources. At the same time, compared with the communication interaction scenarios of the IPMI protocol and the MCTP protocol, since there is no need to involve the implementation of the corresponding protocol stack, software resources are also saved. In order to achieve the effect of simplifying the communication process between BMCs, quickly responding to the server instructions of the server BMC, and occupying system resources as little as possible.

[0073] According to an embodiment of the present invention, an embodiment of a method for processing server instructions is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a component management controller with data processing capabilities, such as: BMC, and, although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.

[0074] In this embodiment, a method for processing a server instruction is provided. Figure 1 is a flow chart of a method for processing a server instruction according to an embodiment of the present invention, the method being applied to a component management controller, such as Figure 1 As shown, the process includes the following steps:

[0075] Step S101, when a read instruction is received from a server main control component, a read address is obtained from the read instruction.

[0076] Specifically, the component management controller is, for example, a component BMC. The server main control component is, for example, a server BMC. This embodiment is described by taking the component management controller as a component BMC and the server main control component as a server BMC as an example. Figure 2 As shown, the component BMC includes a user layer and a kernel layer, and also includes a BMC hardware I2C device. The server BMC sends read and write commands to the component BMC through the BMC hardware I2C device. In this embodiment, a Kernel Buffer is set in the kernel layer, and the kernel buffer is an EEPROM device.

[0077] In this embodiment, the I2C interrupt service program of the component BMC is configured in the driver of the kernel layer. When the I2C command of the server reaches the component BMC, an interrupt signal will be generated on the component BMC. At this time, the card-side BMC can call the corresponding interrupt service program by the interrupt signal on the hardware. After entering the interrupt service program, according to the needs of the actual business, information interaction is generated with the kernel buffer in real time, and the information to be returned is generated in real time, and then directly written into the register corresponding to the BMC to complete the return of data.

[0078] The server BMC sends a read instruction to the component BMC. The component BMC determines that the read instruction has been received through the read instruction interrupt signal sent by the server BMC, calls the I2C interrupt service program corresponding to the read instruction, triggers the I2C read operation, obtains the read address from the read instruction, and temporarily stores the read address.

[0079] Step S102, obtaining target data corresponding to the read address from the kernel buffer, and returning the target data to the server main control component according to the communication signal sent by the server main control component.

[0080] Specifically, the Kernel Buffer (kernel buffer) set in the kernel layer of this embodiment is mainly used to store data generated in actual business, on the one hand, to store the information of the server component itself, and on the other hand, to store the command data sent by the server BMC.

[0081] The I2C interrupt service routine can read and write the Kernel Buffer according to the actual read and write content. After the kernel layer of the component BMC calls the interrupt service routine corresponding to the read instruction, the interrupt service triggers the I2C read operation and reads the target data corresponding to the read address in the kernel buffer.

[0082] It should be noted that, in this embodiment, the I2C function of the component BMC is modified so that when the component BMC communicates with the server BMC, the component BMC can only act as a slave device, similar to the EEPRom device, and the server BMC acts as the master device. Therefore, the component BMC needs to return the target data to the server BMC under the control of the communication signal of the server BMC. In addition, the way in which the component BMC is set as a slave device similar to the EEPRom device in this embodiment is different from the current way of simulating EEPRom through Linux Driver (Linux driver). The way of simulating EEPRom through Linux Driver requires an additional virtual I2C slave device, which will occupy additional system resources. The solution of this embodiment redevelops the I2C driver of the component BMC on the technical level, so that the I2C hardware of the BMC itself is applied, and at the same time a complete set of communication mechanisms of the Kernel and the user layer is established, so that the BMC can respond at the fastest speed after receiving the information from the I2C Master of the opposite end.

[0083] Step S103, when a write instruction is received from the server main control component, the to-be-executed command in the write instruction is written into the kernel buffer.

[0084] Specifically, the server BMC sends a write instruction to the component BMC. The component BMC determines that the write instruction has been received through the write instruction interrupt signal sent by the server BMC. The kernel layer of the component BMC will call the corresponding interrupt service program to trigger the I2C write operation. The kernel buffer can be read and written according to the actual read and write content. Therefore, the interrupt service program can be used to write the pending commands in the write instruction into the kernel buffer.

[0085] Step S104, determining the command execution interface corresponding to the command to be executed in the kernel buffer, and executing the command to be executed using the command execution interface.

[0086] Specifically, after the interrupt service program is used to write the pending command into the kernel buffer, a semaphore will be triggered to inform the application layer that a new pending command has been delivered to the component BMC and saved in the kernel buffer. After receiving this semaphore, the application layer will use the information exchange mechanism dedicated to the kernel buffer to take the pending command from the kernel buffer, determine the command execution interface corresponding to the pending command in the kernel buffer, and use the command execution interface to execute the pending command. The information exchange mechanism dedicated to the kernel buffer is, for example: setting a kernel buffer reading thread and a kernel buffer writing thread, and executing the kernel buffer reading thread when it is necessary to take the pending command from the kernel buffer.

[0087] In addition, the application layer can collect the status information of the component BMC in advance, for example: the component BMC obtains basic board sensor information, such as voltage, temperature, power consumption, and manufacturer-customized smart network card status information. And execute the write kernel buffer thread in the information exchange mechanism dedicated to the kernel buffer to write the status information to the kernel buffer, so that the subsequent kernel layer can directly call the above status information from the kernel buffer.

[0088] The method for processing server instructions provided in this embodiment obtains a read address from a read instruction, obtains target data corresponding to the read address from a kernel buffer, and returns the target data to the server main control component according to a communication signal sent by the server main control component, thereby reducing the waiting time of the server main control component and saving hardware resources. The to-be-executed commands in the write instruction are written into the kernel buffer, and the to-be-executed commands are executed using the command execution interface. The component management controller does not generate additional interactive commands, and the software resources are released. The communication process between the server main control component and the server main control component when processing server instructions is simplified, and the server instructions of the server BMC are quickly responded to. This solves the problem that when the server BMC and the component BMC interact with each other for data, many additional interactive commands are generated, resulting in additional resource overhead.

[0089] In some optional implementations, the kernel buffer includes a first sub-buffer and a second sub-buffer, and obtaining target data corresponding to the read address from the kernel buffer includes:

[0090] Determine a target address of the target data in the first sub-buffer according to the read address and a preset mapping relationship;

[0091] Reading data at a target address in the first sub-buffer and writing the target data into a register of the component management controller as target data;

[0092] Write the commands to be executed in the write instruction into the kernel buffer, including:

[0093] The to-be-executed command is written into the to-be-executed command queue of the second sub-buffer, wherein the command execution interface is used to execute the to-be-executed command read from the to-be-executed command queue.

[0094] Specifically, the first sub-buffer is, for example, a card-side information buffer, and the second sub-buffer is, for example, a to-be-executed command buffer. Figure 3 As shown, the kernel buffer includes a card-side information buffer and a pending command buffer. The card-side information buffer only needs to have a large enough storage space to store the status information of the component BMC transmitted by the user layer. The pending command buffer can be in the form of a queue to store pending commands.

[0095] There is a preset mapping relationship between the read address sent by the server BMC and the address of the data in the kernel buffer. The interrupt service program can determine the target address of the target data in the first sub-buffer based on the read address and the preset mapping relationship, read the data at the target address in the first sub-buffer, and write the target data into the register of the component management controller as the target data. After the data is written to the chip register in the software, the sending data function on the hardware can be triggered, and the component BMC sends the value in the register to the server BMC.

[0096] When writing the pending commands in the write instruction into the kernel buffer, the kernel layer of the component BMC will call the corresponding interrupt service program, trigger the I2C write operation, and write the pending commands in the write instruction into the pending command queue of the second sub-buffer. The subsequent application layer will read the pending commands from the pending command queue and hand them over to the command execution interface for execution.

[0097] In this embodiment, the kernel buffer is divided into a first sub-buffer and a second sub-buffer, and the target data is read from the first sub-buffer to improve the efficiency of acquiring the target data; the commands to be executed are written into the command queue to be executed of the second sub-buffer to facilitate reading and executing the commands to be executed, and different sub-buffers are used to process the server read instructions and write instructions respectively, thereby improving the efficiency and accuracy of instruction processing.

[0098] In some optional implementations, before obtaining the target data corresponding to the read address from the kernel buffer, the method further includes:

[0099] Get component status information;

[0100] According to a preset data assembly format, assemble the status information into write data, and determine the write length of the write data and the start address in the first sub-buffer;

[0101] Executing a write thread to transfer the write data to a target position of the first sub-buffer according to the write length and the start address, wherein the target position is determined according to the write length and the start address;

[0102] After waiting for a preset time interval, subsequent steps are executed starting from obtaining the status information of the component until a termination command is received.

[0103] Specifically, combined Figure 4 This embodiment is described. There is an information exchange mechanism dedicated to the Kernel Buffer between the application layer and the kernel buffer of the kernel layer, and the information exchange mechanism dedicated to the Kernel Buffer includes: a Kernel Buffer reading thread and a Kernel Buffer writing thread.

[0104] This embodiment is described by taking the component management controller as the component BMC and the server main control component as the server BMC as an example. The application layer will obtain the status information of the component BMC, for example: BMC's own data information, including basic board sensor information, such as voltage, temperature, power consumption, and manufacturer customized smart network card status information.

[0105] The application program of the application layer assembles the status information into write data according to a preset data assembly format, and determines the write length of the write data and the starting address in the first sub-buffer. The preset data assembly format is, for example: sorting the data according to the address in the first sub-buffer where the data in the status information needs to be written, and filling the blank addresses with blank characters if there are blank addresses between adjacent data.

[0106] The application program of the application layer executes the write thread, namely the write Kernel Buffer thread, calls the program of the write Kernel Buffer thread, and transfers the write data to the target position of the first sub-buffer according to the write length and the start address, and the target position is determined according to the write length and the start address.

[0107] The above process is executed cyclically, and a certain repetition interval can be set according to actual needs to ensure that the status information in the first sub-buffer is updated regularly. The preset time interval is, for example, 10 minutes, 30 minutes or other durations that meet actual needs. After waiting for the preset time interval, the steps "obtaining the status information of the component" to "executing the write thread, and transferring the write data to the target position of the first sub-buffer according to the write length and the starting address" are re-executed until a termination command is received, and the status information in the first sub-buffer is no longer updated.

[0108] In this embodiment, the status information of the component is written into the first sub-buffer, so that when the read instruction of the server is subsequently processed, the target data can be obtained from the kernel buffer according to the read address in the read instruction. In addition, the data in the first sub-buffer is updated every preset time interval, so that the obtained target data is more accurate.

[0109] In some optional implementations, obtaining target data corresponding to the read address from the kernel buffer and returning the target data to the server main control component according to a communication signal sent by the server main control component includes:

[0110] Determine the target address of the target data in the kernel buffer according to the read address and the preset mapping relationship, and read the data of the target address in the kernel buffer as the target data;

[0111] Writing the target data into the register of the component management controller and sending the data in the register to the server main control component;

[0112] Execute the target data return operation cyclically until receiving a termination signal sent by the server main control component, and then end, wherein the termination signal is included in the communication signal;

[0113] Target data return operations include:

[0114] Determine whether a confirmation signal sent by the server main control component is received, and if received, read the data of the current target address in the kernel buffer as the target data, wherein the initial value of the current target address is the next address of the target address, and the confirmation signal is included in the communication signal;

[0115] Write the target data corresponding to the current target address into the register of the component management controller, and send the data in the register to the server main control component;

[0116] Returns the next address of the current target address as the next target data of the current target address.

[0117] Specifically, this embodiment is described by taking the component management controller as the component BMC and the server master component as the server BMC as an example. It should be noted that when the component BMC of this embodiment communicates with the server BMC, the component BMC can only act as a slave device (slave) and the server BMC acts as a master device (master). Therefore, the component BMC needs to return the target data to the server BMC under the control of the communication signal of the server BMC.

[0118] There is a preset mapping relationship between the read address sent by the server BMC and the address of the data in the kernel buffer. The interrupt service program can determine the target address of the target data in the kernel buffer based on the read address and the preset mapping relationship, read the data at the target address in the kernel buffer as the target data, and write the target data into the register of the component BMC. After the data is written to the chip register in the software, the data sending function on the hardware can be triggered.

[0119] The server BMC first controls the I2C link with the component BMC and initiates an I2C communication. After that, the component BMC sends the value in the register to the server BMC. After the transmission is completed, the temporarily stored address is incremented by one bit to point to the next data in the core buffer, so that the server BMC can continue to read other data in the core buffer.

[0120] The component BMC executes the target data return operation in a loop until it receives a termination signal sent by the server main control component, and then ends. The termination signal is, for example, a NACK signal. If the master end does not want to receive data, it will send a NACK signal to the slave end, indicating that the communication is terminated.

[0121] Target data return operations include:

[0122] The component BMC determines whether it has received a confirmation signal sent by the server BMC. The confirmation signal is, for example, an ACK signal. After the master completes the first data read, if it needs to continue reading data, it will send an ACK signal to the slave end, indicating that it will continue to read the subsequent steps.

[0123] If the component BMC receives a confirmation signal, the data of the current target address in the kernel buffer is read as the target data. The initial value of the current target address is the next address of the above target address, corresponding to the above step "after the sending is completed, the temporarily stored address is incremented by one bit to point to the next data in the kernel buffer".

[0124] The target data corresponding to the current target address is written into the register of the component management controller, and the data in the register is sent to the server main control component. Then the address is incremented and the next address of the current target address is used as the current target address of the next target data return operation, so that the server BMC can continue to read other data in the core buffer.

[0125] In this embodiment, the target data is sent to the server main control component according to the termination signal and confirmation signal in the communication signal, so that the component management controller can quickly respond to the server read instruction without master-slave switching, avoiding additional resource overhead. The target data return operation is executed cyclically, and each time the target data return operation is executed, the next address of the current target address is used as the current target address of the next target data return operation, and the address is incremented, so that this embodiment can still return the target data required by the server main control component to the server main control component in the scenario where the server main control component needs to read multiple bytes of data continuously.

[0126] In some optional implementations, determining a command execution interface corresponding to a command to be executed in a kernel buffer, and executing the command to be executed using the command execution interface includes:

[0127] Execute the read thread, read the pending commands from the pending command queue, and delete the pending commands in the pending command queue;

[0128] Determine the command type of the command to be executed;

[0129] Match the command type with the preset command type, and if the match succeeds, determine the command execution interface corresponding to the command to be executed, and use the command execution interface to execute the command to be executed;

[0130] If the match fails, the pending commands are ignored and subsequent steps are executed starting from the execution read thread until the pending command queue is empty.

[0131] Specifically, this embodiment is described by taking the component management controller as the component BMC and the server main control component as the server BMC as an example. Figure 4 This embodiment is described. There is an information exchange mechanism dedicated to Kernel Buffer between the application layer and the kernel buffer of the kernel layer, and the information exchange mechanism dedicated to Kernel Buffer includes: a Kernel Buffer reading thread and a Kernel Buffer writing thread.

[0132] After the interrupt service program writes the pending commands into the kernel buffer, a semaphore is triggered to inform the application layer that a new pending command has been delivered to the component BMC and saved in the kernel buffer. After the application layer receives this semaphore, it executes the read kernel buffer thread to take the pending command from the kernel buffer.

[0133] The types of commands that can be executed by the server components and the component BMC are agreed upon in advance through documents and other channels. In this embodiment, the types of commands that can be executed by the server components and the component BMC are referred to as preset command types. The command type of the command to be executed is determined, and the command type is matched with the preset command type. If the match is successful, it means that the command to be executed is executable by the component BMC. The Kernel Buffer reading thread determines the command execution interface corresponding to the command to be executed, and the command execution interface is the BMC function interface. The Kernel Buffer reading thread calls the command execution interface through the command, and executes the command to be executed using the command execution interface.

[0134] If the match fails, it is determined that the command type of the pending command is outside the agreement, and the component BMC cannot execute the pending command. The pending command is ignored, and other pending commands in the pending command queue are continued to be processed. The above steps "Execute the read thread" to "If the match fails, ignore the pending command" are re-executed until the pending command queue is empty, indicating that all pending commands in the pending command queue have been processed.

[0135] In this embodiment, the command type of the command to be executed is matched with the preset command type. If the match is successful, the command to be executed is executed using the command execution interface. If the match fails, the command to be executed is ignored. By matching the command type of the command to be executed with the preset command type, it is determined whether the command to be executed is a command that can be processed by the component management controller, thereby avoiding system freezes and resource waste caused by using the component management controller to process commands that it cannot process.

[0136] In some optional implementations, assembling the state information into write data according to a preset data assembly format, and determining a write length of the write data and a start address in the first sub-buffer, comprises:

[0137] Obtaining addresses where different data in the status information needs to be transferred to the first sub-buffer;

[0138] The first address in the filled-in address is used as the starting address;

[0139] Sort the data according to the filled-in addresses. If there is another address with empty data between two adjacent filled-in addresses, add a preset value to the other address to obtain the written data.

[0140] Determines the write length of the written data.

[0141] Specifically, different data in the acquisition status information needs to be passed to the fill address in the first sub-buffer, for example: 0x32 is temperature data, the fill address of the temperature data that needs to be passed to the first sub-buffer is 0x00, and the temperature data size is one byte; 0x20 is voltage data, the fill address of the voltage data that needs to be passed to the first sub-buffer is 0x02, and the voltage data size is one byte; 0x26 is power consumption data, the fill address of the power consumption data that needs to be passed to the first sub-buffer is 0x03, and the power consumption data size is one byte.

[0142] The first address among the filled addresses is used as the starting address. For example, if the filled addresses include 0x00, 0x02, and 0x03, it can be determined that 0x00 is the first, so the first address 0x00 is used as the starting address.

[0143] According to the filled-in address, the data is sorted, for example: the filled-in address of power consumption data 0x26 is 0x03, the filled-in address of temperature data 0x32 is 0x00, and the filled-in address of voltage data 0x20 is 0x02. The sorted data is: 0x32, 0x20, 0x26. If there are other addresses with empty data between two adjacent filled-in addresses, the preset value is added to the other addresses to obtain the written data. For example: the preset value is 0xff, the filled-in address of 0x32 is 0x00, the filled-in address of 0x20 is 0x02, and there is another address 0x01 with empty data between the two, and 0xff is added to 0x01. Therefore, the written data is 0x32, 0xff, 0x20, and 0x26.

[0144] Determine the write length of the write data, for example: if the write data is 0x32, 0xff, 0x20, 0x26, the write length is 4 bytes.

[0145] In some optional implementations, when a read instruction is received from a server main control component, obtaining a read address from the read instruction includes:

[0146] When a read operation interrupt signal from the server main control component is identified, a read instruction is obtained from the server main control component, and a read address in the read instruction is temporarily stored;

[0147] When receiving a write instruction from the server main control component, writing the to-be-executed command in the write instruction into the kernel buffer includes:

[0148] When a write operation interrupt signal from the server main control component is identified, the data sent by the server main control component is temporarily stored until an end interrupt signal is received, then the temporarily stored data is used as a write instruction, and the commands to be executed in the write instruction are written into the kernel buffer.

[0149] Specifically, this embodiment is described by taking the component management controller as the component BMC and the server main control component as the server BMC as an example. Figure 5 This embodiment is described.

[0150] The server BMC sends an interrupt signal to the I2C hardware of the component BMC.

[0151] When the component BMC recognizes the interruption of the I2C read operation from the server BMC, that is, the read operation interrupt signal, the kernel layer triggers the I2C interrupt service program, executes the I2C read operation in the I2C interrupt service program, obtains the read instruction from the server main control component, and temporarily stores the read address in the read instruction. The read operation interrupt signal is for example: 000, 001, etc. Subsequently, the target data is read from the card-side information buffer of the kernel buffer according to the read address.

[0152] When the component BMC recognizes the interruption of the I2C write operation from the server BMC, that is, the write operation interruption signal, the kernel layer will trigger the I2C interrupt service program. The I2C interrupt service program begins to temporarily save the data received from the server BMC, that is, temporarily store the data sent by the server main control component until the end interrupt signal is received, and then stops. The end interrupt signal is, for example, the STOP interrupt signal. After the STOP interrupt signal is generated, it means that the current I2C communication is over. The I2C interrupt service program triggers the I2C write operation, uses the temporarily stored data as a write instruction, and writes the pending command in the write instruction into the kernel buffer. At the same time, a semaphore is triggered to inform the application layer that a new pending command has been delivered to the component BMC and saved in the kernel buffer. After the application layer receives this semaphore, it will use the information exchange mechanism dedicated to the Kernel Buffer to take the pending command from the kernel buffer, determine the command execution interface corresponding to the pending command in the kernel buffer, and use the command execution interface to execute the pending command.

[0153] In this embodiment, the component management controller distinguishes between read instructions and write instructions based on the interrupt signal of the server main control component, and then adopts corresponding strategies to process server instructions, so that the component management controller responds to server instructions quickly and accurately, saving system resources.

[0154] In some optional implementations, if the server component is a smart network card, when the current server is in a shutdown state, the main power supply of the server is turned off, but the power supply to the smart network card will be retained so that the smart network card can complete the corresponding business. In order for the smart network card to better complete the business, it is necessary to continuously adjust the management strategy of the power supply to the smart network card. Steps S101 to S102 of the present application and any corresponding implementation methods can obtain the status information of the smart network card from the smart network card BMC, and the management strategy of the power supply to the smart network card can be adjusted according to the status information, including steps A1 to A4, and steps A1 to A4 are executed by the server BMC.

[0155] Step A1, before the server is shut down, obtain the query instruction of the smart network card input by the user.

[0156] Specifically, in order to keep the server powered off while the smart network card continues to supply power, the user or administrator can set the configuration information corresponding to the smart network card according to actual business needs before shutting down the server. The user can view the status information of the smart network card through query instructions. The server BMC can obtain the query instructions of the smart network card entered by the user.

[0157] Step A2: The server BMC responds to the query instruction, sends a read instruction to the smart network card BMC, obtains the status information of the smart network card according to the returned target data, and outputs the status information to the user.

[0158] Specifically, after the server BMC obtains the query instruction of the smart network card input by the user, it can respond to the query instruction and send a read instruction to the smart network card BMC using the method described in the above embodiment. The smart network card BMC executes steps S101 to S102 or any corresponding implementation method, and returns the target data to the server BMC. The target data includes status information of the smart network card, and the status information includes the power supply parameters of the smart network card. The status information is output to the user. After receiving the status information, the user can clearly know the power supply status of each smart network card according to the status information, so that the power supply parameters in the configuration information can be modified according to actual business needs.

[0159] Step A3: the server BMC obtains the first parameter value after the user modifies the power supply parameter in the configuration information.

[0160] Specifically, after the server BMC outputs the status information of the smart network card to the user, the user modifies the power supply parameters in the status information according to the actual business needs, and then sends the modified first parameter value to the server BMC. The server BMC can obtain the first parameter value after the user modifies the power supply parameters in the smart network card status information, wherein the power supply parameters are used to indicate the power supply status of the smart network card after the server is shut down. For example: each smart network card has a corresponding power supply parameter. If the smart network card needs to continue to supply power after the server is shut down, the power supply parameter value of the smart network card that needs to continue to supply power can be changed to 1, and the power supply parameter of the smart network card that does not need to continue to supply power can be changed to 0.

[0161] In step A4, the server BMC generates a first modification instruction according to the first parameter value, and sends the first modification instruction to the server CPLD (Complex Programmable Logic Device), so that the server CPLD controls the power supply state of the smart network card accordingly according to the first modification instruction.

[0162] Specifically, after the server BMC obtains the first parameter value after the user modifies the power supply parameter in the status information, it can generate a first modification instruction based on the first parameter value and send the first modification instruction to the server CPLD. After the server CPLD receives the first modification instruction, it modifies the register information in the server to correspond to the first parameter value according to the first modification instruction. Therefore, when the server is shut down, the server CPLD can read the register information and determine the target smart network card according to the register information. After the server is shut down, the target smart network card continues to be powered on and the power supply to other smart network cards is disconnected.

[0163] In the embodiment of the present invention, before the server is shut down, the server BMC sends a read instruction to the component management controller, obtains the target data from the component management controller, outputs the status information in the target data to the user, obtains the first parameter value after the user modifies the power supply parameter in the smart network card configuration information according to the actual business needs, generates a first modification instruction according to the first parameter value, and sends the first modification instruction to the server CPLD, so that the server CPLD controls the power supply state of the smart network card accordingly according to the first modification instruction. In this way, the power supply parameters of the smart network card are modified according to different business needs, and the power supply state of the smart network card is controlled according to the power supply parameters. Compared with the management of the power supply of the smart network card of the traditional server, a more complete management strategy is provided.

[0164] In this embodiment, a server component data interaction system is provided, such as Figure 6 As shown, the system includes: a server component and a server main control component;

[0165] The server main control component is connected to the server component, and is used to send a read instruction and a write instruction to the server component, and obtain the target data corresponding to the read address in the read instruction from the server component;

[0166] The server component includes a component management controller, and the component management controller is used to execute the server instruction processing method of steps S101 to S104 or any corresponding implementation method thereof.

[0167] Specifically, Figure 6 As shown, the server main control component is connected to the server component, and is used to send read instructions and write instructions to the server component, and obtain the target data corresponding to the read address in the read instruction from the server component;

[0168] The server component includes a component management controller, which is used to execute the processing method of the server instruction of steps S101 to S104 or any corresponding implementation method thereof. For specific contents, please refer to the above embodiments and will not be repeated here.

[0169] In this embodiment, the component management controller obtains the read address from the read instruction, obtains the target data corresponding to the read address from the kernel buffer, and returns the target data to the server main control component according to the communication signal sent by the server main control component, thereby reducing the waiting time of the server main control component and saving hardware resources. The pending commands in the write instruction are written into the kernel buffer, and the pending commands are executed using the command execution interface. The component management controller does not generate additional interactive commands, and the software resources are released. The communication process between the component management controller and the server main control component when processing server instructions is simplified, and the server instructions of the server BMC are quickly responded. This solves the problem that many additional interactive commands are generated when the server BMC and the component BMC interact with each other, resulting in additional resource overhead.

[0170] In this embodiment, a processing device for server instructions is also provided, which is used to implement the above 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 for 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.

[0171] This embodiment provides a server instruction processing device, such as Figure 7 As shown, including:

[0172] The acquisition module 701 is used to acquire a read address from the read instruction when receiving the read instruction from the server main control component;

[0173] The data return module 702 is used to obtain the target data corresponding to the read address from the kernel buffer, and return the target data to the server main control component according to the communication signal sent by the server main control component;

[0174] A writing module 703 is used to write the to-be-executed command in the writing instruction into the kernel buffer when receiving the writing instruction from the server main control component;

[0175] The execution module 704 is used to determine the command execution interface corresponding to the command to be executed in the kernel buffer, and execute the command to be executed using the command execution interface.

[0176] In some optional implementations, the kernel buffer includes a first sub-buffer and a second sub-buffer, and the data return module 702 obtains target data corresponding to the read address from the kernel buffer, including:

[0177] Determine a target address of the target data in the first sub-buffer according to the read address and a preset mapping relationship;

[0178] Reading data at a target address in the first sub-buffer and writing the target data into a register of the component management controller as target data;

[0179] The writing module 703 writes the to-be-executed command in the writing instruction into the kernel buffer, including:

[0180] The to-be-executed command is written into the to-be-executed command queue of the second sub-buffer, wherein the command execution interface is used to execute the to-be-executed command read from the to-be-executed command queue.

[0181] In some optional implementations, before obtaining the target data corresponding to the read address from the kernel buffer, the apparatus is configured to:

[0182] Get component status information;

[0183] According to a preset data assembly format, assemble the status information into write data, and determine the write length of the write data and the start address in the first sub-buffer;

[0184] Executing a write thread to transfer the write data to a target position of the first sub-buffer according to the write length and the start address, wherein the target position is determined according to the write length and the start address;

[0185] After waiting for a preset time interval, subsequent steps are executed starting from obtaining the status information of the component until a termination command is received.

[0186] In some optional implementations, the data return module 702 obtains the target data corresponding to the read address from the kernel buffer, and returns the target data to the server main control component according to the communication signal sent by the server main control component, including:

[0187] Determine the target address of the target data in the kernel buffer according to the read address and the preset mapping relationship, and read the data of the target address in the kernel buffer as the target data;

[0188] Writing the target data into the register of the component management controller and sending the data in the register to the server main control component;

[0189] Execute the target data return operation cyclically until receiving a termination signal sent by the server main control component, and then end, wherein the termination signal is included in the communication signal;

[0190] Target data return operations include:

[0191] Determine whether a confirmation signal sent by the server main control component is received, and if received, read the data of the current target address in the kernel buffer as the target data, wherein the initial value of the current target address is the next address of the target address, and the confirmation signal is included in the communication signal;

[0192] Write the target data corresponding to the current target address into the register of the component management controller, and send the data in the register to the server main control component;

[0193] Returns the next address of the current target address as the next target data of the current target address.

[0194] In some optional implementations, the execution module 704 determines a command execution interface corresponding to the command to be executed in the kernel buffer, and executes the command to be executed using the command execution interface, including:

[0195] Execute the read thread, read the pending commands from the pending command queue, and delete the pending commands in the pending command queue;

[0196] Determine the command type of the command to be executed;

[0197] Match the command type with the preset command type, and if the match succeeds, determine the command execution interface corresponding to the command to be executed, and use the command execution interface to execute the command to be executed;

[0198] If the match fails, the pending commands are ignored and subsequent steps are executed starting from the execution read thread until the pending command queue is empty.

[0199] In some optional implementations, the device assembles the status information into write data according to a preset data assembly format, and determines the write length of the write data and the start address in the first sub-buffer, including:

[0200] Obtaining addresses where different data in the status information needs to be transferred to the first sub-buffer;

[0201] The first address in the filled-in address is used as the starting address;

[0202] Sort the data according to the filled-in addresses. If there is another address with empty data between two adjacent filled-in addresses, add a preset value to the other address to obtain the written data.

[0203] Determines the write length of the written data.

[0204] In some optional implementations, when the acquisition module 701 receives a read instruction from the server main control component, the acquisition module 701 acquires the read address from the read instruction, including:

[0205] When a read operation interrupt signal from the server main control component is identified, a read instruction is obtained from the server main control component, and a read address in the read instruction is temporarily stored;

[0206] When receiving a write instruction from the server main control component, the write module 703 writes the to-be-executed command in the write instruction into the kernel buffer, including:

[0207] When a write operation interrupt signal from the server main control component is identified, the data sent by the server main control component is temporarily stored until an end interrupt signal is received, then the temporarily stored data is used as a write instruction, and the commands to be executed in the write instruction are written into the kernel buffer.

[0208] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0209] The processing device for server instructions in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0210] The embodiment of the present invention also provides a computer device having the above Figure 7 The server instruction processing device is shown.

[0211] See also Figure 8 , Figure 8is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 8 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.

[0212] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0213] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0214] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer 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 combinations thereof.

[0215] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0216] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0217] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0218] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for processing a server instruction, characterized in that: The method is applied to a component management controller, and the method comprises: When receiving a read instruction from the server main control component, obtaining a read address from the read instruction; Acquire the target data corresponding to the read address from the kernel buffer, and return the target data to the server main control component according to the communication signal sent by the server main control component; When receiving a write instruction from the server main control component, writing the to-be-executed command in the write instruction into the kernel buffer; Determine a command execution interface corresponding to the command to be executed in the kernel buffer, and execute the command to be executed using the command execution interface.

2. The method according to claim 1, characterized in that The kernel buffer includes a first sub-buffer and a second sub-buffer, and obtaining target data corresponding to the read address from the kernel buffer includes: Determining a target address of the target data in the first sub-buffer according to the read address and a preset mapping relationship; Reading the data at the target address in the first sub-buffer and using the data as the target data, and writing the target data into the register of the component management controller; Writing the to-be-executed command in the write instruction into the kernel buffer includes: The to-be-executed command is written into a to-be-executed command queue of the second sub-buffer, wherein the command execution interface is used to execute the to-be-executed command read from the to-be-executed command queue.

3. The method according to claim 2, characterized in that Before obtaining the target data corresponding to the read address from the kernel buffer, the method further includes: Get component status information; According to a preset data assembly format, assembling the state information into write data, and determining a write length of the write data and a start address in the first sub-buffer; Executing a write thread to transfer the write data to a target position of the first sub-buffer according to the write length and the start address, wherein the target position is determined according to the write length and the start address; After waiting for a preset time interval, subsequent steps are executed starting from obtaining the status information of the component until a termination command is received.

4. The method according to claim 1, characterized in that: The step of obtaining target data corresponding to the read address from the kernel buffer and returning the target data to the server main control component according to a communication signal sent by the server main control component comprises: Determine the target address of the target data in the kernel buffer according to the read address and the preset mapping relationship, and read the data at the target address in the kernel buffer as the target data; Writing the target data into the register of the component management controller, and sending the data in the register to the server main control component; cyclically executing the target data return operation until receiving a termination signal sent by the server main control component, and then ending, wherein the termination signal is included in the communication signal; The target data returning operation includes: Determine whether a confirmation signal sent by the server main control component is received, and if received, read the data of the current target address in the kernel buffer as the target data, wherein the initial value of the current target address is the next address of the target address, and the confirmation signal is included in the communication signal; Writing the target data corresponding to the current target address into the register of the component management controller, and sending the data in the register to the server main control component; The next address of the current target address is used as the current target address of the next target data return operation.

5. The method according to claim 2, characterized in that: The step of determining a command execution interface corresponding to the command to be executed in the kernel buffer, and executing the command to be executed using the command execution interface, comprises: Executing a read thread, reading commands to be executed from the queue of commands to be executed, and deleting the commands to be executed in the queue of commands to be executed; Determine the command type of the command to be executed; Matching the command type with a preset command type, and if the match succeeds, determining a command execution interface corresponding to the command to be executed, and executing the command to be executed using the command execution interface; If the match fails, the to-be-executed command is ignored, and subsequent steps are executed starting from the execution read thread until the to-be-executed command queue is empty.

6. The method according to claim 3, characterized in that The step of assembling the state information into write data according to a preset data assembly format, and determining a write length of the write data and a start address in the first sub-buffer, comprises: Obtaining filling addresses of different data in the state information that need to be transferred to the first sub-buffer; The first address among the filled-in addresses is used as the starting address; The data are sorted according to the filled-in addresses, and if there is another address with empty data between two adjacent filled-in addresses, a preset value is added to the other address to obtain the written data; A write length of the write data is determined.

7. The method according to claim 1, characterized in that The method of acquiring a read address from the read instruction when receiving the read instruction from the server main control component comprises: When a read operation interrupt signal from the server main control component is identified, the read instruction is obtained from the server main control component, and the read address in the read instruction is temporarily stored; When receiving a write instruction from the server main control component, writing the to-be-executed command in the write instruction into the kernel buffer comprises: When a write operation interrupt signal from the server main control component is identified, the data sent by the server main control component is temporarily stored until an end interrupt signal is received, then the process stops, and the temporarily stored data is used as the write instruction, and the to-be-executed command in the write instruction is written into the kernel buffer.

8. A server instruction processing device, characterized in that: The device comprises: An acquisition module, configured to acquire a read address from a read instruction when receiving a read instruction from a server main control component; A data return module, used for obtaining the target data corresponding to the read address from the kernel buffer, and returning the target data to the server main control component according to the communication signal sent by the server main control component; A writing module, configured to write the to-be-executed command in the writing instruction into the kernel buffer when receiving the writing instruction from the server main control component; The execution module is used to determine the command execution interface corresponding to the to-be-executed command in the kernel buffer, and execute the to-be-executed command using the command execution interface.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the server instruction processing method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the server instruction processing method according to any one of claims 1 to 7.