Search

US-12619385-B1 - Data retrieval

US12619385B1US 12619385 B1US12619385 B1US 12619385B1US-12619385-B1

Abstract

A data storage device usually performs better when executing a sequential read command than when executing a plurality of random read commands. If the amount of data requested to be read by a plurality of random read commands in an address range is greater than a certain percentage of the address range, it may be more efficient to treat the plurality of random read commands as a sequential read command for the entire address range. After reading the entire address range, the data storage device can determine which portions of the read data should be returned in response to the plurality of random read commands.

Inventors

  • Ojasweeta Singh
  • Ramanathan Muthiah
  • Ramkumar Ramamurthy

Assignees

  • SanDisk Technologies, Inc.

Dates

Publication Date
20260505
Application Date
20241106

Claims (20)

  1. 1 . A data storage device comprising: a memory; and one or more processors, individually or in combination, configured to; receive, from a requestor, a plurality of commands to read data stored non-sequentially in an address range of the memory; determine a total size of the data requested to be read by the plurality of commands; determine a ratio of (a) the total size of the data requested to be read by the plurality of commands and (b) a total size of the address range: determine whether the ratio is greater than a threshold percentage of a total size of the address range; and in response to determining that the ratio is greater than the threshold percentage of the total size of the address range: read data stored in an entirety of the address range, wherein the data stored in the entirety of the address range comprises data requested to be read by the plurality of commands and data not requested to be read by the plurality of commands; and respond to the plurality of commands by, for each portion of the data that is read: determining whether the portion was requested by the plurality of commands; and in response to determining that the portion was requested by the plurality of commands, returning that portion to the requestor: wherein only the portions of data requested to be read by the plurality of commands are returned to the requestor.
  2. 2 . The data storage device of claim 1 , wherein the one or more processors, individually or in combination, are further configured to: in response to determining that the ratio is not greater than the threshold percentage of the total size of the address range, execute each of the plurality of commands as individual commands.
  3. 3 . The data storage device of claim 1 , wherein the requestor comprises a plurality of cores in the data storage device.
  4. 4 . The data storage device of claim 1 , wherein the requestor comprises a host in communication with the data storage device.
  5. 5 . The data storage device of claim 1 , wherein the data stored in the entirety of the address range is read also in response to determining that there is enough cache memory available to store that data.
  6. 6 . The data storage device of claim 1 , wherein the data stored in the entirety of the address range is read also in response to determining that a flash channel workload is below a workload threshold.
  7. 7 . The data storage device of claim 1 , wherein the data stored in the entirety of the address range is read also in response to determining that a decode workload is below a decode threshold.
  8. 8 . The data storage device of claim 1 , wherein the data stored in the entirety of the address range is read also in response to determining that a data-storage-device-specific parameter and/or a memory-specific parameter is satisfied.
  9. 9 . The data storage device of claim 1 , wherein the plurality of commands is consolidated from a larger set of commands, at least some of which do not belong to the address range.
  10. 10 . The data storage device of claim 1 , wherein the data storage device comprises a compute storage system with a plurality of accelerator cores.
  11. 11 . The data storage device of claim 1 , wherein the memory comprises a three-dimensional memory.
  12. 12 . A method comprising: performing in a data storage device comprising a memory: receiving a plurality of read commands that fall in one region in the memory; determining a sum of sizes of data requested to be read by the plurality of read commands; determining a ratio of (a) the sum of the sizes of data requested to be read by the plurality of read commands and (b) a total size of the region in the memory; determining whether the ratio is greater than a threshold percentage of the total size of the region in the memory; and in response to determining that the ratio is greater than the threshold percentage of the total size of the region in the memory: executing the plurality of read commands as a sequential read command for the size of the region; and for each portion of data read by executing the plurality of read commands: determining whether the portion of the data was requested by the plurality of read commands; in response to determining that the portion of the data was requested by the plurality of read commands, keeping the data; in response to determining that the portion of the data was not requested by the plurality of read commands, discarding the data.
  13. 13 . The method of claim 12 , further comprising: in response to determining that the ratio is not greater than the threshold percentage of the total size of the region in the memory, executing the plurality of read commands as individual commands.
  14. 14 . The method of claim 12 , wherein the method is performed by a controller comprising: an input-output command consolidation module; a ratio calculation module; a read command decision module; and a data validation module.
  15. 15 . The method of claim 12 , wherein the plurality of read commands is received from a plurality of cores in the data storage device.
  16. 16 . The method of claim 12 , wherein the plurality of read commands is received from a host in communication with the data storage device.
  17. 17 . The method of claim 12 , wherein the plurality of read commands is executed as a sequential read command also in response to determining that more than a threshold amount of cache memory is available.
  18. 18 . The method of claim 12 , wherein the plurality of read commands is executed as a sequential read command also in response to determining that a flash channel workload is below a workload threshold.
  19. 19 . The method of claim 12 , wherein the plurality of read commands is executed as a sequential read command also in response to determining that a decode workload is below a decode threshold.
  20. 20 . A data storage device comprising: a memory; and means for; receiving a plurality of read commands that fall in one region in the memory; determining a sum of sizes of data requested to be read by the plurality of read commands; determining a ratio of (a) the sum of the sizes of data requested to be read by the plurality of read commands and (b) a total size of the region in the memory; determining whether the ratio is greater than a threshold percentage of the total size of the region in the memory; and in response to determining that the ratio is greater than the threshold percentage of the total size of the region in the memory: executing the plurality of read commands as a sequential read command for the size of the region; and for each portion of data read by executing the plurality of read commands: determining whether the portion of the data was requested by the plurality of read commands; in response to determining that the portion of the data was requested by the plurality of read commands, keeping the data; in response to determining that the portion of the data was not requested by the plurality of read commands, discarding the data.

Description

BACKGROUND Various storage input-output (IO) requests from various applications in a host can be handled by a storage driver in the host, which in turn interfaces with a data storage device to write or read data. When applications run in the host, the order of the IO requests that are queued can be completely random, which can cause a mixed workload in the data storage device. The data storage device can perform well (e.g., with a relatively-high megabits per second (MBPS) throughput) when the retrieval requests are sequential in nature. This is due to less overhead in resolving the logical-to-physical (L2P) address translations associated with the data, as well as fewer memory (e.g., NAND) senses for the same amount of data retrieval requests. When the data storage device processes random data, the overheads are typically more. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1A is a block diagram of a data storage device of an embodiment. FIG. 1B is a block diagram illustrating a storage module of an embodiment. FIG. 1C is a block diagram illustrating a hierarchical storage system of an embodiment. FIG. 2A is a block diagram illustrating components of the controller of the data storage device illustrated in FIG. 1A according to an embodiment. FIG. 2B is a block diagram illustrating components of the data storage device illustrated in FIG. 1A according to an embodiment. FIG. 3 is a block diagram of a host and a data storage device of an embodiment. FIG. 4 is an illustration of a host driver of an embodiment. FIG. 5 is an illustration of a controller of an embodiment. FIGS. 6A and 6B are illustrations of a moving window of an embodiment. FIGS. 7 and 8 are flowcharts of methods performed by a host driver of an embodiment. FIGS. 9 and 10 are flowcharts of methods performed by a data storage device of an embodiment. DETAILED DESCRIPTION The following embodiments generally relate to a data storage device and method for value-proposition-based data retrieval. In one embodiment, a data storage device is provided comprising a memory and one or more processors. The one or more processors, individually or in combination, are configured to: receive a plurality of commands to read data stored non-sequentially in an address range of the memory; determine whether a total size of the data requested to be read by the plurality of commands is greater than a threshold percentage of a total size of the address range; and in response to determining that the total size of the data requested to be read by the plurality of commands is greater than the threshold percentage of the total size of the address range: read data stored in an entirety of the address range, wherein the data stored in the entirety of the address range comprises data requested to be read by the plurality of commands and data not requested to be read by the plurality of commands; and respond to the plurality of commands by returning only the data requested to be read by the plurality of commands. In another embodiment, a method is provided that is performed in a data storage device comprising a memory. The method comprises: receiving a plurality of read commands that fall in one region in the memory; determining a sum of sizes of data requested to be read by the plurality of read commands; determining a ratio of (a) the sum of the sizes of data requested to be read by the plurality of read commands and (b) a total size of the region in the memory; determining whether the ratio is greater than a threshold percentage of the total size of the region in the memory; and in response to determining that the ratio is greater than the threshold percentage of the total size of the region in the memory: executing the plurality of read commands as a sequential read command for the size of the region; and for each portion of data read by executing the plurality of read commands: determining whether the portion of the data was requested by the plurality of read commands; in response determining that the portion of the data was requested by the plurality of read commands, keeping the data; in response determining that the portion of the data was not requested by the plurality of read commands, discarding the data. In yet another embodiment, a data storage device is provided comprising: a memory; and means for executing a plurality of read commands for random data stored in an address range in memory as a sequential read command for an entirety of the address range in response to a total size of the random data requested to be read by the plurality of read commands being greater than a threshold percentage of a size of the entirety of the address range. Other embodiments are possible, and each of the embodiments can be used alone or together in combination. Accordingly, various embodiments will now be described with reference to the attached drawings. EMBODIMENTS The following embodiments relate to a data storage device (DSD). As used herein, a “data storage device” refers to a non-v