Search

US-12625647-B2 - Storage device and prefetch method thereof

US12625647B2US 12625647 B2US12625647 B2US 12625647B2US-12625647-B2

Abstract

A storage device may include a non-volatile memory configured to store one file as a plurality of file fragments, and a storage controller configured to receive a read command with respect to the plurality of file fragments from a host through UFS protocol information unit (UPIU), and perform prefetching on the plurality of file fragments based on file fragmentation information included in an extra header segment (EHS) field of the UPIU.

Inventors

  • Daejin JUNG
  • Yonghwan Song
  • Jeong-Woo Park

Assignees

  • SAMSUNG ELECTRONICS CO., LTD.

Dates

Publication Date
20260512
Application Date
20231113
Priority Date
20230602

Claims (20)

  1. 1 . A storage device, comprising: a non-volatile memory configured to store one file as a plurality of file fragments having non-consecutive addresses different from each other, each file fragment of the plurality of file fragments including a plurality of data chunks having consecutive addresses; and a storage controller configured to receive a read command with respect to the plurality of file fragments from a host through a UFS protocol information unit (UPIU), and perform prefetching on the plurality of file fragments based on file fragmentation information included in a field of the UPIU allocated as an extra header segment (EHS) field of the UPIU, the prefetching being performed consecutively on the plurality of file fragments having the non-consecutive addresses different from each other.
  2. 2 . The storage device of claim 1 , wherein the storage controller is configured to receive a plurality of read commands, determine whether the plurality of read commands are consecutive, and perform the prefetching on the plurality of file fragments in response to the plurality of read commands being consecutive.
  3. 3 . The storage device of claim 1 , wherein the EHS field includes a number of the plurality of file fragments in a first field region, includes a field size allocated to a file fragment range in a second field region, and includes the file fragment range in a third field region.
  4. 4 . The storage device of claim 3 , wherein: the first field region is before the second field region; and the second field region is after the third field region.
  5. 5 . The storage device of claim 3 , wherein: a first field region size of the first field region is greater than a second field region size of the second field region; and a third field region size of the third field region is equal to or greater than the first field region size of the first field region.
  6. 6 . The storage device of claim 1 , wherein the file fragmentation information comprises at least one of a number of the plurality of file fragments, a file fragment range, or a field size allocated to the file fragment range.
  7. 7 . The storage device of claim 6 , wherein the file fragment range comprises a start address and an end address of at least one file fragment among the plurality of file fragments.
  8. 8 . The storage device of claim 6 , wherein the file fragment range comprises a start address and a fragment size of at least one file fragment among the plurality of file fragments.
  9. 9 . The storage device of claim 6 , wherein the storage controller is configured to determine a prefetch start address and a prefetch end address based on the file fragment range and perform the prefetching based on the prefetch start address and the prefetch end address.
  10. 10 . The storage device of claim 1 , wherein: the non-volatile memory is configured to store, from among the plurality of file fragments, a first file fragment and a second file fragment that is discontinuous with the first file fragment; and the storage controller is configured to receive a first read command with respect to the first file fragment from the host, and perform prefetching on the second file fragment based on the file fragmentation information included in the first read command.
  11. 11 . The storage device of claim 10 , wherein the storage controller is configured to receive a second read command with respect to the first file fragment from the host, the second read command preceding the first read command, and perform prefetching on the first file fragment based on the file fragmentation information included in the second read command.
  12. 12 . The storage device of claim 1 , wherein the storage controller is configured to determine a size of a file fragment based on the file fragmentation information, determine a prefetch size based on the size of the file fragment, and perform the prefetching based on the prefetch size.
  13. 13 . The storage device of claim 1 , wherein the storage controller is configured to determine a prefetch size based on a chunk size of the read command, and perform the prefetching based on the prefetch size.
  14. 14 . A prefetch method, comprising: receiving a first read command and a second read command from a host through a UFS protocol information unit (UPIU); determining whether file fragmentation information included in a field of the UPIU allocated as an extra header segment (EHS) field of the UPIU of the first read command is valid in response to a first address of the first read command and a second address of the second read command being consecutive; performing a prefetch from a non-volatile memory configured to store one file as a plurality of file fragments having non-consecutive addresses different from each other, based on the file fragmentation information in response to the file fragmentation information being valid, the prefetch being performed consecutively on the plurality of file fragments having the non-consecutive addresses different from each other; and sending first data corresponding to the first read command and second data corresponding to the second read command to the host based on a prefetch result, each file fragment of the plurality of file fragments including a plurality of data chunks having consecutive addresses.
  15. 15 . The prefetch method of claim 14 , wherein the determining comprises determining that the file fragmentation information is invalid in response to the file fragmentation information including information of another prefetch that has been performed.
  16. 16 . The prefetch method of claim 15 , further comprising: determining a prefetch start address based on the file fragmentation information in response to the file fragmentation information being invalid; generating a prefetch stream based on the prefetch start address; and performing the prefetch based on the prefetch stream.
  17. 17 . The prefetch method of claim 14 , further comprising: reading the first data corresponding to the first read command and the second data corresponding to the second read command to send to the host without performing the prefetch in response to the first address of the first read command and the second address of the second read command being discontinuous.
  18. 18 . The prefetch method of claim 14 , wherein the performing the prefetch comprises: determining a prefetch start address and a prefetch end address based on the file fragmentation information; generating a prefetch stream based on the prefetch start address and the prefetch end address; and performing the prefetch based on the prefetch stream.
  19. 19 . An electronic device, comprising: a host configured to manage a plurality of fragmentation information with respect to a plurality of file fragments having consecutive addresses for one file, and generate at least one read command including the plurality of fragmentation information in an extra header segment (EHS) field; and a storage device configured to store the one file as the plurality of file fragments, perform prefetching based on the plurality of fragmentation information through a UFS protocol information unit (UPIU), and process the at least one read command according to a prefetch result, the prefetching being performed consecutively on the plurality of file fragments stored in the storage device, the plurality of file fragments having non-consecutive addresses different from each other, each file fragment of the plurality of file fragments including a plurality of data chunks having consecutive addresses.
  20. 20 . The electronic device of claim 19 , wherein: the plurality of file fragments comprises a first file fragment and a second file fragment subsequent to the first file fragment; and the host is configured to send a read command with respect to the first file fragment and send fragmentation information with respect to the second file fragment to the storage device.

Description

CROSS-REFERENCE TO RELATED APPLICATION This application claims priority under 35 U.S.C. § 119 to Korean Patent Application No. 10-2023-0071886 filed on Jun. 2, 2023 in the Korean Intellectual Property Office, the contents of which are incorporated herein by reference in their entirety. BACKGROUND (a) Field The inventive concepts relate to storage devices and prefetch methods thereof. (b) Description of the Related Art A storage system may include a host and a storage device, and the storage device may include, for example, a non-volatile memory such as a flash memory and a storage controller for controlling the non-volatile memory. The storage device may provide data stored in the non-volatile memory to a host according to the host's read command. When read commands for successive addresses are received from the host, the storage device may perform a sequential read operation on the non-volatile memory. When performing sequential read operations, the storage controller may improve read performance by prefetching data from the non-volatile memory. SUMMARY Some example embodiments may provide a storage device and a prefetch method thereof capable of enhancing read performance by consecutively prefetching a plurality of file fragments. According to some example embodiments, a storage device may include a non-volatile memory configured to store one file as a plurality of file fragments, and a storage controller configured to receive a read command with respect to the plurality of file fragments from a host through UFS protocol information unit (UPIU), and perform prefetching on the plurality of file fragments based on file fragmentation information included in an extra header segment (EHS) field of the UPIU. According to some example embodiments, a prefetch method may include receiving a first read command and a second read command from a host, determining whether file fragmentation information of the first read command is valid in response to an address of the first read command and an address of the second read command being consecutive, performing a prefetch based on the file fragmentation information in response to the file fragmentation information being valid, and sending data corresponding to the first read command and data corresponding to the second read command to the host based on a prefetch result. According to some example embodiments, an electronic device may include a host configured to manage a plurality of fragmentation information with respect to a plurality of file fragments for one file, and generate at least one read command including the plurality of fragmentation information, and a storage device configured to perform prefetching based on the plurality of fragmentation information, and process the at least one read command according to a prefetch result. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a schematic block diagram of an electronic device according to some example embodiments. FIG. 2 shows a hierarchical structure of a host according to some example embodiments. FIG. 3 illustrates a format of a read command of a host according to some example embodiments. FIG. 4 to FIG. 9 show examples of a format of an EHS field according to some example embodiments. FIG. 10 is a block diagram of a storage controller according to some example embodiments. FIG. 11 is a flowchart for showing an operation of a storage controller according to some example embodiments. FIG. 12 is a flowchart for showing an operation of a storage controller according to some example embodiments. FIG. 13 is a flowchart for showing an operation of a storage controller according to some example embodiments. FIG. 14 is a timing diagram for showing an operation of a host and a storage controller according to some example embodiments. FIG. 15 is a timing diagram for showing an operation of a host and a storage controller according to some example embodiments. FIG. 16 is a timing diagram for showing an operation of a host and a storage controller according to some example embodiments. FIG. 17 is a graph for showing a sequential read performance of an electronic device according to some example embodiments. FIG. 18 is a schematic block diagram of a computing system according to some example embodiments. FIG. 19 is a schematic block diagram of a computing device according to some example embodiments. DETAILED DESCRIPTION In the following detailed description, example embodiments of the inventive concepts will be described more fully hereinafter with reference to the accompanying drawings, in which some example embodiments are shown. As those skilled in the art would realize, the described example embodiments may be modified in various different ways, all without departing from the spirit or scope of the present inventive concepts. Accordingly, the drawings and description are to be regarded as illustrative in nature and not restrictive. Like reference numerals designate like elements throughout the specification. The sequence o