WO2022251984A1 - 一种数据处理方法及装置 - Google Patents
一种数据处理方法及装置 Download PDFInfo
- Publication number
- WO2022251984A1 WO2022251984A1 PCT/CN2021/097050 CN2021097050W WO2022251984A1 WO 2022251984 A1 WO2022251984 A1 WO 2022251984A1 CN 2021097050 W CN2021097050 W CN 2021097050W WO 2022251984 A1 WO2022251984 A1 WO 2022251984A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- command
- commands
- sequence
- order
- execution
- Prior art date
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 14
- 238000000034 method Methods 0.000 claims abstract description 70
- 238000004321 preservation Methods 0.000 claims abstract description 60
- 238000005538 encapsulation Methods 0.000 claims abstract description 14
- 238000012545 processing Methods 0.000 claims description 82
- 230000015654 memory Effects 0.000 claims description 79
- 238000004891 communication Methods 0.000 claims description 30
- 238000004590 computer program Methods 0.000 claims description 27
- 230000008569 process Effects 0.000 abstract description 15
- 238000013500 data storage Methods 0.000 abstract description 2
- 230000006870 function Effects 0.000 description 50
- 230000009471 action Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 9
- 230000003068 static effect Effects 0.000 description 6
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 230000001360 synchronised effect Effects 0.000 description 5
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0659—Command handling arrangements, e.g. command buffers, queues, command scheduling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
- G06F3/0605—Improving or facilitating administration, e.g. storage management by facilitating the interaction with a user or administrator
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
Definitions
- the embodiments of the present application relate to the field of data storage, and in particular, to a data processing method and device.
- User operations can be understood as operations on the file system, such as reading and saving files (that is, data), and the file system converts these user operations into IO Read, IO write and other commands.
- Embodiments of the present application provide a data processing method and device to ensure the execution order of multiple commands.
- a data processing method is provided. First, a first device acquires multiple first commands. Then, the first device encapsulates the first command to obtain a second command, where, when the multiple first commands include at least two target commands with order preservation requirements, the encapsulation includes Adding a sequence identifier to the target command, where the sequence identifier is used to indicate the execution sequence of the target command. Next, the first device sends multiple second commands in parallel.
- the encapsulation further includes format conversion, and the converted format meets the agreement between the first device and the second device.
- the first device sends multiple second commands (including the first command and the sequence identifier corresponding to the first command) to the second device in parallel, and the second device can sequentially execute multiple first commands according to the sequence identifier.
- the commands are scheduled to execute the plurality of first commands sequentially. Not only can the execution sequence of multiple first commands be guaranteed, but also the second device can reasonably use its own idle time to process multiple first commands in time, reduce the execution waiting time of multiple first commands, improve the performance of the storage system, and improve the user experience. experience.
- the first command is an IO command.
- any one of the first commands is: a write command to user data or a write command to node data, where the node data is used to indicate a location where the user data is stored.
- the execution sequence of the write command for node data is before the execution sequence of the write command for user data. It can be understood that the data processing method is applied to a flash friendly file system (flash friendly file system, F2FS).
- flash friendly file system flash friendly file system, F2FS
- the first command is used to write data from the memory (the memory on the first device side) into the flash memory array (the flash memory array on the second device side).
- the sequence identifier is a sequence number
- the execution sequence of the commands is indicated by the value of the sequence number
- the execution sequence of commands with small serial numbers is earlier than that of commands with large serial numbers, or the execution sequence of commands with large serial numbers is earlier than that of commands with small serial numbers.
- the first device may also acquire an order-preserving identification command, where the order-preserving identification command is used to indicate that the execution order of the command preceding the order-preserving identification command is earlier than the order-preserving identification command
- the execution sequence of the next command (the first command after the sequence-preserving identification command) of Further, the first command obtained before the order-preserving identification command and the first command obtained after the order-preserving identification command may be determined as target commands.
- the sequence number added by the first device to the first command obtained before the order-preserving identification command is the same as the sequence number added to the first first command obtained after the order-preserving identification command.
- the serial number is different.
- sequence number added by the first device to the first command obtained before the sequence-preserving identification command is smaller than the sequence number added to the first first command obtained after the sequence-preserving identification command.
- sequence number added by the first device to the first command obtained before the sequence-preserving identification command is greater than the sequence number added to the first first command obtained after the sequence-preserving identification command.
- the first device sends multiple second commands in parallel and out of sequence.
- the encapsulating further includes: adding a sequence identifier to a first command in the plurality of first commands except the target command.
- a data processing method in which a second device receives multiple second commands in parallel. Then, decapsulating the second command, the decapsulating includes parsing the first command included in the second command and a sequence identifier, where the sequence identifier is used to indicate the execution sequence of the commands with the order preservation requirement. Next, the second device schedules the multiple first commands according to the sequence identifier.
- the second device receives multiple second commands in parallel, and after parsing out the sequence identifier, the second device may sequentially schedule the multiple first commands according to the sequence identifier, and execute the multiple first commands sequentially. Not only can the execution sequence of multiple first commands be guaranteed, but also the second device can reasonably use its own idle time to process multiple first commands in time, reduce the execution waiting time of multiple first commands, improve the performance of the storage system, and improve the user experience. experience.
- the sequence identifier is a sequence number; the second device may schedule multiple first commands according to the value of the sequence number.
- the second device receives multiple second commands in parallel and out of sequence.
- a data processing device in a third aspect, has a function of realizing the above-mentioned first aspect and any possible implementation of the first aspect.
- These functions may be implemented by hardware, or may be implemented by executing corresponding software through hardware.
- the hardware or software includes one or more functional modules corresponding to the above functions.
- the data processing apparatus includes: a file system layer, a driver layer, and a first interface layer.
- the file system layer is used to obtain a plurality of first commands.
- the driver layer is configured to acquire multiple first commands. It can be understood that, after acquiring the multiple first commands, the file system layer sends the multiple first commands to the driver layer.
- the driver layer is configured to encapsulate the first command to obtain a second command, wherein, when the plurality of first commands include at least two target commands with order preservation requirements, the encapsulation includes Adding a sequence identifier to the target command, where the sequence identifier is used to indicate the execution sequence of the target command.
- the first interface layer is configured to send multiple second commands in parallel.
- the file system layer may also send an order preservation flag command (flag) to the driver layer; correspondingly, the driver layer is also used to obtain the order preservation flag from the file system layer Order.
- the order-preserving flag command (flag) is used to indicate that: the execution sequence of the first command before the order-preserving flag command (flag) is earlier than the next first command ( The execution order of the first command behind the order-preserving identification command).
- the order-preserving flag command (flag) is sent between any two target commands, and the order-preserving flag command (flag) is the same as the target whose sending time is later in the two target commands There are no other commands between commands.
- the driver layer is further configured to determine, as target commands, the first command obtained before the order-preserving identification command and the first command obtained after the order-preserving identification command.
- the sequence number added by the driver layer to the first command obtained before the order-preserving identification command is the same as the sequence number added to the first first command obtained after the order-preserving identification command The added serial number is different.
- the first interface layer sends multiple second commands in parallel and out of sequence.
- the encapsulating further includes: adding a sequence identifier to a first command in the plurality of first commands except the target command.
- a data processing device in a fourth aspect, has a function of realizing the above-mentioned second aspect and any possible implementation of the second aspect.
- These functions may be implemented by hardware, or may be implemented by executing corresponding software through hardware.
- the hardware or software includes one or more functional modules corresponding to the above functions.
- the data processing apparatus includes: a second interface layer, a command scheduling layer.
- the second interface layer is configured to receive multiple second commands in parallel.
- the command scheduling layer is configured to decapsulate the second command, the decapsulation includes parsing the first command included in the second command and a sequence identifier, and the sequence identifier is used to indicate a command with an order preservation requirement
- the execution sequence of the first commands is scheduled according to the sequence identifier.
- a data processing device including a processor, and optionally, a memory; the processor is coupled to the memory; the memory is used to store computer programs or instructions; the processor , for executing part or all of the computer programs or instructions in the memory, when the part or all of the computer programs or instructions are executed, for implementing the above first aspect and any possible implementation method of the first aspect
- the function of the first device, or the function of the second device in the second aspect and any possible implementation of the second aspect is provided, including a processor, and optionally, a memory; the processor is coupled to the memory; the memory is used to store computer programs or instructions; the processor , for executing part or all of the computer programs or instructions in the memory, when the part or all of the computer programs or instructions are executed, for implementing the above first aspect and any possible implementation method of the first aspect
- the function of the first device, or the function of the second device in the second aspect and any possible implementation of the second aspect is provided, including a processor, and optionally, a memory; the processor is coupled to the memory; the memory
- the device may further include a communication interface, the communication interface is coupled to the processor, and the communication interface is used to send the signal processed by the processor, or receive an input to the signal to the processor.
- the interface may perform the sending action or receiving action performed by the first device in the first aspect and any possible implementation of the first aspect; or, perform the second aspect and any possible implementation of the second aspect performed by the second device. Send action or receive action.
- the processor is configured to: obtain a plurality of first commands; encapsulate the first commands to obtain a second command, wherein the plurality of first commands include at least two target commands with order preservation requirements
- the encapsulation includes adding a sequence identifier to the target command, and the sequence identifier is used to indicate the execution order of the target command;
- the communication interface is configured to: send multiple second commands in parallel.
- the first command is an IO command.
- the first command is: a write command for user data; or a write command for node data; wherein the node data is used to indicate the location where the user data is stored.
- sequence identifier is a sequence number
- execution sequence is indicated by the numerical value of the sequence number.
- the processor is further configured to: acquire an order-preserving identification command, where the order-preserving identification command is used to indicate that: the execution order of the command preceding the order-preserving identification command is earlier than that of the order-preserving identification command
- the execution order of the next command determine the first command obtained before the order-preserving identification command and the first command obtained after the order-preserving identification command as target commands.
- sequence number added to the first command obtained before the sequence-preserving identification command is different from the sequence number added to the first first command obtained after the sequence-preserving identification command.
- the communication interface when used to send multiple second commands in parallel, it is specifically used to: send multiple second commands in parallel and out of order.
- the encapsulation further includes: adding a sequence identifier to a first command in the plurality of first commands except the target command.
- a storage controller including: a processor, and a communication interface coupled to the processor;
- the communication interface is configured to: receive multiple second commands in parallel;
- the processor is configured to: decapsulate the second command, where the decapsulation includes parsing the first command included in the second command and a sequence identifier, where the sequence identifier is used to indicate the The execution sequence of the commands; scheduling multiple first commands according to the sequence identifier.
- the sequence identifier is a sequence number; when the processor is used to schedule multiple first commands according to the sequence identifier, it is specifically configured to: according to the value of the sequence number size, dispatching a plurality of said first commands.
- a seventh aspect provides a flash memory, the flash memory includes the storage controller described in the sixth aspect, and a flash memory array; the storage controller is configured to: schedule the first command to access the flash memory array.
- a computer-readable storage medium for storing a computer program, the computer program including instructions for realizing the functions of the first aspect and any possible implementation of the first aspect, or for realizing Instructions for the functions of the second aspect and any possible implementation of the second aspect.
- a computer-readable storage medium is used to store a computer program.
- the computer program When the computer program is executed by a computer, the computer can execute the first device in the above-mentioned first aspect and any possible implementation method of the first aspect. Execute the method, or execute the second aspect and the method executed by the second device in any possible implementation of the second aspect.
- a computer program product comprising: computer program code, when the computer program code is run on a computer, the computer is made to execute the above-mentioned first aspect and any possible method of the first aspect. Implement the method executed by the first device, or execute the method executed by the second device in the second aspect and any possible implementation of the second aspect.
- Fig. 1 is a kind of NAND Flash storage system structural diagram applicable to the embodiment of the present application
- Fig. 2 is a schematic diagram of a data processing process applicable to the embodiment of the present application.
- Fig. 3 is another kind of NAND Flash storage system structural diagram applicable to the embodiment of the present application.
- FIG. 4 is a structural diagram of a data processing device applicable to an embodiment of the present application.
- FIG. 5 is a structural diagram of a data processing device applicable to an embodiment of the present application.
- the file system in this application can be understood as a system for managing files.
- the data of the file system includes node data (node data) and user data (user data).
- User data is the file itself, such as pictures, videos, chat records, etc.
- Node data is used by the file system to index the logical location of the file in the storage device.
- User operations can be understood as operations on the file system, mainly reading and saving files, and the file system converts these user operations into IO reading and IO writing , FLUSH and other commands (commands can also be replaced with requests).
- the data corresponding to these IO read commands and IO write commands includes: user data of the file itself (such as a picture), and can also include node data (node data) generated by the file system for recording where the user data is in the file system.
- Node data (node data) is similar to a multi-level index table. In most cases, these node data (node data) need to wait for the user data (user data) of the file itself (such as a picture) to be written to the storage device before it can be saved. Node data (node data) to the storage device. In order to facilitate the file system to search the user data (user data) of the file itself (such as a picture) according to the node data (node data).
- node data is saved to the storage device first, but the user data (user data) of the file itself (such as a picture) is not stored in the logical location corresponding to the node data (node data), then the file system is based on the node data (node data) Search for the user data (user data) of the file itself (such as a picture), and an exception will occur because the user data (user data) cannot be found.
- the file system maintains the order between the user data (user data) of the file itself (such as a picture) and the related node data (node data) in a serial manner or by interspersing FLUSH commands between them.
- RAM random access memory
- the data is not retained when the power is turned off.
- the content of the storage unit can be taken out or stored at will, and the speed of access has nothing to do with the location of the storage unit. It loses its stored content when the power is turned off, and is mainly used to store programs that are used for a short time.
- Flash Power off data retention. It has the performance of electrically erasable programmable read-only memory (electrically EPROM, EEPROM), and can keep data for a long time without current supply. Its storage characteristics are equivalent to hard disks, and it can also read data quickly.
- Flash mainly includes NOR Flash and NADN Flash.
- This memory can be a buffer (called cache) for data exchange.
- CPU central processing unit
- the CPU can extract the information from the memory and store it in the flash memory array of the storage device (such as a memory card).
- the CPU can also extract the information from the flash memory array and store it in the memory.
- the CPU copies the data to be run in the flash memory array to the memory (such as RAM) for storage; when the system starts to lose power, the CPU copies the data running in the memory (such as RAM) to the flash memory array stored in.
- FIG. 1 a schematic diagram of a NAND Flash-based storage system is introduced, and the process of storing information from the memory to the flash memory array (NAND Flash medium layer) and from the flash memory array to the memory is introduced.
- the storage system includes: memory, Host file system layer, Host driver layer, Host device hardware interface layer, Device hardware interface layer, Device command scheduling layer, Device command processing layer, and NAND Flash media layer.
- memory can be thought of as a buffer in a CPU in an electronic device.
- the host side can be regarded as the CPU in the electronic device.
- the device side may be regarded as a controller (processor) in a storage device (such as a memory card) of the electronic device.
- the NAND Flash medium layer can be regarded as a flash memory array in a memory card.
- the Host file system layer is mainly responsible for scheduling and processing user operation requests, converting user operation requests into block device requests, sending block device requests to the Host driver layer, and processing the execution results of block device requests returned by the Host driver layer.
- the Host driver layer is mainly responsible for receiving block device requests issued by the Host file system layer, and converting the block device requests into commands in the format required by the Host and Device interface protocols. The command is sent to the Device device through the hardware interface layer of the Host device, and the command execution result returned by the Device device is processed at the same time.
- the Host device hardware interface layer and the Device hardware interface layer are mainly responsible for providing a channel for high-speed interaction of commands between the Host and Device.
- the Device command scheduling layer is mainly responsible for scheduling the commands issued by the Host driver layer and sending them to the Device command processing layer.
- the Device command processing layer is mainly responsible for processing the commands issued by the Host, and returning the execution results of the commands to the Host.
- the NAND Flash media layer stores the data carried in the command.
- requests can also be called commands
- commands for example, IO write requests and IO read requests.
- the Host file system layer writes specific data in the memory to the NAND Flash medium through the IO write request.
- the Host file system layer reads specific data from the NAND Flash medium into the memory through an IO read request.
- the IO write command includes: the IO write command of the user data (user data) of the file itself, and may also include the IO write command of the node data (node data).
- These node data (node data) need to wait for the user data (user data) to be written to the flash memory array of the storage device (such as NAND Flash media) before saving the node data (node data) to the flash memory array of the storage device (such as NAND Flash media) .
- any four IO write commands are IO_W0, IO_W1, IO_W2, and IO_W3 in sequence.
- IO_W1 and IO_W2 have order protection requirements.
- the IO_W1 write command must be executed first before the IO_W2 write command can be executed.
- the order between the other commands No restrictions are imposed.
- the Host file system layer can wait for delivery between multiple IO write commands that require order preservation. That is, after the execution of an IO write command is completed, and the execution result of the command is returned to the Host file system layer, the Host file system layer issues the next IO write command.
- the Host file system layer guarantees the execution order of multiple IO write commands that require order preservation through serial execution.
- serial execution of commands has a long delay, which will affect the performance of the storage system.
- serial waiting for commands of high-priority services in the storage system will cause the performance of the entire storage system to be poor in scenarios where command order is required.
- the user experience is poor.
- this application proposes a technical solution for sending multiple commands in parallel, assigning sequence identifiers to multiple commands, indicating the sequence of execution commands through the sequence identifiers, reducing the execution waiting time of multiple commands, improving the performance of the storage system, and improving user experience.
- a data processing method including the following steps:
- Step 201 The first device acquires multiple first commands.
- the first command here is the command itself, and "first” is for the convenience of distinguishing it from the subsequent second command.
- the second command is a packaged command, for example, the first command has been format-converted.
- the second command includes the command itself (that is, the first command) and the sequence identifier assigned to the command itself (that is, the first command) (assignment and addition can be replaced with each other).
- the first command may be an IO command or an RPMB command.
- the first command includes a write command and/or a read command.
- IO write command and/or IO read command For example, the write command (first command) is used to write the data in the memory (the memory on the first device side) into the flash memory array (the flash memory array on the second device side), and the read command is used to read the data in the flash memory array. fetched into memory.
- the plurality of first commands obtained may be that all the first commands have no protection requirements; it may also be that all the first commands have order preservation requirements; it may also be that some (at least two) first orders have order preservation requirements , part of the First Order does not require order.
- the four first commands obtained are: IO_W0, IO_W1, IO_W2, IO_W3.
- IO_W1 and IO_W2 have order preservation requirements.
- the IO_W1 command must be executed first before the IO_W2 command can be executed, and the order of other commands is not carried out. limit.
- the type of the command may be a write command for user data or a write command for node data.
- the plurality of first commands include: a write command to user data and a write command to node data, where the node data is used to indicate a location where the user data is stored.
- the execution order of the write command to node data needs to be after the execution order of the write command to user data, that is, the user data (user data) command is executed first, and then the node data (node data) command is executed. Order.
- step 201 may be executed at the Host file system layer, or at the Host driver layer.
- Step 202 The first device encapsulates the first command to obtain a second command.
- the command before encapsulation is called the first command
- the command after encapsulation is called the second command.
- the encapsulation may also be called an encapsulation command format, and the encapsulation includes performing format conversion, and the converted format (that is, the format of the second command) satisfies the communication protocol between the first device and the second device .
- the encapsulation further includes adding a sequence identifier to the target commands, and the sequence identifier is used to indicate The execution order of the target commands.
- the encapsulating further includes: adding a sequence identifier to a first command in the plurality of first commands except the target command. That is, the first device may only add sequence identifiers to the target commands that require order preservation, and optionally, may also add sequence identifiers to the first commands that do not require order preservation.
- the sequence identifiers of the first commands (with no order preservation requirement) other than the target command are not limited, and may be the same or different.
- the first device can identify which commands among the multiple first commands are first commands with order preservation requirements (for ease of distinction, the first commands with order preservation requirements are referred to as target commands), and which commands are not First order with order preservation requirements.
- the first device may determine which commands have order preservation requirements according to the command types, for example, user data (user data) commands and node data (node data) commands have order preservation requirements. For example, execute the user data (user data) command first, and then execute the node data (node data) command.
- commands have order preservation requirements according to the command types, for example, user data (user data) commands and node data (node data) commands have order preservation requirements. For example, execute the user data (user data) command first, and then execute the node data (node data) command.
- the first device may determine which commands have order preservation requirements according to the priorities of the commands.
- the priority of commands can be reflected by the command type.
- commands for user data (user data) and commands for node data (node data) have order preservation requirements.
- the priority of a command may also be reflected by a priority identifier.
- a command with a priority identifier has an order preservation requirement.
- the priority of commands can also be reflected by services. For example, commands of a certain service and commands of another service have order preservation requirements.
- the first device may also determine the execution order requirements of the target commands in the first command according to the priority. For example, the execution sequence of target commands with higher priority is first, and the execution sequence of target commands with lower priority is last.
- the first device when the first device acquires the multiple first commands, it may also acquire an order-preserving flag command (flag); the order-preserving flag command (flag) is used to indicate: The execution order of the first command before (flag) is earlier than the execution order of the first command next to the order-preserving flag command (flag) (the first first command after the order-preserving flag command).
- the order-preserving flag command is used to indicate: The execution order of the first command before (flag) is earlier than the execution order of the first command next to the order-preserving flag command (flag) (the first first command after the order-preserving flag command).
- the first device can identify which commands have order preservation requirements through the order preservation flag command, for example, the first command to be obtained before the order preservation flag command (flag), and the order preservation flag command (flag)
- the first first command obtained later is determined to be the target command with order preservation requirements.
- IO_W0, IO_W1 flag, IO_W2, IO_W3, IO_W0, IO_W1, IO_W2 may be determined as target commands, and the execution sequence of IO_W0, IO_W1 is located before the execution sequence of IO_W2.
- IO_W3 There is no restriction on the execution order of IO_W3 and several other commands.
- IO_W1 when the sequence of commands acquired by the first device is: IO_W1, flag, IO_W2, IO_W0, IO_W3, IO_W1 and IO_W2 may be determined as target commands, and the execution sequence of IO_W1 is before the execution sequence of IO_W2.
- IO_W0 and IO_W3 There is no restriction on the execution sequence between IO_W0 and IO_W3, and there is no restriction on the execution sequence of IO_W0, IO_W3 and several other commands.
- IO_W0 when the sequence of commands acquired by the first device is: IO_W0, flag, IO_W3, IO_W1, flag, IO_W2, IO_W0, IO_W3, IO_W1, IO_W2 can be determined as target commands, and the execution sequence of IO_W0 is before the execution sequence of IO_W3 , and the execution sequence of IO_W0, IO_W3, IO_W1 is before the execution sequence of IO_W2.
- the sequence identifier includes a serial number (serial number, SN), and the execution sequence of the plurality of first commands can be represented by a numerical value of the serial number.
- the execution order of commands with small serial numbers is earlier than the execution order of commands with large serial numbers.
- the execution order of commands with small serial numbers is later than that of commands with large serial numbers, that is, the execution order of commands with large serial numbers is smaller than that of commands with small serial numbers.
- the sequence identifier may be a, b, c, A, B, C, etc.
- the first device When the first device assigns sequence numbers SN to the multiple first commands, it may be:
- the sequence number assigned to the target command (the first command) that needs to be executed in the first order is greater than the sequence number allocated to the target command (the first command) that needs to be executed in the later order (that is, the sequence number that needs to be executed later). Execute, the one with the smaller serial number will be executed later). There is no limit to the size of the sequence number assigned to the first command that does not require order preservation.
- the order of priority from high to low and sequence number from large to small can be: Sequence numbers assigned to multiple first commands; that is, a higher sequence number is assigned to a first command with a higher priority, and a smaller sequence number is assigned to a first command with a lower priority.
- the serial number assigned to the write command to node data is greater than the serial number assigned to the write command to user data.
- sequence number added to the first command obtained before the sequence-preserving identification command is different from the sequence number added to the first first command obtained after the sequence-preserving identification command.
- sequence number added to the command obtained before the sequence-preserving flag command is greater than the sequence number added to the first command obtained after the sequence-preserving flag command.
- the third command is the third command, .
- the serial number assigned to the first command that needs to be executed in the first order is smaller than the serial number assigned to the first command that needs to be executed in the later order (that is, the one with the smaller serial number is executed first. , execute after the one with the larger serial number).
- the size of the sequence number assigned to the first command that does not require order preservation is no limit.
- sequence numbers assigned to multiple first commands are assigned in order of priority from high to low and sequence numbers from small to large; that is, the sequence numbers assigned to the first commands with higher priority are small, which is the priority
- the first command of the lower level is assigned a higher sequence number.
- a sequence number assigned to a write command to node data is smaller than a sequence number assigned to a write command to user data.
- sequence number added to the command obtained before the sequence-preserving flag command is smaller than the sequence number added to the first command obtained after the sequence-preserving flag command.
- the third command is smaller than the sequence number added to the first command obtained after the sequence-preserving flag command.
- the target command is: among the plurality of first commands, there is an order preservation requirement, and for other first commands that do not have order preservation requirements, the added sequence numbers are not limited.
- the four first commands are: IO_W0, IO_W1, IO_W2, and IO_W3.
- IO_W1 and IO_W2 have order preservation requirements.
- the IO_W1 command must be executed first before the IO_W2 command can be executed.
- the order of other commands is not limited.
- serial number SN assigns the serial number SN to the four first commands: for example, IO_W0_SNx, IO_W1_SNx, IO_W2_SNx+1, IO_W3_SNx; another example, IO_W0_SNx, IO_W1_SNx, IO_W2_SNx+1 , IO_W3_SNx+1; another example, IO_W0_SNx, IO_W1_SNx, IO_W2_SNx+2, IO_W3_SNx+1, etc.
- IO_W0_SNx is smaller than the serial number of IO_W2.
- IO_W0 and IO_W3 may also not be assigned a serial number SN.
- step 202 may be executed by the Host driver layer.
- Step 203 the first device sends multiple second commands in parallel.
- the second device receives multiple second commands in parallel.
- the time required to send multiple commands in parallel is less than a set threshold, which is much shorter than the time to send multiple commands serially (serial sending that needs to wait for processing results).
- Send multiple commands in parallel can also be understood as sending the next command without waiting for the processing result of the previous command.
- Parallel sending can also be understood as serial sending without waiting for processing results.
- sending 4 commands serially includes: sending command 1 first; sending command 2 after receiving the processing result of command 1; sending command 3 after receiving the processing result of command 2; After processing the result of 3, send command 4 again. If the sending time intervals of command 1 and command 2, command 2 and command 3, command 3 and command 4 are all 10s, then it takes 30s to send 4 commands serially.
- Sending 4 commands in parallel includes: when sending a command, there is no need to consider whether the previous command has received the processing result. For example, send command 1 first, and send command 2 regardless of whether the processing result of command 1 is received; send command 3 regardless of whether the processing result of command 2 is received; regardless of whether the processing result of command 3 is received As a result, command 4 is sent. Sending these 4 commands in parallel takes a total of 10s. Alternatively, the order of the four commands is not limited, and may be sent in any order (for example, out of order).
- the second device when receiving 4 commands in parallel, it may receive command 1, command 2, command 3, and command 4 in sequence; it may also receive command 1, command 2, command 3, and command 4 out of sequence. . That is, the first device may send multiple second commands out of order, and the second device may receive multiple second commands out of order.
- the out-of-order here is relative to the order in which the first device acquires multiple first commands.
- the acquisition sequences are command 1, command 2, command 3, and command 4 respectively.
- the order in which the first device sends the second commands is: command 1, command 3, command 4, and command 2. This situation can be understood as sending the second command out of order.
- the first device when the first device sends multiple second commands in parallel, it may send multiple second commands in parallel in one thread, or send multiple second commands in parallel in multiple threads.
- step 203 may be performed at the Host hardware interface layer and at the Device hardware interface layer.
- Step 204 After receiving a plurality of second commands, the second device decapsulates the second commands, and the decapsulation includes parsing the first commands included in the second commands and adding sequence identifier.
- the order identifier is used to indicate the execution order of commands with order preservation requirements. Based on the above introduction, it can be seen that when adding sequence identifiers, it may be that all first commands have added sequence identifiers, and then all second commands can be parsed to obtain sequence identifiers. It may also be that some of the first commands have added sequence identifiers, and some of the first commands have not added sequence identifiers, then some of the second commands can parse out the sequence identifiers, and another part of the second commands cannot parse out the sequence identifiers.
- sequence identifier is used to indicate the execution sequence of the first command.
- sequence identifiers can be parsed in the command domain segment.
- step 204 may be performed by the Device command scheduling layer.
- Step 205 The second device schedules the multiple first commands according to the sequence identifier, and further executes the multiple first commands sequentially according to the scheduling result.
- the second device schedules the multiple first commands serially according to the sequence identifier. For example, command 1 is scheduled first, but after the processing result of command 1 is received, command 2 is then scheduled, and after the processing result of command 2 is received, command 3 is then scheduled.
- the second device may first analyze whether the command (command field segment of the command) includes a sequence identifier. If the sequence identifier is not included in the parsed command (or the sequence identifier cannot be parsed), the commands may be executed in the order received. If it is parsed out that the command includes the sequence identifier, the command can be executed according to the sequence identifier.
- the execution sequence is not limited.
- the four first commands are: IO_W0, IO_W1, IO_W2, and IO_W3.
- IO_W1 and IO_W2 have order preservation requirements.
- the IO_W1 command must be executed first before the IO_W2 command can be executed.
- the order of other commands is not limited. It is stipulated that the one with the smaller serial number is executed first, and the one with the larger serial number is executed later.
- the second device receives four commands in sequence, which are IO_W0, IO_W1_SNx, IO_W2_SNx+1, and IO_W3.
- the scheduling sequence of the second device for IO_W1 and IO_W2 is: first schedule IO_W1, then schedule IO_W2, and the scheduling sequence of IO_W0 and IO_W3 is different. To limit.
- scheduling is performed sequentially according to the receiving order, that is, IO_W0, IO_W1, IO_W2, and IO_W3 are scheduled sequentially.
- the commands with sequence identifiers are scheduled first, for example, IO_W1, IO_W2, IO_W0, and IO_W3 are scheduled sequentially.
- commands with sequence identifiers are scheduled last, for example, IO_W0, IO_W3, IO_W1, and IO_W2 are scheduled sequentially.
- the second device After the second device executes a certain first command, it may return the processing result of the first command to the first device.
- This application does not limit the process of returning the processing results.
- the first device sends multiple first commands serially (serial sending that needs to wait for the processing result), for example, it sends command 1 first, and then sends command 2 after receiving the processing result of command 1.
- the second device if the second device is in the process of feeding back the processing result of command 1 to the first device after processing command 1, the second device still has the ability to continue processing the command, but the first device still waits for the processing result of command 1.
- Command 2 is not sent to the second device, then the idle time of the second device is wasted.
- the first device sends command 2 to the second device the second device may be overloaded or for other reasons, unable to process command 2 in time, then command 2 needs to continue to wait to be processed, and multiple first commands are processed. Processing time is extended.
- the first device sends multiple second commands (including the first command and the sequence identifier corresponding to the first command) to the second device in parallel, and the second device can sequentially execute multiple first commands according to the sequence identifier.
- the commands are scheduled to execute the plurality of first commands sequentially. Not only can the execution sequence of multiple first commands be guaranteed, but also the second device can reasonably use its own idle time to process multiple first commands in time, reduce the execution waiting time of multiple first commands, improve the performance of the storage system, and improve the user experience. experience.
- the first device includes: a driver layer and a first interface layer.
- it also includes: a file system layer.
- the file system layer is, for example, the Host file system layer in Figure 1
- the driver layer is, for example, the Host driver layer in Figure 1
- the first interface layer is, for example, Figure 1 In the Host hardware interface layer.
- the first device obtains a plurality of first commands
- the driver layer may obtain a plurality of first commands.
- the obtaining method is to receive multiple first commands from the file system layer. It may also be: the file system layer acquires multiple first commands.
- the first device encapsulates the first command, which may be: the driver layer encapsulates the first command.
- the file system layer sends the multiple first commands to the driver layer.
- the file system layer may also send the multiple first commands and an order-preserving flag command (flag) to the driver layer according to the execution sequence of the multiple first commands, corresponding
- the driver layer obtains a plurality of first commands and the sequence-preserving flag command (flag) from the file system layer; the sequence-preserving flag command (flag) is used to indicate: the The execution sequence of the first command is earlier than the execution sequence of the next first command of the sequence-preserving flag command (flag).
- the order-preserving flag command (flag) is sent between any two target commands, and there is no difference between the order-preserving flag command (flag) and the target command that is sent later in the two target commands.
- the target command is: a command with an order preservation requirement among the plurality of first commands.
- IO_W1 and IO_W2 have order preservation requirements (that is, IO_W1 and IO_W2 are two target commands), for example, the IO_W1 command must be executed before the IO_W2 command can be executed, and the order of other commands is not limited.
- the order in which the file system layer sends the four first commands and the order-preserving identification command to the driver layer includes but is not limited to any of the following:
- IO_W1 is located before IO_W2, and the adjacent command after the flag is IO_W2.
- IO_W0, IO_W1, and IO_W2 have order-preserving requirements (that is, IO_W0, IO_W1, and IO_W2 are three target commands). For example, the IO_W1 command must be executed first, then the IO_W1 command must be executed, and then the IO_W2 command must be executed. The order is not limited.
- the order in which the file system layer sends the four first commands and the order-preserving identification command to the driver layer includes but is not limited to any of the following:
- IO_W0 flag, IO_W1, flag, IO_W2, IO_W3; or, IO_W0, IO_W3, flag, IO_W1, flag, IO_W2; or, IO_W0, flag, IO_W1, flag, IO_W3, IO_W2, IO_W0, IO_W3, etc.
- IO_W0 is located before IO_W1, IO_W1 is located before IO_W2, and the adjacent command after one flag is IO_W1, and the adjacent command after another flag is IO_W2.
- the first device sends multiple second commands in parallel, which may be: the first interface layer sends multiple second commands in parallel.
- the first interface layer sends multiple second commands in parallel.
- the second device includes: a second interface layer, a command scheduling layer, and optionally, a command processing layer.
- the second interface layer is, for example, the Device hardware interface layer in Figure 1
- the command scheduling layer is, for example, the Device command scheduling layer in Figure 1
- the command processing layer is, for example, It is the Device command processing layer in Figure 1.
- the second device receives multiple second commands in parallel, which may be: the second interface layer receives multiple second commands in parallel.
- the second interface layer sends multiple second commands to the command scheduling layer in parallel.
- step 204 after receiving multiple second commands, the second device decapsulates the second commands, and it may be that the command scheduling layer decapsulates the second commands.
- the second device schedules the multiple first commands according to the sequence identifier, which may be: the command scheduling layer schedules the multiple first commands according to the sequence identifier corresponding to each first command The first command is scheduled.
- Scheduling the multiple first commands may be understood as sending the multiple first commands to the command processing layer in series.
- Sending the first command to the command processing layer serially can be understood as sending the next first command to the command processing layer after receiving the processing result of the first command.
- step 205 the second device sequentially executes the multiple first commands according to the scheduling result, which may be: the command processing layer receives and executes the first command from the command scheduling layer.
- the commands sent by the command dispatching layer to the command processing layer do not carry sequence identifiers (such as serial numbers), and the commands sent by the command processing layer to the Flash medium layer do not carry sequence identifiers (such as sequence numbers).
- FIG. 3 a schematic diagram of a storage system based on NAND Flash is provided.
- the storage system is newly added: function 1 (optional), function 2 and function 3. Similarities with FIG. 1 will not be repeated here.
- the order preservation flag command can be issued to the Host driver layer through function 1.
- the existing commands issued by the host file system layer to the host driver layer can make the host driver layer recognize that the order of the commands needs to be preserved, but function 1 does not need it.
- the first command issued by the Host file system layer to the Host driver layer includes node data commands and user data commands, and the Host driver layer can distinguish that there is an order preservation requirement between these two types of first commands. The file system layer no longer needs to send the sequence-preserving identification command to the Host driver layer.
- the Host file system layer obtains four first commands, which are IO_W0, IO_W1, IO_W2, and IO_W3.
- IO_W1 and IO_W2 have order preservation requirements.
- the IO_W1 command must be executed first before the IO_W2 command can be executed.
- the order is not limited.
- the file system order preservation function can issue the order preservation flag between the IO_W1 command and the IO_W2 command that needs to be preserved, so as to notify the Host driver layer that the order needs to be preserved between the IO_W1 command and the IO_W2 command.
- the order in which the file system order preservation function sends the four first commands and the order preservation identification command flag to the Host driver layer may be: IO_W0, IO_W1, flag, IO_W2, IO_W3.
- the sequence identification of the maintenance command is driven by the sequence preservation processing function.
- the sequence identification (such as the initial value of the sequence number) maintained by the Host driver layer and the Device command scheduling layer is fixed or negotiated with each other.
- the driver order preserving processing function assigns sequence identifiers (such as serial number values) to multiple first commands (such as IO write commands).
- the drive sequence preservation processing function receives multiple first commands issued by the Host file system layer, and assigns corresponding serial numbers to the multiple first commands according to preset serial number value rules. For example, the sequence number assigned to the first received IO_W0 command is SNx, the sequence number assigned to the second received IO_W1 command is SNx, and the sequence number assigned to the third received IO_W2 command is SNx.
- the drive order preservation processing function receives the order preservation flag command (flag) issued by the Host file system layer after receiving the IO_W1 command, and receives the IO_W2 command after the order preservation flag command (flag), then the preservation The serial number value of the next command (that is, the IO_W2 command) of the sequence flag command is changed according to certain rules, so as to reflect that the execution order of the next command (that is, the IO_W2 command) of the sequence flag command should be ranked before the sequence flag command (flag ) behind the previous command.
- the value of the serial number can be increased by 1, and the serial number assigned to the IO_W2 command is SNx+1.
- the value of the serial number can be subtracted by 1, and the serial number assigned to the IO_W2 command is SNx-1.
- the sequence number may not be added, or the sequence may be added. If a serial number is added, there is no limitation on the size of the serial number, for example, the added serial numbers are SNx+1, SNx, SNx-1, and SNx+2.
- serial number change rules of the driver sequence preservation processing function of the Host driver layer and the serial number change rules of the Device command scheduling layer are fixed or known through mutual negotiation.
- the host driver layer and the device command scheduling layer fix the initial value of the sequence number from 1, and increase by 1 in turn.
- the Host driver layer encapsulates the command structure for IO_W0 and IO_W1.
- the command domain segment adds the serial number SN as x, because the order-preserving identification command (flag) is received, Therefore, add 1 to the serial number SN maintained by the Host driver layer, add SN to the command domain segment of IO_W2 received subsequently as x+1, and add SN to the command domain segment of IO_W3 received is arbitrary, for example, add the serial number to SNx+ 1, get IO_W3_SNx+1.
- the driver sequence processing function sends four second commands (respectively IO_W0_SNx, IO_W1_SNx, IO_W2_SNx+1, IO_W3_SNx+1) to the Device command scheduling layer through the Host device hardware interface layer and the Device hardware interface layer.
- the sending order of the four second commands can be arbitrary. Since the second command includes a serial number, the Device command scheduling layer can schedule the first commands sequentially according to the serial numbers to meet the requirements of the first command. order protection requirements.
- the Device command scheduling layer receives four commands, IO_W0_SNx, IO_W1_SNx, IO_W2_SNx+1, and IO_W3_SNx+1, delivered by the Host driver layer. It may happen that IO_W2_SNx+1 is received first, and then IO_W1_SNx is received, then the command sequence processing function will sort IO_W1_SNx and IO_W2_SNx+1 according to the serial number SN from small to large.
- the command sequence processing function restores the four second commands: IO_W0_SNx, IO_W1_SNx, IO_W2_SNx+1, IO_W3_SNx+1 to the first commands obtained by the Host file system layer: IO_W0, IO_W1, IO_W2, IO_W3, and converts these first commands Send it to the Device command processing layer in the order of the serial number, and the Device command processing layer will specifically process the first command, and finally write the data into the NAND FLASH medium layer.
- the first command sent by the Host command scheduling layer to the Host command processing layer does not carry a serial number
- the first command sent by the Host processing layer to the NAND FLASH medium layer does not carry a serial number
- the method in the embodiment of the present application is introduced above, and the device in the embodiment of the present application will be introduced in the following.
- the method and the device are based on the same technical concept. Since the principles of the method and the device to solve problems are similar, the implementation of the device and the method can be referred to each other, and the repetition will not be repeated.
- the embodiment of the present application may divide the device into functional modules according to the above method example, for example, each function may be divided into each functional module, or two or more functions may be integrated into one module.
- These modules can be implemented not only in the form of hardware, but also in the form of software function modules. It should be noted that the division of the modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be another division manner during specific implementation.
- the device 400 may include: a processing module 410, and optionally, a receiving module 420a, a sending module 420b, and a storage module 430.
- the processing module 410 may be connected to the storage module 430 and the receiving module 420a and the sending module 420b respectively, and the storage module 430 may also be connected to the receiving module 420a and the sending module 420b.
- the above-mentioned receiving module 420a and sending module 420b may also be integrated together and defined as a transceiver module.
- the apparatus 400 may be the first device, or may be a chip or a functional unit applied in the first device.
- the apparatus 400 has any function of the first device in the above-mentioned method, for example, the apparatus 400 can execute the steps performed by the first device in the above-mentioned methods in FIG. 2 and FIG. 3 .
- the receiving module 420a may perform the receiving action performed by the first device in the above method embodiments.
- the sending module 420b may execute the sending action performed by the first device in the above method embodiment.
- the processing module 410 may perform actions other than the sending action and the receiving action among the actions performed by the first device in the above method embodiments.
- the storage module 430 may store computer-executed instructions of the method executed by the first device, so that the processing module 410, the receiving module 420a, and the sending module 420b execute the method executed by the first device in the above examples.
- the storage module may include one or more memories, and the memories may be devices used to store programs or data in one or more devices and circuits.
- the storage module may be a register, cache or RAM, etc., and the storage module may be integrated with the processing module.
- the storage module can be ROM or other types of static storage devices that can store static information and instructions, and the storage module can be independent from the processing module.
- the transceiver module may be an input or output interface, a pin or a circuit, and the like.
- the apparatus 400 may be the second device, or may be a chip or a functional unit applied in the second device.
- the apparatus 400 has any function of the second device in the above method, for example, the apparatus 400 can execute the steps performed by the second device in the methods in FIG. 2 and FIG. 3 above.
- the receiving module 420a may perform the receiving action performed by the second device in the above method embodiments.
- the sending module 420b may execute the sending action performed by the second device in the above method embodiment.
- the processing module 410 may perform actions other than the sending action and the receiving action among the actions performed by the second device in the above method embodiments.
- the storage module 430 may store computer-executed instructions of the method executed by the second device, so that the processing module 410, the receiving module 420a, and the sending module 420b execute the method executed by the second device in the above examples.
- the storage module may include one or more memories, and the memories may be devices used to store programs or data in one or more devices and circuits.
- the storage module may be a register, cache or RAM, etc., and the storage module may be integrated with the processing module.
- the storage module can be ROM or other types of static storage devices that can store static information and instructions, and the storage module can be independent from the processing module.
- the transceiver module may be an input or output interface, a pin or a circuit, and the like.
- the above describes the device applied to the first device and the device applied to the second device according to the embodiments of the present application.
- the following describes possible product forms of the device applied to the first device and the device applied to the second device. It should be understood that any product of any form having the characteristics of the device applied to the first device described in Figure 4 above, and any product of any form having the characteristics of the device applied to the second device, all fall within the scope of protection of this application . It should also be understood that the following introduction is only an example, and should not limit the product form of the device applied to the first device in the embodiment of the present application, and the product form of the device applied to the second device is limited thereto.
- the device can be realized by a general bus architecture.
- FIG. 5 a schematic block diagram of a data processing device 500 is provided.
- the apparatus 500 may include: a processor 510 , and optionally, a communication interface 520 and a memory 530 .
- the communication interface 520 may be used to receive programs or instructions and transmit them to the processor 510, or the communication interface 520 may be used for the apparatus 500 to communicate and interact with other communication devices, such as interactive control signaling and/or service data etc.
- the communication interface 520 may be a code and/or data read/write communication interface, or the communication interface 520 may be a signal transmission communication interface between the processor and the transceiver.
- the processor 510 is electrically coupled to the memory 530 .
- the apparatus 500 may be the first device, or may be a chip applied in the first device. It should be understood that the apparatus has any function of the first device in the above method, for example, the apparatus 500 can execute the steps performed by the first device in the above methods in FIG. 2 and FIG. 3 .
- the memory 530 is used to store computer programs; the processor 510 can be used to call the computer programs or instructions stored in the memory 530 to execute the method performed by the first device in the above examples, or to use the
- the communication interface 520 executes the method executed by the first device in the above example.
- the apparatus 500 may be the second device, or may be a chip applied in the second device. It should be understood that the apparatus has any function of the second device in the above method, for example, the apparatus 500 can execute the steps performed by the second device in the above methods in FIG. 2 and FIG. 3 .
- the memory 530 is used to store computer programs; the processor 510 can be used to call the computer programs or instructions stored in the memory 530 to execute the method performed by the second device in the above examples, or to use the
- the communication interface 520 executes the method executed by the second device in the above example.
- the processing module 410 in FIG. 4 may be implemented by the processor 510 .
- the receiving module 420a and the sending module 420b in FIG. 4 can be implemented through the communication interface 520 .
- the communication interface 520 is divided into a receiver and a transmitter, the receiver performs the function of the receiving module, and the transmitter performs the function of the sending module.
- the storage module 430 in FIG. 4 may be implemented by the memory 530 .
- the device may be realized by a memory controller (the memory controller may also be called a chip or a chip system).
- the storage controller includes: a processor, and a communication interface coupled to the processor;
- the processing module 410 in FIG. 4 may be implemented by a processor.
- the receiving module 420a and the sending module 420b in FIG. 4 can be implemented through a communication interface.
- the input-output interface is divided into an input interface and an output interface, the input interface performs the function of the receiving module, and the output interface performs the function of the sending module.
- the storage module 430 in FIG. 4 may be implemented by a storage medium.
- the communication interface is configured to: receive multiple second commands in parallel;
- the processor is configured to: decapsulate the second command, where the decapsulation includes parsing the first command included in the second command and a sequence identifier, where the sequence identifier is used to indicate the The execution sequence of the commands; scheduling multiple first commands according to the sequence identifier.
- the sequence identifier is a sequence number; when the processor is used to schedule multiple first commands according to the sequence identifier, it is specifically configured to:
- the device may be implemented by flash memory, which includes the storage controller described above and a flash memory array;
- the storage controller is configured to: schedule the first command to access the flash memory array.
- the device of the embodiment of the present application can also be realized using the following: one or more FPGAs (Field Programmable Gate Arrays), PLDs (Programmable Logic Devices), controllers, state machines, Any combination of gate logic, discrete hardware components, any other suitable circuitry, or circuitry capable of performing the various functions described throughout this application.
- FPGAs Field Programmable Gate Arrays
- PLDs Programmable Logic Devices
- controllers state machines, Any combination of gate logic, discrete hardware components, any other suitable circuitry, or circuitry capable of performing the various functions described throughout this application.
- the embodiment of the present application also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a computer, the computer can be used to execute the above-mentioned data processing method.
- the computer program includes instructions for implementing the above data processing method.
- the embodiment of the present application also provides a computer program product, including: computer program code, when the computer program code is run on the computer, the computer can execute the data processing method provided above.
- An embodiment of the present application further provides a data processing system, where the system includes: a first device and a second device for executing the above data processing method.
- processors mentioned in the embodiment of the present application may be a central processing unit (central processing unit, CPU), a baseband processor, and the baseband processor and the CPU may be integrated or separated, or may be a network processor (network processing unit).
- processor NP
- processors may further include hardware chips or other general-purpose processors.
- the aforementioned hardware chip may be an application-specific integrated circuit (application-specific integrated circuit, ASIC), a programmable logic device (programmable logic device, PLD) or a combination thereof.
- the above PLD can be complex programmable logic device (complex programmable logic device, CPLD), field programmable logic gate array (field-programmable gate array, FPGA), general array logic (generic array logic, GAL) and other programmable logic devices , discrete gate or transistor logic devices, discrete hardware components, etc., or any combination thereof.
- CPLD complex programmable logic device
- FPGA field programmable logic gate array
- GAL general array logic
- GAL generator array logic
- a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
- the memory mentioned in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories.
- the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electronically programmable Erase Programmable Read-Only Memory (Electrically EPROM, EEPROM) or Flash.
- the volatile memory can be Random Access Memory (RAM), which acts as external cache memory.
- RAM Static Random Access Memory
- SRAM Static Random Access Memory
- DRAM Dynamic Random Access Memory
- Synchronous Dynamic Random Access Memory Synchronous Dynamic Random Access Memory
- SDRAM double data rate synchronous dynamic random access memory
- Double Data Rate SDRAM DDR SDRAM
- enhanced SDRAM ESDRAM
- Synchlink DRAM SLDRAM
- Direct Memory Bus Random Access Memory Direct Rambus RAM, DR RAM
- the transceiver mentioned in the embodiment of the present application may include a separate transmitter and/or a separate receiver, or the transmitter and the receiver may be integrated. Transceivers can operate under the direction of corresponding processors.
- the transmitter may correspond to the transmitter in the physical device, and the receiver may correspond to the receiver in the physical device.
- the disclosed systems, devices and methods may be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
- the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
- the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
- the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of software products, and the computer software products are stored in a storage medium
- several instructions are included to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
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)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Systems (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
Claims (20)
- 一种数据处理装置,其特征在于,包括:处理器,以及耦合至所述处理器的通信接口;所述处理器,用于:获取多个第一命令;对所述第一命令进行封装,得到第二命令,其中,在所述多个第一命令包括至少两个具有保序要求的目标命令的情况下,所述封装包括为所述目标命令添加顺序标识,所述顺序标识用于指示所述目标命令的执行顺序;所述通信接口,用于:并行地发送多个所述第二命令。
- 如权利要求1所述的装置,其特征在于,所述第一命令为IO命令。
- 如权利要求1或2所述的装置,其特征在于,所述第一命令为:对用户数据的写命令;或,对节点数据的写命令;其中,所述节点数据用于指示所述用户数据所存储的位置。
- 如权利要求1-3任一项所述的装置,其特征在于,所述顺序标识为序列号,通过所述序列号的数值大小指示命令的执行顺序。
- 如权利要求1-4任一项所述的装置,其特征在于,所述处理器,还用于:获取保序标识命令,所述保序标识命令用于指示:位于所述保序标识命令前面的命令的执行顺序早于所述保序标识命令的下一个命令的执行顺序;将在所述保序标识命令之前获取到的第一命令和在所述保序标识命令之后获取到的首个命令,确定为目标命令。
- 如权利要求5所述的装置,其特征在于,为在所述保序标识命令之前获取到的第一命令添加的序列号,与为在所述保序标识命令之后获取到的首个第一命令添加的序列号不同。
- 如权利要求1-6任一项所述的装置,其特征在于,所述通信接口在用于并行地发送多个所述第二命令时,具体用于:并行地、乱序地发送多个所述第二命令。
- 如权利要求1-7任一项所述的装置,其特征在于,所述封装还包括:为所述多个第一命令中的除所述目标命令外的第一命令添加顺序标识。
- 一种存储控制器,其特征在于,包括:处理器,以及耦合至所述处理器的通信接口;所述通信接口,用于:并行地接收多个第二命令;所述处理器,用于:对所述第二命令进行解封装,所述解封装包括解析所述第二命令包括的第一命令和顺序标识,所述顺序标识用于指示具有保序要求的命令的执行顺序;根据所述顺序标识,调度多个所述第一命令。
- 如权利要求9所述的存储控制器,其特征在于,所述顺序标识为序列号;所述处理器在用于根据所述顺序标识,调度多个所述第一命令时,具体用于:按照所述序列号的数值大小,调度多个所述第一命令。
- 一种闪存,其特征在于,包括:如权利要求9或10所述的存储控制器,以及闪存阵列;所述存储控制器,用于:调度所述第一命令对所述闪存阵列进行访问。
- 一种数据处理方法,其特征在于,所述方法包括:获取多个第一命令;对所述第一命令进行封装,得到第二命令,其中,在所述多个第一命令包括至少两个 具有保序要求的目标命令的情况下,所述封装包括为所述目标命令添加顺序标识,所述顺序标识用于指示所述多个目标命令的执行顺序;并行地发送多个所述第二命令。
- 如权利要求12所述的方法,其特征在于,所述顺序标识为序列号,所述序列号的数值大小用于指示执行顺序。
- 如权利要求12或13所述的方法,其特征在于,还包括:获取保序标识命令,所述保序标识命令用于指示:位于所述保序标识命令前面的命令的执行顺序早于,所述保序标识命令的下一个命令的执行顺序;将位于所述保序标识命令前面的命令的执行顺序早于,所述保序标识命令的首个命令的确定为目标命令。
- 如权利要求12-14任一项所述的方法,其特征在于,为在保序标识命令之前获取到的第一命令添加的序列号与,为在所述保序标识命令之后获取到的首个第一命令添加的序列号不同。
- 如权利要求12-15任一项所述的方法,其特征在于,所述封装还包括:为所述多个第一命令中的除所述目标命令外的第一命令添加顺序标识。
- 一种数据处理方法,其特征在于,所述方法包括:并行地接收多个第二命令;对第二命令进行解封装,得到第一命令,解封装包括解析第二命令包括的第一命令和顺序标识,所述顺序标识用于指示多个有保序要求的命令的执行顺序;根据所述顺序标识,调度多个第一命令。
- 如权利要求17所述的方法,其特征在于,所述顺序标识为序列号;所述根据所述顺序标识,调度多个第一命令,包括:按照所述序列号由数值大小,调度所述多个第一命令。
- 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序包括用于实现权利要求12-16任一项所述的方法的指令,或者实现权利要求17或18所述的方法的指令。
- 一种计算机程序产品,其特征在于,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行如权利要求12-16任一项所述的方法,或者执行如权利要求17或18任一项所述的方法。
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2021/097050 WO2022251984A1 (zh) | 2021-05-29 | 2021-05-29 | 一种数据处理方法及装置 |
EP21943366.1A EP4322015A4 (en) | 2021-05-29 | 2021-05-29 | DATA PROCESSING METHOD AND DEVICE |
CN202180094528.8A CN116917876A (zh) | 2021-05-29 | 2021-05-29 | 一种数据处理方法及装置 |
US18/512,033 US20240086114A1 (en) | 2021-05-29 | 2023-11-17 | Data processing method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2021/097050 WO2022251984A1 (zh) | 2021-05-29 | 2021-05-29 | 一种数据处理方法及装置 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US18/512,033 Continuation US20240086114A1 (en) | 2021-05-29 | 2023-11-17 | Data processing method and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022251984A1 true WO2022251984A1 (zh) | 2022-12-08 |
Family
ID=84323785
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/097050 WO2022251984A1 (zh) | 2021-05-29 | 2021-05-29 | 一种数据处理方法及装置 |
Country Status (4)
Country | Link |
---|---|
US (1) | US20240086114A1 (zh) |
EP (1) | EP4322015A4 (zh) |
CN (1) | CN116917876A (zh) |
WO (1) | WO2022251984A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117271100A (zh) * | 2023-11-21 | 2023-12-22 | 北京国科天迅科技股份有限公司 | 算法芯片集群调度方法、装置、计算机设备和存储介质 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106055504A (zh) * | 2016-05-17 | 2016-10-26 | 华为技术有限公司 | 控制数据传输的方法、装置及计算机设备 |
CN107391630A (zh) * | 2017-07-10 | 2017-11-24 | 北京京东尚科信息技术有限公司 | 处理并行网络请求的方法、装置及终端设备 |
CN107748696A (zh) * | 2017-09-20 | 2018-03-02 | 上海壹账通金融科技有限公司 | 一种任务调度的方法及终端设备 |
CN111542803A (zh) * | 2018-06-30 | 2020-08-14 | 华为技术有限公司 | 一种基于NVMe的数据写入方法、装置及系统 |
CN112040001A (zh) * | 2020-09-07 | 2020-12-04 | 平安科技(深圳)有限公司 | 一种基于分布式存储的请求处理方法及装置 |
CN112767978A (zh) * | 2021-01-11 | 2021-05-07 | 湖南国科微电子股份有限公司 | 一种ddr命令调度方法、装置、设备及介质 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10761775B2 (en) * | 2018-02-09 | 2020-09-01 | Samsung Electronics Co., Ltd. | System and method for NVMe inter command association in SSD storage using a bridge device |
-
2021
- 2021-05-29 CN CN202180094528.8A patent/CN116917876A/zh active Pending
- 2021-05-29 WO PCT/CN2021/097050 patent/WO2022251984A1/zh active Application Filing
- 2021-05-29 EP EP21943366.1A patent/EP4322015A4/en active Pending
-
2023
- 2023-11-17 US US18/512,033 patent/US20240086114A1/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106055504A (zh) * | 2016-05-17 | 2016-10-26 | 华为技术有限公司 | 控制数据传输的方法、装置及计算机设备 |
CN107391630A (zh) * | 2017-07-10 | 2017-11-24 | 北京京东尚科信息技术有限公司 | 处理并行网络请求的方法、装置及终端设备 |
CN107748696A (zh) * | 2017-09-20 | 2018-03-02 | 上海壹账通金融科技有限公司 | 一种任务调度的方法及终端设备 |
CN111542803A (zh) * | 2018-06-30 | 2020-08-14 | 华为技术有限公司 | 一种基于NVMe的数据写入方法、装置及系统 |
CN112040001A (zh) * | 2020-09-07 | 2020-12-04 | 平安科技(深圳)有限公司 | 一种基于分布式存储的请求处理方法及装置 |
CN112767978A (zh) * | 2021-01-11 | 2021-05-07 | 湖南国科微电子股份有限公司 | 一种ddr命令调度方法、装置、设备及介质 |
Non-Patent Citations (1)
Title |
---|
See also references of EP4322015A4 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117271100A (zh) * | 2023-11-21 | 2023-12-22 | 北京国科天迅科技股份有限公司 | 算法芯片集群调度方法、装置、计算机设备和存储介质 |
CN117271100B (zh) * | 2023-11-21 | 2024-02-06 | 北京国科天迅科技股份有限公司 | 算法芯片集群调度方法、装置、计算机设备和存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN116917876A (zh) | 2023-10-20 |
EP4322015A4 (en) | 2024-05-08 |
EP4322015A1 (en) | 2024-02-14 |
US20240086114A1 (en) | 2024-03-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20220075661A1 (en) | Technologies for scheduling acceleration of functions in a pool of accelerator devices | |
US11681452B2 (en) | Memory access technology and computer system | |
US9430411B2 (en) | Method and system for communicating with non-volatile memory | |
WO2020078044A1 (zh) | 数据处理的方法、装置和计算设备 | |
US20240086114A1 (en) | Data processing method and apparatus | |
US9390033B2 (en) | Method and system for communicating with non-volatile memory via multiple data paths | |
US11010094B2 (en) | Task management method and host for electronic storage device | |
US9377968B2 (en) | Method and system for using templates to communicate with non-volatile memory | |
US10318362B2 (en) | Information processing apparatus, information processing method, and non-transitory computer-readable storage medium | |
CN111562883B (zh) | 固态硬盘的缓存管理系统、方法、装置 | |
WO2023104194A1 (zh) | 一种业务处理方法及装置 | |
CN109167740B (zh) | 一种数据传输的方法和装置 | |
US20230393782A1 (en) | Io request pipeline processing device, method and system, and storage medium | |
US11431648B2 (en) | Technologies for providing adaptive utilization of different interconnects for workloads | |
WO2022261836A1 (zh) | 存储控制方法及装置、存储方法及装置、电子设备及介质 | |
JP7363344B2 (ja) | メモリ制御装置、および制御方法 | |
US20240012578A1 (en) | Data storage device for guaranteeing that system resources meet performance requirements, method of operating the same, and memory controller for the same | |
WO2023065853A1 (zh) | 数据传输方法、装置、设备、存储介质及程序 | |
WO2023207456A1 (zh) | 命令传输方法和装置 | |
CN117499511A (zh) | 报文处理方法、芯片和计算机设备 | |
CN116074273A (zh) | 一种数据传输方法以及装置 | |
CN113835850A (zh) | 任务处理方法、系统及存储介质 | |
CN117331500A (zh) | 一种乱序聚合处理方法、装置及固态硬盘 | |
CN117170854A (zh) | 一种内存访问方法及相关设备 | |
CN115729440A (zh) | 处理i/o请求的方法、装置、系统、设备及存储介质 |
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: 21943366 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 202180094528.8 Country of ref document: CN |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2021943366 Country of ref document: EP |
|
ENP | Entry into the national phase |
Ref document number: 2021943366 Country of ref document: EP Effective date: 20231106 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |