Data processing system and server
Through the virtualized data processing system, virtual kernel management modules and virtual devices are used to simulate NVMe devices, which solves the problem of high equipment costs in system development and testing, achieves efficient system development and testing, and reduces equipment costs.
Patent Information
- Application Number
- CN202410851165.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-09-06
AI Technical Summary
During system development and testing, multiple physical NVMe devices are required, resulting in high equipment costs. When requirements change, equipment needs to be added or replaced, which increases the equipment cost of the project.
A data processing system is designed, including a virtual kernel management module, a virtual front-end command controller, a virtual front-end management controller, a virtual communication server, a virtual flash translation layer controller and a virtual back-end controller. Commands are received through these modules. , processing and execution, simulating the functions of NVMe devices and avoiding dependence on physical devices.
Completing system development and testing through virtualization reduces the need for physical equipment, significantly reduces the equipment cost of the project, and improves processing efficiency.
Smart Images

Figure CN118606003A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a data processing system and a server. Background Art
[0002] In the related technology, physical NVMe (Non Volatile Memory Host Controller Interface Specification, a high-performance storage interface protocol for solid-state drives) devices are generally used for system development and testing. However, when developing and testing high-performance storage solutions, multiple physical NVMe devices are often required to build a suitable environment. In addition, when testing requirements increase or change, physical NVMe devices need to be added or changed. However, physical NVMe devices are usually expensive, which greatly increases the equipment cost of the project during system development and testing. Summary of the invention
[0003] In view of the above problems, embodiments of the present invention are proposed to provide a data processing system and a computer-readable storage medium that overcome the above problems or at least partially solve the above problems.
[0004] In a first aspect, an embodiment of the present invention discloses a data processing system, the system comprising: a virtual kernel management module, a virtual front-end command controller, a virtual front-end management controller, a virtual communication server, a virtual flash translation layer controller, a virtual back-end controller and a virtual storage module;
[0005] The virtual kernel management module is used to receive commands, send the commands to the virtual front-end command controller, and receive execution results fed back by the virtual flash translation layer controller; the commands include: at least one of management commands and control commands;
[0006] The virtual front-end command controller is used to determine the target command according to the type of the command, and add the target command to the submission queue, and when the analog doorbell register in the virtual front-end command controller is triggered, send the target command in the submission queue to the virtual front-end management controller;
[0007] The virtual front-end management controller is used to forward the target command to the virtual communication server;
[0008] The virtual communication server is used to store the target command in a buffer area of the virtual communication server, extract the target command from the buffer area, and send the target command to the virtual flash translation layer controller;
[0009] The virtual flash translation layer controller is used to parse the target command, and if the command obtained by the parsing is a management command, execute the management command to obtain an execution result; if the command obtained by the parsing is a control command, send the control command to the virtual back-end controller; receive the execution result sent by the virtual back-end controller, and send the execution result to the virtual kernel management module;
[0010] The virtual back-end controller is used to execute the control command, control the data stored in the virtual storage module, obtain the execution result, and send the execution result to the virtual flash translation layer controller;
[0011] The virtual storage module is used to store data.
[0012] Optionally, the virtual front-end command controller includes: a configuration register unit, a submission queue unit and a completion queue unit;
[0013] The configuration register unit is used to configure the analog doorbell register;
[0014] The submission queue unit is used to receive the command sent by the virtual kernel management module, determine the target command according to the type of the command, and add the target command to the submission queue, and when the simulated doorbell register is triggered, send the target command in the submission queue to the virtual front-end management controller;
[0015] The completion queue unit is used to receive the execution result sent by the virtual front-end management controller and add the execution result to the completion queue. When the simulated doorbell register is triggered, the execution result in the completion queue is sent to the virtual kernel management module.
[0016] Optionally, the virtual front-end command controller further includes: a memory access unit;
[0017] The submission queue unit is used to determine whether the type of the command is a write command, and if the type of the command is a write command, call the access unit, receive write data corresponding to the write command sent by the access unit, and package the write command and the write data to obtain a target command;
[0018] The memory access unit is used to obtain write data corresponding to the write command from the virtual core management module, and send the write data to the submission queue unit.
[0019] Optionally, the virtual front-end management controller includes a distribution unit, a first receiving unit, a preemption unit and a first sending unit;
[0020] The preemption unit is used to receive the target command sent by the virtual front-end command controller and preempt the sending path according to the preemption algorithm;
[0021] The first sending unit is used to send the target command in the preemption unit to the virtual communication server according to the sending path;
[0022] The first receiving unit is used to receive the execution result sent by the virtual communication server;
[0023] The distribution unit is used to send the execution result in the receiving unit to the virtual front-end command controller by adopting a scheduling algorithm.
[0024] Optionally, the virtual communication server comprises: a second receiving unit, a cache unit and a second sending unit;
[0025] The second receiving unit is used to receive the target command sent by the virtual front-end management controller and the execution result sent by the virtual flash translation layer controller, and send the target command and the execution result to the cache unit;
[0026] The cache unit is used to use a circular cache area to send the execution result to the cache unit for caching;
[0027] The second sending unit is used to send the target command in the cache unit to the virtual flash translation layer controller, and send the execution result to the virtual front-end management controller.
[0028] Optionally, the virtual flash translation layer controller includes a transmission unit, a command parsing unit, a command response unit, a first command processing unit and a second command processing unit;
[0029] The transmission unit is used to receive the target command sent by the virtual communication server, send the target command to the command parsing unit, and receive the execution result sent by the command response unit, and send the execution result to the virtual communication server;
[0030] The parsing unit is used to parse the target command to obtain a parsing result, and send the parsing result to the first command processing unit; the parsing result includes: the management command, the read command, the write command, the erase command and the write data corresponding to the write command; the read command, the write command and the erase command belong to the control command;
[0031] The first command management unit is configured to send the management command to the second command processing unit if the received parsing result is a management command, and receive the execution result sent by the second command processing unit; if the received parsing result is the write command, the erase command and the write data corresponding to the write command, send the write command, the erase command and the write data corresponding to the write command to the virtual back-end controller; and receive the execution result sent by the virtual back-end controller;
[0032] The second command management unit is used to execute the management command, obtain an execution result, and send the execution result to the first command management unit.
[0033] Optionally, the virtual backend controller includes: a third command processing unit, a read data unit, a write data unit and an erase data unit;
[0034] The third command processing unit is used to determine the type of control command sent by the virtual flash translation layer controller, and if the control command is a read command, send the read command to the read data unit; if the control command is a write command, send the write command and corresponding write data to the write data unit; if the control command is an erase command, send the erase command to the erase data unit; and receive execution results sent by the read data unit, the write data unit and the erase data unit, and send the execution results to the virtual flash translation layer controller;
[0035] The read data unit is used to execute the read command, read the read data corresponding to the read command from the virtual storage module, obtain a command completion message, and package the read data and the command completion message into an execution result, and send the execution result to the third command processing unit;
[0036] The data writing unit is used to execute the write command, write the write data corresponding to the write command into the virtual storage module, obtain an execution result, and send the execution result to the third command processing unit;
[0037] The erasing unit is used to execute the erasing command, erase the data corresponding to the erasing command in the virtual storage module, obtain an execution result, and send the execution result to the third command processing unit.
[0038] Optionally, the system further comprises a console, wherein the console is connected to the virtual communication server;
[0039] The virtual communication server is further used to generate an operation log and send the operation log to the console;
[0040] The console is used to display the operation log.
[0041] Optionally, the virtual kernel management module is used to receive commands sent by an application or a test tool, receive execution results fed back by the virtual flash translation layer controller, and feed back the execution results to the application or the test tool.
[0042] In a second aspect, the present invention shows a server, comprising the above-mentioned data processing system.
[0043] The embodiments of the present invention include the following advantages:
[0044] In an embodiment of the present invention, a virtual kernel management module is used to receive commands and send the commands to a virtual front-end command controller, and receive execution results fed back by a virtual flash translation layer controller, wherein the commands are at least one of management commands and control commands; the virtual front-end command controller is used to determine a target command according to the type of command, and add the target command to a submission queue; when an analog doorbell register in the virtual front-end command controller is triggered, the target command in the submission queue is sent to the virtual front-end management controller; the virtual front-end management controller is used to forward the target command to a virtual communication server; the virtual communication server is used to store the target command in a cache area of the virtual communication server, extract the target command from the cache area, and send the target command to the virtual flash translation layer controller; the virtual flash translation layer controller is used to parse the target command; Command, if the command obtained by parsing is a management command, the management command is executed to obtain the execution result, if the command obtained by parsing is a control command, the control command is sent to the virtual back-end controller, the execution result sent by the virtual back-end controller is received, and the execution result is sent to the virtual kernel management module, the virtual back-end controller is used to execute the control command, control the data stored in the virtual storage module, and obtain the execution result, and send the execution result to the virtual flash translation layer controller, the virtual storage module is used to store data, so that the command is completed through the virtual kernel management module, the virtual front-end command controller, the virtual front-end management controller, the virtual communication server, the virtual flash translation layer controller, the virtual back-end controller and the virtual storage module, to realize system development and testing, without the need to use corresponding physical equipment, which greatly reduces the equipment cost of the project. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a structural block diagram of a data processing system provided by an embodiment of the present invention;
[0046] Figure 2 is a structural block diagram of a virtual front-end command controller provided by an embodiment of the present invention;
[0047] Figure 3 It is a structural block diagram of a virtual front-end management controller provided by an embodiment of the present invention;
[0048] Figure 4 is a structural block diagram of a virtual communication server provided by an embodiment of the present invention;
[0049] Figure 5 is a schematic diagram of a ring buffer area provided by an embodiment of the present invention;
[0050] Figure 6 is a structural diagram of a second receiving module provided by an embodiment of the present invention;
[0051] Figure 7 It is a result block diagram of a virtual flash translation layer controller provided by an embodiment of the present invention;
[0052] Figure 8 is a result block diagram of a virtual backend controller provided by an embodiment of the present invention;
[0053] Fig. 9 is a structural block diagram of a virtual storage module provided in an embodiment of the present invention;
[0054] Fig.10 is a flowchart of data processing steps provided by an embodiment of the present invention;
[0055] Fig.11 It is a structural block diagram of a server provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0057] In the related art, physical NVMe devices are used for system development and testing, but physical NVMe devices are usually expensive, which greatly increases the equipment cost of the project when conducting system development and testing. In order to solve the above technical problems, the present invention provides a data processing system, a virtual kernel management module, which is used to receive commands and send the commands to a virtual front-end command controller, and receive the execution results fed back by a virtual flash translation layer controller, wherein the command is at least one of a management command and a control command, and the virtual front-end command controller is used to determine the target command according to the type of command and add the target command to the submission queue. When the analog doorbell register in the virtual front-end command controller is triggered, the target command in the submission queue is sent to the virtual front-end management controller, and the virtual front-end management controller is used to forward the target command to the virtual communication server, and the virtual communication server is used to store the target command in the cache area of the virtual communication server, and extract the target command from the cache area, and send the target command to the virtual flash translation layer controller, and the virtual flash translation layer controller The controller is used to parse the target command. If the command obtained by the parsing is a management command, the management command is executed to obtain the execution result. If the command obtained by the parsing is a control command, the control command is sent to the virtual back-end controller, the execution result sent by the virtual back-end controller is received, and the execution result is sent to the virtual kernel management module. The virtual back-end controller is used to execute the control command, control the data stored in the virtual storage module, and obtain the execution result, and send the execution result to the virtual flash translation layer controller. The virtual storage module is used to store data, so that the command is completed through the virtual kernel management module, the virtual front-end command controller, the virtual front-end management controller, the virtual communication server, the virtual flash translation layer controller, the virtual back-end controller and the virtual storage module to realize system development and testing without using corresponding physical equipment, which greatly reduces the equipment cost of the project.
[0058] Reference Figure 1 , showing a structural block diagram of a data processing system provided by an embodiment of the present invention, the system includes: a virtual kernel management module 101, a virtual front-end command controller 102, a virtual front-end management controller 103, a virtual communication server 104, a virtual flash translation layer controller 105, a virtual back-end controller 106 and a virtual storage module 107.
[0059] In an embodiment of the present invention, the virtual kernel management module 101, the virtual front-end command controller 102 and the virtual front-end management controller 103 can run in kernel mode, and the virtual communication server 104, the virtual flash translation layer controller 105, the virtual back-end controller and the virtual storage module 107 can run in user mode. The virtual kernel management module 101 in this embodiment can be an NVMe virtual kernel management module, the virtual front-end command controller 102 can be an NVMe virtual front-end command controller, the virtual front-end management controller 103 can be an NVMe virtual front-end management controller 103, the virtual communication server 104 can be an NVMe virtual communication server 104, the virtual flash translation layer controller 105 can be an NVMe virtual flash translation layer controller, and the virtual back-end controller can be an NVMe virtual back-end controller. In the present invention, the virtual front-end command controller 102 can be set to multiple, and the present invention takes three as an example. The virtual front-end command controller 102 can include a virtual front-end command controller 102a, a virtual front-end command controller 102b and a virtual front-end command controller 102c, and the virtual flash translation layer controller 105, the virtual back-end controller 106 and the virtual storage module 107 can also be set to multiple, and the present invention also takes three as an example. The virtual flash translation layer controller 105 may include a virtual flash translation layer controller 105a, a virtual flash translation layer controller 105b, and a virtual flash translation layer controller 105c, the virtual back-end controller 106 may include a virtual back-end controller 106a, a virtual back-end controller 106b, and a virtual back-end controller 106c, and the virtual storage module 107 may include a virtual storage module 107a, a virtual storage module 107b, and a virtual storage module 107c. It should be noted that the specific number of the virtual front-end command controller 102, the virtual flash translation layer controller 105, the virtual back-end controller 106, and the virtual storage module 107 in the present invention can be set according to actual needs, and the present invention does not make specific limitations here. In the present invention, the virtual kernel management module 101 may include a kernel NVMe virtual device management module and a kernel PCIE (peripheral component interconnect express, a high-speed serial computer expansion bus standard) device management module.
[0060] In the embodiment of the present invention, the virtual kernel management module 101 is used to receive commands, send commands to the virtual front-end command controller 102, and receive execution results fed back by the virtual flash translation layer controller 105; the commands include: at least one of management commands and control commands.
[0061] Specifically, the virtual core management module 101 in the present invention can receive commands sent from the outside, such as commands sent by an application or a test tool, wherein the command is at least one of a management command and a control command, and the control command can include: a read command, a write command, and an erase command. After receiving the command, the virtual core management module 101 can send the command to one of the virtual front-end command controllers 102, so that the command can be executed in the end, and the virtual core management module 101 receives the execution result corresponding to the command.
[0062] In an embodiment of the present invention, the virtual kernel management module 101 can detect the operating status of each virtual front-end command controller 102, determine the target virtual front-end command controller 102 according to the operating status, and send the command to the target virtual front-end command controller 102, thereby avoiding sending the command to the most blocked virtual front-end command controller 102, and further enabling the virtual front-end command controller 102 to process the command faster.
[0063] In an embodiment of the present invention, the virtual front-end command controller 102 is used to determine the target command according to the type of command, and add the target command to the submission queue. When the analog doorbell register in the virtual front-end command controller 102 is triggered, the target command in the submission queue is sent to the virtual front-end management controller 103.
[0064] like Figure 2 As shown, a block diagram of a virtual front-end command controller 102 provided by an embodiment of the present invention is shown. In one embodiment, the virtual front-end command controller 102 may include: a configuration register unit 1021, a submission queue unit 1022 and a completion queue unit 1026. The configuration register unit 1021 is used to configure the analog doorbell register; the submission queue unit 1022 is used to receive the command sent by the virtual core management module 101, determine the target command according to the type of the command, and add the target command to the submission queue. When the analog doorbell register is triggered, the target command in the submission queue is sent to the virtual front-end management controller 103; the completion queue unit 1023 is used to receive the execution result sent by the virtual front-end management controller 103, and add the execution result to the completion queue. When the analog doorbell register is triggered, the execution result in the completion queue is sent to the virtual core management module 101. Therefore, by configuring the analog doorbell register in the register unit and processing the command in the submission queue unit by triggering the analog doorbell register, the virtual front-end command controller 103 can process the command in an orderly manner, thereby improving the efficiency of processing the command.
[0065] In one embodiment, the virtual front-end command controller 102 may further include: a memory access unit 1024; a submission queue unit, used to determine whether the type of command is a write command, if the type of command is a write command, then call the access unit, and receive the write data corresponding to the write command sent by the access unit, and package the write command and the write data to obtain the target command; the memory access unit 1024 is used to obtain the write data corresponding to the write command from the virtual kernel management module 101, and send the write data to the submission queue unit. Thus, the write data is obtained through the memory access unit 1024, avoiding processing data through one unit, which affects the processing efficiency of the command.
[0066] In an embodiment of the present invention, the virtual front-end management controller 103 is used to forward the target command to the virtual communication server 104.
[0067] like Figure 3 As shown, a structural block diagram of a virtual front-end management controller 103 provided by an embodiment of the present invention is shown. In one embodiment, the virtual front-end management controller 103 includes a distribution unit 1031, a first receiving unit 1032, a preemption unit 1033 and a first sending unit 1034; the preemption unit 1033 is used to receive the target command sent by the virtual front-end command controller 102, and preempt the sending path according to the preemption algorithm; the first sending unit 1034 is used to send the target command in the preemption unit 1033 to the virtual communication server 104 according to the sending path; the first receiving unit 1032 is used to receive the execution result sent by the virtual communication server 104; the distribution unit 1031 is used to send the execution result in the receiving unit to the virtual front-end command controller 102 using a scheduling algorithm. Thus, the exclusive use of the sending path is achieved through the preemption algorithm and the scheduling algorithm, avoiding the conflict and data delay of the transmitted data.
[0068] In the embodiment of the present invention, the virtual communication server 104 can be used to store the target command in the cache area of the virtual communication server 104, extract the target command from the cache area, and send the target command to the virtual flash translation layer controller 105. In the present invention, the target command can carry the address information of the corresponding virtual flash translation layer controller 105, and the virtual communication server 104 can send the target command to the corresponding virtual flash translation layer controller 105 according to the corresponding address information. For example, if the target command carries the address information of the virtual flash translation layer controller 105a, the virtual communication server 104 sends the target command to the virtual flash translation layer controller 105a.
[0069] like Figure 4As shown, a structural block diagram of a virtual communication server 104 provided by an embodiment of the present invention is shown. In one embodiment, the virtual communication server 104 may include: a second receiving unit 1041, a cache unit 1042, and a second sending unit 1043; the second receiving unit 1041 is used to receive the target command sent by the virtual front-end management controller 103 and the execution result sent by the virtual flash translation layer controller 105, and send the target command and the execution result to the cache unit 1042; the cache unit 1042 is used to use a circular cache area to send the execution result to the cache unit 1042 for caching; the second sending unit 1043 is used to send the target command in the cache unit 1042 to the virtual flash translation layer controller 105, and send the execution result to the virtual front-end management controller 103. Therefore, after the cache unit 1042 uses a circular cache area to cache the target command and the execution result, the target command and the execution result are processed, thereby improving the processing efficiency. Figure 5 , which is a schematic diagram of a ring buffer area provided by an embodiment of the present invention.
[0070] In the present invention, in order to avoid the inability to put the target command and the execution result into the circular buffer area due to the full buffer area, the executed target command or the sent execution result in the circular buffer area can be deleted, and then the received target command and the execution result can be put into the circular buffer area. When deleting the target command and the execution result, they can also be deleted according to the corresponding priority. The setting of the corresponding priority can be set according to actual needs, and the present invention is not specifically limited here. In the storage unit 1042 of the present invention, multiple circular buffer areas can also be set. When the storage area in the circular buffer area is full or abnormal, the received target command and the execution result can be put into other non-abnormal circular buffer areas. In the present invention, a corresponding priority can also be set for each of the multiple circular buffer areas. When the storage unit 1042 receives the target command and the execution result, the target command and the execution result can be put into the circular buffer area corresponding to the priority according to the priority corresponding to the target command and the execution result.
[0071] In the present invention, in order to efficiently process the data sent from the virtual flash translation layer controller 105 and the virtual front-end management controller 103, the second receiving unit 1041 can adopt an efficient message terminal response algorithm, which is specifically as follows: the second receiving unit 1041 is provided with an interrupt registration list 10411 and an interrupt response list 10412, and the terminal registration list records the descriptors corresponding to the virtual flash translation layer controller 105 and the virtual front-end management controller 103. When the second receiving unit 1041 can send the virtual flash translation layer controller 105 and the virtual front-end management controller 103 to the second receiving unit 1041, the second receiving unit 1041 can receive the virtual flash translation layer controller 105 and the virtual front-end management controller 103 to the second receiving unit 1041. The descriptor corresponding to 103 is registered in the interrupt registration list 10411, and a dedicated memory area is allocated in the second receiving unit 1041 for the virtual flash translation layer controller 105 and the virtual front-end management controller 103 to receive and send data. When the second receiving unit 1041 receives a message or command from the virtual flash translation layer controller 105 and the virtual front-end management controller 103, the message or command is stored in the memory area of the corresponding descriptor, and an interrupt is triggered, and then the descriptors of the virtual flash translation layer controller 105 and the virtual front-end management controller 103 are added to the interrupt response list
[0072] 10412, the second receiving unit 1041 polls the interrupt response list 10412, if the interrupt response list is checked
[0073] 10412 adds the descriptor, reads the message or command in the corresponding area, and after processing, removes the descriptor of the virtual flash translation layer controller 105 and the virtual front-end management controller 103 from the interrupt response list.
[0074] Removed in 10412. Figure 6 As shown, a second receiving unit provided by an embodiment of the present invention is shown.
[0075] 1041 structure diagram.
[0076] In an embodiment of the present invention, the virtual flash translation layer controller 105 is used to parse the target command. If the command obtained by parsing is a management command, the management command is executed to obtain an execution result; if the command obtained by parsing is a control command, the control command is sent to the virtual back-end controller 106; the execution result sent by the virtual back-end controller 106 is received, and the execution result is sent to the virtual kernel management module 101.
[0077] like Figure 7As shown, a result block diagram of a virtual flash translation layer controller 105 provided by an embodiment of the present invention is shown. In one embodiment, the virtual flash translation layer controller 105 includes a transmission unit 1051, a command parsing unit 1052, a command response unit 1053, a first command processing unit 1054 and a second command processing unit 1055; the transmission unit 1051 is used to receive a target command sent by the virtual communication server 104, send the target command to the command parsing unit 1052, and receive an execution result sent by the command response unit 1053, and send the execution result to the virtual communication server 104; the parsing unit is used to parse the target command, obtain a parsing result, and send the parsing result to the first command processing unit 1054; the parsing result includes: management command, read command, write command, Erase command and write data corresponding to write command; read command, write command and erase command belong to control command; first command management unit, for sending management command to second command processing unit 1055 if the received parsing result is management command, and receiving execution result sent by second command processing unit 1055; if the received parsing result is write command, erase command and write data corresponding to write command, then sending write command, erase command and write data corresponding to write command to virtual back-end controller 106; receiving execution result sent by virtual back-end controller 106; second command management unit, for executing management command, obtaining execution result, and sending execution result to first command management unit. Thus, the performance and efficiency of virtual flash translation layer are improved, and the response speed of the whole data processing system is improved.
[0078] In the embodiment of the present invention, the virtual backend controller 106 is used to execute control commands, control the data stored in the virtual storage module 107 , obtain execution results, and send the execution results to the virtual flash translation layer controller 105 .
[0079] like Figure 8As shown, a result block diagram of a virtual back-end controller 106 provided by an embodiment of the present invention is shown. In one embodiment, the virtual back-end controller 106 includes: a third command processing unit 1061, a read data unit 1062, a write data unit 1063 and an erase data unit 1064; the third command processing unit 1061 is used to determine the type of control command sent by the virtual flash translation layer controller 105, if the control command is a read command, the read command is sent to the read data unit 1062; if the control command is a write command, the write command and the corresponding write data are sent to the write data unit 1063; if the control command is an erase command, the erase command is sent to the erase data unit 1064; and receive the execution results sent by the read data unit 1062, the write data unit 1063 and the erase data unit 1064, and send the execution results to the virtual flash translation layer controller 105; The virtual flash translation layer controller 105 is sent to the virtual flash translation layer controller 105; the read data unit 1062 is used to execute the read command, read the read data corresponding to the read command from the virtual storage module 107, obtain the command completion message, and package the read data and the command completion message into an execution result, and send the execution result to the third command processing unit 1061; the write data unit 1063 is used to execute the write command, write the write data corresponding to the write command into the virtual storage module 107, obtain the execution result, and send the execution result to the third command processing unit 1061; the erase unit is used to execute the erase command, erase the data corresponding to the erase command in the virtual storage module 107, obtain the execution result, and send the execution result to the third command processing unit 1061. Therefore, corresponding processing is performed through different units, which improves the data processing efficiency and improves the efficiency of system development and testing in practical applications.
[0080] In the embodiment of the present invention, the virtual storage module 107 is used to store data so that the stored data can be processed according to the target command.
[0081] In the embodiment of the present invention, the virtual storage module 107 may be provided with a bad block generating unit 1071, such as Fig. 9 As shown, a block diagram of a virtual storage module provided in an embodiment of the present invention is shown. In order to more realistically simulate the physical damage that an actual hard disk may encounter, the present invention can simulate various bad block situations, including sparse and dense bad block parts, through the bad block generation unit 1071. When performing the simulation, the simulation parameters can be modified, such as the starting position of the bad block generation, the time interval and range of the bad block generation, etc., to effectively control the speed of bad block generation and the severity of the simulation environment. In the present invention, the data of the bad block = the generation time interval * random number / 100 * the maximum number of bad blocks generated each time; the position of the bad block = the starting position of the bad block generation + random number / 100 * the range of the bad block generation; wherein the random number can be an integer from 0 to 100.
[0082] In the embodiment of the present invention, the data processing system may further include a console, which is connected to the virtual communication server 104; the virtual communication server 104 is further used to generate an operation log and send the operation log to the console; the console is used to display the operation log, so that developers can view the operation log of the virtual communication server 104 through the console.
[0083] It should be noted that the storage unit 1042 in the present invention may be a storage unit array, and each virtual backend may correspond to a console and a storage unit array, thereby realizing the loading and unloading of virtual devices and the management of logs.
[0084] In the embodiment of the present invention, the virtual kernel management module 101 is used to receive commands sent by the application or test tool, receive execution results fed back by the virtual flash translation layer controller 105, and feed back the execution results to the application or test tool. Thus, commands can be sent through the application or test tool, and the corresponding execution results can be viewed through the application or test tool.
[0085] In order to better understand the embodiments of the present invention, Fig.10As shown, a flowchart of the steps of data processing provided by an embodiment of the present invention is shown. The virtual kernel management module receives the command and sends the command to the virtual front-end command controller 102. The virtual front-end command controller 102 obtains the corresponding write data from the virtual kernel management module according to the type of the command. If the command is a write command, the virtual front-end command controller 102 packages the write data and the write command into a target command. If the command is not a write command, the command is determined to be a target command, and the target command is added to the submission queue. The target command in the submission queue is sent to the virtual front-end management controller 103. The virtual front-end management controller 103 forwards the target command to the virtual communication server 104. The virtual communication server 104 stores the target command in the ring buffer area of the virtual communication server 104, extracts the target command from the ring buffer area, and sends the target command to the virtual flash translation layer controller 105. The virtual flash translation layer controller 105 05 Parse the target command. If the target command is a management command, execute the management command to obtain the execution result, and send the execution result to the virtual kernel management module through the virtual flash translation layer controller 105, the virtual communication server 104, the virtual front-end management controller 103, the virtual front-end command controller 102 and the virtual kernel management module in sequence. If the command obtained by parsing is a control command, send the control command to the virtual back-end controller 106. The virtual back-end controller 106 executes the control command and obtains the execution result, and sends the execution result to the virtual flash translation layer controller 105. The execution result is sent to the virtual kernel management module through the virtual flash translation layer controller 105, the virtual communication server 104, the virtual front-end management controller 103, the virtual front-end command controller 102 and the virtual kernel management module in sequence.
[0086] In the implementation of the present invention, the virtual kernel management module is used to receive commands and send the commands to the virtual front-end command controller, and receive the execution results fed back by the virtual flash translation layer controller, wherein the command is at least one of a management command and a control command. The virtual front-end command controller is used to determine the target command according to the type of the command and add the target command to the submission queue. When the analog doorbell register in the virtual front-end command controller is triggered, the target command in the submission queue is sent to the virtual front-end management controller. The virtual front-end management controller is used to forward the target command to the virtual communication server. The virtual communication server is used to store the target command in the cache area of the virtual communication server, extract the target command from the cache area, and send the target command to the virtual flash translation layer controller. The virtual flash translation layer controller is used to parse the target command. If the command obtained by the parsing is a management command, the management command is executed to obtain the execution result. If the command obtained by the parsing is a control command, the control command is sent to the virtual back-end controller, the execution result sent by the virtual back-end controller is received, and the execution result is sent to the virtual kernel management module. The virtual back-end controller is used to execute the control command, control the data stored in the virtual storage module, and obtain the execution result, and send the execution result to the virtual flash translation layer controller.
[0087] The virtual storage module is used to store data, thereby completing commands through the virtual kernel management module, virtual front-end command controller, virtual front-end management controller, virtual communication server, virtual flash translation layer controller, virtual back-end controller and virtual storage module to achieve system development and testing without the need for corresponding physical equipment, greatly reducing the equipment cost of the project.
[0088] like Fig.11 , showing a structural block diagram of a server provided in an embodiment of the present invention, where the server 108 includes the above-mentioned data processing system 10.
[0089] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0090] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0091] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0092] The data processing system and the server provided by the present invention are introduced in detail above. The principles and implementation methods of the present invention are explained in detail using specific examples. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A data processing system, characterized in that: The system comprises: a virtual kernel management module, a virtual front-end command controller, a virtual front-end management controller, a virtual communication server, a virtual flash translation layer controller, a virtual back-end controller and a virtual storage module; The virtual kernel management module is used to receive commands, send the commands to the virtual front-end command controller, and receive execution results fed back by the virtual flash translation layer controller; the commands include: at least one of management commands and control commands; The virtual front-end command controller is used to determine the target command according to the type of the command, and add the target command to the submission queue, and when the analog doorbell register in the virtual front-end command controller is triggered, send the target command in the submission queue to the virtual front-end management controller; The virtual front-end management controller is used to forward the target command to the virtual communication server; The virtual communication server is used to store the target command in a buffer area of the virtual communication server, extract the target command from the buffer area, and send the target command to the virtual flash translation layer controller; The virtual flash translation layer controller is used to parse the target command, and if the command obtained by the parsing is a management command, execute the management command to obtain an execution result; if the command obtained by the parsing is a control command, send the control command to the virtual back-end controller; receive the execution result sent by the virtual back-end controller, and send the execution result to the virtual kernel management module; The virtual back-end controller is used to execute the control command, control the data stored in the virtual storage module, obtain the execution result, and send the execution result to the virtual flash translation layer controller; The virtual storage module is used to store data.
2. The data processing system according to claim 1, characterized in that The virtual front-end command controller includes: a configuration register unit, a submission queue unit and a completion queue unit; The configuration register unit is used to configure the analog doorbell register; The submission queue unit is used to receive the command sent by the virtual kernel management module, determine the target command according to the type of the command, and add the target command to the submission queue, and when the simulated doorbell register is triggered, send the target command in the submission queue to the virtual front-end management controller; The completion queue unit is used to receive the execution result sent by the virtual front-end management controller and add the execution result to the completion queue. When the simulated doorbell register is triggered, the execution result in the completion queue is sent to the virtual kernel management module.
3. The data processing system according to claim 1, characterized in that: The virtual front-end command controller further includes: a memory access unit; The submission queue unit is used to determine whether the type of the command is a write command. If the type of the command is a write command, the access unit is called, and the write data corresponding to the write command sent by the access unit is received, and the write command and the write data are packaged to obtain the target command; the memory access unit is used to obtain the write data corresponding to the write command from the virtual kernel management module, and send the write data to the submission queue unit.
4. The data processing system according to claim 1, characterized in that: The virtual front-end management controller includes a distribution unit, a first receiving unit, a preemption unit and a first sending unit; The preemption unit is used to receive the target command sent by the virtual front-end command controller and preempt the sending path according to the preemption algorithm; The first sending unit is used to send the target command in the preemption unit to the virtual communication server according to the sending path; The first receiving unit is used to receive the execution result sent by the virtual communication server; The distribution unit is used to send the execution result in the receiving unit to the virtual front-end command controller by adopting a scheduling algorithm.
5. The data processing system according to claim 1, characterized in that: The virtual communication server comprises: a second receiving unit, a cache unit and a second sending unit; The second receiving unit is used to receive the target command sent by the virtual front-end management controller and the execution result sent by the virtual flash translation layer controller, and send the target command and the execution result to the cache unit; The cache unit is used to use a circular cache area to send the execution result to the cache unit for caching; The second sending unit is used to send the target command in the cache unit to the virtual flash translation layer controller, and send the execution result to the virtual front-end management controller.
6. The data processing system according to claim 1, characterized in that: The virtual flash translation layer controller includes a transmission unit, a command parsing unit, a command response unit, a first command processing unit and a second command processing unit; The transmission unit is used to receive the target command sent by the virtual communication server, send the target command to the command parsing unit, and receive the execution result sent by the command response unit, and send the execution result to the virtual communication server; The parsing unit is used to parse the target command, obtain a parsing result, and send the parsing result to the first command processing unit; The parsing result includes: the management command, the read command, the write command, the erase command and the write data corresponding to the write command; the read command, the write command and the erase command belong to the control command; The first command management unit is configured to send the management command to the second command processing unit if the received parsing result is a management command, and receive the execution result sent by the second command processing unit; if the received parsing result is the write command, the erase command and the write data corresponding to the write command, send the write command, the erase command and the write data corresponding to the write command to the virtual back-end controller; and receive the execution result sent by the virtual back-end controller; The second command management unit is used to execute the management command, obtain an execution result, and send the execution result to the first command management unit.
7. The data processing system according to claim 6, characterized in that: The virtual back-end controller includes: a third command processing unit, a read data unit, a write data unit and an erase data unit; the third command processing unit is used to determine the type of the control command sent by the virtual flash translation layer controller, if the control command is a read command, send the read command to the read data unit; if the control command is a write command, send the write command and the corresponding write data to the write data unit; if the control command is an erase command, send the erase command to the erase data unit; and receive the execution results sent by the read data unit, the write data unit and the erase data unit, and send the execution results to the virtual flash translation layer controller; The read data unit is used to execute the read command, read the read data corresponding to the read command from the virtual storage module, obtain a command completion message, and store the read data and the Packing the command completion message into an execution result, and sending the execution result to the third command processing unit; The data writing unit is used to execute the write command, write the write data corresponding to the write command into the virtual storage module, obtain an execution result, and send the execution result to the third command processing unit; The erasing unit is used to execute the erasing command, erase the data corresponding to the erasing command in the virtual storage module, obtain an execution result, and send the execution result to the third command processing unit.
8. The data processing system according to claim 1, characterized in that: The system further comprises a console connected to the virtual communication server; The virtual communication server is further used to generate an operation log and send the operation log to the console; The console is used to display the operation log.
9. The data processing system according to claim 1, characterized in that: The virtual kernel management module is used to receive commands sent by an application program or a test tool, and An execution result fed back by the virtual flash translation layer controller is received, and the execution result is fed back to the application program or the test tool.
10. A server, characterized in that: include: A data processing system as claimed in any one of claims 1 to 9.
