[go: up one dir, main page]

CN106126124A - A kind of data processing method and electronic equipment - Google Patents

A kind of data processing method and electronic equipment Download PDF

Info

Publication number
CN106126124A
CN106126124A CN201610500526.5A CN201610500526A CN106126124A CN 106126124 A CN106126124 A CN 106126124A CN 201610500526 A CN201610500526 A CN 201610500526A CN 106126124 A CN106126124 A CN 106126124A
Authority
CN
China
Prior art keywords
command
data
unit
channel
idle
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201610500526.5A
Other languages
Chinese (zh)
Other versions
CN106126124B (en
Inventor
毛兴中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Union Memory Information System Co Ltd
Original Assignee
Lenovo Beijing Ltd
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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201610500526.5A priority Critical patent/CN106126124B/en
Publication of CN106126124A publication Critical patent/CN106126124A/en
Application granted granted Critical
Publication of CN106126124B publication Critical patent/CN106126124B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0625Power saving in storage systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06F3/0611Improving I/O performance in relation to response time
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

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)
  • Memory System Of A Hierarchy Structure (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention discloses a kind of data processing method and electronic equipment, described method includes: receive the first order from host side;Described first order carries out the read/write operation of target data for instruction;Described first order is carried out restructuring and obtains at least one second order;The data volume of each described second order instruction operation is identical;Searching the idle command channel of corresponding described second order, described second order is distributed in the command channel for the described free time;Command channel based on the described free time performs described second order of distribution.

Description

Data processing method and electronic equipment
Technical Field
The present invention relates to communications technologies, and in particular, to a data processing method and an electronic device.
Background
Solid State Disk (SSD) storage is increasingly used in the PC consumer domain, in the server domain, and in mobile electronic devices, with increasing performance requirements.
The interface standard of the SSD evolves from Serial Advanced Technology Attachment (SATA)2, SATA3 to advanced peripheral component interconnect standard generation 2 (PCIe G2), PCIe generation 3 (PCIe G3), and the data throughput of the SSD is increasing, which requires that the CPU in the controller (including the CPU and related interfaces such as PCIe interface) of the SSD also have very strong data processing capability, resulting in high power consumption of the CPU, which adversely affects the endurance of the electronic device, especially the mobile device.
For how to reduce the problem that the power consumption of a CPU in an SSD is large due to a large data throughput and frequent read/write operations, an effective solution is not available in the related art.
Disclosure of Invention
The embodiment of the invention provides a data processing method and electronic equipment, which can reduce the power consumption of a CPU and improve the system performance.
The technical scheme of the embodiment of the invention is realized as follows:
in one aspect, an embodiment of the present invention provides a data processing method, including:
receiving a first command from a host; the first command is used for indicating to read/write target data;
recombining the first command to obtain at least one second command; each second command indicates that the data volume of the operation is the same;
searching an idle command channel corresponding to the second command, and distributing the second command to the idle command channel;
executing the assigned second command based on the idle command channel.
In the foregoing scheme, the recombining the first command to obtain at least one second command includes:
analyzing and obtaining the data volume of the target data of the operation requested by the first command;
when the data volume is determined to be larger than a preset unit data volume for data operation, splitting the first command into at least two second commands based on the unit data volume;
when the data volume is determined to be smaller than the preset unit data volume for data operation, combining the commands of the same type as the first command into at least one second command;
wherein the second command indicates to manipulate data corresponding to the unit data amount in the target data.
In the foregoing solution, the executing the allocated second command based on the idle command channel includes:
when the second command is determined to be a write command, storing data written by the second command to a cache unit, and forming combined data with the data volume corresponding to the unit data volume in the cache unit;
and writing the combined data in the cache unit into a data storage unit based on the idle command channel.
In the foregoing solution, the executing the allocated second command based on the idle command channel includes:
when the second command is determined to be a read command, reading data read by the second command from a data storage unit to a cache unit based on the idle command channel, and forming combined data with the data volume corresponding to the unit data volume in the cache unit;
and sending the combined data in the cache unit to the host side.
In the above scheme, the method further comprises:
generating a command descriptor corresponding to the second command based on an idle command channel corresponding to the second command; the command descriptor is used as a basis for executing the allocated second command based on the idle command channel;
the command descriptor includes at least one of:
the data operation type corresponding to the second command;
a command identifier corresponding to the second command;
a logical address of a data operation corresponding to the second command;
a physical address of a data operation corresponding to the second command;
the storage address of the target data of the data operation corresponding to the second command in the cache unit;
and the command completion state corresponding to the second command.
In the foregoing solution, after the executing the allocated second command based on the idle command channel, the method further includes:
and updating the command completion state corresponding to the second command in the command descriptor based on the command identifier corresponding to the second command, so as to release the command channel corresponding to the second command.
In the above scheme, the method further comprises:
detecting that there is at least one second command that is not executed and that no second command is currently executed, triggering execution of the second command that is not executed.
On the other hand, an embodiment of the present invention further provides an electronic device, including:
an interface processing unit for receiving a first command from a host; the first command is used for indicating to read/write target data;
the command reorganization unit is used for reorganizing the first command to obtain at least one second command; each second command indicates that the data volume of the operation is the same;
the command control unit is used for searching an idle command channel corresponding to the second command and distributing the second command to the idle command channel;
a flash control unit for executing the allocated second command based on the free command channel.
In the above scheme, the command restructuring unit is further configured to analyze and obtain a data size of target data of an operation requested by the first command;
when the data volume is determined to be larger than a preset unit data volume for data operation, splitting the first command into at least two second commands based on the unit data volume;
when the data volume is determined to be smaller than the preset unit data volume for data operation, combining the commands of the same type as the first command into at least one second command;
wherein the second command indicates to manipulate data corresponding to the unit data amount in the target data.
In the above scheme, the electronic device further includes a cache unit and a data storage unit;
the command restructuring unit is further configured to, when it is determined that the second command is a write command, store data that is instructed to be written by the second command to a cache unit, and form combined data whose data amount corresponds to the unit data amount in the cache unit;
the flash memory control unit is further configured to write the combined data in the cache unit into a data storage unit based on the idle command channel.
In the above scheme, the electronic device further includes a cache unit and a data storage unit;
the flash memory control unit is further configured to, when it is determined that the second command is a read command, read data indicated by the second command from a data storage unit to a cache unit based on the idle command channel, and form combined data having a data amount corresponding to the unit data amount in the cache unit;
the command recombination unit is further configured to send the combined data in the cache unit to the host end through the interface control unit.
In the foregoing solution, the command control unit is further configured to generate a command descriptor corresponding to the second command based on an idle command channel corresponding to the second command; the command descriptor is used as a basis for executing the allocated second command based on the idle command channel;
the command descriptor includes at least one of:
the data operation type corresponding to the second command;
a command identifier corresponding to the second command;
a logical address of a data operation corresponding to the second command;
a physical address of a data operation corresponding to the second command;
the storage address of the target data of the data operation corresponding to the second command in the cache unit;
and the command completion state corresponding to the second command.
In the foregoing solution, the flash memory control unit is further configured to update a command completion status corresponding to the second command in the command descriptor based on the command identifier corresponding to the second command, so that the command restructuring unit releases the command channel corresponding to the second command based on the command completion status.
In the above scheme, the command control unit is further configured to detect that there is at least one unexecuted second command and no second command is executed currently, and trigger the flash memory control unit to execute the unexecuted second command.
In the embodiment of the invention, a first command from a host end is received; the first command is used for indicating to read/write target data; recombining the first command to obtain at least one second command; each second command indicates that the data volume of the operation is the same; searching an idle command channel corresponding to the second command, and distributing the second command to the idle command channel; executing the assigned second command based on the idle command channel; therefore, the command information and the data block data are processed in parallel without mutual influence, and the speed is high; in addition, only a small amount of CPU in the SSD is needed to participate in the data processing process, and a large amount of work is automatically completed by hardware, so that the load of the CPU is reduced, and the system performance is improved.
Drawings
FIG. 1 is a first schematic flow chart illustrating an implementation of a data processing method according to an embodiment of the present invention;
FIG. 2 is a first schematic diagram illustrating a structure of an electronic device according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating an address mapping table according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating an information structure of a command descriptor according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a second implementation flow of the data processing method according to the embodiment of the present invention;
FIG. 6 is a logic diagram of a data processing method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and specific examples.
Example one
Fig. 1 is a schematic flow chart of an implementation of a data processing method in an embodiment of the present invention, and an application and an electronic device, where a schematic structural diagram of a component of the electronic device is shown in fig. 2, and shown in fig. 1 and fig. 2, and the data processing method in the embodiment of the present invention includes:
step 101: receiving a first command from a host; the first command is used for indicating to read/write target data.
In practical implementation, an interface processing unit in the electronic device receives a first command from a Host (Host) end, where the interface processing unit is an interface between the electronic device and the Host, and may be an interface module in the SSD controller chip, such as USB, SATA, PCIe, and the like.
The first command from the host instructs the electronic device to perform a read operation or a write operation of the target data, that is, to read the target data from the data storage unit in the SSD to the host, or to write the target data from the host into the data storage unit in the SSD.
Step 102: recombining the first command to obtain at least one second command; each of the second commands indicates that the amount of data of the operation is the same.
Here, the purpose of recombining (combining/splitting) the first command of the host side is to recombine (combine/split) into a second command suitable for Flash operation, mainly depending on the characteristics of the Flash particles (page size) and the requirements of software processing in the SSD chip (single page operation or double or multiple page operation); such as: the Flash particle size is 16K bytes, and the software is operated according to double pages, so that the data from the host computer can be recombined to form a data block taking 32K bytes as a unit; that is, if the data block of the operation indicated by the first command is small, the multiple commands are combined into a new command for subsequent operation, and if the data block of the operation indicated by the first command is large, the first command is split into multiple new commands for subsequent processes.
Specifically, in actual implementation, after receiving a first command from an interface processing unit, a command restructuring unit of the electronic device analyzes and obtains a data size of target data requested to be operated by the first command, and then, if it is determined that the data size is greater than a preset unit data size for performing data operation, splits the first command into at least two second commands based on the unit data size; if the data volume is determined to be smaller than the preset unit data volume for data operation, combining the commands of the same type as the first command into at least one second command;
wherein the second command indicates to manipulate data corresponding to the unit data amount in the target data;
the commands of the same type as the first command refer to commands which are read/write operations and indicate that physical addresses for performing data operations point to the same Flash chip;
the unit data size for performing data operation is the data size for performing data operation each time according to the Flash page size and the page operation requirement (single page operation, double page operation, or multiple page operation); if the page size is 16 kbytes according to the single page operation, the unit data size for performing the data operation is 16K; if the page size is 16 kbytes in a double page operation, the unit data amount for performing the data operation is 32 kbytes.
Since the data size of the operation instructed by the first command of the host is likely to be different from the unit data size of the data operation, if the unit data size is 16K and the data size of the operation instructed by the first command is 32K, the first command is recombined to obtain two second commands indicating the data of the unit data size corresponding to the operation target data.
Step 103: and searching an idle command channel corresponding to the second command, and distributing the second command to the idle command channel.
In practical application, a plurality of Flash channels usually exist, and each Flash channel corresponds to one Flash chip in the SSD; in this embodiment, there are usually a plurality of command channels, but the command channels are different from the Flash channels, and one command channel may support (correspond to) one Flash channel, or one command channel may support (correspond to) a plurality of Flash channels, or a plurality of command channels may support (correspond to) one Flash channel.
Because each command channel points to a specific Flash chip, the command control unit in the electronic device searches the channel state (such as idle and occupied) of the command channel corresponding to the second command according to the physical address of the data instructed to be operated by the second command, and allocates the second command to the idle command channel when the corresponding command channel is idle, so as to execute the allocated second command based on the idle command channel.
However, in actual implementation, the physical address of the data of the operation indicated by the second command is: mapping the logic operation address of the second command according to a preset mapping strategy (address mapping table); here, the logical operation address of the second command is a logical address facing the host, and a physical address in Flash corresponding to the logical operation address is searched through an address mapping table; wherein the address mapping table is shown in fig. 3.
In specific implementation, when searching for an idle command channel corresponding to the second command, the method further includes:
the command control unit generates a command descriptor corresponding to the second command based on an idle command channel corresponding to the second command and is responsible for maintaining the command descriptor; the command descriptor includes at least one of:
the data operation type corresponding to the second command; i.e., to indicate a data read operation or a write operation;
a command identifier corresponding to the second command; namely, the command ID, in actual implementation, if the second command is split from the first command, the command IDs of the split second commands are the same and the command IDs of the split first commands are the same; if the second command is formed by combining the first command and another command with the same type, the command ID of the second command comprises two parts, namely the command ID of the first command and the command ID of another command with the same type; the command ID of the second command is used for identifying and tracking in the data operation process, namely whether the first command from the host is finished or not can be identified so as to respond to the host;
a logical address of a data operation corresponding to the second command;
a physical address of a data operation corresponding to the second command;
the storage address of the target data of the data operation corresponding to the second command in the cache unit;
a command completion state corresponding to the second command; the initial state of the second command is not finished, and when the second command is executed and finished, namely the related Flash operation is finished, the command finishing state is updated to be finished;
the schematic diagram of the command descriptor is shown in fig. 4, and it should be noted that the order of the information included in the command descriptor is not fixed, and can be adjusted according to the need, and the included content can also be expanded according to the actual need, and is not limited to the above information; the data storage state description in fig. 4 includes information such as storage location and length of data, and supports concatenation (write operation for the host) or decentralized transmission (read operation for the host) of multiple data segments through a linked list structure (as in fig. 3).
Step 104: executing the assigned second command based on the idle command channel.
Based on the above embodiment of the present invention, in practical application, the flash memory control unit is configured to execute the allocated second command based on the idle command channel;
specifically, when the second command is a write command, the command reorganizing unit stores data written by the second command instruction to the cache unit, combined data with a data amount corresponding to the unit data amount is formed in the cache unit, and the Flash memory control unit writes the combined data in the cache unit into a data storage unit (Flash memory bank) based on an idle command channel corresponding to the second command;
when the second command is a read command, the flash memory control unit reads the data read by the second command instruction from the data storage unit to the cache unit based on the idle command channel corresponding to the second command, and forms combined data with a data volume corresponding to the unit data volume in the cache unit, so that the command reassembly unit sends the combined data in the cache unit to the host end through the interface processing unit.
In practical implementation, the method further comprises:
and the flash memory control unit updates the command completion state corresponding to the second command in the command descriptor based on the command identifier corresponding to the second command, so that when the command reorganizing unit determines that the command of the command channel is completely executed based on the command completion state, the flash memory control unit informs the host that the command is completed and releases the command channel corresponding to the second command.
In practical implementation, the method further comprises:
the command control unit detects that at least one second command which is not executed exists, no second command is executed currently, namely the flash memory control unit is idle, and the flash memory control unit is triggered to execute the second command which is not executed.
It should be noted that, in the electronic device according to the embodiment of the present invention, except for the data storage unit and the cache unit, the functional units are implemented by using CPLD and FPGA modes independently from the CPU in the SSD, so as to achieve the purpose of reducing the power consumption of the CPU.
By applying the embodiment of the invention, the first command of the host is recombined to obtain at least one second command, and the data volume of the operation indicated by each second command is the same, so that scattered data at the host end can be recombined through a linked list according to the characteristics of a Flash chip, and the scattered data can be conveniently written in or read out; allocating an idle command channel for a second command, and then executing the allocated second command based on the idle command channel; therefore, the command information and the data block data are processed in parallel without mutual influence, and the speed is high; in addition, only a small amount of CPU in the SSD is needed to participate in the data processing process, and a large amount of work is automatically completed by hardware, so that the load of the CPU is reduced, and the system performance is improved.
Example two
Fig. 5 is a schematic flow chart illustrating an implementation process of a data processing method in an embodiment of the present invention, and fig. 6 is a logical block diagram of the data processing method in the embodiment of the present invention, and an application and an electronic device, where the electronic device in the embodiment is disposed in an SSD, exists independently from a CPU, and can be implemented by an integrated circuit such as a CPLD or an FPGA; a schematic structural diagram of the electronic device is shown in fig. 2, and as shown in fig. 5, fig. 2, and fig. 6, in an embodiment of the present invention, the data processing method includes:
firstly, an interface processing unit receives a first command from a Host end, wherein the command indicates to carry out read operation or write operation of target data; the interface processing unit is an interface for connecting the electronic device and the host, and can be an interface module in the SSD controller chip, such as USB, SATA, PCIe, and the like.
Then, the command restructuring unit restructures the first command at the Host end according to a preset mapping strategy to obtain at least one second command;
here, the purpose of recombining (combining/splitting) the first command of the host side is to recombine (combine/split) into a second command suitable for Flash operation, mainly depending on the characteristics of the Flash particles (page size) and the requirements of software processing in the SSD chip (single page operation or double or multiple page operation); such as: the Flash particle size is 16K bytes, if the software operates according to double pages, the unit data size for performing data operation is 32K, and if the first command of the host indicates that the data size for performing operation is 16K, the first command and other commands with the same type are combined to be recombined into a command indicating that the unit data size for operating is 32K bytes; that is, if the data block of the operation indicated by the first command is small, the multiple commands are combined into a new command for subsequent operation, and if the data block of the operation indicated by the first command is large, the first command is split into multiple new commands for subsequent processes.
Then, the command control unit searches an available (idle) command channel corresponding to a second command, distributes the second command to the idle command channel and generates a command descriptor corresponding to the second command;
in specific implementation, a plurality of Flash channels usually exist, and each Flash channel corresponds to one Flash chip in the SSD; in this embodiment, there are usually a plurality of command channels, but the command channels are different from the Flash channels, and one command channel may support (correspond to) one Flash channel, or one command channel may support (correspond to) a plurality of Flash channels, or a plurality of command channels may support (correspond to) one Flash channel. The plurality of command channels can be set to different priorities, and the plurality of second commands can be divided into different priorities and written into different command channels according to the processing strategy.
Because each command channel points to a specific Flash chip, the command control unit in the electronic device searches the channel state (such as idle and occupied) of the command channel corresponding to the second command according to the physical address of the data instructed to be operated by the second command, and allocates the second command to the idle command channel when the corresponding command channel is idle, so as to execute the allocated second command based on the idle command channel.
However, in actual implementation, the physical address of the data of the operation indicated by the second command is: mapping the logic operation address of the second command according to a preset mapping strategy (address mapping table); here, the logical operation address of the second command is a logical address facing the host, and a physical address in Flash corresponding to the logical operation address is searched through an address mapping table; wherein the address mapping table is shown in fig. 3.
In the present embodiment, the command descriptor generated by the command control unit includes the following information:
the data operation type corresponding to the second command; i.e., to indicate a data read operation or a write operation; refers to original read command, write command, or other management command sent from the host;
a command identifier corresponding to the second command; namely, the command ID, in actual implementation, if the second command is split from the first command, the command IDs of the split second commands are the same and the command IDs of the split first commands are the same; if the second command is formed by combining the first command and another command with the same type, the command ID of the second command comprises two parts, namely the command ID of the first command and the command ID of another command with the same type; the command ID of the second command is used for identifying and tracking in the data operation process, namely whether the first command from the host is finished or not can be identified so as to respond to the host;
a logical address of a data operation corresponding to the second command; the logical address is a logical address facing the host, and the logical address accessed by the host and the physical address actually written in Flash are not in a one-to-one correspondence relationship, but need to be realized through a mapping table (as shown in fig. 3); in order to facilitate processing, improve processing efficiency and support compatibility of Flash chips of different manufacturers, different designers (chip manufacturers) can adopt different address mapping strategies. For example, a simple one-level address mapping: employing a 16K byte address mapping to handle 16K byte page accesses; or two-level mapping is adopted: the first level adopts 4K byte mapping, the second level flexibly adjusts according to different Flash page sizes, for example, Flash operated by 16K pages adopts 16K byte address mapping.
A physical address of a data operation corresponding to the second command; the physical address corresponding to the logical address and aiming at the Nand can complete the mapping process from the logical address to the physical address through the mapping unit;
the data storage state corresponding to the second command; the data storage state includes a storage address, a data length, a data check format, and the like of the target data in the cache unit;
a command completion state corresponding to the second command; the initial state of the second command is not finished, and when the second command is executed and finished, namely the related Flash operation is finished, the command finishing state is updated to be finished;
the schematic diagram of the command descriptor is shown in fig. 4, and it should be noted that the order of the information included in the command descriptor is not fixed, and can be adjusted according to the need, and the included content can also be expanded according to the actual need, and is not limited to the above information; for example, it may also include related information (what kind of check algorithm, check code rate, check data length, etc. is adopted; and whether to save ECC data, ECC data length, etc. transmitted by the host) for Nand, and operation control information (i.e. specific control information that may be used in the command processing process, such as whether the data allows other commands to be interrupted in the operation process; priority of operation of the current command, etc.).
Then, a Flash memory control unit (NFC, Nand Flash Controller) executes the allocated second command based on the idle command channel, is a main module inside the Controller chip, and is responsible for completing analysis and processing of a Nand specific command;
specifically, when the second command is a write command, the command reorganizing unit stores data written by the second command instruction to the cache unit, combined data with a data amount corresponding to the unit data amount is formed in the cache unit, and the Flash memory control unit writes the combined data in the cache unit into a data storage unit (Flash memory bank) based on an idle command channel corresponding to the second command;
when the second command is a read command, the flash memory control unit reads the data read by the second command instruction from the data storage unit to the cache unit based on the idle command channel corresponding to the second command, and forms combined data with a data volume corresponding to the unit data volume in the cache unit, so that the command reassembly unit sends the combined data in the cache unit to the host end through the interface processing unit.
When the flash memory control unit has the second command which is executed completely, updating the command completion state of the command control unit corresponding to the command ID, so that when the command reorganizing unit (NVMe) determines that the command of the command channel is executed completely based on the command completion state, the host is informed that the command is completed through the interface processing unit, and the command channel corresponding to the second command is released.
In actual implementation, the command control unit detects that there is a second command that is not executed (to be processed), and no second command is currently executed, that is, the current flash memory control unit is idle, and triggers the flash memory control unit to execute the second command that is not executed, that is, read the second command to be processed to the flash memory control unit to be executed.
It should be noted that, in the electronic device according to the embodiment of the present invention, except for the data storage unit and the cache unit, the functional units are implemented by using CPLD and FPGA modes independently from the CPU in the SSD, so as to achieve the purpose of reducing the power consumption of the CPU.
In the embodiment of the invention, only a small amount of CPU in the SSD is needed to participate in the data processing process, and a large amount of work is automatically completed by hardware, so that the load of the CPU is reduced; and improve the system performance; the command processing and the data processing are carried out simultaneously, namely, the command stream is separated from the data stream, so that the speed is high; the Host end data processing and the Flash end data processing work in parallel; commands or data are recombined in a linked list mode (as shown in figure 3), so that the method is flexible and convenient, and scattered data at a host end can be recombined through the linked list according to the characteristics of a Flash chip, and is convenient to write in or read out; in addition, in the embodiment, only data connection (namely, data are spliced in a linked list mode) is performed, and data moving and integration are not performed, so that the requirement on hardware bandwidth is reduced, the efficiency is improved, and the power consumption is reduced; user data (data which needs to be read by a user from a PC end or data which needs to be written into an SSD by the user) is only written in the first time (data written from a host can be stored in a DDR or an SRAM) and read out in the last time (aiming at the user data before the Flash Program command is executed), and is not moved in the middle.
EXAMPLE III
Fig. 7 is a schematic structural diagram of the electronic device in the embodiment of the present invention, and as shown in fig. 7, the electronic device in the embodiment of the present invention includes: an interface processing unit 71, a command reorganizing unit 72, a command control unit 73, and a flash memory control unit 74; wherein,
an interface processing unit 71 for receiving a first command from a host; the first command is used for indicating to read/write target data;
the command reorganization unit 72 is configured to reorganize the first command to obtain at least one second command; each second command indicates that the data volume of the operation is the same;
a command control unit 73, configured to search for an idle command channel corresponding to the second command, and allocate the second command to the idle command channel;
a flash control unit 74 for executing the allocated second command based on the free command channel.
In an embodiment, the command reorganizing unit 72 is further configured to analyze a data amount of target data of the operation requested by the first command;
when the data volume is determined to be larger than a preset unit data volume for data operation, splitting the first command into at least two second commands based on the unit data volume;
when the data volume is determined to be smaller than the preset unit data volume for data operation, combining the commands of the same type as the first command into at least one second command;
wherein the second command indicates to manipulate data corresponding to the unit data amount in the target data.
In one embodiment, the electronic device further includes a buffer unit 75 and a data storage unit 76;
the command reorganizing unit 72 is further configured to, when it is determined that the second command is a write command, store data that is instructed to be written by the second command to a cache unit 75, and form combined data whose data amount corresponds to the unit data amount in the cache unit 75;
the flash control unit 74 is further configured to write the combined data in the buffer unit into a data storage unit 76 based on the free command channel.
In one embodiment, the electronic device further includes a buffer unit 75 and a data storage unit 76;
the flash memory control unit 74 is further configured to, when it is determined that the second command is a read command, read data indicated by the second command from the data storage unit 76 to the buffer unit 75 based on the idle command channel, and form combined data with a data amount corresponding to the unit data amount in the buffer unit 75;
the command restructuring unit 72 is further configured to send the combined data in the buffer unit 75 to the host end through the interface control unit 71.
In an embodiment, the command control unit 73 is further configured to generate a command descriptor corresponding to the second command based on an idle command channel corresponding to the second command; the command descriptor is used as a basis for executing the allocated second command based on the idle command channel;
the command descriptor includes at least one of:
the data operation type corresponding to the second command;
a command identifier corresponding to the second command;
a logical address of a data operation corresponding to the second command;
a physical address of a data operation corresponding to the second command;
the storage address of the target data of the data operation corresponding to the second command in the cache unit;
and the command completion state corresponding to the second command.
In an embodiment, the flash control unit 74 is further configured to update the command completion status corresponding to the second command in the command descriptor based on the command identifier corresponding to the second command, so that the command reorganizing unit 72 releases the command channel corresponding to the second command based on the command completion status.
In an embodiment, the command control unit 73 is further configured to detect that there is at least one second command that is not executed and no second command is currently executed, and trigger the flash control unit 74 to execute the second command that is not executed.
Here, it should be noted that: the above description related to the electronic device is similar to the above description of the method, and the description of the beneficial effects of the method is omitted for brevity. For technical details not disclosed in the embodiments of the electronic device of the present invention, refer to the description of the embodiments of the method of the present invention.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments can be completed by hardware related to program commands, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially or partially implemented in the form of a software product, which is stored in a storage medium and includes several commands for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (14)

1. A method of data processing, the method comprising:
receiving a first command from a host; the first command is used for indicating to read/write target data;
recombining the first command to obtain at least one second command; each second command indicates that the data volume of the operation is the same;
searching an idle command channel corresponding to the second command, and distributing the second command to the idle command channel;
executing the assigned second command based on the idle command channel.
2. The data processing method of claim 1, wherein the recombining the first command into at least one second command comprises:
analyzing and obtaining the data volume of the target data of the operation requested by the first command;
when the data volume is determined to be larger than a preset unit data volume for data operation, splitting the first command into at least two second commands based on the unit data volume;
when the data volume is determined to be smaller than the preset unit data volume for data operation, combining the commands of the same type as the first command into at least one second command;
wherein the second command indicates to manipulate data corresponding to the unit data amount in the target data.
3. The data processing method of claim 1, wherein said executing the assigned second command based on the idle command channel comprises:
when the second command is determined to be a write command, storing data written by the second command to a cache unit, and forming combined data with the data volume corresponding to the unit data volume in the cache unit;
and writing the combined data in the cache unit into a data storage unit based on the idle command channel.
4. The data processing method of claim 1, wherein said executing the assigned second command based on the idle command channel comprises:
when the second command is determined to be a read command, reading data read by the second command from a data storage unit to a cache unit based on the idle command channel, and forming combined data with the data volume corresponding to the unit data volume in the cache unit;
and sending the combined data in the cache unit to the host side.
5. The data processing method of claim 1, wherein the method further comprises:
generating a command descriptor corresponding to the second command based on an idle command channel corresponding to the second command; the command descriptor is used as a basis for executing the allocated second command based on the idle command channel;
the command descriptor includes at least one of:
the data operation type corresponding to the second command;
a command identifier corresponding to the second command;
a logical address of a data operation corresponding to the second command;
a physical address of a data operation corresponding to the second command;
the storage address of the target data of the data operation corresponding to the second command in the cache unit;
and the command completion state corresponding to the second command.
6. The data processing method of claim 5, wherein after the executing the allocated second command based on the idle command channel, the method further comprises:
and updating the command completion state corresponding to the second command in the command descriptor based on the command identifier corresponding to the second command, so as to release the command channel corresponding to the second command.
7. The data processing method of claim 1, wherein the method further comprises:
detecting that there is at least one second command that is not executed and that no second command is currently executed, triggering execution of the second command that is not executed.
8. An electronic device, characterized in that the electronic device comprises:
an interface processing unit for receiving a first command from a host; the first command is used for indicating to read/write target data;
the command reorganization unit is used for reorganizing the first command to obtain at least one second command; each second command indicates that the data volume of the operation is the same;
the command control unit is used for searching an idle command channel corresponding to the second command and distributing the second command to the idle command channel;
a flash control unit for executing the allocated second command based on the free command channel.
9. The electronic device of claim 8,
the command restructuring unit is further configured to analyze and obtain a data volume of target data of the operation requested by the first command;
when the data volume is determined to be larger than a preset unit data volume for data operation, splitting the first command into at least two second commands based on the unit data volume;
when the data volume is determined to be smaller than the preset unit data volume for data operation, combining the commands of the same type as the first command into at least one second command;
wherein the second command indicates to manipulate data corresponding to the unit data amount in the target data.
10. The electronic device of claim 8, further comprising a cache unit and a data storage unit;
the command restructuring unit is further configured to, when it is determined that the second command is a write command, store data that is instructed to be written by the second command to a cache unit, and form combined data whose data amount corresponds to the unit data amount in the cache unit;
the flash memory control unit is further configured to write the combined data in the cache unit into a data storage unit based on the idle command channel.
11. The electronic device of claim 8, further comprising a cache unit and a data storage unit;
the flash memory control unit is further configured to, when it is determined that the second command is a read command, read data indicated by the second command from a data storage unit to a cache unit based on the idle command channel, and form combined data having a data amount corresponding to the unit data amount in the cache unit;
the command recombination unit is further configured to send the combined data in the cache unit to the host end through the interface control unit.
12. The electronic device of claim 8,
the command control unit is further used for generating a command descriptor corresponding to the second command based on an idle command channel corresponding to the second command; the command descriptor is used as a basis for executing the allocated second command based on the idle command channel;
the command descriptor includes at least one of:
the data operation type corresponding to the second command;
a command identifier corresponding to the second command;
a logical address of a data operation corresponding to the second command;
a physical address of a data operation corresponding to the second command;
the storage address of the target data of the data operation corresponding to the second command in the cache unit;
and the command completion state corresponding to the second command.
13. The electronic device of claim 12,
the flash memory control unit is further configured to update a command completion status corresponding to the second command in the command descriptor based on the command identifier corresponding to the second command, so that the command restructuring unit releases the command channel corresponding to the second command based on the command completion status.
14. The electronic device of claim 8,
the command control unit is further configured to detect that at least one unexecuted second command exists and no second command is executed currently, and trigger the flash memory control unit to execute the unexecuted second command.
CN201610500526.5A 2016-06-29 2016-06-29 A kind of data processing method and electronic equipment Active CN106126124B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610500526.5A CN106126124B (en) 2016-06-29 2016-06-29 A kind of data processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610500526.5A CN106126124B (en) 2016-06-29 2016-06-29 A kind of data processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN106126124A true CN106126124A (en) 2016-11-16
CN106126124B CN106126124B (en) 2019-05-21

Family

ID=57285945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610500526.5A Active CN106126124B (en) 2016-06-29 2016-06-29 A kind of data processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN106126124B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108920391A (en) * 2018-06-26 2018-11-30 郑州云海信息技术有限公司 A kind of Nand Flash translation interface and data transfer device
CN109460193A (en) * 2018-11-15 2019-03-12 郑州云海信息技术有限公司 I O process method, apparatus and terminal in a kind of storage system
CN109582215A (en) * 2017-09-29 2019-04-05 华为技术有限公司 Execution method, hard disk and the storage medium of hard disk operation order
CN109614048A (en) * 2018-12-10 2019-04-12 深圳市硅格半导体有限公司 Data read-write method, device and computer readable storage medium based on flash memory
CN110007853A (en) * 2019-01-30 2019-07-12 青岛镕铭半导体有限公司 A kind of Nandflash command handling method, device, terminal and storage medium
CN110010167A (en) * 2019-03-26 2019-07-12 记忆科技(深圳)有限公司 It is a kind of to improve method, apparatus, computer equipment and the storage medium for obtaining descriptor state
CN110058818A (en) * 2019-04-18 2019-07-26 深圳忆联信息系统有限公司 A kind of method and its system based on SSD optimization descriptor processing sequence
CN112965669A (en) * 2021-04-02 2021-06-15 杭州华澜微电子股份有限公司 Data storage system and method
CN114896182A (en) * 2022-05-11 2022-08-12 地平线(上海)人工智能技术有限公司 Storage device, method, electronic device and storage medium
CN115083451A (en) * 2022-06-09 2022-09-20 阿里巴巴(中国)有限公司 Multichannel data processing method, device and equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1752916A (en) * 2005-10-25 2006-03-29 威盛电子股份有限公司 Disk Array Controller and Its Working Method
CN101127775A (en) * 2007-09-24 2008-02-20 中兴通讯股份有限公司 Method for converting transmission channel state of communication equipment and communication equipment
CN101923522A (en) * 2009-06-11 2010-12-22 中兴通讯股份有限公司 Storage controller and method for processing data operation commands
CN103955440A (en) * 2013-12-18 2014-07-30 记忆科技(深圳)有限公司 Nonvolatile storage equipment and method of carrying out data manipulation therethrough
CN104834477A (en) * 2014-02-11 2015-08-12 腾讯科技(深圳)有限公司 Data writing method and device based on flash memory
US20150347056A1 (en) * 2012-12-25 2015-12-03 Nec Corporation Computation device, computation method, and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1752916A (en) * 2005-10-25 2006-03-29 威盛电子股份有限公司 Disk Array Controller and Its Working Method
CN101127775A (en) * 2007-09-24 2008-02-20 中兴通讯股份有限公司 Method for converting transmission channel state of communication equipment and communication equipment
CN101923522A (en) * 2009-06-11 2010-12-22 中兴通讯股份有限公司 Storage controller and method for processing data operation commands
US20150347056A1 (en) * 2012-12-25 2015-12-03 Nec Corporation Computation device, computation method, and medium
CN103955440A (en) * 2013-12-18 2014-07-30 记忆科技(深圳)有限公司 Nonvolatile storage equipment and method of carrying out data manipulation therethrough
CN104834477A (en) * 2014-02-11 2015-08-12 腾讯科技(深圳)有限公司 Data writing method and device based on flash memory

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582215A (en) * 2017-09-29 2019-04-05 华为技术有限公司 Execution method, hard disk and the storage medium of hard disk operation order
US11360705B2 (en) 2017-09-29 2022-06-14 Huawei Technologies Co., Ltd. Method and device for queuing and executing operation commands on a hard disk
CN108920391A (en) * 2018-06-26 2018-11-30 郑州云海信息技术有限公司 A kind of Nand Flash translation interface and data transfer device
CN109460193B (en) * 2018-11-15 2021-06-29 郑州云海信息技术有限公司 IO processing method, device and terminal in a storage system
CN109460193A (en) * 2018-11-15 2019-03-12 郑州云海信息技术有限公司 I O process method, apparatus and terminal in a kind of storage system
CN109614048A (en) * 2018-12-10 2019-04-12 深圳市硅格半导体有限公司 Data read-write method, device and computer readable storage medium based on flash memory
CN110007853A (en) * 2019-01-30 2019-07-12 青岛镕铭半导体有限公司 A kind of Nandflash command handling method, device, terminal and storage medium
CN110010167A (en) * 2019-03-26 2019-07-12 记忆科技(深圳)有限公司 It is a kind of to improve method, apparatus, computer equipment and the storage medium for obtaining descriptor state
CN110058818A (en) * 2019-04-18 2019-07-26 深圳忆联信息系统有限公司 A kind of method and its system based on SSD optimization descriptor processing sequence
CN110058818B (en) * 2019-04-18 2022-06-07 深圳忆联信息系统有限公司 Method and system for optimizing descriptor processing sequence based on SSD
CN112965669A (en) * 2021-04-02 2021-06-15 杭州华澜微电子股份有限公司 Data storage system and method
CN114896182A (en) * 2022-05-11 2022-08-12 地平线(上海)人工智能技术有限公司 Storage device, method, electronic device and storage medium
CN114896182B (en) * 2022-05-11 2023-10-20 地平线(上海)人工智能技术有限公司 Storage device, method, electronic apparatus, and storage medium
US12307091B2 (en) 2022-05-11 2025-05-20 Horizon (shanghai) Artificial Intelligence Technology Co., Ltd. Storage method capable of being concurrently accessed by splitting access command, electronic device and computer readable storage medium implementing the same
CN115083451A (en) * 2022-06-09 2022-09-20 阿里巴巴(中国)有限公司 Multichannel data processing method, device and equipment and storage medium

Also Published As

Publication number Publication date
CN106126124B (en) 2019-05-21

Similar Documents

Publication Publication Date Title
CN106126124B (en) A kind of data processing method and electronic equipment
KR102466353B1 (en) System and method for nvme inter command association in ssd storage
US10528464B2 (en) Memory system and control method
KR102510384B1 (en) Apparatus, system and method for caching compressed data background
JP2022111153A (en) A management system for operating storage media in multiple modes, a storage system including the same, and a method for managing storage media using the same
JP6768928B2 (en) Methods and devices for compressing addresses
US9317312B2 (en) Computer and memory management method
US9304946B2 (en) Hardware-base accelerator for managing copy-on-write of multi-level caches utilizing block copy-on-write differential update table
US8909895B2 (en) Memory apparatus
KR102077149B1 (en) Method for managing memory and apparatus thereof
KR20170008153A (en) A heuristic interface for enabling a computer device to utilize data property-based data placement inside a nonvolatile memory device
US11907129B2 (en) Information processing device, access controller, information processing method, and computer program for issuing access requests from a processor to a sub-processor
KR101579941B1 (en) Method and apparatus for isolating input/output of virtual machines
US9569381B2 (en) Scheduler for memory
WO2018024214A1 (en) Io flow adjustment method and device
CN110119245B (en) Method and system for operating NAND flash memory physical space to expand memory capacity
US12430080B2 (en) Method for dynamic management of command queues in synchronous write operations
US20180329756A1 (en) Distributed processing system, distributed processing method, and storage medium
US10846023B2 (en) Storage device and storage area management method for reducing garbage collection processing
US10108340B2 (en) Method and system for a common processing framework for memory device controllers
KR20150116627A (en) Controller and data storage device including the same
CN108334457A (en) A kind of I O process method and device
KR20220044069A (en) Storage device, operating method of storage device, and operating method of computing device including storage device
CN114296639B (en) Command processing method and flash memory device
US20250284636A1 (en) Memory systems, memory controllers, garbage collection methods, and storage mediums

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20170204

Address after: 100176 Beijing City, Daxing District branch of Beijing economic and Technological Development Zone, fourteen Street No. 99 building 33 building D No. 2226

Applicant after: Beijing legend core technology Co., Ltd.

Address before: 100085 Haidian District West Road, Beijing, No. 6

Applicant before: Lenovo (Beijing) Co., Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20190812

Address after: 518067 Dongjiaotou Workshop D24/F-02, Houhai Avenue, Shekou Street, Nanshan District, Shenzhen City, Guangdong Province

Patentee after: Shenzhen Yi Lian Information System Co., Ltd.

Address before: 100176 Beijing City, Daxing District branch of Beijing economic and Technological Development Zone, fourteen Street No. 99 building 33 building D No. 2226

Patentee before: Beijing legend core technology Co., Ltd.