A controller access method, apparatus, device, and medium
By selecting the forwarding thread and target thread in server management and using the request source flag to ensure orderly data transmission, the cross-reception problem in multi-threaded data access is solved, communication accuracy and stability are improved, and flexible management controller access is supported.
Patent Information
- Application Number
- CN202411748857.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-30
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-11-30
AI Technical Summary
In server management, data cross-reception or confusion can occur during multi-threaded data access, affecting the accuracy and stability of communication.
Select a forwarding thread and a target thread. Send request data with a request source flag added through the forwarding thread, and determine the target thread for sending the response data based on the request source flag in the response data, so as to ensure that the data is transmitted in an orderly manner.
It improves data transmission efficiency, avoids cross-reception of response data, enhances the accuracy and stability of communication, and supports flexible management controller access methods.
Smart Images

Figure CN119597700B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of servers, and in particular to a controller access method, device, equipment and medium. BACKGROUND
[0002] In server management, there are various management controllers, such as a baseboard management controller (BMC), a smart management controller (SMC), an integrated lights-out (iLO), etc., which can provide remote management, system monitoring, firmware update, virtual media service, etc. for servers to ensure the reliability, availability and manageability of servers. They usually support the intelligent platform management interface (IPMI) protocol and can be remotely accessed and managed through a network.
[0003] Currently, in order to realize server management, server management personnel usually need to directly or indirectly access management controllers. For example, directly accessing a BMC or indirectly accessing an SMC on a board through a BMC. However, when indirectly accessing another management controller through one management controller and using a high-pressure parallel access mode, although the use of multi-threading can improve access efficiency, the multiple threads of the management controller simultaneously wait to receive response data of another management controller, which easily leads to cross-receiving or confusion of data, affecting communication accuracy and stability.
[0004] In view of the above problems, how to solve the problem of cross-receiving or confusion of data in multi-threaded data access between different management controllers, affecting communication accuracy and stability, is a problem to be solved by technical personnel in the field. SUMMARY
[0005] The purpose of the present application is to provide a controller access method, device, equipment and medium to solve the problem of cross-receiving or confusion of data in multi-threaded data access between different management controllers, affecting communication accuracy and stability.
[0006] To solve the above technical problems, the present application provides a controller access method, comprising:
[0007] selecting at least one thread from multiple threads involved in multi-threaded access with the management controller as a forwarding thread, and selecting the remaining threads as target threads;
[0008] sending, by the forwarding thread, the request data added with a request source mark to the management controller, wherein the request source mark is used to represent a thread to which the request data belongs;
[0009] After the forwarding thread receives the response data returned by the management controller, determining the target thread corresponding to the response data according to the request source mark in the response data, and sending the response data to the target thread.
[0010] In one aspect, the request data is generated in the following manner:
[0011] determining the request data corresponding to the target thread and the request data corresponding to the forwarding thread;
[0012] controlling the target thread and the forwarding thread to add a data header to the corresponding request data, respectively;
[0013] wherein the data header contains the request source mark, a command prompt, a network function code and a slave device address to be accessed of the request data.
[0014] In another aspect, it further comprises:
[0015] determining all threads between the management controller;
[0016] setting a corresponding controller access command for each thread;
[0017] wherein the controller access command is used to start the corresponding thread when accessing the management controller.
[0018] In another aspect, it further comprises:
[0019] when there is an access demand for the management controller, determining a specified thread corresponding to the access demand;
[0020] determining the controller access command corresponding to the specified thread;
[0021] writing the controller access command into an electrically erasable programmable read-only memory;
[0022] starting the specified thread according to the controller access command and accessing the management controller.
[0023] In another aspect, starting the specified thread according to the controller access command and accessing the management controller comprises:
[0024] judging whether the controller access command pre-written in the electrically erasable programmable read-only memory exists;
[0025] If it is confirmed that the controller access command does not exist, the access process is ended, and alarm information indicating that the controller access command setting fails is outputted;
[0026] If it is confirmed that the controller access command exists, it is judged whether a channel of the preset bus is connected to the management controller;
[0027] If it is confirmed that the channel of the preset bus is not connected to the management controller, the access process is ended, and alarm information indicating that the management controller is not connected is outputted;
[0028] If it is confirmed that the channel of the preset bus is connected to the management controller, hardware attribute information of the preset bus is acquired; wherein the hardware attribute information at least includes preset bus information and slave device address;
[0029] According to the controller access command, the corresponding designated thread is started in all threads;
[0030] The hardware attribute information is set in the designated thread;
[0031] The designated thread is controlled to execute access to the management controller according to the hardware attribute information.
[0032] On the other hand, the request data added with the request source flag is sent to the management controller through the forwarding thread, comprising:
[0033] The processor occupancy rate and the memory occupancy rate of the forwarding thread are monitored;
[0034] It is judged whether the processor occupancy rate is greater than a first threshold value, and the memory occupancy rate is greater than a second threshold value;
[0035] If it is confirmed that the processor occupancy rate is greater than the first threshold value, and the memory occupancy rate is greater than the second threshold value, the request data transmission amount of the forwarding thread to the management controller is reduced.
[0036] On the other hand, the request data transmission amount of the forwarding thread to the management controller is reduced, comprising:
[0037] The access frequency of the request data corresponding to each target thread is reduced, or the forwarding of the request data of each target thread by the forwarding thread is suspended.
[0038] To solve the above technical problems, the application further provides a controller access device, comprising
[0039] A selection module is used for selecting at least one thread as a forwarding thread from a plurality of threads involved in the multi-thread access with the management controller, and the remaining threads are used as target threads;
[0040] The first sending module is configured to send, through the forwarding thread, request data added with a request source mark to the management controller, wherein the request source mark is used to represent a thread to which the corresponding request data belongs.
[0041] The second sending module is configured to, after the forwarding thread receives response data returned by the management controller, determine the target thread corresponding to the response data according to the request source mark in the response data, and send the response data to the corresponding target thread.
[0042] To solve the above technical problems, the application further provides a controller access device, comprising:
[0043] A memory is configured to store a computer program.
[0044] A processor is configured to execute the computer program to implement the steps of the above controller access method.
[0045] To solve the above technical problems, the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the above controller access method.
[0046] The controller access method provided by the application specifically selects at least one thread as a forwarding thread from a plurality of threads involved in multi-thread access with a management controller, and selects the remaining threads as target threads; sends, through the forwarding thread, request data added with a request source mark to the management controller; wherein the request source mark is used to represent a thread to which the corresponding request data belongs; after the forwarding thread receives response data returned by the management controller, determines the target thread corresponding to the response data according to the request source mark in the response data, and sends the response data to the corresponding target thread.
[0047] The application has the beneficial effects that when there is a multi-thread parallel access demand between different management controllers, a target thread and a forwarding thread are selected from a plurality of threads involved in multi-thread parallel access; request data added with a request source mark is sent, through the forwarding thread, to the management controller; since the request source mark is used to represent a thread to which the corresponding request data belongs, after the forwarding thread receives response data returned by the management controller, the target thread corresponding to the response data can be determined according to the request source mark in the response data, and the response data is sent to the corresponding target thread. In summary, by adding a request source mark to request data and using a forwarding thread to execute the forwarding of request data and response data, the ordered sending of request data is ensured, the data transmission efficiency is improved, the cross-receiving of response data is avoided, and the communication accuracy and stability are improved.
[0048] In another aspect, the application specifically determines the request data corresponding to the target thread and the request data corresponding to the forwarding thread; controls the target thread and the forwarding thread to add a data header to the corresponding request data; wherein the data header contains the request source mark, the command prompt, the network function code and the slave device address to be accessed of the request data, so as to realize the setting of the request source mark and ensure the accurate forwarding of the response data. By determining all threads between the management controller, the corresponding controller access command is set for all threads, so that the user can independently set the management controller access mode according to the demand, and the flexibility of access is improved. When there is an access demand for the management controller, the specified thread corresponding to the access demand is determined; the controller access command corresponding to the specified thread is determined; the controller access command is written into the electrically erasable programmable read-only memory; the specified thread is started and the management controller is accessed according to the controller access command, and flexible access to the management controller is realized.
[0049] In addition, the application also provides a controller access device, equipment and medium, and the effects are the same as above. BRIEF DESCRIPTION OF DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0051] Figure 1 A flow chart of a controller access method provided by the embodiments of the present application;
[0052] Figure 2 A schematic diagram of a controller access device provided by the embodiments of the present application;
[0053] Figure 3 A schematic diagram of a controller access device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0054] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0055] The core of the present application is to provide a controller access method, device, equipment and medium to solve the problem that the multi-thread data access between different management controllers currently exists data cross-reception or data confusion, which affects the communication accuracy and stability.
[0056] In order for those skilled in the art to better understand the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0057] Currently, in order to realize server management, the server management personnel usually needs to access the management controller directly or indirectly. For example, directly accessing the BMC, or indirectly accessing the SMC on the board through the BMC. Among them, when indirectly accessing the SMC on the board through the BMC, the main ways are external IPMI transparent transmission and internal polling data interaction. Among them, in the external IPMI transparent transmission, the administrator sends a command to the mainboard BMC, which is sent to the SMC for processing and returned through the intelligent platform management bus (IPMB); this way is processed in the IPMB bridge thread of the BMC; the internal polling is that the BMC actively sends an IPMI command to access and control the SMC in the real-time interaction thread; this way is realized by the IPMB real-time interaction thread of the BMC.
[0058] However, when high pressure parallel access is adopted, although the efficiency is improved by using multiple threads, multiple threads are waiting to receive the same management controller response data at the same time, which is easy to cause data cross-reception or confusion, affecting the communication accuracy and stability. Therefore, in order to solve the above problems, the present application provides a controller access method. It should be noted that the present application does not limit the specific types of each management controller involved in the controller access method; in the following embodiments, the present application is mainly illustrated by indirectly accessing the SMC through the BMC, which does not limit the application scenario of the present application, and is determined according to the specific implementation.
[0059] Figure 1 A flow chart of a controller access method provided by an embodiment of the present application. As shown in the figure, the method comprises: Figure 1
[0060] S10: Select at least one thread as a forwarding thread from the multiple threads involved in the multi-threaded access of the management controller, and the remaining threads as target threads.
[0061] It can be understood that the BMC and the SMC are connected through the IPMB, and the IPMB is an inter-integrated circuit (I2C) bus, which contains multiple transmission channels. The BMC can access the SMC through multiple threads, including the IPMB Bridge thread, the IPMB real-time interaction thread and other threads.
[0062] In the embodiment, when the BMC needs to access the SMC in multi-thread parallel mode, at least one thread among the threads involved is selected as a forwarding thread, and the remaining threads are target threads. The target threads and the forwarding thread each have corresponding request data, and each request data needs to be sent to the SMC to realize multi-thread access of the BMC to the SMC.
[0063] In the embodiment, the specific type and quantity of each thread involved in multi-thread access are not limited, and the specific type of the forwarding thread and the target thread is also not limited, and is determined according to the specific implementation.
[0064] S11: The request data with the request source flag added is sent to the management controller through the forwarding thread.
[0065] The request source flag is used to represent the thread to which the corresponding request data belongs.
[0066] It should be noted that, although the target thread and the forwarding thread each have corresponding request data, the roles of the target thread and the forwarding thread are not exactly the same. Specifically, the forwarding thread needs to send the request data to the SMC. Here, the request data includes the request data of the target thread and the request data of the forwarding thread. That is, in order to realize access of the BMC to the SMC, the target thread needs to send the request data to the forwarding thread, and the forwarding thread sends the request data of the forwarding thread and the request data of the target thread to the SMC.
[0067] It should be noted that the request data has the request source flag added, which is used to represent the thread to which the corresponding request data belongs. In the embodiment, the specific adding manner of the request source flag is not limited, and is determined according to the specific implementation.
[0068] S12: After the forwarding thread receives the response data returned by the management controller, the target thread corresponding to the response data is determined according to the request source flag in the response data, and the response data is sent to the corresponding target thread.
[0069] Further, after receiving each request data, the SMC generates corresponding response data according to each request data, and sends each response data to the forwarding thread. It should be noted that, since the response data corresponds to the request data, the request source flag in the request data is also included in the response data.
[0070] After the forwarding thread receives the response data returned by the SMC, the target thread corresponding to the response data is determined according to the request source flag in the response data, and the response data is sent to the corresponding target thread. It can be understood that the response data corresponding to the forwarding thread is also contained in all the response data, so the forwarding thread can also directly determine its own response data according to the request source flag. In this way, by selecting the forwarding thread in the multi-thread, both the multi-thread parallel running and the interference and data disorder among threads can be avoided, and the stability and accuracy of the IPMB are effectively ensured.
[0071] In the embodiment, when there is a multi-thread parallel access demand between different management controllers, a target thread and a forwarding thread are selected in the multiple threads involved in the multi-thread parallel access; the request data with the request source flag added is sent to the management controller by the forwarding thread; since the request source flag is used to represent the thread to which the corresponding request data belongs, after the forwarding thread receives the response data returned by the management controller, the target thread corresponding to the response data can be determined according to the request source flag in the response data, and the response data is sent to the corresponding target thread. In summary, by adding the request source flag to the request data and using the forwarding thread to perform the forwarding of the request data and the response data, the ordered sending of the request data is ensured, the data transmission efficiency is improved, the cross-receiving of the response data is avoided, and the communication accuracy and stability are improved.
[0072] On the basis of the above embodiment, in some embodiments, the generation manner of the request data comprises:
[0073] S111: determining the request data corresponding to the target thread and the request data corresponding to the forwarding thread;
[0074] S112: controlling the target thread and the forwarding thread to add a data header to the corresponding request data, respectively;
[0075] The data header contains the request source flag, the command prompt, the network function code and the slave device address to be accessed of the request data.
[0076] In order to add the corresponding request source flag in the request data, in the specific implementation, the request data corresponding to the target thread and the request data corresponding to the forwarding thread need to be determined first. The target thread and the forwarding thread are further controlled to add a data header (header) to the corresponding request data, respectively.
[0077] It should be noted that the data header contains the request source flag, the command prompt, the network function code and the slave device address to be accessed of the request data. The slave device address to be accessed is the address of the SMC. In this way, the setting of the request source flag of the request data is realized, and the accurate forwarding of the response data is ensured.
[0078] Currently, the starting mode of the BMC for accessing each thread of the SMC is to read the IPMB configuration file, so as to determine the specific thread corresponding to the channel where the SMC is located according to the IPMB configuration file. However, the IPMB configuration file is not convenient to modify, and therefore the access adaptation of the SMC is not flexible when the user has a selection of a specific thread. Therefore, in order to solve this problem, on the basis of the above embodiment, in some embodiments, the method further comprises:
[0079] S13: determining all threads between the BMC and the management controller;
[0080] S14: setting a corresponding controller access command for each thread, respectively;
[0081] The controller access command is used to start the corresponding thread when accessing the management controller.
[0082] Specifically, all available threads between the BMC and the SMC are first determined, and a corresponding controller access command is further set for each thread. It should be noted that the controller access command is used to start the corresponding thread when accessing the management controller.
[0083] For example, the controller access command 0x01 is set to start the corresponding IPMB Bridge thread when accessing the SMC, and the controller access command 0x02 is set to start the corresponding IPMB real-time interaction thread when accessing the SMC. On this basis, some controller access commands can also be set to start a plurality of threads when accessing the management controller. For example, the controller access command 0x03 is set to start the corresponding IPMB Bridge thread and IPMB real-time interaction thread when accessing the SMC. The specific mode and specific number of the controller access command in this embodiment are not limited, and are determined according to the specific implementation.
[0084] In this embodiment, by determining all threads between the BMC and the management controller, a corresponding controller access command is set for each thread, so that the user can independently set the SMC access mode according to the demand, and the flexibility of the access is improved.
[0085] In order to enable the user to realize flexible SMC access, on the basis of the above embodiment, in some embodiments, the method further comprises:
[0086] S15: when there is an access demand for the management controller, determining a specified thread corresponding to the access demand;
[0087] S16: determining a controller access command corresponding to the specified thread;
[0088] S17: writing the controller access command into an electrically erasable programmable read-only memory;
[0089] S18: starting the specified thread and accessing the management controller according to the controller access command.
[0090] Specifically, when there is a BMC access demand for the SMC, the specified thread corresponding to the access demand is determined. For example, the user's access demand is to access the SMC through external transparent transmission, and the corresponding specified thread should be the IPMB Bridge thread.
[0091] The controller access command corresponding to the specified thread is further determined. It is assumed that the controller access command 0x01 is used to start the corresponding IPMB Bridge thread when accessing the SMC, so when it is determined that the specified thread is the IPMB Bridge thread, it is determined that the corresponding controller access command is 0x01.
[0092] The controller access command is then written into an Electrically Erasable Programmable Read-Only Memory (EEPROM). The EEPROM is a semiconductor storage device that can be rewritten multiple times by electronic means and has the characteristic of not losing data after power failure. Therefore, writing the controller access command into the EEPROM can ensure data reliability and persistence, and at the same time, the controller access command can be frequently erased and updated, which has high storage efficiency.
[0093] Finally, the specified thread is started and the SMC is accessed according to the controller access command. For example, the IPMB Bridge thread is started according to the controller access command 0x01, and the SMC is accessed through the IPMB Bridge thread.
[0094] It should be noted that the specific process of starting the specified thread and accessing the management controller according to the controller access command in this embodiment is not limited, and is determined according to the specific implementation.
[0095] In this embodiment, when there is an access demand for the management controller, the specified thread corresponding to the access demand is determined; the controller access command corresponding to the specified thread is determined; the controller access command is written into the electrically erasable programmable read-only memory; and the specified thread is started and the management controller is accessed according to the controller access command, thereby realizing flexible access to the SMC.
[0096] On the basis of the above embodiment, in some embodiments, starting the specified thread and accessing the management controller according to the controller access command comprises:
[0097] S181: determining whether there is a pre-written controller access command in the electrically erasable programmable read-only memory; if not, proceeding to step S182; if yes, proceeding to step S183;
[0098] S182: end the access process, and output alarm information representing that the controller access command setting fails;
[0099] S183: determine whether there is a channel connecting the management controller in each channel of the preset bus; if not, go to step S184; if yes, go to step S185;
[0100] S184: end the access process, and output alarm information representing that the management controller is not connected;
[0101] S185: obtain hardware attribute information of the preset bus; wherein the hardware attribute information at least includes preset bus information and slave device address;
[0102] S186: start a corresponding specified thread in all threads according to the controller access command;
[0103] S187: set the hardware attribute information in the specified thread;
[0104] S188: control the specified thread to execute access to the management controller according to the hardware attribute information.
[0105] Specifically, when executing access to the SMC, first determine whether there is a pre-written controller access command in the EEPROM. If it is confirmed that there is no controller access command, it indicates that the controller access command is not set or fails to be set, and it is impossible to determine which thread is used to access the SMC; at this time, the access process is ended, and alarm information representing that the controller access command setting fails is outputted to prompt the user to timely troubleshoot the setting of the controller access command. If it is confirmed that there is a controller access command, determine whether there is a channel connecting the SMC in each channel of the preset bus. It should be noted that the preset bus is a bus used for communication between the BMC and the SMC, and contains multiple communication channels. In this embodiment, the specific type of the preset bus is not limited, for example, it can be an I2C bus, and can also be other buses, which is determined according to the specific implementation condition.
[0106] If it is confirmed that none of the channels of the preset bus is connected to the SMC, it indicates that the preset bus is not connected to the SMC at present, and it is impossible to execute access to the SMC; at this time, the access process is ended, and alarm information representing that the SMC is not connected is outputted to prompt the user to timely troubleshoot the connection of the SMC. If it is confirmed that the channel of the preset bus is connected to the SMC, obtain the hardware attribute information of the preset bus. It should be noted that the hardware attribute information at least includes preset bus information and slave device address, and the slave device address is the device address of the SMC.
[0107] Further according to the controller access command, the corresponding specified thread is started in all threads. For example, when the controller access command is 0x01, the corresponding IPMB Bridge thread is started. Then the hardware attribute information is set in the specified thread, and finally the specified thread is controlled to perform the access to the SMC according to the hardware attribute information.
[0108] In summary, since the thread can be selected according to the controller access command, it is not necessary to start all threads, thereby avoiding the waste of resources. Meanwhile, it is not necessary to start the thread by reading the hardware attribute information in the configuration file, and the flexibility is higher.
[0109] On the basis of the above embodiment, in some embodiments, the request data added with the request source flag is sent to the management controller by the forwarding thread, comprising:
[0110] S113: monitoring the processor occupancy and the memory occupancy of the forwarding thread;
[0111] S114: judging whether the processor occupancy is greater than a first threshold value and the memory occupancy is greater than a second threshold value; if yes, entering step S115;
[0112] S115: reducing the request data transmission amount of the forwarding thread to the management controller.
[0113] In the specific implementation, since the forwarding thread is responsible for uniformly sending all the request data to the SMC, the data transmission pressure of the forwarding thread is large, and therefore in order to ensure the data transmission stability of the forwarding thread, the processor occupancy and the memory occupancy of the forwarding thread are monitored in real time in the process of uniformly sending all the request data to the SMC by the forwarding thread, and it is judged whether the processor occupancy is greater than a first threshold value and the memory occupancy is greater than a second threshold value. It should be noted that the first threshold value and the second threshold value are not limited in this embodiment, and are determined according to the specific implementation.
[0114] If it is confirmed that the processor occupancy is not greater than the first threshold value and / or the memory occupancy is not greater than the second threshold value, it is considered that the data transmission pressure of the current forwarding thread is within the acceptable range, and the processor occupancy and the memory occupancy of the forwarding thread can be continuously monitored. If it is confirmed that the processor occupancy is greater than the first threshold value and the memory occupancy is greater than the second threshold value, it is considered that the data transmission pressure of the current forwarding thread is out of limit, and it is necessary to reduce the data transmission pressure to ensure the stability of the data transmission. Therefore, it is necessary to reduce the request data transmission amount of the forwarding thread to the SMC.
[0115] The specific manner of reducing the request data transmission amount of the forwarding thread to the SMC is not limited in the embodiment, for example, in some embodiments, the access frequency of the request data corresponding to each target thread can be specifically reduced, thereby reducing the total amount of the request data; the forwarding thread can also be suspended to forward the request data of each target thread, so that the forwarding thread only sends its own request data.
[0116] In addition, in a specific implementation, a forwarding period can also be set, when the forwarding period is not reached, the forwarding thread only sends its own request data to the SMC, and does not forward the request data of each target thread to the SMC; when the forwarding period is reached, the forwarding thread does not send its own request data to the SMC, and only forwards the request data of each target thread to the SMC, thereby effectively reducing the request data transmission amount of the forwarding thread to the SMC, and ensuring the stability of the forwarding thread.
[0117] In the above embodiment, the controller access method is described in detail, and the present application also provides an embodiment of a controller access device.
[0118] Figure 2 A schematic diagram of a controller access device provided in the embodiment of the present application is shown in FIG. 1. Figure 2 As shown in FIG. 1, the device includes
[0119] a selection module 10, configured to select at least one thread as a forwarding thread from a plurality of threads involved in the multi-thread access of the management controller, and select the remaining threads as target threads.
[0120] a first sending module 11, configured to send, by the forwarding thread, the request data added with a request source flag to the management controller; wherein the request source flag is used to represent the thread to which the corresponding request data belongs.
[0121] a second sending module 12, configured to, after the forwarding thread receives the response data returned by the management controller, determine the target thread corresponding to the response data according to the request source flag in the response data, and send the response data to the corresponding target thread.
[0122] In some embodiments, the generation manner of the request data specifically includes determining the request data corresponding to the target thread and the request data corresponding to the forwarding thread; and adding a data header to the corresponding request data by the target thread and the forwarding thread respectively; wherein the data header includes a request source flag of the request data, a command prompt, a network function code, and an address of a slave device to be accessed.
[0123] In some embodiments, the device further includes:
[0124] a first determination module, configured to determine all threads between the management controller;
[0125] The first setting module is configured to set a corresponding controller access command for each thread.
[0126] The controller access command is used to start the corresponding thread when accessing the management controller.
[0127] In some embodiments, the method further comprises:
[0128] The second determining module is configured to determine a specified thread corresponding to an access demand when the access demand exists.
[0129] The third determining module is configured to determine a controller access command corresponding to the specified thread.
[0130] The writing module is configured to write the controller access command into the EEPROM.
[0131] The starting access module is configured to start the specified thread and access the management controller according to the controller access command.
[0132] In some embodiments, the starting access module comprises:
[0133] The first judging module is configured to judge whether the controller access command is pre-written in the EEPROM. If it is confirmed that the controller access command does not exist, the access process is ended, and an alarm information representing the failure of setting the controller access command is outputted. If it is confirmed that the controller access command exists, the second judging module is triggered.
[0134] The second judging module is configured to judge whether a channel of the preset bus is connected to the management controller. If it is confirmed that none of the channels of the preset bus is connected to the management controller, the access process is ended, and an alarm information representing that the management controller is not connected is outputted. If it is confirmed that the channel of the preset bus is connected to the management controller, the acquiring module is triggered.
[0135] The acquiring module is configured to acquire the hardware attribute information of the preset bus. The hardware attribute information at least includes the preset bus information and the slave device address.
[0136] The starting submodule is configured to start the corresponding specified thread among all threads according to the controller access command.
[0137] The second setting module is configured to set the hardware attribute information in the specified thread.
[0138] The control access module is configured to control the specified thread to perform the access to the management controller according to the hardware attribute information.
[0139] In some embodiments, the first sending module 11 comprises:
[0140] monitoring a processor occupancy rate and a memory occupancy rate of the forwarding thread;
[0141] a third judging module, configured to judge whether the processor occupancy rate is greater than a first threshold value and the memory occupancy rate is greater than a second threshold value; if it is confirmed that the processor occupancy rate is greater than the first threshold value and the memory occupancy rate is greater than the second threshold value, triggering the adjusting module;
[0142] the adjusting module, configured to reduce a request data transmission amount of the forwarding thread to the management controller.
[0143] In some embodiments, the adjusting module is specifically configured to reduce an access frequency of the request data corresponding to each target thread, or to suspend the forwarding thread from forwarding the request data of each target thread.
[0144] Since the embodiments of the device part correspond to the embodiments of the method part, the embodiments of the device part are described in the description of the embodiments of the method part, and are not described here.
[0145] In addition, the present application also provides a computer program product, comprising computer programs / instructions, which are executed by a processor to realize the steps of the above-mentioned controller access method.
[0146] Figure 3 A schematic diagram of a controller access device provided by an embodiment of the present application is shown in FIG. 1. Figure 3 As shown in FIG. 1, the controller access device comprises:
[0147] a memory 20, configured to store computer programs;
[0148] a processor 21, configured to execute the computer programs to realize the steps of the controller access method mentioned in the above-mentioned embodiments.
[0149] The controller access device provided by the present embodiment can include but is not limited to a smart phone, a tablet computer, a notebook computer, or a desktop computer, etc.
[0150] The processor 21 can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one of a hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA). The processor 21 can also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a central processing unit (CPU). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 can be integrated with a graphics processing unit (GPU) that is responsible for rendering and drawing content required to be displayed by the display screen. In some embodiments, the processor 21 can further include an artificial intelligence (AI) processor for processing computing operations related to machine learning.
[0151] The memory 20 can include one or more computer-readable storage media that can be non-transitory. The memory 20 can further include a high-speed random access memory, and a nonvolatile memory such as one or more disk storage devices, flash storage devices. In the present embodiment, the memory 20 is at least used to store the following computer program 201, wherein the computer program is loaded and executed by the processor 21, and can implement the related steps of the controller access method disclosed in any of the preceding embodiments. In addition, the resources stored by the memory 20 can further include an operating system 202 and data 203, etc., and the storage mode can be temporary storage or permanent storage. The operating system 202 can include Windows, Unix, Linux, etc. The data 203 can include but is not limited to data related to the controller access method.
[0152] In some embodiments, the controller access device can further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
[0153] Those skilled in the art can understand that, Figure 3 The structure shown in the figure does not constitute a limitation on the controller access device, and can include more or fewer components than those shown in the figure.
[0154] Finally, the present application also provides a computer readable storage medium corresponding embodiment. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps described in the above method embodiments.
[0155] It can be understood that if the method in the above embodiments is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and executes all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0156] The controller access method, device, equipment and medium provided by the present application are described in detail above. The embodiments in the specification are described in a progressive manner, and each embodiment mainly describes the differences from other embodiments. The same or similar parts of each embodiment can be referred to. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part. It should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, the present application can be improved and modified, and these improvements and modifications also fall within the protection scope of the present application.
[0157] It should be further noted that in the present specification, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or equipment including the element.
Claims
1. A controller access method, characterized by, The application comprises: selecting at least one thread as a forwarding thread from a plurality of threads involved in multi-thread access with a management controller, and taking the rest of the threads as target threads; sending request data added with a request source mark to the management controller through the forwarding thread; wherein the request source mark is used to represent the thread to which the corresponding request data belongs; the request data at least includes the request data of the forwarding thread and the request data received by the forwarding thread sent by the target thread; after the forwarding thread receives the response data returned by the management controller, determining the target thread corresponding to the response data according to the request source mark in the response data, and sending the response data to the corresponding target thread; the generation mode of the request data comprises: determining the request data corresponding to the target thread and the request data corresponding to the forwarding thread; controlling the target thread and the forwarding thread to add a data header to the corresponding request data, respectively; wherein the data header contains the request source mark, command prompt, network function code and slave device address to be accessed of the request data; further comprising: determining all threads between the management controller; setting a corresponding controller access command for each thread, respectively; wherein the controller access command is used to start the corresponding thread when accessing the management controller; further comprising: when there is an access demand for the management controller, determining a specified thread corresponding to the access demand; determining the controller access command corresponding to the specified thread; writing the controller access command into an electrically erasable programmable read-only memory; starting the specified thread according to the controller access command and accessing the management controller; starting the specified thread according to the controller access command and accessing the management controller, comprising: judging whether the controller access command pre-written in the electrically erasable programmable read-only memory exists; if it is confirmed that the controller access command does not exist, ending the access process, and outputting alarm information representing the failure of setting the controller access command; if it is confirmed that the controller access command exists, judging whether a channel of each channel of a preset bus is connected to the management controller; if it is confirmed that each channel of the preset bus is not connected to the management controller, ending the access process, and outputting alarm information representing that the management controller is not connected; if it is confirmed that the channel of the preset bus is connected to the management controller, obtaining hardware attribute information of the preset bus; wherein the hardware attribute information at least includes preset bus information and slave device address; starting the corresponding specified thread in all threads according to the controller access command; setting the hardware attribute information in the specified thread; controlling the specified thread to execute the access to the management controller according to the hardware attribute information.
2. The controller access method of claim 1, wherein, sending request data added with a request source mark to the management controller through the forwarding thread, comprising: monitoring the processor occupancy rate and memory occupancy rate of the forwarding thread; determining whether the processor occupancy rate is greater than a first threshold value and the memory occupancy rate is greater than a second threshold value; if it is confirmed that the processor occupancy rate is greater than the first threshold value and the memory occupancy rate is greater than the second threshold value, reducing the request data transmission amount of the forwarding thread to the management controller.
3. The controller access method of claim 2, wherein, reducing the request data transmission amount of the forwarding thread to the management controller, comprising: reducing the access frequency of the request data corresponding to each target thread, or pausing the forwarding thread forwarding the request data of each target thread.
4. A controller access device, characterized by comprising: a selection module, configured to select at least one thread as a forwarding thread from a plurality of threads involved in multi-thread access with a management controller, and select the remaining threads as target threads; a first sending module, configured to send request data added with a request source flag to the management controller through the forwarding thread; wherein the request source flag is used to represent the thread to which the corresponding request data belongs; the request data at least includes request data of the forwarding thread and request data received by the forwarding thread and sent by the target thread; a second sending module, configured to, after the forwarding thread receives response data returned by the management controller, determine the target thread corresponding to the response data according to the request source flag in the response data, and send the response data to the corresponding target thread; the generation mode of the request data, comprising: determining the request data corresponding to the target thread and the request data corresponding to the forwarding thread; controlling the target thread and the forwarding thread to add a data header to the corresponding request data respectively; wherein the data header contains the request source flag, a command prompt, a network function code and a slave device address to be accessed of the request data; further comprising: a first determination module, configured to determine all threads between the management controller; a first setting module, configured to set a corresponding controller access command for each thread; wherein the controller access command is used to start the corresponding thread when accessing the management controller; further comprising: a second determination module, configured to, when there is an access demand for the management controller, determine a specified thread corresponding to the access demand; a third determination module, configured to determine the controller access command corresponding to the specified thread; a writing module, configured to write the controller access command into an electrically erasable programmable read-only memory; an access starting module, configured to start the specified thread and access the management controller according to the controller access command; the access starting module, comprising: a first judgment module, configured to determine whether the controller access command is pre-written in the electrically erasable programmable read-only memory; if it is confirmed that the controller access command does not exist, the access process is ended, and alarm information representing the controller access command setting failure is output; if it is confirmed that the controller access command exists, a second judgment module is triggered; The second judging module is configured to judge whether a channel of the preset bus is connected to the management controller; if it is confirmed that none of the channels of the preset bus is connected to the management controller, the access process is ended, and alarm information indicating that the management controller is not connected is output; if it is confirmed that a channel of the preset bus is connected to the management controller, the acquisition module is triggered; The acquisition module is configured to acquire hardware attribute information of the preset bus; wherein the hardware attribute information at least includes preset bus information and slave device address; The starting sub-module is configured to start the corresponding specified thread in all threads according to the controller access command; The second setting module is configured to set the hardware attribute information in the specified thread; The control access module is configured to control the specified thread to execute access to the management controller according to the hardware attribute information.
5. A controller access device, characterized by, The computer program is stored in the computer readable storage medium and is executed by the processor to implement the steps of the controller access method according to any one of claims 1 to 3. The computer program is stored in the computer readable storage medium and is executed by the processor to implement the steps of the controller access method according to any one of claims 1 to 3. 6. A computer-readable storage medium, characterized in that,
Citation Information
Patent Citations
Multithread processing method and device
CN101826003A