Abstract:
A data storage system includes a host having a write buffer, a memory region, a submission queue and a driver therein. The driver is configured to: (i) transfer data from the write buffer to the memory region in response to a write command, (ii) generate a write command completion notice; and (iii) send at least an address of the data in the memory region to the submission queue. The host may also be configured to transfer the address to a storage device external to the host, and the storage device may use the address during an operation to transfer the data in the memory region to the storage device.

Description:
REFERENCE TO PRIORITY APPLICATION 
       [0001]    This application claims priority from Indian Patent Application No. 201641025124, filed Jul. 22, 2016 in the Intellectual Property India, and all the benefits accruing therefrom under 35 U.S.C. 119, the contents of which are hereby incorporated herein by reference. 
       BACKGROUND 
     1. Technical Field 
       [0002]    The embodiments herein relate to data storage systems and, more particularly, to methods of achieving low write latency in data storage systems. 
       2. Description of the Related Art 
       [0003]    Peripheral component interconnect express (PCIe) based solid-state drives (SSDs) technology is the latest incarnation of the solid-state drive revolution. For the most part, SSDs have used conventional storage interfaces designed to support mechanical drives, but recently drives have been developed for the high-speed PCIe bus interface. The advantage of PCIe based SSD drives is increased performance. 
         [0004]    In the conventional PCIe non-volatile memory express (NVMe) based SSDs, there is a latency involved in processing a write command. Initially, data associated with a write (WR) command is prepared by an application (running in a host) and sends the data to a write buffer within the host. The application informs a driver in the host about the WR command. The driver submits the WR command to a submission queue. The driver then rings a doorbell to indicate the SSD about the WR command in the submission queue. The SSD fetches the WR command from the submission queue and then fetches the WR command data from the write buffer to an internal buffer in the SSD. Further, the driver posts the completion of the write command WR to the application after the driver receives the WR command completion indication from the SSD. 
         [0005]    In the above mentioned steps, the difference in a time interval in which the application prepares the WR command and receiving the WR command&#39;s completion indication from the driver indicates the WR command latency. In the conventional PCIe NVMe based SSDs, the WR command&#39;s completion is indicated by the driver to the application, only when the data of the WR command is fetched by device, and the WR command completion indication is received from the SSD. 
         [0006]    The WR command management in the conventional PCIe NVMe based SSDs cannot guarantee a deterministic latency to the application, since the PCIe is shared among different components. 
         [0007]    The above information is presented as background information only to help the reader understand the present invention. Applicants have made no determination and make no assertion as to whether any of the above might be applicable as Prior Art with regard to the present application. 
       SUMMARY 
       [0008]    The principal object of the embodiments described herein is to provide a method of achieving low write latency in a data storage system. 
         [0009]    Another object of the embodiments described herein is to provide a method and system to achieve deterministic write latency in peripheral component interconnect express (PCIe) based non-volatile memory (NVMe) solid state drive (SSD) 
         [0010]    Another object of the embodiments described herein is to provide a method and system to achieve low write latency in the PCIe based NVMe SSD. 
         [0011]    Aspects of the present disclosure are not limited to the above-mentioned objects, and other objects that have not been mentioned will be clearly understood by those skilled in the art from the following description. 
         [0012]    According to some embodiments of the invention, a data storage system is provided, which includes a host having a write buffer, a memory region, a submission queue and a driver therein. The driver is configured to: (i) transfer data from the write buffer to the memory region in response to a write command, (ii) generate a write command completion notice; and (iii) send at least an address of the data in the memory region to the submission queue. According to some of these embodiments of the invention, the write command completion notice can be generated in response to completion of the data transfer. The host may also be configured to transfer the address to a storage device external to the host. In addition, the storage device may use the address during an operation to transfer the data in the memory region to the storage device. This operation to transfer the data in the memory region to the storage device may occur in response to a read command issued by the storage device to the memory region in the host. The storage device may also notify the driver of the transfer of the data in the memory region to the storage device. 
         [0013]    Additional embodiments described herein provide a data storage system. The data storage system includes a storage device and a host. The host includes a driver. The driver is configured to read data from a write buffer in the host, in response to a write command received from an application in the host. The driver is configured to send the data to a memory region in the host. The driver is configured to send completion of the write command to the application. Further the driver is configured to send the write command to a submission queue in the host, wherein the write command includes address of the data in the memory region. Furthermore, the driver is configured to release the memory region in response to determining that data is obtained by the storage device. 
         [0014]    Accordingly, the embodiments described herein provide a method of achieving low write latency in a data storage system. The method includes reading data from a write buffer in a host in response to a write command received from an application in the host. The method includes sending the data to a memory region in the host. The method includes sending completion of the write command to the application. Further the method includes sending the write command to a submission queue in the host. The write command includes address of the data in the memory region. Furthermore, the method includes releasing the memory region in response to determining that the data is obtained by the storage device. 
         [0015]    Accordingly, the embodiments described herein provide a computer program product comprising computer executable program code recorded on a computer readable non-transitory storage medium, the computer executable program code when executed causing the actions including reading data from a write buffer in a host, in response to a write command received from an application in the host. The computer executable program code when executed causing the further actions including sending the data to a memory region in the host. The computer executable program code when executed causing the further actions including sending completion of the write command to the application. The computer executable program code when executed causing the further actions including sending a write command to a submission queue in the host, wherein the write command includes address of the data in the memory region. The computer executable program code when executed causing the further actions including releasing the memory region in the host, in response to determining that the storage device obtained the data from the memory region. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0016]    The above and other aspects and features of the present inventive concept will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings, in which: 
           [0017]      FIG. 1  illustrates a data storage system for managing a write command, according to embodiments disclosed herein; 
           [0018]      FIG. 2  is a sequential flow diagram illustrating various steps for managing the write command in the data storage system, according to embodiments disclosed herein; 
           [0019]      FIG. 3  is a flow chart illustrating methods for managing the write command in the data storage system, according to embodiments disclosed herein; and 
           [0020]      FIG. 4  is a computing environment implementing methods for managing write commands in a data storage system, according to embodiments disclosed herein. 
       
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
       [0021]    The embodiments herein and the various features and advantageous details thereof are explained more fully with reference to the non-limiting embodiments that are illustrated in the accompanying drawings and detailed in the following description. Descriptions of well-known components and processing techniques are omitted so as to not unnecessarily obscure the embodiments herein. Also, the various embodiments described herein are not necessarily mutually exclusive, as some embodiments can be combined with one or more other embodiments to form new embodiments. The term “or” as used herein, refers to a non-exclusive or, unless otherwise indicated. The examples used herein are intended merely to facilitate an understanding of ways in which the embodiments herein can be practiced and to further enable those skilled in the art to practice the embodiments herein. Accordingly, the examples should not be construed as limiting the scope of the embodiments herein. 
         [0022]    The embodiments herein provide a method of achieving low write latency in a data storage system. The method includes reading data from a write buffer in a host in response to a write command received from an application in the host. The method includes sending the data to a memory region in the host. The method includes sending completion of the write command to the application. Further the method includes sending the write command to a submission queue in the host. In an embodiment, the write command includes address of the data in the memory region. Furthermore, the method includes releasing the memory region in the host, in response to determining that data is obtained by the storage device. 
         [0023]    Unlike the conventional PCIe SSD systems and methods, the proposed method achieves very low write (WR) latency of peripheral component interconnect express (PCIe) non-volatile memory express (NVMe) solid state drive (SSD) in the same order as the that of SSD on Dual In Line Memory Module (DIMM) slot. Further, the proposed method achieves deterministic WR latency irrespective of the shared PCIe traffic. 
         [0024]    Referring now to the drawings and more particularly to  FIGS. 1 through 4  where similar reference characters denote corresponding features consistently throughout the figures, there are shown preferred embodiments. 
         [0025]      FIG. 1  illustrates a data storage system  100 , for managing a write command, according to an embodiment as disclosed herein. As depicted in  FIG. 1 , the data storage system  100  includes a host  102 , a storage device  104 , and a peripheral component interconnect express (PCIe) bus  106 . The host  102  can be any mobile or hand held devices like smart phones, laptop computers, server computers, personal digital assistants (PDAs) or the like. The storage device  104  can be any of a PCIe NVMe SSD or a PCIe based SATAe SSD, a flash storage or the like. 
         [0026]    In an embodiment, the host  102  includes an application, a write buffer  102   a,  a driver  102   b,  a memory region  102   c  and a submission queue  102   d.  The write buffer  102   a  stores the data to be written to the storage device  104 . The driver  102   b  manages the write (WR) command data transfer to the storage device  104  over the PCIe bus  106 . The submission queue  102   d  contains the commands such as write commands or read commands. The WR commands are sent by the driver  102   b  into the submission queue  102   d.    
         [0027]    In an embodiment, the memory region  102   c  can be within the host  102  memory. 
         [0028]    In an embodiment, the storage device  104  obtains data from the memory region by reading the address of the data specified in the WR command (i.e., in a command field) in the submission queue  102   d.    
         [0029]      FIG. 2  is a sequential flow illustrating various steps for managing the write command in the data storage system  100 , according to an embodiment as disclosed herein. At step  1 , an application running in the host  102  prepares a write (WR) command including the data and address of the data in the write buffer  102   a,  to be written to the storage device  104  and sends the WR command&#39;s data to the write buffer  102   a.  At step  2 , the application informs the driver  102   b  about the WR command with address of the data stored in the write buffer  102   a.  At step  3 , the driver  102   b  reads the data from the write buffer  102   a.  At step  4 , the driver  102   b  sends the data to the memory region  102   c.  At step  5 , the driver  102   b  informs the completion of WR command to the application. At step  6 , the driver  102   b  sends the WR command, which includes the address of the data in the memory region  102   c  to the submission queue  102   d.  Unlike to the conventional mechanism, where the WR command completion is sent to the application only after the data is fetched by the storage device  104  and the WR command&#39;s completion is posted to the driver  102   b  by the storage device  104 , with the proposed method, the driver  102   b  informs the completion of WR command to the application, after sending the data to memory region  102   c.  Hence, with the proposed method, the WR command latency is reduced by sending the completion of WR command to the application by the driver  102   b  after sending the data to memory region  102   c.    
         [0030]    At step  7 , the driver  102   b  indicates about WR command to the storage device  104 . For example, in NVMe case, driver  102   b  rings a door bell to indicate the storage device  104  about the WR command to be processed in the submission queue  102   d.  The door bell ring is a one register write trigger, given by the driver  102   b  to the storage device  104 . At step  8 , the storage device  104  obtains the WR command from the submission queue  102   d.  At step  9 , the storage device  104  obtains the WR data from the memory region  102   c  to an internal buffer of the storage device  104 . At step  10 , the storage device  104  sends the WR command completion to the driver  102   b  and in response, the driver  102   b  releases the memory region  102   c  such that data pertaining to another WR command can be written in the memory region  102   c.    
         [0031]      FIG. 3  is a flow chart illustrating a method  300  for managing the write command in the data storage system  100 , according to an embodiment as disclosed herein. In an embodiment, at step  302 , the method  300  includes receiving a WR command from an application in a host  102 . The method  300  allows the driver  102   b  to receive a WR command from the application. The WR command includes the address of the data in the write buffer  102   a  and the data to be written to the storage device  104 . At step  304 , the method  300  includes reading the WR command&#39;s data from the write buffer  102   a.  The method  300  allows the driver  102   b  to read the WR command&#39;s data from the write buffer  102   a.  The WR command includes the address of WR data in the write buffer  102   a.  At step  306 , the method  300  includes sending the WR data to a memory region  102   c  in the host  102 . The method  300  allows the driver  102   a  to send the WR data to the memory region  102   c.    
         [0032]    In an embodiment, the memory region  102   c  can be within the host  102  memory. The memory region  102   c  contains the data corresponding to the WR command in the submission queue  102   d.  At step  308 , the method includes sending completion of the WR command to the application. The method  300  allows the driver  102   b  to send the completion of the WR command to the application. At step  310 , the method  300  includes sending the WR command to a submission queue  102   d  in the host. The method  300  allows the driver  102   b  to send the WR command to the submission queue  102   d.  The WR command in the submission queue  102   d  contains the address of the WR data in the memory region  102   c.  At step  312 , the method  300  includes indicating the presence of the WR command in the submission queue  102   d  to the storage device  104 . The method  300  allows the driver  102   b  to ring the door bell to the storage device  104  over a peripheral component interconnect express (PCIe)  106  bus to indicate the presence of the WR command in the submission queue  102   d.  At step  314 , the method  300  includes fetching the WR command from the submission queue  102   d.  The method  300  allows the storage device  104  to fetch the WR command from the submission queue  102   d.  At step  316 , the method  300  includes obtaining the data from the memory region of the write buffer  102   a.  The method  300  allows the storage device  104  to obtain the data from the memory region of the write buffer  102   a.  At step  318 , the method  300  includes sending WR command&#39;s completion entry to the driver  102   b.  The method  300  allows the storage device  104  to send the WR command&#39;s completion entry to the driver. At step  320 , the method  300  includes releasing the data from memory region  102   c.  The method  300  allows the driver  102   b  to release the memory region  102   c,  when the storage device  104  has obtained data from the memory region  102   c  over the PCIe bus  106  to the internal buffer of the storage device  104  and after the driver  102   b  has received WR command&#39;s completion from the storage device  104 , the driver  102   b  releases the memory region  102   c.    
         [0033]    The various actions, acts, blocks, steps, or the like in the method  300  may be performed in the order presented, in a different order or simultaneously. Further, in some embodiments, some of the actions, acts, blocks, steps, or the like may be omitted, added, modified, skipped, or the like without departing from the scope of the invention. 
         [0034]      FIG. 4  is a computing environment implementing the method of achieving low write latency in a data storage system, according to an embodiment disclosed herein. As depicted in the  FIG. 4 , the computing environment  400  comprises at least one processing unit  406  that is equipped with a control unit  402  and an Arithmetic Logic Unit (ALU)  404 , a memory  408 , a storage unit  410 , plurality of networking devices  414  and a plurality of Input output (I/O) devices  412 . The processing unit  406  is responsible for processing the instructions of the algorithm. The processing unit  406  receives commands from the control unit  402  in order to perform its processing. Further, any logical and arithmetic operations involved in the execution of the instructions are computed with the help of the ALU  404 . 
         [0035]    The overall computing environment  400  can be composed of multiple homogeneous and/or heterogeneous cores, multiple CPUs of different kinds, special media and other accelerators. The processing unit  406  is responsible for processing the instructions of the algorithm. Further, the plurality of processing units  406  may be located on a single chip or over multiple chips. 
         [0036]    The algorithm comprising of instructions and codes required for the implementation are stored in either the memory unit  408  or the storage  410  or both. At the time of execution, the instructions may be fetched from the corresponding memory  408  or storage  410 , and executed by the processing unit  406 . 
         [0037]    In case of any hardware implementations various networking devices  414  or external I/O devices  412  may be connected to the computing environment to support the implementation through the networking unit and the I/O device unit. 
         [0038]    The embodiments disclosed herein can be implemented through at least one software program running on at least one hardware device and performing network management functions to control the elements. The elements shown in the  FIGS. 1 through 4  include blocks which can be at least one of a hardware device, or a combination of hardware device and software module. 
         [0039]    The foregoing description of the specific embodiments will so fully reveal the general nature of the embodiments herein that others can, by applying current knowledge, readily modify and/or adapt for various applications such specific embodiments without departing from the generic concept, and, therefore, such adaptations and modifications should and are intended to be comprehended within the meaning and range of equivalents of the disclosed embodiments. It is to be understood that the phraseology or terminology employed herein is for the purpose of description and not of limitation. Therefore, while the embodiments herein have been described in terms of preferred embodiments, those skilled in the art will recognize that the embodiments herein can be practiced with modification within the spirit and scope of the embodiments as described herein.