Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
MAXIMIZING PERFORMANCE THROUGH TRAFFIC BALANCING
Document Type and Number:
WIPO Patent Application WO/2023/129204
Kind Code:
A1
Abstract:
A data storage device includes a memory device and a controller coupled to the memory device. The controller is configured to receive a plurality of fetch requests, determine a first number of requests, second number of requests, and a third number of requests of the plurality of fetch requests, and balance an execution of the first number of requests, the second number of requests, and the third number of requests so that a first ratio of the data requests to the PRP requests and a second ratio of the data requests to the HMB requests is about 1. The plurality of fetch requests includes PRP requests, HMB requests, and data requests. The first number of requests corresponds to a number of the PRP requests. The second number of requests corresponds to a number of the HMB requests. The third number of requests corresponds to a number of the data requests.

More Like This:
Inventors:
SEGEV AMIR (US)
BENISTY SHAY (US)
Application Number:
PCT/US2022/029543
Publication Date:
July 06, 2023
Filing Date:
May 17, 2022
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
WESTERN DIGITAL TECH INC (US)
International Classes:
G06F3/06
Domestic Patent References:
WO2021216783A12021-10-28
Foreign References:
US20180321945A12018-11-08
US20190155545A12019-05-23
US20190138220A12019-05-09
US20210374079A12021-12-02
Attorney, Agent or Firm:
VERSTEEG, Steven H. et al. (US)
Download PDF:
Claims:
WHAT IS CLAIMED IS:

1. A data storage device, comprising: a memory device; and a controller coupled to the memory device, the controller configured to: receive a plurality of fetch requests, wherein the plurality of fetch requests comprises PRP requests, HMB requests, and data requests; determine a first number of requests of the plurality of fetch requests, wherein the first number of requests corresponds to a number of the PRP requests; determine a second number of requests of the plurality of fetch requests, wherein the second number of requests corresponds to a number of the HMB requests; determine a third number of requests of the plurality of fetch requests, wherein the third number of requests corresponds to a number of the data requests; and balance an execution of the first number of requests, the second number of requests, and the third number of requests so that a first ratio of the data requests to the PRP requests and a second ratio of the data requests to the HMB requests is about 1.

2. The data storage device of claim 1, wherein each read request of a plurality of read requests corresponding to a fetch request of the plurality of fetch requests has a size equal to a maximum read request size (MRRS).

3. The data storage device of claim 2, wherein greater than 50% of the plurality of read requests are sequential write requests.

4. The data storage device of claim 1, wherein each read request of a plurality of read requests corresponding to a fetch request of the plurality of fetch requests has a size equal to a maximum read request size (MRRS)/2.

5. The data storage device of claim 4, wherein greater than 50% of the plurality of read requests are random write requests.

6. The data storage device of claim 1, wherein each time slot comprises a 4 KB data transmission divided by a data fetch size, and wherein the data fetch size corresponds to either a maximum read request size (MRRS) or a MRRS/2.

7. The data storage device of claim 1, wherein the controller is further configured to track latency for each fetch request to be serviced by a host device.

8. The data storage device of claim 7, wherein the controller is further configured to set a time slot based on the tracked latency.

9. The data storage device of claim 8, wherein the time slot comprises 4 KB divided by a data fetch size for the plurality of read requests, a HMB request of the plurality of HMB requests, and a PRP request for each host page size (HPS) divided by a data fetch size for the plurality of PRP requests.

10. The data storage device of claim 8, wherein the time slot is dynamic.

11. A data storage device, comprising: a memory device; and a controller coupled to the memory device, the controller configured to: initialize a plurality of variables, wherein the plurality of variables comprises command variables, PRP variables, and HMB variables, wherein: the command variables corresponds to a number of command requests; the PRP variables corresponds to a number of PRP requests; and the HMB variables correspond to a number of HMB requests; set a priority between the command variables, the PRP variables, and the HMB variables, wherein the priority corresponds to an order of fetching of command requests, PRP requests, and HMB requests; and fetch the command requests, PRP requests, and HMB requests based on the priority to achieve a first ratio of the data requests to the PRP requests and/or a second ratio of the data requests to the HMB requests, and wherein the first ratio and the second ratio are each equal to about 1.

12. The data storage device of claim 11, wherein the command variables comprises a CMD lack variable, and wherein the CMD lack variable corresponds to a number of write commands to fill a data pipeline minus a sum of a number of prefetched write commands and a number of write commands being read.

13. The data storage device of claim 11, wherein the PRP variables comprises a PRP lack variable, and wherein the PRP lack variable corresponds to an amount of pointers expected to be held in the controller based on the data pipeline minus a sum of a number of prefetched PRPs and a number of PRPs being read.

14. The data storage device of claim 11, wherein the HMB variables comprises a HMB lack variable, and wherein the HMB lack variable corresponds to an amount of HMB entries expected to be held in the controller based on the data pipeline minus a sum of a number of prefetched HMB entries and a number of HMB entries being read.

15. The data storage device of claim 11, wherein the command variables are associated with a first priority.

16. The data storage device of claim 15, wherein the PRP variables are associated with a second priority, and wherein the first priority is greater than the second priority.

17. The data storage device of claim 16, wherein the HMB variables are associated with a third priority, and wherein the second priority is greater than the third priority.

18. The data storage device of claim 11, wherein the command variables, the PRP variables, and the HMB variables are associated with same priority.

19. A data storage device, comprising: memory means; and a controller coupled to the memory means, the controller configured to: receive a plurality of requests to process data; calculate a first ratio based on a type of request of the plurality of requests, wherein the first ratio of the data requests to the PRP requests and/or the second ratio of the data requests to the HMB requests; and execute a request of the plurality of requests based on the type of request to maintain the first ratio and the second ratio, wherein the first ratio and the second ratio are each equal to about 1.

18

20. The data storage device of claim 19, wherein the executing occurs in time slots, and wherein the time slots are adjustable based on latency and type of request.

19

Description:
Maximizing Performance Through Traffic Balancing

CROSS-REFERENCE TO RELATED APPLICATION(S)

[0001] This application claims the benefit of and hereby incorporates by reference, for all purposes, the entirety of the contents of U.S. Nonprovisional Application No. 17/562,703, filed December 27, 2021, and entitled “Maximizing Performance Through Traffic Balancing.”

BACKGROUND OF THE DISCLOSURE

Field of the Disclosure

[0002] Embodiments of the present disclosure generally relate to data storage devices, such as solid state drives (SSDs), and, more specifically, balancing interface bandwidth usage.

Description of the Related Art

[0003] Non-volatile memory (NVM) express (NVMe) SSDs are coupled to a host device via an interface. The interface is used to satisfy a respective protocol, while trying to reach maximum performance. For example, if the interface is a Peripheral Component Interconnect Express (PCIe) interface, the interface is used to satisfy the PCIe protocol. In order to service commands generated by the host device and sent to the SSD, the SSD uses the interface to fetch, in a nonlimiting list, read commands, read pointers, read data, and read mapping tables.

[0004] The time between fetching the commands, pointers, data, and tables and when the relevant commands, pointers, data, and tables return to the SSD is the turnaround time. For example, a turnaround time may be about 1 ps. Because requests may not be aligned with transfers from the host device, a misbalance of fetching may occur, which may decrease the overall performance of the interface. Therefore, because of the additional fetching, the bandwidth usage of the interface may be imbalanced.

[0005] Therefore, there is a need in the art for an improved balancing of traffic across an interface of a data storage device.

SUMMARY OF THE DISCLOSURE

[0006] The present disclosure generally relates to data storage devices, such as solid state drives (SSDs), and, more specifically, balancing interface bandwidth usage. A data storage device includes a memory device and a controller coupled to the memory device. The controller is configured to receive a plurality of fetch requests, determine a first number of requests, second number of requests, and a third number of requests of the plurality of fetch requests, and balance an execution of the first number of requests, the second number of requests, and the third number of requests so that a first ratio of the data requests to the PRP requests and a second ratio of the data requests to the HMB requests is about 1. The plurality of fetch requests includes PRP requests, HMB requests, and data requests. The first number of requests corresponds to a number of the PRP requests. The second number of requests corresponds to a number of the HMB requests. The third number of requests corresponds to a number of the data requests.

[0007] In one embodiment, a data storage device includes a memory device and a controller coupled to the memory device. The controller is configured to receive a plurality of fetch requests, where the plurality of fetch requests comprises PRP requests, HMB requests, and data requests, determine a first number of requests of the plurality of fetch requests, where the first number of requests corresponds to a number of the PRP requests, determine a second number of requests of the plurality of fetch requests, where the second number of requests corresponds to a number of the HMB requests, determine a third number of requests of the plurality of fetch requests, where the third number of requests corresponds to a number of the data requests, and balance an execution of the first number of requests, the second number of requests, and the third number of requests so that a first ratio of the data requests to the PRP requests and a second ratio of the data requests to the HMB requests is about 1.

[0008] In another embodiment, a data storage device includes a memory device and a controller coupled to the memory device. The controller is configured to initialize a plurality of variables, where the plurality of variables comprises command variables, PRP variables, and HMB variables, where the command variables corresponds to a number of command requests, the PRP variables corresponds to a number of PRP requests, and the HMB variables correspond to a number of HMB requests, set a priority between the command variables, the PRP variables, and the HMB variables, where the priority corresponds to an order of fetching of command requests, PRP requests, and HMB requests, and fetch the command requests, PRP requests, and HMB requests based on the priority to achieve a first ratio of the data requests to the PRP requests and/or a second ratio of the data requests to the HMB requests, and where the first ratio and the second ratio are each equal to about 1.

[0009] In another embodiment, a data storage device includes memory means and a controller coupled to the memory means. The controller is configured to receive a plurality of requests to process data, calculate a first ratio based on a type of request of the plurality of requests, where the first ratio of the data requests to the PRP requests and/or the second ratio of the data requests to the HMB requests, and execute a request of the plurality of requests based on the type of request to maintain the first ratio and the second ratio, where the first ratio and the second ratio are each equal to about 1.

BRIEF DESCRIPTION OF THE DRAWINGS

[0010] So that the manner in which the above recited features of the present disclosure can be understood in detail, a more particular description of the disclosure, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings. It is to be noted, however, that the appended drawings illustrate only typical embodiments of this disclosure and are therefore not to be considered limiting of its scope, for the disclosure may admit to other equally effective embodiments.

[0011] Figure 1 is a schematic block diagram illustrating a storage system, in which a data storage device may function as a storage device for a host device, according to certain embodiments.

[0012] Figure 2 is a schematic block diagram illustrating a storage system that includes a controller of a data storage device interacting with a host device, according to certain embodiments.

[0013] Figure 3 is an exemplary illustration of misbalanced traffic over an interface, according to certain embodiments.

[0014] Figure 4 is a flow diagram illustrating a method of balancing traffic over a data transfer bus between an interface and a host device, according to certain embodiments.

[0015] Figure 5 is an exemplary algorithm showing the method of Figure 4, according to certain embodiments.

[0016] To facilitate understanding, identical reference numerals have been used, where possible, to designate identical elements that are common to the figures. It is contemplated that elements disclosed in one embodiment may be beneficially utilized on other embodiments without specific recitation. DETAILED DESCRIPTION

[0017] In the following, reference is made to embodiments of the disclosure. However, it should be understood that the disclosure is not limited to specifically described embodiments. Instead, any combination of the following features and elements, whether related to different embodiments or not, is contemplated to implement and practice the disclosure. Furthermore, although embodiments of the disclosure may achieve advantages over other possible solutions and/or over the prior art, whether or not a particular advantage is achieved by a given embodiment is not limiting of the disclosure. Thus, the following aspects, features, embodiments, and advantages are merely illustrative and are not considered elements or limitations of the appended claims except where explicitly recited in a claim(s). Likewise, reference to “the disclosure” shall not be construed as a generalization of any inventive subject matter disclosed herein and shall not be considered to be an element or limitation of the appended claims except where explicitly recited in a claim(s).

[0018] The present disclosure generally relates to data storage devices, such as solid state drives (SSDs), and, more specifically, balancing interface bandwidth usage. A data storage device includes a memory device and a controller coupled to the memory device. The controller is configured to receive a plurality of fetch requests, determine a first number of requests, second number of requests, and a third number of requests of the plurality of fetch requests, and balance an execution of the first number of requests, the second number of requests, and the third number of requests so that a first ratio of the data requests to the PRP requests and a second ratio of the data requests to the HMB requests is about 1. The plurality of fetch requests includes PRP requests, HMB requests, and data requests. The first number of requests corresponds to a number of the PRP requests. The second number of requests corresponds to a number of the HMB requests. The third number of requests corresponds to a number of the data requests.

[0019] Figure 1 is a schematic block diagram illustrating a storage system 100, in which a host device 104 is in communication with a data storage device 106, according to certain embodiments. For instance, the host device 104 may utilize a non-volatile memory (NVM) 110 included in data storage device 106 to store and retrieve data. The host device 104 comprises a host DRAM 138. In some examples, the storage system 100 may include a plurality of storage devices, such as the data storage device 106, which may operate as a storage array. For instance, the storage system 100 may include a plurality of data storage devices 106 configured as a redundant array of inexpensive/independent disks (RAID) that collectively function as a mass storage device for the host device 104. [0020] The host device 104 may store and/or retrieve data to and/or from one or more storage devices, such as the data storage device 106. As illustrated in Figure 1, the host device 104 may communicate with the data storage device 106 via an interface 114. The host device 104 may comprise any of a wide range of devices, including computer servers, network-attached storage (NAS) units, desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called “smart” phones, so-called “smart” pads, televisions, cameras, display devices, digital media players, video gaming consoles, video streaming device, or other devices capable of sending or receiving data from a data storage device.

[0021] The data storage device 106 includes a controller 108, NVM 110, a power supply 111, volatile memory 112, the interface 114, and a write buffer 116. In some examples, the data storage device 106 may include additional components not shown in Figure 1 for the sake of clarity. For example, the data storage device 106 may include a printed circuit board (PCB) to which components of the data storage device 106 are mechanically attached and which includes electrically conductive traces that electrically interconnect components of the data storage device 106 or the like. In some examples, the physical dimensions and connector configurations of the data storage device 106 may conform to one or more standard form factors. Some example standard form factors include, but are not limited to, 3.5” data storage device (e.g., an HDD or SSD), 2.5” data storage device, 1.8” data storage device, peripheral component interconnect (PCI), PCI-extended (PCI-X), PCI Express (PCIe) (e g., PCIe xl, x4, x8, xl6, PCIe Mini Card, MiniPCI, etc.). In some examples, the data storage device 106 may be directly coupled (e.g., directly soldered or plugged into a connector) to a motherboard of the host device 104.

[0022] Interface 114 may include one or both of a data bus for exchanging data with the host device 104 and a control bus for exchanging commands with the host device 104. Interface 114 may operate in accordance with any suitable protocol. For example, the interface 114 may operate in accordance with one or more of the following protocols: advanced technology attachment (ATA) (e.g., serial-ATA (SATA) and parallel-ATA (PATA)), Fibre Channel Protocol (FCP), small computer system interface (SCSI), serially attached SCSI (SAS), PCI, and PCIe, non-volatile memory express (NVMe), OpenCAPI, GenZ, Cache Coherent Interface Accelerator (CCIX), Open Channel SSD (OCSSD), or the like. Interface 114 (e.g., the data bus, the control bus, or both) is electrically connected to the controller 108, providing an electrical connection between the host device 104 and the controller 108, allowing data to be exchanged between the host device 104 and the controller 108. In some examples, the electrical connection of interface 114 may also permit the data storage device 106 to receive power from the host device 104. For example, as illustrated in Figure 1, the power supply 111 may receive power from the host device 104 via interface 114.

[0023] The NVM 110 may include a plurality of memory devices or memory units. NVM 110 may be configured to store and/or retrieve data. For instance, a memory unit of NVM 110 may receive data and a message from controller 108 that instructs the memory unit to store the data. Similarly, the memory unit may receive a message from controller 108 that instructs the memory unit to retrieve data. In some examples, each of the memory units may be referred to as a die. In some examples, the NVM 110 may include a plurality of dies (i.e., a plurality of memory units). In some examples, each memory unit may be configured to store relatively large amounts of data (e g., 128MB, 256MB, 512MB, 1GB, 2GB, 4GB, 8GB, 16GB, 32GB, 64GB, 128GB, 256GB, 512GB, 1TB, etc ).

[0024] In some examples, each memory unit may include any type of non-volatile memory devices, such as flash memory devices, phase-change memory (PCM) devices, resistive randomaccess memory (ReRAM) devices, magneto-resistive random-access memory (MRAM) devices, ferroelectric random-access memory (F-RAM), holographic memory devices, and any other type of non-volatile memory devices.

[0025] The NVM 110 may comprise a plurality of flash memory devices or memory units. NVM Flash memory devices may include NAND or NOR-based flash memory devices and may store data based on a charge contained in a floating gate of a transistor for each flash memory cell. In NVM flash memory devices, the flash memory device may be divided into a plurality of dies, where each die of the plurality of dies includes a plurality of physical or logical blocks, which may be further divided into a plurality of pages. Each block of the plurality of blocks within a particular memory device may include a plurality of NVM cells. Rows of NVM cells may be electrically connected using a word line to define a page of a plurality of pages. Respective cells in each of the plurality of pages may be electrically connected to respective bit lines. Furthermore, NVM flash memory devices may be 2D or 3D devices and may be single level cell (SLC), multi-level cell (MLC), triple level cell (TLC), or quad level cell (QLC). The controller 108 may write data to and read data from NVM flash memory devices at the page level and erase data from NVM flash memory devices at the block level.

[0026] The power supply 111 may provide power to one or more components of the data storage device 106. When operating in a standard mode, the power supply 111 may provide power to one or more components using power provided by an external device, such as the host device 104. For instance, the power supply 111 may provide power to the one or more components using power received from the host device 104 via interface 114. In some examples, the power supply 111 may include one or more power storage components configured to provide power to the one or more components when operating in a shutdown mode, such as where power ceases to be received from the external device. In this way, the power supply 111 may function as an onboard backup power source. Some examples of the one or more power storage components include, but are not limited to, capacitors, super-capacitors, batteries, and the like. In some examples, the amount of power that may be stored by the one or more power storage components may be a function of the cost and/or the size (e.g., area/volume) of the one or more power storage components. In other words, as the amount of power stored by the one or more power storage components increases, the cost and/or the size of the one or more power storage components also increases.

[0027] The volatile memory 112 may be used by controller 108 to store information. Volatile memory 112 may include one or more volatile memory devices. In some examples, controller 108 may use volatile memory 112 as a cache. For instance, controller 108 may store cached information in volatile memory 112 until the cached information is written to the NVM 110. As illustrated in Figure 1, volatile memory 112 may consume power received from the power supply 111. Examples of volatile memory 112 include, but are not limited to, random-access memory (RAM), dynamic random access memory (DRAM), static RAM (SRAM), and synchronous dynamic RAM (SDRAM (e g., DDR1, DDR2, DDR3, DDR3L, LPDDR3, DDR4, LPDDR4, and the like)).

[0028] Controller 108 may manage one or more operations of the data storage device 106. For instance, controller 108 may manage the reading of data from and/or the writing of data to the NVM 110. In some embodiments, when the data storage device 106 receives a write command from the host device 104, the controller 108 may initiate a data storage command to store data to the NVM 110 and monitor the progress of the data storage command. Controller 108 may determine at least one operational characteristic of the storage system 100 and store at least one operational characteristic in the NVM 110. In some embodiments, when the data storage device 106 receives a write command from the host device 104, the controller 108 temporarily stores the data associated with the write command in the internal memory or write buffer 116 before sending the data to the NVM 110.

[0029] Figure 2 is a schematic block diagram illustrating a storage system 200 that includes a controller 210 of a data storage device, such as the data storage device 106 of Figure 1, interacting with a host device 202, which may be the host device 104 of Figure 1, according to certain embodiments. The controller 210 may be the controller 108 of Figure 1. It is to be understood that the controller 210 may include additional components not shown for simplification purposes.

[0030] The host device 202 includes a host DRAM 204, which may be the host DRAM 138 of Figure 1. The host DRAM 204 includes a host memory buffer (HMB) 206. The HMB 206 is an allocated portion of the host DRAM 204 that is allocated by the host device 202 for use by the controller 210. The controller 210 may be able to use the HMB 206 without host device 202 interaction, such that the HMB 206 may be considered an extension of a DRAM of the controller 210. Thus, the controller 210 may store data, control information, and the like, which may be generally stored in the DRAM, in the HMB 206 and read data stored from the HMB 206.

[0031] The controller 210 includes a PCIe bus 212, a command fetching unit 216, a pointer fetching unit 218, a data fetching unit 220, and a tables fetching unit 222. The controller 210 may utilize the command fetching unit 216 to fetch commands generated by the host device 202, which may be stored in the host DRAM 204 or another relevant storage location, the pointer fetching unit 218 to retrieve pointers stored in the host DRAM 204 or another relevant storage location, the data fetching unit 220 to fetch data stored in the host DRAM 204 or another relevant storage location, and the tables fetching unit 222 to retrieve tables stored in the HMB or another relevant storage location. The PCIe bus 212 includes a RX buffer 214. The RX buffer 214 may be sized based on a turnaround time (e.g., the time from when a request is sent to the host device 202 and when data associated with the request is returned to the controller 210) and a speed (e.g., PCIe bus 212 latency, processor speed, and the like) of the data storage device 106. The PCIe bus 212 latency may be the host device 202 read request response time.

[0032] When a read request is sent from the PCIe bus 212, where the read request may be generated by a different component of the controller 210, such as a processor, to the host device 202, the host device 202 may attempt to access the host DRAM 204 to retrieve the request data. Accessing the host DRAM 204 and traversing through the relevant command/data paths may cause a large turnaround time.

[0033] Figure 3 is an exemplary illustration of misbalanced traffic over an interface, such as the PCIe bus 212 of the controller 210 of Figure 2, according to certain embodiments. Aspects of the storage system 200 may be referenced herein for exemplary purposes. Data, commands, and pointers may be requested and fetched from the host device 202 by the controller 210. Likewise, tables, such as logical to physical (L2P) tables may be retrieved from the HMB 206.

Furthermore, in a non-limiting example, the turnaround time may be 1 ps.

[0034] Commands sent by the host device 202 to the controller 210 may have a granularity, in a non-limiting example, of about 512 MB or about 4 KB and may include data pointers. Each data pointer may point to a host page size (HPS) worth of data. Random commands are commands that have a size up to the HPS. Therefore, for a random write, the controller 210 may not be required to fetch additional physical region page (PRP) pointers (e.g., data pointers) because the entire data range may be described in the command structure itself. Sequential commands may require additional fetching of data pointers as the data range exceeds the HPS. Furthermore, when data pointers are not aligned with a boundary of the data pointer granularity (e.g., about 512 MB or about 4 KB), the controller 210 may issue read requests in a manner to align the data pointers to the boundaries of the data point granularity. For example, for a command of 4 KB, a starting at offset of 512 MB, and a MRRS of 1 KB, the controller 210 may issue the following read requests: Tr#l: 512 MB - 1 KB, Tr#2: 1 KB - 2 KB, Tr#3: 2 KB - 3 KB, Tr#4: 3 KB - 4 KB, and Tr#5: 4 KB - 4.5KB. Therefore, each read request is aligned with a boundary of the data pointer granularity. Time slicing is the time for 4 KB worth of data to be transferred over the PCIe bus 212. For example, transferring 4 KB over the PCIe bus 212 may take 250 ns.

[0035] Before time 0 ps, the controller 210 has a write command (received from the host device 202) (e.g., command 1) with a size of 32 KB. In order to program the data to a target memory device, such as the NVM 110 of Figure 1, the controller 210 needs to read the data from the host device 202. In other words, for each write request received by the controller 210, the controller 210 sends a read request back to the host device 202 for the relevant data. Therefore, the controller 210 requests the 32 KB of data from the host device 202 at time 0 ps. However, there may be a maximum read request size (MRRS). For example, the MRRS may be 1 KB. The MRRS is the maximum number of bytes that the controller 210 may request to fetch in a single read request. Each read request takes up bandwidth of the data transfer bus, where the bus is from the controller 210 to the host device 202 direction. Therefore, the controller 210 may attempt to make the read requests sent to the host device 202 as large as possible. Otherwise, the read requests may slow down the read request path.

[0036] Therefore, the 32 KB of data may be requested by the controller 210 as 32 read requests, where each read request is requesting 1 KB of data. Then, the controller 210 tries to fetch the next command (e.g., command 2) shortly after requesting the data associated with command 1. At time 1 ps, the controller 210 receives responses corresponding to the read requests sent to the host device 202 at time 0 jus. At time 3 jus, the controller 108 receives the last data of command 1. Because command 2 was requested after the read requests was sent to the host device 202, command 2 is received after the read requests have been received. Afterwards, the controller 210 sends the relevant read requests associated with command 2 and a read request for command 3 to the host device 202. At time 4 ps, the data associated with command 2 begins to be received by the controller 210 (which may be due to the 1 ps turnaround time).

[0037] Between time 3 ps and time 4 ps, there is no transferring of requests or data between the controller 210 and the host device 202. In a balanced system, there may be no downtime between data, command, or request transferring. Furthermore, in order to read data, a controller of the data storage device may need to know where the data resides on the host device, which may require pointer fetching, and know the destination of the data on the memory medium, which may require mapping table fetching. For traffic across the bus to be balanced, a ratio (DATA PRP Required ratio) of an amount of data associated with sent read requests and an amount of PRP ranges (e.g., data pointers) being requested should be equal to about 1 and/or a ratio(DATA_HMB_Required_ratio) of an amount of data associated with sent read requests and an amount of data from the tables stored in the HMB, that satisfies the amount of data of the read requests, should be equal to about 1. For example, an 8 KB read in a time slice, 2 PRPs, each having a size of about 4 KB, may be fetched in the time slice.

[0038] Figure 4 is a flow diagram illustrating a method 400 of balancing traffic over a data transfer bus between an interface, such as the PCIe bus 212 of the controller 210 of Figure 2, and a host device, such as the host device 202 of Figure 2, according to certain embodiments. Aspects of the storage system 200 of Figure 2 may be referenced herein for exemplary purposes. At block 402, variables associated with method 400 are initialized. The variables includes command variables, PRP variables, and HMB variables.

[0039] The command variables includes CMD lack, In Flight Data, Pre fetched CMD, Required_write_cmd_pool, and Write cmd ratio. The CMD lack equals Required_write_cmd_pool minus the sum of Pre fetched CMD and In flight CMD. The In Flight CMD variable is increased by the amount of data when the controller 210 issues read requests and decreased by the amount of data provided back to the controller 210 from the read requests. The Pre fetched CMD variable is increased by command length when a write command arrives to the controller 210 and decreased by the amount of data being fetched when the controller 210 issues data reads. The Required_write_cmd_pool variable is the amount of data of write commands the controller 210 needs to have to fill a data pipeline. The Write cmd ratio variable is a history of how much data associated with write commands (e.g., the host device 202 generated write commands) that was requested for a certain number of command fetches. For example, the number may be 100 commands. The Write cmd ratio variable may be dynamically updated because the number of reads and writes may change over time. In other words, the Write cmd ratio is equal to the total write data requested for a certain number of commands divided by 100. If the number of fetched commands is less than the certain number, than the total write data for the amount fetched is used.

[0040] The PRP variables includes PRP lack, In Flight PRP, Pre fetched PRP, and Required_PRP_pool. The PRP lack equals Required PRP pool minus the sum of Pre fetched PRP and In flight PRP. The In Flight CMD variable is increased by the amount of data when the controller 210 issues read requests and decreased by the amount of data provided back to the controller 210 from the read requests. The Pre fetched PRP variable is increased by the HPS value when a random write command arrives to the controller 210, increased when the controller 210 gets a response to a PRP fetching request, and decreased by the amount of data being fetched when the controller 210 issues data reads. The Required_PRP_pool variable is the amount of pointersthat the controller 210 expects to hold internally based on the data pipeline. The

[0041] The HMB variables include HMB lack, In Flight HMB, Pre fetched HMB, and Required HMB pool. The HMB lack equals Required HMB pool minus the sum of Pre fetched HMB and In flight HMB. The In Flight HMB variable is increased by 4 KB (which may vary based on HMB usage) for each HMB entry read and decreased by 4 KB for each HMB response. The Pre fetched HMB variable is increased by 4 KB when the controller 108 receives responses due to HMB fetching and decreased by the amount of data being fetched when the controller 210 issues data reads. The Required HMB pool variable is the amount of HMB entries the controller 210 expects to hold internally based on the data pipeline.

[0042] The following steps may be based on a priority system. It is contemplated that command fetching has a higher priority than PRP fetching and PRP fetching has higher priority than HMB fetching. Thus, higher priority fetching may take precedent (completed first or requested first) over lower priority fetching.

[0043] At block 404, the controller 210 determines if the CMD lack variable is greater than 0. If the CMD lack variable is greater than 0 at block 404, then the controller 210 determines the max cmd to fetch at block 406. The max cmd to fetch is equal to the integer value of CMD lack divided by the Write cmd ratio. Furthermore, if the max cmd to fetch value is greater than the max_pending_commands, then the controller 210 sets the max cmd to fetch equal to the max_pending_commands. At block 408, the controller 210 fetches the max cmd to fetch. At block 410, the controller 210 determines if the time slot is over. If the time slot is over at block 410, method 400 returns to block 402.

[0044] However, if the time slot is not over at block 410, then the controller 210 determines if the PRP lack variable is greater than 0 at block 412. If the PRP lack variable is greater than 0 at block 412, then the controller 210 determines the max PRP to fetch at block 414. The max PRP to fetch is equal to the integer value of PRP lack divided by the HPS. At block 416, the controller 210 fetches the max PRP to fetch. At block 418, the controller 210 determines if the time slot is over. If the time slot is over at block 418, method 400 returns to block 402.

[0045] However, if the time slot is not over at block 418, then the controller 210 determines if the HMB lack variable is greater than 0 at block 420. If the HMB lack variable is greater than 0 at block 420, then the controller 210 determines the max HMB to fetch at block 422. The max PRP to fetch is equal to the integer value of PRP lack divided by 4 KB. At block 424, the controller 210 fetches the max PRP to fetch. At block 426, the controller 210 determines if the time slot is over. If the time slot is over at block 426, method 400 returns to block 402.

[0046] The following steps may be based on a time sharing system, such that command fetching, PRP fetching, and HMB fetching share the time remaining in the time slot. The controller 210 may allocate time for command fetching, PRP fetching, and HMB fetching, where the time allocated results in the DATA PRP Required ratio equaling about 1 and

DATA HMB Required ratio equaling about 1. It is to be understood that there may be a range of values around 1 for each of the ratios that may be acceptable. Thus, the allocation of time may be based on achieving a ratio of 1 for either ratio or for both ratios.

[0047] However, if the time slot is not over at block 426, then the controller 210 determines the time remaining in the time slot at block 428. At block 430, the controller 210 determines if In Flight PRP is less than or equal to In Flight HMB and if In Flight PRP is less than or equal to In Flight Data. If the logical statement at block 430 is true, then the controller 210 allocates time for PRP fetching at block 432. At block 434, the controller 210 fetches the PRP pointers. Method 400 returns to block 402.

[0048] However, if the logical statement at block 430 is false, then the controller 210 determines if In Flight HMB is less than or equal to In Flight PRP and if In Flight HMB is less than or equal to In Flight Data at block 436. If the logical statement at block 436 is true, then the controller 210 allocates time for HMB fetching at block 438. At block 440, the controller 210 fetches the HMB entries. Method 400 returns to block 402.

[0049] However, if the logical statement at block 436 is false, then the controller 210 allocates time for 4 KB data fetching at block 442. At block 444, the controller 210 fetches the data in a 4 KB size. Method 400 returns to block 402.

[0050] In some examples, the controller 210 may execute the priority system of method 400 without executing the time sharing system of method 400. In other examples the controller 210 may execute the time sharing system of method 400 without executing the priority system of method 400.

[0051] Figure 5 is an exemplary algorithm 500 showing method 400 of Figure 4, according to certain embodiments. The exemplary algorithm 500 illustrates an example of balancing traffic over a data transfer bus between an interface, such as the PCIe 212 of the controller 210 of Figure 2, and a host device, such as the host device 202 of Figure 2.

[0052] In some examples, the data being fetched may be counted by the controller 210. For example, the number of fetch requests in each category (e.g., PRP fetches, HMB fetches, and data fetches) are counted. For HMB fetching and PRP fetching, each read request has a known absolute value. When the traffic over the data transfer bus is mostly random write commands, each read request has a size equal to MRRS divided by 2. When the traffic is mostly sequential write commands, each read request has a size equal MRRS. Thus, the size of the read request is the data fetch size. It is to be understood that the term “mostly” may refer to greater than 50%. Furthermore, it is to be understood that the previously listed read request size considerations may be a simplification of an embodiment. In some embodiments, the actual read request size is tracked.

[0053] Furthermore, the read request size may further be tuned based on the rate of random write commands and the rate of sequential write commands. Therefore, in each time slot, each data read request may have a size equal to a sum of 4 KB divided by the data fetch size, 1 HMB read request, and one PRP read request for each HPS/4 KB time slot. Furthermore, the time slot may be based on the latency of servicing requests by the host device 202. The controller 210 may track the latency of servicing requests by the host device 202. For example, if the latency is 250ns, then the controller 210 first fetches 4 KB of data and then fetches PRP pointers. The allocation of time for relevant fetching based on remaining time slots allows for balanced traffic over the data transfer bus.

[0054] By balancing PRP fetching, command fetching, data fetching, and HMB fetching, the performance of the data storage device may be improved.

[0055] In one embodiment, a data storage device includes a memory device and a controller coupled to the memory device. The controller is configured to receive a plurality of fetch requests, where the plurality of fetch requests comprises PRP requests, HMB requests, and data requests, determine a first number of requests of the plurality of fetch requests, where the first number of requests corresponds to a number of the PRP requests, determine a second number of requests of the plurality of fetch requests, where the second number of requests corresponds to a number of the HMB requests, determine a third number of requests of the plurality of fetch requests, where the third number of requests corresponds to a number of the data requests, and balance an execution of the first number of requests, the second number of requests, and the third number of requests so that a first ratio of the data requests to the PRP requests and a second ratio of the data requests to the HMB requests is about 1.

[0056] Each read request of a plurality of read requests corresponding to a fetch request of the plurality of fetch requests has a size equal to a maximum read request size (MRRS). Greater than 50% of the plurality of read requests are sequential write requests. Each read request of a plurality of read requests corresponding to a fetch request of the plurality of fetch requests has a size equal to a maximum read request size (MRRS)/2. Greater than 50% of the plurality of read requests are random write requests. Each time slot includes a 4 KB data transmission divided by a data fetch size. The data fetch size corresponds to either a maximum read request size (MRRS) or a MRRS/2. The controller is further configured to track latency for each fetch request to be serviced by a host device. The controller is further configured to set a time slot based on the tracked latency. The time slot includes 4 KB divided by a data fetch size for the plurality of read requests, a HMB request of the plurality of HMB requests, and a PRP request for each host page size (HPS) divided by a data fetch size for the plurality of PRP requests. The time slot is dynamic.

[0057] In another embodiment, a data storage device includes a memory device and a controller coupled to the memory device. The controller is configured to initialize a plurality of variables, where the plurality of variables comprises command variables, PRP variables, and HMB variables, where the command variables corresponds to a number of command requests, the PRP variables corresponds to a number of PRP requests, and the HMB variables correspond to a number of HMB requests, set a priority between the command variables, the PRP variables, and the HMB variables, where the priority corresponds to an order of fetching of command requests, PRP requests, and HMB requests, and fetch the command requests, PRP requests, and HMB requests based on the priority to achieve a first ratio of the data requests to the PRP requests and/or a second ratio of the data requests to the HMB requests, and where the first ratio and the second ratio are each equal to about 1.

[0058] The command variables includes a CMD lack variable. The CMD lack variable corresponds to a number of write commands to fill a data pipeline minus a sum of a number of prefetched write commands and a number of write commands being read. The PRP variables comprises a PRP lack variable. The PRP lack variable corresponds to an amount of pointers expected to be held in the controller based on the data pipeline minus a sum of a number of prefetched PRPs and a number of PRPs being read. The HMB variables includes a HMB lack variable. The HMB lack variable corresponds to an amount of HMB entries expected to be held in the controller based on the data pipeline minus a sum of a number of prefetched HMB entries and a number of HMB entries being read. The command variables are associated with a first priority. The PRP variables are associated with a second priority. The first priority is greater than the second priority. The HMB variables are associated with a third priority. The second priority is greater than the third priority. The command variables, the PRP variables, and the HMB variables are associated with same priority.

[0059] In another embodiment, a data storage device includes memory means and a controller coupled to the memory means. The controller is configured to receive a plurality of requests to process data, calculate a first ratio based on a type of request of the plurality of requests, where the first ratio of the data requests to the PRP requests and/or the second ratio of the data requests to the HMB requests, and execute a request of the plurality of requests based on the type of request to maintain the first ratio and the second ratio, where the first ratio and the second ratio are each equal to about 1.

[0060] The executing occurs in time slots. The time slots are adjustable based on latency and type of request.

[0061] While the foregoing is directed to embodiments of the present disclosure, other and further embodiments of the disclosure may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.