Consistent access to persistent storage area scopes

By converting DMA requests into high-priority NVMe commands and processing them in the buffer, the data consistency problem when DMA and NVMe accesses are parallel is solved, and efficient read and write coordination of non-volatile memory is achieved. Data consistency is ensured.

CN114968855BActive Publication Date: 2024-10-01SANDISK TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110648114.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-02-18
Filing Date
2021-06-10
Publication Date
2024-10-01
Estimated Expiration
2041-06-10

AI Technical Summary

Technical Problem

In the direct memory access mode, when DMA and NVMe access work in parallel, there are complications in maintaining data consistency, especially when accessing the same data, which is difficult to effectively solve with existing technology.

Method used

Ensures consistency between reads and writes by converting DMA requests into dedicated NVMe commands with higher priority and storing the payload in a buffer after internal execution Read-only ensures consistency in the host's reading and writing of the same area.

Benefits of technology

It effectively solves the problem of data consistency when DMA and NVMe access in parallel, improves the coordination and efficiency of the host's read and write operations on non-volatile memory, and ensures the integrity of data in the PMR area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968855B_ABST
    Figure CN114968855B_ABST
Patent Text Reader

Abstract

The present invention is entitled "Consistent Access to Ranges of Persistent Storage Regions". The present invention discloses a method and system for maintaining consistency between a DMA data path and an NVMe data path. When DMA requests are received in a PMR region, the device controller converts these requests into NVMe commands with a dedicated queue that is hidden from the host and has a higher priority than the corresponding host (NVMe) command. The payload returned from the internally executed NVMe command is stored in a buffer that is used to complete the DMA request. When a memory read is submitted, the controller will mark the corresponding LBA range for overlap, thereby ensuring consistency between these reads and writes from other queues. Since the internal PMR queue has a higher priority than the host-facing queue (e.g., NVMe) and the PMR is read-only, consistency between host reads and writes to the same area can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is a continuation-in-part of co-pending U.S. patent application Ser. No. 15 / 847,671, filed Dec. 19, 2017, which is hereby incorporated by reference herein. Background Art Technical Field

[0003] Embodiments of the present disclosure relate generally to direct memory access, and more particularly to maintaining data consistency of data within a PMR range.

[0004] Description of Related Art

[0005] The memory of a computer system may consist of a primary memory, such as volatile memory, and a secondary memory or memory storage device, such as non-volatile memory. Communications between the memory storage device and the central processing unit (CPU) of the computer are defined by a command set and protocol that specifies instructions for read / write access, and by a host programming interface over which those commands are transmitted. Communication protocols have been defined to enable faster adoption of memory storage devices connected to a host through a bus, such as a peripheral computer expansion bus, and to achieve interoperability of memory storage devices.

[0006] The CPU accesses data from the memory storage device by communicating via various physical layers, link layers, host interface layers, memory management layers, data path layers, and flash translation layers between the host and the memory storage device. The time delay of each communication between the host and the memory storage device adds a significant amount of time to the data acquisition / execution cycle time.

[0007] In direct memory access (DMA) mode, a host device (such as a CPU or GPU) can access a portion of non-volatile memory mapped to a persistent memory region (PMR) via a peripheral component interface (PCI) bus to participate in read-only memory transactions. In addition, such a host can also participate in memory transactions via the non-volatile memory express (NVMe) protocol.

[0008] Conventionally, DMA access and NVMe access occur on separate paths. This can cause complexity in the implementation because DMA access and NVMe access work in parallel to maintain data consistency when accessing the same data via these two paths.

[0009] Therefore, there is a need for improved systems and methods for maintaining data consistency. Summary of the invention

[0010] The present disclosure as a whole relates to a method and system for maintaining data consistency between DMA memory transactions and NVMe memory transactions on a non-volatile memory (NVM) in a non-volatile memory (NVM). When DMA requests are received in a PMR area, the device controller converts these requests into NVMe commands in a dedicated queue that is hidden from the host and has a higher priority than the corresponding host (NVMe) command. The payload returned from the internally executed NVMe command is stored in a buffer that is used to complete the DMA request. When a memory read is submitted, the controller marks the corresponding logical block address (LBA) range for overlap, thereby ensuring consistency between these reads and writes from other queues. Since the internal PMR queue has a higher priority than the host-facing queue (e.g., NVMe) and the PMR is read-only, consistency between host reads and writes to the same area can be achieved.

[0011] In one embodiment, a controller is disclosed, the controller comprising: a memory including computer-readable instructions for a method for driver-free access of a non-volatile memory of a non-volatile memory device by a host; and a processor configured to execute the executable instructions. In certain embodiments, the executable instructions cause the controller to: initialize a PCIe memory space that maps a portion of the non-volatile memory of the non-volatile memory to the host memory space via a PCIe link between the host and the non-volatile memory device; and send a load / store command to the PCIe memory space for driver-free access. The executable instructions further cause the controller to: place the load / store command in a persistent memory region (PMR) queue of the non-volatile memory device; and aggregate the load / store command of the PMR queue with one or more commands of a non-volatile memory express (NVMe) queue.

[0012] In another embodiment, a data storage device is disclosed, the data storage device including a controller configured to perform a method of accessing a non-volatile memory of a non-volatile memory device by a host driver and accessing the non-volatile memory of the non-volatile memory device without a driver. In certain embodiments, the method includes: initializing a PCIe memory space, which maps a portion of the non-volatile memory of the non-volatile memory device to the host memory space through a PCIe link between the host and the non-volatile memory device; initializing the PCIe configuration space using configuration information of the non-volatile memory device; and sending a load / store command to the PCIe memory space for driver-free access. The method further includes: sending a read / write command to the NVMe drive of the host using the configuration information of the non-volatile memory device for driver access; and providing the load / store command and the read / write command to the aggregate command queue for processing by the non-volatile memory device.

[0013] In another embodiment, a system for storing data is disclosed, the system comprising: one or more non-volatile memory devices; and a controller device configured to perform a method for maintaining consistency between PMR and NVMe data transactions. In certain embodiments, the method comprises: establishing a PCIe link between a host and a non-volatile memory device and establishing an NVMe link between the host and the non-volatile memory device; initializing a PCIe memory space, the PCIe memory space mapping one or more portions of a non-volatile memory of the non-volatile memory device to the host memory space via a PCIe link between the host and the non-volatile memory device; and sending a load / store command to the PCIe memory space for driver-free access. The method further comprises: placing the load / store command in a persistent memory region (PMR) queue of the non-volatile memory device; and aggregating the load / store command of the PMR queue with one or more read / write commands of a non-volatile memory express (NVMe) queue. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] 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.

[0015] Figure 1A A schematic diagram of one embodiment of a system including an initiator or host and a non-volatile memory device for the host is depicted.

[0016] Figure 1BA schematic diagram depicting one embodiment of a memory address space of a host and a memory mapping of a non-volatile memory of a non-volatile memory device.

[0017] Figure 2 Depicted is a schematic diagram illustrating one embodiment of drive access and driver-free access to non-volatile memory of a non-volatile memory device.

[0018] Figure 3 A schematic diagram illustrating one embodiment of driven access and driver-free access by a peripheral device to a non-volatile memory of a non-volatile memory device is depicted.

[0019] Figure 4 Depicted is a schematic diagram showing one embodiment of a write path for drive-free access by a host to non-volatile memory of a non-volatile memory device.

[0020] Figure 5 A schematic diagram illustrating one embodiment of a method of operating a NVM device in a drive-free access mode is depicted.

[0021] Figure 6 A schematic diagram of one embodiment of a controller for a non-volatile memory device having an anomaly detector module is depicted.

[0022] Figure 7 A schematic diagram illustrating one embodiment of a method of operating a non-volatile memory device in a direct access mode and detecting potential security violations is depicted.

[0023] Figure 8 A schematic diagram depicting one embodiment of a memory mapped region.

[0024] Fig.9A and Fig. 9B A schematic diagram depicting one embodiment of an NVMe queue structure.

[0025] Fig. 10A and Fig. 10B A schematic diagram depicting one embodiment of a PMR cohort structure.

[0026] Fig.11 A schematic diagram illustrating one embodiment of a method of accessing a PMR is depicted.

[0027] Fig.12 A schematic diagram illustrating one embodiment of a driverless access method for NVM is depicted.

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

[0029] 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.

[0030] The present disclosure provides a method and system for maintaining data consistency between DMA memory transactions and NVMe memory transactions on non-volatile memory (NVM) in NVM. When DMA requests are received in a PMR area, the device controller converts these requests into NVMe commands with a dedicated queue that is hidden from the host and has a higher priority than the corresponding host (e.g., NVMe) command. The payload returned from the internally executed NVMe command is stored in a buffer that is used to complete the DMA request. When submitting a memory read, the controller will mark the corresponding LBA range for overlap, thereby ensuring consistency between these reads and writes from other queues. Since the internal PMR queue has a higher priority than the host-oriented queue (e.g., NVMe) and the PMR is read-only, consistency between host reads and writes to the same area can be achieved.

[0031] Figure 1AA schematic diagram of one embodiment of a system 100 including an initiator or host 150 and an NVM device 102 (such as an SSD) for the host 150 is depicted. The host 150 can utilize the NVM 106 included in the NVM device 102 to write data and read data, such as for memory storage, main memory, cache memory, backup memory, or redundant memory. The NVM device 102 can be an internal storage drive, such as a notebook hard drive or a desktop hard drive. The NVM device 102 can be a removable mass storage device, such as, but not limited to, a handheld removable memory device, such as a memory card (e.g., a secure digital (SD) card, a micro secure digital (micro-SD) card, or a multimedia card (MMC)) or a universal serial bus (USB) device, provided that such storage devices support a communication protocol that enables direct access to memory. The NVM device 102 can take the form of an embedded mass storage device (such as an eSD / eMMC embedded flash drive) embedded in the host 150. NVM device 102 may also be any other type of internal storage device, removable storage device, embedded storage device, external storage device, or network storage device.

[0032] Host 150 may include a wide variety of devices, such as computer servers, network attached storage (NAS) units, desktop computers, notebook (i.e., laptop) computers, tablet computers (i.e., "smart" tablets), set-top boxes, telephone handsets (i.e., "smart" phones), televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, and automotive applications (i.e., mapping, autonomous driving). In certain embodiments, host 150 includes any device having a processing unit or any form of hardware capable of processing data, including a general-purpose processing unit, dedicated hardware (such as an application-specific integrated circuit (ASIC)), configurable hardware (such as a field programmable gate array (FPGA)), or any other form of processing unit configured by software instructions, microcode, or firmware.

[0033] The host 150 includes a central processing unit (CPU) 152 connected to a memory address space 154 (such as DRAM or other main memory) through a root complex 153. The root complex 153 may be integrated with the CPU 152, or may be a separate component. Applications may be stored in the memory address space 154 for execution by components of the host 150. The host 150 includes a bus 156 (such as a storage device interface) that interacts with the host interface 101 of the NVM device 102. The bus 156 and the host interface 101 operate under a communication protocol 118, 120 (such as a peripheral component interface Express (PCIe) serial communication protocol or other suitable communication protocols). Other suitable communication protocols include Ethernet or any protocol related to remote direct memory access (RDMA), such as Infiniband, iWARP, or RDMA over Converged Ethernet (RoCE) and other suitable serial communication protocols.

[0034] In the PCIe communication protocol, host 150 sends commands as transaction packets (TLPs). The TLP includes an address field that specifies that the read or write information being sought is located in NVM 106 of NVM device 102. The TLP may include other fields such as an Fmt field, a type field, a TC field, a TD field, a CRC field, a length field, a requester ID field, a tag field, and other fields. Controller 110 may use the address field to access data at a specified location.

[0035] NVM 106 of NVM device 102 may be configured for long-term storage of information as a non-volatile memory space and retain information after power on / off cycles. NVM 106 may be composed of one or more dies of NAND flash memory. Other examples of non-volatile memory include phase change memory, ReRAM memory, MRAM memory, magnetic media (including shingled magnetic recording), optical disks, floppy disks, electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), and other solid-state memories. The magnetic media non-volatile memory may be one or more disks in NVM device 102. Each disk may contain one or more regions consisting of one or more data tracks. NVM 106 may include one or more types of non-volatile memory.

[0036] The controller 110 manages the operation of the non-volatile memory device 102, such as writing to and reading from the NVM 106. The controller 110 may include one or more processors 130, which may be multi-core processors. The processor 130 processes the components of the NVM device 102 through firmware code. The controller 110 interacts with the host 150 through the host interface 101, which may include a mac component and a phy component. The host interface 101 interacts with the NVM 106 through the NVM interface 114.

[0037] Controller 110 may operate under the NVM Express (NVMe) protocol, but other protocols may also be applicable. NVMe is a communication interface / protocol developed for SSDs to operate with hosts and storage devices connected via a PCIe interface. The interface provides a command queue and completion path for SSDs (such as SSDs with NVM 106 of NAND flash memory). NVMe includes support for enterprise capabilities such as end-to-end data protection, enhanced error reporting, and virtualization.

[0038] The controller 110 also includes a volatile memory 112 or cache buffer for short-term storage or temporary storage during operation of the NVM device 102. The volatile memory 112 does not retain stored data if power is lost. Examples of volatile memory include random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), and other forms of volatile memory.

[0039] The controller 110 executes computer-readable program code (e.g., software or firmware) executable instructions (referred to herein as “instructions”). The instructions may be executed by various components of the controller 110, such as the processor 130, logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers, embedded microcontrollers, and other components of the controller 110.

[0040] The instructions are stored in a non-transitory computer-readable storage medium. In some embodiments, the instructions are stored in a non-transitory computer-readable storage medium of the NVM device 102, such as a read-only memory (ROM) 113 or NVM 106. The instructions stored in the NVM device 102 can be executed without input or instructions added from the host 150. In other embodiments, the instructions are transmitted from the host 150. The stored instructions can be stored in whole or in part in the volatile memory 112 of the controller 110 for execution by the controller. The controller 110 is configured with hardware and instructions for performing the various functions described herein and shown in the figures.

[0041] The NVM device 102 may also be connected to the host 150 via a switch or a bridge. The system 100 may also include a peripheral device 190, such as a camera, connected to the bus 156 of the host 150 or connected to the host 150 via a switch or a bridge. The system 100 may also include a second host (not shown) connected to the host 150 via a switch or a bridge.

[0042] Figure 1B yes Figure 1A 1 is a schematic diagram of a memory address space 154 of a host 150 and a memory map 155 of an NVM 106 of an NVM device 102. The memory map 155 is described with reference to the system 100, but other systems may also be applicable. The memory map 155 shows both a driver-free access mode and a driver access mode of the NVM 106 of the NVM device 102 established by the host 150.

[0043] In the drive access mode, the host 150 may activate one BAR 124 of the NVM device 102 implemented in the PCIe configuration space corresponding to DeviceA_bar0. The PCIe configuration space stores configuration information of the NVM device 102. The host 150 accesses the configuration information of the NVM device 102 to implement drive access through the NVMe driver layer of the host 150 and the NVM device 102, thereby accessing the NVM portions 106A to 106E of the NVM device 102.

[0044] In the driverless access mode, the host 150 may activate another BAR 124 of the NVM device 102 implemented in the PCIe memory space or virtual memory space corresponding to DeviceA_bar2. The host 150 maps the internal registers of the NVM portion 106B to the memory address space 154B of the host 150. The host 150 may directly read and write to the addresses of the memory address space 154B, wherein the PCIe communication protocol automatically transmits the read command and the write command to the NVM device 102. The host 150 may activate an additional BAR 124 of the NVM device 102 in the driverless access mode to provide access to another portion of the NVM 106 of the NVM device 102. For example, the host may activate an additional BAR 124 of the NVM implemented in the PCIe memory space corresponding to DeviceA_bar4 to map the internal registers of the NVM portion 106D to the memory address space 154C of the host 150.

[0045] The host 150 may establish driver-free access and / or driver access to a second device (such as a peripheral device or a second NVM device). For example, the second PCIe device may activate a BAR implemented in the PCIe configuration space corresponding to DeviceB_bar0 to provide driver access to the second PCIe device.

[0046] Figure 2 A schematic diagram is depicted showing one embodiment of NVMe-based host access 200 or driver access to the NVM 230 of the NVM device 202 as described with reference to the system 100 of FIG. 1 , but other systems may also be applicable. The NVMe-based host access 200 includes the host 250 managing the NVM device 202 through commands initiated by the application 210 of the host 250. The application 210 of the host 250 sends a command, such as a read or write command, to the file system layer 212 of the host 250. The file system layer 212 passes the command to the NVMe device driver 214 of the host 250. The NVMe device driver 214 can load queue messages from the DRAM 216 of the host 250 and store the queue messages to the DRAM of the host. The NVMe driver 214 passes the read / write command to the PCIe layer 218 of the host 250, which operates under the PCIe communication protocol.

[0047] The PCIe layer 220 of the NVM device 202 receives a command from the host 250 and passes the command to the NVMe layer 222 of the NVM device 202. The NVMe layer 222 converts the command into the NVMe protocol and passes the command to the front-end layer 224 of the NVM device 202. The front-end layer 224 of the NVM device 202 may include cache management and consistency management of the NVM 230 of the NVM device 202. The front-end layer 224 passes the read / write command to the data path layer 226 of the NVM device 202. The data path layer 226 accesses the flash translation layer (FTL) module 228 to determine the physical address associated with the logical address of the command. The data path layer 226 accesses the NVM 230 to read or write the data associated with the command. The data path layer 226 receives the command from the front-end layer 224 and receives the address information from the FTL module 228 to initiate the read / write operation to the NVM 230. In summary, when the application 210 provides an NVMe-based access command to the NVM device 202, the command is passed from the application 210 to the file system layer 212, to the NVMe driver 214, to the host's PCIe layer 218, to the NVM device's PCIe layer 220, to the NVMe layer 222, to the front end, to the data path layer 226 that accesses the FTL module 228, and to the NVM 230.

[0048] Figure 2Also shown is one embodiment of a driverless access route 240 to the NVM 230, where the NVM 230 is mapped to the memory space of the host 250. For example, the application 210 of the host 250 passes a driverless access command to the PCIe layer 218 of the host 250. The PCIe layer 220 of the NVM device 202 receives the driverless access command from the host 250 and passes the driverless access command to the data path layer 226 of the NVM device 202. The data path layer 226 module initiates a read / write operation to the NVM 230. In summary, when the application 210 provides a driverless access command to the NVM device 202, the command is passed from the application 210 to the PCIe layer 218 of the host, to the PCIe layer 220 of the NVM device, to the data path layer 226, and to the NVM 230.

[0049] In the driver-free access route 240, the controller 110 is instructed to bypass the NVMe file system table and treat the BAR as a virtual to physical address mapping. For example, the BAR corresponding to the physical portion of the NVM 230 can be dynamically mapped to a logical block address. The PCIe protocol enables mapping of LBA ranges to its own virtual memory address space and allows driver-free access to these LBAs using PCIe transactions, thereby bypassing the NVMe layer. The PCIe protocol is used to bypass the NVMe layer by mapping specific LBA ranges and then directly addressing those LBAs through the PCIe layer. The host 250 can directly access the address space via PCIe and read or write to the address space.

[0050] In certain embodiments, in the driver-free access route 240, the controller 110 may aggregate or bundle multiple driver-free access requests into a burst operation to the NVM interface 114. Multiple driver-free access commands may be aggregated in the volatile memory 112. The NVM interface 114 may perform the burst operation as a single request to the NVM 106. For NVM 106 including NAND flash memory, the burst operation may increase performance because the idle time of the NAND flash memory die may be reduced.

[0051] In certain aspects, PCIe converts NVM 230 in NVM device 202 into a memory hole, exposing the memory hole to the memory address space in host 250. The PCIe protocol maps the memory hole to the memory address space on host 250. NVM 230 may appear as simple memory to CPU 152, thereby reducing commit and completion latency and increasing effective bandwidth utilization.

[0052] In some embodiments, serial PCIe is used to dynamically map an allocated portion of physical memory to a virtual address space in a host device. For example, in an embodiment where the system operates under the PCIe protocol or any of its derivatives, the device can be mapped to the host memory address space via a BAR.

[0053] In the driver-free access mode, a portion of the NVM 230 is mapped into the memory space of the host 250 for a certain period of time. The allocated portion of the NVM 230 may be a subset of the NVM 230 to reduce complexity. The driver-free access route 240 may include cooperation with the FTL module 228, wherein the data path layer 226 accesses the FTL module 228 for address translation. In other embodiments, the driver-free access route 240 may include bypassing the FTL module 228. By bypassing the FTL module 228 of the NVM device 202, the host 250 directly manages the NVM 230, such as by performing and managing address translation.

[0054] The mapping of physical addresses to the virtual address space of the application 210 provides driver-free access to a specific address range through the CPU's load / store memory transactions rather than through regular read / write host transactions. The load / store memory transactions are routed to the NVM device 102 instead of being routed to the DRAM 216. By bypassing the NVMe driver 214 of the host 250 and the NVMe layer 222 of the NVM device 202, driver-free access to the NVM 230 reduces latency between the host 250 and the NVM device 202.

[0055] Figure 3A schematic diagram is depicted showing one embodiment of NVMe-based host access 300 or drive access to the NVM 330 of the NVM device 302 by a peripheral device 390 (such as a camera) described with reference to the system of FIG. 1 , but other systems may also be applicable. For example, a peripheral device 390 (such as a PCIe peripheral device) may provide data to be written to a DRAM 316. The DRAM 316 sends the data to a file system layer 312. The file system layer 312 passes the data to an NVMe driver 314 of a host 350. The NVMe driver 314 passes the data to a PCIe layer 318 of the host 350. The PCIe layer 320 of the NVM device 302 receives the data from the host 350 and passes the data to an NVMe layer 322 of the NVM device 302. The NVMe layer 322 passes the data to a front-end layer 324 of the NVM device 302. The front-end layer 324 of the NVM device 302 passes the data to a data path layer 326 of the NVM device 302. The data path layer 326 accesses the FTL module 328 to determine the physical block address associated with the logical address of the data. The data path layer 326 accesses the NVM 330 to write the data to the NVM 330. In summary, when the peripheral device 390 provides NVMe-based access to the NVM 330, the data is passed from the peripheral device 390 to the DRAM 316, to the file system layer 312, to the NVMe driver 314, to the PCIe layer 318 of the host, to the PCIe layer 320 of the NVM device, to the NVMe layer 322, to the front-end layer 324, to the data path layer 326 that accesses the FTL module 328, and to the NVM 330.

[0056] Figure 3 One embodiment of a write path of a driverless access route 340 to NVM 330 is also shown. In one embodiment of a write path of a driverless access route 340, a peripheral device provides data to be written to PCIe layer 318 of host 350. PCIe layer 320 of NVM device 302 receives the data from host 350 and passes the data to data path layer 326 of NVM device 302. Data path layer 326 accesses NVM 330 to write the data to NVM 330. In summary, when peripheral device 390 provides driverless write data to NVM 330, the data passes from peripheral device 390 to PCIe layer 318, to PCIe layer 320 of NVM device 302, to data path layer 326, and to NVM 330.

[0057] A much shorter PCIe to PCIe route is enabled by the driver-free access route 340. In the driver-free access route 340, the controller 110 is instructed to bypass the NVMe file system table and treat the allocated BAR as a virtual to physical address mapping. The PCIe protocol enables mapping of LBA ranges to its own virtual memory address space and allows direct access to these LBAs using PCIe transactions, thereby bypassing the NVMe layer. The PCIe protocol is used to bypass the NVMe layer by mapping specific LBA ranges and then directly addressing those LBAs through the PCIe layer. The host 350 can directly access this address space via PCIe and read or write to the address space.

[0058] In certain embodiments, in the driver-free access route 340, the controller 110 may aggregate or bundle multiple driver-free access requests into a burst operation to the NVM interface 114. Multiple driver-free access commands may be aggregated in the volatile memory 112. The NVM interface 114 may perform the burst operation as a single request to the NVM device 102. For an NVM device 102 that includes NAND flash memory, the burst operation may increase performance because the idle time of the NAND flash memory die may be reduced.

[0059] The driver-free access route 340 may include cooperation with the FTL module 328, wherein the data path layer 326 accesses the FTL module 328 for address translation. In other embodiments, the driver-free access route 340 may include bypassing the FTL module 328. By bypassing the FTL module 328 of the NVM device 302, the host 350 directly manages the NVM 330, such as by performing and managing address translation.

[0060] The mapping of physical addresses to the virtual address space assigned to the peripheral device 390 provides driver-free access to a specific address range through the CPU's load / store memory transactions rather than through regular read / write host transactions. By bypassing the NVMe driver 314 of the host 350 and the NVMe layer 322 of the NVM device 302, the driver-free access to the NVM 330 reduces the latency between the peripheral device 390 and the NVM device 302.

[0061] In some embodiments, host 350 may configure peripheral device 390 to correspond to a BAR of an allocated portion of NVM 106 of NVM device 102, such as by writing configuration commands to a PCIe controller of host 350 and / or NVM device 302. In some embodiments, the allocated BAR memory may be accessed by peripheral device 390 (or a second host) without involving an operating system of host 350, such as by firmware or other components of host 350 accessing the allocated BAR memory.

[0062] In certain aspects, the driver-free access route 340 avoids routing data (such as data to be written) which would be buffered in the DRAM 316 and then routed to the file system layer 312, the NVMe driver 314, and then to the PCIe layer 318. If a BAR allocation is made, the data can be routed directly to the NVM 330 of the NVM device 302 through the memory aperture.

[0063] In certain aspects, the driverless access route 340 provides improved performance for sequentially writing data from a peripheral device 390 (such as a camera) to the NVM 330 of the NVM device 302. For example, the sequential writing of data may include a large amount of data written in a sequential pattern to the pages of the NVM 330. The driverless access route 340 may provide low latency, high bandwidth access to the NVM 330 by bypassing communication protocols (such as NVMe) and other layers in the host 350 and the NVM device 302.

[0064] The driver-free access route 340 can also be used to perform in-place code execution on code stored on the peripheral device 390. For example, in the NVMe-based host access 300, the peripheral device 390 can provide a pending command to the DRAM 316. The DRAM 316 sends the pending command to the file system layer 312. The file system layer 312 passes the pending command to the NVMe driver 314 of the host 350. The NVMe driver 314 passes the pending command to the PCIe layer 318 of the host 350. The PCIe layer 320 of the NVM device 302 receives the pending command from the host 350 and passes the pending command to the NVMe layer 322 of the NVM device 302 for execution.

[0065] In the driverless access route 340, the peripheral device 390 can provide commands to be executed from code stored on the peripheral device 390 to the PCIe layer 318 of the host 350. The PCIe layer 318 directly sends the commands to be executed to the PCIe layer 320 of the NVM device 302. The PCIe layer 320 of the NVM device 302 executes the commands. The driverless access route 340 allows commands from code stored on the peripheral device 390 to be executed directly and avoids storing the code in the DRAM 316 of the host 350 and bypassing other layers of the host 350 and the NVM device 302. Therefore, the driverless access route 340 can provide low latency execution of code stored on the peripheral device 390.

[0066] Figure 4A schematic diagram is depicted showing one embodiment of a method 400 for accessing the NVM 106 of the NVM device 102 by the host 150 as described with reference to the system 100 of FIG. 1 , although other systems may also be applicable. The method 400 includes accessing the NVM 106 of the NVM device 102 by the host 150 in both a drive access mode and a driverless access mode. One or more blocks of the method 400 may be performed by the CPU 152, the controller 110, or other controller executing computer-readable program code (e.g., software or firmware) executable instructions stored in the NVM device 102 or the host 150.

[0067] At block 410, a portion of NVM 106 is dynamically mapped by host 150 via a communication protocol, such as via a PCIe protocol, into a memory address space 154 of host 150. The size of the portion of NVM may be dynamically allocated by the host based on the requirements or needs of the host. Host 150 may dynamically map NVM 106 into the memory address space 154 of host 150 by activating one or more BARs corresponding to respective portions of NVM 106 of NVM device 102.

[0068] At block 420 , the controller 110 of the NVM device 102 receives the driverless access command. For example, the driverless access command may be received through the memory aperture 236 , which maps the portion of the NVM 106 into the memory address space 154 .

[0069] At block 430, the driverless access command is routed to bypass a host interface protocol layer, such as the NVMe layer.

[0070] At block 440, in response to the driverless access command, the portion of the NVM 106 mapped in the memory address space 154 of the host 150 is accessed. For example, the portion of the NVM 106 mapped in the memory address space 154 may be accessed through the memory aperture 236. The host 150 and the NVM device 102 may be aligned on an alignment size to complete the driverless access command. In some embodiments, for NVMs that are programmed and read by multiple bytes, such as when the NVM comprises NAND flash memory, the alignment size may be greater than one byte.

[0071] Blocks 410, 420, 430, 440 may be repeated to remap another portion of the NVM 106 into the memory address space 154 of the host 150 via the communication protocol. For example, a second BAR may be activated corresponding to another portion of the NVM 106. The NVM 106 may be remapped into the memory address space 154 of the host 150 via the communication protocol to change the allocated size of the NVM 106.

[0072] At block 450, a drive access command is received for execution by a controller of a non-volatile memory device. The drive access command may be through a host interface, such as an NVMe interface.

[0073] At block 460 , the drive access command is routed to the host interface protocol layer. For example, the drive access command is routed to the host interface protocol layer of the host through the communication protocol of the NVM device 102 .

[0074] At block 470, in response to the drive access command, another portion of NVM 106 of NVM device 102 is accessed through the host interface protocol layer. In one embodiment, two separate portions of NVM may be allocated simultaneously for driver-free access at block 440 and for drive access at block 470. For example, a portion of NVM 106 may be mapped into memory address space 154 of host 150 by activating a BAR corresponding to a portion of NVM 106 of NVM device 102 for driver-free access, and another portion of NVM 106 may be allocated for drive access.

[0075] In another embodiment, overlapping portions of NVM 106 may be allocated for driver-free access at block 440 and for drive access at block 470. For example, one BAR corresponding to the portion of NVM 106 for driver-free access may be active, while drive access may be inactive. Similarly, one BAR corresponding to the portion of NVM 106 for driver-free access may be inactive, while drive access may be active.

[0076] The method 400 provides both driverless access and driver access to the NVM device 102 using the same communication protocol (such as the PCIe communication protocol). The NVM device 102 can complete the driverless access command and the driver access command at the same time using different LBA ranges through the same communication protocol. The NVM device 102 can complete the driverless access command and the driver access command at different times using the same communication protocol using overlapping LBA ranges.

[0077] In some embodiments, the driver access may be NVMe-based access through PCIe. In some embodiments, driver-free access may be achieved by mapping the NVM 106 to the memory address space 154 of the host 150 by a PCIe BAR (such as PCIe BAR4). The host 150 may queue NVMe commands while also sending load / store direct access commands to the PCIe BAR mapped to the NVM 106.

[0078] The host 150 or the peripheral device 190 may use driverless access to reduce latency. Driverless access may be used to reduce latency for sequential data writes / reads to the NVM 106 because buffering of the accessed data may be avoided. Since the NVMe layer and other layers are bypassed in the host 150 and the NVM device 102, driverless access may be used to reduce latency for any type of data (sequential or random). The method 400 may be applied to any access command of the NVM 106 of the NVM device 102, such as a single access command or multiple access commands.

[0079] Figure 5 A schematic diagram is depicted showing one embodiment of a method 500 for operating NVM device 102 in a driver-free access mode as described with reference to system 100 of FIG. 1 , but other NVM devices may also be applicable. One or more blocks of method 500 may be performed by controller 110 executing computer-readable program code (e.g., software or firmware) executable instructions stored in NVM device 102 or host 150.

[0080] At block 510, a PCIe memory space is initialized that maps a portion of the NVM 106 of the NVM device 102 to the host memory space 154. The mapping occurs over a PCIe link between the host 150 and the NVM device 102.

[0081] At block 520, an available or preferred alignment mode is advertised or transmitted by the NVM device 102. The alignment size may be negotiated before or after activating the BAR. The NVM device 102 may advertise a list of preferred alignment modes. Since byte access is not optimal for the NVM 106 for embodiments in which the NVM is programmed and read by multiple bytes, the NVM device 102 may align on the alignment size. For example, the NVM device 102 may transmit or advertise a preferred alignment size of 64 bytes or greater, such as the size of one or more pages of NAND memory. The NVM device 102 may further provide a list of other alignment parameters supported.

[0082] At block 530, an alignment selection for an alignment size is received by the NVM device 102. The alignment selection comes from the host 150 or a peripheral device 190 connected to the host 150. After the alignment size is negotiated, a transaction packet is transmitted at the alignment size or a multiple of the alignment size to complete the driverless access command.

[0083] The NVM device 102 may receive an alignment mode selection for other alignment parameters. As part of this negotiation, a driver-free access mode may be established. For example, the NVM device 102 may be aligned with the host 150 in a dynamic alignment mode, wherein the alignment size varies according to the requirements or needs of the host 150. For example, one or more driver-free access commands are performed at one alignment size, and one or more other driver-free access commands are performed at another alignment size. In other embodiments, the NVM device 102 may be aligned with the host 150 in a static alignment mode, wherein each driver-free access command is performed at the same alignment size (i.e., transaction packets are transmitted at the alignment size or multiples of the alignment size).

[0084] If the NVM device 102 does not receive an alignment selection after the timeout period, the driver-free access mode may be established with a default alignment size. In other embodiments, blocks 520 and 530 may be skipped in a driver-free access mode established with a default alignment size.

[0085] At block 540, a BAR corresponding to a portion of the NVM 106 of the NVM device 102 is activated. After the BAR is activated, transaction packets are transmitted by the host 150 and the NVM device 102 at an alignment size or a multiple of the alignment size. Transaction packets addressed to a logical address of the host memory space 154 are sent to the NVM device 102 bypassing the NVMe layer of the NVM device 102. The BAR may be deactivated to provide driver access to the same portion of the NVM 106 of the NVM device 102. Blocks 510, 520, 530, and 540 may be repeated to activate other BARs 124 of the NVM device 102. Blocks 510, 520, 530, and 540 may be repeated to re-establish a driver-free access mode to the BAR using a different size and / or a different alignment size of the NVM 106 of the NVM device 102.

[0086] At block 550 , the NVM device 102 receives an access request to an activated BAR with an aligned alignment size or a default alignment size in a driver-free access mode.

[0087] In certain aspects of the method 500, the NVM device 102 negotiates and aligns with the host 150 or the peripheral device 190 regarding the access alignment size. The NVM device 102 can provide driver-free access to the host 150 or the peripheral device 190 at a non-byte (more than one byte) resolution. For example, for NVM 106 made of NAND flash memory, it is difficult to support a transaction size of a single byte or several bytes because several bytes are programmed and read per page of the NAND flash array. The host 150 or the peripheral device 190 can select which access alignment size based on performance or application requirements. In certain aspects, driver-free memory access allows the use of dynamic read / write alignment sizes. By looking at the operations planned by the host, the pipeline between the host 150 and the NVM device 102 can be configured to improve performance by selectively using driver-free access to the memory hole 236.

[0088] In certain aspects, reduced latency may be achieved for the host 150, for the NVM device 102, or for both the host 150 and the NVM device 102. The NVMe layer 222, 322 bypassing the NVMe driver 214, 314 of the host 250, 350 and the NVM device 202, 302 may provide reduced latency for the host 150 and / or the NVM device 302. With reduced latency, an increase in throughput of data access writes / reads may be achieved. With reduced latency, a reduction in power consumption of the host 150 and / or the NVM device 102 may be achieved.

[0089] In some aspects, the quality of service (QoS) level or input / output operations per second (IOPS) level during the mapping can be determined. For example, a portion or all of the NVM 106 of the NVM device 102 can be mapped to the memory address space 154 of the host 150 to provide flexible QoS or IOPS levels. The host 150 can communicate to allocate resources under agreed or certain parameters. In some embodiments, if low latency is expected, most of the NVM 106 can be allocated to the driver-free access mode. In some embodiments, portions of the NVM 106 can be dynamically allocated as needed for driver-free access. For example, a portion of the NVM 106 can be dynamically BAR mapped and remapped to adjust the amount of storage space required by the host 150.

[0090] In certain embodiments, the host 150 sends driver-free commands to the NAND flash memory by sending the commands through the memory aperture 236, bypassing several hardware and firmware components, to perform debug operations and eliminate errors in the NVM 106 of the NVM device 102. Driver-free access to the NVM 106, such as driver-free access to the NAND flash die, can reduce debug efforts by focusing on key components of the NVM 106 and bypassing physical links and circuits connecting the host 150 and the NVM 106.

[0091] In some embodiments, NVM device 102 may be accessed on a dynamic basis (i.e., the same NVM device may provide both a driver access mode and a driver-free access mode). The two modes may operate in parallel, for example, a BAR for a portion of NVM 106 of NVM device 102 may be allocated for driver-free access, and another portion of NVM 106 of NVM device 102 may be allocated for driver access. In other words, driver-free access and driver access may be different physical addresses for accessing NVM 106 of NVM device 102.

[0092] In certain embodiments, driverless access to NVM 106 of NVM device 102 may be through load / store commands received from host 150 , and driver access may be through read / write commands received from host 150 .

[0093] In some embodiments, NVM 106 appears as memory to CPU 152 in driverless access mode. In an optional embodiment, the communication protocol for driverless access mode can be executed by an intermediate controller. The intermediate controller can optionally perform error checking, buffering of incoming commands, and / or wear leveling. Driverless access can be performed for any system 100 operating under the communication protocol to reduce submission and completion delays and increase effective bandwidth utilization.

[0094] Bypassing one or more components of the chipset of host 150 may reduce the amount of time to transfer data between host 150 and NVM device 102, as compared to routing data through the application processor and / or chipset's main memory (i.e., DRAM). By bypassing one or more components of the chipset during data transfer, power consumption of the chipset may be reduced.

[0095] In some embodiments, communication between host 150 and NVM device 102 may be through several electrical links, each of which is connected by an interconnect switch or protocol bridge adapter. In such embodiments, communication along each link may be negotiated according to different protocols. For example, a command placed in a command queue may be routed through a PCIe root port, switched to a computer networking communication standard link via a network adapter, and then switched back to PCIe before reaching NVM device 102.

[0096] In certain aspects, providing driverless access to the NVM 106 of the NVM device 102 in the embodiments described herein, other driverless access through the PCIe protocol, other direct access through the PCIe protocol, or other direct access through other communication protocols (collectively referred to as "direct access") can make the NVM device 102 vulnerable to security violations. Direct access may reduce the effectiveness of standard security protection tools operating at the host level. For example, in the direct access mode established between the host 150 and the NVM device 102, unauthorized or hacker devices or programs can bypass permissions, NVMe security protocols, and other security layers. A hacker device or program can recognize that the NVM device 102 is in direct access mode with the host 150, and can attempt to establish its own access to the NVM device 102 through the mapped memory hole of the NVM 106 to enter the memory address space 154 of the host 150. The hacker device or program can control the mapped portion of the NVM 106. A hacker device or program accessing NVM device 102 through a memory hole may have undesired read and write access to critical areas such as system files, boot files, passwords, management tables, firmware, and erase / invalid data. Such security violations may be difficult to detect.

[0097] Figure 6 A schematic diagram of one embodiment of a controller 610 of a NVM device with an anomaly detector module 620 is shown. The controller 610 may be implemented in the NVM device 102 of FIG. 1 , but other NVM devices may also be suitable.

[0098] Figure 7 Depicted is shown by Figure 6 102, but other NVM devices may also be applicable. The method 700 includes providing access to the NVM 106 of the NVM device 102 in a direct access mode, and detecting potential security violations. The method 700 is described with reference to the system 100 and the controller 610, but other systems and controllers may also be used. One or more blocks of the method 700 may be performed by the controller 610 executing computer-readable program code (e.g., software or firmware) executable instructions stored in the NVM device 102.

[0099] At block 710, the parameter tracking module 630 of the controller 610 tracks or monitors one or more parameters associated with the direct access command of the host 150. One possible parameter includes the logical block address (i.e., the starting LBA address and the ending LBA address) accessed in the direct access transaction. Another possible parameter includes the timing of the direct access command (i.e., when the direct access transaction occurs). Another possible parameter includes the size of the data accessed in the direct access transaction. Another possible parameter includes the source of the direct access transaction (i.e., the source of the command from the host 150 or from the peripheral device 190). Another possible parameter includes the type of access command (i.e., read access, write access). Other parameters that are tracked or monitored are also possible. In other embodiments, the NVM device 102 may track the content of the data programmed or read in the direct access transaction. For example, the NVM device 102 may track the zero pattern written, the one pattern written, and / or the ratio of zeros to ones written in the direct access transaction.

[0100] One or more parameters are tracked from the PCIe layer 690 of the controller 610, thereby providing direct access to the NVM 106. Tracking or monitoring direct access transactions of the host 150 may include tracking or monitoring all direct access transactions, or may include tracking or monitoring a sample or a portion of direct access transactions. In certain embodiments, multiple transactions may be tracked or monitored to create a history of transactions. For each transaction in the multiple transactions tracked or monitored, one or more parameters may be tracked or monitored. The rate of change of one or more parameters may be determined during the course of multiple transactions. For example, the rate of access to certain logical block addresses may be tracked or monitored.

[0101] At block 720, the normal pattern fitting module 640 of the controller 610 determines a threshold value for a normal behavior pattern. The threshold value for a normal behavior pattern may be determined by one or more parameters tracked at block 710, by the content of access data tracked at block 710, by data accumulated in performance testing, and / or by an offline setting. The threshold value for a normal behavior pattern may be updated as new information is accumulated from block 710. In one aspect, the NVM device 102 determines patterns of parameters collected at block 710 or statistics or probabilities of transactions or parameters of transaction occurrence.

[0102] In one embodiment, block 720 may be performed online while NVM device 102 is in operation. In another embodiment, the threshold behavior pattern may be set by a user mode page while NVM device 102 is in operation. In another embodiment, block 720 may be performed offline, such as during authentication of NVM device 102. For example, a lookup table or dictionary of normal behavior may be created offline and uploaded to NVM device 102.

[0103] At block 730, the anomaly determination module 650 of the controller 110 determines whether the threshold behavior pattern determination determined at block 720 has exceeded a threshold for a normal behavior pattern. For example, the anomaly determination module 650 determines whether the transaction is an outlier of the pattern determined at block 720. In certain embodiments, the determination of whether the threshold for a normal behavior pattern has been exceeded may be based on one or more of the following categories of techniques: unsupervised learning operations (operations based on determining a pattern), supervised learning operations (operations based on data set examples of both normal transactions and abnormal transactions), or semi-supervised learning operations.

[0104] In certain embodiments, determining whether a threshold has been exceeded may be based on one or more of the following techniques: density-based techniques (e.g., K-nearest neighbors, local anomaly factors); subspace- and correlation-based outlier detection for high-dimensional data; a class of support vector machines; replicator neural networks; outlier detection based on cluster analysis; deviations from association rules and frequent item sets; outlier detection and set techniques based on fuzzy logic (i.e., using feature bagging, score normalization, different sources of diversity, etc.). For example, excessive reads / writes to a small portion of the address space may indicate a suspicious direct access transaction. In another example, a pattern of multiple read transactions with isolated write transactions may indicate a suspicious direct access transaction.

[0105] If it is determined at block 730 that the threshold is exceeded, then at block 740, the countermeasure module 660 of the controller 610 may execute a countermeasure. One example of a countermeasure includes providing an alert when a threshold is exceeded or an anomaly is detected. The alert may be sent to the host 150. The alert may also include a confidence level as to whether the detected anomaly is a low security risk, a medium security risk, or a high security risk. The alert may also enable feedback on whether the host approves or disapproves the suspicious transaction.

[0106] Another example of a countermeasure includes identifying the source of the problematic access command by examining the source identified by the root complex 153, such as examining enumeration information. Another example of a countermeasure includes selectively blocking the identified source of the problematic direct access transaction. Another example of a countermeasure includes selectively limiting or delaying access to the identified source of the problematic direct access transaction. If the suspicious direct access command continues, access may be further restricted or delayed.

[0107] Another example of a countermeasure includes creating a log of instances of warnings or exceeding a threshold or detecting anomalies. The log may include one or more parameters tracked at box 710. The log may include a history of instances of warnings or exceeding a threshold or detecting anomalies. The log may include a confidence level of whether the detected anomaly is a low security risk, a medium security risk, or a high security risk. The log may be stored in NVM 106. In one embodiment, the host 150 may view the log. In another embodiment, the controller 610 may use the log in conjunction with other countermeasures. For example, after instances of warnings or thresholds exceeding a certain number, rate (i.e., one quickly followed by another) and / or severity or detecting anomalies, the NVM device 102 may increase the severity of the countermeasure. The anomaly detector module 620 may start with any countermeasure and add to any other countermeasure. For example, the anomaly detector module 620 may start with limiting as a countermeasure, and then if the anomaly continues or increases, a countermeasure is added to prevent it.

[0108] In certain embodiments, anomaly detection of direct access to NVM 106 of NVM device 102 is provided. Anomaly detection by NVM device 102 may identify potential security violations that cannot or are not recognized by host 150. Countermeasures from anomaly detection may be static actions, such as notification to host 150, or active actions, such as limiting access or blocking access. In certain embodiments, if suspicious direct access commands continue, the countermeasures may switch from static actions to active actions.

[0109] In some embodiments, the NVM device 102 provides security protections for direct access transactions. The security protections may include identifying suspicious transactions and may include identifying the source of suspicious direct access commands. The security protections may include implementing countermeasures when suspicious direct access transactions are identified. In some aspects, these security protections may not be bypassed in direct access mode.

[0110] Figure 8 A schematic diagram of one embodiment of a memory mapped region 800 is depicted. The memory mapped region 800 includes a device mapped memory 810 and a host mapped memory 820. The device mapped memory 810 includes a configuration (config) space 812, NVMe registers 814, an MSI-X table 816, and a persistent storage region (PMR) 818. The device mapped memory 810 is accessible by a host and a peer (such as a GPU). The host mapped memory 820 includes a submission queue (SQ) and a completion queue (CQ) pair 822, a host data area 824, and a peer mapping space 826. Using a physical address located in the host DRAM, a data storage device can access the host mapped memory 820.

[0111] Host (such as Figure 1AThe host 150 can utilize the configuration space 812 to configure registers using the PCIe protocol. Similarly, the host 150 can configure the NVMe registers 814. The MSI-X table 816 is used for interrupts, such as those generated during command execution. The PMR 818 is an area of ​​non-volatile memory dedicated to the host 150, used for read-only DMA operations, which is protected from power failure.

[0112] The SQ and CQ pairs 822 store commands that have not yet been executed in the submission queue and completion messages for commands executed in the completion queue. The host data area 824 stores host data, and the peer mapping space 826 is a system processor (such as Figure 1A A storage area accessible by the processor 130).

[0113] Fig.9A and Fig. 9B A schematic diagram depicting one embodiment of the NVMe queue structure. The SQ and CQ are maintained in host memory, such as Figure 8 SQ and CQ pairs 822. Each block represents the location of an SQ entry or a CQ entry. In the current embodiment, each queue has equal weight and a burst size of 1. Commands are pulled sequentially from each queue. Other combinations are also possible, such as higher queue depths, variable weights in each queue, and different burst sizes, which will be reflected in the number of commands retrieved from each queue. In certain embodiments, some commands will have a higher priority than other commands and will be placed closer to the head of a given queue. For example, administrator commands have a higher priority than input / output (I / O) commands, but typically these commands are not aggregated into I / O queues, but have separate internal queues.

[0114] refer to Fig. 9B , the aggregated I / O queue includes each SQ command in the SQ commands (e.g., according to priority), where the SQ commands are aggregated into the aggregated I / O queue from left to right. For example, the first command is taken from SQ1, the second command is taken from SQ2, the third command is taken from SQ3, the fourth command is taken from SQ4, and the fifth command is taken from SQ1. This process continues until there are no more commands in the SQ.

[0115] Fig. 10A and 10B A schematic diagram depicting one embodiment of a PMR cohort structure. Fig. 10A and 10B Similar to Fig.9A and Fig. 9B However, if Fig. 10A As shown, from an NVM device (such as Figure 1A The NVM device 102) maps the PMR range. Fig. 10AThe entries in the PMR range are mapped into the PMR queue, such as Fig. 10B When a direct memory access (DMA) request is received in the PMR area, a controller (such as Figure 1A The controller 110 of the SQ will automatically convert these requests into virtual NVMe commands (i.e., indirect commands) and store them in the PMR queue. In some embodiments, such commands stored in the PMR queue have a higher priority than the corresponding host commands stored in the SQ. The payload returned from the internally executed virtual NVMe command is stored in a buffer that is used to complete the DMA request.

[0116] When submitting memory reads, the controller 110 will mark the corresponding LBA ranges for overlap, thereby ensuring consistency between these reads and writes from other queues. According to some embodiments, since the PMR queue has a higher priority than the host-facing queue (i.e., SQ), the host's access to NVM (such as Figure 1A The consistency of reading and writing of the same area of ​​NVM 106) is as follows. Fig. 10B As shown, the PMR range entry is placed in the PMR queue and first pulled into the aggregate I / O queue. In some examples, if the command has started processing in the aggregate queue, the controller 110 may preempt the PMR queued command. In addition, the PMR queue may include both a submission queue and a command queue for the PMR queued command.

[0117] Fig.11 A schematic diagram illustrating one embodiment of a method 1100 for accessing a PMR is depicted. At block 1110, a controller (such as Figure 1A In some embodiments, the PMR access request may be received by a host (such as a controller 110). Figure 1A host 150) and NVM devices such as Figure 1A The PMR access request is received over a PCIe link between the NVM device 102 and the NVM device 106. The PCIe link may be initialized during NVM device startup, where the PCIe memory space maps a portion of the NVM (such as NVM 106) to the host memory space. The PMR access request may be used for driver-free access. The PMR access request or command may be a direct access command (i.e., a DMA request). In addition, the processor may be configured to perform the same tasks as the controller 110. At block 1120, the controller 110 converts the command to a namespace (NS) / LBA offset and length. At block 1130, internal memory in the NVM is allocated for the command payload.

[0118] At block 1140, a load / store command is generated for the PMR access request. The load / store command is a virtual NVMe indirect command. The load / store command is placed in a PMR queue (such as Fig. 10B At block 1150, the commands of the PMR queue and the commands of the SQ are arbitrated, where the PMR queue has the highest priority. The arbitration queue may be similar to Fig. 10B The aggregated I / O queue shown. Additionally, the SQ may be an NVMe queue. At block 1160, load / store commands in the arbitration queue are processed using the normal read path. However, load / store commands are processed using the internal memory target. At block 1170, the PMR access from the internal memory is completed.

[0119] Fig.12 A schematic diagram illustrating one embodiment of a method 1200 for driverless access of a NVM is depicted. Figure 1A Various aspects of the present invention may be referenced as non-limiting examples in the following description. At block 1210, the controller 110 initializes a PCIe memory space that maps a portion of the NVM 106 of the NVM device 102 to the host memory space via a PCIe link between the host 150 and the NVM device 102. The PCIe memory space is initialized by activating the BAR 124 corresponding to the physical region of the NVM 106 of the NVM device 102. At block 1220, the controller 110 sends a load / store command to the PCIe memory space for driver-free access (i.e., a direct memory access request). The load / store command is a virtual NVMe command generated for indirect access associated with a direct memory access request.

[0120] At block 1230, the load / store command is placed in a PMR queue in the NVM device 102. The PMR may be mapped to a volatile memory 112 of the NVM device 102, such as a DRAM. At block 1240, the load / store command in the PMR queue is aggregated with one or more commands of an NVMe queue, such as multiple SQs. The aggregated command may be similar to Fig. 10B Aggregate I / O queue.

[0121] By including an arbitrary range of PMRs for storage-enabled memory, consistency between direct access and NVMe access may be improved, thereby improving data storage device operation.

[0122] In one embodiment, a controller is disclosed, the controller including a memory and a processor, the memory including computer-readable instructions for a method for driver-free access to a non-volatile memory device by a host, and the processor being configured to execute executable instructions. In certain embodiments, the executable instructions cause the controller to initialize a PCIe memory space, which maps a portion of the non-volatile memory device to the host memory space through a PCIe link between the host and the non-volatile memory device, and sends a load / store command to the PCIe memory space for driver-free access. The executable instructions further cause the controller to place the load / store command in a persistent memory region (PMR) queue of the non-volatile memory device, and aggregate the load / store command of the PMR queue with one or more commands of a non-volatile memory express (NVMe) queue.

[0123] The processor is further configured to cause the system to process the load / store command using the NVMe read path. The processor is further configured to cause the system to process the load / store command at a persistent memory region (PMR) of the non-volatile memory device. At least one of the load / store commands receives a higher priority than at least one of the one or more commands of the NVMe queue. Each load / store in the load / store command has an additional memory allocated to conform to the NVMe command payload size. The PMR queue includes a submission queue and a command queue. The load / store command is placed in the PMR queue by a controller of the non-volatile memory device.

[0124] In another embodiment, a data storage device is disclosed, the data storage device including a controller configured to execute a method for driver access and driver-free access by a host to a non-volatile memory device. In certain embodiments, the method includes: initializing a PCIe memory space that maps a portion of a non-volatile memory device to a host memory space via a PCIe link between the host and the non-volatile memory device; initializing the PCIe configuration space using configuration information of the non-volatile memory device; and sending a load / store command to the PCIe memory space for driver-free access. The method further includes: sending a read / write command to an NVMe drive of the host using the configuration information of the non-volatile memory device for driver access; and providing a load / store command and a read / write command to an aggregate command queue for processing by the non-volatile memory device.

[0125] The PCIe memory space is initialized by activating a BAR corresponding to a physical region of a non-volatile memory device. The NVMe driver sends a read / write command to the NVMe layer of the non-volatile memory device. At least one of the load / store commands receives a higher priority than at least one of the read / write commands. Each of the load / store commands has an additional memory allocated to conform to the command payload size of the read / write command. The load / store command is provided to a persistent memory region (PMR) queue. The PMR queue includes a submission queue and a completion queue. The load / store command is placed in the PMR queue by a controller of the non-volatile memory device.

[0126] In another embodiment, a system for storing data is disclosed, the system comprising: one or more non-volatile memory devices; and a controller device configured to perform a method for maintaining consistency between PMR and NVMe data transactions. In certain embodiments, the method comprises: establishing a PCIe link between a host and a non-volatile memory device and establishing an NVMe link between the host and the non-volatile memory device; initializing a PCIe memory space that maps one or more portions of the non-volatile memory device to the host memory space via a PCIe link between the host and the non-volatile memory device; and sending a load / store command to the PCIe memory space for driver-free access. The method further comprises: placing the load / store command in a persistent memory region (PMR) queue of the non-volatile memory device; and aggregating the load / store command of the PMR queue with one or more read / write commands of a non-volatile memory express (NVMe) queue.

[0127] The method includes receiving at least one of the load / store commands having a higher priority than at least one of the one or more read / write commands of the NVMe queue. The method further includes processing the load / store command at a PMR of the non-volatile memory device. The method further includes processing the load / store command using an NVMe read path. Each of the load / store commands has additional memory allocated to conform to the NVMe read / write command payload size.

[0128] 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 controller, comprising: a memory including computer readable instructions for a method for driver-free access of a non-volatile memory of a non-volatile memory device by a host; as well as a processor configured to execute instructions and cause the controller to: Initializing a peripheral component interconnect express (PCIe) memory space, the PCIe memory space being configured to map a portion of the nonvolatile memory of the nonvolatile memory device to a host memory space through a PCIe link between the host and the nonvolatile memory device; sending a load / store command to the PCIe memory space for driver-free access; Placing the load / store command in a persistent storage region queue, i.e., a PMR queue, of the non-volatile memory device; as well as The load / store commands of the PMR queue are aggregated with one or more read / write commands of a non-volatile memory express queue, i.e., an NVMe queue.

2. The controller of claim 1 , wherein the processor is further configured to cause the controller to process the load / store command using an NVMe read path. 3 . The controller of claim 1 , wherein the processor is further configured to cause the controller to process the load / store command at a PMR of the nonvolatile memory device. 4 . The controller of claim 1 , wherein at least one of the load / store commands receives a higher priority than at least one of the one or more read / write commands.

5. The controller of claim 1 , wherein each of the load / store commands has additional memory allocated to conform to an NVMe command payload size. The controller of claim 1 , wherein the PMR queue comprises a submission queue and a command queue.

7. The controller of claim 1, wherein the load / store command is placed in the PMR queue by a controller of the non-volatile memory device.

8. A data storage device, comprising: A controller configured to execute a method for host-driven access and driver-free access to a non-volatile memory of a non-volatile memory device, the method comprising: Initializing a peripheral component interconnect express (PCIe) memory space, the PCIe memory space being configured to map a portion of the nonvolatile memory of the nonvolatile memory device to a host memory space through a PCIe link between the host and the nonvolatile memory device; Initializing a PCIe configuration space using the configuration information of the non-volatile memory device; Sending a load / store command to a persistent storage region queue, i.e., a PMR queue, of the PCIe memory space for driver-free access; Sending a read / write command to a non-volatile memory express drive, i.e., an NVMe drive, of the host using the configuration information of the non-volatile memory device for drive access; and The load / store commands and the read / write commands are aggregated in an aggregate command queue for processing by the non-volatile memory device.

9. The data storage device of claim 8, wherein the PCIe memory space is initialized by activating a base address register (BAR) corresponding to a physical area of ​​the nonvolatile memory of the nonvolatile memory device.

10. The data storage device of claim 8, wherein the NVMe driver is configured to send read / write commands to an NVMe layer of the non-volatile memory device. 11 . The data storage device of claim 8 , wherein at least one of the load / store commands receives a higher priority than at least one of the read / write commands.

12. The data storage device of claim 8, wherein each of the load / store commands has additional memory allocated to fit a command payload size of the read / write command.

13. The data storage device of claim 8, wherein the load / store command is provided to the PMR queue.

14. The data storage device of claim 8, wherein the PMR queue comprises a submission queue and a completion queue.

15. The data storage device of claim 8, wherein the load / store command is placed in the PMR queue by a controller of the non-volatile memory device.

16. A system for storing data, the system comprising: one or more non-volatile memory devices; and A controller device configured to perform a method for maintaining consistency between persistent storage region data transactions, i.e., PMR data transactions, and non-volatile memory express data transactions, i.e., NVMe data transactions, the method comprising: Establishing a peripheral component interconnect express (PCIe) link between a host and the non-volatile memory device; Establishing an NVMe link between the host and the non-volatile memory device; Initializing a PCIe memory space configured to map one or more portions of the nonvolatile memory of the nonvolatile memory device to a host memory space via the PCIe link between the host and the nonvolatile memory device; sending a load / store command to the PCIe memory space for driver-free access; placing the load / store command in a PMR queue of the non-volatile memory device; and Aggregate the load / store commands of the PMR queue with one or more read / write commands of the NVMe queue. 17 . The system of claim 16 , wherein the method further comprises assigning a higher priority to at least one of the load / store commands than to at least one of the one or more read / write commands.

18. The system of claim 16, wherein the method further comprises processing the load / store command at a PMR of the non-volatile memory device.

19. The system of claim 16, wherein the method further comprises processing the load / store command using an NVMe read path.

20. The system of claim 16, wherein each of the load / store commands has additional memory allocated to conform to an NVMe read / write command payload size.