Business processing method and related device
By adding a binding identifier to the array card firmware and driver, the preset accelerated hard drive is bound to the CPU core, which solves the performance degradation and ease of use problems in the hard drive array and realizes the maximum performance of the hard drive.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-09
- Publication Date
- 2026-03-27
AI Technical Summary
How to maximize the performance of hard drives in different application scenarios and improve the usability of the RAID card where the hard drives are located, especially in arrays composed of multiple hard drives, to avoid performance degradation and fluctuations.
By adding a binding identifier to the service commands of the preset accelerated hard disk through the RAID card firmware, and by using the RAID card driver to bind the hard disk device to the corresponding CPU core when a command with the binding identifier is received, the service command can be executed by the bound CPU core, thus avoiding the service command from going through a long CPU and memory link.
It maximizes hard drive performance in different application scenarios, improves the usability of the RAID card where the hard drive is located, and ensures that the performance of the preset accelerated hard drive is maximized.
Smart Images

Figure CN115657932B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of hardware development, and particularly relates to a service processing method and related equipment. BACKGROUND
[0002] With the rapid development and update of hard disk technology, the performance of a single hard disk is continuously improved, and the demand of customers for high-performance disks is also continuously increasing. However, with the improvement of the performance of a single hard disk, how to exert the maximum performance of each hard disk under the premise of considering data security becomes a new difficulty.
[0003] For example, an NVMe (Non-Volatile Memory express) SSD (Solid State Disk, Solid State Drive) can be directly used with a CPU (central processing unit) through a PCIe (Peripheral Component Interconnect express) adapter card; a SATA (Serial Advanced Technology Attachment) SSD can be used with the CPU through a built-in SATA and sSATA interface on a motherboard, and can form a soft RAID (Redundant Arrays of Independent Disks) array. NVMe, SAS (Serial Attached SCSI), SATA and the like can be used through a RAID card / SAS card supporting a Tri-mode function, and can form a hard RAID to realize a redundant data protection function. However, the NVMe SSD is used through the PCIe adapter card, and can exert the maximum performance of a single disk when the number of disks is small, but with the increase of the number of disks, the performance will decrease and fluctuate greatly, in addition, the built-in NVMe has no data protection function; the SATA SSD is used in a built-in manner, and its performance has a low bottleneck (2G), which does not meet the current mainstream demand, in addition, the soft RAID will occupy a large amount of CPU resources, and in the case that the CPU usage rate is high, the performance will decrease seriously; the RAID card / SAS card using the Tri-mode function will have reduced performance and great fluctuation when supporting multiple high-performance NVMe SSDs or SAS SSDs, and the performance of each disk is not evenly distributed.
[0004] Therefore, how to exert the maximum performance of the hard disk in different application scenarios and improve the ease of use of the array card where the hard disk is located is a problem to be solved by those skilled in the art. SUMMARY
[0005] The purpose of the present application is to provide a business processing method which can exert the maximum performance of the hard disk in different application scenarios and improve the ease of use of the array card where the hard disk is located; another purpose of the present application is to provide another business processing method, business processing device, electronic equipment and computer readable storage medium, which all have the above beneficial effects.
[0006] In a first aspect, the present application provides a business processing method applied to an array card firmware, comprising:
[0007] When a business command is obtained, the business command is parsed to obtain header information;
[0008] The hard disk device corresponding to the business command is determined according to the hard disk information in the header information;
[0009] If the hard disk device is a preset acceleration hard disk, a binding identifier is added in the business command, so that the array card driver binds the array card where the preset acceleration hard disk is located with the CPU core corresponding to the array card according to the binding identifier, and executes the business command by using the CPU core.
[0010] Optionally, before the step of parsing the business command to obtain the header information when the business command is obtained, the method further comprises:
[0011] When an array card loading instruction is received, the topology structure of the array card is obtained;
[0012] Configuration information about the topology structure is obtained;
[0013] The preset acceleration hard disk is determined according to the configuration information.
[0014] Optionally, after the step of determining the preset acceleration hard disk according to the configuration information, the method further comprises:
[0015] When the topology structure is an Expander configuration structure or a Switch configuration structure, the proportion of the number of hard disks of the preset acceleration hard disk to the number of uplink is determined;
[0016] When the proportion is lower than a preset threshold, the preset acceleration hard disk is uplink bound.
[0017] Optionally, the preset acceleration hard disk is an NVMe hard disk and / or an SAS hard disk;
[0018] When the preset acceleration hard disk is the NVMe hard disk, the hard disk information is a hard disk device number.
[0019] When the preset acceleration hard disk is the SAS hard disk, the hard disk information is a hard disk address.
[0020] In a second aspect, the application provides another service processing method, applied to an array card driver, comprising:
[0021] Obtaining a service command;
[0022] Determining whether the service command contains a binding identifier;
[0023] If yes, determining a hard disk device corresponding to the service command, and binding an array card where the hard disk device is located with a CPU core corresponding to the array card according to the binding identifier;
[0024] Executing the service command by using the CPU core.
[0025] Optionally, before the obtaining of the service command, the method further comprises:
[0026] Obtaining PCIe information corresponding to the array card;
[0027] Obtaining NUMA information from the PCIe information;
[0028] Obtaining CPU core information corresponding to the NUMA information in a CPU core list;
[0029] Determining the CPU core corresponding to the array card according to the CPU core information.
[0030] In a third aspect, the application further discloses a service processing device, applied to an array card firmware, comprising:
[0031] A parsing module, configured to parse a service command to obtain header information when the service command is obtained;
[0032] A determining module, configured to determine a hard disk device corresponding to the service command according to hard disk information in the header information;
[0033] A setting module, configured to add a binding identifier in the service command if the hard disk device is a preset acceleration hard disk, so that the array card driver binds an array card where the preset acceleration hard disk is located with a CPU core corresponding to the array card according to the binding identifier, and executes the service command by using the CPU core.
[0034] In a fourth aspect, the application further discloses another service processing device, applied to an array card driver, comprising:
[0035] an acquisition module, configured to acquire a service command;
[0036] a judgment module, configured to judge whether the service command contains a binding identifier;
[0037] a binding module, configured to, if the service command contains the binding identifier, determine a hard disk device corresponding to the service command, and bind an array card where the hard disk device is located and a CPU core corresponding to the array card according to the binding identifier;
[0038] an execution module, configured to execute the service command by using the CPU core.
[0039] In a fifth aspect, the present application also discloses an electronic device, comprising:
[0040] a memory, configured to store a computer program;
[0041] a processor, configured to execute the computer program to implement the steps of any of the service processing methods.
[0042] In a sixth aspect, the present application also discloses a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of any of the service processing methods.
[0043] By using the technical solution provided in the present application, the binding identifier is added to the service command corresponding to the hard disk that needs to be accelerated (i.e., the preset accelerated hard disk) in the array card firmware, and then when the array card driver obtains the service command with the binding identifier, the array card and the CPU core corresponding to the array card can be bound first, and then the CPU core is used to execute the service command, so that the service processing is implemented. Therefore, all the service commands for the preset accelerated hard disk in the array card are bound to the CPU core, which can effectively avoid the service command from going through a long link of CPU and memory, so as to ensure that the preset accelerated hard disk can perform at the maximum performance. It can be seen that this implementation can maximize the performance of the hard disk in different application scenarios, and improve the usability of the array card where the hard disk is located. BRIEF DESCRIPTION OF DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the prior art and the embodiments of the present application, the drawings used in the description of the prior art and the embodiments of the present application will be briefly introduced. Of course, the drawings related to the embodiments of the present application described below are only a part of the embodiments of the present application, and those skilled in the art can obtain other drawings according to the provided drawings without creative labor, and the obtained other drawings also belong to the protection scope of the present application.
[0045] Figure 1 A flowchart of a service processing method provided by the present application is shown in FIG. 1.
[0046] Figure 2 A flowchart of another service processing method provided by the present application is shown in FIG. 2.
[0047] Figure 3 A structural diagram of a service processing device provided by the present application is shown in FIG. 3.
[0048] Figure 4 A structural diagram of another service processing device provided by the present application is shown in FIG. 4.
[0049] Figure 5 A structural diagram of an electronic device provided by the present application is shown in FIG. 5. DETAILED DESCRIPTION
[0050] The core of the present application is to provide a service processing method, which can exert the maximum performance of a hard disk in different application scenarios and improve the ease of use of an array card where the hard disk is located. Another core of the present application is to provide another service processing method, a service processing device, an electronic device and a computer readable storage medium, all of which have the above beneficial effects.
[0051] In order to more clearly and completely describe the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be introduced below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0052] The embodiments of the present application provide a service processing method.
[0053] Please refer to Figure 1 , Figure 1 A flowchart of a service processing method provided by the present application is shown in FIG. 1. The service processing method can include the following S101 to S103.
[0054] First of all, it needs to be pointed out that the service processing method provided by the embodiments of the present application is applied to an array card firmware, that is, the implementation process of S101 and S103 is executed by the array card firmware.
[0055] S101: When a service command is obtained, the service command is parsed to obtain header information.
[0056] The step is designed to achieve acquisition and analysis of the business command, wherein the business command is a received business command that needs to be executed, so as to achieve corresponding business processing. When the business command is acquired, the command can be parsed to obtain the header information, i.e., Header information, in the business command, wherein the header information contains the hard disk information of the hard disk corresponding to the business command, for realizing hard disk identification, i.e., identifying the hard disk device corresponding to the business command. The acquisition method of the business command is not unique, which can be directly input by the user or automatically triggered in response to a preset condition, and the present application does not repeat the description.
[0057] S102: determining the hard disk device corresponding to the business command according to the hard disk information in the header information;
[0058] The step is designed to achieve the hard disk device corresponding to the business command based on the header information. After the header information is parsed from the business command, the hard disk information can be extracted, which is the relevant information of the hard disk device corresponding to the business command, including but not limited to device number, function number, bus number, address information, etc. Thus, the hardware device identification can be realized according to the hardware information, and the hard disk device corresponding to the business command is determined.
[0059] S103: if the hard disk device is a preset acceleration hard disk, a binding identifier is added in the business command, so that the array card driver binds the array card where the preset acceleration hard disk is located with the CPU core corresponding to the array card according to the binding identifier, and executes the business command by using the CPU core.
[0060] The step is designed to achieve the business command binding of the preset acceleration hard disk. After the hard disk device corresponding to the business command is identified and determined, it is first judged whether the hard disk device is a preset acceleration hard disk, wherein the preset acceleration hard disk refers to a hard disk device in the array card that needs to exert maximum performance. It can be understood that the array card is a hard disk array composed of multiple hard disk devices, which can contain various types of hard disk devices, such as high-performance hard disks and ordinary hard disks. Here, the high-performance hard disk in the array card can be set as the preset acceleration hard disk, i.e., the high-performance hard disk in the array card is pre-specified to be accelerated in performance to exert its maximum performance.
[0061] Further, when the hard disk device corresponding to the service command is the preset accelerated hard disk, a binding identifier can be added in the service command. Thus, when the service command is sent to the array card to determine execution, the array card driver will read the binding identifier in the service command in the process of reading the service command. At this time, the current array card (i.e., the array card where the hard disk device is located) can be bound to the corresponding CPU core according to the binding identifier, so as to execute the service command by using the CPU core, thereby realizing service processing. Obviously, for the hard disk device in the array card that needs to be accelerated in performance, the binding identifier can be added in the corresponding service command to bind the array card to the corresponding CPU core, so that the service command can be executed by the CPU core corresponding to the array card, avoiding unnecessary link transmission, thereby realizing hard disk acceleration and exerting the maximum performance of the hard disk.
[0062] Conversely, when the hard disk device corresponding to the service command is not the preset accelerated hard disk, it is indicated that the hard disk device does not need to be accelerated in performance. At this time, the execution of the service command can be performed according to the conventional processing flow. It can be understood that, in this case, the CPU core for executing the service command can be any one of the CPU cores in the main device.
[0063] It can be seen that the service processing method provided by the embodiment of the present application adds the binding identifier to the service command corresponding to the hard disk (i.e., the preset accelerated hard disk) that needs to be accelerated in the array card by the array card firmware. Then, when the array card driver obtains the service command provided with the binding identifier, the array card can be bound to the corresponding CPU core first, and then the bound CPU core is used to execute the service command, thereby realizing service processing. Thus, all the service commands for the preset accelerated hard disk in the array card are bound to the CPU core, which can effectively avoid the long link of the CPU and the memory of the service command, thereby ensuring that the preset accelerated hard disk can exert the maximum performance. It can be seen that this implementation manner can exert the maximum performance of the hard disk in different application scenarios, and improve the usability of the array card where the hard disk is located.
[0064] In an embodiment of the present application, before the service command is parsed to obtain the header information when the service command is obtained, the following steps can also be included:
[0065] When the array card loading instruction is received, the topology structure of the array card is obtained;
[0066] Configuration information about the topology structure is obtained;
[0067] The preset accelerated hard disk is determined according to the configuration information.
[0068] The embodiment of the present application provides a method for determining a preset accelerated hard disk. Specifically, after the main device is started, the array card is normally loaded, at this time, the loading instruction of the array card is collected; further, when the array card loading instruction is received, the topology structure of the array card can be collected, which includes the topology information of the disk device, backplane device and the like under the corresponding array card, thereby, the topology structure can be output to the visual interface, so that the user can select the hard disk device in the array card which needs to be accelerated according to the actual demand, and generate the corresponding configuration information, of course, the configuration information includes the related information of the hard disk device specified by the user which needs to be accelerated, for specifying the corresponding hard disk device as a preset accelerated hard disk; finally, after obtaining the configuration information of the topology structure input by the user, the preset accelerated hard disk can be determined according to the configuration information.
[0069] In an embodiment of the present application, after the preset accelerated hard disk is determined according to the configuration information, the following steps can be further included:
[0070] When the topology structure is an Expander configuration structure or a Switch configuration structure, the ratio of the number of hard disks of the preset accelerated hard disk to the number of uplink is determined;
[0071] When the ratio is lower than a preset threshold, the uplink binding of the preset accelerated hard disk is performed.
[0072] The business processing method provided by the embodiment of the present application can further implement the binding operation of the uplink. Specifically, after determining that the specified hard disk device acceleration function is started, the topology structure of the array card can be acquired first, it can be understood that the topology structure of the array card can include a direct connection configuration structure, an Expander configuration structure, a Switch configuration structure and the like, wherein for the direct connection configuration structure, the uplink binding processing is not needed; for the Expander configuration structure or the Switch configuration structure, whether to perform the uplink binding processing can be determined according to the actual situation.
[0073] Therefore, when the topology structure is determined to be an Expander configuration structure or a Switch configuration structure, the number of preset accelerated hard disks in the array card can be determined first, then the ratio between the number and the number of uplink is calculated to obtain the ratio of the number of hard disks of the preset accelerated hard disk to the number of uplink; further, if the ratio is lower than a preset threshold, the uplink binding operation of the preset accelerated hard disk is performed, that is, the uplink is bound to only transmit the business command of the preset accelerated hard disk, otherwise, if the ratio is not lower than the preset threshold, in order to ensure the overall performance of the link, the uplink binding operation is not needed. The specific value of the preset threshold does not affect the implementation of the technical solution, which can be set by the technician according to the actual situation, and the present application does not limit it.
[0074] In an embodiment of the present application, the preset acceleration hard disk can be an NVMe hard disk and / or an SAS hard disk.
[0075] When the preset acceleration hard disk is an NVMe hard disk, the hard disk information is a hard disk device number.
[0076] When the preset acceleration hard disk is an SAS hard disk, the hard disk information is a hard disk address.
[0077] The embodiment of the present application provides a specific type of preset acceleration hard disk, such as the above-mentioned NVMe hard disk and / or SAS hard disk, that is, the NVMe hard disk and / or SAS hard disk in the array card can be specified to perform performance acceleration.
[0078] It should be noted that when the preset acceleration hard disk is an NVMe hard disk, the hard disk information is a hard disk device number, that is, the identification of the hard disk device can be realized according to the hard disk device number of the head information in the service command to determine whether it belongs to the NVMe hard disk that needs to perform performance acceleration; when the preset acceleration hard disk is an SAS hard disk, the hard disk information is a hard disk address, that is, the identification of the hard disk device can be realized according to the hard disk address of the head information in the service command to determine whether it belongs to the SAS hard disk that needs to perform performance acceleration.
[0079] The embodiment of the present application provides another service processing method.
[0080] Please refer to Figure 2 , Figure 2 The flowchart of another service processing method provided by the present application is shown in the figure, and the service processing method can include the following S201 and S204.
[0081] First of all, it should be noted that the service processing method provided by the embodiment of the present application is applied to the array card driver, that is, the implementation process of S201 and S204 is executed by the array card driver.
[0082] S201: obtaining a service command;
[0083] The purpose of this step is to realize the acquisition of the service command, that is, the received service command that needs to be executed, so as to realize the corresponding service processing. It should be noted that the service command is a service command that has been processed (here, the processing refers to setting a binding identifier or not setting a binding identifier) by the array card firmware in advance, so as to determine whether to perform the CPU kernel binding operation according to whether the binding identifier is contained in the service command in the process of executing the service command.
[0084] S202: judging whether the service command contains a binding identifier;
[0085] The step is designed to realize the binding identification judgment, i.e. judging whether the binding identification is contained in the service command. After the service command is acquired, the field analysis can be performed on the service command to determine whether the binding identification is contained, which is set by the array card firmware. Further, if the binding identification is contained in the service command, it indicates that the performance acceleration processing of the hard disk device corresponding to the service command is needed, i.e. the CPU core binding operation is needed; if the binding identification is not contained in the service command, it indicates that the performance acceleration processing of the hard disk device corresponding to the service command is not needed, i.e. the CPU core binding operation is not needed.
[0086] S203: If yes, the hard disk device corresponding to the service command is determined, and the array card where the hard disk device is located is bound with the CPU core corresponding to the array card according to the binding identification;
[0087] The step is designed to realize the CPU core binding operation. When it is determined that the binding identification is contained in the service command, the hard disk device corresponding to the service command can be determined, at this time, it indicates that the hard disk device is the hard disk device in the array card which needs to be accelerated in performance, i.e. the preset acceleration hard disk in the previous embodiment; further, the array card where the hard disk device is located is determined, and the array card is bound with the CPU core corresponding to the array card, so as to realize the CPU core binding operation. Thus, for the hard disk device in the array card which needs to be accelerated in performance, the binding of the array card and the corresponding CPU core is realized through the binding identification set in the corresponding service command. Of course, if the binding identification is not contained in the service command, the CPU core binding operation is not needed.
[0088] S204: The service command is executed by the CPU core.
[0089] The step is designed to realize the execution of the service command. After the array card where the hard disk device corresponding to the service command is located is bound with the CPU core corresponding to the array card, the service command can be directly executed by the bound CPU core. Obviously, since the CPU core binding operation is performed, the service command can be directly executed by the CPU core corresponding to the array card, avoiding the service command being distributed to other CPU cores for processing, and further avoiding unnecessary link transmission, so as to realize the hard disk acceleration and exert the maximum performance of the hard disk.
[0090] Of course, for the service command which is not set with the binding identification, the execution of the service command can be performed according to the conventional processing flow. It can be understood that in this case, the CPU core for executing the service command can be any one of the CPU cores in the main device.
[0091] It can be seen that the business processing method provided by the embodiment of the application adds a binding identifier to the business command corresponding to the hard disk (i.e., the preset accelerated hard disk) that needs to be accelerated in the array card through the array card firmware, and then when the array card driver obtains the business command provided with the binding identifier, the array card can be bound to the CPU core corresponding thereto first, and then the CPU core bound is used to execute the business command, so as to realize business processing. Therefore, all the business commands for the preset accelerated hard disk in the array card are bound to the CPU core, which can effectively avoid the business command from going through a long link of CPU and memory, so as to ensure that the preset accelerated hard disk performance is maximally exerted. It can be seen that this implementation manner can exert the maximum performance of the hard disk in different application scenarios, and improve the ease of use of the array card where the hard disk is located.
[0092] In an embodiment of the application, before the business command is obtained, the method can further include the following steps:
[0093] Obtaining PCIe information corresponding to the array card;
[0094] Extracting NUMA information from the PCIe information;
[0095] Obtaining CPU core information corresponding to the NUMA information in the CPU core list;
[0096] Determining the CPU core corresponding to the array card according to the CPU core information.
[0097] The embodiment of the application provides an implementation method for determining the CPU core corresponding to the array card, so that when the CPU core binding operation needs to be performed, the array card can be bound to the CPU core corresponding thereto. Specifically, after the device is powered on and the system is started, the system kernel loads the array card driver, the array card driver obtains PCIe related information to which the array card is allocated in the system, and can extract NUMA (Non Uniform Memory Access, non-uniform memory access) information therefrom. Then, the NUMA information is compared with the CPU core table, and the CPU core information corresponding to the NUMA information is determined, and the determination of the CPU core is realized. The CPU core table includes the related information of all CPU cores in the current device main body.
[0098] Further, the CPU core information corresponding to the array card obtained by the query can be saved, so that when the CPU core binding operation needs to be performed, the CPU core binding operation can be directly performed according to the CPU core information.
[0099] The embodiment of the application provides another business processing method.
[0100] The service processing method provided by the embodiment of the application can include the following steps:
[0101] (1) After the device main body is normally started, the array card is normally loaded, and the topology structure information of the disk, backboard and the like mounted under the array card can be acquired at the same time. In addition, an option is set in the array card firmware, which is used to select whether to perform acceleration processing on the hard disk device. Here, the function can be enabled by default for NVMe SSD and SAS SSD.
[0102] (2) After the high-performance disk acceleration function is enabled, the array card firmware first judges the topology structure of the array card. If it is a direct connection configuration, no special processing is performed on the link. If it is an Expander configuration or a Switch configuration, it is further judged whether the high-performance disk is greater than half of the maximum number of uplink (preset threshold). If it is less than half, link binding is performed on the high-performance disk, that is, the uplink is bound to only transmit the service command of the high-performance disk. If it is greater than half, the link is not bound for processing considering the overall link performance.
[0103] (3) After normally entering the system, the array card driver is loaded by the system kernel. The array card driver will acquire the PCIe related information allocated to the array card in the system, extract the NUMA of the array card therefrom, and compare it with the CPU core information of the CPU list (CPU core table) in the system. The CPU core information of the array card is stored in the array card driver for backup.
[0104] (4) For NVMe SSD, each NVMe SSD uses the same bus number (Bus Number) as the array card, and is provided with an independent device number (Device Number) and function number (Function Number). Subsequently, the array card firmware adds a specific prefix (the prefix is the binding identifier described above) to the transaction layer data message in the header of the transaction layer data message (that is, the service command) pointing to the Device Number of the NVMe SSD. Therefore, when the array card driver transmits the message, once the specific prefix is read, an operation of binding the CPU core of the array card is added. In this case, all service commands for the NVMe SSD are bound to the CPU core, and do not pass through the link of the far CPU and memory, so as to ensure that the performance of the NVMe SSD is maximized and is not affected by the CPU and memory resources.
[0105] (5) For SAS SSD, the array card firmware can first collect the SAS addresses of the SAS SSDs that need to be accelerated, and then add a special prefix to the commands in the Header of all business commands that point to these SAS addresses. In this way, when the array card driver transmits the business command, it will add an operation of binding the CPU core of the array card where the array card is located as soon as it reads the special prefix (the prefix is the binding identifier). In this case, all business commands for SAS SSDs are bound to CPU cores and do not go through the link of a far CPU and memory, thereby ensuring that the performance of SAS SSDs is maximized and is not affected by CPU and memory resources.
[0106] It can be seen that the business processing method provided by the embodiments of the application adds a binding identifier to the business command corresponding to the hard disk (i.e., the preset accelerated hard disk) that needs to be accelerated in the array card through the array card firmware, and then, when the array card driver obtains the business command with the binding identifier, the array card and the CPU core corresponding to the array card are bound first, and then the CPU core is used to execute the business command, thereby realizing business processing. In this way, all business commands for the preset accelerated hard disk in the array card are bound to the CPU core, which can effectively avoid the business command going through the link of a far CPU and memory, thereby ensuring that the performance of the preset accelerated hard disk is maximized. It can be seen that this implementation can maximize the performance of the hard disk in different application scenarios and improve the ease of use of the array card where the hard disk is located.
[0107] The embodiments of the application provide a business processing device.
[0108] Please refer to Figure 3 , Figure 3 The business processing device provided by the application has the structure shown in the figure and can be applied to an array card firmware, and includes:
[0109] The parsing module 1 is configured to parse the business command when the business command is obtained, and obtain the header information.
[0110] The determining module 2 is configured to determine the hard disk device corresponding to the business command according to the hard disk information in the header information.
[0111] The setting module 3 is configured to add a binding identifier in the business command if the hard disk device is a preset accelerated hard disk, so that the array card driver binds the array card where the preset accelerated hard disk is located to the CPU core corresponding to the array card according to the binding identifier, and executes the business command by using the CPU core.
[0112] It can be seen that the business processing device provided in the embodiment of the present application adds a binding identifier to the business command corresponding to the hard disk (i.e., the preset accelerated hard disk) that needs to be accelerated in the array card through the array card firmware, and then when the array card driver obtains the business command provided with the binding identifier, the array card can be bound to the CPU core corresponding thereto first, and then the CPU core bound is used to execute the business command, so as to realize business processing. Therefore, all the business commands for the preset accelerated hard disk in the array card are bound to the CPU core, which can effectively avoid the business command from going through a long link of CPU and memory, so as to ensure that the preset accelerated hard disk performance is maximally exerted. It can be seen that this implementation manner can exert the maximum performance of the hard disk in different application scenarios, and improve the usability of the array card where the hard disk is located.
[0113] In an embodiment of the present application, the business processing device can further include a preset accelerated hard disk determination module configured to, before obtaining the header information when the business command is obtained, obtain the topology structure of the array card when the array card loading instruction is received; obtain the configuration information about the topology structure; and determine the preset accelerated hard disk according to the configuration information.
[0114] In an embodiment of the present application, the business processing device can further include an uplink binding module configured to, after the preset accelerated hard disk is determined according to the configuration information, when the topology structure is an Expander configuration structure or a Switch configuration structure, determine the proportion of the number of hard disks of the preset accelerated hard disk to the number of uplinks; and when the proportion is lower than a preset threshold, bind the uplink to the preset accelerated hard disk.
[0115] In an embodiment of the present application, the preset accelerated hard disk can be an NVMe hard disk and / or an SAS hard disk; when the preset accelerated hard disk is an NVMe hard disk, the hard disk information is a hard disk device number; and when the preset accelerated hard disk is an SAS hard disk, the hard disk information is a hard disk address.
[0116] For the device provided in the embodiment of the present application, please refer to the above method embodiment, which will not be described here in detail.
[0117] Another business processing device is provided in the embodiment of the present application.
[0118] Please refer to Figure 4 , Figure 4 The structure diagram of another business processing device provided in the present application, which can be applied to an array card driver, includes:
[0119] The obtaining module 4 is configured to obtain a business command.
[0120] The judging module 5 is configured to judge whether the business command contains a binding identifier.
[0121] binding module 6, configured to determine the hard disk device corresponding to the service command if the binding identifier is contained in the service command, and bind the array card where the hard disk device is located with the CPU core corresponding to the array card according to the binding identifier;
[0122] execution module 7, configured to execute the service command by using the CPU core.
[0123] It can be seen that the service processing apparatus provided by the embodiment of the present application adds the binding identifier to the service command corresponding to the hard disk that needs to be accelerated (i.e., the preset accelerated hard disk) in the array card firmware, and then when the array card driver obtains the service command provided with the binding identifier, the array card can be bound with the CPU core corresponding thereto first, and then the CPU core is used to execute the service command, so as to realize the service processing. Therefore, all the service commands for the preset accelerated hard disk in the array card are bound with the CPU core, which can effectively avoid the service command from going through a long link of CPU and memory, so as to ensure that the preset accelerated hard disk performance is maximally exerted. It can be seen that this implementation manner can exert the maximum performance of the hard disk in different application scenarios, and improve the usability of the array card where the hard disk is located.
[0124] In an embodiment of the present application, the service processing apparatus can further include a CPU core determination module, configured to obtain the PCIe information corresponding to the array card before the service command is obtained; extract the NUMA information from the PCIe information; query the CPU core information corresponding to the NUMA information in the CPU core list; and determine the CPU core corresponding to the array card according to the CPU core information.
[0125] For the apparatus provided by the embodiment of the present application, please refer to the above method embodiment, which will not be repeated here.
[0126] An electronic device is provided in the embodiment of the present application.
[0127] For the electronic device provided by the embodiment of the present application, please refer to the above method embodiment, which will not be repeated here. Figure 5 Figure 5 The electronic device provided by the embodiment of the present application can include:
[0128] The memory is configured to store the computer program.
[0129] The processor is configured to execute the computer program to realize the steps of any one of the above service processing methods.
[0130] For the electronic device provided by the embodiment of the present application, please refer to the above method embodiment, which will not be repeated here. Figure 5 As shown in FIG. 1, which is a schematic diagram of a structural diagram of an electronic device, the electronic device can include a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 can communicate with each other through the communication bus 13.
[0131] In the embodiments of the present application, the processor 10 can be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, etc.
[0132] The processor 10 can invoke a program stored in the memory 11. Specifically, the processor 10 can perform the operations in the embodiments of the business processing method.
[0133] The memory 11 can store one or more programs. The program can include program code, which includes computer operation instructions. In the embodiments of the present application, the memory 11 stores at least a program for implementing the following functions:
[0134] When the business command is acquired, the business command is parsed to obtain header information;
[0135] The hard disk device corresponding to the business command is determined according to the hard disk information in the header information;
[0136] If the hard disk device is a preset acceleration hard disk, a binding identifier is added in the business command, so that the array card driver binds the array card where the preset acceleration hard disk is located to the CPU core corresponding to the array card according to the binding identifier, and executes the business command by using the CPU core;
[0137] Alternatively,
[0138] The business command is acquired;
[0139] It is judged whether the business command contains a binding identifier;
[0140] If yes, the hard disk device corresponding to the business command is determined, and the array card where the hard disk device is located is bound to the CPU core corresponding to the array card according to the binding identifier;
[0141] The business command is executed by using the CPU core.
[0142] In a possible implementation, the memory 11 can include a program storage area and a data storage area. The program storage area can store an operating system and at least one application required by a function, etc. The data storage area can store data created in the use process.
[0143] In addition, the memory 11 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device or other volatile solid-state memory device.
[0144] The communication interface 12 can be an interface of a communication module, used for connecting with other devices or systems.
[0145] Of course, it needs to be explained that, Figure 5 The structure shown does not constitute a limitation on the electronic device in the embodiments of the present application, and the electronic device can include more or fewer components than Figure 5 shown, or combine certain components.
[0146] The embodiments of the present application provide a computer readable storage medium.
[0147] The computer readable storage medium provided by the embodiments of the present application stores a computer program, and the computer program is executed by a processor to implement the steps of any one of the above business processing methods.
[0148] The computer readable storage medium can include: 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.
[0149] For the computer readable storage medium provided by the embodiments of the present application, refer to the above method embodiments, and the present application will not be repeated here.
[0150] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same and similar parts of each embodiment can be referred to each other. For the device disclosed by the embodiments, since it corresponds to the method disclosed by the embodiments, the description is relatively simple, and the related parts can be referred to the method part.
[0151] The skilled person can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in the present text can be realized in electronic hardware, computer software or combination of the two. In order to clearly show the interchangeability of hardware and software, the composition and steps of each example have been described in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0152] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, hard disk can be used for tangibly embodying the software module.
[0153] The technical solutions provided by the present application are described above. The principles and implementation manners of the present application are described by using specific examples in the present document. The above description of the embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that, for those skilled in the art, without departing from the principles of the present application, some improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the present application.
Claims
1. A business processing method, characterized in that, Applications to RAID card firmware include: When a business command is received, the business command is parsed to obtain header information; The hard disk device corresponding to the service command is determined based on the hard disk information in the header information; If the hard disk device is a preset accelerated hard disk, a binding identifier is added to the service command so that when the RAID card driver transmits the service command, it binds the RAID card where the preset accelerated hard disk is located to the CPU core corresponding to the RAID card according to the binding identifier, and uses the CPU core to execute the service command. The RAID card driver, after being loaded by the kernel, obtains the PCIe information allocated to the RAID card, extracts the NUMA of the RAID card from the PCIe information, compares it with the CPU kernel information in the CPU kernel table, and stores the CPU kernel information of the RAID card in the RAID card driver for later use. The RAID card includes various types of hard disk devices, and the preset acceleration hard disk is the hard disk device in the RAID card that is pre-specified to maximize performance.
2. The business processing method according to claim 1, characterized in that, Before parsing the business command and obtaining the header information upon receiving a business command, the process further includes: When a RAID card loading command is received, the topology of the RAID card is obtained; Obtain configuration information about the topology; The preset acceleration hard drive is determined based on the configuration information.
3. The business processing method according to claim 2, characterized in that, After determining the preset acceleration hard drive based on the configuration information, the process further includes: When the topology is an Expander configuration or a Switch configuration, determine the ratio of the number of disks in the preset acceleration disk to the number of uplinks; When the percentage is lower than a preset threshold, the preset accelerated hard drive is bound to the uplink.
4. The business processing method according to claim 1, characterized in that, The preset acceleration hard drive is an NVMe hard drive and / or a SAS hard drive; When the preset acceleration hard drive is the NVMe hard drive, the hard drive information is the hard drive device number; When the preset acceleration hard disk is the SAS hard disk, the hard disk information is the hard disk address.
5. A business processing method, characterized in that, Applied to RAID card drivers, including: Obtain the PCIe information corresponding to the array card; NUMA information is extracted from the PCIe information; The CPU kernel information corresponding to the NUMA information is obtained by querying the CPU kernel list. The CPU core corresponding to the RAID card is determined based on the CPU core information. Get business commands; Determine whether the service command contains a binding identifier; the binding identifier is the array card firmware. When the service command is obtained, the service command is parsed to obtain header information; the hard disk device corresponding to the service command is determined according to the hard disk information in the header information; if the hard disk device is a preset acceleration hard disk, it is added to the service command. If so, then determine the hard disk device corresponding to the service command, and bind the array card where the hard disk device is located to the CPU core corresponding to the array card according to the binding identifier; The CPU core is used to execute the business commands.
6. A business processing apparatus, characterized in that, Applications to RAID card firmware include: The parsing module is used to parse the business command when it is received to obtain header information; The determination module is used to determine the hard disk device corresponding to the service command based on the hard disk information in the header information; The configuration module is used to add a binding identifier to the service command if the hard disk device is a preset accelerated hard disk, so that the RAID card driver binds the RAID card where the preset accelerated hard disk is located to the CPU core corresponding to the RAID card according to the binding identifier, and uses the CPU core to execute the service command; wherein, after the RAID card driver is loaded by the kernel, it obtains the PCIe information allocated by the RAID card, extracts the NUMA of the RAID card from the PCIe information, compares it with the CPU core information in the CPU core table, and stores the CPU core information where the RAID card is located in the RAID card driver for later use; the RAID card includes various types of hard disk devices, and the preset accelerated hard disk is the hard disk device in the RAID card that is pre-specified to maximize performance.
7. A business processing device, characterized in that, Applied to RAID card drivers, including: The acquisition module is used to obtain business commands; The judgment module is used to determine whether the service command contains a binding identifier; the binding identifier is the array card firmware. When the service command is obtained, the service command is parsed to obtain header information; the hard disk device corresponding to the service command is determined according to the hard disk information in the header information; if the hard disk device is a preset acceleration hard disk, it is added to the service command. A binding module is used to determine the hard disk device corresponding to the service command if the service command contains the binding identifier, and bind the array card where the hard disk device is located to the CPU core corresponding to the array card according to the binding identifier; The execution module is used to execute the business commands using the CPU core; The binding module can also be further configured to: obtain PCIe information corresponding to the RAID card; extract NUMA information from the PCIe information; query the CPU core information corresponding to the NUMA information in the CPU core list; and determine the CPU core corresponding to the RAID card based on the CPU core information.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the business processing method as described in any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the business processing method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Computation cluster system in single machine and control method
CN106528488A