MEMORY SYSTEM AND CONTROL METHOD - Patent application

By sharing the FTL role between the host and flash storage device, the memory system optimizes I/O performance and resource usage in NAND flash memory systems, addressing the complexity of role division and memory resource consumption.

JP7567009B2Active Publication Date: 2024-10-15KIOXIA CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023171318
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2023-10-02
Publication Date
2024-10-15
Estimated Expiration
2037-10-27

AI Technical Summary

Technical Problem

Controlling NAND flash memory is complex, leading to inefficiencies in I/O performance when creating new interfaces between hosts and storage systems, due to the need for appropriate division of roles between the host and storage, and the consumption of significant memory resources for address translation and garbage collection.

Method used

A memory system where the role of the flash translation layer (FTL) is shared between the host and the flash storage device, with the host handling block-level operations and the storage device managing page-level operations, including garbage collection and low-level abstraction to handle page write order constraints and bad pages.

Benefits of technology

This configuration reduces write amplification, improves storage performance, extends the lifespan of the SSD, and allows for efficient scaling and resource management by minimizing redundant address translations and garbage collection frequency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007567009000001
    Figure 0007567009000001
  • Figure 0007567009000002
    Figure 0007567009000002
  • Figure 0007567009000003
    Figure 0007567009000003
Patent Text Reader

Abstract

To realize a memory system that can improve I / O performance.SOLUTION: A memory system includes: a nonvolatile memory including a plurality of blocks, each being a unit of erase operation and each specified by a block number; and a controller that controls the nonvolatile memory. The controller reads first data from a first block specified by a first block number in response to receiving a copy command specifying at least the first block number from a host, writes the first data to a first position in a second block that is different from the first block, and notifies the host of a first identifier for identifying the first data, a second block number specifying the second block, and an in-first-block physical address indicating the first position within the second block.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] SUMMARY OF THE DISCLOSURE The present invention relates to a technique for controlling a non-volatile memory. [Background technology]

[0002] In recent years, memory systems equipped with nonvolatile memories have become widespread.

[0003] One such memory system is known as a solid-state drive (SSD) based on NAND flash technology.

[0004] Recently, new interfaces between hosts and storage have begun to be proposed. [Prior art documents] [Non-patent literature]

[0005] [Non-Patent Document 1] Yiying Zhang et al., "De-indirection for flash-based SSDs with nameless writes." FAST. 2012, [online], [Retrieved September 13, 2017], Internet<URL: https: / / www.usenix.org / system / files / conference / fast12 / zhang.pdf > Summary of the Invention [Problem to be solved by the invention]

[0006] However, since the control of NAND flash memory is generally complex, when realizing a new interface to improve I / O performance, it is necessary to consider an appropriate division of roles between the host and the storage (memory system).

[0007] An object of the present invention is to provide a memory system and a control method that can improve I / O performance. [Means for solving the problem]

[0008] According to an embodiment, a memory system connectable to a host includes a non-volatile memory including a plurality of blocks, each of which is a unit of an erase operation and each of which is specified by a block number, and a controller electrically connected to the non-volatile memory and controlling the non-volatile memory. In response to receiving a copy command from the host specifying at least a first block number, the controller reads first data from a first block specified by the first block number among the plurality of blocks, writes the first data to a first position in a second block different from the first block among the plurality of blocks, and notifies the host of a first identifier for identifying the first data, a second block number specifying the second block, and a physical address in the first block indicating the first position in the second block. [Brief description of the drawings]

[0009] [Figure 1] FIG. 2 is a block diagram showing the relationship between a host and a memory system (flash storage device) according to an embodiment. [Diagram 2] 1A and 1B are diagrams for explaining the division of roles between a conventional SSD and a host, and the division of roles between a flash storage device and a host in the embodiment. [Diagram 3] FIG. 1 is a block diagram showing an example of the configuration of a computer system in which data transfer between multiple hosts and multiple flash storage devices is performed via a network device. [Figure 4] FIG. 2 is a block diagram showing an example of the configuration of a memory system according to the embodiment. [Diagram 5] 2 is a block diagram showing the relationship between a NAND interface and multiple NAND flash memory dies provided in the memory system of the embodiment. [Figure 6] FIG. 13 is a diagram showing an example of the configuration of a superblock constructed by a set of multiple blocks. [Figure 7] A diagram for explaining a data write operation in which the host specifies a logical address and a block number and the memory system of the embodiment determines a physical address within the block (offset within the block), and a data read operation in which the host specifies a block number and a physical address within the block (offset within the block). [Figure 8] 4 is a diagram for explaining a write command applied to the memory system of the embodiment. [Figure 9] 9 is a diagram for explaining a response to the write command in FIG. 8 . [Figure 10] 4 is a diagram for explaining a Trim command applied to the memory system of the embodiment. [Figure 11] FIG. 2 is a diagram for explaining a block number and an offset that represent a physical address. [Figure 12] FIG. 4 is a diagram for explaining a write operation executed in response to a write command. [Figure 13] 11A and 11B are diagrams for explaining a write operation that skips a defective page. [Figure 14] 11A and 11B are diagrams for explaining another example of a write operation that skips a bad page. [Figure 15] 1A and 1B are diagrams for explaining an operation of writing a pair of a logical address and data to a page in a block. [Figure 16] 13 is a diagram for explaining an operation of writing data to a user data area of ​​a page in a block and writing the logical address of this data to a redundant area of ​​this page. [Figure 17] FIG. 13 is a diagram for explaining the relationship between block numbers and offsets when a superblock is used. [Figure 18] 11 is a diagram for explaining a maximum block number get command applied to the memory system of the embodiment. [Figure 19] FIG. 13 is a diagram for explaining a response to a maximum block number get command. [Figure 20] 4 is a diagram for explaining a block size get command applied to the memory system of the embodiment. [Figure 21] FIG. 13 is a diagram for explaining a response to a block size get command. [Figure 22] 4 is a diagram for explaining a block allocate command (block allocation request) applied to the memory system of the embodiment. [Figure 23] FIG. 13 is a diagram for explaining a response to a block allocate command. [Figure 24] 11 is a sequence chart showing a block information acquisition process executed by the host and the memory system of the embodiment. [Diagram 25] 11 is a sequence chart showing a sequence of a write process executed by a host and the memory system of the embodiment. [Figure 26] 11A and 11B are diagrams showing a data update operation for writing update data for data that has already been written; [Figure 27] 4 is a diagram for explaining an operation of updating a block management table managed by the memory system of the embodiment. [Figure 28] 11 is a diagram for explaining an operation of updating a lookup table (logical-physical address conversion table) managed by a host. [Figure 29] 11 is a diagram for explaining an operation of updating the block management table in response to a notification from a host indicating a block number and a physical address corresponding to data to be invalidated. [Diagram 30] 4 is a diagram for explaining a read command applied to the memory system of the embodiment. [Diagram 31] 4 is a diagram for explaining a read operation executed by the memory system of the embodiment. [Diagram 32] 1A and 1B are diagrams for explaining an operation of reading data portions stored in different physical storage locations in response to a read command from a host. [Diagram 33]11 is a sequence chart showing a sequence of a read process executed by a host and the memory system of the embodiment. [Diagram 34] 4A and 4B are diagrams for explaining garbage collection (GC) control commands applied to the memory system of the embodiment. [Diagram 35] 11A and 11B are diagrams for explaining a GC callback command applied to the memory system of the embodiment. [Diagram 36] 1 is a sequence chart showing the procedure of a garbage collection (GC) operation executed by the host and the memory system of the embodiment. [Figure 37] FIG. 1 is a diagram for explaining an example of a data copy operation executed for garbage collection (GC). [Figure 38] 38 is a diagram for explaining the contents of the host's lookup table that is updated based on the result of the data copy operation of FIG. 37. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] Hereinafter, an embodiment will be described with reference to the drawings.

[0011] First, with reference to FIG. 1, the configuration of a computer system including a memory system according to an embodiment will be described.

[0012] The memory system is a semiconductor storage device configured to write data to and read data from a non-volatile memory. The memory system is implemented as a flash storage device 3 based on NAND flash technology.

[0013] This computer system may include a host (host device) 2 and a plurality of flash storage devices 3. The host 2 may be a server configured to use a flash array constituted by the plurality of flash storage devices 3 as storage. The host (server) 2 and the plurality of flash storage devices 3 are interconnected (internal interconnection) via an interface 50. As the interface 50 for this internal interconnection, PCI Express (PCIe) (registered trademark), NVM Express (NVMe) (registered trademark), Ethernet (registered trademark), NVMe over Fabrics (NVMeOF), etc. may be used, but are not limited to these.

[0014] A typical example of a server that functions as host 2 is a server in a data center.

[0015] In the case where the host 2 is realized by a server in a data center, the host (server) 2 may be connected to a plurality of end user terminals (clients) 61 via a network 51. The host 2 can provide various services to these end user terminals 61.

[0016] Examples of services that can be provided by the host (server) 2 include (1) Platform as a Service (PaaS), which provides a system operating platform to each client (each end-user terminal 61), and (2) Infrastructure as a Service (IaaS), which provides infrastructure such as a virtual server to each client (each end-user terminal 61).

[0017] A number of virtual machines may be executed on this physical server functioning as the host (server) 2. Each of these virtual machines running on the host (server) 2 can function as a virtual server configured to provide various services to a number of corresponding clients (end-user terminals 61).

[0018] The host (server) 2 includes a storage management function for managing a plurality of flash storage devices 3 that constitute a flash array, and a front-end function for providing various services, including storage access, to each of the end-user terminals 61.

[0019] In conventional SSDs, the block / page hierarchical structure of NAND flash memory is hidden by the flash translation layer (FTL) in the SSD. In other words, the FTL of conventional SSDs has the following functions: (1) managing the mapping between each logical address and each physical address of NAND flash memory using a lookup table that functions as a logical-physical address translation table, (2) hiding page-based read / write and block-based erase operations, and (3) performing garbage collection (GC) of NAND flash memory. The mapping between each logical address and the physical address of NAND flash memory is invisible to the host. The block / page structure of NAND flash memory is also invisible to the host.

[0020] On the other hand, a kind of address conversion (application level address conversion) may also be performed in the host. This address conversion uses an application level address conversion table to manage the mapping between each application level logical address and each logical address for the SSD. Also, in order to eliminate fragmentation that occurs in the logical address space for the SSD, a kind of GC (application level GC) is performed in the host to change the data arrangement in this logical address space.

[0021] However, in a redundant configuration in which the host and SSD each have an address translation table (the SSD has a lookup table that functions as a logical-physical address translation table, and the host has an application-level address translation table), huge memory resources are consumed to hold these address translation tables. Furthermore, the double address translation, which includes the host-side address translation and the SSD-side address translation, is also a factor that reduces I / O performance.

[0022] Furthermore, application-level GC on the host side increases the amount of data written to the SSD by several times (e.g., twice) the amount of actual user data. This increase in the amount of data written, combined with the write amplification of the SSD, reduces the storage performance of the entire system and shortens the lifespan of the SSD.

[0023] To solve these problems, one possible solution would be to move all of the FTL functions of conventional SSDs to the host.

[0024] However, to implement this measure, it is necessary for the host to directly handle the blocks and pages of the NAND flash memory. In the NAND flash memory, there is a page write order constraint, so it is difficult for the host to directly handle the pages. In addition, in the NAND flash memory, a block may contain a defective page (bad page). It is even more difficult for the host to handle the bad page.

[0025] Therefore, in this embodiment, the role of the FTL is shared between the host 2 and the flash storage device 3. Generally speaking, the host 2 manages a lookup table that functions as a logical-physical address conversion table, but the host 2 specifies only the block number of a block to which data is to be written and the logical address corresponding to this data, and the position within this block to which this data is to be written (write destination position) is determined by the flash storage device 3. The physical address within the block indicating the determined position within this block (write destination position) is notified to the host 2 by the flash storage device 3.

[0026] In this way, the host 2 only handles blocks and the locations within the blocks (eg pages, locations within pages) are handled by the flash storage device 3 .

[0027] When data needs to be written to the flash storage device 3, the host 2 selects a block number (or requests the flash storage device 3 to allocate a free block) and transmits a write request (write command) to the flash storage device 3, specifying the logical address and the block number of the selected block (or the block number of the allocated block notified by the flash storage device 3). The flash storage device 3 writes the data from the host 2 to the block having the specified block number. In this case, the flash storage device 3 determines a position within this block (write destination position) and writes the data from the host 2 to the position within this block (write destination position). The flash storage device 3 then notifies the host 2 of the physical address within the block indicating the position within this block (write destination position) as a response (return value) to the write request. Hereinafter, the FTL function transferred to the host 2 is referred to as a global FTL.

[0028] The global FTL of the host 2 has functions such as a function for executing storage services, a wear control function, a function for realizing high availability, a de-duplication function that prevents multiple duplicate data portions having the same content from being stored in storage, a garbage collection (GC) block selection function, and a QoS control function. The QoS control function includes a function for determining the access unit for each QoS domain (or for each block). The access unit indicates the minimum data size (grain) that the host 2 can write / read. The flash storage device 3 supports single or multiple access units (grain), and when the flash storage device 3 supports multiple access units, the host 2 can instruct the flash storage device 3 which access unit to use for each QoS domain (or for each block).

[0029] The QoS control function also includes a function for preventing performance interference between QoS domains as much as possible. This function is basically a function for maintaining stable latency.

[0030] On the other hand, the flash storage device 3 can execute low-level abstraction (LLA). LLA is a function for abstraction of NAND-type flash memory. LLA includes a function for concealing defective pages (bad pages) and a function for observing page write order constraints. LLA also includes a GC execution function. The GC execution function copies valid data in a source block (GC source block) specified by the host 2 to a destination block (GC destination block) specified by the host 2. The GC execution function of the flash storage device 3 determines a position (destination position) in the GC destination block to which the valid data should be written, and copies the valid data in the GC source block to the destination position in the GC destination block.

[0031] FIG. 2 shows the division of roles between a conventional SSD and a host, and the division of roles between a flash storage device 3 and a host 2 in this embodiment.

[0032] The left part of FIG. 2 shows the hierarchical structure of the entire computer system including a conventional SSD and a host that executes a virtual disk service.

[0033] A host (server) executes a virtual machine service 101 for providing a plurality of virtual machines to a plurality of end users. In each virtual machine on the virtual machine service 101, an operating system and a user application 102 used by a corresponding end user are executed.

[0034] Furthermore, in the host (server), a plurality of virtual disk services 103 corresponding to a plurality of user applications 102 are executed. Each virtual disk service 103 allocates a part of the capacity of the storage resource in the conventional SSD as a storage resource (virtual disk) for the corresponding user application 102. In each virtual disk service 103, an application level address translation is also executed, which converts an application level logical address into a logical address for the SSD, using an application level address translation table. Furthermore, in the host, an application level GC 104 is also executed.

[0035] The transmission of a command from the host (server) to the conventional SSD and the return of a command completion response from the conventional SSD to the host (server) are performed via an I / O queue 200 present in each of the host (server) and the conventional SSD.

[0036] The conventional SSD includes a write buffer (WB) 301, a lookup table (LUT) 302, a garbage collection function 303, and a NAND type flash memory (NAND flash array) 304. The conventional SSD manages only one lookup table (LUT) 302, and the resources of the NAND type flash memory (NAND flash array) 304 are shared by multiple virtual disk services 103.

[0037] In this configuration, write amplification increases due to overlapping GC including the application level GC 104 under the virtual disk service 103 and the garbage collection function 303 (LUT level GC) in the conventional SSD. Also, in the conventional SSD, an increase in the amount of data written from one end user or one virtual disk service 103 increases the frequency of GC, which may cause a noisy neighbor problem in which the I / O performance for other end users or other virtual disk services 103 deteriorates.

[0038] In addition, the existence of overlapping resources, including the application level address translation table in each virtual disk service and the LUT 302 in a conventional SSD, consumes a lot of memory resources.

[0039] The right part of FIG. 2 shows the hierarchical structure of the entire computer system including the flash storage device 3 and the host 2 of this embodiment.

[0040] A virtual machine service 401 for providing a plurality of virtual machines to a plurality of end users is executed in a host (server) 2. In each virtual machine on the virtual machine service 401, an operating system and a user application 402 used by a corresponding end user are executed.

[0041] Furthermore, in the host (server) 2, a plurality of I / O services 403 corresponding to a plurality of user applications 402 are executed. These I / O services 403 may include an LBA-based block I / O service, a key-value store service, and the like. Each I / O service 403 includes a lookup table (LUT) 411 that manages the mapping between each logical address and each physical address of the flash storage device 3. Here, the logical address means an identifier that can identify the data to be accessed. This logical address may be a logical block address (LBA) that specifies a position in the logical address space, or may be a key (tag) of a key-value store, or may be a hash value of the key.

[0042] In the LBA-based block I / O service, a LUT 411 may be used to manage the mapping between each logical address (LBA) and each physical address of the flash storage device 3.

[0043] In the key-value store service, a LUT 411 may be used that manages a mapping between logical addresses (i.e., key-like tags) and physical addresses indicating physical memory locations in the flash storage device 3 where data corresponding to these logical addresses (i.e., key-like tags) are stored. In this LUT 411, a correspondence between a tag, a physical address where data identified by this tag is stored, and the data length of this data may be managed.

[0044] Each end user can choose which addressing method to use (LBA, key-value store, key, etc.).

[0045] Each of these LUTs 411 does not convert each logical address from the user application 402 into a respective logical address for the flash storage device 3, but converts each logical address from the user application 402 into a respective physical address of the flash storage device 3. In other words, each of these LUTs 411 is a table in which a table for converting logical addresses into physical addresses for the flash storage device 3 and an application level address conversion table are integrated (merged).

[0046] Each I / O service 403 also includes a GC block selection function, which can manage the amount of valid data in each block using the corresponding LUT, thereby selecting a GC source block.

[0047] An I / O service 403 may exist for each of the above-mentioned QoS domains in the host (server) 2. The I / O service 403 belonging to a certain QoS domain may manage mapping between each of the logical addresses used by the user applications 402 in the corresponding QoS domain and each of the block numbers of the block group belonging to the resource group assigned to the corresponding QoS domain.

[0048] The transmission of commands from the host (server) 2 to the flash storage device 3 and the return of responses such as command completion responses from the flash storage device 3 to the host (server) 2 are performed via I / O queues 500 present in both the host (server) 2 and the flash storage device 3. These I / O queues 500 may also be classified into multiple queue groups corresponding to multiple QoS domains.

[0049] The flash storage device 3 includes a plurality of write buffers (WB) 601 corresponding to a plurality of QoS domains, a plurality of garbage collection (GC) functions 602 corresponding to a plurality of QoS domains, and a NAND type flash memory (NAND flash array) 603.

[0050] In the configuration shown on the right side of FIG. 2, the upper hierarchical level (host 2) can recognize block boundaries, and therefore user data can be written to each block taking into consideration block boundaries / block sizes. In other words, the host 2 can recognize each block of the NAND type flash memory (NAND flash array) 603, which allows control such as writing data to an entire block all at once, or invalidating all data in a block by deleting or updating it. As a result, it becomes possible to make it difficult for a situation to occur in which valid data and invalid data are mixed in a single block. Therefore, it is possible to reduce the frequency with which GC needs to be performed. By reducing the frequency of GC, write amplification is reduced, and the performance of the flash storage device 3 can be improved and the lifespan of the flash storage device 3 can be maximized. In this way, a configuration in which the upper hierarchical level (host 2) can recognize block numbers is useful.

[0051] On the other hand, the position within a block where data should be written is determined not by the upper hierarchical level (host 2) but by the flash storage device 3. Therefore, bad pages can be concealed and page write order constraints can be observed.

[0052] FIG. 3 shows a modification of the system configuration of FIG.

[0053] In FIG. 3, data transfer between a plurality of hosts 2A and a plurality of flash storage devices 3 is carried out via a network device (here, a network switch 1).

[0054] That is, in the computer system of FIG. 3, the storage management function of the host (server) 2 of FIG. 1 is transferred to a manager 2B, and the front-end function of the host (server) 2 is transferred to multiple hosts (hosts for end user services) 2A.

[0055] The manager 2B manages a plurality of flash storage devices 3, and allocates storage resources of these flash storage devices 3 to each host (host for end user services) 2A in response to a request from each host (host for end user services) 2A.

[0056] Each host (host for end-user services) 2A is connected to one or more end-user terminals 61 via a network. Each host (host for end-user services) 2A manages a look-up table (LUT) which is the above-mentioned merged logical-physical address conversion table. Each host (host for end-user services) 2A uses its own LUT to manage only the mapping between each logical address used by the corresponding end user and each physical address of the resource assigned to itself. Therefore, this configuration makes it possible to easily scale out the system.

[0057] The global FTL of each host 2A has a function for managing a lookup table (LUT), a function for achieving high availability, a QoS control function, a GC block selection function, and the like.

[0058] The manager 2B is a dedicated device (computer) for managing multiple flash storage devices 3. The manager 2B has a global resource reservation function for reserving storage resources for the capacity requested by each host 2A. In addition, the manager 2B has a wear monitoring function for monitoring the degree of wear of each flash storage device 3, a NAND resource allocation function for allocating reserved storage resources (NAND resources) to each host 2A, a QoS control function, a global clock management function, and the like.

[0059] The low level abstraction (LLA) of each flash storage device 3 has functions such as hiding bad pages, observing page write order constraints, managing write buffers, and executing GC.

[0060] 3, the management of each flash storage device 3 is executed by the manager 2B, so each host 2A only needs to execute the operation of sending an I / O request to one or more flash storage devices 3 assigned to it, and the operation of receiving a response from the flash storage device 3. In other words, data transfer between the multiple hosts 2A and the multiple flash storage devices 3 is executed only via the network switch 1, and the manager 2B is not involved in this data transfer. Also, as described above, the contents of the LUTs managed by each host 2A are independent of each other. Therefore, the number of hosts 2A can be easily increased, making it possible to realize a scale-out type system configuration.

[0061] FIG. 4 shows an example of the configuration of the flash storage device 3.

[0062] The flash storage device 3 comprises a controller 4 and a non-volatile memory (NAND type flash memory) 5. The flash storage device 3 may also comprise a random access memory, for example a DRAM 6.

[0063] The NAND flash memory 5 includes a memory cell array including a plurality of memory cells arranged in a matrix. The NAND flash memory 5 may be a two-dimensional NAND flash memory or a three-dimensional NAND flash memory.

[0064] The memory cell array of the NAND flash memory 5 includes a plurality of blocks BLK0 to BLKm-1. Each of the blocks BLK0 to BLKm-1 is organized by a number of pages (here, pages P0 to Pn-1). The blocks BLK0 to BLKm-1 function as erase units. A block may also be referred to as an "erase block," a "physical block," or a "physical erase block." Each of the pages P0 to Pn-1 includes a plurality of memory cells connected to the same word line. The pages P0 to Pn-1 are the units of data write and read operations.

[0065] The controller 4 is electrically connected to a NAND flash memory 5, which is a non-volatile memory, via a NAND interface 13, such as Toggle or an Open NAND Flash Interface (ONFI). The controller 4 is a memory controller (control circuit) configured to control the NAND flash memory 5.

[0066] As shown in FIG. 5, the NAND flash memory 5 includes a plurality of NAND flash memory dies. Each NAND flash memory die is a non-volatile memory die including a memory cell array including a plurality of blocks BLK and a peripheral circuit for controlling the memory cell array. Each NAND flash memory die can operate independently. Therefore, the NAND flash memory die functions as a parallel operation unit. The NAND flash memory die is also called a "NAND flash memory chip" or a "non-volatile memory chip." FIG. 5 illustrates a case in which 16 channels Ch1, Ch2, ... Ch16 are connected to the NAND interface 13, and the same number of NAND flash memory dies (e.g., two dies per channel) are connected to each of these channels Ch1, Ch2, ... Ch16. Each channel includes a communication line (memory bus) for communicating with the corresponding NAND flash memory die.

[0067] The controller 4 controls the NAND flash memory dies #1 to #32 via channels Ch1, Ch2, ..., Ch16. The controller 4 can drive the channels Ch1, Ch2, ..., Ch16 simultaneously.

[0068] The 16 NAND flash memory dies #1 to #16 connected to the channels Ch1 to Ch16 may be organized as a first bank, and the remaining 16 NAND flash memory dies #17 to #32 connected to the channels Ch1 to Ch16 may be organized as a second bank. The bank functions as a unit for operating multiple memory modules in parallel by bank interleaving. In the configuration example of FIG. 5, a maximum of 32 NAND flash memory dies can be operated in parallel by 16 channels and bank interleaving using two banks.

[0069] In this embodiment, the controller 4 may manage a plurality of blocks (hereinafter referred to as superblocks), each of which is made up of a plurality of blocks BLK, and may execute an erase operation in units of superblocks.

[0070] Although not limited thereto, the superblock may include a total of 32 blocks BLK selected one by one from the NAND flash memory dies #1 to #32. Each of the NAND flash memory dies #1 to #32 may have a multi-plane configuration. For example, when each of the NAND flash memory dies #1 to #32 has a multi-plane configuration including two planes, one superblock may include a total of 64 blocks BLK selected one by one from the 64 planes corresponding to the NAND flash memory dies #1 to #32. FIG. 6 illustrates a case where one superblock SB is composed of a total of 32 blocks BLK (blocks BLK surrounded by a thick frame in FIG. 5) selected one by one from the NAND flash memory dies #1 to #32.

[0071] 4, the controller 4 includes a host interface 11, a CPU 12, a NAND interface 13, and a DRAM interface 14. The CPU 12, the NAND interface 13, and the DRAM interface 14 are interconnected via a bus 10.

[0072] The host interface 11 is a host interface circuit configured to perform communication with the host 2. The host interface 11 may be, for example, a PCIe controller (NVMe controller). The host interface 11 receives various requests (commands) from the host 2. These requests (commands) include a write request (write command), a read request (read command), and various other requests (commands).

[0073] The CPU 12 is a processor configured to control the host interface 11, the NAND interface 13, and the DRAM interface 14. In response to power-on of the flash storage device 3, the CPU 12 loads a control program (firmware) from the NAND flash memory 5 or a ROM (not shown) into the DRAM 6, and executes this firmware to perform various processes. The firmware may be loaded onto an SRAM (not shown) in the controller 4. The CPU 12 can execute command processing and the like for processing various commands from the host 2. The operation of the CPU 12 is controlled by the above-mentioned firmware executed by the CPU 12. A part or all of the command processing may be executed by dedicated hardware in the controller 4.

[0074] The CPU 12 can function as a write operation control unit 21, a read operation control unit 22, and a GC operation control unit 23. In the write operation control unit 21, the read operation control unit 22, and the GC operation control unit 23, an application program interface (API) is implemented to realize the system configuration shown in the right part of FIG.

[0075] The write operation control unit 21 receives a write request (write command) that specifies a block number and a logical address from the host 2. The logical address is an identifier that can identify the data (user data) to be written, and may be, for example, an LBA, or a tag such as a key of a key-value store, or a hash value of the key. The block number is an identifier that specifies the block to which this data should be written. As the block number, various values ​​that can uniquely identify any one of a plurality of blocks may be used. The block specified by the block number may be a physical block or the above-mentioned superblock. When receiving a write command, the write operation control unit 21 first determines a position (write destination position) in a block (write destination block) having the specified block number to which data from the host 2 should be written. Next, the write operation control unit 21 writes the data (write data) from the host 2 to the write destination position of the write destination block. In this case, the write operation control unit 21 can write not only the data from the host 2 but also both the data and the logical address of the data to the write destination block.

[0076] Then, the write operation control unit 21 notifies the host 2 of the intra-block physical address indicating the above-mentioned write destination position in this write destination block. This intra-block physical address is represented by an intra-block offset indicating the write destination position in this write destination block.

[0077] In this case, the offset within the block indicates the offset from the beginning of the destination block to the destination position, that is, the offset of the destination position relative to the beginning of the destination block. The size of the offset from the beginning of the destination block to the destination position is indicated as a multiple of a granularity (Grain) having a size different from the page size. The granularity (Grain) is the access unit described above. The maximum value of the size of the granularity (Grain) is limited to the block size. In other words, the offset within the block indicates the offset from the beginning of the destination block to the destination position as a multiple of a granularity having a size different from the page size.

[0078] The grain may have a size smaller than the page size. For example, if the page size is 16K bytes, the grain may have a size of 4K bytes. In this case, a plurality of offset positions, each of which has a size of 4K bytes, are defined in one block. The intra-block offset corresponding to the first offset position in the block is, for example, 0, the intra-block offset corresponding to the next offset position in the block is, for example, 1, and the intra-block offset corresponding to the next offset position in the block is, for example, 2.

[0079] Alternatively, the grain may have a size larger than the page size. For example, the grain may be several times the size of the page size. If the page size is 16 Kbytes, the grain may be 32 Kbytes in size.

[0080] In this way, the write operation control unit 21 determines by itself a write destination position within a block having a block number from the host 2, and writes the write data from the host 2 to this write destination position within this block. Then, the write operation control unit 21 notifies the host 2 of an intra-block physical address (intra-block offset) indicating this write destination position as a response (return value) corresponding to the write request. Alternatively, the write operation control unit 21 may notify the host 2 of a set of a logical address, a block number, and an intra-block physical address (intra-block offset) instead of notifying the host 2 of only the intra-block physical address (intra-block offset).

[0081] Therefore, the flash storage device 3 can conceal page write order constraints, bad pages, page sizes, etc., while allowing the host 2 to handle block numbers.

[0082] As a result, the host 2 can recognize block boundaries but can manage which user data resides in which block number without being aware of page write order constraints, bad pages, or page sizes.

[0083] When the read operation control unit 22 receives a read request (read command) specifying a physical address (i.e., a block number and an offset within the block) from the host 2, the read operation control unit 22 reads data from the physical storage location of the read target in the read target block based on the block number and offset within the block. The block to be read is identified by the block number. The physical storage location of the read target in this block is identified by the offset within the block. By using this offset within the block, the host 2 does not need to handle different page sizes for each generation of NAND flash memory.

[0084] To obtain the physical memory location of the read target, the read operation control unit 22 may first divide this intra-block offset by the number of granularities representing the page size (if the page size is 16K bytes and the granularity is 4K bytes, the number of granularities representing the page size is 4), and then determine the quotient and remainder obtained by this division as the page number and intra-page offset of the read target, respectively.

[0085] When the GC operation control unit 23 receives from the host 2 a GC control command specifying a source block number (GC source block number) and a destination block number (GC destination block number) for garbage collection of the NAND flash memory 5, it selects a block having the specified source block number and a block having the specified destination block number as the source block (GC source block) and the destination block (GC destination block) from multiple blocks in the NAND flash memory 5. The GC operation control unit 23 determines a destination position in the GC destination block to which valid data stored in the selected GC source block should be written, and copies the valid data to the destination position in the GC destination block.

[0086] Then, the GC operation control unit 23 notifies the host 2 of the logical address of the valid data, the copy destination block number, and the intra-block physical address (intra-block offset) indicating the copy destination position within the GC destination block.

[0087] Management of valid data / invalid data may be performed using a block management table 32. This block management table 32 may exist for each block, for example. In the block management table 32 corresponding to a certain block, a bitmap flag indicating the validity / invalidity of each piece of data in this block is stored. Here, valid data means data that is associated with a logical address as the latest data and has the possibility of being read by the host 2 later. Invalid data means data that has no possibility of being read by the host 2 any more. For example, data associated with a certain logical address is valid data, and data that is not associated with any logical address is invalid data.

[0088] As described above, the GC operation control unit 23 determines a position (destination position) in a destination block (GC destination block) to which valid data stored in a source block (GC source block) should be written, and copies the valid data to the determined position (destination position) in the destination block (GC destination block). In this case, the GC operation control unit 23 may copy both the valid data and the logical address of the valid data to the destination block (GC destination block).

[0089] In this embodiment, as described above, the write operation control unit 21 can write both the data from the host 2 (write data) and the logical address from the host 2 to the write destination block. Therefore, the GC operation control unit 23 can easily obtain the logical address of each piece of data in the copy source block (GC source block) from this copy source block (GC source block), and can easily notify the host 2 of the logical address of the copied valid data.

[0090] The NAND interface 13 is a memory control circuit configured to control the NAND flash memory 5 under the control of the CPU 12. The DRAM interface 14 is a DRAM control circuit configured to control the DRAM 6 under the control of the CPU 12. A part of the storage area of ​​the DRAM 6 is used for storing a write buffer (WB) 31. Another part of the storage area of ​​the DRAM 6 is used for storing a block management table 32. The write buffer (WB) 31 and the block management table 32 may be stored in an SRAM (not shown) in the controller 4.

[0091] FIG. 7 shows a data write operation in which the host 2 specifies a logical address and a block number and the flash storage device 3 determines a physical address within the block (offset within the block), and a data read operation in which the host 2 specifies a block number and a physical address within the block (offset within the block).

[0092] The data write operation is performed in the following procedure.

[0093] (1) When the write processing unit 412 of the host 2 needs to write data (write data) to the flash storage device 3, the write processing unit 412 may request the flash storage device 3 to allocate a free block. The controller 4 of the flash storage device 3 includes a block allocating unit 701 that manages a group of free blocks in the NAND type flash memory 5. When the block allocating unit 701 receives this request (block allocation request) from the write processing unit 412, the block allocating unit 701 allocates one free block from the group of free blocks to the host 2 and notifies the host 2 of the block number (BLK#) of the allocated block.

[0094] Alternatively, in a configuration in which the write processing unit 412 manages the free block group, the write processing unit 412 may select the write destination block by itself.

[0095] (2) The write processing unit 412 sends to the flash storage device 3 a write request that specifies the logical address (for example, LBA) corresponding to the write data and the block number (BLK#) of the write destination block.

[0096] (3) The controller 4 of the flash storage device 3 includes a page allocator 702 that allocates pages for writing data. When the page allocator 702 receives a write request, the page allocator 702 determines an intra-block physical address (intra-block PBA) indicating a write destination position within a block (write destination block) having a block number specified by the write request. The intra-block physical address (intra-block PBA) can be expressed by the above-mentioned intra-block offset (also simply referred to as offset). The controller 4 writes the write data from the host 2 to the write destination position within the write destination block based on the block number and intra-block physical address (intra-block PBA) specified by the write request.

[0097] (4) The controller 4 notifies the host 2 of the intrablock physical address (intrablock PBA) indicating the write destination position as a response to the write request. Alternatively, the controller 4 may notify the host 2 of a set of a logical address (LBA) corresponding to the write data, a block number (BLK#) of the write destination block, and an intrablock PBA (offset) indicating the write destination position as a response to the write request. In other words, the controller notifies the host 2 of either the intrablock physical address or a set of a logical address, a block number, and an intrablock physical address. In the host 2, the LUT 411 is updated so that the physical address (block number, intrablock physical address (intrablock offset)) indicating the physical memory position where the write data is written is mapped to the logical address of this write data.

[0098] The data read operation is performed in the following procedure.

[0099] (1)'When the host 2 needs to read data from the flash storage device 3, the host 2 refers to the LUT 411 and obtains from the LUT 411 the physical address (block number, physical address within the block (offset within the block)) corresponding to the logical address of the data to be read.

[0100] (2)' The host 2 sends a read request specifying the obtained block number and physical address within the block (offset within the block) to the flash storage device 3. When the controller 4 of the flash storage device 3 receives this read request from the host 2, the controller 4 identifies the block to be read and the physical memory location of the read target based on the block number and the physical address within the block, and reads data from the physical memory location of the read target in the block to be read.

[0101] FIG. 8 shows a write command applied to the flash storage device 3 .

[0102] The write command is a command that requests writing of data to the flash storage device 3. This write command may include a command ID, a block number BLK#, a logical address, a length, and the like.

[0103] The command ID is an ID (command code) that indicates that this command is a write command, and the write command includes a command ID for the write command.

[0104] The block number BLK# is an identifier (block address) that can uniquely identify the block in which data is to be written.

[0105] The logical address is an identifier for identifying the write data to be written. As described above, this logical address may be an LBA, a key of a key-value store, or a hash value of the key. If the logical address is an LBA, the logical address (start LBA) included in this write command indicates the logical location (first logical location) where the write data should be written.

[0106] The length indicates the length of the write data to be written. This length (data length) may be specified by the number of granularities (Grains), may be specified by the number of LBAs, or the size may be specified by bytes.

[0107] When a write command is received from the host 2, the controller 4 determines a write destination location within a block having a block number specified by the write command. This write destination location is determined taking into consideration page write order constraints, bad pages, etc. Then, the controller 4 writes the data from the host 2 to this write destination location within this block having the block number specified by the write command.

[0108] FIG. 9 shows a response to the write command of FIG.

[0109] This response includes a physical address within the block and a length. The physical address within the block indicates the position (physical memory position) within the block where the data is written. The physical address within the block can be specified by an offset within the block, as described above. The length indicates the length of the written data. This length (data length) may be specified by the number of grains, may be specified by the number of LBAs, or the size may be specified by bytes.

[0110] Alternatively, this response may further include a logical address and a block number in addition to the physical address and length within the block. The logical address is the logical address included in the write command in Fig. 8. The block number is the logical address included in the write command in Fig. 8.

[0111] FIG. 10 shows the Trim command applied to the flash storage device 3.

[0112] This Trim command includes a block number and a physical address within the block (offset within the block) that indicate the physical memory location where the data to be invalidated is stored. In other words, this Trim command can specify a physical address, not a logical address such as an LBA. This Trim command includes a command ID, a physical address, and a length.

[0113] The command ID is an ID (command code) that indicates that this command is a Trim command, and the Trim command includes a command ID for the Trim command.

[0114] The physical address indicates the first physical memory location where the data to be invalidated is stored. In this embodiment, this physical address is specified by a combination of a block number and an offset (offset within the block).

[0115] The length indicates the length of the data to be invalidated. This length (data length) may be specified by the number of grains or by bytes.

[0116] The controller 4 manages flags (bitmap flags) indicating whether each piece of data included in each of a plurality of blocks is valid / invalid, using the block management table 32. When a Trim command including a block number and an offset (offset in block) indicating the physical storage location where the data to be invalidated is stored is received from the host 2, the controller 4 updates the block management table 32 and changes the flag (bitmap flag) corresponding to the data at the physical storage location corresponding to the block number and offset in block included in the Trim command to a value indicating invalid.

[0117] FIG. 11 shows an offset within a block that defines a physical address within a block.

[0118] The block number specifies one block BLK. Each block BLK includes multiple pages (here, page 0 to page n) as shown in FIG.

[0119] In the case where the page size (user data storage area of ​​each page) is 16 Kbytes and the grain size is 4 KB, this block BLK is logically divided into 4×(n+1) areas.

[0120] Offset +0 points to the first 4KB region of page 0, offset +1 points to the second 4KB region of page 0, offset +2 points to the third 4KB region of page 0, and offset +3 points to the fourth 4KB region of page 0.

[0121] Offset +4 points to the first 4KB region of page 1, offset +5 points to the second 4KB region of page 1, offset +6 points to the third 4KB region of page 1, and offset +7 points to the fourth 4KB region of page 1.

[0122] FIG. 12 shows a write operation performed in response to a write command.

[0123] Now, assume that block BLK#1 is assigned as the write destination block, and the controller 4 writes data to block BLK#1 in units of pages in the order of page 0, page 1, page 2, ..., page n.

[0124] In FIG. 11, it is assumed that a write command specifying a block number (=BLK#1), a logical address (LBAx), and a length (=4) is received from the host 2 in a state where 16K bytes of data have already been written to page 0 of the block BLK#1. The controller 4 determines page 1 of the block BLK#1 as the write destination location, and writes the 16K bytes of write data received from the host 2 to page 1 of the block BLK#1. Then, the controller 4 returns an offset (offset in the block) and a length to the host 2 as a response to this write command. In this case, the offset (offset in the block) is +5, and the length is 4. Alternatively, the controller 4 may return a logical address, a block number, an offset (offset in the block), and a length to the host 2 as a response to this write command. In this case, the logical address is LBAx, the block number is BLK#1, the offset (offset in the block) is +5, and the length is 4.

[0125] FIG. 13 shows a write operation that skips a bad page.

[0126] In FIG. 13, it is assumed that a write command specifying the block number (=BLK#1), logical address (LBAx+1), and length (=4) is received from the host 2 in a state where data has already been written to page 0 and page 1 of the block BLK#1. If page 2 of the block BLK#1 is a defective page, the controller 4 determines page 3 of the block BLK#1 as the write destination location, and writes the 16K bytes of write data received from the host 2 to page 3 of the block BLK#1. Then, the controller 4 returns the offset (offset in the block) and the length to the host 2 as a response to this write command. In this case, the offset (offset in the block) is +12, and the length is 4. Alternatively, the controller 4 may return the logical address, block number, offset (offset in the block), and length to the host 2 as a response to this write command. In this case, the logical address is LBAx+1, the block number is BLK#1, the offset (offset in the block) is +12, and the length is 4.

[0127] FIG. 14 shows another example of a write operation that skips a bad page.

[0128] In FIG. 14, it is assumed that data is written across two pages sandwiching a defective page. It is assumed that data has already been written to page 0 and page 1 of block BLK#2, and that unwritten 8K-byte write data remains in the write buffer 31. In this state, if a write command specifying the block number (=BLK#2), logical address (LBAy), and length (=6) is received, the controller 4 prepares 16K-byte write data corresponding to the page size using the unwritten 8K-byte write data and the first 8K-byte write data in the 24K-byte write data newly received from the host 2. Then, the controller 4 writes the prepared 16K-byte write data to page 2 of block BLK#2.

[0129] If the next page 3 of block BLK#2 is a bad page, the controller 4 determines page 4 of block BLK#2 as the next write location and writes the remaining 16 KB of write data within the 24 KB of write data received from the host 2 to page 4 of block BLK#2.

[0130] Then, the controller 4 returns two offsets (offsets within a block) and two lengths to the host 2 as a response to this write command. In this case, this response may include offset (=+10), length (=2), offset (=+16), and length (=4). Alternatively, the controller 4 may return LBAy, block number (=BLK#2), offset (=+10), length (=2), block number (=BLK#2), offset (=+16), and length (=4) to the host 2 as a response to this write command.

[0131] 15 and 16 show the operation of writing a pair of a logical address and data to a page in a block.

[0132] In each block, each page may include a user data area for storing user data and a redundant area for storing management data. The page size is 16KB+alpha.

[0133] The controller 4 writes both the 4KB user data and the logical address (e.g., LBA) corresponding to the 4KB user data to the destination block BLK. In this case, as shown in Fig. 15, four data sets each including an LBA and 4KB user data may be written to the same page. The offset within the block may indicate a set boundary.

[0134] Alternatively, as shown in FIG. 16, four 4 KB user data may be written to a user data area in a page, and four LBAs corresponding to these four 4 KB user data may be written to a redundant area in the page.

[0135] Figure 17 shows the relationship between block numbers and offsets (offsets within a block) in the case where superblocks are used. In the following, offsets within a block are also referred to simply as offsets.

[0136] Here, to simplify the illustration, it is assumed that one superblock SB#1 is made up of four blocks BLK#11, BLK#21, BLK#31, and BLK#41. The controller 4 writes data in the following order: page 0 of block BLK#11, page 0 of block BLK#21, page 0 of block BLK#31, page 0 of block BLK#41, page 1 of block BLK#11, page 1 of block BLK#21, page 1 of block BLK#31, page 1 of block BLK#41, and so on.

[0137] Offset +0 indicates the first 4KB region of page 0 of block BLK#11, offset +1 indicates the second 4KB region of page 0 of block BLK#11, offset +2 indicates the third 4KB region of page 0 of block BLK#11, and offset +3 indicates the fourth 4KB region of page 0 of block BLK#11.

[0138] Offset +4 indicates the first 4KB region of page 0 of block BLK#21, offset +5 indicates the second 4KB region of page 0 of block BLK#21, offset +6 indicates the third 4KB region of page 0 of block BLK#21, and offset +7 indicates the fourth 4KB region of page 0 of block BLK#21.

[0139] Similarly, offset +12 indicates the first 4KB region of page 0 of block BLK#41, offset +13 indicates the second 4KB region of page 0 of block BLK#41, offset +14 indicates the third 4KB region of page 0 of block BLK#41, and offset +15 indicates the fourth 4KB region of page 0 of block BLK#41.

[0140] Offset +16 indicates the first 4KB region of page 1 of block BLK#11, offset +17 indicates the second 4KB region of page 1 of block BLK#11, offset +18 indicates the third 4KB region of page 1 of block BLK#11, and offset +19 indicates the fourth 4KB region of page 1 of block BLK#11.

[0141] Offset +20 indicates the first 4KB region of page 1 of block BLK#21, offset +21 indicates the second 4KB region of page 1 of block BLK#21, offset +22 indicates the third 4KB region of page 1 of block BLK#21, and offset +23 indicates the fourth 4KB region of page 1 of block BLK#21.

[0142] Similarly, offset +28 indicates the first 4KB region of page 1 of block BLK#41, offset +29 indicates the second 4KB region of page 1 of block BLK#41, offset +30 indicates the third 4KB region of page 1 of block BLK#41, and offset +31 indicates the fourth 4KB region of page 1 of block BLK#41.

[0143] FIG. 18 shows a Get Maximum Block Number command applied to the flash storage device 3.

[0144] The get maximum block number command is a command for acquiring the maximum block number from the flash storage device 3. By sending the get maximum block number command to the flash storage device 3, the host 2 can recognize the maximum block number indicating the number of blocks included in the flash storage device 3. The get maximum block number command includes a command ID for the get maximum block number command, and does not include a parameter.

[0145] FIG. 19 shows a response to the Get Maximum Block Number command.

[0146] When the get maximum block number command is received from the host 2, the flash storage device 3 returns a response shown in Fig. 19 to the host 2. This response includes a parameter indicating the maximum block number (i.e., the total number of available blocks included in the flash storage device 3).

[0147] FIG. 20 shows a get block size command applied to the flash storage device 3 .

[0148] The get block size command is a command for acquiring the block size from the flash storage device 3. The host 2 can recognize the block size of the NAND flash memory 5 included in the flash storage device 3 by sending the get block size command to the flash storage device 3.

[0149] In another embodiment, the get block size command may include a parameter specifying a block number. When the get block size command specifying a certain block number is received from the host 2, the flash storage device 3 returns the block size of the block having this block number to the host 2. This allows the host 2 to recognize the block size of each individual block even if the block sizes of the blocks included in the NAND flash memory 5 are not uniform.

[0150] FIG. 21 shows a response to the get block size command.

[0151] When the get block size command is received from the host 2, the flash storage device 3 returns the block size (the common block size for each block included in the NAND flash memory 5) to the host 2. In this case, if a block number is specified by the get block size command, the flash storage device 3 returns the block size of the block having this block number to the host 2, as described above.

[0152] FIG. 22 shows a block allocate command applied to the flash storage device 3 .

[0153] The block allocate command is a command (block allocation request) that requests allocation of a block (free block) to the flash storage device 3. By sending a block allocate command to the flash storage device 3, the host 2 requests the flash storage device 3 to allocate a free block, and can thereby obtain the block number (the block number of the allocated free block).

[0154] In the case where the flash storage device 3 manages the free blocks using a free block list and the host 2 does not manage the free blocks, the host 2 requests the flash storage device 3 to allocate a free block and thereby obtains a block number. On the other hand, in the case where the host 2 manages the free blocks, the host 2 can select one of the free blocks by itself, and therefore does not need to send a block allocate command to the flash storage device 3.

[0155] FIG. 23 shows a response to a block allocate command.

[0156] When the flash storage device 3 receives a block allocate command from the host 2, it selects a free block to be allocated to the host 2 from the free block list, and returns a response to the host 2 including the block number of the selected free block.

[0157] FIG. 24 shows a block information acquisition process executed by the host 2 and the flash storage device 3.

[0158] When the host 2 starts using the flash storage device 3, the host 2 first sends a get maximum block number command to the flash storage device 3. The controller of the flash storage device 3 returns the maximum block number to the host 2. The maximum block number indicates the total number of available blocks. Note that in the case where the above-mentioned super blocks are used, the maximum block number may also indicate the total number of available super blocks.

[0159] Next, the host 2 obtains the block size by transmitting a get block size command to the flash storage device 3. In this case, the host 2 may transmit a get block size command specifying block number 1, a get block size command specifying block number 2, a get block size command specifying block number 3, ... to the flash storage device 3, respectively, to obtain the block size of each of all blocks individually.

[0160] This block information acquisition process enables the host 2 to recognize the number of available blocks and the block size of each block.

[0161] FIG. 25 shows the sequence of a write operation performed by the host 2 and the flash storage device 3.

[0162] The host 2 first selects a block (free block) to be used for writing, or requests the flash storage device 3 to allocate a free block by sending a block allocate command to the flash storage device 3. Then, the host 2 sends a write command to the flash storage device 3, including the block number BLK# of the block selected by the host 2 (or the block number BLK# of a free block allocated by the flash storage device 3), a logical address (LBA), and a length (step S20).

[0163] When the controller 4 of the flash storage device 3 receives this write command, the controller 4 determines a destination position in the block having this block number BLK# (destination block BLK#) to which the write data from the host 2 should be written, and writes the write data to the destination position in the destination block BLK# (step S11). In step S11, the controller 4 may write both the logical address (here, LBA) and the write data to the destination block.

[0164] The controller 4 updates the block management table 32 corresponding to the destination block BLK#, and changes the bitmap flag corresponding to the written data (i.e., the bitmap flag corresponding to the offset (offset within the block) where this data was written) from 0 to 1 (step S12).

[0165] For example, assume that 16K-byte update data whose starting LBA is LBAx is written to the physical storage location corresponding to offsets +4 to +7 of block BLK#1 as shown in Fig. 26. In this case, as shown in Fig. 27, in the block management table for block BLK#1, the bitmap flags corresponding to offsets +4 to +7 are each changed from 0 to 1.

[0166] 25, the controller 4 returns a response to this write command to the host 2 (step S13). This response includes at least the offset (offset within the block) at which this data has been written.

[0167] When the host 2 receives this response, the host 2 updates the LUT 411 managed by the host 2, and maps a physical address to each logical address corresponding to the written write data. As shown in Fig. 28, the LUT 411 includes a plurality of entries corresponding to each of a plurality of logical addresses (e.g., LBAs). An entry corresponding to a certain logical address (e.g., a certain LBA) stores a physical address PBA indicating a position (physical storage position) in the NAND flash memory 5 where data corresponding to this LBA is stored, that is, a block number and an offset (offset within a block). As shown in FIG. 26, if 16K byte update data with starting LBA LBAx is written to the physical memory locations corresponding to offsets +4 to +7 of block BLK#1, then as shown in FIG. 28, LUT 411 is updated so that BLK#1, offset +4 is stored in the entry corresponding to LBAx, BLK#1, offset +5 is stored in the entry corresponding to LBAx+1, BLK#1, offset +6 is stored in the entry corresponding to LBAx+2, and BLK#1, offset +7 is stored in the entry corresponding to LBAx+3.

[0168] As shown in FIG. 25, thereafter, the host 2 transmits a Trim command to the flash storage device 3 to invalidate previous data that has become unnecessary due to the writing of the above-mentioned updated data. As shown in FIG. 26, if previous data is stored at positions corresponding to offset +0, offset +1, offset +2, and offset +3 of block BLK#0, as shown in FIG. 29, a Trim command specifying the block number (=BLK#0), offset (=+0), and length (=4) is transmitted from the host 2 to the flash storage device 3. The controller 4 of the flash storage device 3 updates the block management table 32 in response to this Trim command (FIG. 25, step S14). In step S15, as shown in FIG. 29, the bitmap flags corresponding to offsets +0 to +3 are changed from 1 to 0 in the block management table for block BLK#0.

[0169] FIG. 30 shows a read command applied to the flash storage device 3.

[0170] The read command is a command that requests the flash storage device 3 to read data. This read command includes a command ID, a physical address PBA, a length, and a transfer destination pointer.

[0171] The command ID is an ID (command code) that indicates that this command is a read command, and the read command includes a command ID for the read command.

[0172] The physical address PBA indicates the first physical memory location from which data is to be read, and is specified by a block number and an offset (offset within the block).

[0173] The length indicates the length of the data to be read. This data length can be specified by the number of grains.

[0174] The destination pointer indicates the location in memory in the host 2 to which the read data should be transferred.

[0175] One read command can specify multiple pairs of physical addresses PBA (block number, offset) and lengths.

[0176] FIG. 31 shows a read operation.

[0177] Here, it is assumed that a read command specifying the block number (=BLK#2), offset (=+5), and length (=3) is received from the host 2. The controller 4 of the flash storage device 3 reads data d1 to d3 from BLK#2 based on the block number (=BLK#2), offset (=+5), and length (=3). In this case, the controller 4 reads one page's worth of data from page 1 of BLK#2, and extracts data d1 to d3 from this read data. Next, the controller 4 transfers data d1 to d3 to the host memory specified by the transfer destination pointer.

[0178] FIG. 32 shows an operation for reading data portions stored in different physical storage locations in response to a read command from the host 2.

[0179] Here, it is assumed that a read command specifying the block number (=BLK#2), offset (=+10), length (=2), block number (=BLK#2), offset (=+16), and length (=4) is received from the host 2. The controller 4 of the flash storage device 3 reads data of one page size from page 2 of BLK#2 based on the block number (=BLK#2), offset (=+10), and length (=2), and extracts data d1 to data d2 from this read data. Next, the controller 4 reads data of one page size (data d3 to data d6) from page 4 of BLK#2 based on the block number (=BLK#2), offset (=+16), and length (=4). Then, the controller 4 transfers the read data of length (=6) obtained by combining data d1 to data d2 and data d3 to data d6 to the host memory specified by the transfer destination pointer in the read command.

[0180] This allows data to be read from separate physical locations without causing a read error, even if a bad page exists in a block. Also, even if data is written across two blocks, this data can be read by issuing a single read command.

[0181] FIG. 33 shows the sequence of a read operation executed by the host 2 and the flash storage device 3.

[0182] The host 2 converts the logical address included in the read request from the user application into a block number and offset by referring to the LUT 411 managed by the host 2. Then, the host 2 transmits a read command specifying this block number, offset, and length to the flash storage device 3.

[0183] When the controller 4 of the flash storage device 3 receives a read command from the host 2, the controller 4 determines the block corresponding to the block number specified by this read command as the block to be read, and determines the page to be read based on the offset specified by this read command (step S31). In step S31, the controller 4 may first divide the offset specified by the read command by the number of granularities (here, 4) representing the page size. The controller 4 may then determine the quotient and remainder obtained by this division as the page number to be read and the offset position within the page to be read, respectively.

[0184] The controller 4 reads the data defined by the block number, offset, and length from the NAND flash memory 5 (step S32), and transmits this read data to the host 2.

[0185] FIG. 34 shows the GC control commands applied to the flash storage device 3.

[0186] The GC control command is used to notify the flash storage device 3 of the GC source block number and the GC destination block number. The host 2 manages the amount of valid data / invalid data of each block, and can select some blocks with a smaller amount of valid data as GC source blocks. The host 2 also manages a free block list, and can select some free blocks as GC destination blocks. This GC control command may include a command ID, a GC source block number, a GC destination block number, etc.

[0187] The command ID is an ID (command code) that indicates that this command is a GC control command, and the GC control command includes a command ID for the GC control command.

[0188] The GC source block number is a block number indicating a GC source block. The host 2 can specify which block should be the GC source block. The host 2 can set multiple GC source block numbers in one GC control command.

[0189] The GC destination block number is a block number indicating a GC destination block. The host 2 can specify which block should be the GC destination block. The host 2 can set multiple GC destination block numbers in one GC control command.

[0190] FIG. 35 shows the callback command for GC.

[0191] The GC callback command is used to notify the host 2 of the logical address of the valid data copied by the GC and the block number and offset indicating the copy destination position of this valid data.

[0192] The callback command for GC may include a command ID, a logical address, a length, and a destination physical address.

[0193] The command ID is an ID (command code) indicating that this command is a callback command for GC, and the callback command for GC includes a command ID for the callback command for GC.

[0194] The logical address indicates the logical address of the valid data copied by the GC from the GC source block to the GC destination block.

[0195] The length indicates the length of the copied data, which may be specified by the number of grains.

[0196] The destination physical address indicates the location in the GC destination block where the valid data has been copied. The destination physical address is specified by the block number and offset (offset within the block).

[0197] FIG. 36 shows the procedure of a garbage collection (GC) operation.

[0198] For example, when the number of remaining free blocks included in the free block list managed by the host 2 falls below a threshold, the host 2 selects a GC source block and a GC destination block, and transmits a GC control command specifying the selected GC source block and the selected GC destination block to the flash storage device 3 (step S41). Alternatively, in a configuration in which the write processing unit 412 manages free blocks, when the number of remaining free blocks falls below a threshold, the write processing unit 412 may notify the host 2 of this, and the host 2 receiving the notification may select blocks and transmit a GC control command.

[0199] Upon receiving this GC control command, the controller 4 of the flash storage device 3 executes a data copy operation including an operation of determining a position (destination position) in the GC destination block to which the valid data in the GC source block should be written, and an operation of copying the valid data in the GC source block to the destination position in the GC destination block (step S51). In step S51, the controller 4 copies not only the valid data in the GC source block (source block), but also both the valid data and the logical address corresponding to the valid data from the GC source block (source block) to the GC destination block (destination block). This makes it possible to hold pairs of data and logical addresses in the GC destination block (destination block).

[0200] In step S51, the data copy operation is repeated until all valid data in the GC source block is copied. If multiple GC source blocks are specified by the GC control command, the data copy operation is repeated until all valid data in all GC source blocks is copied.

[0201] Then, the controller 4 notifies the host 2 of the logical address (LBA) of the valid data for each copied valid data, the destination physical address indicating the copy destination position of the valid data, etc., using a GC callback command (step S52). The destination physical address corresponding to certain valid data is represented by the block number of the destination block (GC destination block) to which the valid data is copied, and the intra-block physical address (intra-block offset) indicating the physical storage position in the destination block to which the valid data is copied.

[0202] When the host 2 receives this callback command for GC, the host 2 updates the LUT 411 managed by the host 2 and maps the destination physical address (block number, offset within block) to the logical address corresponding to each valid data that was copied (step S42).

[0203] FIG. 37 shows an example of the data copy operations performed for GC.

[0204] 37, it is assumed that valid data (LBA=10) stored at a position corresponding to offset +4 in the GC source block (here, block BLK#50) is copied to a position corresponding to offset +0 in the GC destination block (here, block BLK#100), and valid data (LBA=20) stored at a position corresponding to offset +10 in the GC source block (here, block BLK#50) is copied to a position corresponding to offset +1 in the GC destination block (here, block BLK#100). In this case, the controller 4 notifies the host of {LBA10, BLK#100, offset (=+0), LBA20, BLK#100, offset (=+1)} (GC callback processing).

[0205] FIG. 38 shows the contents of LUT 411 of host 2 being updated based on the results of the data copy operation of FIG.

[0206] In this LUT 411, the block number and offset corresponding to LBA10 are updated from BLK#50, offset (=+4) to BLK#100, offset (=+0). Similarly, the block number and offset corresponding to LBA20 are updated from BLK#50, offset (=+10) to BLK#100, offset (=+1).

[0207] After the LUT 411 is updated, the host 2 may send a Trim command specifying BLK#50 and an offset (=+4) to the flash storage device 3 to invalidate the data stored at the position corresponding to the offset (=+4) of BLK#50. Furthermore, the host 2 may send a Trim command specifying BLK#50 and an offset (=+10) to the flash storage device 3 to invalidate the data stored at the position corresponding to the offset (=+10) of BLK#50. Alternatively, the host 2 may not send a Trim command, and the controller 4 may update the block management table 32 as part of the GC processing to invalidate this data.

[0208] As described above, according to this embodiment, when a write request specifying a first logical address and a first block number is received from the host 2, the controller 4 of the flash storage device 3 determines a position (destination position) within the block having the first block number (destination block) to which the data from the host 2 should be written, writes the data from the host 2 to the destination position in the destination block, and notifies the host 2 of either a physical address within the first block indicating the first position, or a set of the first logical address, the first block number, and a physical address within the first block.

[0209] Therefore, a configuration can be realized in which the host 2 handles the block number, and the flash storage device 3 considers page write order constraints / bad pages, etc. to determine the write destination position (offset within the block) in the block having the block number specified by the host 2. By the host 2 handling the block number, it is possible to realize merging of the application level address conversion table of the upper layer (host 2) with the LUT level address conversion table of the conventional SSD. In addition, the flash storage device 3 can control the NAND flash memory 5 taking into consideration the characteristics / constraints of the NAND flash memory 5. Furthermore, since the host 2 can recognize the block boundary, it is possible to write user data to each block taking into consideration the block boundary / block size. This allows the host 2 to control the data in the same block to be invalidated all at once by data update, etc., so that it is possible to reduce the frequency of GC execution. As a result, write amplification is reduced, and the performance of the flash storage device 3 is improved, and the life of the flash storage device 3 is maximized.

[0210] Therefore, an appropriate division of roles between the host 2 and the flash storage device 3 can be achieved, thereby improving the I / O performance of the entire system including the host 2 and the flash storage device 3.

[0211] Furthermore, when a control command specifying a source block number and a destination block number for garbage collection is received from the host 2, the controller 4 of the flash storage device 3 selects a second block having the source block number and a third block having the destination block number from among the multiple blocks, determines a destination position in the third block to which the valid data stored in the second block should be written, and copies the valid data to the destination position in the third block. The controller then notifies the host 2 of the logical address of the valid data, the destination block number, and a physical address in the second block indicating the destination position in the third block. This allows a configuration to be realized in which, even in GC, the host 2 handles only the block numbers (source block number, destination block number), and the flash storage device 3 determines the destination position in the destination block.

[0212] The flash storage device 3 may be used as one of a plurality of flash storage devices 3 provided in a storage array. The storage array may be connected to an information processing device such as a server computer via a cable or a network. The storage array includes a controller that controls the plurality of flash storage devices 3 in the storage array. When the flash storage device 3 is applied to the storage array, the controller of the storage array may function as the host 2 for the flash storage device 3.

[0213] In the present embodiment, a NAND flash memory is exemplified as a nonvolatile memory. However, the function of the present embodiment can be applied to, for example, MRAM (Magnetoresistive Random Access Memory). Random Access Memory), PRAM (Phase change The present invention can also be applied to various other non-volatile memories such as Random Access Memory (RAM), Resistive Random Access Memory (ReRAM), or Ferroelectric Random Access Memory (FeRAM).

[0214] Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and spirit of the invention, and are included in the scope of the invention and its equivalents described in the claims. [Explanation of symbols]

[0215] 2... host, 3... flash storage device, 4... controller, 5... NAND type flash memory, 21... write operation control unit, 22... read operation control unit, 23... GC operation control unit.

Claims

1. 1. A memory system connectable to a host, comprising: a non-volatile memory including a plurality of blocks, each of which is a unit of an erase operation and each of which is designated by a block number; a controller electrically connected to the nonvolatile memory and controlling the nonvolatile memory; The controller: in response to receiving a copy command from the host that specifies at least a first block number; reading first data from a first block designated by the first block number among the plurality of blocks; writing the first data to a first location in a second block different from the first block among the plurality of blocks; and notifying the host of a first identifier for identifying the first data, a second block number specifying the second block, and a physical address within the first block indicating the first location within the second block.

2. The controller: writing the first data and the first identifier to the first block in response to receiving a write command from the host, the write command specifying at least the first identifier and the first block number; 2. The memory system of claim 1, further configured to, in response to receiving the copy command from the host, read the first identifier stored in the first block and write the first identifier to the second block.

3. 2. The memory system according to claim 1, wherein an offset from a beginning of said first block to a position where said first data was stored and an offset from a beginning of said second block to said first position are different from each other.

4. 2. The memory system of claim 1, wherein the controller is further configured to, in response to receiving a read command from the host specifying the second block number and the physical address in the first block, read the first data from the first location in the second block based on the second block number and the physical address in the first block.

5. each of the plurality of blocks includes a plurality of pages; 2. The memory system of claim 1, wherein the physical address within the first block is represented by an offset within a first block indicating an offset from the beginning of the second block to the first location in a multiple of a granularity having a size different from a page size.

6. The controller: Managing a free block group among the plurality of blocks; 2. The memory system of claim 1, further configured to, in response to receiving a block allocation command from the host, allocate one free block of the group of free blocks to the host, and notify the host of a block number designating the allocated block.

7. The controller: notifying the host of a maximum block number indicating the number of the plurality of blocks in response to receiving a first command from the host requesting a maximum block number; 2. The memory system of claim 1, further configured to notify the host of a block size of each of the plurality of blocks in response to receiving a second command from the host requesting a block size.

8. 8. The memory system of claim 7, wherein the controller is configured to, when the second command includes a block number, notify the host of a block size of a block specified by the block number included in the second command.

9. 2. The memory system of claim 1, wherein the block numbers are specified as physical addresses.

10. 2. The memory system of claim 1, wherein the first identifier is a logical address associated with the first data.

11. A control method for controlling a non-volatile memory including a plurality of blocks, each of which is a unit of an erase operation and each of which is specified by a block number, by a controller, comprising: in response to receiving a copy command from the host specifying at least a first block number; reading first data from a first block designated by the first block number among the plurality of blocks; writing the first data to a first location in a second block different from the first block among the plurality of blocks; and notifying the host of a first identifier for identifying the first data, a second block number for specifying the second block, and a physical address within the first block indicating the first position within the second block.

12. writing the first data and the first identifier to the first block in response to receiving a write command from the host, the write command designating at least the first identifier and the first block number; 12. The control method according to claim 11, further comprising: in response to receiving the copy command from the host, reading the first identifier stored in the first block and writing the first identifier to the second block.

13. 12. The control method according to claim 11, wherein an offset from a beginning of the first block to a position where the first data was stored and an offset from a beginning of the second block to the first position are different from each other.

14. 12. The control method according to claim 11, further comprising: in response to receiving a read command from the host specifying the second block number and the physical address in the first block, reading the first data from the first location in the second block based on the second block number and the physical address in the first block.

15. each of the plurality of blocks includes a plurality of pages; 12. The control method according to claim 11, wherein the physical address within the first block is represented by an offset within the first block indicating an offset from the beginning of the second block to the first position in a multiple of a granularity having a size different from a page size.

16. managing a free block group among the plurality of blocks; 12. The control method according to claim 11, further comprising: in response to receiving a block allocation command from the host, allocating one free block of the group of free blocks to the host, and notifying the host of a block number specifying the allocated block.

17. notifying the host of a maximum block number indicating the number of the plurality of blocks in response to receiving a first command from the host requesting a maximum block number; 12. The method according to claim 11, further comprising: in response to receiving a second command from the host requesting a block size, notifying the host of a block size of each of the plurality of blocks.

18. 18. The control method according to claim 17, further comprising the step of notifying said host of a block size of a block specified by said block number included in said second command when said second command includes a block number.

19. The method of claim 11 , wherein the block number is specified as a physical address.

20. The method of claim 11 , wherein the first identifier is a logical address associated with the first data.

Citation Information

Patent Citations

  • Information processing apparatus and semiconductor memory device

    JP2013033337A

  • Memory system and information processor

    JP2015035010A

  • Storage system having a host directly manage physical data locations of storage device

    US20160321010A1