NVMe simple copy command support using fake virtual functions

By introducing virtual functions and controller memory buffers into data storage devices, the delay problem caused by storage management operations is solved and more efficient data storage and processing is achieved.

CN114168067BActive Publication Date: 2024-09-27SANDISK TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110642574.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-02-22
Filing Date
2021-06-09
Publication Date
2024-09-27
Estimated Expiration
2041-06-09

AI Technical Summary

Technical Problem

When existing data storage devices perform storage management operations such as garbage collection, delays in host commands and data storage device operations increase, making it difficult to complete them at the same time.

Method used

By introducing multiple virtual functions in the data storage device, at least one of which is dedicated to storage management operations, utilizing the Controller Memory Buffer (CMB) to copy data from one location to another, performing reads and writes concurrently command to reduce resource usage.

Benefits of technology

It improves the efficiency of data storage devices when performing storage management operations, reduces delays, and enhances the performance of data storage devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114168067B_ABST
    Figure CN114168067B_ABST
Patent Text Reader

Abstract

The present invention is entitled "NVMe Simple Copy Command Support Using Virtual Virtual Functions". The present disclosure as a whole relates to a data storage device, such as a solid state drive. The data storage device includes a volatile memory, a non-volatile storage unit, and a controller. The data storage device also includes a plurality of virtual functions, wherein at least one of the virtual functions is accessible only by the data storage device, and the remaining virtual functions of the virtual functions are accessible by both the data storage device and a host device. At least one of the virtual functions may be dedicated to completing a data storage device storage management operation.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the benefit of U.S. Provisional Patent Application Serial No. 63 / 076,780, filed on September 10, 2020, which is incorporated herein by reference. Background Art Technical Field

[0003] Embodiments of the present disclosure relate generally to data storage devices, such as solid-state drives (SSDs).

[0004] Description of Related Art

[0005] Data storage devices such as SSDs may be used in computers in applications that require relatively low latency and high capacity storage. For example, an SSD may exhibit lower latency than a hard disk drive (HDD), especially for random reads and writes. Typically, a controller of an SSD receives commands to read or write data from a host device to a memory device. Depending on whether the command is a read or write command, data is read from or written to one or more blocks in the memory device.

[0006] Data storage devices utilize storage management operations such as garbage collection to free up valuable space. When updated data is written to the one or more blocks of the storage device, the previous version of the updated data may no longer be needed. Garbage collection can reallocate one or more blocks, erased blocks, to an available pool of empty blocks. In addition, related data previously stored on the one or more blocks can be sequentially rewritten to the one or more blocks. Data duplication that may occur due to host device commands or internal decisions can utilize one or more buffers and hardware engines, which can cause delays in completing read / write commands received from the host.

[0007] Therefore, a need exists for an improved method to simultaneously complete host commands and data storage device operations. Summary of the invention

[0008] The present disclosure as a whole relates to a data storage device, such as a solid state drive. The data storage device includes a volatile memory, a non-volatile storage unit, and a controller. The data storage device also includes a plurality of virtual functions, wherein at least one of the virtual functions can only be accessed by the data storage device, and the remaining virtual functions of the virtual functions can be accessed by both the data storage device and a host device. At least one of the virtual functions can be dedicated to performing data storage device storage management operations.

[0009] In one embodiment, a data storage device includes a non-volatile memory unit and a volatile memory unit, the volatile memory unit including one or more first volatile memory locations, one or more second volatile memory locations, and a controller memory buffer (CMB). The data storage device also includes a controller coupled to the non-volatile memory unit and the volatile memory unit. The controller is configured to receive one or more host commands from a host, such as a simple copy command including both a read and a write command as sub-parts of the host command, to read data from the non-volatile memory unit or write data to the non-volatile memory unit, route the received one or more read or write commands to one or more first virtual function locations, and copy the data from the first location of the non-volatile memory unit to the second location of the non-volatile memory unit using the CMB, wherein copying the data from the first location to the second location utilizes one or more second virtual function locations. The controller is also configured to initiate a garbage collection command.

[0010] In another embodiment, a data storage device includes a nonvolatile memory unit and a volatile memory unit, the volatile memory unit including one or more first volatile memory locations, one or more second volatile memory locations, and a controller memory buffer (CMB). The data storage device also includes an inbound multiplexer (mux), such as an advanced extensible interface (AXI) mux, and a controller coupled to the nonvolatile memory unit, the volatile memory unit, and the AXI inbound mux. The data storage device also includes a central processing unit (CPU) coupled to the controller, wherein the CPU is configured to receive a copy command or a self-generated garbage collection decision from the controller, generate a plurality of read commands, write the plurality of read commands to the CMB, generate a physical region page (PRP) or a scatter gather list (SGL) for the plurality of read commands directed to the CMB, issue a first doorbell for the plurality of read commands, generate a first write command, generate a PRP for the first write command directed to the CMB, issue a second doorbell for the first write command, and program data associated with the first write command to the nonvolatile storage device.

[0011] In another embodiment, a data storage device includes a non-volatile storage unit, a volatile memory unit including one or more first volatile memory locations and one or more second volatile memory locations, a device for routing one or more read or write commands received from a host to one or more first virtual function locations, wherein the one or more first virtual function locations complete the received one or more read or write commands, and a controller memory buffer (CMB) for copying data from the first location of the volatile storage unit to the second location of the non-volatile storage unit, wherein copying the data from the first location to the second location utilizes the one or more second virtual function locations. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Thus, a detailed understanding of the manner in which the above-described features of the present disclosure are understood, a more particular description of the present disclosure, the above brief overview, may be obtained by reference to the embodiments, some of which are illustrated in the accompanying drawings. It should be noted, however, that the drawings illustrate only typical embodiments of the present disclosure and are therefore not to be considered limiting of its scope, as the present disclosure may admit to other equally effective embodiments.

[0013] Figure 1 is a schematic block diagram illustrating a storage system according to the disclosed embodiments, in which a data storage device may be used as a storage device for a host device.

[0014] Figure 2A is a diagram of storage management operations in accordance with the disclosed embodiments.

[0015] Figure 2B is a schematic block diagram illustrating storage management operations in a data storage device according to the disclosed embodiments.

[0016] Figure 3A is a schematic diagram of a write command flow according to the disclosed embodiment.

[0017] Figure 3B is a schematic diagram of a write command flow with a controller memory buffer according to the disclosed embodiments.

[0018] Figure 4 is a schematic diagram of a host device view and a data storage device view of virtualized resources according to the disclosed embodiment.

[0019] Figure 5 is a schematic block diagram illustrating a data storage device including a local virtual function protocol according to the disclosed embodiments.

[0020] FIG. 6A to FIG. 6C A method for replicating a command stream according to the disclosed embodiments is shown.

[0021] 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

[0022] Hereinafter, reference is made to the embodiments of the present disclosure. However, it should be understood that the present disclosure is not limited to the embodiments specifically described. On the contrary, any combination of the following features and elements (whether or not related to different embodiments) is considered to realize and practice the present disclosure. In addition, although the embodiments of the present disclosure can achieve advantages that are superior to other possible solutions and / or superior to the prior art, whether a specific advantage is achieved by a given embodiment is not a limitation to the present disclosure. Therefore, the following aspects, features, embodiments and advantages are merely illustrative, and are not considered to be elements or limitations of the appended claims, unless explicitly stated in the claims. Similarly, reference to "the present disclosure" should not be interpreted as a summary of any inventive subject matter disclosed herein, and should not be considered to be elements or limitations of the appended claims, unless explicitly stated in the claims.

[0023] The present disclosure as a whole relates to a data storage device, such as a solid state drive. The data storage device includes a volatile memory, a non-volatile storage unit, and a controller. The data storage device also includes a plurality of virtual functions, wherein at least one of the virtual functions can only be accessed by the data storage device, and the remaining virtual functions of the virtual functions can be accessed by both the data storage device and a host device. At least one of the virtual functions can be dedicated to performing data storage device storage management operations.

[0024] It should be understood that although the description herein will refer to write commands and read commands to support copy commands, the disclosure herein is not limited to such commands. Instead, the disclosure herein should be understood to cover other commands, such as verify commands or compare commands. In addition, commands that require reading from a memory device such as a NAND device but not transferring any data to a host device are also contemplated.

[0025] Figure 1 1 is a schematic block diagram illustrating a storage system 100 according to the disclosed embodiments, wherein a data storage device 106 can be used as a storage device for a host device 104. For example, the host device 104 can utilize a non-volatile memory (NVM) 110 included in the data storage device 106 to store and retrieve data. The host device 104 includes a host DRAM 138. In some examples, the storage system 100 can include multiple storage devices, such as the data storage device 106, that can operate as a storage array. For example, the storage system 100 can include multiple data storage devices 106 that are configured as a redundant array of inexpensive / independent disks (RAID) that are collectively used as a mass storage device for the host device 104.

[0026] Host device 104 may store data to and / or retrieve data from one or more storage devices, such as data storage device 106. Figure 1As shown, host device 104 can communicate with data storage device 106 via interface 114. Host device 104 can include any of a variety of devices, including a computer server, a network attached storage (NAS) unit, a desktop computer, a notebook (i.e., laptop) computer, a tablet computer, a set-top box, a telephone handset such as a so-called "smart" phone, a so-called "smart" tablet computer, a television, a camera, a display device, a digital media player, a video game console, a video streaming device, or other device capable of sending or receiving data from a data storage device.

[0027] Data storage device 106 includes controller 108, NVM 110, power supply 111, volatile memory 112, interface 114, and write buffer 116. In some examples, for clarity, data storage device 106 may include Figure 1 . For example, the data storage device 106 may include a printed circuit board (PCB) to which the components of the data storage device 106 are mechanically attached, and the printed circuit board includes conductive traces that electrically interconnect the components of the data storage device 106, etc. In some examples, the physical size and connector configuration of the data storage device 106 may conform to one or more standard form factors. Some exemplary standard form factors include, but are not limited to, a 3.5" data storage device (e.g., an HDD or SSD), a 2.5" data storage device, a 1.8" data storage device, a peripheral component interconnect (PCI), a PCI extension (PCI-X), a PCI Express (PCIe) (e.g., PCIe x1, x4, x8, x16, PCIe Mini card, MiniPCI, etc.). In some examples, the data storage device 106 can be directly coupled (e.g., directly soldered) to a motherboard of the host device 104.

[0028] The interface 114 of the data storage device 106 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. The interface 114 may operate according to any suitable protocol. For example, the interface 114 may operate according to 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), Serial Attached SCSI (SAS), PCI and PCIe, Non-Volatile Memory Express (NVMe), OpenCAPI, GenZ, Cache Coherent Interface Accelerator (CCIX), Open Channel SSD (OCSSD), etc. The electrical connection (e.g., data bus, control bus, or both) of the interface 114 is electrically connected to the controller 108, thereby 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 the interface 114 may also allow the data storage device 106 to receive power from the host device 104. For example, Figure 1 As shown, power supply 111 may receive power from host device 104 via interface 114 .

[0029] NVM 110 may include multiple memory devices. NVM 110 may be configured to store and / or retrieve data. For example, a memory device of NVM 110 may receive data and a message indicating that the memory device stores data from controller 108. Similarly, a memory device of NVM 110 may receive a message indicating that the memory device retrieves data from controller 108. In some examples, each memory device in the memory device may be referred to as a die. In some examples, a single physical chip may include multiple dies (i.e., multiple storage cells). In some examples, each memory device may be configured to store a relatively large amount of data (e.g., 128MB, 256MB, 512MB, 1GB, 2GB, 4GB, 8GB, 16GB, 32GB, 64GB, 128GB, 256GB, 512GB, 1TB, etc.).

[0030] In some examples, each memory device of NVM 110 may include any type of non-volatile memory device, such as a flash memory device, a phase change memory (PCM) device, a resistive random access memory (ReRAM) device, a magnetoresistive random access memory (MRAM) device, a ferroelectric random access memory (F-RAM), a holographic memory device, and any other type of non-volatile memory device.

[0031] NVM 110 may include multiple flash memory devices. NVM flash memory devices may include NAND or NOR-based flash memory devices, and may store data based on the charge contained in the floating gate of the transistor for each flash memory cell. In NVM flash memory devices, the flash memory device may be divided into multiple dies, wherein each of the multiple dies includes multiple blocks, which may be further divided into multiple pages. Each of the multiple blocks within a particular memory device may include multiple NVM cells. Word lines may be used to electrically connect rows of NVM cells to define pages in multiple pages. The corresponding cells in each of the multiple pages may be electrically connected to corresponding bit lines. In addition, the NVM flash memory device may be a 2D or 3D device, and may be a single-level cell (SLC), a multi-level cell (MLC), a three-level cell (TLC), or a four-level cell (QLC). The controller 108 may write data to the NVM flash memory device at a page level and read data from the NVM flash memory device, and erase data from the NVM flash memory device at a block level.

[0032] The data storage device 106 includes a power supply 111 that can provide power to one or more components of the data storage device 106. When operating in a standard mode, the power supply 111 can use power provided by an external device such as a host device 104 to power one or more components. For example, the power supply 111 can use power received from the host device 104 via the interface 114 to power one or more components. In some examples, the power supply 111 may include one or more power storage components that are configured to supply power to one or more components when operating in a shutdown mode, such as when power is stopped from being received from an external device. In this way, the power supply 111 can be used as an onboard backup power supply. Some examples of the one or more power storage components include, but are not limited to, capacitors, supercapacitors, batteries, and the like. In some examples, the amount of power that can be stored by one or more power storage components can be a function of the cost and / or 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 size of the one or more power storage components also increases.

[0033] The data storage device 106 also includes a volatile memory 112, which can be used by the controller 108 to store information. The volatile memory 112 can include one or more volatile memory devices. Figure 1As shown, the volatile memory 112 may consume power received from the power supply 111. Examples of the 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, etc.)).

[0034] The data storage device 106 includes a controller 108 that can manage one or more operations of the data storage device 106. For example, the controller 108 can manage reading data from the NVM 110 and / or writing 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 can initiate a data storage command to store data to the NVM 110 and monitor the progress of the data storage command. The controller 108 can determine at least one operating characteristic of the storage system 100 and store the at least one operating characteristic 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 temporarily stores the data associated with the write command in an internal memory or write buffer 116 before sending the data to the NVM 110.

[0035] Figure 2A is a diagram of storage management operations according to the disclosed embodiments. Figure 1 of a data storage device 106) such as an NVM (such as Figure 1 The NVM 110 includes a first block 202 and a second block 204. Since data is written to the blocks sequentially, the space between LBA1 and LBA2 and the space between LBA4 and LBA3 of the first block 202 may contain invalid or old data before the data is moved or garbage collected. Any additional data written to the first block 202 is written after LBA3. Therefore, the space between LBA1 and LBA2 and LBA4 and LBA3 is not effectively utilized because the valid data is not sequential and the space between the LBAs cannot be used.

[0036] Controllers (such as Figure 1 The controller 108 or Figure 1The host device 104 of the controller may send a command for a storage management operation such as garbage collection. The LBAs of the first block 202 are copied to the controller, where the LBAs may be stored in a volatile memory of the controller. The first block is erased and assigned to a pool of free blocks (i.e., blocks that have not yet been written). The data stored in the controller is sequentially written to the second block 204. Since the data is sequentially written to the second block, the amount of space utilized by the data decreases as the data is increasingly consolidated on the block. For example, the first block 202 may have an available capacity of 64KiB. Each LBA may have a size of approximately 4KiB. The total size of the LBA is 16KiB. After writing four LBAs to the first block 202, the remaining capacity of the first block 202 is approximately 48KiB. However, since the four LBAs are not written sequentially, the available capacity may be less than approximately 48KiB. When data is sequentially written to blocks such as the second block 204, the available capacity may be equal to or approximately equal to the remaining capacity of the block.

[0037] Figure 2B 2 is a schematic block diagram illustrating storage management operations in a data storage device according to the disclosed embodiment. The host device 104 issues a read and / or write command 252 to the data storage device 106. The PCIe bus 256 receives the command 252 and the data 254 associated with the command 252. The command 252 is then transmitted to the control path 258, where the processor 260 includes a logic component for processing and executing the command 252. In a write operation, the data 254 is transmitted to the data path 212, where instructions from the processor 260 are executed, and the data 254 passes through various elements of the data path 212. For example, the data 254 first passes through a direct memory access (DMA) 264, where data protection is added to the data 254. The data 254 is then encrypted at the Advanced Encryption Standard (AES) 266. At the NVMe metadata block 268, the metadata is attached to the data 254. In one embodiment, the metadata may include a header. The error correction engine 270, which may be referred to as an EC engine, generates an error correction code or parity data and writes it to the data 254. Flash interface module (FIM) 272 writes data 254 to the relevant location of NVM 110 .

[0038] However, when the data storage device 106 performs storage management operations such as garbage collection, the relevant data 254 is retrieved from the NVM 110 and passed through the flash interface module (FIM) 272, the error correction engine 270, the NVMe metadata block 268, the AES 266, and the DMA 264. The relevant data then passes through the entire data path 212 and is stored at the relevant location in the NVM 110. Because the data path 212 may be occupied by storage management operations, new commands 252 may be queued because the resources of the data storage device are currently utilized.

[0039] Figure 3A is a schematic diagram of a write command flow 300 according to the disclosed embodiment. A host device (such as Figure 1 The host device 104 includes a host DRAM (such as Figure 1 The host device communicates with the data storage device via a data bus. Although the write command stream 300 describes the data flow of write commands between the host device and the data storage device, the command stream may describe the data flow of read commands between the host device and the data storage device.

[0040] The host device issues a write command to write data with an associated physical region page (PRP) or scatter-gather list (SGL) to the host DRAM. It should be understood that the terms PRP and SGL are used interchangeably. It should also be understood that for the purposes of this disclosure, the terms PRP and SGL are intended to include alternatively, such as will be utilized in NVMe. The host device issues a submission queue (SQ) doorbell to the data storage device. The data storage device responds to and reads commands written to the host DRAM. The data storage device receives the write command and reads the relevant PRP from the host DRAM. The relevant PRP from the host DRAM is received by the data storage device. Then, the data storage device reads and receives data associated with the write command from the host DRAM. After receiving the data from the host DRAM, the data storage device issues a completion notification to the completion queue (CQ) of the host DRAM. The data storage device also sends an interrupt to the host device as an indication that the completion notification has been issued to the host DRAM. The host device then reads the relevant completion notification from the host DRAM and analyzes it, and issues a CQ doorbell to the data storage device, indicating that the completion notification has been read.

[0041] Figure 3B is a schematic diagram of a write command flow with a controller memory buffer 350 according to the disclosed embodiment. Although the write command flow with CMB 350 describes the data flow of write commands between a host device and a data storage device, the command flow may describe the data flow of read commands between the host device and the data storage device. The host device issues a write command to write data with an associated PRP. The data storage device does not write to the host DRAM, but includes a controller memory buffer (CMB) function to provide the host device with access to a portion of the DRAM of the data storage device. For example, in Figure 3A In the write command flow 300 , write commands are written to the host DRAM, where the data storage device reads from the host DRAM.

[0042] In a write command stream with CMB 350, the host device writes a write command and an associated PRP to the CMB of the data storage device. The host device then fills the write command in a submission queue. The host device issues an SQ doorbell to the data storage device. The data storage device then reads the write command with the associated PRP and data from the CMB. The data storage device writes a completion notification to the CQ of the CMB. An interrupt is sent to the host device. When the host device receives the interrupt, the host device reads from the CQ of the CMB and receives a completion notification. The host device then issues a CQ doorbell to the data storage device, indicating that the completion notification has been read. Since the data is written to the CMB of the data storage device, the number of transactions and the time associated with the transaction between the host device and the data storage device can be reduced, thereby speeding up the process of reading or writing commands.

[0043] Figure 4 is a schematic diagram of a host device view and a data storage device view of virtualized resources according to the disclosed embodiment. The host device may be Figure 1 The host device 104, and the data storage device may be Figure 1 The virtualization function allows multiple virtual functions to manage the resources of the data storage device suitable for each of these virtual functions. Figure 4 As shown, each virtual function of the host includes a set of registers, doorbells, CMBs, SQs, and CQs that are different from other virtual functions. Therefore, the resources of each of these virtual functions are isolated from each other.

[0044] Figure 5 1 is a schematic block diagram illustrating a data storage device 106 including a local virtual function protocol according to the disclosed embodiment. The host device 104 includes a set of virtual hosts 502A-502C, each virtual host being associated with a virtual function. In addition, the data storage device 106 may include one or more first virtual functions and one or more second virtual functions. The one or more first virtual functions can be accessed by the host device 104, and the one or more second virtual functions can only be accessed by a data storage device such as a CPU 542 of the data storage device 106 that controls the one or more second virtual functions. The one or more second virtual functions can emulate the behavior of the host device 104, such as generating read and write commands.

[0045] For example, a write command stream with the CMB 350 of FIG. 3 may utilize the one or more first virtual functions. The behavior of the one or more second virtual functions may be similar to the one or more first virtual functions. However, the one or more second virtual functions may be used for operations initiated by the data storage device 106 or storage management operations, such as garbage collection. Since the resources of the one or more second virtual functions are not shared with the host device 104, the operations of the one or more second virtual functions may occur simultaneously with the operations of the one or more first virtual functions.

[0046] exist Figure 5 , each virtual function is indicated by a unique pattern. For example, the one or more first virtual functions are indicated by a diagonal striped pattern, and the one or more second virtual functions are indicated by a horizontal and / or vertical pattern. First, the first virtual function corresponds to a first virtual host (VH) 1 502A, second, the first virtual function corresponds to a second VH 2 502B, and third, the first function corresponds to a third VH 3 502C. The number of virtual hosts and virtual functions listed is not intended to be limiting, but to provide examples of possible implementations. The resources of the one or more second virtual functions (i.e., local virtual functions) indicated by the checksum design are hidden from the host device 104, while the one or more first virtual functions can be accessed by the host device 104.

[0047] In addition, flow path 1 is associated with host device 104 read and write commands, and flow path 2 is associated with data storage device 106 read and write commands. Flow path 1 can access any of the one or more first virtual functions, and flow path 2 can access any of the one or more second virtual functions.

[0048] The data storage device 106 includes a PCIe bus 504, an advanced extensible interface (AXI) inbound multiplexer (mux) module 506, a controller 108, a gateway 514, an SQ / CQ 512, a DRAM 528, and a CPU 542 coupled to a local CPU mailbox 526. The AXI inbound mux module 506 may be responsible for filtering host device 104 commands from CPU 542 commands. The controller 108 includes an outbound address translation (AT) 508A, an inbound AT 508B, and a doorbell issuer 510. The outbound AT 508A may be configured to send and receive messages to the gateway 514, where these messages may be completion notifications or interrupts. The inbound AT 508B may be configured to receive read or write commands from the AXI inbound mux 506. The doorbell issuer 510 issues a doorbell for completion notifications or interrupts to the SQ / CQ 512. The gateway 514 may be configured to direct read or write transactions to the CMBs 530a-530c, 532 of the host device 104 or the data storage device 106 DRAM 528. In another embodiment, SRAM is used as the DRAM 528.

[0049] The DRAM 528 may include a plurality of CMBs 530a-530c, 532. In addition, the DRAM 528 may include one or more first volatile memory locations and one or more second volatile memory locations. For example, the one or more first volatile memory locations may store a plurality of CMBs 530a-530c associated with the one or more first virtual functions, and the one or more second volatile memory locations may store a local CMB 532 associated with the one or more second virtual functions. Figure 4 As shown, each virtual function may be associated with a unique set of resources, such as registers 534a-534c, 536 and MSIX 538A-538C, 540. Local resources such as local CMB 532, local registers 536, and local MSIX 540 are accessible only by the CPU 542 or firmware of the data storage device 106.

[0050] The data storage device 106 also includes interrupt logic (INL) 516, direct memory access (DMA) 518, SQ manager (SQM) 520, CQ manager (CQM) 522, and buffer pointer manager (BPM) 524. When the doorbell is running, the SQM 520 reads the relevant command from the host device 104 or CMB 530A-530C, 532. The BPM 524 then reads the PRP table, and the DMA 518 executes the read or write command. When the data transfer is completed, the CQM 522 writes a completion notification and the INL 516 sends an interrupt.

[0051] FIG. 6A to FIG. 6C600 is a flowchart showing a method of copying commands according to the disclosed embodiment. Figure 5 Various aspects are provided to help illustrate method 600. In addition, method 600 may describe Figure 5 Flow path 2. At block 602, the CPU 542 receives a copy command. The CPU 542 generates a plurality of read commands to the local CMB 532 at block 604, and populates the relevant PRP list in the local CMB 532 at block 606. At block 608, the CPU 542 issues a first doorbell associated with the one or more second virtual functions for the read command. At block 610, the CPU waits for a first interrupt to arrive.

[0052] At block 626, while waiting for the first interrupt to arrive, the controller 108 detects the first doorbell and notifies the SQM 520. At block 628, the SQM 520 obtains a plurality of read commands from the local CMB 532. At block 630, the BPM 524 reads the associated PRP list from the local CMB 532. At block 632, the DMA reads the data associated with the plurality of read commands from the NVM and programs the data associated with the read commands to the local CMB 532. At block 634, the CQM 522 issues a first completion notification to the local CMB 532, and at block 636 the INL 516 generates a first interrupt and sends it to the local CPU mailbox 526.

[0053] After the CPU 542 receives the first interrupt at the local CPU mailbox 526, the CPU 542 determines at block 612 whether all generated read commands associated with the copy command received at block 602 have been sent to the local CMB 532. If not all read commands have been sent to the local CMB 532, the method 600 returns to block 606. However, if all read commands have been sent to the local CMB 532, the CPU 542 determines whether the first completion notification from the CQM 522 has arrived. If the first completion notification has not arrived, the method returns to block 610. However, if the first completion notification has arrived, the CPU 542 generates a write command to the local CMB 432 at block 616 and populates the relevant PRP list in the local CMB 432 at block 618. At block 620, the CPU issues a second doorbell for the write command. At block 622, the CPU 542 waits for the second interrupt to arrive.

[0054] At block 652, while waiting for the second interrupt to arrive, the controller 108 detects the second doorbell and notifies the SQM 520. At block 654, the SQM 520 obtains the write command from the local CMB 532. At block 656, the BPM 524 reads the associated PRP list from the local CMB 532. At block 658, the DMA writes the data associated with the write command from the local CMB 532 to the NVM. At block 660, the CQM 522 issues a second completion notification to the local CMB 532, and at block 662 the INL 516 generates a second interrupt and sends it to the local CPU mailbox 526.

[0055] After the CPU 542 receives the second interrupt at block 622, the copy command is completed at block 624. During the process of method 600, other read or write operations, such as read or write commands from the host, can be completed simultaneously because the resources of each of the multiple virtual functions (i.e., the one or more first virtual functions and the one or more second virtual functions) are isolated from each other. In one embodiment, method 600 describes a method for garbage collection. In other embodiments, method 600 describes a storage management operation that a data storage device can initiate. For example, method 600 may refer to copying data from a first location in NVM 110 to a second location in NVM 110.

[0056] By including one or more second virtual functions accessible only by the firmware or CPU of the data storage device, the operation flow initiated by the data storage device and the operation flow of the data storage device initiated by the host device can be interleaved and the performance of the data storage device can be enhanced.

[0057] In one embodiment, a data storage device includes a non-volatile storage unit and a volatile memory unit, the volatile memory unit including one or more first volatile memory locations, one or more second volatile memory locations, and a controller memory buffer (CMB). The data storage device also includes a controller coupled to the non-volatile storage unit and the volatile memory unit. The controller is configured to receive one or more read, write, or copy commands from a host to read data from the non-volatile storage unit, write data to the non-volatile storage unit, or both, route the received one or more read or write commands to one or more first virtual function locations, and copy data from the first location of the non-volatile storage unit to the second location of the non-volatile storage unit using the CMB, wherein copying the data from the first location to the second location utilizes one or more second virtual function locations.

[0058] The data storage device also includes an inbound multiplexer (mux) module, such as an advanced extensible interface (AXI), wherein the inbound mux module is configured to filter one or more inbound host read or write commands to the controller. The data storage device also includes a central processing unit (CPU), wherein the CPU is configured to access the one or more second volatile memory locations using the AXI inbound mux module. The one or more first virtual function locations are accessible by the host. The one or more second virtual function locations are hidden from the host. Copying data also includes executing multiple read commands for multiple data stored in the non-volatile storage unit, and executing a first write command to write multiple data associated with the multiple read commands to a continuous area of ​​the non-volatile storage unit.

[0059] In another embodiment, a data storage device is provided, the data storage device comprising a non-volatile storage unit and a volatile memory unit, the volatile memory unit comprising one or more first volatile memory locations, one or more second volatile memory locations, and a controller memory buffer (CMB). The data storage device also includes an inbound multiplexer (mux), and a controller coupled to the non-volatile storage unit, the volatile memory unit, and the AXI inbound mux. The data storage device also includes a central processing unit (CPU) coupled to the controller, wherein the CPU is configured to receive a copy command or a self-generated garbage collection decision from the controller, generate a plurality of read commands, write the plurality of read commands to the CMB, generate a physical region page (PRP) or a scatter gather list (SGL) for the plurality of read commands directed to the CMB, issue a first doorbell for the plurality of read commands, generate a first write command, generate a PRP for the first write command directed to the CMB, issue a second doorbell for the first write command, and program data associated with the first write command to the non-volatile storage device.

[0060] The CPU is further configured to wait for a first interrupt from the controller to arrive after issuing the first doorbell. The reading includes the controller detecting the first doorbell and notifying the submission queue manager, the submission queue manager obtaining the multiple read commands from the CMB, the buffer pointer manager (BPM) reading the relevant PRP from the CMB, the direct memory access (DMA) reading the data associated with the multiple read commands from the non-volatile storage unit to the CMB, the completion queue manager (CQM) programming the first completion notification to the CMB, and the interrupt logic (INL) programming the first interrupt message to the CPU mailbox, wherein the CPU includes the CPU mailbox. The CPU waits to receive the first interrupt message, wherein the CPU is configured to determine whether the multiple read commands have been written to the CMB. The CPU further determines whether the first completion notification has arrived. The writing includes detecting the second doorbell by the controller and notifying the submission queue manager, obtaining the first write command from the CMB by the submission queue manager, reading the related PRP from the CMB by the buffer pointer manager (BPM), writing the data associated with the first write command to the non-volatile storage unit to the CMB by direct memory access (DMA), programming the second completion notification to the CMB by the completion queue manager (CQM), and programming the second interrupt message to the CPU mailbox by the interrupt logic (INL), wherein the CPU includes the CPU mailbox. The CPU waits for receiving the second interrupt message. The receiving the second interrupt message corresponds to completing the copy command received by the controller.

[0061] In another embodiment, a data storage device includes a non-volatile storage unit, a volatile memory unit including one or more first volatile memory locations and one or more second volatile memory locations, a device for routing one or more read or write commands received from a host to one or more first virtual function locations, wherein the one or more first virtual function locations complete the received one or more read or write commands, and a controller memory buffer (CMB) for copying data from the first location of the volatile storage unit to the second location of the non-volatile storage unit, wherein copying the data from the first location to the second location utilizes the one or more second virtual function locations.

[0062] The CMB is part of a volatile memory unit. The volatile memory unit includes a plurality of CMBs. At least one of the plurality of CMBs is hidden from a host. The data storage device also includes an inbound multiplexer (mux). The data storage device also includes a plurality of registers coupled to the inbound mux.

[0063] While the foregoing is directed to embodiments of the present disclosure, other and further embodiments of the present disclosure may be envisaged without departing from the basic scope of the present disclosure, and the scope of the present disclosure is determined by the appended claims.

Claims

1. A data storage device, comprising: Non-volatile storage unit; A volatile memory unit, the volatile memory unit comprising a controller memory buffer (CMB), wherein: The CMB includes one or more first volatile memory locations associated with one or more first virtual functions and one or more second volatile memory locations associated with one or more second virtual functions; Each of the one or more first virtual functions is respectively associated with a virtual host of the host; Each of the one or more first virtual functions is associated with a respective first set of resources of the data storage device; Each of the one or more second virtual functions is associated with a respective second set of resources of the data storage device that is different from the first set of resources; The second set of resources is inaccessible to the host; and The one or more second virtual functions are configured to copy previously stored data associated with the one or more first virtual functions from a first location of the non-volatile storage unit to a second location of the non-volatile storage unit; and a controller coupled to the non-volatile storage unit and the volatile memory unit, and configured to: receiving one or more read, write, or copy commands from the host to read data from the nonvolatile storage unit, write data to the nonvolatile storage unit, or both; routing the received one or more read or write commands to one or more first volatile memory locations; and and utilizing the one or more second volatile memory locations of the CMB to copy the data, wherein copying the data includes moving the data from the first location of the non-volatile storage unit to the second location of the non-volatile storage unit using the one or more second virtual functions, wherein routing the received one or more read or write commands and executing the received one or more read or write commands occur simultaneously with copying the data using the one or more second volatile memory locations of the CMB.

2. The data storage device according to claim 1, further comprising an Advanced eXtensible Interface inbound multiplexer module (AXI inbound mux module), wherein the AXI inbound mux module is configured to filter one or more inbound host read or write commands to the controller.

3. The data storage device of claim 2, further comprising a central processing unit (CPU), wherein the CPU is configured to utilize the inbound mux module to access the one or more second volatile memory locations.

4. The data storage device of claim 1, wherein the one or more first volatile memory locations are accessible by the host.

5. The data storage device of claim 1, wherein the one or more second volatile memory locations are hidden from the host.

6. The data storage device of claim 1 , wherein copying the data further comprises executing a plurality of read commands for a plurality of data stored in the nonvolatile memory cell, and executing a first write command to write the plurality of data associated with the plurality of read commands into a continuous area of ​​the nonvolatile memory cell.

7. A data storage device, comprising: Non-volatile storage unit; A volatile memory unit, the volatile memory unit comprising a controller memory buffer (CMB), wherein: The CMB includes one or more first volatile memory locations associated with one or more first virtual functions and one or more second volatile memory locations associated with one or more second virtual functions; Each of the one or more first virtual functions is respectively associated with a virtual host of the host; Each of the one or more first virtual functions is associated with a respective first set of resources of the data storage device; Each of the one or more second virtual functions is associated with a respective second set of resources of the data storage device that is different from the first set of resources; The second set of resources is inaccessible to the host; and The one or more second virtual functions are configured to copy previously stored data associated with the one or more first virtual functions from a first location of the non-volatile storage unit to a second location of the non-volatile storage unit; Advanced eXtensible Interface inbound multiplexer, i.e. AXI inbound mux; a controller coupled to the nonvolatile storage unit, the volatile memory unit, and the AXI inbound mux; and A central processing unit, i.e., a CPU, is coupled to the controller, wherein the CPU is configured to: receiving a copy command or a self-generated garbage collection decision from the controller; generating a plurality of read commands for data stored in the first location of the non-volatile storage unit, wherein the data is associated with the one or more first virtual functions; writing the plurality of read commands to the CMB using the one or more second virtual functions; generating a physical region page (PRP) or a scatter-gather list (SGL) for the plurality of read commands directed to the CMB; issuing a first doorbell for the plurality of read commands; generating a first write command; generating a PRP for the first write command directed to the CMB; issuing a second doorbell in response to the first write command; and The one or more second virtual functions are used to program the data associated with the first write command to the second location of the non-volatile storage unit, wherein the second location is different from the first location, wherein the one or more second virtual functions are used to program the data associated with the first write command to the second location of the non-volatile storage unit simultaneously with the execution of the command associated with the one or more first virtual functions.

8. The data storage device according to claim 7, wherein the CPU is further configured to wait for a first interrupt from the controller to arrive after issuing the first doorbell.

9. The data storage device of claim 8, wherein reading comprises: detecting, by the controller, the first doorbell and notifying a submission queue manager; Obtaining, by the submission queue manager, the plurality of read commands from the CMB; The buffer pointer manager BPM reads the relevant PRP from the CMB; reading the data associated with the plurality of read commands from the nonvolatile storage unit to the CMB by direct memory access (DMA); programming, by a completion queue manager CQM, a first completion notification to said CMB; and A first interrupt message is programmed by interrupt logic INL to a CPU mailbox, wherein the CPU comprises the CPU mailbox. 10 . The data storage device of claim 9 , wherein the CPU is configured to determine whether the plurality of read commands have been written to the CMB when the CPU receives the first interrupt message.

11. The data storage device of claim 10, wherein the CPU further determines whether the first completion notification has arrived.

12. The data storage device of claim 9, wherein writing comprises: detecting, by the controller, the second doorbell and notifying a submission queue manager; Obtaining, by the submission queue manager, the first write command from the CMB; The buffer pointer manager BPM reads the relevant PRP from the CMB; Writing the data associated with the first write command to the non-volatile storage unit to the CMB by direct memory access (DMA); programming, by the completion queue manager CQM, a second completion notification to said CMB; and A second interrupt message is programmed by the interrupt logic INL to a CPU mailbox, wherein the CPU comprises the CPU mailbox.

13. The data storage device of claim 12, wherein the CPU is further configured to receive the second interrupt message.

14. The data storage device of claim 13, wherein receiving the second interrupt message corresponds to completing the copy command received by the controller.

15. A data storage device, comprising: A non-volatile storage device; a volatile memory device comprising one or more first volatile memory locations and one or more second volatile memory locations; as well as a controller coupled to the non-volatile memory device and the volatile memory device, wherein the controller includes a controller memory buffer (CMB), wherein: The CMB includes one or more first volatile memory locations associated with one or more first virtual functions and one or more second volatile memory locations associated with one or more second virtual functions; Each of the one or more first virtual functions is respectively associated with a virtual host of the host; Each of the one or more first virtual functions is associated with a respective first set of resources of the data storage device; Each of the one or more second virtual functions is associated with a respective second set of resources of the data storage device that is different from the first set of resources; The second set of resources is inaccessible to the host; and The one or more second virtual functions are configured to copy previously stored data associated with the one or more first virtual functions from a first location of the non-volatile storage device to a second location of the non-volatile storage device, and wherein the controller is configured to: routing one or more read or write commands received from the host to one or more first volatile memory locations, wherein the one or more first volatile memory locations complete the received one or more read or write commands; and Copying data using the one or more second volatile memory locations of the CMB, wherein copying the data includes utilizing the one or more second virtual functions to move the data from the first location of the non-volatile storage device to the second location of the non-volatile storage device, wherein routing the one or more read or write commands occurs simultaneously with copying the data using the one or more second volatile memory locations of the CMB.

16. The data storage device of claim 15, wherein the CMB is a part of the volatile memory device.

17. The data storage apparatus of claim 16, wherein the volatile memory device comprises a plurality of CMBs.

18. The data storage device of claim 17, wherein at least one CMB of the plurality of CMBs is hidden from the host.

19. The data storage device of claim 15, further comprising an inbound multiplexer (inbound mux).

20. The data storage device of claim 19, further comprising a plurality of registers coupled to the inbound mux.