WO2024113799A1 - NVMe磁盘阵列数据处理方法、装置、设备及存储介质 - Google Patents

NVMe磁盘阵列数据处理方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2024113799A1
WO2024113799A1 PCT/CN2023/102631 CN2023102631W WO2024113799A1 WO 2024113799 A1 WO2024113799 A1 WO 2024113799A1 CN 2023102631 W CN2023102631 W CN 2023102631W WO 2024113799 A1 WO2024113799 A1 WO 2024113799A1
Authority
WO
WIPO (PCT)
Prior art keywords
command
raid
target
nvme
disk array
Prior art date
Application number
PCT/CN2023/102631
Other languages
English (en)
French (fr)
Inventor
闫鑫
巨新刚
王江
李树青
李幸远
孙华锦
Original Assignee
苏州元脑智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州元脑智能科技有限公司 filed Critical 苏州元脑智能科技有限公司
Publication of WO2024113799A1 publication Critical patent/WO2024113799A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of storage technology, and more specifically, to NVMe disk array data processing methods, devices, equipment and storage media.
  • NVMe Non Volatile Memory Express
  • This standard protocol has the characteristics of low latency, high concurrency and low power consumption. It is a high-performance, highly scalable storage protocol used to connect the host and memory subsystem.
  • multiple independent NVMe disks are generally combined to form a large disk system, namely the Raid (Redundant Array of Independent Disks) group of independent disk redundant arrays.
  • Raid0 can provide very high execution performance, and the basic read and write operations are N times that of a single disk (N is the number of disks that make up Raid0).
  • N is the number of disks that make up Raid0.
  • Raid1 When writing data, Raid1 writes the same data to the working disk and the mirror disk without distinction, which has better reliability than Raid0.
  • Raid5 stores data and corresponding parity information on different disks, taking into account storage performance, data security and storage cost.
  • Raid6 has two check protection information for each data block, so the data reliability is higher.
  • Raid10 combines the advantages of Raid 1 and Raid 0. From the perspective of Raid1, it is equivalent to writing double copies of data, which plays a role in data protection. From the perspective of Raid0, data can be divided into N (N is the number of disks that make up Raid0) copies for concurrent reading and writing, which ensures the efficiency of data reading and writing.
  • the purpose of this application is to provide an NVMe disk array data processing method, which can solve the technical problem of how to quickly process data on an NVMe disk array based on NVMe commands to a certain extent.
  • This application also provides an NVMe disk array data processing device, equipment and non-volatile computer-readable storage medium.
  • a NVMe disk array data processing method comprising:
  • the target NVMe command is a read-write command
  • the target NVMe command is converted into a corresponding Raid command based on the Raid parameter information, so that the Raid execution engine reads and writes data to the target NVMe disk array based on the Raid command;
  • the target NVMe command is a non-read-write command
  • the target NVMe command is converted into a corresponding abnormal command based on the Raid parameter information, so that the CPU of the target NVMe disk array performs data processing on the target NVMe disk array based on the abnormal command.
  • converting the target NVMe command into a corresponding Raid command based on the Raid parameter information includes:
  • the target microinstruction sequence is encapsulated to obtain the Raid command.
  • the parsing of the Raid parameter information to obtain the execution engine parameters includes:
  • the first type of parameters and the second type of parameters are used as the execution engine parameters.
  • generating a target microinstruction sequence based on the execution engine parameters includes:
  • the original microinstruction sequence is optimized to obtain the target microinstruction sequence.
  • the generating corresponding stripe microinstructions based on the execution engine parameters includes:
  • the microinstruction data format includes a microinstruction feature area and a microinstruction parameter area;
  • the parameters in the microinstruction feature area include the position of the strip microinstruction in the target microinstruction sequence, the execution mode of the strip microinstruction, the Raid execution engine of the strip microinstruction, the debugging mode of the strip microinstruction, the size of the strip microinstruction, and the execution status of the strip microinstruction;
  • the parameters in the microinstruction parameter area include parameters determined based on the function of the Raid execution engine of the strip microinstruction.
  • the step of sorting the stripe microinstructions to obtain an original microinstruction sequence includes:
  • the microinstruction sequence template is used to define a corresponding microinstruction sequence according to an operation scenario, and to define determined microinstruction parameters according to the operation scenario.
  • optimizing the original microinstruction sequence to obtain the target microinstruction sequence includes:
  • the microinstructions not currently used in the original microinstruction sequence are deleted to obtain the target microinstruction sequence.
  • optimizing the original microinstruction sequence to obtain the target microinstruction sequence includes:
  • the parameters in the original microinstruction sequence are reassigned based on the target NVMe command to obtain the target microinstruction sequence.
  • encapsulating the target microinstruction sequence to obtain the Raid command includes:
  • the Raid command format includes a command feature area, an original NVMe command area, an engine general parameter area and a microinstruction sequence area;
  • the command feature area is used to store the command length, type, generation time, operation mode, and command exception type;
  • the original NVMe command area is used to store the target NVMe command;
  • the engine general parameter area is used to store the interaction information between the Raid execution engines during the execution of the Raid command;
  • the microinstruction sequence area is used to store the target microinstruction sequence.
  • converting the target NVMe command into a corresponding abnormal command based on the Raid parameter information includes:
  • the preset Raid command format convert the target NVMe command into the corresponding abnormal command based on the Raid parameter information
  • the Raid command format includes a command feature area, an original NVMe command area, an engine general parameter area and a microinstruction sequence area; the command feature area is used to store command length, type, generation time, operation mode, and command exception type; the original NVMe command area is used to store the target NVMe command; the engine general parameter area and the microinstruction sequence area are empty.
  • extracting Raid parameter information in the target NVMe command includes:
  • the Raid parameter information includes Namespace information, Raid group information, and disk group information.
  • the method further includes:
  • the Raid execution engine is notified to process the Raid command based on an asynchronous event.
  • the method further includes:
  • the CPU is notified to process the abnormal command based on an asynchronous event.
  • An NVMe disk array data processing device comprising:
  • a command acquirer used to acquire a target NVMe command for operating a target NVMe disk array, wherein the target NVMe disk array is built based on a Raid method
  • An information extractor connected to the command acquirer, used to extract Raid parameter information in the target NVMe command;
  • a task rule checker connected to the information extractor, for parsing the type of the target NVMe command
  • a task dispatching module connected to the task rule checker is used to dispatch the target NVMe command and the Raid parameter information to the Raid command generation engine if the target NVMe command is a read-write command; if the target NVMe command is a non-read-write command, dispatch the target NVMe command and the Raid parameter information to the abnormal command generation engine;
  • the Raid command generation engine connected to the task dispatching module is used to convert the target NVMe command into a corresponding Raid command based on the Raid parameter information, so that the Raid execution engine reads and writes data to the target NVMe disk array based on the Raid command;
  • the abnormal command generation engine connected to the task dispatching module is used to convert the target NVMe command into a corresponding abnormal command based on the Raid parameter information, so that the CPU of the target NVMe disk array performs data processing on the target NVMe disk array based on the abnormal command.
  • it also includes:
  • a command output arbitrator connected to the Raid command generation engine and the abnormal command generation engine is used to output the Raid command or the abnormal command for storage.
  • it also includes:
  • a resource manager connected to the information extractor and the task dispatching module, used to apply for storage space from the command storage;
  • the command memory connected to the command output arbitrator is used to store the Raid command or the abnormal command in the storage space.
  • it also includes:
  • the task scheduler connected to the command output arbitrator is used to schedule the process of the Raid execution engine processing the Raid command.
  • it also includes:
  • the register connected to the information extractor is used to store the Raid parameter information.
  • An NVMe disk array data processing device comprising:
  • a processor is used to implement the steps of any of the above-mentioned NVMe disk array data processing methods when executing the computer program.
  • a non-volatile computer-readable storage medium wherein a computer program is stored in the non-volatile computer-readable storage medium, and when the computer program is executed by a processor, the steps of any of the above-mentioned NVMe disk array data processing methods are implemented.
  • the present application provides an NVMe disk array data processing method, which obtains a target NVMe command for operating a target NVMe disk array, wherein the target NVMe disk array is built based on a Raid method; extracts Raid parameter information in the target NVMe command; parses the type of the target NVMe command; if the target NVMe command is a read-write command, the target NVMe command is converted into a corresponding Raid command based on the Raid parameter information, so that the Raid execution engine reads and writes data to the target NVMe disk array based on the Raid command; if the target NVMe command is a non-read-write command, the target NVMe command is converted into a corresponding abnormal command based on the Raid parameter information, so that the CPU of the target NVMe disk array processes data on the target NVMe disk array based on the abnormal command.
  • the Raid parameters in the target NVMe command that operates the target NVMe disk array can be extracted, and when the target NVMe command is a read-write command, the target NVMe command can be converted into a corresponding Raid command based on the Raid parameter information so that the Raid execution engine can quickly process it.
  • the target NVMe command When the target NVMe command is a non-read-write command, the target NVMe command can be converted into a corresponding abnormal command based on the Raid parameter information so that the CPU can quickly process it, and different NVMe commands can be processed in a targeted manner with the help of Raid execution engines and CPUs with different performances, thereby improving the matching degree between NVMe commands and NVMe disk arrays, and thus improving the data processing efficiency of NVMe disk arrays.
  • the NVMe disk array data processing device, equipment and non-volatile computer-readable storage medium provided in the present application also solve corresponding technical problems.
  • FIG1 is a first flow chart of an NVMe disk array data processing method provided by an embodiment of the present application.
  • FIG2 is a second flow chart of an NVMe disk array data processing method provided in an embodiment of the present application.
  • FIG3 is a third flow chart of an NVMe disk array data processing method provided in an embodiment of the present application.
  • Fig. 4 is a schematic diagram of microinstruction data format
  • FIG5 is a schematic diagram of a microinstruction sequence creation structure
  • Fig. 6 is a schematic diagram of the Raid command encapsulation format
  • FIG7 is a schematic diagram of an abnormal command encapsulation format
  • FIG8 is a schematic diagram of the interaction between an abnormal command and the CPU of a main device
  • FIG9 is a schematic diagram of the structure of an NVMe disk array data processing device provided in an embodiment of the present application.
  • FIG10 is a schematic diagram of the structure of a resource pool
  • Figure 11 is a schematic diagram of the secondary index of Namespace, Raid, and disk group information
  • FIG12 is a data processing flow chart of an NVMe disk array data processing device
  • FIG13 is a diagram showing the interaction process of various components in the NVMe disk array data processing device
  • FIG14 is a schematic diagram of converting a multi-channel NVMe command to a Raid operation command
  • FIG15 is a schematic diagram of the structure of an NVMe disk array data processing device provided in an embodiment of the present application.
  • Figure 16 is another structural schematic diagram of an NVMe disk array data processing device provided in an embodiment of the present application.
  • Figure 1 is a first flow chart of an NVMe disk array data processing method provided in an embodiment of the present application.
  • Step S101 obtaining a target non-volatile memory interface specification command for operating a target non-volatile memory interface specification disk array, wherein the target non-volatile memory interface specification disk array is constructed based on a redundant array of independent disks method.
  • the target NVMe command for operating the target NVMe disk array can be obtained first, for example, the target NVMe command can be obtained from the host side of the target NVMe disk array, etc.
  • the content, format, and acquisition method of the target NVMe command can be determined according to the specific application scenario, and this application does not make specific limitations here.
  • the target NVMe disk array in this application refers to a disk array built based on the Raid method, that is, a disk array obtained by combining multiple NVMe disks based on the Raid method.
  • the size of the target NVMe disk array and the Raid method based on it can be determined according to actual needs.
  • Step S102 extracting redundant array of independent disks parameter information in the target non-volatile memory interface specification command.
  • the Raid parameter information in the target NVMe command can be extracted so that the target NVMe command can be subsequently converted based on the Raid parameter information.
  • Raid parameter information can include Namespace information, Raid group information, and disk group information. Specifically, in the process of extracting the Raid parameter information in the target NVMe command, you can first index the corresponding Namespace information according to the Namespace ID field in the target NVMe command, and then index the Raid group information according to the Raid Group ID in the information. Finally, according to the Device information in the Raid group information, index the disk group information involved in the Raid group, such as the physical disk group information.
  • Namespace information may include the read and write characteristics, size range, corresponding Raid group ID, valid mark and other information of the current Namespace
  • Raid group information may include the current Raid group type, status, characteristics, operating characteristics, disk group information, valid mark and other information
  • disk group information may include the type of disks involved in a Raid group, operating channel number, physical ID number, check code, valid mark and other information.
  • Step S103 parsing the type of the target non-volatile memory interface specification command.
  • Step S104 If the target non-volatile memory interface specification command is a read-write command, the target non-volatile memory interface specification command is converted into a corresponding independent redundant array of disks command based on the independent redundant array of disks parameter information, so that the independent redundant array of disks execution engine reads and writes data to the target non-volatile memory interface specification disk array based on the independent redundant array of disks command.
  • Step S105 If the target non-volatile memory interface specification command is a non-read-write command, the target non-volatile memory interface specification command is converted into a corresponding abnormal command based on the independent disk redundant array parameter information, so that the central processing unit of the target non-volatile memory interface specification disk array processes data on the target non-volatile memory interface specification disk array based on the abnormal command.
  • the type of the target NVMe command can be parsed, and the processing method of the target NVMe command can be determined according to the parsing result.
  • the target NVMe commands can be divided into read-write commands and non-read-write commands according to the type of the target NVMe command, so as to process the target NVMe commands in a targeted manner, and when the target NVMe command is a read-write command, the target NVMe command can be converted into a corresponding Raid command based on the Raid parameter information, such as converted into a Raid command for the Raid0 array, converted into a Raid command for the Raid1 array, converted into a Raid command for the Raid5 array, converted into a Raid command for the Raid6 array, converted into a Raid command for the Raid10 array, etc., so that the Raid execution engine reads and writes data to the target NVMe disk array based on the Raid command; when the target NVMe command is a non-read-write command, the target NVMe command can be converted into a corresponding exception command based on the Raid parameter information, so that the CPU (central processing unit) of the target NVM
  • the abnormal command in the present application refers to a command different from the Raid command, which can also be expressed as a target command, a second command, etc.; in addition, the specific type of the NVMe command that is not a read-write command can be determined according to actual needs, such as when the NVMe command is an Admin command; or when PRP (Physical Region Page) 1 in the NVMe command is not 4KB aligned; or when the NVMe command SLBA (Starting Logical Block Address) is out of bounds; or the current Namespace is invalid; or when RaidLevel is not Raid0/Raid1/Raid5/Raid6/Raid10; or when the ChunkSize of the Raid group is not 64KB/128KB/256KB/512KB/1024KB; or when the number of disks in the Raid group is out of bounds; or when the IO length is out of bounds; or when the Raid group RaidGroupValid is invalid; or when the Raid group RaidState
  • the present application provides an NVMe disk array data processing method, which obtains a target NVMe command for operating a target NVMe disk array, wherein the target NVMe disk array is built based on a Raid method; extracts Raid parameter information in the target NVMe command; parses the type of the target NVMe command; if the target NVMe command is a read-write command, the target NVMe command is converted into a corresponding Raid command based on the Raid parameter information, so that the Raid execution engine reads and writes data to the target NVMe disk array based on the Raid command; if the target NVMe command is a non-read-write command, the target NVMe command is converted into a corresponding abnormal command based on the Raid parameter information, so that the CPU of the target NVMe disk array processes data on the target NVMe disk array based on the abnormal command.
  • the Raid parameters in the target NVMe command for operating the target NVMe disk array can be extracted, and when the target NVMe command is a read-write command, the target NVMe command can be converted into a corresponding Raid command based on the Raid parameter information so that the Raid execution engine can quickly process it.
  • the target NVMe command is a non-read-write command
  • the target NVMe command can be converted into a corresponding abnormal command based on the Raid parameter information so that the CPU can quickly process it.
  • Figure 2 is a second flow chart of an NVMe disk array data processing method provided in an embodiment of the present application.
  • Step S201 obtaining a target non-volatile memory interface specification command for operating a target non-volatile memory interface specification disk array, wherein the target non-volatile memory interface specification disk array is constructed based on a redundant array of independent disks method.
  • Step S202 extracting redundant array of independent disks parameter information in the target non-volatile memory interface specification command.
  • Step S203 parsing the type of the target non-volatile memory interface specification command.
  • Step S204 If the target non-volatile memory interface specification command is a read-write command, the independent disk redundant array parameter information is parsed to obtain the execution engine parameters; a target microinstruction sequence is generated based on the execution engine parameters; the target microinstruction sequence is encapsulated to obtain an independent disk redundant array command, so that the independent disk redundant array execution engine reads and writes data to the target non-volatile memory interface specification disk array based on the independent disk redundant array command.
  • the Raid parameter information can be parsed to obtain the execution engine parameters; then, based on the execution engine parameters, a target microinstruction sequence that can be processed by the Raid execution engine is generated; finally, the target microinstruction sequence is encapsulated to obtain the Raid command.
  • the Raid parameter information itself can be analyzed first to obtain the first type of parameters; then the first type of parameters can be calculated to obtain the second type of parameters other than the Raid parameter information; finally, the first type of parameters and the second type of parameters can be used as execution engine parameters to obtain complete execution engine parameters.
  • the second category of parameters can be determined according to actual needs.
  • the second category of parameters may include: AllocDataSize, which is used to characterize the size of the data space required for processing the current command; DataStartOffset, which is used to characterize the starting position of different processing data in the data space; AllocListSize is used to characterize the size of the linked list space required for processing the current command; ListStartOffset, which is used to characterize the starting position of different linked lists in the linked list space; ListMode, which is used to characterize the operation mode of the linked list, such as continuous, stepping, forward, reverse, etc.; NextCBPosition, which is used to characterize the next microinstruction position.
  • StripeID which is used to characterize the ID number of the stripe where the SLBA of the current command is located
  • ChunkOffset which is used to characterize the offset in the stripe where the SLBA of the current command is located
  • StartDevID which is used to characterize the starting disk ID where the SLBA of the current command is located
  • EndDevID which is used to characterize the ending disk ID of the current command
  • PDevID which is used to characterize the ID of the check P disk of the stripe where the SLBA of the current command is located, etc.; this application does not make specific limitations here.
  • Step S205 If the target non-volatile memory interface specification command is a non-read/write command, the target non-volatile memory interface specification command is converted into a corresponding abnormal command based on the independent redundant array of disk parameters, so that the central processing unit of the target non-volatile memory interface specification disk array processes data on the target non-volatile memory interface specification disk array based on the abnormal command.
  • Figure 3 is a third flow chart of an NVMe disk array data processing method provided in an embodiment of the present application.
  • Step S301 obtaining a target non-volatile memory interface specification command for operating a target non-volatile memory interface specification disk array, wherein the target non-volatile memory interface specification disk array is constructed based on a redundant array of independent disks method.
  • Step S302 extracting redundant array of independent disks parameter information in the target non-volatile memory interface specification command.
  • Step S303 parsing the type of the target non-volatile memory interface specification command.
  • Step S304 If the target non-volatile memory interface specification command is a read-write command, the independent disk redundant array parameter information is parsed to obtain the execution engine parameters; the corresponding stripe microinstructions are generated based on the execution engine parameters; the stripe microinstructions are sorted to obtain the original microinstruction sequence; the original microinstruction sequence is optimized to obtain the target microinstruction sequence; the target microinstruction sequence is encapsulated to obtain the independent disk redundant array command, so that the independent disk redundant array execution engine reads and writes data to the target non-volatile memory interface specification disk array based on the independent disk redundant array command.
  • the corresponding stripe microinstructions can be first generated based on the execution engine parameters, that is, microinstructions that can be processed by the Raid execution engine for processing the Raid stripe are generated, and the stripe in this application refers to dividing continuous data into data blocks of the same size, and writing each piece of data to different disks in the array; then sorting the stripe microinstructions to obtain the original microinstruction sequence; finally, optimizing the original microinstruction sequence to obtain the target microinstruction sequence.
  • the execution engine parameters can be converted according to a preset microinstruction data format to quickly obtain the corresponding stripe microinstructions; and the microinstruction data format may include a microinstruction feature area and a microinstruction parameter area, and its format may be as shown in FIG4 , and the size of each area may be determined according to actual needs; the parameters in the microinstruction feature area include the position of the stripe microinstructions in the target microinstruction sequence, the execution mode of the stripe microinstructions, the Raid execution engine of the stripe microinstructions, the debugging mode of the stripe microinstructions, the size of the stripe microinstructions, and the execution status of the stripe microinstructions; the parameters in the microinstruction parameter area include parameters determined based on the function of the Raid execution engine of the stripe microinstructions.
  • the strip microinstructions in the process of sorting the strip microinstructions to obtain the original microinstruction sequence, can be sorted based on a preset microinstruction sequence template to quickly obtain the original microinstruction sequence; and the microinstruction sequence template is used to define the corresponding strip microinstruction sequence according to the operation scenario, as well as the strip microinstruction parameters determined according to the operation scenario definition.
  • microinstruction sequence template may include:
  • Raid1WriteWriteBack used for Raid1 write operation when Cache is in WriteBack mechanism
  • Raid10WriteWriteBack used for Raid10 write operations when the Cache is in WriteBack mechanism
  • RaidReadWriteBack used for read operations in Cache with WriteBack mechanism Raid0/Raid1/Raid5/Raid6/Raid10;
  • RaidReadWriteThrough is used for read operations of Raid0/Raid1/Raid5/Raid6/Raid10 when the Cache is in WriteThrough mechanism.
  • WriteThrough represents the write-through mode, which is an operation mode for the system cache
  • WriteBack represents the write-back mode, which is also an operation mode for the system cache.
  • a microinstruction sequence template set including the above-mentioned microinstruction sequence template can also be defined.
  • a microinstruction sequence template can be selected by first encoding the RaidLevel in the Raid information, the WriteMode in the Namespace information, and the OpCode signal in the NVMe command, as shown in Figure 5, wherein OpCode is a field regarding the operation mode in the NVMe command; the microinstruction template dispatching module then sends the strip microinstructions to different engine instruction creation modules according to the engine ID in the microinstruction template, and sends the engine ID to the instruction sorting module in the order of the microinstruction sequence.
  • the engine ID output by the instruction sorting module can ensure that the microinstruction template sorting module arranges and outputs the different created engine microinstructions in the original template order, and the output result is the original microinstruction sequence, thereby quickly generating the original microinstruction sequence.
  • the characteristics of the instruction processing object in the original microinstruction sequence can be extracted; based on the characteristics of the instruction processing object, the stripe microinstructions that are not currently used in the original microinstruction sequence are deleted to obtain the target microinstruction sequence.
  • the corresponding stripe microinstructions of Raid execution engine A or Raid execution engine B can be skipped; according to the characteristics of data IO length, the corresponding stripe microinstructions of Raid execution engine B can be skipped; if Raid0 does not cross stripes or the initial disk IDs of two adjacent stripes do not overlap, the corresponding stripe microinstructions of Raid execution engine B can be skipped, etc.
  • the parameters in the original microinstruction sequence can also be reassigned based on the target NVMe command to obtain the target microinstruction sequence. For example, according to the data IO length characteristics, the parameter information of the corresponding stripe microinstruction in Raid execution engine A can be corrected; according to the IO characteristics, the relevant concurrent information in the stripe microinstruction can be adjusted.
  • the target microinstruction sequence in the process of encapsulating the target microinstruction sequence to obtain the Raid command, can also be encapsulated according to the preset Raid command format to quickly obtain the Raid command, as shown in Figure 6, etc.; and the Raid command format can include a command feature area, an original NVMe command area, an engine general parameter area and a microinstruction sequence area, and the size of each area can be determined according to actual needs; the command feature area is used to store command length, type, generation time, operation mode, and command exception type; the original NVMe command area is used to store target NVMe commands; the engine general parameter area is used to store interaction information between Raid execution engines during the execution of the Raid command; the microinstruction sequence area is used to store the target microinstruction sequence.
  • the command feature area is used to store command length, type, generation time, operation mode, and command exception type
  • the original NVMe command area is used to store target NVMe commands
  • the engine general parameter area is used to store interaction information between
  • Step S305 If the target non-volatile memory interface specification command is a non-read-write command, the target non-volatile memory interface specification command is converted into a corresponding abnormal command based on the independent disk redundant array parameter information, so that the central processing unit of the target non-volatile memory interface specification disk array processes data on the target non-volatile memory interface specification disk array based on the abnormal command.
  • the target NVMe command in the process of converting the target NVMe command into the corresponding exception command based on the Raid parameter information, the target NVMe command can also be quickly converted into the corresponding exception command based on the Raid parameter information according to the preset Raid command format, as shown in Figure 7, etc.; and the Raid command format may include a command feature area, an original NVMe command area, an engine general parameter area and a microinstruction sequence area, and the size of each area can be determined according to actual needs; the command feature area is used to store the command length, type, generation time, operation mode, and command exception type; the original NVMe command area is used to store the target NVMe command; the engine general parameter area and the microinstruction sequence area are empty.
  • the Raid command can also be stored based on a static mapping method; the Raid execution engine is notified to process the Raid command based on an asynchronous event.
  • the abnormal command can also be stored based on a static mapping method; the CPU is notified to process the abnormal command based on an asynchronous event; the Raid command or abnormal command is processed in an organized manner with the help of the Raid execution engine or CPU, and the process can be shown in Figure 8, wherein the abnormal command event format may include an abnormal command type and a resource tag, etc., and the device refers to a device for implementing the NVMe disk array data processing method of the present application.
  • static mapping refers to static mapping of the command write address, such as implementing static mapping by means of a storage space base address and an instruction tag.
  • Figure 9 is a structural diagram of an NVMe disk array data processing device provided in an embodiment of the present application.
  • a command acquirer used to acquire a target NVMe command for operating a target NVMe disk array, where the target NVMe disk array is built based on the Raid method
  • An information extractor connected to the command acquirer, used to extract Raid parameter information in the target NVMe command;
  • a task rule checker connected to the information extractor to parse the type of the target NVMe command
  • a task dispatching module connected to the task rule checker is used to dispatch the target NVMe command and Raid parameter information to the Raid command generation engine if the target NVMe command is a read-write command; if the target NVMe command is a non-read-write command, dispatch the target NVMe command and Raid parameter information to the abnormal command generation engine;
  • a Raid command generation engine connected to the task dispatching module is used to convert the target NVMe command into a corresponding Raid command based on the Raid parameter information, so that the Raid execution engine reads and writes data to the target NVMe disk array based on the Raid command;
  • the abnormal command generation engine connected to the task dispatching module is used to convert the target NVMe command into a corresponding abnormal command based on the Raid parameter information, so that the CPU of the target NVMe disk array processes data on the target NVMe disk array based on the abnormal command.
  • the NVMe disk array data processing device may also include: a command output arbitrator connected to the Raid command generation engine and the abnormal command generation engine, which is used to output the Raid command or abnormal command for storage.
  • the command output arbitrator can output the Raid command or abnormal command in the manner of RR (Round Rubin, round-robin arbitration) or WR (Weight Rubin, arbitration with weights).
  • the NVMe disk array data processing device may also include: a resource manager connected to the information extractor and the task dispatching module, used to apply for storage space from the command memory; a command memory connected to the command output arbitrator, used to store Raid commands or abnormal commands in the storage space.
  • the resource manager can manage the on-chip command memory space in a tagging manner, unify the dispatch, use and recovery control of resource tags, as shown in Figure 10, the resource manager can pre-apply for resource tags through the resource agent, and when the system has a resource request, the pre-applied resource tag is fed back to the applicant, and after the resource applicant completes the job, the resource tag is returned to the resource pool through the resource agent, so that dynamic and efficient use of resource tags can be achieved.
  • the NVMe disk array data processing device may also include: a task scheduler connected to the command output arbitrator, which is used to schedule the process of the Raid execution engine processing the Raid command.
  • the NVMe disk array data processing device may also include: a register connected to the information extractor, for storing Raid parameter information.
  • the Raid parameter information may also be stored with the aid of a memory, and the present application does not make specific limitations here.
  • the storage space of Namespace information, Raid group information and disk group information can be demarcated in the register, and the Namespace information, Raid group information and disk group information can be connected in a cascade manner, as shown in Figure 11, where Namespace information can be one or more groups.
  • Namespace information can be one or more groups.
  • the corresponding information is selected through the NSID (Namespace ID number) field in the NVMe command; Raid group information can be one or more groups.
  • the disk group information contains disk information corresponding to multiple Raid groups, and the number of groups is equal to the number of Raid groups, which is selected through the RaidGroup in the previous level Namespace information.
  • the content of Namespace information can be seen in Table 1, the content of Raid information can be seen in Table 2, and the content of disk information can be seen in Table 3, etc.
  • the data processing flow of the NVMe disk array data processing device in this application and the information interaction between its internal devices can be flexibly adjusted as needed.
  • the data processing flow of the NVMe disk array data processing device can be shown in Figure 12; the interaction process of each device in the NVMe disk array data processing device can be shown in Figure 13, etc.
  • S0 Information initialization, that is, configuring the register file during initialization, writing Namespace information, Raid information, and disk group information;
  • S2_1 Index the Raid group ID, that is, according to the Namespace ID field in the NVMe command, index the corresponding Namespace information.
  • the Raid Group ID in the information is used to index the Raid group information;
  • S2_2 Index disk group ID, that is, according to the Device information in the Raid group information, index the physical disk group information involved in the Raid group;
  • S2_3 Resource application, that is, when obtaining information, apply to the resource manager for storage space of the command memory;
  • rule judgment information that is, sending information related to rule judgment to the task rule checker to filter commands that can be converted by the NVMe disk array data processing device and commands that cannot be converted by the NVMe disk array data processing device according to the information;
  • rule judgment result that is, the task rule checker sends the rule judgment result to the task dispatcher, and the task dispatcher dispatches the current task to the Raid command generation engine or the abnormal command generation engine according to the result;
  • resource tag information that is, the resource tag information is dispatched by the task dispatcher to the Raid command generation engine or the abnormal command generation engine, and the engine writes the generated command into the specified position of the command memory according to the resource tag information;
  • S4_1 Convertible NVMe commands and related information, that is, the task dispatcher sends the convertible NVMe commands and related information to the Raid command generation engine.
  • the related information refers to the Namespace information, Raid group information, and disk group information obtained in the S2 stage;
  • Execution engine parameters and command feature information i.e., the command parser analyzes and calculates the execution engine parameter information according to the NVMe command, Namespace information, Raid group information and disk group information, and these parameter information are used to form stripe microinstructions; and command feature information is obtained, and this information is used by the stripe microinstruction sequence optimization module to optimize the microinstructions or microinstruction sequences;
  • S4_3 original sequence, i.e. the stripe microinstruction sequence generator composes the execution engine parameter information generated in the S4_2 stage into stripe microinstructions, and arranges these microinstructions into the original microinstruction sequence in a certain order;
  • Optimize sequence i.e. the strip microinstruction sequence optimizer optimizes the original microinstruction sequence according to the command feature information generated in the S4_2 stage, including operations such as deleting microinstructions in the sequence and adjusting parameters in the microinstructions; the optimized microinstruction sequence is sent to the instruction assembler for encapsulation of the final Raid command format;
  • S5_1 unconvertible NVMe commands and related information, i.e., the task dispatcher sends the unconvertible NVMe commands and related information to the abnormal command generation engine.
  • the related information refers to the Namespace information, Raid group information, disk group information and rule judgment result information obtained in the S2 and S3 stages;
  • S5_2 Abnormal command information, that is, extracting part or all of the NVMe command, Namespace information, Raid group information, disk group information and rule judgment result information and sending them to the instruction assembler, which encapsulates the final abnormal command format.
  • abnormal mode information that is, the abnormal command feedback module uses a synchronous or asynchronous communication mechanism to notify other devices in the system of the abnormal command, such as the CPU;
  • S6_1 Normal Raid command, that is, sending the final normal Raid command of the S4 stage to the command output arbitrator.
  • S6_2 Exception command, that is, sending the final exception command of the S5 stage to the command output arbitrator.
  • Raid command i.e., the command output arbiter outputs the Raid command according to the RR or WR arbitration mode, and the Raid command is written into the specified location of the command memory according to the resource tag information obtained in the S3 stage;
  • S6_5 abnormal command notification, that is, when an abnormal command is generated in the S6_2 stage, the CPU is notified to process the abnormal command;
  • R7 Raid command scheduling, that is, the task scheduler schedules the Raid execution engine to execute tasks.
  • R8 Raid subtask execution, that is, the Raid execution engine executes tasks according to the commands in the command memory.
  • S9_1 Submit the NVMe command, that is, after the Raid execution engine completes the command execution, it submits the NVMe command end information to the master end.
  • S9_2 Resource recovery, that is, after the Raid execution engine completes the command execution, it returns the resource marking information to the resource manager, and the command memory releases the current command space.
  • the structure of the NVMe disk array data processing device in this application can also be flexibly adjusted as needed.
  • a multi-channel approach can be used to achieve concurrent conversion of multiple commands to improve the execution performance of the NVMe disk array data processing device.
  • two Raid command generation engines are integrated in the NVMe disk array data processing device, which can convert two NVMe commands respectively.
  • two stripe microinstruction sequence generators and optimizers are concurrently integrated, and commands can be converted for two independent Raid stripes at the same time. This not only simplifies the command parsing design and stripe microinstruction sequence templates, but also improves the speed of the entire NVMe command conversion Raid operation command.
  • the present application also provides an NVMe disk array data processing device and a non-volatile computer-readable storage medium, both of which have the corresponding effects of an NVMe disk array data processing method provided in an embodiment of the present application.
  • Figure 15 is a structural diagram of an NVMe disk array data processing device provided in an embodiment of the present application.
  • An NVMe disk array data processing device provided in an embodiment of the present application includes a memory 201 and a processor 202.
  • the memory 201 stores a computer program.
  • the processor 202 executes the computer program, the steps of the NVMe disk array data processing method described in any of the above embodiments are implemented.
  • Another NVMe disk array data processing device may also include: an input port 203 connected to the processor 202, used to transmit commands input from the outside to the processor 202; a display unit 204 connected to the processor 202, used to display the processing results of the processor 202 to the outside; a communication module 205 connected to the processor 202, used to realize the communication between the NVMe disk array data processing device and the outside.
  • the display unit 204 can be a display panel, a laser scanning display, etc.; the communication mode adopted by the communication module 205 includes but is not limited to mobile high-definition link technology (HML), universal serial bus (USB), high-definition multimedia interface (HDMI), wireless connection: wireless fidelity technology (WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s.
  • HML mobile high-definition link technology
  • USB universal serial bus
  • HDMI high-definition multimedia interface
  • WiFi wireless fidelity technology
  • Bluetooth communication technology Bluetooth communication technology
  • low-power Bluetooth communication technology low-power Bluetooth communication technology
  • An embodiment of the present application provides a non-volatile computer-readable storage medium, in which a computer program is stored.
  • the computer program is executed by a processor, the steps of the NVMe disk array data processing method described in any of the above embodiments are implemented.
  • the non-volatile computer-readable storage medium involved in the present application includes random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the technical field.
  • RAM random access memory
  • ROM read-only memory
  • electrically programmable ROM electrically erasable programmable ROM
  • registers hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the technical field.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请公开了一种NVMe磁盘阵列数据处理方法、装置、设备及存储介质,获取对基于Raid方法搭建目标NVMe磁盘阵列进行操作的目标NVMe命令;提取目标NVMe命令中的Raid参数信息;解析目标NVMe命令的类型;若目标NVMe命令为读写命令,则基于Raid参数信息将目标NVMe命令转换为对应的Raid命令,以使Raid执行引擎基于Raid命令对目标NVMe磁盘阵列进行数据读写;若目标NVMe命令为非读写命令,则基于Raid参数信息将目标NVMe命令转换为对应的异常命令,以使目标NVMe磁盘阵列的CPU基于异常命令对目标NVMe磁盘阵列进行数据处理;提高了NVMe磁盘阵列的数据处理效率。

Description

NVMe磁盘阵列数据处理方法、装置、设备及存储介质
本申请要求于2022年11月30日提交中国专利局、申请号为202211518343.8、发明名称为“NVMe磁盘阵列数据处理方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及存储技术领域,更具体地说,涉及NVMe磁盘阵列数据处理方法、装置、设备及存储介质。
背景技术
近年来随着存储技术的高速发展,NVMe(Non Volatile Memory Express,非易失性内存接口规范)设备的使用场景已经越来越广泛。NVMe是一种非易失性内存主机控制器接口规范,该标准协议具有低延时、高并发以及低功耗的特性,是一种高性能、高可扩展的存储协议,用于连接主机和内存子系统。为了进一步提高NVMe磁盘数据的存储性能和可靠性,一般将多个独立的NVMe磁盘组成在一起形成一个大的磁盘系统,即Raid(Redundant Array of Independent Disks,独立磁盘冗余阵列)组独立磁盘冗余阵列。
常见的Raid组等级包括Raid0、Raid1、Raid5、Raid6、Raid10等。Raid0可以提供非常高的执行性能,基本的读写操作是单块磁盘的N倍(N为组成Raid0的磁盘数)。Raid1在写数据时,将同一份数据无差别的分别写到工作磁盘和镜像磁盘,具有比Raid0更好的可靠性。Raid5是把数据和相对应的奇偶校验信息分别存储于不同的磁盘上,兼顾了存储性能、数据安全和存储成本。Raid6每个数据块有两个校验保护信息,因此数据的可靠性更高。Raid10兼备了Raid 1和Raid 0的优点,从Raid1来看,相当于写双份数据,起到了数据保障的作用,从Raid0来看,数据可分为N(N为组成Raid0的磁盘数)份并发的读写,保障了数据的读写效率。
虽然可以借助Raid来保证NVMe磁盘阵列的读写效率,但是在NVMe磁盘阵列中依然使用NVMe命令读写命令进行数据处理,由于NVMe命令与NVMe磁盘阵列的匹配度较差,使得NVMe磁盘阵列的数据处理效率较慢。
综上所述,如何基于NVMe命令快速对NVMe磁盘阵列进行数据处理便是目前本领域技术人员亟待解决的问题。发明内容
本申请的目的是提供一种NVMe磁盘阵列数据处理方法,其能在一定程度上解决如何基于NVMe命令快速对NVMe磁盘阵列进行数据处理的技术问题。本申请还提供了一种NVMe磁盘阵列数据处理装置、设备及非易失性计算机可读存储介质。
为了实现上述目的,本申请提供如下技术方案:
一种NVMe磁盘阵列数据处理方法,包括:
获取对目标NVMe磁盘阵列进行操作的目标NVMe命令,所述目标NVMe磁盘阵列基于Raid方法搭建;
提取所述目标NVMe命令中的Raid参数信息;
解析所述目标NVMe命令的类型;
若所述目标NVMe命令为读写命令,则基于所述Raid参数信息将所述目标NVMe命令转换为对应的Raid命令,以使Raid执行引擎基于所述Raid命令对所述目标NVMe磁盘阵列进行数据读写;
若所述目标NVMe命令为非读写命令,则基于所述Raid参数信息将所述目标NVMe命令转换为对应的异常命令,以使所述目标NVMe磁盘阵列的CPU基于所述异常命令对所述目标NVMe磁盘阵列进行数据处理。
在一些实施例中,所述基于所述Raid参数信息将所述目标NVMe命令转换为对应的Raid命令,包括:
对所述Raid参数信息进行解析,得到执行引擎参数;
基于所述执行引擎参数生成目标微指令序列;
对所述目标微指令序列进行封装,得到所述Raid命令。
在一些实施例中,所述对所述Raid参数信息进行解析,得到执行引擎参数,包括:
对所述Raid参数信息进行分析,得到第一类参数;
对所述第一类参数进行计算,得到第二类参数;
将所述第一类参数和所述第二类参数作为所述执行引擎参数。
在一些实施例中,所述基于所述执行引擎参数生成目标微指令序列,包括:
基于所述执行引擎参数生成对应的条带微指令;
对所述条带微指令进行排序,得到原始微指令序列;
对所述原始微指令序列进行优化,得到所述目标微指令序列。
在一些实施例中,所述基于所述执行引擎参数生成对应的条带微指令,包括:
按照预设的微指令数据格式对所述执行引擎参数进行转换,得到对应的所述条带微指令;
其中,所述微指令数据格式包括微指令特征区和微指令参数区;所述微指令特征区中的参数包括所述条带微指令在所述目标微指令序列中的位置、所述条带微指令的执行方式、所述条带微指令的所述Raid执行引擎、所述条带微指令的调试模式、所述条带微指令的大小、所述条带微指令的执行状态;所述微指令参数区中参数包括基于所述条带微指令的所述Raid执行引擎的功能确定的参数。
在一些实施例中,所述对所述条带微指令进行排序,得到原始微指令序列,包括:
基于预设的微指令序列模板对所述条带微指令进行排序,得到所述原始微指令序列;
其中,所述微指令序列模板用于根据操作场景定义对应的微指令序列,以及根据所述操作场景定义确定的微指令参数。
在一些实施例中,所述对所述原始微指令序列进行优化,得到所述目标微指令序列,包括:
提取所述原始微指令序列中指令处理对象的特征;
基于所述指令处理对象的特征,删除所述原始微指令序列中当前不使用的微指令,得到所述目标微指令序列。
在一些实施例中,所述对所述原始微指令序列进行优化,得到所述目标微指令序列,包括:
基于所述目标NVMe命令对所述原始微指令序列中的参数重新赋值,得到所述目标微指令序列。
在一些实施例中,所述对所述目标微指令序列进行封装,得到所述Raid命令,包括:
按照预设的Raid命令格式对所述目标微指令序列进行封装,得到所述Raid命令;
其中,所述Raid命令格式包括命令特征区、原始NVMe命令区、引擎通用参数区和微指令序列区;所述命令特征区用于存储命令长度、类型、生成时间、操作模式、命令异常类型;所述原始NVMe命令区用于存储所述目标NVMe命令;所述引擎通用参数区用于存储在所述Raid命令的执行过程中、所述Raid执行引擎间的交互信息;所述微指令序列区用于存储所述目标微指令序列。
在一些实施例中,所述基于所述Raid参数信息将所述目标NVMe命令转换为对应的异常命令,包括:
按照预设的Raid命令格式,基于所述Raid参数信息将所述目标NVMe命令转换为对应的所述异常命令;
其中,所述Raid命令格式包括命令特征区、原始NVMe命令区、引擎通用参数区和微指令序列区;所述命令特征区用于存储命令长度、类型、生成时间、操作模式、命令异常类型;所述原始NVMe命令区用于存储所述目标NVMe命令;所述引擎通用参数区与所述微指令序列区为空。
在一些实施例中,所述提取所述目标NVMe命令中的Raid参数信息,包括:
提取所述目标NVMe命令中的所述Raid参数信息,所述Raid参数信息包括Namespace信息、Raid组信息和盘组信息。
在一些实施例中,所述基于所述Raid参数信息将所述目标NVMe命令转换为对应的Raid命令之后,还包括:
基于静态映射的方式存储所述Raid命令;
基于异步事件的方式通知所述Raid执行引擎处理所述Raid命令。
在一些实施例中,所述基于所述Raid参数信息将所述目标NVMe命令转换为对应的异常命令之后,还包括:
基于静态映射的方式存储所述异常命令;
基于异步事件的方式通知所述CPU处理所述异常命令。
一种NVMe磁盘阵列数据处理装置,包括:
命令获取器,用于获取对目标NVMe磁盘阵列进行操作的目标NVMe命令,所述目标NVMe磁盘阵列基于Raid方法搭建;
与所述命令获取器连接的信息提取器,用于提取所述目标NVMe命令中的Raid参数信息;
与所述信息提取器连接的任务规则检查器,用于解析所述目标NVMe命令的类型;
与所述任务规则检查器连接的任务派发模块,用于若所述目标NVMe命令为读写命令,则将所述目标NVMe命令及所述Raid参数信息派发给Raid命令生成引擎;若所述目标NVMe命令为非读写命令,则将所述目标NVMe命令及所述Raid参数信息派发给异常命令生成引擎;
与所述任务派发模块连接的所述Raid命令生成引擎,用于基于所述Raid参数信息将所述目标NVMe命令转换为对应的Raid命令,以使Raid执行引擎基于所述Raid命令对所述目标NVMe磁盘阵列进行数据读写;
与所述任务派发模块连接的所述异常命令生成引擎,用于基于所述Raid参数信息将所述目标NVMe命令转换为对应的异常命令,以使所述目标NVMe磁盘阵列的CPU基于所述异常命令对所述目标NVMe磁盘阵列进行数据处理。
在一些实施例中,还包括:
与所述Raid命令生成引擎及所述异常命令生成引擎连接的命令输出仲裁器,用于输出所述Raid命令或所述异常命令进行存储。
在一些实施例中,还包括:
与所述信息提取器及所述任务派发模块连接的资源管理器,用于从命令存储器中申请存储空间;
与所述命令输出仲裁器连接的所述命令存储器,用于在所述存储空间中存储所述Raid命令或所述异常命令。
在一些实施例中,还包括:
与所述命令输出仲裁器连接的任务调度器,用于对所述Raid执行引擎处理所述Raid命令的过程进行调度。
在一些实施例中,还包括:
与所述信息提取器连接的寄存器,用于存储所述Raid参数信息。
一种NVMe磁盘阵列数据处理设备,包括:
存储器,用于存储计算机程序;
处理器,用于执行所述计算机程序时实现如上任一所述NVMe磁盘阵列数据处理方法的步骤。
一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质中存储有计算机程序,所述计算机程序被处理器执行时实现如上任一所述NVMe磁盘阵列数据处理方法的步骤。
本申请提供的一种NVMe磁盘阵列数据处理方法,获取对目标NVMe磁盘阵列进行操作的目标NVMe命令,目标NVMe磁盘阵列基于Raid方法搭建;提取目标NVMe命令中的Raid参数信息;解析目标NVMe命令的类型;若目标NVMe命令为读写命令,则基于Raid参数信息将目标NVMe命令转换为对应的Raid命令,以使Raid执行引擎基于Raid命令对目标NVMe磁盘阵列进行数据读写;若目标NVMe命令为非读写命令,则基于Raid参数信息将目标NVMe命令转换为对应的异常命令,以使目标NVMe磁盘阵列的CPU基于异常命令对目标NVMe磁盘阵列进行数据处理。本申请中,可以提取对目标NVMe磁盘阵列进行操作的目标NVMe命令中的Raid参数,并且在目标NVMe命令为读写命令时,可以基于Raid参数信息将目标NVMe命令转换为对应的Raid命令来使Raid执行引擎对其快速进行处理,在目标NVMe命令为非读写命令时,可以基于Raid参数信息将目标NVMe命令转换为对应的异常命令来使CPU对其进行快速处理,实现了借助性能不同的Raid执行引擎和CPU来针对性的对不同的NVMe命令进行处理,提高了NVMe命令与NVMe磁盘阵列的匹配度,进而提高了NVMe磁盘阵列的数据处理效率。本申请提供的一种NVMe磁盘阵列数据处理装置、设备及非易失性计算机可读存储介质也解决了相应技术问题。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本申请实施例提供的一种NVMe磁盘阵列数据处理方法的第一流程图;
图2为本申请实施例提供的一种NVMe磁盘阵列数据处理方法的第二流程图;
图3为本申请实施例提供的一种NVMe磁盘阵列数据处理方法的第三流程图;
图4为微指令数据格式示意图;
图5为微指令序列创建结构示意图;
图6为Raid命令封装格式示意图;
图7为异常命令封装格式示意图;
图8为异常命令与主设备CPU的交互示意图;
图9为本申请实施例提供的一种NVMe磁盘阵列数据处理装置的结构示意图;
图10为资源池的结构示意图;
图11为Namespace、Raid、盘组信息二级索引示意图;
图12为NVMe磁盘阵列数据处理装置的数据处理流程图;
图13为NVMe磁盘阵列数据处理装置中各器件的交互过程图;
图14为多通道实现NVMe命令向Raid操作命令的转换示意图;
图15为本申请实施例提供的一种NVMe磁盘阵列数据处理设备的结构示意图;
图16为本申请实施例提供的一种NVMe磁盘阵列数据处理设备的另一结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
请参阅图1,图1为本申请实施例提供的一种NVMe磁盘阵列数据处理方法的第一流程图。
本申请实施例提供的一种NVMe磁盘阵列数据处理方法,可以包括以下步骤:
步骤S101:获取对目标非易失性内存接口规范磁盘阵列进行操作的目标非易失性内存接口规范命令,目标非易失性内存接口规范磁盘阵列基于独立磁盘冗余阵列方法搭建。
实际应用中,可以先获取对目标NVMe磁盘阵列进行操作的目标NVMe命令,比如可以从目标NVMe磁盘阵列的主机端获取该目标NVMe命令等,目标NVMe命令的内容、格式、获取方式等均可以根据具体应用场景来确定,本申请在此不做具体限定。不过需要说明的是,本申请中的目标NVMe磁盘阵列指的是基于Raid方法搭建的磁盘阵列,也即是通过基于Raid方法来对多个NVMe磁盘进行组合得到的磁盘阵列,目标NVMe磁盘阵列的大小及所依据的Raid方法等均可以根据实际需要确定。
步骤S102:提取目标非易失性内存接口规范命令中的独立磁盘冗余阵列参数信息。
实际应用中,在获取对目标NVMe磁盘阵列进行操作的目标NVMe命令之后,便可以提取目标NVMe命令中的Raid参数信息,以便后续基于该Raid参数信息对目标NVMe命令进行转换。
具体应用场景中,Raid参数信息的类型可以根据实际需要确定,比如Raid参数信息可以包括Namespace信息、Raid组信息和盘组信息等,具体的,在提取目标NVMe命令中的Raid参数信息的过程中,可以先根据目标NVMe命令中的Namespace(命名空间)ID(标识)字段,索引对应的Namespace信息,依据该信息中的Raid Group ID来索引Raid组信息,最后再根据Raid组信息中的Device信息,索引该Raid组所涉及的盘组信息,比如物理盘组信息等。
需要说明的是,Namespace信息、Raid组信息和盘组信息的具体内容可以根据实际需要来确定,比如Namespace信息可以包括当前Namespace的读写特征、大小范围、对应的Raid组ID、有效标记等信息;Raid组信息可以包括当前Raid组类型、状态、特征、操作特点、盘组信息、有效标记等信息;盘组信息可以包括一个Raid组中涉及盘的类型、操作通道号、物理ID号、校验码、有效标记等信息。
步骤S103:解析目标非易失性内存接口规范命令的类型。
步骤S104:若目标非易失性内存接口规范命令为读写命令,则基于独立磁盘冗余阵列参数信息将目标非易失性内存接口规范命令转换为对应的独立磁盘冗余阵列命令,以使独立磁盘冗余阵列执行引擎基于独立磁盘冗余阵列命令对目标非易失性内存接口规范磁盘阵列进行数据读写。
步骤S105:若目标非易失性内存接口规范命令为非读写命令,则基于独立磁盘冗余阵列参数信息将目标非易失性内存接口规范命令转换为对应的异常命令,以使目标非易失性内存接口规范磁盘阵列的中央处理器基于异常命令对目标非易失性内存接口规范磁盘阵列进行数据处理。
实际应用中,在提取目标NVMe命令中的Raid参数信息之后,便可以解析目标NVMe命令的类型,并根据解析结果来决定对目标NVMe命令的处理方式。
具体应用场景中,可以根据目标NVMe命令的类型将目标NVMe命令分为读写命令和非读写命令,以此来针对性的对目标NVMe命令进行处理,并且在目标NVMe命令为读写命令的情况下,可以基于Raid参数信息将目标NVMe命令转换为对应的Raid命令,比如转换为对Raid0阵列的Raid命令,转转换为对Raid1阵列的Raid命令,转换为对Raid5阵列的Raid命令,转换为对Raid6阵列的Raid命令、转换为对Raid10阵列的Raid命令等,以使Raid执行引擎基于Raid命令对目标NVMe磁盘阵列进行数据读写;在目标NVMe命令为非读写命令的情况下,可以基于Raid参数信息将目标NVMe命令转换为对应的异常命令,以使目标NVMe磁盘阵列的CPU(central processing unit,中央处理器),比如核心CPU来基于异常命令对目标NVMe磁盘阵列进行数据处理。
需要说明的是,本申请中的异常命令指的是与Raid命令不同的命令,其还可以用目标命令、第二命令等进行表述;此外,非读写命令的NVMe命令的具体类型可以根据实际需要确定,比如当NVMe命令为Admin命令;或当NVMe命令中PRP(Physical Region Page)1非4KB对齐;或当NVMe命令SLBA(Starting Logical Block Address)超界时;或当前Namespace无效时;或当RaidLevel不为Raid0/Raid1/Raid5/Raid6/Raid10;或当Raid组的ChunkSize不为64KB/128KB/256KB/512KB/1024KB时;或当Raid组盘数超界时;或当IO长度超界时;或当Raid组RaidGroupValid为无效时;或当Raid组RaidState为非正常状态时;可以认为目标NVMe命令为非读写命令等。
本申请提供的一种NVMe磁盘阵列数据处理方法,获取对目标NVMe磁盘阵列进行操作的目标NVMe命令,目标NVMe磁盘阵列基于Raid方法搭建;提取目标NVMe命令中的Raid参数信息;解析目标NVMe命令的类型;若目标NVMe命令为读写命令,则基于Raid参数信息将目标NVMe命令转换为对应的Raid命令,以使Raid执行引擎基于Raid命令对目标NVMe磁盘阵列进行数据读写;若目标NVMe命令为非读写命令,则基于Raid参数信息将目标NVMe命令转换为对应的异常命令,以使目标NVMe磁盘阵列的CPU基于异常命令对目标NVMe磁盘阵列进行数据处理。本申请中,可以提取对目标NVMe磁盘阵列进行操作的目标NVMe命令中的Raid参数,并且在目标NVMe命令为读写命令时,可以基于Raid参数信息将目标NVMe命令转换为对应的Raid命令来使Raid执行引擎对其快速进行处理,在目标NVMe命令为非读写命令时,可以基于Raid参数信息将目标NVMe命令转换为对应的异常命令来使CPU对其进行快速处理,实现了借助性能不同的Raid执行引擎和CPU来针对性的对不同的NVMe命令进行处理,提高了NVMe命令与NVMe磁盘阵列的匹配度,进而提高了NVMe磁盘阵列的数据处理效率。
请参阅图2,图2为本申请实施例提供的一种NVMe磁盘阵列数据处理方法的第二流程图。
本申请实施例提供的一种NVMe磁盘阵列数据处理方法,可以包括以下步骤:
步骤S201:获取对目标非易失性内存接口规范磁盘阵列进行操作的目标非易失性内存接口规范命令,目标非易失性内存接口规范磁盘阵列基于独立磁盘冗余阵列方法搭建。
步骤S202:提取目标非易失性内存接口规范命令中的独立磁盘冗余阵列参数信息。
步骤S203:解析目标非易失性内存接口规范命令的类型。
步骤S204:若目标非易失性内存接口规范命令为读写命令,则对独立磁盘冗余阵列参数信息进行解析,得到执行引擎参数;基于执行引擎参数生成目标微指令序列;对目标微指令序列进行封装,得到独立磁盘冗余阵列命令,以使独立磁盘冗余阵列执行引擎基于独立磁盘冗余阵列命令对目标非易失性内存接口规范磁盘阵列进行数据读写。
实际应用中,在基于Raid参数信息将目标NVMe命令转换为对应的Raid命令的过程中,可以对Raid参数信息进行解析,得到执行引擎参数;再基于执行引擎参数生成能够被Raid执行引擎处理的目标微指令序列;最后对目标微指令序列进行封装,得到Raid命令。
具体应用场景中,在对Raid参数信息进行解析,得到执行引擎参数的过程中,可以先对Raid参数信息本身进行分析,得到第一类参数;再对第一类参数进行计算,得到Raid参数信息之外的第二类参数;最后将第一类参数和第二类参数作为执行引擎参数,以得到完备的执行引擎参数。
需要说明的是,第二类参数的类型可以根据实际需要确定,比如第二类参数可以包括:AllocDataSize,用于表征处理当前命令所需数据空间大小;DataStartOffset,用于表征不同处理数据在数据空间的起始位置;AllocListSize用于表征处理当前命令所需链表空间大小;ListStartOffset,用于表征不同链表在链表空间的起始位置;ListMode,用于表征链表的操作模式,连续、步进、正向、反向等;NextCBPosition,用于表征下一个微指令位置,当微指令序列中微指令执行可能出现分支或者跳转时,当前微指令中的参数需要该信息;StripeID,用于表征当前命令的SLBA所在条带的ID号;ChunkOffset,用于表征当前命令的SLBA所在条带中的偏移量;StartDevID,用于表征当前命令的SLBA所在起始盘ID;EndDevID,用于表征当前命令的结束盘ID;PDevID,用于表征当前命令的SLBA所在条带的校验P盘的ID等;本申请在此不做具体限定。
步骤S205:若目标非易失性内存接口规范命令为非读写命令,则基于独立磁盘冗余阵列参数信息将目标非易失性内存接口规范命令转换为对应的异常命令,以使目标非易失性内存接口规范磁盘阵列的中央处理器基于异常命令对目标非易失性内存接口规范磁盘阵列进行数据处理。
请参阅图3,图3为本申请实施例提供的一种NVMe磁盘阵列数据处理方法的第三流程图。
本申请实施例提供的一种NVMe磁盘阵列数据处理方法,可以包括以下步骤:
步骤S301:获取对目标非易失性内存接口规范磁盘阵列进行操作的目标非易失性内存接口规范命令,目标非易失性内存接口规范磁盘阵列基于独立磁盘冗余阵列方法搭建。
步骤S302:提取目标非易失性内存接口规范命令中的独立磁盘冗余阵列参数信息。
步骤S303:解析目标非易失性内存接口规范命令的类型。
步骤S304:若目标非易失性内存接口规范命令为读写命令,则对独立磁盘冗余阵列参数信息进行解析,得到执行引擎参数;基于执行引擎参数生成对应的条带微指令;对条带微指令进行排序,得到原始微指令序列;对原始微指令序列进行优化,得到目标微指令序列;对目标微指令序列进行封装,得到独立磁盘冗余阵列命令,以使独立磁盘冗余阵列执行引擎基于独立磁盘冗余阵列命令对目标非易失性内存接口规范磁盘阵列进行数据读写。
实际应用中,在基于执行引擎参数生成目标微指令序列的过程中,可以先基于执行引擎参数生成对应的条带微指令,也即生成可被Raid执行引擎处理的用于对Raid条带进行处理的微指令,且本申请中的条带指的是把连续的数据分割成相同大小的数据块,把每段数据分别写入到阵列中的不同磁盘上;再对条带微指令进行排序,得到原始微指令序列;最后对原始微指令序列进行优化,得到目标微指令序列。
具体应用场景中,在基于执行引擎参数生成对应的条带微指令的过程中,可以按照预设的微指令数据格式对执行引擎参数进行转换,快速得到对应的条带微指令;且微指令数据格式可以包括微指令特征区和微指令参数区,其格式可以如图4所示,各个区的大小可以根据实际需要确定;微指令特征区中的参数包括条带微指令在目标微指令序列中的位置、条带微指令的执行方式、条带微指令的Raid执行引擎、条带微指令的调试模式、条带微指令的大小、条带微指令的执行状态;微指令参数区中参数包括基于条带微指令的Raid执行引擎的功能确定的参数。
具体应用场景中,在对条带微指令进行排序,得到原始微指令序列的过程中,可以基于预设的微指令序列模板对条带微指令进行排序,快速得到原始微指令序列;且微指令序列模板用于根据操作场景定义对应的条带微指令序列,以及根据操作场景定义确定的条带微指令参数。
需要说明的是,微指令序列模板的类型可以根据实际需要确定,比如微指令序列模板可以包括:
Raid0WriteWriteBack,用于在Cache为WriteBack机制时Raid0的写操作;
Raid0WriteWriteThrough,用于在Cache为WriteThrough机制时Raid0的写操作;
Raid1WriteWriteBack,用于在Cache为WriteBack机制时Raid1的写操作;
Raid1WriteWriteThrough,用于在Cache为WriteThrough机制时Raid1的写操作;
Raid5WriteWriteBack,用于在Cache为WriteBack机制时Raid5的写操作;
Raid5WriteWriteThrough,用于在Cache为WriteThrough机制时,Raid5的写操作;
Raid6WriteWriteBack,用于在Cache为WriteBack机制时Raid6的写操作;
Raid6WriteWriteThrough,用于在Cache为WriteThrough机制时Raid6的写操作;
Raid10WriteWriteBack,用于在Cache为WriteBack机制时Raid10的写操作;
Raid10WriteWriteThrough,用于在Cache为WriteThrough机制时Raid10的写操作;
RaidReadWriteBack,用于在Cache为WriteBack机制Raid0/Raid1/Raid5/Raid6/Raid10的读操作;
RaidReadWriteThrough,用于在Cache为WriteThrough机制时Raid0/Raid1/Raid5/Raid6/Raid10的读操作等。
其中,WriteThrough表示写通模式,面向系统缓存的一种操作模式;WriteBack表示写回模式,也是面向系统缓存的一种操作模式。
此外,在具体应用场景中,还可以定义包括上述微指令序列模板的微指令序列模板集合,在创建原始指令序列时,可以先通过Raid信息中的RaidLevel、Namespace信息中的WriteMode、NVMe命令中的OpCode信号组合编码选出一个微指令序列模板,如图5所示,其中,OpCode为NVMe命令中关于操作模式的字段;微指令模板派发模块再根据微指令模板中的引擎ID,将条带微指令发送至不同的引擎指令创建模块,同时按照微指令序列顺序将引擎ID送入指令排序模块,指令排序模块输出的引擎ID可确保微指令模板排序模块对不同创建完成的引擎微指令按照原先的模板顺序排放并输出,输出的结果即为原始微指令序列,以此来快速生成原始微指令序列。
具体应用场景中,在对原始微指令序列进行优化,得到目标微指令序列的过程中,可以提取原始微指令序列中指令处理对象的特征;基于指令处理对象的特征,删除原始微指令序列中当前不使用的条带微指令,得到目标微指令序列。比如可以根据不同微指令类型选择跳过Raid执行引擎A或者Raid执行引擎B的相应条带微指令;根据数据IO长度特征,跳过Raid执行引擎B的相应条带微指令;若Raid0未跨条带或者紧邻两个条带初始磁盘ID不重合时,跳过Raid执行引擎B的相应条带微指令等。
具体应用场景中,在对原始微指令序列进行优化,得到目标微指令序列的过程中,还可以基于目标NVMe命令对原始微指令序列中的参数重新赋值,得到目标微指令序列。比如可以根据数据IO长度特征,修正Raid执行引擎A中相应条带微指令的参数信息;根据IO特征,调整条带微指令中的相关并发信息等。
具体应用场景中,在对目标微指令序列进行封装,得到Raid命令的过程中,还可以按照预设的Raid命令格式对目标微指令序列进行封装,快速得到Raid命令,如图6所示等;且Raid命令格式可以包括命令特征区、原始NVMe命令区、引擎通用参数区和微指令序列区,各个区的大小等可以根据实际需要确定;命令特征区用于存储命令长度、类型、生成时间、操作模式、命令异常类型;原始NVMe命令区用于存储目标NVMe命令;引擎通用参数区用于存储在Raid命令的执行过程中、Raid执行引擎间的交互信息;微指令序列区用于存储目标微指令序列。
步骤S305:若目标非易失性内存接口规范命令为非读写命令,则基于独立磁盘冗余阵列参数信息将目标非易失性内存接口规范命令转换为对应的异常命令,以使目标非易失性内存接口规范磁盘阵列的中央处理器基于异常命令对目标非易失性内存接口规范磁盘阵列进行数据处理。
具体应用场景中,在基于Raid参数信息将目标NVMe命令转换为对应的异常命令的过程中,还可以按照预设的Raid命令格式,基于Raid参数信息快速将目标NVMe命令转换为对应的异常命令,如图7所示等;且Raid命令格式可以包括命令特征区、原始NVMe命令区、引擎通用参数区和微指令序列区,各个区的大小等可以根据实际需要确定;命令特征区用于存储命令长度、类型、生成时间、操作模式、命令异常类型;原始NVMe命令区用于存储目标NVMe命令;引擎通用参数区与微指令序列区为空。
具体应用场景中,在基于Raid参数信息将目标NVMe命令转换为对应的Raid命令之后,还可以基于静态映射的方式存储Raid命令;基于异步事件的方式通知Raid执行引擎处理Raid命令。相应的,在基于Raid参数信息将目标NVMe命令转换为对应的异常命令之后,还可以基于静态映射的方式存储异常命令;基于异步事件的方式通知CPU处理异常命令;以条理化的借助Raid执行引擎或CPU来处理Raid命令或异常命令,其过程可以如图8所示,其中,异常命令事件格式可以包括异常命令类型和资源标记等,其中的装置指的是实现本申请NVMe磁盘阵列数据处理方法的装置。需要说明的是静态映射指的是对命令写入地址进行静态映射,比如通过存储空间基地址和指令标记的方式实现静态映射等。
请参阅图9,图9为本申请实施例提供的一种NVMe磁盘阵列数据处理装置的结构示意图。
本申请实施例提供的一种NVMe磁盘阵列数据处理装置,可以包括:
命令获取器,用于获取对目标NVMe磁盘阵列进行操作的目标NVMe命令,目标NVMe磁盘阵列基于Raid方法搭建;
与命令获取器连接的信息提取器,用于提取目标NVMe命令中的Raid参数信息;
与信息提取器连接的任务规则检查器,用于解析目标NVMe命令的类型;
与任务规则检查器连接的任务派发模块,用于若目标NVMe命令为读写命令,则将目标NVMe命令及Raid参数信息派发给Raid命令生成引擎;若目标NVMe命令为非读写命令,则将目标NVMe命令及Raid参数信息派发给异常命令生成引擎;
与任务派发模块连接的Raid命令生成引擎,用于基于Raid参数信息将目标NVMe命令转换为对应的Raid命令,以使Raid执行引擎基于Raid命令对目标NVMe磁盘阵列进行数据读写;
与任务派发模块连接的异常命令生成引擎,用于基于Raid参数信息将目标NVMe命令转换为对应的异常命令,以使目标NVMe磁盘阵列的CPU基于异常命令对目标NVMe磁盘阵列进行数据处理。
本申请实施例提供的NVMe磁盘阵列数据处理装置中各个器件的相关功能可以参阅上述实施例,在此不再赘述。
实际应用中,本申请实施例提供的NVMe磁盘阵列数据处理装置中,还可以包括:与Raid命令生成引擎及异常命令生成引擎连接的命令输出仲裁器,用于输出Raid命令或异常命令进行存储。具体的,命令输出仲裁器可以以RR(Round Rubin,轮询仲裁方式)或WR(Weight Rubin,带有权重的仲裁方式)的方式输出Raid命令或异常命令等。
实际应用中,本申请实施例提供的NVMe磁盘阵列数据处理装置中,还可以包括:与信息提取器及任务派发模块连接的资源管理器,用于从命令存储器中申请存储空间;与命令输出仲裁器连接的命令存储器,用于在存储空间中存储Raid命令或异常命令。具体的,资源管理器可以采用标记的方式对片上命令存储器空间进行管理,统一资源标记的派发、使用和回收控制,如图10所示,资源管理器可以通过资源代理,对资源标记进行预申请,当系统有资源请求时,将预申请的资源标记反馈给申请者,资源申请者完成作业后,将资源标记通过资源代理还回资源池,这样可以实现资源标记的动态高效利用。
实际应用中,本申请实施例提供的NVMe磁盘阵列数据处理装置中,还可以包括:与命令输出仲裁器连接的任务调度器,用于对Raid执行引擎处理Raid命令的过程进行调度。
实际应用中,本申请实施例提供的NVMe磁盘阵列数据处理装置中,还可以包括:与信息提取器连接的寄存器,用于存储Raid参数信息。当然,也可以借助存储器来存储Raid参数信息,本申请在此不做具体限定。
具体应用场景中,可以在NVMe磁盘阵列初始化时,在寄存器中划定Namespace信息、Raid组信息和盘组信息的存储空间,且Namespace信息、Raid组信息和盘组信息可以采用级联方式连接,如图11所示,其中,Namespace信息可以是一组或者多组,当有多组Namespace信息时,通过NVMe命令中的NSID(Namespace ID号)字段选出对应的信息;Raid组信息可以是一组或者多组,当有多组Raid组信息时,通过前一级Namespace信息中的RaidGroup选出;盘组信息包含多个Raid组对应的盘信息,组数和Raid组数目相等,通过前一级Namespace信息中的RaidGroup选出。此外,Namespace信息的内容可以见表1,Raid信息的内容可以见表2,盘信息的内容可以见表3等。
表1 NameSpace的信息
表2 Raid的信息
表3盘的信息
实际应用场景中,可以根据需要灵活调整本申请中NVMe磁盘阵列数据处理装置的数据处理流程和其内部各器件间的信息交互,比如NVMe磁盘阵列数据处理装置的数据处理流程可以如图12所示;NVMe磁盘阵列数据处理装置中各器件的交互过程可以如图13所示等。
其中,NVMe磁盘阵列数据处理装置中各器件的交互过程中的各个步骤如下:
S0:信息初始化,即在初始化时配置寄存器文件,将Namespace信息、Raid信息、盘组信息写入;
S1:获取NVMe命令,即NVMe磁盘阵列数据处理装置从主设备端获取NVMe命令;
S2_1:索引Raid组ID,即根据NVMe命令中的Namespace ID字段,索引对应的Namespace信息,该信息中的Raid Group ID用于索引Raid组信息;
S2_2:索引盘组ID,即根据Raid组信息中的Device信息,索引该Raid组所涉及的物理盘组信息;
S2_3:资源申请,即在信息获取的时候,向资源管理器申请命令存储器的存储空间;
S2_4:规则判断信息,即将涉及规则判断的信息送入任务规则检查器,以依据这些信息筛选可由该NVMe磁盘阵列数据处理装置转换的命令和不可由该NVMe磁盘阵列数据处理装置转换的命令;
S3_1:规则判断结果,即任务规则检查器将规则判断结果送入任务派发器,任务派发器根据该结果判断将当前任务派发给Raid命令生成引擎或者异常命令生成引擎;
S3_2:资源标记信息,即资源标记信息被任务派发器派发给Raid命令生成引擎或者异常命令生成引擎,引擎根据资源标记信息将生成的命令写入命令存储器的指定位置;
S4_1:可转换的NVMe命令及相关信息,即任务派发器将可转换的NVMe命令及相关信息送入Raid命令生成引擎,相关信息指在S2阶段获取的Namespace信息、Raid组信息和盘组信息;
S4_2:执行引擎参数及命令特征信息,即命令解析器根据NVMe命令、Namespace信息、Raid组信息和盘组信息分析计算得到执行引擎参数信息,这些参数信息用于组成条带微指令;且得到命令特征信息,这些信息用于条带微指令序列优化模块对微指令或微指令序列进行优化;
S4_3:原始序列,即条带微指令序列生成器将S4_2阶段生成的执行引擎参数信息组成条带微指令,并按照一定顺序将这些微指令排列成原始的微指令序列;
S4_4:优化序列,即条带微指令序列优化器根据S4_2阶段生成的命令特征信息优化原始的微指令序列,包括序列中微指令的删除和微指令中参数的调整等操作;优化后的微指令序列送入指令组装器进行最终Raid命令格式的封装;
S5_1:不可转换的NVMe命令及相关信息,即任务派发器将不可转换的NVMe命令及相关信息送入异常命令生成引擎,相关信息指在S2、S3阶段获取的Namespace信息、Raid组信息、盘组信息和规则判断结果信息;
S5_2:异常命令信息,即从NVMe命令、Namespace信息、Raid组信息、盘组信息和规则判断结果信息中提取部分或者全部送入指令组装器,指令组装器进行最终异常命令格式的封装。
S5_3:异常模式信息,即异常指令反馈模块采用同步或者异步通信机制,将异常命令通知给系统其他设备,比如通知给CPU;
S6_1:正常Raid命令,即将S4阶段最终的正常Raid命令送入命令输出仲裁器。
S6_2:异常命令,即将S5阶段最终的异常命令送入命令输出仲裁器。
S6_3:Raid命令,即命令输出仲裁器按照RR或者WR仲裁模式,输出Raid命令,Raid命令按照S3阶段获得的资源标记信息写入命令存储器的指定位置;
S6_4:Raid命令驱动,即在完成Raid命令的存储后,由NVMe磁盘阵列数据处理装置(Raid命令生成引擎、异常命令生成引擎)驱动任务调度器执行命令;
S6_5:异常命令通知,即当S6_2阶段产生异常命令后,通知CPU处理该异常命令;
S7:Raid命令调度,即任务调度器调度Raid执行引擎执行任务。
S8:Raid子任务执行,即Raid执行引擎根据命令存储器中的命令执行任务。
S9_1:提交NVMe命令,即Raid执行引擎完成命令执行后,将NVMe命令结束信息提交给主端。
S9_2:资源回收,即Raid执行引擎完成命令执行后,将资源标记信息归还给资源管理器,命令存储器本次命令空间释放。
实际应用场景中,还可以根据需要灵活调整本申请中NVMe磁盘阵列数据处理装置的结构,比如可以采用多通道的方式实现多命令的并发转换,提高NVMe磁盘阵列数据处理装置的执行性能,如图14所示,NVMe磁盘阵列数据处理装置内集成两个Raid命令生成引擎,可以分别对两个NVMe命令实现转换,在引擎内部,并发集成两路条带微指令序列生成器和优化器,可以同时对两个独立的Raid条带进行命令转换,这样不仅可以简化命令解析设计、条带微指令序列模板,还可以提高整个NVMe命令转换Raid操作命令的速度。
本申请还提供了一种NVMe磁盘阵列数据处理设备及非易失性计算机可读存储介质,其均具有本申请实施例提供的一种NVMe磁盘阵列数据处理方法具有的对应效果。请参阅图15,图15为本申请实施例提供的一种NVMe磁盘阵列数据处理设备的结构示意图。
本申请实施例提供的一种NVMe磁盘阵列数据处理设备,包括存储器201和处理器202,存储器201中存储有计算机程序,处理器202执行计算机程序时实现如上任一实施例所描述NVMe磁盘阵列数据处理方法的步骤。
请参阅图16,本申请实施例提供的另一种NVMe磁盘阵列数据处理设备中还可以包括:与处理器202连接的输入端口203,用于传输外界输入的命令至处理器202;与处理器202连接的显示单元204,用于显示处理器202的处理结果至外界;与处理器202连接的通信模块205,用于实现NVMe磁盘阵列数据处理设备与外界的通信。显示单元204可以为显示面板、激光扫描使显示器等;通信模块205所采用的通信方式包括但不局限于移动高清链接技术(HML)、通用串行总线(USB)、高清多媒体接口(HDMI)、无线连接:无线保真技术(WiFi)、蓝牙通信技术、低功耗蓝牙通信技术、基于IEEE802.11s的通信技术。
本申请实施例提供的一种非易失性计算机可读存储介质,非易失性计算机可读存储介质中存储有计算机程序,计算机程序被处理器执行时实现如上任一实施例所描述NVMe磁盘阵列数据处理方法的步骤。
本申请所涉及的非易失性计算机可读存储介质包括随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质。
本申请实施例提供的NVMe磁盘阵列数据处理装置、设备及非易失性计算机可读存储介质中相关部分的说明请参见本申请实施例提供的NVMe磁盘阵列数据处理方法中对应部分的详细说明,在此不再赘述。另外,本申请实施例提供的上述技术方案中与现有技术中对应技术方案实现原理一致的部分并未详细说明,以免过多赘述。
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
对所公开的实施例的上述说明,使本领域技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。

Claims (20)

  1. 一种NVMe磁盘阵列数据处理方法,其特征在于,包括:
    获取对目标NVMe磁盘阵列进行操作的目标NVMe命令,所述目标NVMe磁盘阵列基于Raid方法搭建;
    提取所述目标NVMe命令中的Raid参数信息;
    解析所述目标NVMe命令的类型;
    若所述目标NVMe命令为读写命令,则基于所述Raid参数信息将所述目标NVMe命令转换为对应的Raid命令,以使Raid执行引擎基于所述Raid命令对所述目标NVMe磁盘阵列进行数据读写;
    若所述目标NVMe命令为非读写命令,则基于所述Raid参数信息将所述目标NVMe命令转换为对应的异常命令,以使所述目标NVMe磁盘阵列的CPU基于所述异常命令对所述目标NVMe磁盘阵列进行数据处理。
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述Raid参数信息将所述目标NVMe命令转换为对应的Raid命令,包括:
    对所述Raid参数信息进行解析,得到执行引擎参数;
    基于所述执行引擎参数生成目标微指令序列;
    对所述目标微指令序列进行封装,得到所述Raid命令。
  3. 根据权利要求2所述的方法,其特征在于,所述对所述Raid参数信息进行解析,得到执行引擎参数,包括:
    对所述Raid参数信息进行分析,得到第一类参数;
    对所述第一类参数进行计算,得到第二类参数;
    将所述第一类参数和所述第二类参数作为所述执行引擎参数。
  4. 根据权利要求2所述的方法,其特征在于,所述基于所述执行引擎参数生成目标微指令序列,包括:
    基于所述执行引擎参数生成对应的条带微指令;
    对所述条带微指令进行排序,得到原始微指令序列;
    对所述原始微指令序列进行优化,得到所述目标微指令序列。
  5. 根据权利要求4所述的方法,其特征在于,所述基于所述执行引擎参数生成对应的条带微指令,包括:
    按照预设的微指令数据格式对所述执行引擎参数进行转换,得到对应的所述条带微指令;
    其中,所述微指令数据格式包括微指令特征区和微指令参数区;所述微指令特征区中的参数包括所述条带微指令在所述目标微指令序列中的位置、所述条带微指令的执行方式、所述条带微指令的所述Raid执行引擎、所述条带微指令的调试模式、所述条带微指令的大小、所述条带微指令的执行状态;所述微指令参数区中参数包括基于所述条带微指令的所述Raid执行引擎的功能确定的参数。
  6. 根据权利要求4所述的方法,其特征在于,所述对所述条带微指令进行排序,得到原始微指令序列,包括:
    基于预设的微指令序列模板对所述条带微指令进行排序,得到所述原始微指令序列;
    其中,所述微指令序列模板用于根据操作场景定义对应的微指令序列,以及根据所述操作场景定义确定的微指令参数。
  7. 根据权利要求4所述的方法,其特征在于,所述对所述原始微指令序列进行优化,得到所述目标微指令序列,包括:
    提取所述原始微指令序列中指令处理对象的特征;
    基于所述指令处理对象的特征,删除所述原始微指令序列中当前不使用的微指令,得到所述目标微指令序列。
  8. 根据权利要求4所述的方法,其特征在于,所述对所述原始微指令序列进行优化,得到所述目标微指令序列,包括:
    基于所述目标NVMe命令对所述原始微指令序列中的参数重新赋值,得到所述目标微指令序列。
  9. 根据权利要求2所述的方法,其特征在于,所述对所述目标微指令序列进行封装,得到所述Raid命令,包括:
    按照预设的Raid命令格式对所述目标微指令序列进行封装,得到所述Raid命令;
    其中,所述Raid命令格式包括命令特征区、原始NVMe命令区、引擎通用参数区和微指令序列区;所述命令特征区用于存储命令长度、类型、生成时间、操作模式、命令异常类型;所述原始NVMe命令区用于存储所述目标NVMe命令;所述引擎通用参数区用于存储在所述Raid命令的执行过程中、所述Raid执行引擎间的交互信息;所述微指令序列区用于存储所述目标微指令序列。
  10. 根据权利要求1所述的方法,其特征在于,所述基于所述Raid参数信息将所述目标NVMe命令转换为对应的异常命令,包括:
    按照预设的Raid命令格式,基于所述Raid参数信息将所述目标NVMe命令转换为对应的所述异常命令;
    其中,所述Raid命令格式包括命令特征区、原始NVMe命令区、引擎通用参数区和微指令序列区;所述命令特征区用于存储命令长度、类型、生成时间、操作模式、命令异常类型;所述原始NVMe命令区用于存储所述目标NVMe命令;所述引擎通用参数区与所述微指令序列区为空。
  11. 根据权利要求1至10任一项所述的方法,其特征在于,所述提取所述目标NVMe命令中的Raid参数信息,包括:
    提取所述目标NVMe命令中的所述Raid参数信息,所述Raid参数信息包括Namespace信息、Raid组信息和盘组信息。
  12. 根据权利要求11所述的方法,其特征在于,所述基于所述Raid参数信息将所述目标NVMe命令转换为对应的Raid命令之后,还包括:
    基于静态映射的方式存储所述Raid命令;
    基于异步事件的方式通知所述Raid执行引擎处理所述Raid命令。
  13. 根据权利要求11所述的方法,其特征在于,所述基于所述Raid参数信息将所述目标NVMe命令转换为对应的异常命令之后,还包括:
    基于静态映射的方式存储所述异常命令;
    基于异步事件的方式通知所述CPU处理所述异常命令。
  14. 一种NVMe磁盘阵列数据处理装置,其特征在于,包括:
    命令获取器,用于获取对目标NVMe磁盘阵列进行操作的目标NVMe命令,所述目标NVMe磁盘阵列基于Raid方法搭建;
    与所述命令获取器连接的信息提取器,用于提取所述目标NVMe命令中的Raid参数信息;
    与所述信息提取器连接的任务规则检查器,用于解析所述目标NVMe命令的类型;
    与所述任务规则检查器连接的任务派发模块,用于若所述目标NVMe命令为读写命令,则将所述目标NVMe命令及所述Raid参数信息派发给Raid命令生成引擎;若所述目标NVMe命令为非读写命令,则将所述目标NVMe命令及所述Raid参数信息派发给异常命令生成引擎;
    与所述任务派发模块连接的所述Raid命令生成引擎,用于基于所述Raid参数信息将所述目标NVMe命令转换为对应的Raid命令,以使Raid执行引擎基于所述Raid命令对所述目标NVMe磁盘阵列进行数据读写;
    与所述任务派发模块连接的所述异常命令生成引擎,用于基于所述Raid参数信息将所述目标NVMe命令转换为对应的异常命令,以使所述目标NVMe磁盘阵列的CPU基于所述异常命令对所述目标NVMe磁盘阵列进行数据处理。
  15. 根据权利要求14所述的NVMe磁盘阵列数据处理装置,其特征在于,还包括:
    与所述Raid命令生成引擎及所述异常命令生成引擎连接的命令输出仲裁器,用于输出所述Raid命令或所述异常命令进行存储。
  16. 根据权利要求15所述的NVMe磁盘阵列数据处理装置,其特征在于,还包括:
    与所述信息提取器及所述任务派发模块连接的资源管理器,用于从命令存储器中申请存储空间;
    与所述命令输出仲裁器连接的所述命令存储器,用于在所述存储空间中存储所述Raid命令或所述异常命令。
  17. 根据权利要求16所述的NVMe磁盘阵列数据处理装置,其特征在于,还包括:
    与所述命令输出仲裁器连接的任务调度器,用于对所述Raid执行引擎处理所述Raid命令的过程进行调度。
  18. 根据权利要求14所述的NVMe磁盘阵列数据处理装置,其特征在于,还包括:
    与所述信息提取器连接的寄存器,用于存储所述Raid参数信息。
  19. 一种NVMe磁盘阵列数据处理设备,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于执行所述计算机程序时实现如权利要求1至13中任一项所述NVMe磁盘阵列数据处理方法的步骤。
  20. 一种非易失性计算机可读存储介质,其特征在于,所述非易失性计算机可读存储介质中存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至13中任一项所述NVMe磁盘阵列数据处理方法的步骤。
PCT/CN2023/102631 2022-11-30 2023-06-27 NVMe磁盘阵列数据处理方法、装置、设备及存储介质 WO2024113799A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211518343.8A CN115599309B (zh) 2022-11-30 2022-11-30 NVMe磁盘阵列数据处理方法、装置、设备及存储介质
CN202211518343.8 2022-11-30

Publications (1)

Publication Number Publication Date
WO2024113799A1 true WO2024113799A1 (zh) 2024-06-06

Family

ID=84852459

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/102631 WO2024113799A1 (zh) 2022-11-30 2023-06-27 NVMe磁盘阵列数据处理方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN115599309B (zh)
WO (1) WO2024113799A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599309B (zh) * 2022-11-30 2023-02-24 苏州浪潮智能科技有限公司 NVMe磁盘阵列数据处理方法、装置、设备及存储介质
CN118377438B (zh) * 2024-06-25 2024-09-06 山东云海国创云计算装备产业创新中心有限公司 读写命令操作空间需求确定方法、程序产品、设备及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9384093B1 (en) * 2014-05-28 2016-07-05 Microsemi Storage Solutions (U.S.), Inc. Raid enabled NVME device
CN114661230A (zh) * 2021-12-30 2022-06-24 无锡芯铭微电子有限公司 Raid存储系统及ssd raid加速命令设计方法
CN115145492A (zh) * 2022-07-29 2022-10-04 山东云海国创云计算装备产业创新中心有限公司 一种raid控制器下物理盘管理的方法和系统
CN115599309A (zh) * 2022-11-30 2023-01-13 苏州浪潮智能科技有限公司(Cn) NVMe磁盘阵列数据处理方法、装置、设备及存储介质

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538460A (zh) * 2020-04-20 2020-08-14 江苏芯盛智能科技有限公司 Raid功能实现方法及相关装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9384093B1 (en) * 2014-05-28 2016-07-05 Microsemi Storage Solutions (U.S.), Inc. Raid enabled NVME device
CN114661230A (zh) * 2021-12-30 2022-06-24 无锡芯铭微电子有限公司 Raid存储系统及ssd raid加速命令设计方法
CN115145492A (zh) * 2022-07-29 2022-10-04 山东云海国创云计算装备产业创新中心有限公司 一种raid控制器下物理盘管理的方法和系统
CN115599309A (zh) * 2022-11-30 2023-01-13 苏州浪潮智能科技有限公司(Cn) NVMe磁盘阵列数据处理方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN115599309A (zh) 2023-01-13
CN115599309B (zh) 2023-02-24

Similar Documents

Publication Publication Date Title
WO2024113799A1 (zh) NVMe磁盘阵列数据处理方法、装置、设备及存储介质
US8898642B2 (en) Profiling and sequencing operators executable in an emulated computing system
CN112256601A (zh) 数据存取控制方法、嵌入式存储系统及嵌入式设备
CN103999060A (zh) 固态存储管理
US11132124B2 (en) Memory subsystem operations with unaligned and scatter gather feature to support convolution and dimension shuffle
CN103282887A (zh) 用于进行后台操作的控制器和方法
JP7088897B2 (ja) データアクセス方法、データアクセス装置、機器及び記憶媒体
US8041849B2 (en) Method for handling small computer system interface (SCSI) commands via a redundant array of inexpensive disks (RAID) device driver
CN115033188B (zh) 一种基于zns固态硬盘的存储硬件加速模块系统
US7376758B2 (en) I/O dependency graphs
US8185687B2 (en) Semiconductor storage device and method of controlling semiconductor storage device
CN101154202A (zh) 管理多处理器计算机系统中的系统管理中断的系统和方法
CN113569508B (zh) 基于id进行数据索引与访问的数据库模型构建方法及设备
TW202101246A (zh) 多命名空間的資料存取方法及電腦程式產品
Marcus et al. The MPRACE framework: An open source stack for communication with custom FPGA-based accelerators
Ouyang et al. Active SSD design for energy-efficiency improvement of web-scale data analysis
Koh et al. Faster than flash: An in-depth study of system challenges for emerging ultra-low latency SSDs
US20070136549A1 (en) Information processing apparatus, controller and file reading method
CN114765051A (zh) 内存测试方法及装置、可读存储介质、电子设备
US20120017217A1 (en) Multi-core processing system and computer readable recording medium recorded thereon a schedule management program
JP6042454B2 (ja) ユーザ生成によるデータセンターの省電力
CN114490023A (zh) 一种基于arm和fpga的高能物理可计算存储设备
WO2024119930A1 (zh) 调度方法、装置、计算机设备和存储介质
CN115586867B (zh) NVMe控制器
CN108334453B (zh) 一种文件调试方法、装置、终端设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23895963

Country of ref document: EP

Kind code of ref document: A1