WO2023142114A1 - Data processing method, apparatus, and electronic device - Google Patents

Data processing method, apparatus, and electronic device Download PDF

Info

Publication number
WO2023142114A1
WO2023142114A1 PCT/CN2022/075186 CN2022075186W WO2023142114A1 WO 2023142114 A1 WO2023142114 A1 WO 2023142114A1 CN 2022075186 W CN2022075186 W CN 2022075186W WO 2023142114 A1 WO2023142114 A1 WO 2023142114A1
Authority
WO
WIPO (PCT)
Prior art keywords
upiu
type
information
data
prompt
Prior art date
Application number
PCT/CN2022/075186
Other languages
French (fr)
Chinese (zh)
Inventor
杨应琼
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2022/075186 priority Critical patent/WO2023142114A1/en
Priority to CN202280038208.5A priority patent/CN117396859A/en
Publication of WO2023142114A1 publication Critical patent/WO2023142114A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus

Definitions

  • the present application relates to the field of storage technology, and in particular to a data processing method, device and electronic equipment.
  • UFS Universal flash storage
  • JEDEC Joint Electron Device Engineering Council
  • Mobile applications may include smartphones, laptops, tablets, and the like.
  • UFS's high-speed serial interface and optimized protocol can significantly improve throughput and system performance.
  • the UFS system may include a UFS host (host) and a UFS device (device).
  • FIG. 1 is a schematic structural diagram of a UFS system.
  • a UFS device may include a UFS device controller and multiple flash memory chips.
  • a plurality of flash memory chips store data in a non-volatile manner, for example, the plurality of flash memory chips may be a plurality of not and (NAND) flash memory (NAND Flash) as shown in FIG. 1 .
  • the UFS device controller controls multiple flash memory chips through the open NAND flash interface (open NAND Flash interface, ONFI).
  • a UFS host (host) and a UFS device (device) can be connected through various interface standards to complete data processing operations such as read operations and write operations.
  • the present application provides a data processing method, device and electronic equipment, which can improve the UFS data throughput rate and are beneficial to improve data read and write performance.
  • the present application provides a data processing method, which may include: generating a first universal flash storage UFS protocol information unit (UFS protocol information unit, UPIU), the first UPIU including prompt type information and a description of the first UPIU Information, the prompt type information includes the first type, the second type or the third type; the first type is used to indicate that the second UPIU is ready, the second type is used to indicate that the second UPIU is not ready, and the third type is used to indicate that the second UPIU is not ready.
  • UFS protocol information unit UFS protocol information unit
  • the physical area descriptor is used to represent the first of the host corresponding to the UPIU The location of a memory; the description information of the first UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; a plurality of UPIUs for responding to the command includes the first UPIU and the second UPIU, and the command is used to request For writing data or reading data, the data cache offset of the first UPIU is used to indicate the position of the first UPIU among the multiple UPIUs used to respond to the command; sending the first UPIU.
  • the second UPIU is sent after the first UPIU, for example, the second UPIU is sent within a period of time after the first UPIU is sent.
  • the hint type information is carried in the first UPIU sent, and the hint type information is used to instruct the host to adjust the physical area descriptor in the high-speed memory of the host, so that the adjusted physical area descriptor will be received later with a higher probability
  • the hit rate of the high-speed memory of the host can be improved to achieve a better UFS data throughput rate, which is beneficial to improve data read and write performance.
  • the hint type information is the first type or the second type
  • the host before the host receives the second UPIU, it can prefetch the physical area descriptor of the second UPIU based on the hint type information carried by the first UPIU, and save it in in the host's high-speed memory.
  • the host receives the second UPIU, it can quickly obtain the physical area descriptor of the second UPIU from the high-speed memory, and then fetch data from the first memory of the host according to the physical area descriptor of the second UPIU, or send data to Writing data into the first memory of the host.
  • the corresponding physical area descriptor is extracted in advance, which can increase the processing speed of the second UPIU, thereby improving data read and write performance.
  • the first memory is usually a power-off volatile memory, and its stored content will be lost when the power is off, and it can also be called a memory (Memory) or a main memory.
  • Prefetching in this application refers to fetching in advance or fetching in advance. That is, the host has extracted the physical area descriptor of the second UPIU before receiving the second UPIU, instead of extracting the physical area descriptor of the second UPIU when receiving the second UPIU. That is, the timing of extracting the physical area descriptor is earlier than the timing of the second UPIU arriving at the host.
  • generating the first universal flash storage UFS protocol information unit UPIU includes: obtaining the first data volume and the status information of the second UPIU; determining the status information of the first data volume and the second UPIU The prompt type information of the first UPIU.
  • the first data amount may also be referred to as a currently unfinished hint (hint outstanding) data amount.
  • the data volume of the currently outstanding hint refers to the data volume of the UPIU indicated by the hint information that has been sent but not sent.
  • the data size of the currently outstanding hint is 0KB.
  • the data size of the currently outstanding prompt is greater than 0KB.
  • the data volume of the currently outstanding notification may include the data volume of the fourth UPIU indicated by the respective first type or the second type of at least one third UPIU, that is, the data volume of at least one fourth UPIU. At least one third UPIU is sent before sending the first UPIU, and at least one fourth UPIU is an unsent UPIU.
  • the prompt type information of the first UPIU is determined according to the data volume of the currently uncompleted prompt and the state information of the second UPIU.
  • the prompt type information includes the first type, the second type or the third type. In this way, differentiated prompt type information is provided for different scenarios, so as to adapt to data transmission requirements of different scenarios.
  • determining the prompt type information of the first UPIU includes: judging whether the first data amount is less than a first threshold; when the first data amount is less than When the first threshold is reached, the prompt type information of the first UPIU is determined according to the status information of the second UPIU, where the prompt type information includes the first type or the second type.
  • the first data amount is less than the first threshold, it means that the unfinished hints (hint outstanding) of the UFS device (device) are not exhausted, and the first type or the second type can be carried in the first UPIU, so that the host Before receiving the second UPIU, the physical area descriptor of the second UPIU may be prefetched based on the hint type information carried by the first UPIU, and stored in the high-speed memory of the host. Afterwards, if the host receives the second UPIU, it can quickly obtain the physical area descriptor of the second UPIU from the high-speed memory, which can increase the processing speed of the second UPIU, thereby improving data read and write performance.
  • the prompt type information of the first UPIU is determined, and the prompt type information includes the first type or the second type, including:
  • different prompt type information is determined according to the status information of the second UPIU.
  • the status information of the second UPIU indicates that the second UPIU is ready
  • determine that the prompt type information is the first type
  • the status information of the second UPIU indicates that the second UPIU is not ready
  • the information is of the second type, so that the host adjusts the physical area descriptor in the high-speed memory of the host based on different hint type information, so that the adjusted physical area descriptor is hit by the second UPIU received later with a higher probability .
  • the physical area description prefetched by the host based on the first type has a higher priority in the high-speed memory than the physical area description prefetched by the host based on the second type.
  • the method further includes: when the first data amount is equal to a first threshold, determining that the prompt type information is a third type.
  • the type of hint information is determined to be the third type, and the host is deleted through the third type instruction At least one item of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory. In this way, the problem that subsequent hint information cannot be sent due to the limitation of unfinished hint outstanding can be avoided.
  • determining that the prompt type information is the third type includes: determining that the prompt type information is the third type when the status information of the second UPIU indicates that the second UPIU is ready.
  • the prompt information type is the third type, and the high-speed At least one item in the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the memory. In this way, the problem that the prompt information for indicating that the second UPIU is ready cannot be issued due to the limitation of unfinished hint outstanding can be avoided.
  • the first UPIU includes: ready-to-transmit RTT UPIU or read-in data UPIU.
  • the first UPIU When the command is used to request to write data, the first UPIU is ready for transmission RTT UPIU, when the command is used to request to read data, the first UPIU is the read data UPIU.
  • the prompt type information of the second UPIU sent later is carried, and the host is notified in advance of the adjustment through the prompt type information.
  • the physical area descriptor in the high-speed memory of the host so that the adjusted physical area descriptor is hit by the second UPIU received later with a higher probability, so that the hit rate of the high-speed memory of the host can be improved to achieve better
  • the high UFS data throughput rate is beneficial to improve data read and write performance.
  • the prompt type information is located in the reserved field segment of the prompt information of the ready-to-transmit RTT UPIU or the read-in data UPIU.
  • the reserved field segment of the prompt information of the transmission ready RTT UPIU or the read-in data UPIU can carry the prompt type information without adding a new field segment, so that the format of the UPIU carrying the prompt type information is consistent with the existing UFS protocol standard definition
  • the format of the UPIU is the same, which is beneficial to improve the compatibility and implementability of the data processing method.
  • the method further includes: receiving a command UPIU; and generating a first UPIU in response to the command UPIU.
  • the prompt type information is carried in the first UPIU responding to the command UPIU, so as to increase the data writing or reading speed.
  • the present application provides a data processing method, which may include: receiving a first universal flash storage UFS protocol information unit (UFS protocol information unit, UPIU), the first UPIU including prompt type information and a description of the first UPIU Information, the prompt type information includes the first type, the second type or the third type; the first type is used to indicate that the second UPIU is ready, the second type is used to indicate that the second UPIU is not ready, and the third type is used to indicate that the second UPIU is not ready.
  • UFS protocol information unit UFS protocol information unit
  • the physical area descriptor is used to represent the host corresponding to the UPIU The location of the first memory; the description information of the first UPIU includes the identification information of the first UPIU and the data buffer offset of the first UPIU; a plurality of UPIUs for responding to the command includes the first UPIU and the second UPIU, and the command Used to request to write data or read data, the data cache offset of the first UPIU is used to indicate the position of the first UPIU among the multiple UPIUs used to respond to commands; according to the prompt type information, adjust the high speed of the host A physical region descriptor in memory.
  • the physical region descriptor in the high-speed memory of the host is adjusted according to the hint type information, including:
  • the hint type information is the first type
  • the hint type information is the second type
  • the prompt type information is the third type, delete at least one item of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host.
  • the method before receiving the first UPIU, further includes: receiving at least one third UPIU, the first type or the second type included in each of the at least one third UPIU is used to indicate the respective corresponding first UPIU
  • the four UPIUs are ready or not ready, and the physical area descriptor in the high-speed memory of the host includes the physical area descriptor of the fourth UPIU corresponding to each of the at least one third UPIU.
  • the first UPIU includes: ready-to-transmit RTT UPIU or read-in data UPIU.
  • the prompt type information is located in the reserved field segment of the prompt information of the ready-to-transmit RTT UPIU or the read-in data UPIU.
  • the present application provides a data processing device, which includes: a controller and a transmission interface; the controller is used to generate a first universal flash storage UFS protocol information unit UPIU, and the first UPIU includes prompt type information and the description information of the first UPIU, the prompt type information includes the first type, the second type or the third type; the first type is used to indicate that the second UPIU is ready, and the second type is used to indicate the second UPIU Not ready, the third type is used to indicate to delete at least one of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host; the physical area The descriptor is used to indicate the location of the first memory of the host corresponding to the UPIU; the description information of the first UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; multiple UPIU includes the first UPIU and the second UPIU, the command is used
  • the controller is configured to: obtain the first data amount and the state information of the second UPIU; the first data amount is the currently sent prompt information, but the data of the UPIU indicated by the prompt information has not been sent amount; according to the first data amount and the status information of the second UPIU, determine the prompt type information of the first UPIU.
  • the controller is configured to: determine whether the first data amount is smaller than a first threshold; when the first data amount is smaller than the first threshold, determine the first UPIU according to the state information of the second UPIU
  • the prompt type information of the prompt type information includes the first type or the second type.
  • the controller is configured to: determine whether the status information of the second UPIU indicates that the second UPIU is ready; when the status information of the second UPIU indicates that the second UPIU is ready, determine the The prompt type information is the first type; when the status information of the second UPIU indicates that the second UPIU is not ready, it is determined that the prompt type information is the second type.
  • the controller is further configured to: when the first data amount is equal to the first threshold, determine that the prompt type information is a third type.
  • the controller is configured to: determine that the prompt type information is the third type when the status information of the second UPIU indicates that the second UPIU is ready.
  • the first UPIU includes: ready-to-transmit RTT UPIU or read-in data UPIU.
  • the prompt type information is located in the reserved field segment of the prompt information of the transmission ready RTT UPIU or read-in data UPIU.
  • the controller is further configured to: receive a command UPIU through the transmission interface; and generate the first UPIU in response to the command UPIU.
  • the present application provides a data processing device, which includes: a transmission interface, a controller, a high-speed memory, and a first memory; the controller is used to receive the first universal flash storage UFS protocol information unit UPIU, the first The UPIU includes prompt type information and description information of the first UPIU, the prompt type information includes the first type, the second type or the third type; the first type is used to indicate that the second UPIU is ready, and the second type is used In order to indicate that the second UPIU is not ready, the third type is used to indicate to delete at least one of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host.
  • the physical area descriptor is used to indicate the location of the first memory corresponding to the UPIU;
  • the description information of the first UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; used for responding to commands
  • the multiple UPIUs include the first UPIU and the second UPIU, the command is used to request to write data or read data, and the data cache offset of the first UPIU is used to indicate that the first UPIU is used to respond to the command Locations in multiple UPIUs; the controller is also used to adjust the physical area descriptor in the high-speed memory of the host according to the hint type information.
  • the controller is configured to: when the hint type information is the first type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and save it to the host's In the high-speed memory; when the hint type information is the second type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and save it in the high-speed memory of the host with the second priority; the second priority The level is lower than the first priority; when the prompt type information is the third type, delete the physical area descriptor of the UPIU indicated by the first type or the physical area description of the UPIU indicated by the second type in the high-speed memory of the host at least one of the characters.
  • the controller is further configured to receive at least one third UPIU through a transmission interface before receiving the first UPIU, and each of the at least one third UPIU includes a first type or a second type for Indicating that the corresponding fourth UPIU is ready or not ready, the physical area descriptor in the high-speed memory includes the physical area descriptor of the fourth UPIU corresponding to the at least one third UPIU.
  • the first UPIU includes: ready-to-transmit RTT UPIU or read-in data UPIU.
  • the prompt type information is located in the reserved field segment of the prompt information of the transmission ready RTT UPIU or read-in data UPIU.
  • the present application provides a data processing apparatus, where the data processing apparatus is used as a storage device, for example, a UFS device.
  • the data processing apparatus may be an electronic device or a chip or a system-on-a-chip in the electronic device, and may also be a functional module in the electronic device for realizing the first aspect or any possible design method of the first aspect.
  • the device for data processing can realize the functions of the above-mentioned first aspect or each possible design of the first aspect, and the functions can be realized by executing corresponding software through hardware.
  • the hardware or software includes one or more modules with corresponding functions described above.
  • the data processing apparatus may include: a UPIU generation module and a transceiver module.
  • the present application provides a data processing device, where the data processing device serves as a host, for example, a UFS host.
  • the data processing apparatus may be an electronic device or a chip or a system-on-chip in the electronic device, and may also be a functional module in the electronic device for realizing the second aspect or any possible design method of the second aspect.
  • the device for data processing can realize the function of the second aspect or each possible design of the second aspect, and the function can be realized by executing corresponding software by hardware.
  • the hardware or software includes one or more modules with corresponding functions described above.
  • the data processing apparatus may include: a UPIU processing module and a transceiver module.
  • the present application provides a storage system, the storage system includes a storage device and a host; the storage device is used to execute the method according to the first aspect or any one of the first aspect, and the host is used to Execute the method as described in the second aspect or any one of the second aspect.
  • the present application provides an electronic device, including: a host and a storage device coupled to the host; the host is used to execute the method as described in the second aspect or any one of the second aspect; the storage The device is used to execute the method according to the first aspect or any one of the first aspect.
  • the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a storage device, the method described in any one of the above-mentioned first aspects is implemented.
  • the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a host, the method described in any one of the above-mentioned second aspects is implemented.
  • the present application provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the method described in any one of the above first aspects is implemented.
  • the present application provides a computer program product, the computer program product includes a computer program, and when the computer program is executed by a processor, the method described in any one of the above-mentioned second aspects is implemented.
  • FIG. 1 is a schematic structural diagram of a UFS system according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a write operation provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a read operation provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of sequential transmission of write operations provided by the embodiment of the present application.
  • FIG. 5 is a schematic diagram of out-of-order transmission of write operations provided by the embodiment of the present application.
  • FIG. 6 is a schematic diagram of a UFS device (device) 10 and a UFS host (host) 20 provided by an embodiment of the present application;
  • FIG. 7 is a flowchart of a data processing method provided in an embodiment of the present application.
  • FIG. 8A is a schematic diagram of a UPIU according to an embodiment of the present application.
  • FIG. 8B is a schematic diagram of the field segment composition of a UPIU provided by the embodiment of the present application.
  • FIG. 9 is a schematic diagram of a data processing method provided in an embodiment of the present application.
  • FIG. 10 is a flowchart of a data processing method provided in an embodiment of the present application.
  • FIG. 11 is a flow chart of a data processing method provided in an embodiment of the present application.
  • FIG. 12 is a flow chart of a data processing method provided in an embodiment of the present application.
  • FIG. 13 is a schematic diagram of a data processing device 1300 provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of a data processing device 1400 provided by an embodiment of the present application.
  • FIG. 15 is a schematic diagram of an electronic device provided by an embodiment of the present application.
  • first and second in the specification and drawings of the present application are used to distinguish different objects, or to distinguish different processes for the same object, rather than to describe a specific sequence of objects.
  • UFS protocol information unit is the carrier of command, data and status information transmission.
  • UPIU is a data packet with a fixed format.
  • UFS host host
  • UFS device device
  • the UPIU may include a command UPIU, a data transfer UPIU, a status UPIU, and the like.
  • the command UPIU (Command UPIU) is a write command or a read command sent by the host (host) to the UFS device (device).
  • Data transfer UPIU can include ready to transfer UPIU (ready to transfer UPIU, RTT UPIU), write data UPIU (DataOut UPIU) and read data UPIU (DataIn UPIU), etc.
  • the ready to transfer UPIU (ready to transfer UPIU, RTT UPIU) is the UPIU sent by the UFS device (device) to the host (host) when processing the write command, and is used to inform the host (host) that it is ready to receive data.
  • Write data UPIU (DataOut UPIU), which is the UPIU sent to the UFS device (device) after the host (host) receives the RTT UPIU, and is used to write data to the UFS device (device).
  • Read in data UPIU (DataIn UPIU), which is the UPIU sent by the UFS device (device) to the host (host), and is used to transmit data to the host (host).
  • the status UPIU may include a response UPIU (Response UPIU) and the like.
  • Response UPIU is the UPIU sent by the UFS device (device) to the host (host), and is used to return the execution status of the write command or read command.
  • UPIU may also include UPIUs with other functions, and this embodiment of the present application does not illustrate one by one.
  • NAND flash memory is a non-volatile random access storage medium, which is characterized by data not disappearing after power failure.
  • the flash technology used in NAND flash memory can include single-level storage single-level cell (Single-LevelCell, SLC) (1bit/cell), multi-level cell (Multi-Level Cell, MLC) (2bit/cell), three Trinary-Level Cell (TLC) (3bit/cell), and even Quad-Level Cell (QLC) (4bit/cell) technology.
  • SLC single-level storage single-level cell
  • MLC multi-level cell
  • TLC Trinary-Level Cell
  • QLC Quad-Level Cell
  • the embodiment of the present application takes NAND flash memory (NAND Flash) using TLC technology as an example for illustration.
  • Write operation is the operation of writing data to NAND flash memory (NAND Flash).
  • Fig. 2 is the synoptic diagram of the write operation that the embodiment of the present application provides, as shown in Fig. 2, write operation can pass above-mentioned order UPIU (Command UPIU), one or more RTT UPIU and write out data UPIU (DataOut UPIU), and response UPIU (Response UPIU) implementation.
  • UPIU Common UPIU
  • RTT UPIU write out data UPIU
  • Response UPIU Response UPIU
  • the read operation is the operation of reading data from NAND flash memory (NAND Flash).
  • Fig. 3 is the schematic diagram of the read operation that the embodiment of the present application provides, and as shown in Fig. 3, read operation can pass above-mentioned order UPIU (Command UPIU), one or more read in data UPIU (DataIn UPIU), and response UPIU (Response UPIU) implementation.
  • UPIU Common UPIU
  • DataIn UPIU data In UPIU
  • response UPIU Response UPIU
  • the data buffer offsets of multiple RTT UPIUs are sequentially incremented, and for read operations, the data buffer offsets of multiple read-in data UPIUs (DataIn UPIUs) are The shift (data buffer offset) is sequentially increasing.
  • Fig. 4 is a schematic diagram of the sequential transmission of the write operation provided by the embodiment of the present application.
  • the command UPIU (Command UPIU) is used to request the transmission of 48 kilobytes (Kbyte, KB) of data (that is, write 48KB of data), which is divided into two write-out data UPIU (DataOut UPIU) transmission, that is, write-out data UPIU 1 and write-out data UPIU 2.
  • the data cache offset of RTT UPIU 1 and the data cache offset of RTT UPIU 2 are sequentially increasing.
  • the data buffer offset (data buffer offset) of multiple RTT UPIUs is non-sequentially incremented, and for read operations, multiple read-in data UPIUs (DataIn UPIU)
  • the data cache offset for is non-sequentially increasing.
  • FIG. 5 is a schematic diagram of the out-of-order transmission of the write operation provided by the embodiment of the present application.
  • DataOut UPIU write out data UPIU
  • the data cache offset of RTT UPIU 1 and the data cache offset of RTT UPIU 2 are non-sequentially increasing.
  • the data cache offset of RTT UPIU 1 is 16KB
  • the data cache offset of RTT UPIU 2 is 0KB.
  • the out-of-order (ooo) execution method to complete the read or write operation can reduce the amount of internal cached data and command execution time, which can improve data read and write performance .
  • the data processing method of the embodiment of the present application can be aimed at completing the read operation or the write operation through out of order (out of order, ooo) execution, so as to further improve the performance of data read and write.
  • the data processing method of the present application will be specifically explained below using several embodiments.
  • FIG. 6 is a schematic diagram of a UFS device (device) 10 and a UFS host (host) 20 according to an embodiment of the present application.
  • the UFS The device (device) 10 can be any non-volatile memory that provides the function of writing/reading data for the UFS host (host) 20 .
  • the UFS device (device) 10 can be built in the UFS host (host) 20, and can also be set independently from the UFS host (host) 20.
  • UFS device (device) 10 and the UFS host ( host) 20 are co-located in one electronic device, which is not specifically limited in this application.
  • UFS host (host) 20 or UFS equipment (device) 10 can specifically be a chip or a chipset or a circuit board equipped with a chip or chipset, and the chip or chipset or a circuit board equipped with a chip or chipset can be Work under software drive.
  • a UFS device (device) 10 may include a UFS device controller 101 and a non-volatile memory 102 .
  • UFS device controller 101 is used to manage and control communication between UFS host (host) 20 and UFS device (device) 10, and provide standardization for communication between UFS host (host) 20 and UFS device (device) 10 (for example, the UFS standard of the embodiment of the present application).
  • the UFS device controller 101 may respond to commands sent by the UFS host (host) 20 (for example, commands such as write and read), perform corresponding operations, and return a completion status to the UFS host (host) 20.
  • the UFS device controller 101 can generate the first UPIU, the second UPIU, etc.
  • UFS equipment (device) 10 can also comprise transmission interface (not shown in the figure), and this transmission interface is used for receiving or sending UFS standard protocol packet, for example, sends the first UPIU involved in this application, the first UPIU involved in this application through this transmission interface.
  • the non-volatile memory 102 may include, but is not limited to, Flash memory (eg, NAND flash memory, NOR flash memory, etc.). In the embodiment of the present application, the non-volatile memory 102 is taken as an example for a plurality of NAND flash memories (NAND Flash).
  • Flash memory eg, NAND flash memory, NOR flash memory, etc.
  • NAND Flash NAND flash memories
  • a UFS host (host) 20 may include a host controller 201 , a high-speed memory 202 and a first memory 203 .
  • the UFS host (host) 20 may further include a processor 204 .
  • the host controller 201 is used to manage and control the communication between the UFS host (host) 20 and the UFS device (device) 10, and provide standardization ( For example, the interface of the UFS standard of the embodiment of the present application). Specifically, the host controller 201 may transmit commands (for example, commands such as write and read) and data to the UFS device (device) 10 according to the read/write commands issued by the processor 204 .
  • commands for example, commands such as write and read
  • data for example, commands such as write and read
  • the host controller 201 can convert the command or data into a UFS standard protocol packet by encapsulation, and for the UFS standard protocol packet received by the UFS host (host) 20 (for example, the first UPIU, the second UPIU involved in this application etc.), the host controller 201 can analyze it, complete the corresponding processing, and notify the processor 204 of the processing result.
  • UFS host (host) 20 can also comprise transmission interface (not shown in the figure), and this transmission interface is used for receiving or sending UFS standard protocol packet, for example, receives the first UPIU involved in this application, the first UPIU involved in this application through this transmission interface. 2 Upiu et al.
  • the first memory 203 is usually a power-off volatile memory, and the content stored therein will be lost when the power is off, and may also be called a memory or a main memory.
  • the first memory 203 in this application includes a readable and writable running memory, and its function is to temporarily store the operation data in the processor 204, command descriptor (command descriptor), and communicate with UFS device (device) 10 or other External memory exchange data. For example, data read from the UFS device (device) 10 or data written to the UFS device (device) 10 .
  • the first memory 203 may include one or more of dynamic random access memory (DRAM), static random access memory (SRAM), synchronous dynamic random access memory (SDRAM), and the like.
  • DRAM includes double data rate synchronous dynamic random access memory (Double Data Rate Synchronous Dynamic Random Access Memory, DDR SDRAM) referred to as DDR, second generation double rate synchronous dynamic random access memory (DDR2), third generation double rate synchronous dynamic random access memory (DDR3 ), four generations of low power double data rate synchronous DRAM (Low Power Double DataRate 4, LPDDR4) and five generations of low power double data rate synchronous DRAM (Low Power Double DataRate 5, LPDDR5), etc.
  • DDR SDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • DDR2 second generation double rate synchronous dynamic random access memory
  • DDR3 third generation double rate synchronous dynamic random access memory
  • LPDDR4 Low Power Double DataRate 4
  • LPDDR5 Low Power Double DataRate 5 LPDDR5
  • the high-speed memory 202 in the embodiment of the present application is used to store a prefetched physical region descriptor (physical region descriptor), and the physical region descriptor may include a physical address (physical address) and a length.
  • the physical region descriptor may be an entry of a physical region description table (Physical Region Description Table, PRDT).
  • the physical area descriptor may be used by the host (host) to write data into the first memory 203 or retrieve data from the first memory 203 during the data read/write operation.
  • the physical area descriptor may be prefetched based on the RTT UPIU or the prompt information field segment read into the data UPIU, that is, the prefetched physical area descriptor to improve data read and write performance.
  • the prefetching in this embodiment of the present application may also be understood as prefetching or prefetching.
  • the content stored in the high-speed memory 202 can be dynamically adjusted.
  • the high-speed memory 202 is a memory capable of high-speed data exchange.
  • the high-speed memory 202 may include one or more of a cache or a register.
  • the processor 204 can run an operating system, a file system (such as a flash file system F2FS), or an application program to control multiple hardware or software components connected to the processor 204, and can process various data and perform operations.
  • the processor 204 can load the instructions or data stored in the UFS device (device) 10 into the first memory 203, and transfer the instructions or data that need to be calculated to the processor 204 for calculation. After the calculation is completed, the processor 204 can then The results are temporarily stored in the first memory 203 , and instructions or data that need long-term storage are stored in the UFS device (device) 10 through the host controller 201 .
  • the processor 204 may include one or more processing units (also called processing cores), for example: the processor 204 may include a central processing unit (CPU), an application processing unit (application processor, AP), a modem processing unit, a graphics Processing unit (graphics processing unit, GPU), image signal processing unit (image signal processor, ISP), video codec unit, digital signal processing unit (digital signal processor, DSP), baseband processing unit and neural network processing unit (neural- One or more of network processing unit, NPU) and the like. Wherein, different processing units may be independent devices, or may be integrated in one or more devices. Further, the processor 204 may also be implemented as a system on chip (System on Chip, SoC).
  • SoC System on Chip
  • UFS device (device) 10 or the UFS host (host) 20 may include more or fewer components than shown in the figure, or combine some components, or split some components, or different layout of the components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the above-mentioned UFS device (device) 10 and UFS host (host) 20 can be used as a part of an electronic device (that is, they are co-located in the same electronic device), and the electronic device can include but not limited to a mobile phone, a tablet computer, a notebook computer, a super mobile personal computer (ultra-mobile personal computer, UMPC), handheld computer, netbook, personal digital assistant (PDA), wearable electronic devices, virtual reality (virtual reality, VR) equipment, augmented reality (augmented reality, AR) equipment , smart home devices, vehicle-mounted devices, and devices in the Internet of Things (Internet of Things, IoT), etc., or may also include servers or service clusters, which are not limited in this embodiment of the present application.
  • FIG. 7 is a flow chart of a data processing method provided by an embodiment of the present application.
  • the data processing method of this embodiment involves a host and a storage device.
  • the host may be the UFS host (host) in the above embodiment.
  • the storage device may be the UFS device (device) of the foregoing embodiment, as shown in FIG. 7, the method may include:
  • the storage device generates a first UPIU, where the first UPIU includes prompt type information and description information of the first UPIU.
  • the hint type (hint type) information includes the first type, the second type or the third type.
  • the first type is used to indicate that the second UPIU is ready.
  • This second type is used to indicate that the second UPIU is not ready.
  • the third type is used to indicate to delete at least one item of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host.
  • the physical area descriptor is used to indicate the location of the first memory of the host corresponding to the UPIU.
  • the physical region descriptor may include a physical address and a length.
  • the description information of the first UPIU may include identification information of the first UPIU and a data buffer offset (data buffer offset) of the first UPIU. Not ready in this embodiment of the present application refers to not being ready but predicted to be ready soon (for example, after a period of time).
  • a plurality of UPIUs for responding to the command includes the first UPIU and the second UPIU, the command is used to request to write data or read data, and the data buffer offset (data buffer offset) of the first UPIU is used to represent the first UPIU The position of a UPIU among the UPIUs used to respond to commands.
  • the first UPIU is generated after the storage device receives a command UPIU (Command UPIU) sent by the host.
  • the command UPIU (Command UPIU) can be used to request to write data or read data, that is, write command or read command.
  • the first UPIU may be any one of multiple RTT UPIUs in response to the command UPIU (Command UPIU) or any one of multiple read-in data UPIUs (DataIn UPIU).
  • the command UPIU (Command UPIU) can be the command UPIU (Command UPIU) shown in Figure 5, and the first UPIU can be RTT UPIU 1 or RTT UPIU 2.
  • the description information of RTT UPIU 1 may include identification information of RTT UPIU 1 and a data buffer offset (data buffer offset) of RTT UPIU 1.
  • the data buffer offset of the RTT UPIU 1 is 16KB. That is, for the command UPIU (Command UPIU) sent by the host, the storage device responds through two RTT UPIUs (ie, RTT UPIU 1 and RTT UPIU 2), and the data buffer offsets (data buffer offset) of the two RTT UPIUs are different.
  • the first UPIU may be an RTT UPIU, or may be a data-in UPIU (DataIn UPIU).
  • the first UPIU may include multiple fields for carrying different information.
  • the first UPIU may include a hint (hint) field and a description field.
  • the description field is used to carry relevant information of the current UPIU (that is, the first UPIU).
  • the description information of the first UPIU carried in the description field includes but not limited to identification information of the first UPIU and a data buffer offset (data buffer offset) of the first UPIU.
  • the identification information of the first UPIU may indicate a command to which the first UPIU belongs.
  • the identification information of the first UPIU may include, but not limited to, an information identifier (information identifier, IID), a logical unit number (logical unit number, LUN) and a task tag (task tag).
  • the description information of the first UPIU may also include the data transfer count (data transfer count) of the first UPIU.
  • the amount of data transfer (data transfer count) indicates the continuous data or space starting from the data buffer offset (data buffer offset).
  • the unit of data transfer count may be 4KB.
  • the description field may include multiple field segments to respectively carry various pieces of information included in the description information of the first UPIU.
  • FIG. 8A is a schematic diagram of a UPIU according to an embodiment of the present application. As shown in FIG.
  • the UPIU may include a header (Header) domain and a data payload (data payload) domain, wherein the header (Header) domain may be It includes the aforementioned hint (hint) domain and description domain.
  • the data payload field can carry the transmitted data.
  • FIG. 8B is a schematic diagram of the composition of a UPIU domain segment according to an embodiment of the present application.
  • the description domain may include an IID domain segment, a LUN domain segment, a task tag (task tag) domain segment, and a data cache offset ( data buffer offset) domain segment, data transfer count domain segment, etc.
  • the hint (hint) field is used to carry the relevant information of the UPIU (ie the second UPIU) after the current UPIU (ie the first UPIU).
  • the hint (hint) field may carry the above hint type information.
  • the hint type information is carried in a reserved (reserved) field included in the hint (hint) field.
  • the prompt type information may be two-bit information. Of course, it can be understood that the prompt type information may also be more bit information, which is not specifically limited in this embodiment of the present application.
  • the hint (hint) field may also carry hint control (hint control) information, hint UPIU identification information, and hint UPIU data buffer offset (hint data buffer offset), etc.
  • the hint control (hint control) information is used to indicate whether the hint (hint) field carried by the current UPIU is valid.
  • the identification information of the hint UPIU may include but not limited to hint information identifier (hint information identifier, hint IID), hint logical unit number (hint logical unit number, hint LUN) and hint task tag (hint task tag).
  • the hint (hint) field may also carry hint data transfer count.
  • the hint data transfer count represents the continuous data or space starting from the hint data buffer offset (hint data buffer offset) of the UPIU. Its unit may be 4KB.
  • the hint (hint) field may include a plurality of field segments to respectively carry various pieces of information included in the above hint (hint) field.
  • the hint (hint) domain can include a hint control (hint control) domain segment, a hint type (hint type) domain segment, hint IID field, hint LUN field, hint task tag field, hint data buffer offset field, hint data transfer count field, etc.
  • the first type may also be referred to as a sure hint type.
  • the second type may also be referred to as a normal hint (normal hint) type.
  • the third type may also be called a delete hint (delete hint) type.
  • the names of the first type, the second type, and the first type are just examples, and do not limit the function of prompting type information. It may also have other names, which are not specifically limited in this embodiment of the present application.
  • hint in the embodiment of the present application may also be referred to as hint, advance instruction, etc., which is not specifically limited in the embodiment of the present application.
  • the storage device may determine the first UPIU according to the data or space of the UPIU that is ready to be sent (that is, the second UPIU), or according to the data or space of the UPIU that is predicted to be ready (that is, the second UPIU).
  • the hint information carried by a UPIU includes but not limited to the above hint type information.
  • the storage device sends the first UPIU to the host.
  • the host receives the first UPIU sent by the storage device.
  • the host adjusts the physical area descriptor in the high-speed memory of the host according to the prompt type information.
  • the host parses the received first UPIU and obtains hint information.
  • the host adjusts the physical area descriptor in the high-speed memory of the host according to the hint type information in the hint (hint) information.
  • the host may prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and store it in the high-speed memory of the host with the first priority. It should also be noted that, according to the information carried in the description field of the first UPIU, the host can also search whether there is a physical area descriptor corresponding to the information carried in the description field of the first UPIU in the high-speed memory, if not, then The host may also directly read the corresponding physical area descriptor from the main memory according to the information carried in the description field of the first UPIU. The embodiment of the present application does not specifically limit the operation performed by the host according to the information carried in the description field of the first UPIU.
  • the host may prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and store it in the high-speed memory of the host with the second priority.
  • the second priority is lower than the first priority.
  • the physical area descriptor corresponding to the hint type information of the first UPIU refers to the physical area descriptor of the UPIU (that is, the second UPIU) indicated by the hint type information of the first UPIU.
  • the host Before the host receives the second UPIU, it prefetches the physical area descriptor of the second UPIU based on the prompt type information carried by the first UPIU, and stores it in the high-speed memory of the host. Afterwards, if the host receives the second UPIU, it can quickly obtain the physical area descriptor of the second UPIU from the high-speed memory, and then fetch data from the first memory of the host according to the physical area descriptor of the second UPIU, or send data to Writing data into the first memory of the host. In this way, before the host receives the second UPIU, the corresponding physical area descriptor is prefetched in advance, which can increase the processing speed of the second UPIU, thereby improving data read and write performance.
  • the physical area descriptor of the UPIU indicated by the first type has a higher priority in the high-speed memory of the host than the physical area descriptor of the UPIU indicated by the second type (ie, the second UPIU). In this way, the hit rate of the high-speed memory can be improved, thereby achieving better data transmission performance.
  • the hit rate of the high-speed memory is used to measure whether the physical area descriptor prefetched in the high-speed memory is the physical area descriptor of the UPIU received later. That is, whether the received RTT UPIU or the physical area descriptor of the read-in data UPIU (DataIn UPIU) exists in the high-speed memory.
  • the host may delete at least one item of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host.
  • the physical area description prefetched in the high-speed memory of the host is deleted descriptor, to release the resources of the high-speed memory, so that the host can prefetch new physical region descriptors based on the new prompt information sent by the storage device.
  • the prompt information cannot be sent normally. Because, if the maximum outstanding hint (hint outstanding) is exceeded, the performance of the host will degrade, making it unable to process read or write commands in an optimal way.
  • the storage device generates the first UPIU, where the first UPIU includes prompt type information.
  • the prompt type information includes the first type, the second type or the third type.
  • the first type is used to indicate that the second UPIU is ready.
  • This second type is used to indicate that the second UPIU is not ready.
  • the third type is used to indicate to delete at least one item of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host.
  • the storage device sends the first UPIU to the host, and the host adjusts the physical area descriptor in the high-speed memory of the host according to the hint type information.
  • the prompt type information instructs the host to adjust the physical area descriptor in the high-speed memory of the host, so that the adjusted physical area descriptor is hit by the second UPIU received later with a higher probability, thereby improving the performance of the high-speed memory of the host.
  • Hit rate to achieve a better UFS data throughput rate which is beneficial to improve data read and write performance.
  • FIG. 9 is a schematic diagram of a data processing method provided by the embodiment of the present application.
  • the data processing method of this embodiment involves the UFS host (host) of the above embodiment and the UFS device (device) of the above embodiment, as shown in FIG. 9 , the method may include: (1) UFS host (host) performs command scheduling. That is, when the UFS host (host) obtains the read/write command of the upper-layer application, it triggers command scheduling, and converts the command into a command UPIU (Command UPIU) through encapsulation. Afterwards, (2) The UFS host (host) issues a command UPIU (Command UPIU) to the UFS device (device).
  • command UPIU Command UPIU
  • the UFS device (device) executes the command to prepare data or space for the UPIU. Specifically, if the command UPIU (Command UPIU) is used to request to write data, the UFS device (device) performs space preparation for UPIU, so as to receive the UPIU for writing data sent by the UFS host (host). If the command UPIU (Command UPIU) is used to request to read data, the UFS device (device) performs data preparation for UPIU, so as to send the read data UPIU (DataIn UPIU) to the UFS host (host). UFS device (device) performing data preparation for UPIU may include UFS device (device) performing data transfer.
  • the UFS device takes the data out of the NAND flash memory, so that the data can be converted into read-in data UPIU (DataIn UPIU) by encapsulation, and sent to the UFS host (host).
  • the UFS device (device) generates differentiated prompt information according to the state of UPIU data or space preparation, and the prompt information is sent to the UFS host (host) along with the UPIU (ie, DataIn UPIU or RTT UPIU).
  • the UFS device has prepared the data or space of the current UPIU (for example, the above-mentioned first UPIU), and has prepared the data or space of the candidate UPIU (for example, the above-mentioned second UPIU) to be sent, then the generated The prompt type information included in the prompt information is the first type.
  • the UFS device has prepared the data or space of the current UPIU (for example, the above-mentioned first UPIU), and predicts that the data or space of the candidate UPIU (for example, the above-mentioned second UPIU) to be sent will be ready soon, then
  • the prompt type information included in the generated prompt information is the second type.
  • the UFS host (host) parses the prompt information according to the received UPIU (that is, DataIn UPIU or RTT UPIU), and adjusts the physical area descriptor in the high-speed memory according to the prompt information.
  • the UFS host (host) performs data transfer according to the received UPIU (ie DataIn UPIU or RTT UPIU). For example, the UFS host (host) moves the data to the first storage according to the received DataIn UPIU. For another example, the UFS host (host) takes out data from the first memory according to the received RTT UPIU, so that the data is converted into a write-out data UPIU (DataOut UPIU) by encapsulation and sent to the UFS device (device).
  • DataIn UPIU ie DataIn UPIU or RTT UPIU
  • RTT UPIU write-out data UPIU
  • the UFS device After the UFS device (device) completes the command, it receives all the write data UPIU (DataOut UPIU) corresponding to the command UPIU (Command UPIU), or sends all the read data corresponding to the command UPIU (Command UPIU) ( DataIn UPIU), reply UPIU (Response UPIU) to the UFS host (host).
  • DataOut UPIU write data UPIU
  • Command UPIU Command UPIU
  • DataIn UPIU DataIn UPIU
  • reply UPIU Response UPIU
  • the UFS host performs command scheduling
  • the UFS device executes the command
  • the UFS device generates differentiated prompts according to the status of UPIU data or space preparation Information
  • the prompt information includes prompt type information
  • the prompt information is sent to the UFS host (host) along with the UPIU (i.e. DataIn UPIU or RTT UPIU)
  • the UFS host parses the received UPIU (i.e. DataIn UPIU or RTT UPIU) hint information, and adjust the physical area descriptor in the high-speed memory according to the hint type information.
  • the adjusted physical area descriptor is hit by the UPIU received later with a higher probability, thereby improving the hit rate of the high-speed memory of the host.
  • FIG. 10 is a flow chart of a data processing method provided by an embodiment of the present application.
  • the data processing method of this embodiment may be executed by a storage device.
  • the storage device may be the UFS device (device) of the above embodiment.
  • the method may include:
  • the data volume of the currently unfinished hint may also be referred to as the first data volume.
  • the data volume of the currently outstanding hint refers to the data volume of the UPIU indicated by the hint information that has been sent but not sent.
  • the data size of the currently outstanding hint is 0KB. For example, if no UPIU carrying prompt information has been sent before the first UPIU is sent, the data volume of the currently unfinished prompt is 0 KB. For another example, in a case where all the UPIUs corresponding to the sent prompt information have been sent before the first UPIU is sent, the data volume of the currently unfinished prompt is 0 KB. In some other scenarios, the data size of the currently outstanding prompt is greater than 0KB.
  • the data volume of the currently outstanding notification may include the data volume of the fourth UPIU indicated by the respective first type or the second type of at least one third UPIU, that is, the data volume of at least one fourth UPIU.
  • the at least one fourth UPIU may include one fourth UPIU or a plurality of fourth UPIUs.
  • a fourth UPIU is a ready or unready UPIU indicated by the first type or the second type of a third UPIU.
  • the multiple fourth UPIUs are ready or unready UPIUs indicated by the first type or the second type of the multiple third UPIUs.
  • the unready UPIU in this embodiment of the present application refers to a UPIU that is not ready but is predicted to be ready soon (for example, after a period of time).
  • One or more third UPIUs are sent before sending the first UPIU, that is, the UFS device (device) has sent the UFS host (host).
  • One or more fourth UPIUs are unsent UPIUs, that is, the UFS device (device) will send after indicating to the UFS host (host) through the hint information of one or more third UPIUs (hint), but has not yet sent UPIU.
  • the one or more fourth UPIUs may also be referred to as UPIUs indicated by an incomplete hint (hint outstanding).
  • the currently unfinished hint data volume refers to the data volume indicated by the hint (hint) information of the third UPIU, which may be specifically equal to the hint data transfer count (hint data transfer count) of the third UPIU.
  • the hint (hint) information of the third UPIU is used to indicate the fourth UPIU.
  • the data volume of the current unfinished prompt refers to the data volume of the multiple third UPIUs.
  • the sum of the data amounts indicated by the respective hint (hint) information may specifically be equal to the sum of the hint data transfer counts (hint data transfer count) of multiple third UPIUs.
  • the state information of the second UPIU is used to indicate whether the second UPIU is ready or not.
  • the prompt type information may include the first type, the second type, or the third type.
  • S701 in the embodiment shown in FIG. 7 , which will not be repeated here.
  • the prompt type information of the first UPIU is determined according to the data volume of the currently unfinished prompt and the state information of the second UPIU by acquiring the data amount corresponding to the currently unfinished prompt and the state information of the second UPIU.
  • the prompt type information includes the first type, the second type or the third type.
  • the first type is used to indicate that the second UPIU is ready.
  • This second type is used to indicate that the second UPIU is not ready.
  • the third type is used to indicate to delete at least one item of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host.
  • the prompt type information instructs the host to adjust the physical area descriptor in the host's high-speed memory, so that the adjusted physical area descriptor will be hit by the second UPIU received later with a higher probability, thereby improving the performance of the host's high-speed memory.
  • Hit rate to achieve a better UFS data throughput rate which is beneficial to improve data read and write performance.
  • FIG. 11 is a flow chart of a data processing method provided by an embodiment of the present application.
  • the data processing method of this embodiment may be executed by a storage device.
  • the storage device may be the UFS device (device) of the above embodiment.
  • the method may include:
  • the trigger condition for executing S1101 may be that the first UPIU needs to be scheduled currently. That is, the first UPIU needs to be scheduled at present, and the hint (hint) information of the first UPIU is determined by performing S1101 to S1107, including but not limited to hint type information.
  • S1102. Determine whether the data volume of the currently unfinished prompt is less than the first threshold. When the data volume of the current unfinished prompt is less than the first threshold, execute S1103. When the data volume of the current unfinished prompt is equal to the first threshold, Execute S1106.
  • the first threshold can be reasonably set according to requirements.
  • a unit of the first threshold may be 4KB.
  • the first threshold is related to the resource size of the high-speed memory of the UFS host (host).
  • the first threshold may be preset, or may be configured to the UFS device (device) by the UFS host (host) after power-on and before issuing the command.
  • UFS host (host) can configure parameter (w) to UFS device (device), and this parameter (w) is used to limit UFS device ( The amount of UPIU data of the outstanding hint (hint outstanding) of device).
  • the data volume of the UPIU of the maximum outstanding hint (hint outstanding) is represented by MAX hint outstanding.
  • the first threshold can take a value of 32 x 2 ⁇ w, of course it is understandable, and can also take any value smaller than 32 x 2 ⁇ w. In this embodiment, the value of the first threshold is 32 x 2 ⁇ w as an example.
  • the amount of currently unfinished hint data is less than the first threshold, it means that the unfinished hints (hint outstanding) of the UFS device (device) are not exhausted, and the hint outstanding can be carried in the first UPIU through S1103 to S1105. Type 1 or Type 2.
  • the hint type information carried in the first UPIU can be the third type through S1106 .
  • the UFS device may determine that the prompt type information carried by the first UPIU is the first type.
  • the UFS device When the UFS device (device) needs to send the first UPIU, if it has prepared the data or space of the second UPIU to be sent subsequently, it will fill in the relevant information of the data or space of the second UPIU that has been prepared to be sent subsequently.
  • the hint (hint) field of the first UPIU which includes but not limited to hint type information is the first type, hint control (hint control) information, hint UPIU identification information, and hint data buffer offset (hint data buffer offset) of UPIU )wait.
  • S1108 may be executed.
  • the UFS device may determine that the prompt type information carried by the first UPIU is the second type.
  • the UFS device When the UFS device (device) needs to send the first UPIU, if the data or space of the second UPIU to be sent is not ready, the UFS device (device) predicts the data or space of the second UPIU that is about to be prepared, and sends The predicted data or space-related information of the second UPIU is filled into the prompt (hint) field of the first UPIU, which includes but is not limited to the prompt type information being the second type, prompt control (hint control) information, and prompt UPIU identification information , and prompt UPIU's data buffer offset (hint data buffer offset), etc.
  • the UFS device predicts the data or space of the second UPIU that will be prepared later, and may use the time limitation and/or space limitation to predict the data or space of the second UPIU that will be prepared later .
  • S1108 may be executed.
  • S1106. Determine whether the status information of the second UPIU indicates that the second UPIU is ready, and when the status information of the second UPIU indicates that the second UPIU is ready, execute S1107, and when the status information of the second UPIU indicates that the second UPIU is not ready When ready, execute S1106 repeatedly.
  • the UFS device may determine that the prompt type information carried by the first UPIU is the third type.
  • S1108 may be executed.
  • the UFS device (device) sends the first UPIU.
  • the UFS device (device) when the UFS device (device) needs to send the first UPIU, it depends on whether the data or space of the second UPIU to be sent is ready, and whether the unfinished hint (hint outstanding) of the UFS device (device) is Exhausted, generate differentiated hint type information, and fill in the hint (hint) field of the first UPIU.
  • UFS devices (device) can provide differentiated prompt type information for different scenarios, so as to adapt to the data transmission requirements of different scenarios.
  • the UFS host (host) can adjust the physical area descriptor in the high-speed memory based on the hint type information to improve the hit rate of the high-speed memory, so as to achieve a better UFS data throughput rate, which is beneficial to improve data read and write performance.
  • Fig. 12 is a flow chart of a data processing method provided by the embodiment of the present application.
  • the data processing method of this embodiment can be executed by a host.
  • the host can be the UFS host (host) of the above embodiment, as shown in FIG. 12, the method may include:
  • the UFS host may parse the first UPIU, and obtain hint type information from a hint type (hint type) field segment of the first UPIU.
  • the UFS host (host) can also obtain other hint information from other domain segments of the hint (hint) domain of the first UPIU, for example, hint control (hint control) information, the identification information of the hint UPIU, and the data cache offset of the hint UPIU shift (hint data buffer offset), etc.
  • hint type information is the first type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and save it in the high-speed memory of the host with the first priority.
  • the physical area descriptor corresponding to the hint type information of the first UPIU refers to the physical area descriptor of the UPIU (that is, the second UPIU) indicated by the hint type information of the first UPIU. If the physical area descriptor of the UPIU (i.e. the second UPIU) indicated by the hint type information of the first UPIU is not in the high-speed memory of the host, then prefetch the physical area descriptor and save it in the high-speed memory with high priority .
  • the physical area descriptor of the UPIU that is, the second UPIU
  • the prompt type information of the first UPIU is already in the high-speed memory of the host, a corresponding strategy can be adopted (for example, the activity of the physical area descriptor is increased, etc.) , to prevent being replaced until the second UPIU is received.
  • hint type information is the second type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and store it in the high-speed memory of the host with the second priority.
  • the second priority is lower than the first priority.
  • the high-speed memory of the UFS host stores the physical area descriptor of the UPIU (that is, the second UPIU) indicated by the prompt type information of the first UPIU. Afterwards, if the UFS host (host) receives The second UPIU can quickly obtain the physical area descriptor of the second UPIU from the high-speed memory, and then fetch data from the first memory of the host according to the physical area descriptor of the second UPIU, or send data to the first memory of the host Write data in. In this way, data read and write performance can be improved.
  • the physical area descriptor stored in the high-speed memory of the UFS host (host) corresponds to the prompt information of the first UPIU.
  • the prompt information includes, but is not limited to, one or more items such as prompting UPIU identification information, or prompting UPIU data buffer offset (hint data buffer offset).
  • the UFS host (host) receives the second UPIU, and can use one or more items such as the identification information of the second UPIU or the data buffer offset (data buffer offset) of the second UPIU as an index to quickly retrieve the data from the high-speed memory. Obtain the physical area descriptor of the second UPIU.
  • the prompt type information is the third type, delete at least one item of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host.
  • the UFS host deletes at least one of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host according to the third type of instruction, so as to Release the unfinished hint (hint outstanding) of the UFS device (device), so that the unfinished hint (hint outstanding) after release can be used to send other hints (hint) information of the prepared UPIU.
  • the UFS host can adjust the physical area descriptor in the high-speed memory based on the hint type information to improve the hit rate of the high-speed memory, so as to achieve a better UFS data throughput rate, which is beneficial to improving data read and write performance.
  • the embodiment of the present application provides a data processing device, which can be a storage device in any possible design scheme of the method of the foregoing embodiment, for example, a UFS device, the data
  • the apparatus for processing includes at least one corresponding unit for executing the method steps or operations or behaviors performed by the storage device in the data processing method provided above.
  • the setting of the at least one unit may have a one-to-one correspondence with the method steps or operations or behaviors performed by the storage device.
  • These units may be realized by computer programs, hardware circuits, or a combination of computer programs and hardware circuits.
  • FIG. 13 is a schematic diagram of a data processing apparatus 1300 provided in an embodiment of the present application.
  • the data processing apparatus 1300 may be a chip or a circuit, such as a chip or a circuit that may be provided in an electronic device.
  • the data processing apparatus 1300 may include a UPIU generation unit 1310 and a transceiver unit 1330 .
  • the UPIU generation unit 1310 is configured to generate a first universal flash storage UFS protocol information unit UPIU, the first UPIU includes prompt type information and description information of the first UPIU, the prompt type information includes the first type, the second type or The third type; the first type is used to indicate that the second UPIU is ready, the second type is used to indicate that the second UPIU is not ready, and the third type is used to indicate the deletion of the first type indicated in the high-speed memory of the host At least one of the physical area descriptor of the UPIU or the physical area descriptor of the UPIU indicated by the second type; the physical area descriptor is used to indicate the location of the first memory of the host corresponding to the UPIU; the description of the first UPIU
  • the information includes the identification information of the first UPIU and the data cache offset of the first UPIU; the multiple UPIUs used to respond to the command include the first UPIU and the second UPIU, and the command is used to request to write data or read data, and
  • the UPIU generation unit 1310 is configured to: obtain the first data amount and the state information of the second UPIU, the first data amount includes at least one third UPIU indicated by the respective first type or second type The data amount of the fourth UPIU; the at least one third UPIU is sent before sending the first UPIU, and at least one fourth UPIU is an unsent UPIU; according to the first data amount and the state information of the second UPIU , determine the prompt type information of the first UPIU.
  • the UPIU generating unit 1310 is configured to: determine whether the first data amount is less than a first threshold; when the first data amount is less than the first threshold, determine the second UPIU according to the state information of the second UPIU A prompt type information of the UPIU, where the prompt type information includes the first type or the second type.
  • the UPIU generating unit 1310 is configured to: determine whether the status information of the second UPIU indicates that the second UPIU is ready; when the status information of the second UPIU indicates that the second UPIU is ready, determining that the prompt type information is the first type; when the status information of the second UPIU indicates that the second UPIU is not ready, determining that the prompt type information is the second type.
  • the UPIU generating unit 1310 is further configured to: when the first data amount is equal to the first threshold, determine that the prompt type information is a third type.
  • the UPIU generating unit 1310 is configured to: determine that the prompt type information is the third type when the status information of the second UPIU indicates that the second UPIU is ready.
  • the first UPIU includes: a ready-to-transmit RTT UPIU or a read-in data UPIU.
  • the hint type information is located in the reserved field section of the hint information of the ready-to-transmit RTT UPIU or read-in data UPIU.
  • the UPIU generating unit 1310 is further configured to: receive a command UPIU; and generate the first UPIU in response to the command UPIU.
  • Each unit in the above-mentioned embodiments may also be called a module or a circuit or a component.
  • the embodiment of the present application provides a data processing device.
  • the data processing device can be a host in any possible design scheme of the methods in the foregoing embodiments, for example, a UFS host.
  • the data processing The device includes at least one corresponding unit for executing the method steps or operations or behaviors performed by the host in the data processing method provided above.
  • the configuration of the at least one unit may have a one-to-one correspondence with the method steps or operations or behaviors performed by the host.
  • These units may be realized by computer programs, hardware circuits, or a combination of computer programs and hardware circuits.
  • FIG. 14 is a schematic diagram of a data processing apparatus 1400 provided in an embodiment of the present application.
  • the data processing apparatus 1400 may be a chip or a circuit, such as a chip or a circuit that may be provided in an electronic device.
  • the data processing apparatus 1400 may include a UPIU processing unit 1410 and a transceiver unit 1430 .
  • the UPIU processing unit 1410 is configured to receive the first universal flash storage UFS protocol information unit UPIU through the transceiver unit 1430, the first UPIU includes prompt type information and description information of the first UPIU, the prompt type information includes the first type, the second type or the third type; the first type is used to indicate that the second UPIU is ready, the second type is used to indicate that the second UPIU is not ready, and the third type is used to indicate to delete the first type in the high-speed memory of the host At least one of the physical area descriptor of the indicated UPIU or the physical area descriptor of the UPIU indicated by the second type; the physical area descriptor is used to indicate the location of the first memory of the host corresponding to the UPIU; the first The description information of UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; the multiple UPIUs used to respond to the command include the first UPIU and the second UPIU, and the command is used to request writing data or reading
  • the UPIU processing unit 1410 is configured to: when the hint type information is the first type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and save it to In the high-speed memory of the host; when the prompt type information is the second type, prefetch the physical area descriptor corresponding to the prompt type information of the first UPIU, and save it in the high-speed memory of the host with the second priority; the second The second priority is lower than the first priority; when the hint type information is the third type, delete the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host. At least one item in the region descriptor.
  • the UPIU processing unit 1410 is further configured to receive at least one third UPIU through the transceiver unit 1430 before receiving the first UPIU, the at least one third UPIU each including the first type or the second type
  • the physical area descriptor in the high-speed memory of the host includes the physical area descriptors of the fourth UPIUs corresponding to the at least one third UPIU.
  • the first UPIU includes: ready-to-transmit RTT UPIU or read-in data UPIU.
  • the prompt type information is located in the reserved field segment of the prompt information of the transmission ready RTT UPIU or read-in data UPIU.
  • the electronic device includes hardware and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions in combination with the embodiments for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
  • FIG. 15 is a schematic diagram of a possible composition of an electronic device 1500 provided by an embodiment of the present application.
  • the electronic device 1500 may include: a host 1501 and a storage device 1502 .
  • the storage device 1502 can be used to support the electronic device 1500 to execute the steps performed by the storage device in the above method embodiments, such as the above-mentioned S701 and S702, S1001 and S1002, or S1101 to S1108, etc., and/or for the steps described herein other processes of technology.
  • the host 1501 may be used to support the steps performed by the host in the above-mentioned method embodiments of the electronic device 1500, for example, perform the above-mentioned S703, S1201 to S1204, etc., and/or other processes for the technologies described herein.
  • the electronic device provided in this embodiment is used to execute the above data processing method, so it can achieve the same effect as the above implementation method.
  • the electronic device 1500 may include more or fewer components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the electronic device 1500 may also include a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc., and this embodiment of the present application does not illustrate one by one.
  • This embodiment also provides a computer storage medium, in which computer instructions are stored, and when the computer instructions are run on the storage device, the storage device is made to execute the above-mentioned relevant method steps to implement the data processing method in the above-mentioned embodiment.
  • This embodiment also provides a computer storage medium, in which computer instructions are stored, and when the computer instructions are run on the host, the host executes the above related method steps to implement the data processing method in the above embodiments.
  • This embodiment also provides a computer program product, which, when running on a computer, causes the computer to execute the above related steps, so as to implement the data processing method in the above embodiment.
  • an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the data processing methods in the foregoing method embodiments.
  • the electronic device, computer storage medium, computer program product or chip provided in this embodiment is all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the corresponding method provided above The beneficial effects in the method will not be repeated here.
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or It may be integrated into another device, or some features may be omitted, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • a unit described as a separate component may or may not be physically separated, and a component shown as a unit may be one physical unit or multiple physical units, which may be located in one place or distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • 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.
  • an 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 readable storage medium.
  • the technical solution of the embodiment 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 a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods in various embodiments of the present application.
  • the aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk.

Landscapes

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

Abstract

The present application provides a data processing method, an apparatus, and an electronic device. The data processing method of the present application comprises: generating a first universal flash storage (UFS) protocol information unit (UPIU), wherein the first UPIU comprises type notification information and description information of the first UPIU, the type notification information comprising a first type, a second type, or a third type, the first type being used for indicating that a second UPIU is ready, the second type being used for indicating that the second UPIU is not ready, the third type being used for indicating to delete at least one among a physical area descriptor of the UPIU indicated by the first type or a physical area descriptor of the UPIU indicated by the second type from a high-speed memory of a host, and the description information of the first UPIU comprises identification information of the first UPIU and a data buffer offset of the first UPIU; and sending the first UPIU. UFS data throughput rate can be improved by means of the present application, which is beneficial for improving data read/write performance.

Description

数据处理方法、装置以及电子设备Data processing method, device and electronic device 技术领域technical field
本申请涉及存储技术领域,尤其涉及一种数据处理方法、装置以及电子设备。The present application relates to the field of storage technology, and in particular to a data processing method, device and electronic equipment.
背景技术Background technique
通用闪存存储(universal flash storage,UFS)是由联合电子设备工程委员会(JEDEC)标准定义的闪存系统,设计用于高数据传输速度和低功耗的应用。UFS可以适用于移动应用以及汽车应用等具有高数据传输速度和低功耗需求的应用。移动应用可以包括智能手机、膝上型计算机、平板等。UFS的高速串行接口和优化协议可显著提高吞吐量和系统性能。Universal flash storage (UFS) is a flash memory system defined by the Joint Electron Device Engineering Council (JEDEC) standard, designed for applications with high data transfer speed and low power consumption. UFS can be suitable for applications with high data transmission speed and low power consumption requirements such as mobile applications and automotive applications. Mobile applications may include smartphones, laptops, tablets, and the like. UFS's high-speed serial interface and optimized protocol can significantly improve throughput and system performance.
UFS系统可以包括UFS主机(host)和UFS设备(device)。图1为一种UFS系统的结构示意图,如图1所示,UFS设备(device)可以包括UFS设备控制器和多个闪存芯片。多个闪存芯片以非易失性的方式存储数据,例如,多个闪存芯片可以是如图1所示的多个与非(not and,NAND)闪存(NAND Flash)。UFS设备控制器通过开放NAND闪存接口(open NAND Flash interface,ONFI)控制多个闪存芯片。UFS主机(host)和UFS设备(device)可以通过各种接口标准进行连接,以完成读取操作、写入操作等数据处理操作。The UFS system may include a UFS host (host) and a UFS device (device). FIG. 1 is a schematic structural diagram of a UFS system. As shown in FIG. 1 , a UFS device (device) may include a UFS device controller and multiple flash memory chips. A plurality of flash memory chips store data in a non-volatile manner, for example, the plurality of flash memory chips may be a plurality of not and (NAND) flash memory (NAND Flash) as shown in FIG. 1 . The UFS device controller controls multiple flash memory chips through the open NAND flash interface (open NAND Flash interface, ONFI). A UFS host (host) and a UFS device (device) can be connected through various interface standards to complete data processing operations such as read operations and write operations.
随着电子技术、多媒体技术以及互联网技术的发展,往往需要更多的存储空间、更快的数据存储或读取速度。因此,如何提升UFS系统的数据读写性能,成为亟待解决的技术问题。With the development of electronic technology, multimedia technology and Internet technology, more storage space, faster data storage or reading speed are often required. Therefore, how to improve the data read and write performance of the UFS system has become an urgent technical problem to be solved.
发明内容Contents of the invention
本申请提供一种数据处理方法、装置以及电子设备,可以提升UFS数据吞吐率,有益于提升数据读写性能。The present application provides a data processing method, device and electronic equipment, which can improve the UFS data throughput rate and are beneficial to improve data read and write performance.
下面通过多个方面介绍本申请,以下多个方面的实现方式和有益效果可互相参考。The present application is introduced through multiple aspects below, and the implementation manners and beneficial effects of the following multiple aspects can be referred to each other.
第一方面,本申请提供一种数据处理方法,该方法可以包括:生成第一通用闪存存储UFS协议信息单元(UFS protocol information unit,UPIU),第一UPIU包括提示类型信息和第一UPIU的描述信息,该提示类型信息包括第一类型、第二类型或第三类型;第一类型用于指示第二UPIU已准备就绪,第二类型用于指示第二UPIU未准备就绪,第三类型用于指示删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项;物理区域描述符用于表示UPIU对应的主机的第一存储器的位置;第一UPIU的描述信息包括第一UPIU的标识信息和第一UPIU的数据缓存偏移;用于响应命令的多个UPIU包括第一UPIU和第二UPIU,该命令用于请求写入数据或读取数据,第一UPIU的数据缓存偏移用于表示第一UPIU在用于响应命令的多个UPIU中的位置;发送该第一UPIU。In a first aspect, the present application provides a data processing method, which may include: generating a first universal flash storage UFS protocol information unit (UFS protocol information unit, UPIU), the first UPIU including prompt type information and a description of the first UPIU Information, the prompt type information includes the first type, the second type or the third type; the first type is used to indicate that the second UPIU is ready, the second type is used to indicate that the second UPIU is not ready, and the third type is used to indicate that the second UPIU is not ready. Indicates to delete at least one of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host; the physical area descriptor is used to represent the first of the host corresponding to the UPIU The location of a memory; the description information of the first UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; a plurality of UPIUs for responding to the command includes the first UPIU and the second UPIU, and the command is used to request For writing data or reading data, the data cache offset of the first UPIU is used to indicate the position of the first UPIU among the multiple UPIUs used to respond to the command; sending the first UPIU.
第二UPIU是在第一UPIU之后发送的,例如,在发送第一UPIU之后的一段时间内发送该第二UPIU。The second UPIU is sent after the first UPIU, for example, the second UPIU is sent within a period of time after the first UPIU is sent.
由此,在发送的第一UPIU中携带提示类型信息,通过提示类型信息指示主机调整主机的高速存储器中的物理区域描述符,使得调整后的物理区域描述符,以更高的概率被之后接收到的第二UPIU命中,从而可以提升主机的高速存储器的命中率,以实现更优的UFS数据吞吐率,有益于提升数据读写性能。Therefore, the hint type information is carried in the first UPIU sent, and the hint type information is used to instruct the host to adjust the physical area descriptor in the high-speed memory of the host, so that the adjusted physical area descriptor will be received later with a higher probability The hit rate of the high-speed memory of the host can be improved to achieve a better UFS data throughput rate, which is beneficial to improve data read and write performance.
例如,提示类型信息为第一类型或第二类型,主机在还没有接收到第二UPIU之前,可以基于第一UPIU所携带的提示类型信息预取第二UPIU的物理区域描述符,并保存在主机的高速存储器中。之后,如果主机接收到第二UPIU,可以从高速存储器中快速获取该第二UPIU的物理区域描述符,进而根据该第二UPIU的物理区域描述符从主机的第一存储器中取出数据,或者向主机的第一存储器中写入数据。这样,在主机接收第二UPIU之前便提前提取了相应的物理区域描述符,可以提升第二UPIU的处理速度,从而提升数据读写性能。For example, if the hint type information is the first type or the second type, before the host receives the second UPIU, it can prefetch the physical area descriptor of the second UPIU based on the hint type information carried by the first UPIU, and save it in in the host's high-speed memory. Afterwards, if the host receives the second UPIU, it can quickly obtain the physical area descriptor of the second UPIU from the high-speed memory, and then fetch data from the first memory of the host according to the physical area descriptor of the second UPIU, or send data to Writing data into the first memory of the host. In this way, before the host receives the second UPIU, the corresponding physical area descriptor is extracted in advance, which can increase the processing speed of the second UPIU, thereby improving data read and write performance.
该第一存储器通常为掉电易失性存储器,断电时会丢失其上存储的内容,也可称为内存(Memory)或主存储器。The first memory is usually a power-off volatile memory, and its stored content will be lost when the power is off, and it can also be called a memory (Memory) or a main memory.
本申请的预取是指提前提取或预先提取。即在主机接收到第二UPIU之前,便已经提取了该第二UPIU的物理区域描述符,而不是在接收到第二UPIU时,才提取该第二UPIU的物理区域描述符。也即提取物理区域描述符的时机早于第二UPIU到达主机的时机。Prefetching in this application refers to fetching in advance or fetching in advance. That is, the host has extracted the physical area descriptor of the second UPIU before receiving the second UPIU, instead of extracting the physical area descriptor of the second UPIU when receiving the second UPIU. That is, the timing of extracting the physical area descriptor is earlier than the timing of the second UPIU arriving at the host.
一种可能的设计中,生成第一通用闪存存储UFS协议信息单元UPIU,包括:获取第一数据量和该第二UPIU的状态信息;根据第一数据量和第二UPIU的状态信息,确定该第一UPIU的提示类型信息。In a possible design, generating the first universal flash storage UFS protocol information unit UPIU includes: obtaining the first data volume and the status information of the second UPIU; determining the status information of the first data volume and the second UPIU The prompt type information of the first UPIU.
第一数据量也可以称为当前未完成的提示(hint outstanding)的数据量。The first data amount may also be referred to as a currently unfinished hint (hint outstanding) data amount.
当前未完成的提示(hint outstanding)的数据量是指当前已发送提示信息,但未发送该提示信息所指示的UPIU的数据量。在一些场景中,当前未完成的提示的数据量为0KB。在另一些场景中,当前未完成的提示的数据量大于0KB。示例性的,当前未完成的提示的数据量可以包括至少一个第三UPIU各自的第一类型或第二类型所指示的第四UPIU的数据量,即至少一个第四UPIU的数据量。至少一个第三UPIU是在发送第一UPIU之前发送的,至少一个第四UPIU是未发送的UPIU。The data volume of the currently outstanding hint (hint outstanding) refers to the data volume of the UPIU indicated by the hint information that has been sent but not sent. In some scenarios, the data size of the currently outstanding hint is 0KB. In some other scenarios, the data size of the currently outstanding prompt is greater than 0KB. Exemplarily, the data volume of the currently outstanding notification may include the data volume of the fourth UPIU indicated by the respective first type or the second type of at least one third UPIU, that is, the data volume of at least one fourth UPIU. At least one third UPIU is sent before sending the first UPIU, and at least one fourth UPIU is an unsent UPIU.
由此,通过获取当前未完成的提示对应的数据量和第二UPIU的状态信息,根据当前未完成的提示的数据量和第二UPIU的状态信息,确定第一UPIU的提示类型信息。该提示类型信息包括第一类型、第二类型或第三类型。这样,针对不同场景提供差异化的提示类型信息,从而适配不同场景的数据传输需求。Thus, by acquiring the data volume corresponding to the currently unfinished prompt and the state information of the second UPIU, the prompt type information of the first UPIU is determined according to the data volume of the currently uncompleted prompt and the state information of the second UPIU. The prompt type information includes the first type, the second type or the third type. In this way, differentiated prompt type information is provided for different scenarios, so as to adapt to data transmission requirements of different scenarios.
一种可能的设计中,根据第一数据量和第二UPIU的状态信息,确定该第一UPIU的提示类型信息,包括:判断第一数据量是否小于第一阈值;当该第一数据量小于该第一阈值时,根据第二UPIU的状态信息,确定该第一UPIU的提示类型信息,该提示类型信息包括第一类型或第二类型。In a possible design, according to the first data amount and the state information of the second UPIU, determining the prompt type information of the first UPIU includes: judging whether the first data amount is less than a first threshold; when the first data amount is less than When the first threshold is reached, the prompt type information of the first UPIU is determined according to the status information of the second UPIU, where the prompt type information includes the first type or the second type.
由此,当第一数据量小于该第一阈值,表示UFS设备(device)的未完成的提示(hint outstanding)未耗尽,可以在第一UPIU中携带第一类型或第二类型,使得主机在还没有接收到第二UPIU之前,可以基于第一UPIU所携带的提示类型信息预取第二UPIU的物理区域描述符,并保存在主机的高速存储器中。之后,如果主机接收到第二UPIU,可以从高速存储器中快速获取该第二UPIU的物理区域描述符,可以提升第二UPIU的处理速度, 从而提升数据读写性能。Therefore, when the first data amount is less than the first threshold, it means that the unfinished hints (hint outstanding) of the UFS device (device) are not exhausted, and the first type or the second type can be carried in the first UPIU, so that the host Before receiving the second UPIU, the physical area descriptor of the second UPIU may be prefetched based on the hint type information carried by the first UPIU, and stored in the high-speed memory of the host. Afterwards, if the host receives the second UPIU, it can quickly obtain the physical area descriptor of the second UPIU from the high-speed memory, which can increase the processing speed of the second UPIU, thereby improving data read and write performance.
一种可能的设计中,根据第二UPIU的状态信息,确定该第一UPIU的提示类型信息,该提示类型信息包括第一类型或第二类型,包括:In a possible design, according to the state information of the second UPIU, the prompt type information of the first UPIU is determined, and the prompt type information includes the first type or the second type, including:
判断第二UPIU的状态信息是否表示该第二UPIU已准备就绪;当该第二UPIU的状态信息表示该第二UPIU已准备就绪时,确定该提示类型信息为第一类型;当该第二UPIU的状态信息表示该第二UPIU未准备就绪时,确定该提示类型信息为第二类型。Determine whether the status information of the second UPIU indicates that the second UPIU is ready; when the status information of the second UPIU indicates that the second UPIU is ready, determine that the prompt type information is the first type; when the second UPIU When the status information indicates that the second UPIU is not ready, it is determined that the prompt type information is the second type.
由此,当第一数据量小于该第一阈值时,根据第二UPIU的状态信息确定不同的提示类型信息。当该第二UPIU的状态信息表示该第二UPIU已准备就绪时,确定该提示类型信息为第一类型,当该第二UPIU的状态信息表示该第二UPIU未准备就绪时,确定该提示类型信息为第二类型,以使得主机基于不同的提示类型信息,调整主机的高速存储器中的物理区域描述符,使得调整后的物理区域描述符,以更高的概率被之后接收的第二UPIU命中。例如,主机基于第一类型预取的物理区域描述在高速存储器中的优先级高于主机基于第二类型预取的物理区域描述。Thus, when the first data amount is smaller than the first threshold, different prompt type information is determined according to the status information of the second UPIU. When the status information of the second UPIU indicates that the second UPIU is ready, determine that the prompt type information is the first type, and when the status information of the second UPIU indicates that the second UPIU is not ready, determine the prompt type The information is of the second type, so that the host adjusts the physical area descriptor in the high-speed memory of the host based on different hint type information, so that the adjusted physical area descriptor is hit by the second UPIU received later with a higher probability . For example, the physical area description prefetched by the host based on the first type has a higher priority in the high-speed memory than the physical area description prefetched by the host based on the second type.
一种可能的设计中,该方法还包括:当该第一数据量等于第一阈值时,确定该提示类型信息为第三类型。In a possible design, the method further includes: when the first data amount is equal to a first threshold, determining that the prompt type information is a third type.
由此,当第一数据量等于该第一阈值时,表示UFS设备(device)的未完成的提示(hint outstanding)已耗尽,确定提示信息类型为第三类型,通过第三类型指示删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项。这样,可以避免由于未完成的提示(hint outstanding)受限而导致后续提示信息无法发出的问题。Thus, when the first data amount is equal to the first threshold, it means that the unfinished hints of the UFS device (device) have been exhausted, and the type of hint information is determined to be the third type, and the host is deleted through the third type instruction At least one item of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory. In this way, the problem that subsequent hint information cannot be sent due to the limitation of unfinished hint outstanding can be avoided.
一种可能的设计中,确定该提示类型信息为第三类型,包括:当该第二UPIU的状态信息表示该第二UPIU已准备就绪时,确定该提示类型信息为第三类型。In a possible design, determining that the prompt type information is the third type includes: determining that the prompt type information is the third type when the status information of the second UPIU indicates that the second UPIU is ready.
由此,当第一数据量等于该第一阈值,且该第二UPIU的状态信息表示该第二UPIU已准备就绪时,确定提示信息类型为第三类型,通过第三类型指示删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项。这样,可以避免由于未完成的提示(hint outstanding)受限而导致用于指示已准备就绪的第二UPIU的提示信息无法发出的问题。Therefore, when the first data amount is equal to the first threshold, and the status information of the second UPIU indicates that the second UPIU is ready, it is determined that the prompt information type is the third type, and the high-speed At least one item in the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the memory. In this way, the problem that the prompt information for indicating that the second UPIU is ready cannot be issued due to the limitation of unfinished hint outstanding can be avoided.
一种可能的设计中,第一UPIU包括:传输准备就绪RTT UPIU或读入数据UPIU。In a possible design, the first UPIU includes: ready-to-transmit RTT UPIU or read-in data UPIU.
当命令用于请求写入数据,第一UPIU为传输准备就绪RTT UPIU,当命令用于请求读取数据,第一UPIU为读入数据UPIU。When the command is used to request to write data, the first UPIU is ready for transmission RTT UPIU, when the command is used to request to read data, the first UPIU is the read data UPIU.
由此,在响应读取数据的命令的传输准备就绪RTT UPIU或响应读入数据的命令的读入数据UPIU中,携带之后发送的第二UPIU的提示类型信息,通过提示类型信息提前告知主机调整主机的高速存储器中的物理区域描述符,使得调整后的物理区域描述符,以更高的概率被之后接收到的第二UPIU命中,从而可以提升主机的高速存储器的命中率,以实现更优的UFS数据吞吐率,有益于提升数据读写性能。Thus, in the ready RTT UPIU in response to the command to read data or the read data UPIU in response to the command to read data, the prompt type information of the second UPIU sent later is carried, and the host is notified in advance of the adjustment through the prompt type information. The physical area descriptor in the high-speed memory of the host, so that the adjusted physical area descriptor is hit by the second UPIU received later with a higher probability, so that the hit rate of the high-speed memory of the host can be improved to achieve better The high UFS data throughput rate is beneficial to improve data read and write performance.
一种可能的设计中,该提示类型信息位于传输准备就绪RTT UPIU或读入数据UPIU的提示信息的保留域段。In a possible design, the prompt type information is located in the reserved field segment of the prompt information of the ready-to-transmit RTT UPIU or the read-in data UPIU.
由此,可以通过传输准备就绪RTT UPIU或读入数据UPIU的提示信息的保留域段,携带提示类型信息,无需新增域段,使得携带提示类型信息的UPIU的格式与已有UFS协 议标准定义的UPIU的格式相同,有益于提升数据处理方法的兼容性和可实施性。Therefore, the reserved field segment of the prompt information of the transmission ready RTT UPIU or the read-in data UPIU can carry the prompt type information without adding a new field segment, so that the format of the UPIU carrying the prompt type information is consistent with the existing UFS protocol standard definition The format of the UPIU is the same, which is beneficial to improve the compatibility and implementability of the data processing method.
一种可能的设计中,该方法还包括:接收命令UPIU;响应于该命令UPIU,生成第一UPIU。In a possible design, the method further includes: receiving a command UPIU; and generating a first UPIU in response to the command UPIU.
由此,针对用于请求写入数据或读取数据的命令UPIU,在响应命令UPIU的第一UPIU中携带提示类型信息,以提升数据写入或读取速度。Thus, for the command UPIU requesting to write data or read data, the prompt type information is carried in the first UPIU responding to the command UPIU, so as to increase the data writing or reading speed.
第二方面,本申请提供一种数据处理方法,该方法可以包括:接收第一通用闪存存储UFS协议信息单元(UFS protocol information unit,UPIU),第一UPIU包括提示类型信息和第一UPIU的描述信息,该提示类型信息包括第一类型、第二类型或第三类型;第一类型用于指示第二UPIU已准备就绪,第二类型用于指示第二UPIU未准备就绪,第三类型用于指示删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项;物理区域描述符用于表示该UPIU对应的主机的第一存储器的位置;第一UPIU的描述信息包括第一UPIU的标识信息和第一UPIU的数据缓存偏移;用于响应命令的多个UPIU包括该第一UPIU和该第二UPIU,该命令用于请求写入数据或读取数据,该第一UPIU的数据缓存偏移用于表示该第一UPIU在用于响应命令的多个UPIU中的位置;根据该提示类型信息,调整主机的高速存储器中的物理区域描述符。In a second aspect, the present application provides a data processing method, which may include: receiving a first universal flash storage UFS protocol information unit (UFS protocol information unit, UPIU), the first UPIU including prompt type information and a description of the first UPIU Information, the prompt type information includes the first type, the second type or the third type; the first type is used to indicate that the second UPIU is ready, the second type is used to indicate that the second UPIU is not ready, and the third type is used to indicate that the second UPIU is not ready. Indicates to delete at least one of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host; the physical area descriptor is used to represent the host corresponding to the UPIU The location of the first memory; the description information of the first UPIU includes the identification information of the first UPIU and the data buffer offset of the first UPIU; a plurality of UPIUs for responding to the command includes the first UPIU and the second UPIU, and the command Used to request to write data or read data, the data cache offset of the first UPIU is used to indicate the position of the first UPIU among the multiple UPIUs used to respond to commands; according to the prompt type information, adjust the high speed of the host A physical region descriptor in memory.
一种可能的设计中,根据该提示类型信息,调整主机的高速存储器中的物理区域描述符,包括:In a possible design, the physical region descriptor in the high-speed memory of the host is adjusted according to the hint type information, including:
当该提示类型信息为第一类型时,预取第一UPIU的提示类型信息对应的物理区域描述符,并以第一优先级保存至主机的高速存储器中;When the hint type information is the first type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and save it in the high-speed memory of the host with the first priority;
当该提示类型信息为第二类型时,预取第一UPIU的提示类型信息对应的物理区域描述符,并以第二优先级保存至主机的高速存储器中;第二优先级低于第一优先级;When the hint type information is the second type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and save it in the high-speed memory of the host with the second priority; the second priority is lower than the first priority class;
当该提示类型信息为第三类型时,删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项。When the prompt type information is the third type, delete at least one item of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host.
一种可能的设计中,在接收第一UPIU之前,该方法还包括:接收至少一个第三UPIU,该至少一个第三UPIU各自所包括的第一类型或第二类型用于指示各自对应的第四UPIU已准备就绪或未准备就绪,该主机的高速存储器中的物理区域描述符包括该至少一个第三UPIU各自对应的第四UPIU的物理区域描述符。In a possible design, before receiving the first UPIU, the method further includes: receiving at least one third UPIU, the first type or the second type included in each of the at least one third UPIU is used to indicate the respective corresponding first UPIU The four UPIUs are ready or not ready, and the physical area descriptor in the high-speed memory of the host includes the physical area descriptor of the fourth UPIU corresponding to each of the at least one third UPIU.
一种可能的设计中,该第一UPIU包括:传输准备就绪RTT UPIU或读入数据UPIU。In a possible design, the first UPIU includes: ready-to-transmit RTT UPIU or read-in data UPIU.
一种可能的设计中,该提示类型信息位于传输准备就绪RTT UPIU或读入数据UPIU的提示信息的保留域段。In a possible design, the prompt type information is located in the reserved field segment of the prompt information of the ready-to-transmit RTT UPIU or the read-in data UPIU.
第三方面,本申请提供一种数据处理的装置,该装置包括:控制器和传输接口;该控制器,用于生成第一通用闪存存储UFS协议信息单元UPIU,该第一UPIU包括提示类型信息和该第一UPIU的描述信息,该提示类型信息包括第一类型、第二类型或第三类型;该第一类型用于指示第二UPIU已准备就绪,该第二类型用于指示第二UPIU未准备就绪,该第三类型用于指示删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项;该物理区域描述符用于表示该UPIU对应的主机的第一存储器的位置;该第一UPIU的描述信息包括该第一UPIU的标识信息和该第一UPIU的数据缓存偏移;用于响应命令的多个UPIU包括该第一UPIU和该 第二UPIU,该命令用于请求写入数据或读取数据,该第一UPIU的数据缓存偏移用于表示该第一UPIU在用于响应命令的多个UPIU中的位置;该控制器,还用于通过该传输接口发送该第一UPIU。In a third aspect, the present application provides a data processing device, which includes: a controller and a transmission interface; the controller is used to generate a first universal flash storage UFS protocol information unit UPIU, and the first UPIU includes prompt type information and the description information of the first UPIU, the prompt type information includes the first type, the second type or the third type; the first type is used to indicate that the second UPIU is ready, and the second type is used to indicate the second UPIU Not ready, the third type is used to indicate to delete at least one of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host; the physical area The descriptor is used to indicate the location of the first memory of the host corresponding to the UPIU; the description information of the first UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; multiple UPIU includes the first UPIU and the second UPIU, the command is used to request to write data or read data, the data buffer offset of the first UPIU is used to indicate that the first UPIU is used to respond to multiple UPIUs of the command The position in; the controller is further configured to send the first UPIU through the transmission interface.
一种可能的设计中,该控制器用于:获取第一数据量和该第二UPIU的状态信息;该第一数据量是当前已发送提示信息,但未发送该提示信息所指示的UPIU的数据量;根据该第一数据量和该第二UPIU的状态信息,确定该第一UPIU的提示类型信息。In a possible design, the controller is configured to: obtain the first data amount and the state information of the second UPIU; the first data amount is the currently sent prompt information, but the data of the UPIU indicated by the prompt information has not been sent amount; according to the first data amount and the status information of the second UPIU, determine the prompt type information of the first UPIU.
一种可能的设计中,该控制器用于:判断第一数据量是否小于第一阈值;当该第一数据量小于该第一阈值时,根据该第二UPIU的状态信息,确定该第一UPIU的提示类型信息,该提示类型信息包括第一类型或第二类型。In a possible design, the controller is configured to: determine whether the first data amount is smaller than a first threshold; when the first data amount is smaller than the first threshold, determine the first UPIU according to the state information of the second UPIU The prompt type information of the prompt type information includes the first type or the second type.
一种可能的设计中,该控制器用于:判断该第二UPIU的状态信息是否表示该第二UPIU已准备就绪;当该第二UPIU的状态信息表示该第二UPIU已准备就绪时,确定该提示类型信息为第一类型;当该第二UPIU的状态信息表示该第二UPIU未准备就绪时,确定该提示类型信息为第二类型。In a possible design, the controller is configured to: determine whether the status information of the second UPIU indicates that the second UPIU is ready; when the status information of the second UPIU indicates that the second UPIU is ready, determine the The prompt type information is the first type; when the status information of the second UPIU indicates that the second UPIU is not ready, it is determined that the prompt type information is the second type.
一种可能的设计中,该控制器还用于:当该第一数据量等于该第一阈值时,确定该提示类型信息为第三类型。In a possible design, the controller is further configured to: when the first data amount is equal to the first threshold, determine that the prompt type information is a third type.
一种可能的设计中,该控制器用于:当该第二UPIU的状态信息表示该第二UPIU已准备就绪时,确定该提示类型信息为第三类型。In a possible design, the controller is configured to: determine that the prompt type information is the third type when the status information of the second UPIU indicates that the second UPIU is ready.
一种可能的设计中,该第一UPIU包括:传输准备就绪RTT UPIU或读入数据UPIU。In a possible design, the first UPIU includes: ready-to-transmit RTT UPIU or read-in data UPIU.
一种可能的设计中,该提示类型信息位于该传输准备就绪RTT UPIU或读入数据UPIU的提示信息的保留域段。In a possible design, the prompt type information is located in the reserved field segment of the prompt information of the transmission ready RTT UPIU or read-in data UPIU.
一种可能的设计中,该控制器还用于:通过该传输接口接收命令UPIU;响应于命令UPIU,生成该第一UPIU。In a possible design, the controller is further configured to: receive a command UPIU through the transmission interface; and generate the first UPIU in response to the command UPIU.
第四方面,本申请提供一种数据处理的装置,该装置包括:传输接口、控制器、高速存储器和第一存储器;该控制器用于接收第一通用闪存存储UFS协议信息单元UPIU,该第一UPIU包括提示类型信息和该第一UPIU的描述信息,该提示类型信息包括第一类型、第二类型或第三类型;该第一类型用于指示第二UPIU已准备就绪,该第二类型用于指示第二UPIU未准备就绪,该第三类型用于指示删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项;该物理区域描述符用于表示该UPIU对应的第一存储器的位置;该第一UPIU的描述信息包括该第一UPIU的标识信息和该第一UPIU的数据缓存偏移;用于响应命令的多个UPIU包括该第一UPIU和该第二UPIU,该命令用于请求写入数据或读取数据,该第一UPIU的数据缓存偏移用于表示该第一UPIU在用于响应命令的多个UPIU中的位置;该控制器还用于根据该提示类型信息,调整主机的高速存储器中的物理区域描述符。In a fourth aspect, the present application provides a data processing device, which includes: a transmission interface, a controller, a high-speed memory, and a first memory; the controller is used to receive the first universal flash storage UFS protocol information unit UPIU, the first The UPIU includes prompt type information and description information of the first UPIU, the prompt type information includes the first type, the second type or the third type; the first type is used to indicate that the second UPIU is ready, and the second type is used In order to indicate that the second UPIU is not ready, the third type is used to indicate to delete at least one of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host. item; the physical area descriptor is used to indicate the location of the first memory corresponding to the UPIU; the description information of the first UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; used for responding to commands The multiple UPIUs include the first UPIU and the second UPIU, the command is used to request to write data or read data, and the data cache offset of the first UPIU is used to indicate that the first UPIU is used to respond to the command Locations in multiple UPIUs; the controller is also used to adjust the physical area descriptor in the high-speed memory of the host according to the hint type information.
一种可能的设计中,该控制器用于:当该提示类型信息为第一类型时,预取该第一UPIU的提示类型信息对应的物理区域描述符,并以第一优先级保存至主机的高速存储器中;当该提示类型信息为第二类型时,预取该第一UPIU的提示类型信息对应的物理区域描述符,并以第二优先级保存至主机的高速存储器中;该第二优先级低于该第一优先级;当该提示类型信息为第三类型时,删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项。In a possible design, the controller is configured to: when the hint type information is the first type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and save it to the host's In the high-speed memory; when the hint type information is the second type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and save it in the high-speed memory of the host with the second priority; the second priority The level is lower than the first priority; when the prompt type information is the third type, delete the physical area descriptor of the UPIU indicated by the first type or the physical area description of the UPIU indicated by the second type in the high-speed memory of the host at least one of the characters.
一种可能的设计中,该控制器还用于在接收该第一UPIU之前,通过传输接口接收至少一个第三UPIU,该至少一个第三UPIU各自所包括的第一类型或第二类型用于指示各自对应的第四UPIU已准备就绪或未准备就绪,该高速存储器中的物理区域描述符包括该至少一个第三UPIU各自对应的第四UPIU的物理区域描述符。In a possible design, the controller is further configured to receive at least one third UPIU through a transmission interface before receiving the first UPIU, and each of the at least one third UPIU includes a first type or a second type for Indicating that the corresponding fourth UPIU is ready or not ready, the physical area descriptor in the high-speed memory includes the physical area descriptor of the fourth UPIU corresponding to the at least one third UPIU.
一种可能的设计中,该第一UPIU包括:传输准备就绪RTT UPIU或读入数据UPIU。In a possible design, the first UPIU includes: ready-to-transmit RTT UPIU or read-in data UPIU.
一种可能的设计中,该提示类型信息位于该传输准备就绪RTT UPIU或读入数据UPIU的提示信息的保留域段。In a possible design, the prompt type information is located in the reserved field segment of the prompt information of the transmission ready RTT UPIU or read-in data UPIU.
第五方面,本申请提供一种数据处理的装置,该数据处理的装置作为存储设备,例如,UFS设备。该数据处理的装置可以为电子设备或者电子设备中的芯片或者片上系统,还可以为电子设备中用于实现第一方面或第一方面的任一可能的设计该的方法的功能模块。该数据处理的装置可以实现上述第一方面或者第一方面的各可能的设计的功能,该功能可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个上述功能相应的模块。举例来说,该数据处理的装置可以包括:UPIU生成模块和收发模块。In a fifth aspect, the present application provides a data processing apparatus, where the data processing apparatus is used as a storage device, for example, a UFS device. The data processing apparatus may be an electronic device or a chip or a system-on-a-chip in the electronic device, and may also be a functional module in the electronic device for realizing the first aspect or any possible design method of the first aspect. The device for data processing can realize the functions of the above-mentioned first aspect or each possible design of the first aspect, and the functions can be realized by executing corresponding software through hardware. The hardware or software includes one or more modules with corresponding functions described above. For example, the data processing apparatus may include: a UPIU generation module and a transceiver module.
第六方面,本申请提供一种数据处理的装置,该数据处理的装置作为主机,例如,UFS主机。该数据处理的装置可以为电子设备或者电子设备中的芯片或者片上系统,还可以为电子设备中用于实现第二方面或第二方面的任一可能的设计该的方法的功能模块。该数据处理的装置可以实现上述第二方面或者第二方面的各可能的设计的功能,该功能可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个上述功能相应的模块。举例来说,该数据处理的装置可以包括:UPIU处理模块和收发模块。In a sixth aspect, the present application provides a data processing device, where the data processing device serves as a host, for example, a UFS host. The data processing apparatus may be an electronic device or a chip or a system-on-chip in the electronic device, and may also be a functional module in the electronic device for realizing the second aspect or any possible design method of the second aspect. The device for data processing can realize the function of the second aspect or each possible design of the second aspect, and the function can be realized by executing corresponding software by hardware. The hardware or software includes one or more modules with corresponding functions described above. For example, the data processing apparatus may include: a UPIU processing module and a transceiver module.
第七方面,本申请提供一种存储系统,所述存储系统包括存储设备和主机;所述存储设备用于执行如第一方面或第一方面任一项所述的方法,所述主机用于执行如第二方面或第二方面任一项所述的方法。In a seventh aspect, the present application provides a storage system, the storage system includes a storage device and a host; the storage device is used to execute the method according to the first aspect or any one of the first aspect, and the host is used to Execute the method as described in the second aspect or any one of the second aspect.
第八方面,本申请提供一种电子设备,包括:主机以及耦合于所述主机的存储设备;所述主机用于执行如第二方面或第二方面任一项所述的方法;所述存储设备用于执行如第一方面或第一方面任一项所述的方法。In an eighth aspect, the present application provides an electronic device, including: a host and a storage device coupled to the host; the host is used to execute the method as described in the second aspect or any one of the second aspect; the storage The device is used to execute the method according to the first aspect or any one of the first aspect.
第九方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被存储设备执行时实现上述第一方面中任一项所述的方法。In a ninth aspect, the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a storage device, the method described in any one of the above-mentioned first aspects is implemented.
第十方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被主机执行时实现上述第二方面中任一项所述的方法。In a tenth aspect, the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a host, the method described in any one of the above-mentioned second aspects is implemented.
第十一方面,本申请提供一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序被处理器执行时,实现上述第一方面中任一项所述的方法。In an eleventh aspect, the present application provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the method described in any one of the above first aspects is implemented.
第十二方面,本申请提供一种计算机程序产品,所述计算机程序产品包括计算机程序,当所述计算机程序被处理器执行时,实现上述第二方面中任一项所述的方法。In a twelfth aspect, the present application provides a computer program product, the computer program product includes a computer program, and when the computer program is executed by a processor, the method described in any one of the above-mentioned second aspects is implemented.
应当理解的是,本申请的第三方面至第十二方面与本申请的第一方面至第二方面的技术方案一致,各方面及对应的可行实施方式所取得的有益效果相似,此处不再赘述。It should be understood that the third aspect to the twelfth aspect of the present application are consistent with the technical solutions of the first aspect to the second aspect of the present application, and the beneficial effects obtained in each aspect and the corresponding feasible implementation modes are similar, and here Let me repeat.
附图说明Description of drawings
图1为本申请实施例的UFS系统的结构示意图;FIG. 1 is a schematic structural diagram of a UFS system according to an embodiment of the present application;
图2为本申请实施例提供的写操作的示意图;FIG. 2 is a schematic diagram of a write operation provided by an embodiment of the present application;
图3为本申请实施例提供的读操作的示意图;FIG. 3 is a schematic diagram of a read operation provided by an embodiment of the present application;
图4为本申请实施例提供的写操作顺序传输的示意图;FIG. 4 is a schematic diagram of sequential transmission of write operations provided by the embodiment of the present application;
图5为本申请实施例提供的写操作乱序传输的示意图;FIG. 5 is a schematic diagram of out-of-order transmission of write operations provided by the embodiment of the present application;
图6为本申请实施例提供的一种UFS设备(device)10和UFS主机(host)20的示意图;FIG. 6 is a schematic diagram of a UFS device (device) 10 and a UFS host (host) 20 provided by an embodiment of the present application;
图7为本申请实施例提供的一种数据处理方法的流程图;FIG. 7 is a flowchart of a data processing method provided in an embodiment of the present application;
图8A为本申请实施例的一种UPIU的示意图;FIG. 8A is a schematic diagram of a UPIU according to an embodiment of the present application;
图8B为本申请实施例提供的一种UPIU的域段组成的示意图;FIG. 8B is a schematic diagram of the field segment composition of a UPIU provided by the embodiment of the present application;
图9为本申请实施例提供的一种数据处理方法的示意图;FIG. 9 is a schematic diagram of a data processing method provided in an embodiment of the present application;
图10为本申请实施例提供的一种数据处理方法的流程图;FIG. 10 is a flowchart of a data processing method provided in an embodiment of the present application;
图11为本申请实施例提供的一种数据处理方法的流程图;FIG. 11 is a flow chart of a data processing method provided in an embodiment of the present application;
图12为本申请实施例提供的一种数据处理方法的流程图;FIG. 12 is a flow chart of a data processing method provided in an embodiment of the present application;
图13为本申请实施例提供的一种数据处理的装置1300的示意图;FIG. 13 is a schematic diagram of a data processing device 1300 provided by an embodiment of the present application;
图14为本申请实施例提供的一种数据处理的装置1400的示意图;FIG. 14 is a schematic diagram of a data processing device 1400 provided by an embodiment of the present application;
图15为本申请实施例提供的一种电子设备的示意图。FIG. 15 is a schematic diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图对本申请实施例提供的一种数据处理方法、装置以及电子设备进行详细地描述。A data processing method, device, and electronic device provided in the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
本申请的说明书以及附图中的术语“第一”和“第二”等是用于区别不同的对象,或者用于区别对同一对象的不同处理,而不是用于描述对象的特定顺序。The terms "first" and "second" in the specification and drawings of the present application are used to distinguish different objects, or to distinguish different processes for the same object, rather than to describe a specific sequence of objects.
此外,本申请的描述中所提到的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括其他没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。In addition, the terms "including" and "having" mentioned in the description of the present application and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes other unlisted steps or units, or optionally also includes Other steps or elements inherent to the process, method, product or apparatus are included.
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used as examples, illustrations or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application shall not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete manner.
在本申请的描述中,除非另有说明,“多个”的含义是指两个或两个以上。本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。In the description of the present application, unless otherwise specified, the meaning of "plurality" refers to two or more. The "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist at the same time, and B exists alone These three situations.
首先对本申请实施例所涉及的几个技术术语进行解释说明。First, several technical terms involved in the embodiments of the present application are explained.
通用闪存存储协议信息单元(UFS protocol information unit,UPIU),是命令、数据和状态信息传输的载体。UPIU是有固定格式的数据包。UFS主机(host)和UFS设备(device)之间可以通过不同功能的UPIU进行交互。Universal flash storage protocol information unit (UFS protocol information unit, UPIU), is the carrier of command, data and status information transmission. UPIU is a data packet with a fixed format. UFS host (host) and UFS device (device) can interact through UPIU with different functions.
UPIU可以包括命令UPIU、数据传输UPIU和状态UPIU等。示例性的,命令UPIU(Command UPIU),是主机(host)发送给UFS设备(device)的写命令或读命令。数据传输UPIU可以包括传输准备就绪UPIU(ready to transfer UPIU,RTT UPIU)、写出数据 UPIU(DataOut UPIU)以及读入数据UPIU(DataIn UPIU)等。其中,传输准备就绪UPIU(ready to transfer UPIU,RTT UPIU),是处理写命令时,UFS设备(device)向主机(host)发送的UPIU,用于告知主机(host)已准备好接收数据。写出数据UPIU(DataOut UPIU),是主机(host)接收到RTT UPIU之后,向UFS设备(device)发送的UPIU,用于向UFS设备(device)写入数据。读入数据UPIU(DataIn UPIU),是UFS设备(device)向主机(host)发送的UPIU,用于传输数据给主机(host)。状态UPIU可以包括响应UPIU(Response UPIU)等。响应UPIU(Response UPIU),是UFS设备(device)向主机(host)发送的UPIU,用于返回写命令或读命令的执行状态。The UPIU may include a command UPIU, a data transfer UPIU, a status UPIU, and the like. Exemplarily, the command UPIU (Command UPIU) is a write command or a read command sent by the host (host) to the UFS device (device). Data transfer UPIU can include ready to transfer UPIU (ready to transfer UPIU, RTT UPIU), write data UPIU (DataOut UPIU) and read data UPIU (DataIn UPIU), etc. Among them, the ready to transfer UPIU (ready to transfer UPIU, RTT UPIU) is the UPIU sent by the UFS device (device) to the host (host) when processing the write command, and is used to inform the host (host) that it is ready to receive data. Write data UPIU (DataOut UPIU), which is the UPIU sent to the UFS device (device) after the host (host) receives the RTT UPIU, and is used to write data to the UFS device (device). Read in data UPIU (DataIn UPIU), which is the UPIU sent by the UFS device (device) to the host (host), and is used to transmit data to the host (host). The status UPIU may include a response UPIU (Response UPIU) and the like. Response UPIU (Response UPIU) is the UPIU sent by the UFS device (device) to the host (host), and is used to return the execution status of the write command or read command.
需要说明的是,UPIU还可以包括其他功能的UPIU,本申请实施例不一一举例说明。It should be noted that the UPIU may also include UPIUs with other functions, and this embodiment of the present application does not illustrate one by one.
NAND闪存(NAND Flash),是一种非易失性随机访问存储介质,该存储介质的特点是断电后数据不消失。NAND闪存(NAND Flash)所采用的闪存技术可以包括单层存储单级单元(Single-LevelCell,SLC)(1bit/cell)、多级单元(Multi-Level Cell,MLC)(2bit/cell)、三级单元(Trinary-Level Cell,TLC)(3bit/cell),甚至四级单元(Quad-Level Cell,QLC)(4bit/cell)技术。本申请实施例以采用TLC技术的NAND闪存(NAND Flash)为例进行举例说明。NAND flash memory (NAND Flash) is a non-volatile random access storage medium, which is characterized by data not disappearing after power failure. The flash technology used in NAND flash memory (NAND Flash) can include single-level storage single-level cell (Single-LevelCell, SLC) (1bit/cell), multi-level cell (Multi-Level Cell, MLC) (2bit/cell), three Trinary-Level Cell (TLC) (3bit/cell), and even Quad-Level Cell (QLC) (4bit/cell) technology. The embodiment of the present application takes NAND flash memory (NAND Flash) using TLC technology as an example for illustration.
写操作,是向NAND闪存(NAND Flash)写入数据的操作。图2为本申请实施例提供的写操作的示意图,如图2所示,写操作可以通过上述命令UPIU(Command UPIU)、一个或多个RTT UPIU和写出数据UPIU(DataOut UPIU)、以及响应UPIU(Response UPIU)实现。Write operation is the operation of writing data to NAND flash memory (NAND Flash). Fig. 2 is the synoptic diagram of the write operation that the embodiment of the present application provides, as shown in Fig. 2, write operation can pass above-mentioned order UPIU (Command UPIU), one or more RTT UPIU and write out data UPIU (DataOut UPIU), and response UPIU (Response UPIU) implementation.
读操作,是从NAND闪存(NAND Flash)读取数据的操作。图3为本申请实施例提供的读操作的示意图,如图3所示,读操作可以通过上述命令UPIU(Command UPIU)、一个或多个读入数据UPIU(DataIn UPIU)、以及响应UPIU(Response UPIU)实现。The read operation is the operation of reading data from NAND flash memory (NAND Flash). Fig. 3 is the schematic diagram of the read operation that the embodiment of the present application provides, and as shown in Fig. 3, read operation can pass above-mentioned order UPIU (Command UPIU), one or more read in data UPIU (DataIn UPIU), and response UPIU (Response UPIU) implementation.
上述读操作和写操作可以通过顺序(in order)执行的方式实现,也可以通过乱序(out of order,ooo)执行的方式实现。The above read and write operations can be implemented in an in order manner or out of order (ooo) manner.
在顺序(in order)执行中,针对写操作,多个RTT UPIU的数据缓存偏移(data buffer offset)是顺序递增的,针对读操作,多个读入数据UPIU(DataIn UPIU)的数据缓存偏移(data buffer offset)是顺序递增的。In order (in order) execution, for write operations, the data buffer offsets of multiple RTT UPIUs are sequentially incremented, and for read operations, the data buffer offsets of multiple read-in data UPIUs (DataIn UPIUs) are The shift (data buffer offset) is sequentially increasing.
以写操作为例,图4为本申请实施例提供的写操作顺序传输的示意图,如图4所示,命令UPIU(Command UPIU),用于请求传输48千字节(Kbyte,KB)的数据(即写入48KB的数据),被分成两个写出数据UPIU(DataOut UPIU)传输,即写出数据UPIU 1和写出数据UPIU 2。RTT UPIU 1的数据缓存偏移和RTT UPIU 2的数据缓存偏移是顺序递增的。Taking the write operation as an example, Fig. 4 is a schematic diagram of the sequential transmission of the write operation provided by the embodiment of the present application. As shown in Fig. 4, the command UPIU (Command UPIU) is used to request the transmission of 48 kilobytes (Kbyte, KB) of data (that is, write 48KB of data), which is divided into two write-out data UPIU (DataOut UPIU) transmission, that is, write-out data UPIU 1 and write-out data UPIU 2. The data cache offset of RTT UPIU 1 and the data cache offset of RTT UPIU 2 are sequentially increasing.
通过顺序(in order)执行的方式完成读操作或写操作,往往需要较多的内部缓存和较长的处理时延,即数据读写性能较差。Completing read or write operations in order often requires more internal caches and longer processing delays, that is, poor data read and write performance.
在乱序(out of order,ooo)执行中,针对写操作,多个RTT UPIU的数据缓存偏移(data buffer offset)是非顺序递增的,针对读操作,多个读入数据UPIU(DataIn UPIU)的数据缓存偏移是非顺序递增的。In out of order (ooo) execution, for write operations, the data buffer offset (data buffer offset) of multiple RTT UPIUs is non-sequentially incremented, and for read operations, multiple read-in data UPIUs (DataIn UPIU) The data cache offset for is non-sequentially increasing.
以写操作为例,图5为本申请实施例提供的写操作乱序传输的示意图,如图5所示,命令UPIU(Command UPIU),用于请求传输48KB的数据(即写入48KB的数据),被分成两个写出数据UPIU(DataOut UPIU)传输,即写出数据UPIU 1和写出数据UPIU 2。RTT UPIU 1的数据缓存偏移和RTT UPIU 2的数据缓存偏移是非顺序递增的。RTT UPIU 1的数据缓存偏移为16KB,RTT UPIU 2的数据缓存偏移为0KB。Taking the write operation as an example, FIG. 5 is a schematic diagram of the out-of-order transmission of the write operation provided by the embodiment of the present application. As shown in FIG. ), is divided into two write out data UPIU (DataOut UPIU) transmissions, that is, write out data UPIU 1 and write out data UPIU 2. The data cache offset of RTT UPIU 1 and the data cache offset of RTT UPIU 2 are non-sequentially increasing. The data cache offset of RTT UPIU 1 is 16KB, and the data cache offset of RTT UPIU 2 is 0KB.
相较于顺序(in order)执行的方式,通过乱序(out of order,ooo)执行的方式完成读操作或写操作,可以减少内部缓存数据量和命令执行时间,即可以提升数据读写性能。Compared with the in-order execution method, the out-of-order (ooo) execution method to complete the read or write operation can reduce the amount of internal cached data and command execution time, which can improve data read and write performance .
本申请实施例的数据处理方法可以针对通过乱序(out of order,ooo)执行的方式完成读操作或写操作,以进一步提升数据读写性能。下面采用几个实施例对本申请的数据处理方法进行具体解释说明。The data processing method of the embodiment of the present application can be aimed at completing the read operation or the write operation through out of order (out of order, ooo) execution, so as to further improve the performance of data read and write. The data processing method of the present application will be specifically explained below using several embodiments.
本申请实施例的数据处理方法可以应用于如图1所示的UFS系统。示例性,该UFS系统具体可以是如图6所示的结构,图6为本申请实施例的一种UFS设备(device)10和UFS主机(host)20的示意图,如图6所示,UFS设备(device)10可以是任何为UFS主机(host)20提供写入/读取数据功能的非易失性存储器。在本申请实施例中,UFS设备(device)10可以内置于UFS主机(host)20中,也可与UFS主机(host)20各自独立设置,还可以是UFS设备(device)10和UFS主机(host)20共同位于一个电子设备中,本申请对此不做具体限定。UFS主机(host)20或UFS设备(device)10具体可以是芯片或芯片组或搭载有芯片或者芯片组的电路板,该芯片或芯片组或搭载有芯片或芯片组的电路板可在必要的软件驱动下工作。The data processing method in the embodiment of the present application may be applied to the UFS system shown in FIG. 1 . Exemplarily, the UFS system may specifically have a structure as shown in FIG. 6, and FIG. 6 is a schematic diagram of a UFS device (device) 10 and a UFS host (host) 20 according to an embodiment of the present application. As shown in FIG. 6, the UFS The device (device) 10 can be any non-volatile memory that provides the function of writing/reading data for the UFS host (host) 20 . In the embodiment of the present application, the UFS device (device) 10 can be built in the UFS host (host) 20, and can also be set independently from the UFS host (host) 20. It can also be the UFS device (device) 10 and the UFS host ( host) 20 are co-located in one electronic device, which is not specifically limited in this application. UFS host (host) 20 or UFS equipment (device) 10 can specifically be a chip or a chipset or a circuit board equipped with a chip or chipset, and the chip or chipset or a circuit board equipped with a chip or chipset can be Work under software drive.
UFS设备(device)10可以包括UFS设备控制器101和非易失性存储器102。UFS设备控制器101,用于管理并控制UFS主机(host)20与UFS设备(device)10之间的通信,并为UFS主机(host)20和UFS设备(device)10之间的通信提供标准化(例如,本申请实施例的UFS标准)的接口。具体地,UFS设备控制器101可以响应UFS主机(host)20发送的命令(例如,写入、读取等命令),进行相应操作,以及向UFS主机(host)20返回完成状态。在本申请实施例中,UFS设备控制器101可以根据UFS主机(host)20与UFS设备(device)10之间所支持的UFS协议生成本申请中所涉及的第一UPIU、第二UPIU等,并在生成的第一UPIU中携带提示类型信息,以向UFS主机(host)20指示提示(hint)信息的类型。具体请参见后续关于数据处理方法的具体描述,此处不作详细描述。UFS设备(device)10还可以包括传输接口(图中未示出),该传输接口用于接收或发送UFS标准协议包,例如,通过该传输接口发送本申请中所涉及的第一UPIU、第二UPIU等。A UFS device (device) 10 may include a UFS device controller 101 and a non-volatile memory 102 . UFS device controller 101 is used to manage and control communication between UFS host (host) 20 and UFS device (device) 10, and provide standardization for communication between UFS host (host) 20 and UFS device (device) 10 (for example, the UFS standard of the embodiment of the present application). Specifically, the UFS device controller 101 may respond to commands sent by the UFS host (host) 20 (for example, commands such as write and read), perform corresponding operations, and return a completion status to the UFS host (host) 20. In the embodiment of the present application, the UFS device controller 101 can generate the first UPIU, the second UPIU, etc. involved in the present application according to the UFS protocol supported between the UFS host (host) 20 and the UFS device (device) 10, And the hint type information is carried in the generated first UPIU, so as to indicate the type of hint (hint) information to the UFS host (host) 20 . For details, please refer to the subsequent specific description of the data processing method, which will not be described in detail here. UFS equipment (device) 10 can also comprise transmission interface (not shown in the figure), and this transmission interface is used for receiving or sending UFS standard protocol packet, for example, sends the first UPIU involved in this application, the first UPIU involved in this application through this transmission interface. 2 Upiu et al.
非易失性存储器102可以包括但不限于Flash闪存(例如,NAND闪存、NOR闪存等)。本申请实施例以非易失性存储器102为多个NAND闪存(NAND Flash)为例进行示例性举例说明。The non-volatile memory 102 may include, but is not limited to, Flash memory (eg, NAND flash memory, NOR flash memory, etc.). In the embodiment of the present application, the non-volatile memory 102 is taken as an example for a plurality of NAND flash memories (NAND Flash).
UFS主机(host)20可以包括主机控制器201、高速存储器202和第一存储器203。可选的,UFS主机(host)20还可以包括处理器204。A UFS host (host) 20 may include a host controller 201 , a high-speed memory 202 and a first memory 203 . Optionally, the UFS host (host) 20 may further include a processor 204 .
主机控制器201,用于管理并控制UFS主机(host)20与UFS设备(device)10之间的通信,并为UFS主机(host)20和UFS设备(device)10之间的通信提供标准化(例如,本申请实施例的UFS标准)的接口。具体地,主机控制器201可以根据处理器204发出的读/写命令,向UFS设备(device)10传递命令(例如,写入、读取等命令)及数据。主机控制器201可将命令或数据通过封装的方式转换为UFS标准协议包,而对于UFS主机(host)20接收的UFS标准协议包(例如,本申请中所涉及的第一UPIU、第二UPIU等),主机控制器201可以对其进行解析,完成相应处理,并通知处理器204处理结果。UFS主机(host)20还可以包括传输接口(图中未示出),该传输接口用于接收或发送UFS标准协议包,例如,通过该传输 接口接收本申请中所涉及的第一UPIU、第二UPIU等。The host controller 201 is used to manage and control the communication between the UFS host (host) 20 and the UFS device (device) 10, and provide standardization ( For example, the interface of the UFS standard of the embodiment of the present application). Specifically, the host controller 201 may transmit commands (for example, commands such as write and read) and data to the UFS device (device) 10 according to the read/write commands issued by the processor 204 . The host controller 201 can convert the command or data into a UFS standard protocol packet by encapsulation, and for the UFS standard protocol packet received by the UFS host (host) 20 (for example, the first UPIU, the second UPIU involved in this application etc.), the host controller 201 can analyze it, complete the corresponding processing, and notify the processor 204 of the processing result. UFS host (host) 20 can also comprise transmission interface (not shown in the figure), and this transmission interface is used for receiving or sending UFS standard protocol packet, for example, receives the first UPIU involved in this application, the first UPIU involved in this application through this transmission interface. 2 Upiu et al.
第一存储器203,通常为掉电易失性存储器,断电时会丢失其上存储的内容,也可称为内存(Memory)或主存储器。本申请中的第一存储器203包括可读可写的运行内存,其作用是用于暂时存放处理器204中的运算数据,命令描述符(command descriptor),以及与UFS设备(device)10或其他外部存储器交互数据。例如,从UFS设备(device)10读取的数据或者向UFS设备(device)10写入的数据。The first memory 203 is usually a power-off volatile memory, and the content stored therein will be lost when the power is off, and may also be called a memory or a main memory. The first memory 203 in this application includes a readable and writable running memory, and its function is to temporarily store the operation data in the processor 204, command descriptor (command descriptor), and communicate with UFS device (device) 10 or other External memory exchange data. For example, data read from the UFS device (device) 10 or data written to the UFS device (device) 10 .
第一存储器203可以包括,动态随机存取存储器(DRAM)、静态随机存取存储器(SRAM)、同步动态随机存取存储器(SDRAM)等中的一种或多种。其中,DRAM又包括双倍速率同步动态随机存储器(Double Data RateSynchronous Dynamic Random Access Memory,DDR SDRAM)简称DDR、二代双倍速率同步动态随机存储器(DDR2)、三代双倍速率同步动态随机存储器(DDR3)、四代低功耗双倍数据率同步动态随机存储器(Low Power Double DataRate 4,LPDDR4)和五代低功耗双倍数据率同步动态随机存储器(Low Power Double DataRate 5,LPDDR5)等。The first memory 203 may include one or more of dynamic random access memory (DRAM), static random access memory (SRAM), synchronous dynamic random access memory (SDRAM), and the like. Among them, DRAM includes double data rate synchronous dynamic random access memory (Double Data Rate Synchronous Dynamic Random Access Memory, DDR SDRAM) referred to as DDR, second generation double rate synchronous dynamic random access memory (DDR2), third generation double rate synchronous dynamic random access memory (DDR3 ), four generations of low power double data rate synchronous DRAM (Low Power Double DataRate 4, LPDDR4) and five generations of low power double data rate synchronous DRAM (Low Power Double DataRate 5, LPDDR5), etc.
本申请实施例的高速存储器202用于存储预取的物理区域描述符(physical region descriptor),该物理区域描述符可以包括物理地址(physical address)和长度。该物理区域描述符可以是物理区域描述表(Physical Region Description Table,PRDT)的表项。该物理区域描述符可以用于数据读/写操作过程中主机(host)基于此向第一存储器203中写入数据或从第一存储器203中取出数据。本申请实施例中,该物理区域描述符可以是基于RTT UPIU或读入数据UPIU中的提示信息域段预取的,即预取的物理区域描述符,以提升数据读写性能。换言之,RTT UPIU或读入数据UPIU中的提示信息域段与预取的物理区域描述符具有对应关系。本申请实施例的预取,也可以理解为预先提取或提前提取。高速存储器202中存储的内容可动态调节。The high-speed memory 202 in the embodiment of the present application is used to store a prefetched physical region descriptor (physical region descriptor), and the physical region descriptor may include a physical address (physical address) and a length. The physical region descriptor may be an entry of a physical region description table (Physical Region Description Table, PRDT). The physical area descriptor may be used by the host (host) to write data into the first memory 203 or retrieve data from the first memory 203 during the data read/write operation. In the embodiment of the present application, the physical area descriptor may be prefetched based on the RTT UPIU or the prompt information field segment read into the data UPIU, that is, the prefetched physical area descriptor to improve data read and write performance. In other words, there is a corresponding relationship between the prompt information field segment in the RTT UPIU or the read-in data UPIU and the prefetched physical area descriptor. The prefetching in this embodiment of the present application may also be understood as prefetching or prefetching. The content stored in the high-speed memory 202 can be dynamically adjusted.
高速存储器202是可以进行高速数据交换的存储器。高速存储器202可以包括,缓存(cache)或寄存器(register)等中的一种或多种。The high-speed memory 202 is a memory capable of high-speed data exchange. The high-speed memory 202 may include one or more of a cache or a register.
处理器204可运行操作系统、文件系统(如闪存文件系统F2FS)或应用程序等,以控制连接到处理器204的多个硬件或软件元件,并且可处理各种数据并执行操作。处理器204可将UFS设备(device)10中存储的指令或数据加载到第一存储器203中,并把需要运算的指令或数据调到处理器204中进行运算,当运算完成后处理器204再将结果临时存储在第一存储器203中,并将需要长期存储的指令或数据通过主机控制器201存储至UFS设备(device)10中。处理器204可以包括一个或多个处理单元(也可称处理核),例如:处理器204可以包括中央处理单元(CPU)、应用处理单元(application processor,AP)、调制解调处理单元、图形处理单元(graphics processing unit,GPU)、图像信号处理单元(image signal processor,ISP)、视频编解码单元、数字信号处理单元(digital signal processor,DSP)、基带处理单元和神经网络处理单元(neural-network processing unit,NPU)等中的一个或多个。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个器件中。进一步地,处理器204还可被实现为片上系统(System on Chip,SoC)。The processor 204 can run an operating system, a file system (such as a flash file system F2FS), or an application program to control multiple hardware or software components connected to the processor 204, and can process various data and perform operations. The processor 204 can load the instructions or data stored in the UFS device (device) 10 into the first memory 203, and transfer the instructions or data that need to be calculated to the processor 204 for calculation. After the calculation is completed, the processor 204 can then The results are temporarily stored in the first memory 203 , and instructions or data that need long-term storage are stored in the UFS device (device) 10 through the host controller 201 . The processor 204 may include one or more processing units (also called processing cores), for example: the processor 204 may include a central processing unit (CPU), an application processing unit (application processor, AP), a modem processing unit, a graphics Processing unit (graphics processing unit, GPU), image signal processing unit (image signal processor, ISP), video codec unit, digital signal processing unit (digital signal processor, DSP), baseband processing unit and neural network processing unit (neural- One or more of network processing unit, NPU) and the like. Wherein, different processing units may be independent devices, or may be integrated in one or more devices. Further, the processor 204 may also be implemented as a system on chip (System on Chip, SoC).
本申请实施例示意的结构并不构成UFS设备(device)10或UFS主机(host)20的具体限定。在本申请另一些实施例中,UFS设备(device)10或UFS主机(host)20可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示 的部件可以以硬件,软件或软件和硬件的组合实现。The structure shown in the embodiment of the present application does not constitute a specific limitation of the UFS device (device) 10 or the UFS host (host) 20 . In other embodiments of the present application, UFS device (device) 10 or UFS host (host) 20 may include more or fewer components than shown in the figure, or combine some components, or split some components, or different layout of the components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
上述UFS设备(device)10和UFS主机(host)20可以作为电子设备的一部分(即共同位于同一个电子设备),该电子设备可以包括但不限于手机、平板电脑、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、手持计算机、上网本、个人数字助理(personal digital assistant,PDA)、可穿戴电子设备、虚拟现实(virtual reality,VR)设备、强现实(augmented reality,AR)设备、智慧家居设备、车载设备、以及物联网(internet of things,IoT)中的设备等等,或者还可以包括服务器或服务集群,本申请实施例对此不做任何限制。The above-mentioned UFS device (device) 10 and UFS host (host) 20 can be used as a part of an electronic device (that is, they are co-located in the same electronic device), and the electronic device can include but not limited to a mobile phone, a tablet computer, a notebook computer, a super mobile personal computer (ultra-mobile personal computer, UMPC), handheld computer, netbook, personal digital assistant (PDA), wearable electronic devices, virtual reality (virtual reality, VR) equipment, augmented reality (augmented reality, AR) equipment , smart home devices, vehicle-mounted devices, and devices in the Internet of Things (Internet of Things, IoT), etc., or may also include servers or service clusters, which are not limited in this embodiment of the present application.
图7为本申请实施例提供的一种数据处理方法的流程图,本实施例的数据处理方法涉及主机和存储设备,示例性的,该主机可以是上述实施例的UFS主机(host),该存储设备可以是上述实施例的UFS设备(device),如图7所示,该方法可以包括:FIG. 7 is a flow chart of a data processing method provided by an embodiment of the present application. The data processing method of this embodiment involves a host and a storage device. Exemplarily, the host may be the UFS host (host) in the above embodiment. The The storage device may be the UFS device (device) of the foregoing embodiment, as shown in FIG. 7, the method may include:
S701、存储设备生成第一UPIU,该第一UPIU包括提示类型信息和第一UPIU的描述信息。S701. The storage device generates a first UPIU, where the first UPIU includes prompt type information and description information of the first UPIU.
其中,该提示类型(hint type)信息包括第一类型、第二类型或第三类型。该第一类型用于指示第二UPIU已准备就绪。该第二类型用于指示第二UPIU未准备就绪。该第三类型用于指示删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项。该物理区域描述符用于表示该UPIU对应的主机的第一存储器的位置。例如,该物理区域描述符可以包括物理地址(physical address)和长度。该第一UPIU的描述信息可以包括第一UPIU的标识信息和第一UPIU的数据缓存偏移(data buffer offset)。本申请实施例的未准备就绪是指没有准备就绪但预测即将(例如,一段时间之后)准备就绪。用于响应命令的多个UPIU包括该第一UPIU和该第二UPIU,该命令用于请求写入数据或读取数据,该第一UPIU的数据缓存偏移(data buffer offset)用于表示第一UPIU在用于响应命令的多个UPIU中的位置。Wherein, the hint type (hint type) information includes the first type, the second type or the third type. The first type is used to indicate that the second UPIU is ready. This second type is used to indicate that the second UPIU is not ready. The third type is used to indicate to delete at least one item of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host. The physical area descriptor is used to indicate the location of the first memory of the host corresponding to the UPIU. For example, the physical region descriptor may include a physical address and a length. The description information of the first UPIU may include identification information of the first UPIU and a data buffer offset (data buffer offset) of the first UPIU. Not ready in this embodiment of the present application refers to not being ready but predicted to be ready soon (for example, after a period of time). A plurality of UPIUs for responding to the command includes the first UPIU and the second UPIU, the command is used to request to write data or read data, and the data buffer offset (data buffer offset) of the first UPIU is used to represent the first UPIU The position of a UPIU among the UPIUs used to respond to commands.
示例性的,该第一UPIU是存储设备接收到主机发送的命令UPIU(Command UPIU)之后生成的。该命令UPIU(Command UPIU)可以用于请求写入数据或读取数据,即写命令或读命令。该第一UPIU可以是响应该命令UPIU(Command UPIU)的多个RTT UPIU中的任意一个或者多个读入数据UPIU(DataIn UPIU)中的任意一个。例如,以图5所示的应用场景为例,该命令UPIU(Command UPIU)可以是如图5所示的命令UPIU(Command UPIU),第一UPIU可以是RTT UPIU 1或RTT UPIU 2。以第一UPIU是RTT UPIU 1为例,RTT UPIU 1的描述信息可以包括RTT UPIU 1的标识信息和RTT UPIU 1的数据缓存偏移(data buffer offset)。该RTT UPIU 1的数据缓存偏移(data buffer offset)为16KB。也即,对于主机发送的命令UPIU(Command UPIU),存储设备通过两个RTT UPIU(即RTT UPIU 1和RTT UPIU 2)响应,这两个RTT UPIU的数据缓存偏移(data buffer offset)不同。Exemplarily, the first UPIU is generated after the storage device receives a command UPIU (Command UPIU) sent by the host. The command UPIU (Command UPIU) can be used to request to write data or read data, that is, write command or read command. The first UPIU may be any one of multiple RTT UPIUs in response to the command UPIU (Command UPIU) or any one of multiple read-in data UPIUs (DataIn UPIU). For example, taking the application scenario shown in Figure 5 as an example, the command UPIU (Command UPIU) can be the command UPIU (Command UPIU) shown in Figure 5, and the first UPIU can be RTT UPIU 1 or RTT UPIU 2. Taking the first UPIU as RTT UPIU 1 as an example, the description information of RTT UPIU 1 may include identification information of RTT UPIU 1 and a data buffer offset (data buffer offset) of RTT UPIU 1. The data buffer offset of the RTT UPIU 1 is 16KB. That is, for the command UPIU (Command UPIU) sent by the host, the storage device responds through two RTT UPIUs (ie, RTT UPIU 1 and RTT UPIU 2), and the data buffer offsets (data buffer offset) of the two RTT UPIUs are different.
该第一UPIU可以是RTT UPIU,或者可以是读入数据UPIU(DataIn UPIU)。该第一UPIU可以包括多个域,用于携带不同的信息。示例性的,该第一UPIU可以包括提示(hint)域和描述域。该描述域用于携带当前UPIU(即第一UPIU)的相关信息。示例性的,该描述域所携带的第一UPIU的描述信息包括但不限于第一UPIU的标识信息和第一UPIU的数据缓存偏移(data buffer offset)。其中,第一UPIU的标识信息可以表示第一UPIU所属命令。第一UPIU的标识信息可以包括但不限于信息标识(information identifier,IID)、逻辑单元号 (logical unit number,LUN)和任务标签(task tag)。可选的,第一UPIU的描述信息还可以包括该第一UPIU的数据传输量(data transfer count)等。数据传输量(data transfer count)表示以数据缓存偏移(data buffer offset)起始的连续数据或空间。数据传输量(data transfer count)的单位可以是4KB。描述域可以包括多个域段,以分别携带上述第一UPIU的描述信息所包括的各项信息。例如,图8A为本申请实施例的一种UPIU的示意图,如图8A所示,该UPIU可以包括头部(Header)域和数据负载(data payload)域,其中,头部(Header)域可以包括前述提示(hint)域和描述域。数据负载(data payload)域可以携带传输的数据。图8B为本申请实施例的一种UPIU的域段组成的示意图,如图8B所示,描述域可以包括IID域段、LUN域段、任务标签(task tag)域段、数据缓存偏移(data buffer offset)域段、数据传输量(data transfer count)域段等。该提示(hint)域用于携带当前UPIU(即第一UPIU)之后的UPIU(即第二UPIU)的相关信息。本申请实施例中,该提示(hint)域可以携带上述提示类型信息。例如,利用该提示(hint)域所包括的保留(reserved)域携带该提示类型信息。示例性的,该提示类型信息可以是两比特信息。当然可以理解的,提示类型信息还可以是更多比特信息,本申请实施例对此不作具体限定。提示(hint)域还可以携带提示控制(hint control)信息、提示UPIU的标识信息、以及提示UPIU的数据缓存偏移(hint data buffer offset)等。提示控制(hint control)信息用于指示当前UPIU携带的提示(hint)域是否有效。提示UPIU的标识信息可以包括但不限于提示信息标识(hint information identifier,hint IID)、提示逻辑单元号(hint logical unit number,hint LUN)和提示任务标签(hint task tag)。提示(hint)域还可以携带提示数据传输量(hint data transfer count)。可选的,提示数据传输量(hint data transfer count)表示以提示UPIU的数据缓存偏移(hint data buffer offset)起始的连续数据或空间。其单位可以是4KB。提示(hint)域可以包括多个域段,以分别携带上述提示(hint)域所包括的各项信息。以图8B所示的UPIU的域段组成为例做进一步举例说明,如图8B所示,提示(hint)域可以包括提示控制(hint control)域段、提示类型(hint type)域段、hint IID域段、hint LUN域段、提示任务标签(hint task tag)域段、提示数据缓存偏移(hint data buffer offset)域段、提示数据传输量(hint data transfer count)域段等。The first UPIU may be an RTT UPIU, or may be a data-in UPIU (DataIn UPIU). The first UPIU may include multiple fields for carrying different information. Exemplarily, the first UPIU may include a hint (hint) field and a description field. The description field is used to carry relevant information of the current UPIU (that is, the first UPIU). Exemplarily, the description information of the first UPIU carried in the description field includes but not limited to identification information of the first UPIU and a data buffer offset (data buffer offset) of the first UPIU. Wherein, the identification information of the first UPIU may indicate a command to which the first UPIU belongs. The identification information of the first UPIU may include, but not limited to, an information identifier (information identifier, IID), a logical unit number (logical unit number, LUN) and a task tag (task tag). Optionally, the description information of the first UPIU may also include the data transfer count (data transfer count) of the first UPIU. The amount of data transfer (data transfer count) indicates the continuous data or space starting from the data buffer offset (data buffer offset). The unit of data transfer count may be 4KB. The description field may include multiple field segments to respectively carry various pieces of information included in the description information of the first UPIU. For example, FIG. 8A is a schematic diagram of a UPIU according to an embodiment of the present application. As shown in FIG. 8A, the UPIU may include a header (Header) domain and a data payload (data payload) domain, wherein the header (Header) domain may be It includes the aforementioned hint (hint) domain and description domain. The data payload field can carry the transmitted data. FIG. 8B is a schematic diagram of the composition of a UPIU domain segment according to an embodiment of the present application. As shown in FIG. 8B , the description domain may include an IID domain segment, a LUN domain segment, a task tag (task tag) domain segment, and a data cache offset ( data buffer offset) domain segment, data transfer count domain segment, etc. The hint (hint) field is used to carry the relevant information of the UPIU (ie the second UPIU) after the current UPIU (ie the first UPIU). In this embodiment of the present application, the hint (hint) field may carry the above hint type information. For example, the hint type information is carried in a reserved (reserved) field included in the hint (hint) field. Exemplarily, the prompt type information may be two-bit information. Of course, it can be understood that the prompt type information may also be more bit information, which is not specifically limited in this embodiment of the present application. The hint (hint) field may also carry hint control (hint control) information, hint UPIU identification information, and hint UPIU data buffer offset (hint data buffer offset), etc. The hint control (hint control) information is used to indicate whether the hint (hint) field carried by the current UPIU is valid. The identification information of the hint UPIU may include but not limited to hint information identifier (hint information identifier, hint IID), hint logical unit number (hint logical unit number, hint LUN) and hint task tag (hint task tag). The hint (hint) field may also carry hint data transfer count. Optionally, the hint data transfer count (hint data transfer count) represents the continuous data or space starting from the hint data buffer offset (hint data buffer offset) of the UPIU. Its unit may be 4KB. The hint (hint) field may include a plurality of field segments to respectively carry various pieces of information included in the above hint (hint) field. Take the domain segment composition of UPIU shown in Figure 8B as an example for further illustration, as shown in Figure 8B, the hint (hint) domain can include a hint control (hint control) domain segment, a hint type (hint type) domain segment, hint IID field, hint LUN field, hint task tag field, hint data buffer offset field, hint data transfer count field, etc.
第一类型也可以称为确认提示(sure hint)类型。第二类型也可以称为普通提示(normal hint)类型。第三类型也可以称为删除提示(delete hint)类型。还需要说明的是,第一类型、第二类型以及第一类型的名称只是一个示例,对提示类型信息的功能不构成限定。其还可以是其他名称,本申请实施例对此不作具体限定。The first type may also be referred to as a sure hint type. The second type may also be referred to as a normal hint (normal hint) type. The third type may also be called a delete hint (delete hint) type. It should also be noted that the names of the first type, the second type, and the first type are just examples, and do not limit the function of prompting type information. It may also have other names, which are not specifically limited in this embodiment of the present application.
还需要说明的是,本申请实施例的提示(hint),也可以称为暗示、提前指示等,本申请实施例对此不作具体限定。It should also be noted that the hint (hint) in the embodiment of the present application may also be referred to as hint, advance instruction, etc., which is not specifically limited in the embodiment of the present application.
示例性的,存储设备可以根据已准备就绪的后续待发送的UPIU(即第二UPIU)的数据或空间,或者根据预测的即将准备好的UPIU(即第二UPIU)的数据或空间,确定第一UPIU携带的提示(hint)信息,包括但不限于上述提示类型信息。Exemplarily, the storage device may determine the first UPIU according to the data or space of the UPIU that is ready to be sent (that is, the second UPIU), or according to the data or space of the UPIU that is predicted to be ready (that is, the second UPIU). The hint information carried by a UPIU includes but not limited to the above hint type information.
S702、存储设备向主机发送该第一UPIU。S702. The storage device sends the first UPIU to the host.
相应的,主机接收存储设备发送该第一UPIU。Correspondingly, the host receives the first UPIU sent by the storage device.
S703、主机根据该提示类型信息,调整主机的高速存储器中的物理区域描述符。S703. The host adjusts the physical area descriptor in the high-speed memory of the host according to the prompt type information.
主机解析收到的第一UPIU,得到提示(hint)信息。主机根据提示(hint)信息中的提示类型信息,调整主机的高速存储器中的物理区域描述符。The host parses the received first UPIU and obtains hint information. The host adjusts the physical area descriptor in the high-speed memory of the host according to the hint type information in the hint (hint) information.
示例性的,当提示类型信息为第一类型时,主机可以预取第一UPIU的提示类型信息对应的物理区域描述符,并以第一优先级保存至主机的高速存储器中。还需要说明的是,主机还可以根据第一UPIU的描述域所携带的信息,在高速存储器中查找是否存在与第一UPIU的描述域所携带的信息对应的物理区域描述符,如果没有,则主机还可以根据第一UPIU的描述域所携带的信息直接从主存储器读取对应的物理区域描述符。本申请实施例对主机根据第一UPIU的描述域所携带的信息所进行的操作不作具体限定。Exemplarily, when the hint type information is the first type, the host may prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and store it in the high-speed memory of the host with the first priority. It should also be noted that, according to the information carried in the description field of the first UPIU, the host can also search whether there is a physical area descriptor corresponding to the information carried in the description field of the first UPIU in the high-speed memory, if not, then The host may also directly read the corresponding physical area descriptor from the main memory according to the information carried in the description field of the first UPIU. The embodiment of the present application does not specifically limit the operation performed by the host according to the information carried in the description field of the first UPIU.
当提示类型信息为第二类型时,主机可以预取第一UPIU的提示类型信息对应的物理区域描述符,并以第二优先级保存至主机的高速存储器中。第二优先级低于第一优先级。When the hint type information is the second type, the host may prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and store it in the high-speed memory of the host with the second priority. The second priority is lower than the first priority.
该第一UPIU的提示类型信息对应的物理区域描述符是指该第一UPIU的提示类型信息所指示的UPIU(即第二UPIU)的物理区域描述符。主机在还没有接收到第二UPIU之前,基于第一UPIU所携带的提示类型信息预取第二UPIU的物理区域描述符,并保存在主机的高速存储器中。之后,如果主机接收到第二UPIU,可以从高速存储器中快速获取该第二UPIU的物理区域描述符,进而根据该第二UPIU的物理区域描述符从主机的第一存储器中取出数据,或者向主机的第一存储器中写入数据。这样,在主机接收第二UPIU之前便提前预取了相应的物理区域描述符,可以提升第二UPIU的处理速度,从而提升数据读写性能。The physical area descriptor corresponding to the hint type information of the first UPIU refers to the physical area descriptor of the UPIU (that is, the second UPIU) indicated by the hint type information of the first UPIU. Before the host receives the second UPIU, it prefetches the physical area descriptor of the second UPIU based on the prompt type information carried by the first UPIU, and stores it in the high-speed memory of the host. Afterwards, if the host receives the second UPIU, it can quickly obtain the physical area descriptor of the second UPIU from the high-speed memory, and then fetch data from the first memory of the host according to the physical area descriptor of the second UPIU, or send data to Writing data into the first memory of the host. In this way, before the host receives the second UPIU, the corresponding physical area descriptor is prefetched in advance, which can increase the processing speed of the second UPIU, thereby improving data read and write performance.
第一类型所指示的UPIU(即第二UPIU)的物理区域描述符,在主机的高速存储器的优先级高于,第二类型所指示的UPIU(即第二UPIU)的物理区域描述符。这样,可以提升高速存储器的命中率,从而实现更优的数据传输性能。高速存储器的命中率用于衡量高速存储器中预取的物理区域描述符是否为之后接收到的UPIU的物理区域描述符。也即接收到的RTT UPIU或读入数据UPIU(DataIn UPIU)的物理区域描述符是否存在于高速存储器中。The physical area descriptor of the UPIU indicated by the first type (ie, the second UPIU) has a higher priority in the high-speed memory of the host than the physical area descriptor of the UPIU indicated by the second type (ie, the second UPIU). In this way, the hit rate of the high-speed memory can be improved, thereby achieving better data transmission performance. The hit rate of the high-speed memory is used to measure whether the physical area descriptor prefetched in the high-speed memory is the physical area descriptor of the UPIU received later. That is, whether the received RTT UPIU or the physical area descriptor of the read-in data UPIU (DataIn UPIU) exists in the high-speed memory.
当提示类型信息为第三类型时,主机可以删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项。通过删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项,即删除主机的高速存储器中预取的物理区域描述符,以释放高速存储器的资源,使得主机可以基于存储设备发送的新的提示信息预取新的物理区域描述符,这样,可以减少由于高速存储器的资源耗尽,而导致存储设备所产生的新的提示信息无法正常发送的问题。因为,如果超出最大未完成的提示(hint outstanding)会导致主机性能下降,使其无法在最优的方式下处理读命令或写命令。When the prompt type information is the third type, the host may delete at least one item of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host. By deleting at least one of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host, the physical area description prefetched in the high-speed memory of the host is deleted descriptor, to release the resources of the high-speed memory, so that the host can prefetch new physical region descriptors based on the new prompt information sent by the storage device. The prompt information cannot be sent normally. Because, if the maximum outstanding hint (hint outstanding) is exceeded, the performance of the host will degrade, making it unable to process read or write commands in an optimal way.
本实施例,通过存储设备生成第一UPIU,该第一UPIU包括提示类型信息。该提示类型信息包括第一类型、第二类型或第三类型。该第一类型用于指示第二UPIU已准备就绪。该第二类型用于指示第二UPIU未准备就绪。该第三类型用于指示删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项。存储设备向主机发送该第一UPIU,主机根据该提示类型信息,调整主机的高速存储器中的物理区域描述符。通过提示类型信息指示主机调整主机的高速存储器中的物理区域描述符,使得调整后的物理区域描述符,以更高的概率被之后接收到的第二UPIU命中,从而可以提升主机的高速存储器的命中率,以实现更优的UFS数据吞吐率,有益于提升数据读写性能。In this embodiment, the storage device generates the first UPIU, where the first UPIU includes prompt type information. The prompt type information includes the first type, the second type or the third type. The first type is used to indicate that the second UPIU is ready. This second type is used to indicate that the second UPIU is not ready. The third type is used to indicate to delete at least one item of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host. The storage device sends the first UPIU to the host, and the host adjusts the physical area descriptor in the high-speed memory of the host according to the hint type information. The prompt type information instructs the host to adjust the physical area descriptor in the high-speed memory of the host, so that the adjusted physical area descriptor is hit by the second UPIU received later with a higher probability, thereby improving the performance of the high-speed memory of the host. Hit rate to achieve a better UFS data throughput rate, which is beneficial to improve data read and write performance.
图9为本申请实施例提供的一种数据处理方法的示意图,本实施例的数据处理方法涉及上述实施例的UFS主机(host)和上述实施例的UFS设备(device),如图9所示,该方法可以包括:(1)UFS主机(host)进行命令调度。即UFS主机(host)在获取上层应用的读/写命令时,触发命令调度,将命令通过封装的方式转换为命令UPIU(Command UPIU)。之后,(2)UFS主机(host)向UFS设备(device)下发命令UPIU(Command UPIU)。(3)UFS设备(device)执行命令,进行UPIU的数据或空间准备。具体的,如果命令UPIU(Command UPIU)用于请求写入数据,则UFS设备(device)进行UPIU的空间准备,以便接收UFS主机(host)发送的用于写入数据的UPIU。如果命令UPIU(Command UPIU)用于请求读取数据,则UFS设备(device)进行UPIU的数据准备,以便向UFS主机(host)发送读入数据UPIU(DataIn UPIU)。UFS设备(device)进行UPIU的数据准备可以包括UFS设备(device)进行数据搬运。即UFS设备(device)将数据从NAND闪存中取出,以便之后通过封装的方式将数据转换为读入数据UPIU(DataIn UPIU),发送给UFS主机(host)。(4)UFS设备(device)根据UPIU的数据或空间准备的状态,生成差异化的提示信息,该提示信息随UPIU(即DataIn UPIU或RTT UPIU)发送给UFS主机(host)。例如,UFS设备(device)已准备好当前UPIU(例如,上述第一UPIU)的数据或空间,以及已准备好候选待发送的UPIU(例如,上述第二UPIU)的数据或空间,则生成的提示信息中包括的提示类型信息为第一类型。又例如,UFS设备(device)已准备好当前UPIU(例如,上述第一UPIU)的数据或空间,以及预测即将准备好候选待发送的UPIU(例如,上述第二UPIU)的数据或空间,则生成的提示信息中包括的提示类型信息为第二类型。(5)UFS主机(host)根据接收到的UPIU(即DataIn UPIU或RTT UPIU),解析提示信息,并根据提示信息,调整高速存储器中的物理区域描述符。(6)UFS主机(host)根据接收到的UPIU(即DataIn UPIU或RTT UPIU)进行数据搬运。例如,UFS主机(host)根据接收到的DataIn UPIU,将数据搬运至第一存储器中。又例如,UFS主机(host)根据接收到的RTT UPIU,将数据从第一存储器中取出,以便通过封装的方式将数据转换为写出数据UPIU(DataOut UPIU),发送给UFS设备(device)。(7)UFS设备(device)完成命令后,即接收到命令UPIU(Command UPIU)对应的所有写出数据UPIU(DataOut UPIU),或者,发送完命令UPIU(Command UPIU)对应的所有读取数据(DataIn UPIU),向UFS主机(host)回复响应UPIU(Response UPIU)。FIG. 9 is a schematic diagram of a data processing method provided by the embodiment of the present application. The data processing method of this embodiment involves the UFS host (host) of the above embodiment and the UFS device (device) of the above embodiment, as shown in FIG. 9 , the method may include: (1) UFS host (host) performs command scheduling. That is, when the UFS host (host) obtains the read/write command of the upper-layer application, it triggers command scheduling, and converts the command into a command UPIU (Command UPIU) through encapsulation. Afterwards, (2) The UFS host (host) issues a command UPIU (Command UPIU) to the UFS device (device). (3) The UFS device (device) executes the command to prepare data or space for the UPIU. Specifically, if the command UPIU (Command UPIU) is used to request to write data, the UFS device (device) performs space preparation for UPIU, so as to receive the UPIU for writing data sent by the UFS host (host). If the command UPIU (Command UPIU) is used to request to read data, the UFS device (device) performs data preparation for UPIU, so as to send the read data UPIU (DataIn UPIU) to the UFS host (host). UFS device (device) performing data preparation for UPIU may include UFS device (device) performing data transfer. That is, the UFS device (device) takes the data out of the NAND flash memory, so that the data can be converted into read-in data UPIU (DataIn UPIU) by encapsulation, and sent to the UFS host (host). (4) The UFS device (device) generates differentiated prompt information according to the state of UPIU data or space preparation, and the prompt information is sent to the UFS host (host) along with the UPIU (ie, DataIn UPIU or RTT UPIU). For example, if the UFS device (device) has prepared the data or space of the current UPIU (for example, the above-mentioned first UPIU), and has prepared the data or space of the candidate UPIU (for example, the above-mentioned second UPIU) to be sent, then the generated The prompt type information included in the prompt information is the first type. For another example, the UFS device (device) has prepared the data or space of the current UPIU (for example, the above-mentioned first UPIU), and predicts that the data or space of the candidate UPIU (for example, the above-mentioned second UPIU) to be sent will be ready soon, then The prompt type information included in the generated prompt information is the second type. (5) The UFS host (host) parses the prompt information according to the received UPIU (that is, DataIn UPIU or RTT UPIU), and adjusts the physical area descriptor in the high-speed memory according to the prompt information. (6) The UFS host (host) performs data transfer according to the received UPIU (ie DataIn UPIU or RTT UPIU). For example, the UFS host (host) moves the data to the first storage according to the received DataIn UPIU. For another example, the UFS host (host) takes out data from the first memory according to the received RTT UPIU, so that the data is converted into a write-out data UPIU (DataOut UPIU) by encapsulation and sent to the UFS device (device). (7) After the UFS device (device) completes the command, it receives all the write data UPIU (DataOut UPIU) corresponding to the command UPIU (Command UPIU), or sends all the read data corresponding to the command UPIU (Command UPIU) ( DataIn UPIU), reply UPIU (Response UPIU) to the UFS host (host).
本实施例,通过UFS主机(host)进行命令调度,UFS设备(device)执行命令,进行UPIU的数据或空间准备,UFS设备(device)根据UPIU的数据或空间准备的状态,生成差异化的提示信息,该提示信息包括提示类型信息,提示信息随UPIU(即DataIn UPIU或RTT UPIU)发送给UFS主机(host),UFS主机(host)根据接收到的UPIU(即DataIn UPIU或RTT UPIU),解析提示信息,并根据提示类型信息,调整高速存储器中的物理区域描述符。通过基于提示类型信息调整主机的高速存储器中的物理区域描述符,使得调整后的物理区域描述符,以更高的概率被之后接收到的UPIU命中,从而可以提升主机的高速存储器的命中率,以实现更优的UFS数据吞吐率,有益于提升数据读写性能。In this embodiment, the UFS host (host) performs command scheduling, the UFS device (device) executes the command, and performs UPIU data or space preparation, and the UFS device (device) generates differentiated prompts according to the status of UPIU data or space preparation Information, the prompt information includes prompt type information, the prompt information is sent to the UFS host (host) along with the UPIU (i.e. DataIn UPIU or RTT UPIU), and the UFS host (host) parses the received UPIU (i.e. DataIn UPIU or RTT UPIU) hint information, and adjust the physical area descriptor in the high-speed memory according to the hint type information. By adjusting the physical area descriptor in the high-speed memory of the host based on the prompt type information, the adjusted physical area descriptor is hit by the UPIU received later with a higher probability, thereby improving the hit rate of the high-speed memory of the host. In order to achieve a better UFS data throughput rate, it is beneficial to improve data read and write performance.
图10为本申请实施例提供的一种数据处理方法的流程图,本实施例的数据处理方法可以由存储设备执行,示例性的,该存储设备可以是上述实施例的UFS设备(device),如图10所示,该方法可以包括:FIG. 10 is a flow chart of a data processing method provided by an embodiment of the present application. The data processing method of this embodiment may be executed by a storage device. Exemplarily, the storage device may be the UFS device (device) of the above embodiment. As shown in Figure 10, the method may include:
S1001、获取当前未完成的提示的数据量和第二UPIU的状态信息。S1001. Obtain the data amount of the currently unfinished notification and the state information of the second UPIU.
当前未完成的提示(hint outstanding)的数据量也可以称为第一数据量。当前未完成的提示(hint outstanding)的数据量是指当前已发送提示信息,但未发送该提示信息所指示的UPIU的数据量。在一些场景中,当前未完成的提示的数据量为0KB。例如,在发送第一UPIU之前,未发送过携带提示信息的UPIU的情况下,当前未完成的提示的数据量为0KB。又例如,在发送第一UPIU之前,已发送的提示信息对应的UPIU均已发送的情况下,当前未完成的提示的数据量为0KB。在另一些场景中,当前未完成的提示的数据量大于0KB。示例性的,当前未完成的提示的数据量可以包括至少一个第三UPIU各自的第一类型或第二类型所指示的第四UPIU的数据量,即至少一个第四UPIU的数据量。至少一个第四UPIU可以包括一个第四UPIU或多个第四UPIU。其中,一个第四UPIU为一个第三UPIU的第一类型或第二类型所指示的已准备就绪或未准备就绪的UPIU。多个第四UPIU为多个第三UPIU各自的第一类型或第二类型所指示的已准备就绪或未准备就绪的UPIU。本申请实施例的未准备就绪的UPIU是指没有准备就绪但预测即将(例如,一段时间之后)准备就绪的UPIU。The data volume of the currently unfinished hint (hint outstanding) may also be referred to as the first data volume. The data volume of the currently outstanding hint (hint outstanding) refers to the data volume of the UPIU indicated by the hint information that has been sent but not sent. In some scenarios, the data size of the currently outstanding hint is 0KB. For example, if no UPIU carrying prompt information has been sent before the first UPIU is sent, the data volume of the currently unfinished prompt is 0 KB. For another example, in a case where all the UPIUs corresponding to the sent prompt information have been sent before the first UPIU is sent, the data volume of the currently unfinished prompt is 0 KB. In some other scenarios, the data size of the currently outstanding prompt is greater than 0KB. Exemplarily, the data volume of the currently outstanding notification may include the data volume of the fourth UPIU indicated by the respective first type or the second type of at least one third UPIU, that is, the data volume of at least one fourth UPIU. The at least one fourth UPIU may include one fourth UPIU or a plurality of fourth UPIUs. Wherein, a fourth UPIU is a ready or unready UPIU indicated by the first type or the second type of a third UPIU. The multiple fourth UPIUs are ready or unready UPIUs indicated by the first type or the second type of the multiple third UPIUs. The unready UPIU in this embodiment of the present application refers to a UPIU that is not ready but is predicted to be ready soon (for example, after a period of time).
一个或多个第三UPIU是在发送第一UPIU之前发送的,即UFS设备(device)已发送给UFS主机(host)的。一个或多个第四UPIU是未发送的UPIU,即UFS设备(device)已通过一个或多个第三UPIU的提示(hint)信息给UFS主机(host)指示之后会发送,但还未发送的UPIU。One or more third UPIUs are sent before sending the first UPIU, that is, the UFS device (device) has sent the UFS host (host). One or more fourth UPIUs are unsent UPIUs, that is, the UFS device (device) will send after indicating to the UFS host (host) through the hint information of one or more third UPIUs (hint), but has not yet sent UPIU.
一个或多个第四UPIU也可以称为未完成的提示(hint outstanding)所指示的UPIU。The one or more fourth UPIUs may also be referred to as UPIUs indicated by an incomplete hint (hint outstanding).
以当前未完成的提示的数据量包括一个第三UPIU的第一类型或第二类型所指示的第四UPIU的数据量为例,对当前未完成的提示的数据量进行解释说明。当前未完成的提示的数据量是指,由第三UPIU的提示(hint)信息所指示的数据量,具体可以等于第三UPIU的提示数据传输量(hint data transfer count)。其中,第三UPIU的提示(hint)信息用于指示第四UPIU。若当前未完成的提示的数据量包括多个第三UPIU的第一类型或第二类型所指示的第四UPIU的数据量,当前未完成的提示的数据量是指,由多个第三UPIU各自的提示(hint)信息所指示的数据量之和,具体可以等于多个第三UPIU的提示数据传输量(hint data transfer count)之和。Taking the data volume of the currently uncompleted prompt including the data volume of the fourth UPIU indicated by the first type or the second type of a third UPIU as an example, the data volume of the currently uncompleted prompt is explained. The currently unfinished hint data volume refers to the data volume indicated by the hint (hint) information of the third UPIU, which may be specifically equal to the hint data transfer count (hint data transfer count) of the third UPIU. Wherein, the hint (hint) information of the third UPIU is used to indicate the fourth UPIU. If the data volume of the current unfinished prompt includes the data volume of the fourth UPIU indicated by the first type or the second type of a plurality of third UPIUs, the data volume of the current unfinished prompt refers to the data volume of the multiple third UPIUs. The sum of the data amounts indicated by the respective hint (hint) information may specifically be equal to the sum of the hint data transfer counts (hint data transfer count) of multiple third UPIUs.
该第二UPIU的状态信息用于表示第二UPIU已准备就绪或未准备就绪。The state information of the second UPIU is used to indicate whether the second UPIU is ready or not.
S1002、根据当前未完成的提示的数据量和第二UPIU的状态信息,确定第一UPIU的提示类型信息。S1002. Determine the prompt type information of the first UPIU according to the amount of currently unfinished prompt data and the status information of the second UPIU.
该提示类型信息可以包括第一类型、第二类型或第三类型,其具体解释说明可以参见图7所示实施例的S701,此处不再赘述。The prompt type information may include the first type, the second type, or the third type. For a specific explanation, refer to S701 in the embodiment shown in FIG. 7 , which will not be repeated here.
本实施例,通过获取当前未完成的提示对应的数据量和第二UPIU的状态信息,根据当前未完成的提示的数据量和第二UPIU的状态信息,确定第一UPIU的提示类型信息。该提示类型信息包括第一类型、第二类型或第三类型。该第一类型用于指示第二UPIU已准备就绪。该第二类型用于指示第二UPIU未准备就绪。该第三类型用于指示删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项。通过提示类型信息指示主机调整主机的高速存储器中的物理区域描述符,使得调整后的物理区域描述符,以更高的概率被之后接收到的第二UPIU命中, 从而可以提升主机的高速存储器的命中率,以实现更优的UFS数据吞吐率,有益于提升数据读写性能。In this embodiment, the prompt type information of the first UPIU is determined according to the data volume of the currently unfinished prompt and the state information of the second UPIU by acquiring the data amount corresponding to the currently unfinished prompt and the state information of the second UPIU. The prompt type information includes the first type, the second type or the third type. The first type is used to indicate that the second UPIU is ready. This second type is used to indicate that the second UPIU is not ready. The third type is used to indicate to delete at least one item of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host. The prompt type information instructs the host to adjust the physical area descriptor in the host's high-speed memory, so that the adjusted physical area descriptor will be hit by the second UPIU received later with a higher probability, thereby improving the performance of the host's high-speed memory. Hit rate to achieve a better UFS data throughput rate, which is beneficial to improve data read and write performance.
图11为本申请实施例提供的一种数据处理方法的流程图,本实施例的数据处理方法可以由存储设备执行,示例性的,该存储设备可以是上述实施例的UFS设备(device),如图11所示,该方法可以包括:FIG. 11 is a flow chart of a data processing method provided by an embodiment of the present application. The data processing method of this embodiment may be executed by a storage device. Exemplarily, the storage device may be the UFS device (device) of the above embodiment. As shown in Figure 11, the method may include:
S1101、获取当前未完成的提示的数据量和第二UPIU的状态信息。S1101. Obtain the data amount of the currently unfinished notification and the status information of the second UPIU.
其中,S1101的具体解释说明可以参见图10所示实施例的S1001的解释说明,此处不再赘述。Wherein, for the specific explanation of S1101, reference may be made to the explanation of S1001 in the embodiment shown in FIG. 10 , which will not be repeated here.
其中,执行S1101的触发条件可以是当前需要调度第一UPIU。即当前需要调度第一UPIU,通过执行S1101至S1107,以确定第一UPIU的提示(hint)信息,包括但不限于提示类型信息。Wherein, the trigger condition for executing S1101 may be that the first UPIU needs to be scheduled currently. That is, the first UPIU needs to be scheduled at present, and the hint (hint) information of the first UPIU is determined by performing S1101 to S1107, including but not limited to hint type information.
S1102、判断当前未完成的提示的数据量是否小于第一阈值,当当前未完成的提示的数据量小于第一阈值时,执行S1103,当当前未完成的提示的数据量等于第一阈值时,执行S1106。S1102. Determine whether the data volume of the currently unfinished prompt is less than the first threshold. When the data volume of the current unfinished prompt is less than the first threshold, execute S1103. When the data volume of the current unfinished prompt is equal to the first threshold, Execute S1106.
第一阈值可以根据需求进行合理设置。第一阈值的单位可以是4KB。通常情况下,该第一阈值与UFS主机(host)的高速存储器的资源大小有关。该第一阈值可以是预先设置的,也可以是由UFS主机(host)在上电之后在命令下发之前配置给UFS设备(device)的。示例性的,以UFS主机(host)动态配置给UFS设备(device)为例,UFS主机(host)可以向UFS设备(device)配置参数(w),该参数(w)用于限制UFS设备(device)的未完成的提示(hint outstanding)的UPIU的数据量。最大未完成的提示(hint outstanding)的UPIU的数据量用MAX hint outstanding表示。MAX hint outstanding=32 x 2^w,单位4KB。第一阈值可以取值为32 x 2^w,当然可以理解的,也可以取值为小于32 x 2^w的任意数值。本实施例以第一阈值取值为32 x 2^w为例。当当前未完成的提示的数据量小于第一阈值,表示UFS设备(device)的未完成的提示(hint outstanding)未耗尽,可以通过S1103至S1105,以在第一UPIU携带提示类型信息为第一类型或第二类型。当当前未完成的提示的数据量等于第一阈值,表示UFS设备(device)的未完成的提示(hint outstanding)已耗尽,可以通过S1106,以在第一UPIU携带提示类型信息为第三类型。The first threshold can be reasonably set according to requirements. A unit of the first threshold may be 4KB. Usually, the first threshold is related to the resource size of the high-speed memory of the UFS host (host). The first threshold may be preset, or may be configured to the UFS device (device) by the UFS host (host) after power-on and before issuing the command. Exemplarily, taking UFS host (host) to dynamically configure UFS device (device) as an example, UFS host (host) can configure parameter (w) to UFS device (device), and this parameter (w) is used to limit UFS device ( The amount of UPIU data of the outstanding hint (hint outstanding) of device). The data volume of the UPIU of the maximum outstanding hint (hint outstanding) is represented by MAX hint outstanding. MAX hint outstanding = 32 x 2^w, unit 4KB. The first threshold can take a value of 32 x 2^w, of course it is understandable, and can also take any value smaller than 32 x 2^w. In this embodiment, the value of the first threshold is 32 x 2^w as an example. When the amount of currently unfinished hint data is less than the first threshold, it means that the unfinished hints (hint outstanding) of the UFS device (device) are not exhausted, and the hint outstanding can be carried in the first UPIU through S1103 to S1105. Type 1 or Type 2. When the data amount of the current unfinished hint is equal to the first threshold, it means that the unfinished hint (hint outstanding) of the UFS device (device) has been exhausted, and the hint type information carried in the first UPIU can be the third type through S1106 .
S1103、判断第二UPIU的状态信息是否表示第二UPIU已准备就绪,当第二UPIU的状态信息表示第二UPIU已准备就绪时,执行S1104,当第二UPIU的状态信息表示第二UPIU未准备就绪时,执行S1105。S1103, judging whether the state information of the second UPIU indicates that the second UPIU is ready, when the state information of the second UPIU indicates that the second UPIU is ready, execute S1104, when the state information of the second UPIU indicates that the second UPIU is not ready When ready, execute S1105.
S1104、确定第一UPIU所携带的提示类型信息为第一类型。S1104. Determine that the prompt type information carried by the first UPIU is the first type.
在下述场景一时,UFS设备(device)可以确定第一UPIU所携带的提示类型信息为第一类型。In the following scenario 1, the UFS device (device) may determine that the prompt type information carried by the first UPIU is the first type.
场景一scene one
UFS设备(device)在需要发送第一UPIU时,若已准备好后续待发送的第二UPIU的数据或空间,则将已准备好后续待发送的第二UPIU的数据或空间的相关信息填充到第一UPIU的提示(hint)域,这包括但不限于提示类型信息为第一类型、提示控制(hint control)信息、提示UPIU的标识信息、以及提示UPIU的数据缓存偏移(hint data buffer offset)等。When the UFS device (device) needs to send the first UPIU, if it has prepared the data or space of the second UPIU to be sent subsequently, it will fill in the relevant information of the data or space of the second UPIU that has been prepared to be sent subsequently. The hint (hint) field of the first UPIU, which includes but not limited to hint type information is the first type, hint control (hint control) information, hint UPIU identification information, and hint data buffer offset (hint data buffer offset) of UPIU )wait.
执行完S1104之后,可以执行S1108。After S1104 is executed, S1108 may be executed.
S1105、确定第一UPIU所携带的提示类型信息为第二类型。S1105. Determine that the prompt type information carried by the first UPIU is the second type.
在下述场景二时,UFS设备(device)可以确定第一UPIU所携带的提示类型信息为第二类型。In the following scenario two, the UFS device (device) may determine that the prompt type information carried by the first UPIU is the second type.
场景二scene two
UFS设备(device)在需要发送第一UPIU时,若未准备好后续待发送的第二UPIU的数据或空间,UFS设备(device)预判后续即将准备好的第二UPIU的数据或空间,将预判的第二UPIU的数据或空间相关信息填充到第一UPIU的提示(hint)域,这包括但不限于提示类型信息为第二类型、提示控制(hint control)信息、提示UPIU的标识信息、以及提示UPIU的数据缓存偏移(hint data buffer offset)等。示例性的,UFS设备(device)预判后续即将准备好的第二UPIU的数据或空间,可以是利用时间局限性和/或空间局限性预判后续即将准备好的第二UPIU的数据或空间。When the UFS device (device) needs to send the first UPIU, if the data or space of the second UPIU to be sent is not ready, the UFS device (device) predicts the data or space of the second UPIU that is about to be prepared, and sends The predicted data or space-related information of the second UPIU is filled into the prompt (hint) field of the first UPIU, which includes but is not limited to the prompt type information being the second type, prompt control (hint control) information, and prompt UPIU identification information , and prompt UPIU's data buffer offset (hint data buffer offset), etc. Exemplarily, the UFS device (device) predicts the data or space of the second UPIU that will be prepared later, and may use the time limitation and/or space limitation to predict the data or space of the second UPIU that will be prepared later .
执行完S1105之后,可以执行S1108。After S1105 is executed, S1108 may be executed.
S1106、判断第二UPIU的状态信息是否表示第二UPIU已准备就绪,当第二UPIU的状态信息表示第二UPIU已准备就绪时,执行S1107,当第二UPIU的状态信息表示第二UPIU未准备就绪时,重复执行S1106。S1106. Determine whether the status information of the second UPIU indicates that the second UPIU is ready, and when the status information of the second UPIU indicates that the second UPIU is ready, execute S1107, and when the status information of the second UPIU indicates that the second UPIU is not ready When ready, execute S1106 repeatedly.
当UFS设备(device)的未完成的提示(hint outstanding)已耗尽,且UFS设备(device)在需要发送第一UPIU时,已准备好后续待发送的第二UPIU的数据或空间,则将第三类型填充到第一UPIU的提示(hint)域的提示类型域段。这样,可以避免由于未完成的提示(hint outstanding)受限而导致后续提示信息无法发出的问题。当UFS设备(device)的未完成的提示(hint outstanding)已耗尽,且UFS设备(device)在需要发送第一UPIU时,未准备好后续待发送的第二UPIU的数据或空间,则可以返回执行S1106。When the unfinished hints (hint outstanding) of the UFS device (device) have been exhausted, and the UFS device (device) has prepared the data or space of the second UPIU to be sent later when it needs to send the first UPIU, then it will The third type is filled into the hint type field field of the hint field of the first UPIU. In this way, the problem that subsequent hint information cannot be sent due to the limitation of unfinished hint outstanding can be avoided. When the unfinished hint (hint outstanding) of the UFS device (device) has been exhausted, and the UFS device (device) is not ready for the data or space of the second UPIU to be sent later when it needs to send the first UPIU, then you can Return to execute S1106.
S1107、确定第一UPIU所携带的提示类型信息为第三类型。S1107. Determine that the prompt type information carried by the first UPIU is the third type.
在下述场景三时,UFS设备(device)可以确定第一UPIU所携带的提示类型信息为第三类型。In the following scenario three, the UFS device (device) may determine that the prompt type information carried by the first UPIU is the third type.
场景三scene three
当UFS设备(device)的未完成的提示(hint outstanding)已耗尽,且UFS设备(device)在需要发送第一UPIU时,已准备好后续待发送的第二UPIU的数据或空间,将第三类型填充到第一UPIU的提示(hint)域的提示类型域段When the unfinished prompt (hint outstanding) of the UFS device (device) has been exhausted, and the UFS device (device) has prepared the data or space of the second UPIU to be sent later when it needs to send the first UPIU, send the second UPIU Three types of hint type fields filled into the hint (hint) field of the first UPIU
执行完S1107之后,可以执行S1108。After S1107 is executed, S1108 may be executed.
S1108、UFS设备(device)发送第一UPIU。S1108. The UFS device (device) sends the first UPIU.
本实施例,UFS设备(device)在需要发送第一UPIU时,根据后续待发送的第二UPIU的数据或空间是否已经准备就绪,以及UFS设备(device)的未完成的提示(hint outstanding)是否耗尽,生成差异化的提示类型信息,并填充至第一UPIU的提示(hint)域。UFS设备(device)可以针对不同场景提供差异化的提示类型信息,从而适配不同场景的数据传输需求。UFS主机(host)可以基于该提示类型信息调整高速存储器中的物理区域描述符,以提升高速存储器的命中率,以实现更优的UFS数据吞吐率,有益于提升数据读写性能。In this embodiment, when the UFS device (device) needs to send the first UPIU, it depends on whether the data or space of the second UPIU to be sent is ready, and whether the unfinished hint (hint outstanding) of the UFS device (device) is Exhausted, generate differentiated hint type information, and fill in the hint (hint) field of the first UPIU. UFS devices (device) can provide differentiated prompt type information for different scenarios, so as to adapt to the data transmission requirements of different scenarios. The UFS host (host) can adjust the physical area descriptor in the high-speed memory based on the hint type information to improve the hit rate of the high-speed memory, so as to achieve a better UFS data throughput rate, which is beneficial to improve data read and write performance.
图12为本申请实施例提供的一种数据处理方法的流程图,本实施例的数据处理方法 可以由主机执行,示例性的,该主机可以是上述实施例的UFS主机(host),如图12所示,该方法可以包括:Fig. 12 is a flow chart of a data processing method provided by the embodiment of the present application. The data processing method of this embodiment can be executed by a host. Exemplarily, the host can be the UFS host (host) of the above embodiment, as shown in FIG. 12, the method may include:
S1201、接收第一UPIU,并解析该第一UPIU,得到第一UPIU的提示(hint)信息,该提示(hint)信息包括提示类型信息。S1201. Receive a first UPIU, and parse the first UPIU to obtain hint (hint) information of the first UPIU, where the hint (hint) information includes hint type information.
示例性的,UFS主机(host)可以解析该第一UPIU,从第一UPIU的提示类型(hint type)域段得到提示类型信息。UFS主机(host)还可以从第一UPIU的提示(hint)域的其他域段,得到其他提示信息,例如,提示控制(hint control)信息、提示UPIU的标识信息、以及提示UPIU的数据缓存偏移(hint data buffer offset)等。Exemplarily, the UFS host (host) may parse the first UPIU, and obtain hint type information from a hint type (hint type) field segment of the first UPIU. The UFS host (host) can also obtain other hint information from other domain segments of the hint (hint) domain of the first UPIU, for example, hint control (hint control) information, the identification information of the hint UPIU, and the data cache offset of the hint UPIU shift (hint data buffer offset), etc.
执行S1201之后,执行S1202或S1203或S1204。After executing S1201, execute S1202 or S1203 or S1204.
S1202、若提示类型信息为第一类型,则预取第一UPIU的提示类型信息对应的物理区域描述符,并以第一优先级保存至主机的高速存储器中。S1202. If the hint type information is the first type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and save it in the high-speed memory of the host with the first priority.
该第一UPIU的提示类型信息对应的物理区域描述符是指该第一UPIU的提示类型信息所指示的UPIU(即第二UPIU)的物理区域描述符。如果该第一UPIU的提示类型信息所指示的UPIU(即第二UPIU)的物理区域描述符不在主机的高速存储器中,则预取该物理区域描述符,并以高优先级保存至高速存储器中。如果该第一UPIU的提示类型信息所指示的UPIU(即第二UPIU)的物理区域描述符已经在主机的高速存储器中,则可以采用相应策略(例如,提升物理区域描述符的活跃度等),以防止在接收到第二UPIU之前被替换出去。The physical area descriptor corresponding to the hint type information of the first UPIU refers to the physical area descriptor of the UPIU (that is, the second UPIU) indicated by the hint type information of the first UPIU. If the physical area descriptor of the UPIU (i.e. the second UPIU) indicated by the hint type information of the first UPIU is not in the high-speed memory of the host, then prefetch the physical area descriptor and save it in the high-speed memory with high priority . If the physical area descriptor of the UPIU (that is, the second UPIU) indicated by the prompt type information of the first UPIU is already in the high-speed memory of the host, a corresponding strategy can be adopted (for example, the activity of the physical area descriptor is increased, etc.) , to prevent being replaced until the second UPIU is received.
S1203、若提示类型信息为第二类型,则预取第一UPIU的提示类型信息对应的物理区域描述符,并以第二优先级保存至主机的高速存储器中。S1203. If the hint type information is the second type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and store it in the high-speed memory of the host with the second priority.
第二优先级低于第一优先级。The second priority is lower than the first priority.
通过S1202或S1203,UFS主机(host)的高速存储器中存储有该第一UPIU的提示类型信息所指示的UPIU(即第二UPIU)的物理区域描述符,之后,若UFS主机(host)接收到第二UPIU,则可以从高速存储器中快速获取该第二UPIU的物理区域描述符,进而根据该第二UPIU的物理区域描述符从主机的第一存储器中取出数据,或者向主机的第一存储器中写入数据。这样,可以提升数据读写性能。Through S1202 or S1203, the high-speed memory of the UFS host (host) stores the physical area descriptor of the UPIU (that is, the second UPIU) indicated by the prompt type information of the first UPIU. Afterwards, if the UFS host (host) receives The second UPIU can quickly obtain the physical area descriptor of the second UPIU from the high-speed memory, and then fetch data from the first memory of the host according to the physical area descriptor of the second UPIU, or send data to the first memory of the host Write data in. In this way, data read and write performance can be improved.
UFS主机(host)的高速存储器中存储的该物理区域描述符,与第一UPIU的提示信息对应。该提示信息包括但不限于提示UPIU的标识信息、或提示UPIU的数据缓存偏移(hint data buffer offset)等一项或多项。之后,UFS主机(host)接收到第二UPIU,可以使用第二UPIU的标识信息、或第二UPIU的数据缓存偏移(data buffer offset)等一项或多项作为索引,从高速存储器中快速获取该第二UPIU的物理区域描述符。The physical area descriptor stored in the high-speed memory of the UFS host (host) corresponds to the prompt information of the first UPIU. The prompt information includes, but is not limited to, one or more items such as prompting UPIU identification information, or prompting UPIU data buffer offset (hint data buffer offset). Afterwards, the UFS host (host) receives the second UPIU, and can use one or more items such as the identification information of the second UPIU or the data buffer offset (data buffer offset) of the second UPIU as an index to quickly retrieve the data from the high-speed memory. Obtain the physical area descriptor of the second UPIU.
S1204、若提示类型信息为第三类型,删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项。S1204. If the prompt type information is the third type, delete at least one item of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host.
UFS主机(host)根据该第三类型的指示,删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项,以释放UFS设备(device)的未完成的提示(hint outstanding),从而可以使用释放后的未完成的提示(hint outstanding)发送其他已准备好的UPIU的提示(hint)信息。The UFS host (host) deletes at least one of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host according to the third type of instruction, so as to Release the unfinished hint (hint outstanding) of the UFS device (device), so that the unfinished hint (hint outstanding) after release can be used to send other hints (hint) information of the prepared UPIU.
本实施例,UFS主机(host)可以基于提示类型信息调整高速存储器中的物理区域描述符,以提升高速存储器的命中率,以实现更优的UFS数据吞吐率,有益于提升数据读写性能。In this embodiment, the UFS host (host) can adjust the physical area descriptor in the high-speed memory based on the hint type information to improve the hit rate of the high-speed memory, so as to achieve a better UFS data throughput rate, which is beneficial to improving data read and write performance.
基于上述相类似的技术构思,本申请实施例提供了一种数据处理的装置,该数据处理的装置可以是前述实施例方法中任一可能的设计方案中存储设备,例如,UFS设备,该数据处理的装置包括上述所提供的数据处理方法中,用于执行存储设备所进行的方法步骤或操作或行为的相应的至少一个单元。其中,该至少一个单元的设置,可以与存储设备进行的方法步骤或操作或行为具有一一对应的关系。这些单元可以是由计算机程序实现,也可以由硬件电路实现,还可以是用计算机程序结合硬件电路的方式来实现。Based on the above-mentioned similar technical concept, the embodiment of the present application provides a data processing device, which can be a storage device in any possible design scheme of the method of the foregoing embodiment, for example, a UFS device, the data The apparatus for processing includes at least one corresponding unit for executing the method steps or operations or behaviors performed by the storage device in the data processing method provided above. Wherein, the setting of the at least one unit may have a one-to-one correspondence with the method steps or operations or behaviors performed by the storage device. These units may be realized by computer programs, hardware circuits, or a combination of computer programs and hardware circuits.
根据前述方法,图13为本申请实施例提供的数据处理的装置1300的示意图。According to the foregoing method, FIG. 13 is a schematic diagram of a data processing apparatus 1300 provided in an embodiment of the present application.
其中,该数据处理的装置1300可以为芯片或电路,比如可设置于电子设备的芯片或电路。Wherein, the data processing apparatus 1300 may be a chip or a circuit, such as a chip or a circuit that may be provided in an electronic device.
该数据处理的装置1300可以包括UPIU生成单元1310和收发单元1330。The data processing apparatus 1300 may include a UPIU generation unit 1310 and a transceiver unit 1330 .
该UPIU生成单元1310,用于生成第一通用闪存存储UFS协议信息单元UPIU,该第一UPIU包括提示类型信息和该第一UPIU的描述信息,该提示类型信息包括第一类型、第二类型或第三类型;该第一类型用于指示第二UPIU已准备就绪,该第二类型用于指示第二UPIU未准备就绪,该第三类型用于指示删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项;该物理区域描述符用于表示UPIU对应的主机的第一存储器的位置;该第一UPIU的描述信息包括第一UPIU的标识信息和第一UPIU的数据缓存偏移;用于响应命令的多个UPIU包括第一UPIU和第二UPIU,该命令用于请求写入数据或读取数据,第一UPIU的数据缓存偏移用于表示第一UPIU在用于响应命令的多个UPIU中的位置;收发单元1330,用于发送该第一UPIU。The UPIU generation unit 1310 is configured to generate a first universal flash storage UFS protocol information unit UPIU, the first UPIU includes prompt type information and description information of the first UPIU, the prompt type information includes the first type, the second type or The third type; the first type is used to indicate that the second UPIU is ready, the second type is used to indicate that the second UPIU is not ready, and the third type is used to indicate the deletion of the first type indicated in the high-speed memory of the host At least one of the physical area descriptor of the UPIU or the physical area descriptor of the UPIU indicated by the second type; the physical area descriptor is used to indicate the location of the first memory of the host corresponding to the UPIU; the description of the first UPIU The information includes the identification information of the first UPIU and the data cache offset of the first UPIU; the multiple UPIUs used to respond to the command include the first UPIU and the second UPIU, and the command is used to request to write data or read data, and the first The data buffer offset of the UPIU is used to indicate the position of the first UPIU among the multiple UPIUs used to respond to the command; the transceiver unit 1330 is configured to send the first UPIU.
在一些实施例中,该UPIU生成单元1310用于:获取第一数据量和该第二UPIU的状态信息,该第一数据量包括至少一个第三UPIU各自的第一类型或第二类型所指示的第四UPIU的数据量;该至少一个第三UPIU是在发送该第一UPIU之前发送的,至少一个第四UPIU是未发送的UPIU;根据该第一数据量和该第二UPIU的状态信息,确定该第一UPIU的提示类型信息。In some embodiments, the UPIU generation unit 1310 is configured to: obtain the first data amount and the state information of the second UPIU, the first data amount includes at least one third UPIU indicated by the respective first type or second type The data amount of the fourth UPIU; the at least one third UPIU is sent before sending the first UPIU, and at least one fourth UPIU is an unsent UPIU; according to the first data amount and the state information of the second UPIU , determine the prompt type information of the first UPIU.
在一些实施例中,该UPIU生成单元1310用于:判断第一数据量是否小于第一阈值;当该第一数据量小于该第一阈值时,根据该第二UPIU的状态信息,确定该第一UPIU的提示类型信息,该提示类型信息包括第一类型或第二类型。In some embodiments, the UPIU generating unit 1310 is configured to: determine whether the first data amount is less than a first threshold; when the first data amount is less than the first threshold, determine the second UPIU according to the state information of the second UPIU A prompt type information of the UPIU, where the prompt type information includes the first type or the second type.
在一些实施例中,该UPIU生成单元1310用于:判断该第二UPIU的状态信息是否表示该第二UPIU已准备就绪;当该第二UPIU的状态信息表示该第二UPIU已准备就绪时,确定该提示类型信息为第一类型;当该第二UPIU的状态信息表示该第二UPIU未准备就绪时,确定该提示类型信息为第二类型。In some embodiments, the UPIU generating unit 1310 is configured to: determine whether the status information of the second UPIU indicates that the second UPIU is ready; when the status information of the second UPIU indicates that the second UPIU is ready, determining that the prompt type information is the first type; when the status information of the second UPIU indicates that the second UPIU is not ready, determining that the prompt type information is the second type.
在一些实施例中,该UPIU生成单元1310还用于:当该第一数据量等于该第一阈值时,确定该提示类型信息为第三类型。In some embodiments, the UPIU generating unit 1310 is further configured to: when the first data amount is equal to the first threshold, determine that the prompt type information is a third type.
在一些实施例中,该UPIU生成单元1310用于:当该第二UPIU的状态信息表示该第二UPIU已准备就绪时,确定该提示类型信息为第三类型。In some embodiments, the UPIU generating unit 1310 is configured to: determine that the prompt type information is the third type when the status information of the second UPIU indicates that the second UPIU is ready.
在一些实施例中,该第一UPIU包括:传输准备就绪RTT UPIU或读入数据UPIU。In some embodiments, the first UPIU includes: a ready-to-transmit RTT UPIU or a read-in data UPIU.
在一些实施例中,该提示类型信息位于该传输准备就绪RTT UPIU或读入数据UPIU的提示信息的保留域段。In some embodiments, the hint type information is located in the reserved field section of the hint information of the ready-to-transmit RTT UPIU or read-in data UPIU.
在一些实施例中,该UPIU生成单元1310还用于:接收命令UPIU;响应于命令UPIU,生成该第一UPIU。In some embodiments, the UPIU generating unit 1310 is further configured to: receive a command UPIU; and generate the first UPIU in response to the command UPIU.
上述实施例中的各个单元也可以称为模块或者电路或者部件。Each unit in the above-mentioned embodiments may also be called a module or a circuit or a component.
该数据处理的装置1300所涉及的与本申请实施例提供的技术方案相关的概念,解释和详细说明及其他步骤请参见前述方法或其他实施例中关于这些内容的描述,此处不做赘述。For the concepts, explanations, detailed descriptions and other steps involved in the data processing device 1300 related to the technical solutions provided by the embodiments of the present application, please refer to the foregoing methods or descriptions of these contents in other embodiments, and details are not repeated here.
基于上述相类似的技术构思,本申请实施例提供了一种数据处理的装置,该数据处理的装置可以是前述实施例方法中任一可能的设计方案中主机,例如,UFS主机,该数据处理的装置包括上述所提供的数据处理方法中,用于执行主机所进行的方法步骤或操作或行为的相应的至少一个单元。其中,该至少一个单元的设置,可以与主机进行的方法步骤或操作或行为具有一一对应的关系。这些单元可以是由计算机程序实现,也可以由硬件电路实现,还可以是用计算机程序结合硬件电路的方式来实现。Based on the above-mentioned similar technical concept, the embodiment of the present application provides a data processing device. The data processing device can be a host in any possible design scheme of the methods in the foregoing embodiments, for example, a UFS host. The data processing The device includes at least one corresponding unit for executing the method steps or operations or behaviors performed by the host in the data processing method provided above. Wherein, the configuration of the at least one unit may have a one-to-one correspondence with the method steps or operations or behaviors performed by the host. These units may be realized by computer programs, hardware circuits, or a combination of computer programs and hardware circuits.
根据前述方法,图14为本申请实施例提供的数据处理的装置1400的示意图。According to the foregoing method, FIG. 14 is a schematic diagram of a data processing apparatus 1400 provided in an embodiment of the present application.
其中,该数据处理的装置1400可以为芯片或电路,比如可设置于电子设备的芯片或电路。Wherein, the data processing apparatus 1400 may be a chip or a circuit, such as a chip or a circuit that may be provided in an electronic device.
该数据处理的装置1400可以包括UPIU处理单元1410和收发单元1430。The data processing apparatus 1400 may include a UPIU processing unit 1410 and a transceiver unit 1430 .
UPIU处理单元1410用于通过收发单元1430接收第一通用闪存存储UFS协议信息单元UPIU,该第一UPIU包括提示类型信息和该第一UPIU的描述信息,该提示类型信息包括第一类型、第二类型或第三类型;该第一类型用于指示第二UPIU已准备就绪,该第二类型用于指示第二UPIU未准备就绪,该第三类型用于指示删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项;该物理区域描述符用于表示该UPIU对应的主机的第一存储器的位置;该第一UPIU的描述信息包括第一UPIU的标识信息和第一UPIU的数据缓存偏移;用于响应命令的多个UPIU包括该第一UPIU和该第二UPIU,该命令用于请求写入数据或读取数据,该第一UPIU的数据缓存偏移用于表示该第一UPIU在用于响应命令的多个UPIU中的位置;UPIU处理单元1410还用于根据该提示类型信息,调整主机的高速存储器中的物理区域描述符。The UPIU processing unit 1410 is configured to receive the first universal flash storage UFS protocol information unit UPIU through the transceiver unit 1430, the first UPIU includes prompt type information and description information of the first UPIU, the prompt type information includes the first type, the second type or the third type; the first type is used to indicate that the second UPIU is ready, the second type is used to indicate that the second UPIU is not ready, and the third type is used to indicate to delete the first type in the high-speed memory of the host At least one of the physical area descriptor of the indicated UPIU or the physical area descriptor of the UPIU indicated by the second type; the physical area descriptor is used to indicate the location of the first memory of the host corresponding to the UPIU; the first The description information of UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; the multiple UPIUs used to respond to the command include the first UPIU and the second UPIU, and the command is used to request writing data or reading To fetch data, the data cache offset of the first UPIU is used to indicate the position of the first UPIU among the multiple UPIUs used to respond to the command; the UPIU processing unit 1410 is also used to adjust the high-speed memory of the host according to the prompt type information The physical region descriptor in .
一种可能的设计中,UPIU处理单元1410用于:当该提示类型信息为第一类型时,预取该第一UPIU的提示类型信息对应的物理区域描述符,并以第一优先级保存至主机的高速存储器中;当该提示类型信息为第二类型时,预取该第一UPIU的提示类型信息对应的物理区域描述符,并以第二优先级保存至主机的高速存储器中;该第二优先级低于该第一优先级;当该提示类型信息为第三类型时,删除主机的高速存储器中第一类型所指示的UPIU的物理区域描述符或第二类型所指示的UPIU的物理区域描述符中至少一项。In a possible design, the UPIU processing unit 1410 is configured to: when the hint type information is the first type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and save it to In the high-speed memory of the host; when the prompt type information is the second type, prefetch the physical area descriptor corresponding to the prompt type information of the first UPIU, and save it in the high-speed memory of the host with the second priority; the second The second priority is lower than the first priority; when the hint type information is the third type, delete the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host. At least one item in the region descriptor.
一种可能的设计中,UPIU处理单元1410还用于在接收该第一UPIU之前,通过收发单元1430接收至少一个第三UPIU,该至少一个第三UPIU各自所包括的第一类型或第二类型用于指示各自对应的第四UPIU已准备就绪或未准备就绪,该主机的高速存储器中的 物理区域描述符包括该至少一个第三UPIU各自对应的第四UPIU的物理区域描述符。In a possible design, the UPIU processing unit 1410 is further configured to receive at least one third UPIU through the transceiver unit 1430 before receiving the first UPIU, the at least one third UPIU each including the first type or the second type For indicating that the respective fourth UPIUs are ready or not ready, the physical area descriptor in the high-speed memory of the host includes the physical area descriptors of the fourth UPIUs corresponding to the at least one third UPIU.
一种可能的设计中,该第一UPIU包括:传输准备就绪RTT UPIU或读入数据UPIU。In a possible design, the first UPIU includes: ready-to-transmit RTT UPIU or read-in data UPIU.
一种可能的设计中,该提示类型信息位于该传输准备就绪RTT UPIU或读入数据UPIU的提示信息的保留域段。In a possible design, the prompt type information is located in the reserved field segment of the prompt information of the transmission ready RTT UPIU or read-in data UPIU.
该数据处理的装置1400所涉及的与本申请实施例提供的技术方案相关的概念,解释和详细说明及其他步骤请参见前述方法或其他实施例中关于这些内容的描述,此处不做赘述。For the concepts, explanations, detailed descriptions and other steps involved in the data processing device 1400 related to the technical solutions provided by the embodiments of the present application, please refer to the foregoing methods or descriptions of these contents in other embodiments, and details are not repeated here.
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It can be understood that, in order to realize the above functions, the electronic device includes hardware and/or software modules corresponding to each function. Combining the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions in combination with the embodiments for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
图15为本申请实施例提供的电子设备1500的一种可能的组成示意图,如图15所示,该电子设备1500可以包括:主机1501和存储设备1502。FIG. 15 is a schematic diagram of a possible composition of an electronic device 1500 provided by an embodiment of the present application. As shown in FIG. 15 , the electronic device 1500 may include: a host 1501 and a storage device 1502 .
其中,存储设备1502可以用于支持电子设备1500执行上述方法实施例中存储设备所执行的步骤,例如上述S701和S702、S1001和S1002、或S1101至S1108等,和/或用于本文所描述的技术的其他过程。Among them, the storage device 1502 can be used to support the electronic device 1500 to execute the steps performed by the storage device in the above method embodiments, such as the above-mentioned S701 and S702, S1001 and S1002, or S1101 to S1108, etc., and/or for the steps described herein other processes of technology.
主机1501可以用于支持电子设备1500上述方法实施例中主机所执行的步骤,例如执行上述S703、S1201至S1204等,和/或用于本文所描述的技术的其他过程。The host 1501 may be used to support the steps performed by the host in the above-mentioned method embodiments of the electronic device 1500, for example, perform the above-mentioned S703, S1201 to S1204, etc., and/or other processes for the technologies described herein.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that all relevant content of the steps involved in the above method embodiments can be referred to the function description of the corresponding function module, and will not be repeated here.
本实施例提供的电子设备,用于执行上述数据处理方法,因此可以达到与上述实现方法相同的效果。The electronic device provided in this embodiment is used to execute the above data processing method, so it can achieve the same effect as the above implementation method.
可以理解的,电子设备1500可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件,或软件和硬件的组合实现。例如,电子设备1500还可以包括射频电路、蓝牙芯片、Wi-Fi芯片等,本申请实施例不一一举例说明。It can be understood that the electronic device 1500 may include more or fewer components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware. For example, the electronic device 1500 may also include a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc., and this embodiment of the present application does not illustrate one by one.
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在存储设备上运行时,使得存储设备执行上述相关方法步骤实现上述实施例中的数据处理方法。This embodiment also provides a computer storage medium, in which computer instructions are stored, and when the computer instructions are run on the storage device, the storage device is made to execute the above-mentioned relevant method steps to implement the data processing method in the above-mentioned embodiment.
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在主机上运行时,使得主机执行上述相关方法步骤实现上述实施例中的数据处理方法。This embodiment also provides a computer storage medium, in which computer instructions are stored, and when the computer instructions are run on the host, the host executes the above related method steps to implement the data processing method in the above embodiments.
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的数据处理方法。This embodiment also provides a computer program product, which, when running on a computer, causes the computer to execute the above related steps, so as to implement the data processing method in the above embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行 时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的数据处理方法。In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the data processing methods in the foregoing method embodiments.
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the corresponding method provided above The beneficial effects in the method will not be repeated here.
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned by different Completion of functional modules means that the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned by different Completion of functional modules means that the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or It may be integrated into another device, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。A unit described as a separate component may or may not be physically separated, and a component shown as a unit may be one physical unit or multiple physical units, which may be located in one place or distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, 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.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If an 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 readable storage medium. Based on this understanding, the technical solution of the embodiment 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 a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods in various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk.

Claims (29)

  1. 一种数据处理方法,其特征在于,所述方法包括:A data processing method, characterized in that the method comprises:
    生成第一通用闪存存储UFS协议信息单元UPIU,所述第一UPIU包括提示类型信息和所述第一UPIU的描述信息,所述提示类型信息包括第一类型、第二类型或第三类型;所述第一类型用于指示第二UPIU已准备就绪,所述第二类型用于指示第二UPIU未准备就绪,所述第三类型用于指示删除主机的高速存储器中所述第一类型所指示的UPIU的物理区域描述符或所述第二类型所指示的UPIU的物理区域描述符中至少一项;所述物理区域描述符用于表示所述UPIU对应的主机的第一存储器的位置;所述第一UPIU的描述信息包括所述第一UPIU的标识信息和所述第一UPIU的数据缓存偏移;所述第一UPIU的数据缓存偏移用于表示所述第一UPIU在用于响应命令的多个UPIU中的位置,所述命令用于请求写入数据或读取数据;Generate the first universal flash storage UFS protocol information unit UPIU, the first UPIU includes prompt type information and description information of the first UPIU, the prompt type information includes the first type, the second type or the third type; The first type is used to indicate that the second UPIU is ready, the second type is used to indicate that the second UPIU is not ready, and the third type is used to indicate that the first type indicated in the high-speed memory of the host is deleted. At least one of the physical area descriptor of the UPIU or the physical area descriptor of the UPIU indicated by the second type; the physical area descriptor is used to indicate the location of the first memory of the host corresponding to the UPIU; The description information of the first UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; the data cache offset of the first UPIU is used to indicate that the first UPIU is used for response A location in a plurality of UPIUs for a command requesting to write data or to read data;
    发送所述第一UPIU。Send the first UPIU.
  2. 根据权利要求1所述的方法,其特征在于,所述生成第一通用闪存存储UFS协议信息单元UPIU,包括:The method according to claim 1, wherein said generating the first universal flash storage UFS protocol information unit UPIU includes:
    获取第一数据量和所述第二UPIU的状态信息,所述第一数据量是当前已发送提示信息,但未发送所述提示信息所指示的UPIU的数据量;Obtaining the first data volume and the state information of the second UPIU, the first data volume is the data volume of the UPIU indicated by the prompt information that has not been sent yet;
    根据所述第一数据量和所述第二UPIU的状态信息,确定所述第一UPIU的提示类型信息。Determine prompt type information of the first UPIU according to the first data amount and the state information of the second UPIU.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述第一数据量和所述第二UPIU的状态信息,确定所述第一UPIU的提示类型信息,包括:The method according to claim 2, wherein the determining the prompt type information of the first UPIU according to the first amount of data and the state information of the second UPIU includes:
    判断所述第一数据量是否小于第一阈值;judging whether the first amount of data is smaller than a first threshold;
    当所述第一数据量小于所述第一阈值时,根据所述第二UPIU的状态信息,确定所述第一UPIU的提示类型信息,所述提示类型信息包括第一类型或第二类型。When the first data amount is smaller than the first threshold, according to the state information of the second UPIU, determine prompt type information of the first UPIU, where the prompt type information includes the first type or the second type.
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述第二UPIU的状态信息,确定所述第一UPIU的提示类型信息,所述提示类型信息包括第一类型或第二类型,包括:The method according to claim 3, wherein the prompt type information of the first UPIU is determined according to the status information of the second UPIU, and the prompt type information includes the first type or the second type, include:
    判断所述第二UPIU的状态信息是否表示所述第二UPIU已准备就绪;judging whether the state information of the second UPIU indicates that the second UPIU is ready;
    当所述第二UPIU的状态信息表示所述第二UPIU已准备就绪时,确定所述提示类型信息为所述第一类型;When the state information of the second UPIU indicates that the second UPIU is ready, determining that the prompt type information is the first type;
    当所述第二UPIU的状态信息表示所述第二UPIU未准备就绪时,确定所述提示类型信息为所述第二类型。When the status information of the second UPIU indicates that the second UPIU is not ready, determine that the prompt type information is the second type.
  5. 根据权利要求3或4所述的方法,其特征在于,所述方法还包括:The method according to claim 3 or 4, wherein the method further comprises:
    当所述第一数据量等于所述第一阈值时,确定所述提示类型信息为所述第三类型。When the first data amount is equal to the first threshold, it is determined that the prompt type information is the third type.
  6. 根据权利要求5所述的方法,其特征在于,所述确定所述提示类型信息为所述第三类型,包括:The method according to claim 5, wherein the determining that the prompt type information is the third type comprises:
    当所述第二UPIU的状态信息表示所述第二UPIU已准备就绪时,确定所述提示类型信息为所述第三类型。When the status information of the second UPIU indicates that the second UPIU is ready, determine that the prompt type information is the third type.
  7. 根据权利要求1至6任一项所述的方法,其特征在于,所述第一UPIU包括:传输准备就绪RTT UPIU或读入数据UPIU。The method according to any one of claims 1 to 6, wherein the first UPIU comprises: ready for transmission RTT UPIU or read-in data UPIU.
  8. 根据权利要求7所述的方法,其特征在于,所述提示类型信息位于所述RTT UPIU 或读入数据UPIU的提示信息的保留域段。The method according to claim 7, wherein the prompt type information is located in the reserved field segment of the prompt information of the RTT UPIU or the read-in data UPIU.
  9. 根据权利要求1至8任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 8, further comprising:
    接收命令UPIU;Receive command UPIU;
    响应于所述命令UPIU,生成所述第一UPIU。The first UPIU is generated in response to the command UPIU.
  10. 一种数据处理方法,其特征在于,所述方法包括:A data processing method, characterized in that the method comprises:
    接收第一通用闪存存储UFS协议信息单元UPIU,所述第一UPIU包括提示类型信息和所述第一UPIU的描述信息,所述提示类型信息包括第一类型、第二类型或第三类型;所述第一类型用于指示第二UPIU已准备就绪,所述第二类型用于指示第二UPIU未准备就绪,所述第三类型用于指示删除主机的高速存储器中所述第一类型所指示的UPIU的物理区域描述符或所述第二类型所指示的UPIU的物理区域描述符中至少一项;所述物理区域描述符用于表示所述UPIU对应的主机的第一存储器的位置;所述第一UPIU的描述信息包括所述第一UPIU的标识信息和所述第一UPIU的数据缓存偏移;所述第一UPIU的数据缓存偏移用于表示所述第一UPIU在用于响应命令的多个UPIU中的位置,所述命令用于请求写入数据或读取数据;Receive the first universal flash storage UFS protocol information unit UPIU, the first UPIU includes prompt type information and description information of the first UPIU, the prompt type information includes the first type, the second type or the third type; The first type is used to indicate that the second UPIU is ready, the second type is used to indicate that the second UPIU is not ready, and the third type is used to indicate that the first type indicated in the high-speed memory of the host is deleted. At least one of the physical area descriptor of the UPIU or the physical area descriptor of the UPIU indicated by the second type; the physical area descriptor is used to indicate the location of the first memory of the host corresponding to the UPIU; The description information of the first UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; the data cache offset of the first UPIU is used to indicate that the first UPIU is used for response A location in a plurality of UPIUs for a command requesting to write data or to read data;
    根据所述提示类型信息,调整主机的高速存储器中的物理区域描述符。According to the hint type information, the physical area descriptor in the high-speed memory of the host is adjusted.
  11. 根据权利要求10所述的方法,其特征在于,所述根据所述提示类型信息,调整主机的高速存储器中的物理区域描述符,包括:The method according to claim 10, wherein the adjusting the physical area descriptor in the high-speed memory of the host according to the prompt type information comprises:
    当所述提示类型信息为所述第一类型时,预取所述第一UPIU的提示类型信息对应的物理区域描述符,并以第一优先级保存至主机的高速存储器中;When the hint type information is the first type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and save it in the high-speed memory of the host with the first priority;
    当所述提示类型信息为所述第二类型时,预取所述第一UPIU的提示类型信息对应的物理区域描述符,并以第二优先级保存至主机的高速存储器中;所述第二优先级低于所述第一优先级;When the hint type information is the second type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and save it in the high-speed memory of the host with the second priority; the second a priority lower than said first priority;
    当所述提示类型信息为第三类型时,删除主机的高速存储器中所述第一类型所指示的UPIU的物理区域描述符或所述第二类型所指示的UPIU的物理区域描述符中至少一项。When the prompt type information is the third type, delete at least one of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory of the host item.
  12. 根据权利要求10或11所述的方法,其特征在于,所述第一UPIU包括:传输准备就绪RTT UPIU或读入数据UPIU。The method according to claim 10 or 11, wherein the first UPIU comprises: ready for transmission RTT UPIU or read-in data UPIU.
  13. 根据权利要求12所述的方法,其特征在于,所述提示类型信息位于所述传输准备就绪RTT UPIU或读入数据UPIU的提示信息的保留域段。The method according to claim 12, wherein the prompt type information is located in the reserved field segment of the prompt information of the transmission ready RTT UPIU or read-in data UPIU.
  14. 一种数据处理的装置,其特征在于,所述装置包括:控制器和传输接口;A data processing device, characterized in that the device includes: a controller and a transmission interface;
    所述控制器,用于生成第一通用闪存存储UFS协议信息单元UPIU,所述第一UPIU包括提示类型信息和所述第一UPIU的描述信息,所述提示类型信息包括第一类型、第二类型或第三类型;所述第一类型用于指示第二UPIU已准备就绪,所述第二类型用于指示第二UPIU未准备就绪,所述第三类型用于指示删除主机的高速存储器中所述第一类型所指示的UPIU的物理区域描述符或所述第二类型所指示的UPIU的物理区域描述符中至少一项;所述物理区域描述符用于表示所述UPIU对应的主机的第一存储器的位置;所述第一UPIU的描述信息包括所述第一UPIU的标识信息和所述第一UPIU的数据缓存偏移;所述第一UPIU的数据缓存偏移用于表示所述第一UPIU在用于响应命令的多个UPIU中 的位置,所述命令用于请求写入数据或读取数据;The controller is configured to generate a first universal flash storage UFS protocol information unit UPIU, the first UPIU includes hint type information and description information of the first UPIU, the hint type information includes first type, second type or the third type; the first type is used to indicate that the second UPIU is ready, the second type is used to indicate that the second UPIU is not ready, and the third type is used to indicate deletion of the host's high-speed memory At least one of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type; the physical area descriptor is used to indicate the host corresponding to the UPIU The location of the first memory; the description information of the first UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; the data cache offset of the first UPIU is used to represent the the position of the first UPIU among the plurality of UPIUs for responding to a command requesting to write data or to read data;
    所述控制器,还用于通过所述传输接口发送所述第一UPIU。The controller is further configured to send the first UPIU through the transmission interface.
  15. 根据权利要求14所述的装置,其特征在于,所述控制器用于:获取第一数据量和所述第二UPIU的状态信息,所述第一数据量是当前已发送提示信息,但未发送所述提示信息所指示的UPIU的数据量;根据所述第一数据量和所述第二UPIU的状态信息,确定所述第一UPIU的提示类型信息。The device according to claim 14, wherein the controller is configured to: obtain the first data volume and the status information of the second UPIU, the first data volume is currently sent prompt information, but not sent The data amount of the UPIU indicated by the prompt information; according to the first data amount and the state information of the second UPIU, determine the prompt type information of the first UPIU.
  16. 根据权利要求15所述的装置,其特征在于,所述控制器用于:The device according to claim 15, wherein the controller is used for:
    判断第一数据量是否小于第一阈值;judging whether the first amount of data is smaller than a first threshold;
    当所述第一数据量小于所述第一阈值时,根据所述第二UPIU的状态信息,确定所述第一UPIU的提示类型信息,所述提示类型信息包括第一类型或第二类型。When the first data amount is smaller than the first threshold, according to the state information of the second UPIU, determine prompt type information of the first UPIU, where the prompt type information includes the first type or the second type.
  17. 根据权利要求16所述的装置,其特征在于,所述控制器用于:The device according to claim 16, wherein the controller is used for:
    判断所述第二UPIU的状态信息是否表示所述第二UPIU已准备就绪;judging whether the state information of the second UPIU indicates that the second UPIU is ready;
    当所述第二UPIU的状态信息表示所述第二UPIU已准备就绪时,确定所述提示类型信息为所述第一类型;When the state information of the second UPIU indicates that the second UPIU is ready, determining that the prompt type information is the first type;
    当所述第二UPIU的状态信息表示所述第二UPIU未准备就绪时,确定所述提示类型信息为所述第二类型。When the status information of the second UPIU indicates that the second UPIU is not ready, determine that the prompt type information is the second type.
  18. 根据权利要求16或17所述的装置,其特征在于,所述控制器还用于:当所述第一数据量等于所述第一阈值时,确定所述提示类型信息为所述第三类型。The device according to claim 16 or 17, wherein the controller is further configured to: when the first data amount is equal to the first threshold, determine that the prompt type information is the third type .
  19. 根据权利要求18所述的装置,其特征在于,所述控制器用于:当所述第二UPIU的状态信息表示所述第二UPIU已准备就绪时,确定所述提示类型信息为所述第三类型。The device according to claim 18, wherein the controller is configured to: when the status information of the second UPIU indicates that the second UPIU is ready, determine that the prompt type information is the third type.
  20. 根据权利要求14至19任一项所述的装置,其特征在于,所述第一UPIU包括:传输准备就绪RTT UPIU或读入数据UPIU。The device according to any one of claims 14 to 19, wherein the first UPIU includes: ready for transmission RTT UPIU or read-in data UPIU.
  21. 根据权利要求20所述的装置,其特征在于,所述提示类型信息位于所述传输准备就绪RTT UPIU或读入数据UPIU的提示信息的保留域段。The device according to claim 20, wherein the prompt type information is located in the reserved field segment of the prompt information of the transmission ready RTT UPIU or the read-in data UPIU.
  22. 根据权利要求14至21任一项所述的装置,其特征在于,所述控制器还用于:The device according to any one of claims 14 to 21, wherein the controller is further used for:
    通过所述传输接口接收命令UPIU;receiving the command UPIU through the transmission interface;
    响应于所述命令UPIU,生成所述第一UPIU。The first UPIU is generated in response to the command UPIU.
  23. 一种数据处理的装置,其特征在于,所述装置包括:传输接口、控制器、高速存储器和第一存储器;A device for data processing, characterized in that the device includes: a transmission interface, a controller, a high-speed memory, and a first memory;
    所述控制器用于通过所述传输接口接收第一通用闪存存储UFS协议信息单元UPIU,所述第一UPIU包括提示类型信息和所述第一UPIU的描述信息,所述提示类型信息包括第一类型、第二类型或第三类型;所述第一类型用于指示第二UPIU已准备就绪,所述第二类型用于指示第二UPIU未准备就绪,所述第三类型用于指示删除所述高速存储器中所述第一类型所指示的UPIU的物理区域描述符或所述第二类型所指示的UPIU的物理区域描述符中至少一项;所述物理区域描述符用于表示所述UPIU对应的所述第一存储器的位置;所述第一UPIU的描述信息包括所述第一UPIU的标识信息和所述第一UPIU的数据缓存偏移;,所述第一UPIU的数据缓存偏移用于表示所述第一UPIU在用于响应命令的多个UPIU中的位置,所述命令用于请求写入数据或读取数据;The controller is configured to receive a first universal flash storage UFS protocol information unit UPIU through the transmission interface, the first UPIU includes prompt type information and description information of the first UPIU, and the prompt type information includes a first type , the second type or the third type; the first type is used to indicate that the second UPIU is ready, the second type is used to indicate that the second UPIU is not ready, and the third type is used to indicate to delete the At least one of the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory; the physical area descriptor is used to indicate that the UPIU corresponds to The location of the first memory; the description information of the first UPIU includes the identification information of the first UPIU and the data cache offset of the first UPIU; the data cache offset of the first UPIU is used To represent the position of the first UPIU among the plurality of UPIUs for responding to a command requesting to write data or to read data;
    所述控制器还用于根据所述提示类型信息,调整所述高速存储器中的物理区域描述符。The controller is further configured to adjust the physical area descriptor in the high-speed memory according to the hint type information.
  24. 根据权利要求23所述的装置,其特征在于,所述控制器用于:The device according to claim 23, wherein the controller is used for:
    当所述提示类型信息为所述第一类型时,预取所述第一UPIU的提示类型信息对应的物理区域描述符,并以第一优先级保存至所述高速存储器中;When the hint type information is the first type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and save it in the high-speed memory with the first priority;
    当所述提示类型信息为所述第二类型时,预取所述第一UPIU的提示类型信息对应的物理区域描述符,并以第二优先级保存至所述高速存储器中;所述第二优先级低于所述第一优先级;When the hint type information is the second type, prefetch the physical area descriptor corresponding to the hint type information of the first UPIU, and save it in the high-speed memory with the second priority; the second a priority lower than said first priority;
    当所述提示类型信息为所述第三类型时,删除所述高速存储器中所述第一类型所指示的UPIU的物理区域描述符或所述第二类型所指示的UPIU的物理区域描述符中至少一项。When the prompt type information is the third type, delete the physical area descriptor of the UPIU indicated by the first type or the physical area descriptor of the UPIU indicated by the second type in the high-speed memory at least one.
  25. 根据权利要求23或24所述的装置,其特征在于,所述第一UPIU包括:传输准备就绪RTT UPIU或读入数据UPIU。The device according to claim 23 or 24, wherein the first UPIU includes: ready for transmission RTT UPIU or read-in data UPIU.
  26. 根据权利要求25所述的装置,其特征在于,所述提示类型信息位于所述传输准备就绪RTT UPIU或读入数据UPIU的提示信息的保留域段。The device according to claim 25, wherein the prompt type information is located in the reserved field segment of the prompt information of the transmission ready RTT UPIU or the read-in data UPIU.
  27. 一种电子设备,其特征在于,包括:主机以及耦合于所述主机的存储设备;An electronic device, characterized by comprising: a host and a storage device coupled to the host;
    所述主机用于执行如权利要求10-13任意一项所述的方法;The host is configured to execute the method according to any one of claims 10-13;
    所述存储设备用于执行如权利要求1-9任意一项所述的方法。The storage device is used to execute the method according to any one of claims 1-9.
  28. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述权利要求1-9或10-13任意一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1-9 or 10-13 is implemented. method.
  29. 一种计算机程序产品,其特征在于,所述计算机程序产品中包括计算机程序,所述计算机程序被处理器执行时实现上述权利要求1-9或10-13任意一项所述的方法。A computer program product, characterized in that the computer program product includes a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1-9 or 10-13 is implemented.
PCT/CN2022/075186 2022-01-30 2022-01-30 Data processing method, apparatus, and electronic device WO2023142114A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2022/075186 WO2023142114A1 (en) 2022-01-30 2022-01-30 Data processing method, apparatus, and electronic device
CN202280038208.5A CN117396859A (en) 2022-01-30 2022-01-30 Data processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/075186 WO2023142114A1 (en) 2022-01-30 2022-01-30 Data processing method, apparatus, and electronic device

Publications (1)

Publication Number Publication Date
WO2023142114A1 true WO2023142114A1 (en) 2023-08-03

Family

ID=87470234

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/075186 WO2023142114A1 (en) 2022-01-30 2022-01-30 Data processing method, apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN117396859A (en)
WO (1) WO2023142114A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104951402A (en) * 2014-03-26 2015-09-30 三星电子株式会社 Storage device and operating method of storage device
CN109697026A (en) * 2017-10-24 2019-04-30 三星电子株式会社 The storage system of storage equipment including host equipment and for executing clear operation
US20190317690A1 (en) * 2018-04-13 2019-10-17 Renesas Electronics Corporation Semiconductor device and ufs system
CN111258932A (en) * 2020-01-09 2020-06-09 厦门鑫忆讯科技有限公司 Method for accelerating UFS protocol processing and storage controller
CN111539043A (en) * 2018-12-31 2020-08-14 美光科技公司 System for providing access to protected memory

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104951402A (en) * 2014-03-26 2015-09-30 三星电子株式会社 Storage device and operating method of storage device
CN109697026A (en) * 2017-10-24 2019-04-30 三星电子株式会社 The storage system of storage equipment including host equipment and for executing clear operation
US20190317690A1 (en) * 2018-04-13 2019-10-17 Renesas Electronics Corporation Semiconductor device and ufs system
CN111539043A (en) * 2018-12-31 2020-08-14 美光科技公司 System for providing access to protected memory
CN111258932A (en) * 2020-01-09 2020-06-09 厦门鑫忆讯科技有限公司 Method for accelerating UFS protocol processing and storage controller

Also Published As

Publication number Publication date
CN117396859A (en) 2024-01-12

Similar Documents

Publication Publication Date Title
JP6796304B2 (en) Final level cache system and corresponding methods
KR102308777B1 (en) Non-volatile memory system and operating method of non-volatile memory system
EP2795470B1 (en) Apparatus and method to provide cache move with non-volatile mass memory system
EP2248023B1 (en) Extended utilization area for a memory device
US9223707B2 (en) Mobile memory cache read optimization
US9164804B2 (en) Virtual memory module
WO2018232736A1 (en) Memory access technology and computer system
EP3506075A1 (en) Mass storage device capable of fine grained read and/or write operations
CN109508301A (en) Terminal, using the processing method of data, data processing equipment and storage medium
CN113032293A (en) Cache manager and control component
US10318418B2 (en) Data storage in a mobile device with embedded mass storage device
JP2021501941A (en) Memory block reclaim method and memory block reclaim device
KR20210121994A (en) Command optimization through intelligent threshold detection
CN110543433A (en) Data migration method and device of hybrid memory
WO2023142114A1 (en) Data processing method, apparatus, and electronic device
CN116149554B (en) RISC-V and extended instruction based data storage processing system and method thereof
WO2012163019A1 (en) Method for reducing power consumption of externally connected ddr of data chip and data chip system
CN110633225A (en) Apparatus and method for generating entity storage comparison table
CN113031849A (en) Direct memory access unit and control unit
CN117806570B (en) Online memory expansion method, device, equipment and storage medium
KR101175250B1 (en) NAND Flash Memory device and controller thereof, Write operation method
CN113138657A (en) Method and circuit for reducing cache access power consumption
KR20090095842A (en) Memory copy method and computer system for using the method

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: 22922940

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202280038208.5

Country of ref document: CN