MEMORY SYSTEM AND CONTROL METHOD - Patent application
The memory system addresses the challenge of write amplification in SSDs by managing blocks with different write sizes and reallocating deallocated blocks, ensuring efficient data writing without increased amplification.
Patent Information
- Application Number
- JP2021116445
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-07-14
- Publication Date
- 2024-12-09
- Estimated Expiration
- 2041-07-14
AI Technical Summary
Existing memory systems face challenges in efficiently writing data to multiple write destination blocks without increasing write amplification, particularly in solid state drives (SSDs) using NAND flash memory, due to the mixing of data in shared write buffers leading to increased write amplification during garbage collection operations.
A memory system with a controller that manages two types of blocks: one with a first minimum write size and another with a smaller second minimum write size, allowing data to be written efficiently to the second block first, followed by the first block, and reallocating deallocated blocks to prevent data mixing and reduce the need for garbage collection.
This approach reduces write amplification by efficiently managing data writes across blocks, minimizing the need for garbage collection and optimizing write operations, thereby enhancing the performance and efficiency of SSDs.
Smart Images

Figure 0007596227000001 
Figure 0007596227000002 
Figure 0007596227000003
Abstract
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 non-volatile memories have become widespread. Solid-state drives (SSDs) equipped with NAND-type flash memories are known as one such memory system. SSDs are used as storage devices for host computer systems such as servers in data centers.
[0003] In a storage device used in a host computer system such as a server, it may be necessary to write different data to different destination blocks of a non-volatile memory. To address this, it is conceivable to use some of the blocks included in the non-volatile memory as a shared write buffer shared by multiple destination blocks.
[0004] In this case, each block used as a shared write buffer contains a mixture of data that is to be written to different destination blocks, which can lead to increased write amplification of the non-volatile memory if a garbage collection operation needs to be performed on these blocks.
[0005] Therefore, there is a need for a new technique that can efficiently write data to multiple destination blocks without increasing write amplification. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] U.S. Pat. No. 10,747,462 [Patent Document 2] U.S. Patent No. 11,003,385 [Patent Document 3] U.S. Pat. No. 10,956,067 Summary of the Invention [Problem to be solved by the invention]
[0007] An object of the present invention is to provide a memory system and a control method that can efficiently write data to a plurality of destination blocks without increasing write amplification. [Means for solving the problem]
[0008] According to an embodiment, a memory system is connectable to a host. The memory system includes a non-volatile memory and a controller. The non-volatile memory includes a plurality of blocks, each of which is a unit of an erase operation. The controller is electrically connected to the non-volatile memory. The controller is configured to manage a first block group of the plurality of blocks and a second block group of the plurality of blocks, and to control writing of data to a plurality of destination blocks assigned from the first block group. Each of the blocks included in the first block group has a first minimum write size. Each of the blocks included in the second block group has a second minimum write size smaller than the first minimum write size. When a first block included in the first block group is opened as a destination block, the controller assigns a second block included in the second block group to the first block. In response to receiving one or more write commands specifying the first block from the host, the controller writes only first data associated with the one or more write commands to the second block for each of the second minimum write sizes. The controller writes the first data to the first block for each of the first minimum write size in response to completion of writing the first data to the second block. When the first block is filled with data that has been written to the first block while an unwritten area remains in the second block, the controller deallocates the second block from the first block, allocates the deallocated second block to a first write destination block other than the first block, and writes only the data to be written to the first write destination block to the unwritten area of the second block. [Brief description of the drawings]
[0009] [Figure 1] 1 is a block diagram showing an example of the configuration of an information processing system including a memory system according to an embodiment. [Diagram 2] FIG. 2 is a block diagram showing an example of the configuration of a host and an example of the configuration of a memory system according to the embodiment. [Diagram 3] 1 is a block diagram showing multiple quad-level cell blocks (QLC blocks) used as storage areas for user data and multiple pseudo single-level cell blocks (pSLC blocks) used as pseudo single-level cell buffers (pSLC buffers). [Figure 4] FIG. 2 is a block diagram illustrating the relationship between multiple channels and multiple NAND flash memory dies used in a memory system according to an embodiment. [Diagram 5] FIG. 2 is a diagram showing an example of the configuration of a block group (super block) used in the memory system according to the embodiment. [Figure 6] FIG. 1 is a diagram for explaining a multi-stage write operation applied to a QLC block. [Figure 7] A diagram showing an example of a zoned namespace configuration defined by the NVMe standard. [Figure 8] 11 is a diagram showing a write pointer update operation executed in the memory system according to the embodiment. [Figure 9] 1 is a diagram showing an example of the configuration of a management table that holds a correspondence between each of a plurality of zones and each of a plurality of QLC blocks, used in a memory system according to an embodiment. [Figure 10] 1A and 1B are diagrams showing pSLC blocks assigned to each of a plurality of QLC blocks opened as write destination blocks in a memory system according to an embodiment. [Figure 11] FIG. 11 is a first diagram illustrating a write operation to a QLC block executed in the memory system according to the embodiment. [Figure 12] FIG. 11 is a second diagram illustrating a write operation to a QLC block performed in the memory system according to the embodiment. [Figure 13]1A and 1B are diagrams illustrating a pSLC block that is deallocated from a QLC block and then reused by being allocated to another QLC block in a memory system according to an embodiment. [Figure 14] 1 is a diagram showing a relationship between a QLC block and multiple pSLC blocks allocated to the QLC block in a memory system according to an embodiment. [Figure 15] 1 is a diagram showing a foggy write operation executed using a temporary write buffer (TWB) in a memory system according to an embodiment. [Figure 16] 1 is a diagram showing pSLC blocks allocated to each of a plurality of QLC blocks and a large write buffer (LWB) in a memory system according to an embodiment. [Figure 17] 1 is a diagram showing switching between two types of write operations executed in a memory system according to an embodiment; [Figure 18] 1A and 1B are diagrams showing a write operation executed using both TWB and LWB in a memory system according to an embodiment. [Figure 19] 1A and 1B are diagrams showing a write operation executed using a TWB in a memory system according to an embodiment. [Figure 20] 11 is a flowchart showing the procedure of an operation for allocating pSLC blocks to QLC blocks, which is executed in the memory system according to the embodiment. [Figure 21] 11 is a flowchart showing the procedure of a foggy write operation to a QLC block executed in a memory system according to an embodiment. [Figure 22] 11 is a flowchart showing another example of the procedure of a fine write operation on a certain QLC block, which is executed in the memory system according to the embodiment. [Figure 23] 11 is a flowchart showing the procedure of an operation for allocating an LWB to a QLC block, which is executed in the memory system according to the embodiment. [Figure 24]11 is a flowchart showing the procedure of a foggy write operation for a QLC block executed using a TWB in a memory system according to an embodiment. [Diagram 25] 11 is a flowchart showing the procedure of a fine write operation to a QLC block executed using a TWB in a memory system according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, an embodiment will be described with reference to the drawings. FIG. 1 is a block diagram showing an example of the configuration of an information processing system including a memory system according to an embodiment of the present invention.
[0011] The information processing system 1 includes a host (host device) 2 and a storage device 3. The host (host device) 2 is an information processing device configured to access one or a plurality of storage devices 3. The information processing device is, for example, a personal computer or a server computer.
[0012] In the following, a case where an information processing device such as a server computer is used as the host 2 will be mainly described.
[0013] A typical example of a server computer that functions as the host 2 is a server computer (hereinafter referred to as a server) in a data center.
[0014] In the case where the host 2 is realized by a server in a data center, the host 2 may be connected to a plurality of storage devices 3. The host 2 may also be connected to a plurality of end user terminals (clients) 71 via a network 70. The host 2 can provide various services to these end user terminals 71.
[0015] Examples of services that can be provided by the host 2 include (1) Platform as a Service (PaaS), which provides a system operating platform to each client (each end-user terminal 71), and (2) Infrastructure as a Service (IaaS), which provides infrastructure such as a virtual server to each client (each end-user terminal 71).
[0016] A number of virtual machines may be executed on the physical server functioning as the host 2. Each of these virtual machines executed on the host 2 may function as a virtual server configured to provide various services to a client (end-user terminal 71) corresponding to the virtual machine. An operating system and user applications are executed in each virtual machine, which are used by the end-user terminal 71 corresponding to the virtual machine.
[0017] A flash translation layer (host FTL) 301 is also executed in the host (server) 2. This host FTL 301 includes a lookup table (LUT). The LUT is an address translation table used to manage the mapping between each data identifier and each physical address of the non-volatile memory in the storage device 3. By using this LUT, the host FTL 301 can know the data arrangement on the non-volatile memory in the storage device 3.
[0018] The storage device 3 is a semiconductor storage device. The storage device 3 writes data to the nonvolatile memory. The storage device 3 reads data from the nonvolatile memory.
[0019] The storage device 3 can execute low-level abstraction. Low-level abstraction is a function for abstraction of non-volatile memory. Low-level abstraction includes a function for assisting data placement, etc. The function for assisting data placement includes, for example, a function for assigning a physical address indicating a physical storage location in the non-volatile memory where user data is to be written in response to a write command sent from the host 2, and a function for notifying the upper layer (host 2) of this assigned physical address.
[0020] The storage device 3 is connected to the host 2 via a cable or a network. Alternatively, the storage device 3 may be built into the host 2.
[0021] The storage device 3 communicates with the host 2 in accordance with a certain logical interface standard. This logical interface standard is, for example, Serial Attached SCSI (SAS), Serial ATA (SATA), NVM express TM (NVMe TM When the NVMe standard is used as this logical interface standard, the physical interface 50 connecting the storage device 3 and the host 2 is, for example, a PCI Express TM (PCIe TM ), or Ethernet TM is used.
[0022] Next, a configuration of an information processing system including a storage device according to an embodiment will be described. FIG. 2 is a block diagram showing a configuration example of a host and a configuration example of a storage device according to an embodiment. In the following, it is assumed that the storage device according to the embodiment is realized as a solid state drive (SSD). In the following, the storage device according to the embodiment will be described as SSD3. An information processing system 1 includes a host (host device) 2 and SSD3.
[0023] The host 2 is an information processing device that accesses the SSD 3. The host 2 transmits a write request (write command) which is a request for writing data to the SSD 3. The host 2 also transmits a read request (read command) which is a request for reading data to the SSD 3.
[0024] The host 2 includes a processor 101, a memory 102, and the like. The processor 101 is a CPU (Central Processing Unit) configured to control the operation of each component in the host 2. The processor 101 executes software (host software) loaded from the SSD 3 to the memory 102. Note that the host 2 may include other storage devices in addition to the SSD 3. In this case, the host software may be loaded from the other storage device to the memory 102. The host software includes an operating system, a file system, a device driver, an application program, and the like.
[0025] The memory 102 is a main memory provided in the host 2. The memory 102 is realized by, for example, a random access memory such as a dynamic random access memory (DRAM).
[0026] A part of the storage area of the memory 102 can be used as a host write buffer 1021. The host 2 temporarily stores data to be written to the SSD 3 in the host write buffer 1021. In other words, the host write buffer 1021 holds data associated with a write command sent to the SSD 3.
[0027] Also, a portion of the storage area of the memory 102 may be used to store one or more submission queue / completion queue pairs (SQ / CQ pairs) (not shown). Each SQ / CQ pair includes one or more submission queues (SQ) and one completion queue (CQ) associated with the one or more submission queues (SQ). The submission queue (SQ) is a queue used to issue a request (command) to the SSD 3. The completion queue (CQ) is a queue used to receive a response indicating command completion from the SSD 3. The host 2 transmits various commands to the SSD 3 via one or more submission queues (SQ) included in each SQ / CQ pair.
[0028] The SSD 3 receives write commands and read commands sent from the host 2, and executes data write operations and data read operations on the non-volatile memory based on the received write commands and read commands. As the non-volatile memory, for example, a NAND type flash memory is used.
[0029] The SSD 3 includes a controller 4 and a non-volatile memory (for example, a NAND flash memory) 5. The SSD 3 may also include a random access memory, for example, a DRAM 6.
[0030] The controller 4 is a memory controller configured to control the NAND flash memory 5. The controller 4 may be realized by a circuit such as a System-on-a-Chip (SoC). The controller 4 is electrically connected to the NAND flash memory 5 via a memory bus called a channel.
[0031] The NAND flash memory 5 is a non-volatile semiconductor memory. The NAND flash memory 5 includes a memory cell array. The memory cell array includes a plurality of memory cells arranged in a matrix. The memory cell array in the NAND flash memory 5 includes a plurality of blocks BLK0 to BLKx-1. Each of the blocks BLK0 to BLKx-1 is a unit of a data erase operation for erasing data. The data erase operation is also simply referred to as an erase operation or erase. Each of the blocks BLK0 to BLKx-1 is also referred to as a physical block, a flash block, or a memory block.
[0032] Each of the blocks BLK0 to BLKx-1 includes a plurality of pages (here, pages P0 to Py-1). Each page includes a plurality of memory cells connected to the same word line. Each of the pages P0 to Py-1 is a unit of data write operation and data read operation.
[0033] Each of the blocks BLK0 to BLKx-1 is, for example, a quad-level cell block (QLC block). In an operation of writing data to each QLC block, 4 bits of data are written to each memory cell, so that 4 pages of data are written to multiple memory cells connected to the same word line.
[0034] Some of the QLC blocks can be used as pseudo single-level cell blocks (pSLCs). In a data write operation to each pSLC block, one bit of data is written to each memory cell, so that one page of data is written to multiple memory cells connected to the same word line.
[0035] The storage density per memory cell in a pSLC block is 1 bit (i.e., 1 page per word line), and the storage density per memory cell in a QLC block is 4 bits (i.e., 4 pages per word line), so the minimum write size for a QLC block is 4 times that of a pSLC block.
[0036] The higher the memory density, the slower the data read and write speeds for the NAND flash memory 5. The lower the memory density, the faster the data read and write speeds for the NAND flash memory 5. Therefore, the time required to read and write data from and to the QLC block is longer than the time required to read and write data from and to the pSLC block.
[0037] The NAND flash memory 5 may include a plurality of NAND flash memory dies. Each NAND flash memory die may be a two-dimensional flash memory or a three-dimensional flash memory.
[0038] The DRAM 6 is a volatile semiconductor memory. The DRAM 6 is used, for example, to temporarily store data to be written to the NAND flash memory 5. The storage area of the DRAM 6 is also used to store various management data used by the controller 4.
[0039] Next, the detailed configuration of the controller 4 will be described.
[0040] The controller 4 includes a host interface (I / F) 11, a CPU 12, a NAND interface (I / F) 13, a DRAM interface (I / F) 14, a direct memory access controller (DMAC) 15, a static RAM (SRAM) 16, and an ECC (Error Correction Code) encoding / decoding unit 17.
[0041] The host interface 11 , CPU 12 , NAND interface 13 , DRAM interface 14 , DMAC 15 , SRAM 16 , and ECC encoding / decoding unit 17 are interconnected via a bus 10 .
[0042] The host interface 11 is a host interface circuit that executes communication with the host 2. The host interface 11 is, for example, a PCIe controller. Alternatively, if the SSD 3 has a configuration in which a network interface controller is built in, the host interface 11 may be realized as a part of the network interface controller. The host interface 11 receives various commands from the host 2. The various commands are, for example, a write command and a read command.
[0043] The CPU 12 is a processor. The CPU 12 controls the host interface 11, the NAND interface 13, the DRAM interface 14, the DMAC 15, the SRAM 16, and the ECC encoding / decoding unit 17. The CPU 12 loads a control program (firmware) from the NAND flash memory 5 or a ROM (not shown) into the DRAM 6 in response to the supply of power to the SSD 3.
[0044] The CPU 12 manages blocks in the NAND flash memory 5. The management of blocks in the NAND flash memory 5 includes, for example, management of defective blocks (bad blocks) included in the NAND flash memory 5 and wear leveling.
[0045] The NAND interface 13 is a memory interface circuit that controls multiple non-volatile memory dies. The NAND interface 13 controls the NAND flash memory 5 under the control of the CPU 12. The NAND interface 13 is connected to multiple NAND flash memory dies via multiple channels (Ch), for example. Communication between the NAND interface 13 and the NAND flash memory 5 is performed in accordance with, for example, the Toggle NAND flash interface or the Open NAND flash interface (ONFI).
[0046] The DRAM interface 14 is a DRAM interface circuit that controls the DRAM. The DRAM interface 14 controls the DRAM 6 under the control of the CPU 12. Part of the storage area of the DRAM 6 is used to store a Z2P table (zone-to-physical address translation table) 61, a free pSLC block pool 62, a Half Used pSLC block pool 63, a QLC SA table 64, a pSLC SA table 65, and a large write buffer (LWB) 66.
[0047] The DMAC 15 is a circuit that executes direct memory access (DMA). Under the control of the CPU 12, the DMAC 15 executes data transfer between the memory 102 of the host 2 and the DRAM 6 (or SRAM 16). For example, when write data is to be transferred from the host write buffer 1021 of the host 2 to a temporary write buffer (TWB) 161 of the SRAM 16, the CPU 12 specifies to the DMAC 15 a source address indicating a position in the host write buffer 1021, a size of the write data to be transferred, and a destination address indicating a position in the TWB 161. The TWB 161 is a storage area for temporarily storing write data associated with each write command received from the host 2. Here, it is assumed that a part of the storage area of the SRAM 16 is used as the TWB 161, but a part of the storage area of the DRAM 6 may be used as the TWB 161. The TWB 161 may have a storage area of the same size as or larger than the minimum write size of a QLC block.
[0048] When data is to be written to the NAND flash memory 5, the ECC encoding / decoding unit 17 encodes the data to add an error correction code (ECC) to the data as a redundant code. When data is read from the NAND flash memory 5, the ECC encoding / decoding unit 17 corrects errors in the data by using the ECC added to the read data.
[0049] Next, a description will be given of the processing executed by the CPU 12. The CPU 12 can function as a flash management unit 121, a QLC block control unit 122, and a pSLC block control unit 123. Note that a part or all of the flash management unit 121, the QLC block control unit 122, and the pSLC block control unit 123 may be realized by dedicated hardware within the controller 4.
[0050] The flash management unit 121 controls the operation of writing write data to the NAND flash memory 5 based on a write command received from the host 2. The write command is a command (write request) for writing data to be written (write data) to the NAND flash memory 5. As the write command received from the host 2, a write command used in the Zoned Namespace (ZNS) defined in the NVMe standard may be used.
[0051] In a case where the controller 4 supports ZNS, the flash management unit 121 can operate the SSD 3 as a zoned device. In a zoned device, a plurality of zones, each of which is assigned a plurality of logical address ranges obtained by dividing a logical address space for accessing the SSD 3, are used as logical storage areas. One of a plurality of physical storage areas in the NAND flash memory 5 is assigned to each of the plurality of zones. This allows the flash management unit 121 to handle each physical storage area in the NAND flash memory 5 as a zone.
[0052] The logical address space for accessing the SSD 3 is a set of consecutive logical addresses used by the host 2 to access the SSD 3. As the logical addresses, logical block addresses (LBA) are used.
[0053] In the following, we will mainly explain the case where the flash management unit 121 supports ZNS and the write command used in ZNS defined in the NVMe standard, i.e., a write command that specifies a zone, is used as the write command for writing data to an arbitrary zone.
[0054] The QLC block control unit 122 allocates a plurality of QLC blocks to a plurality of zones, respectively. Alternatively, the QLC block control unit 122 may allocate a plurality of block groups to a plurality of zones, respectively. Each of the plurality of block groups includes two or more blocks (physical blocks) among a plurality of blocks (physical blocks) included in the NAND flash memory 5. Each block group is also called a superblock (QLC superblock). That is, the QLC block control unit 122 allocates one QLC block to each of the plurality of zones. The QLC block allocated to each of the plurality of zones may be one physical block (QLC physical block) or one superblock (QLC superblock). The flash management unit 121 starts an operation of writing data to the QLC block allocated to an arbitrary zone based on a write command for writing data to the zone. As an operation of writing data to the QLC block, the flash management unit 121 executes, for example, a multi-stage write operation. The multi-stage write operation includes at least a first stage write operation and a second stage write operation. An example of a multi-stage write operation is the Foggy-Fine write operation.
[0055] The foggy-fine write operation is performed by multiple write operations (foggy write operation, fine write operation) to a group of memory cells connected to the same word line. The first write operation (foggy write operation) is a write operation that roughly sets the threshold voltage of each memory cell, and the second write operation (fine write operation) is a write operation that adjusts the threshold voltage of each memory cell. The foggy-fine write operation is a write mode that can reduce the effects of program disturbance.
[0056] In the first write operation (foggy write operation), first, four pages of data are transferred in page size units to the NAND flash memory 5 by the first data transfer operation. That is, if the data size per page (page size) is 16 KB, 64 KB of data is transferred in page size units to the NAND flash memory 5. Then, the first write operation (foggy write operation) is performed to program the four pages of data into the memory cell array in the NAND flash memory 5.
[0057] In the second program operation (fine write operation), similarly to the foggy write operation, four pages of data are transferred again in page size units to the NAND flash memory 5 in the second data transfer operation. The data transferred to the NAND flash memory 5 in the second data transfer operation is the same as the data transferred in the first data transfer operation. Then, a second write operation (fine write operation) is performed to program the transferred four pages of data into the memory cell array in the NAND flash memory 5.
[0058] Even if the foggy write operation for the memory cells connected to a certain word line is completed, the fine write operation for the memory cells connected to this word line cannot be executed immediately. The fine write operation for the memory cells connected to this word line can be executed after the foggy write operation for the memory cells connected to one or more subsequent word lines is completed. This increases the time required to write data to the QLC block. In addition, data written by the foggy write operation to the memory cells connected to a certain word line of the QLC block cannot be read out until the foggy write operation for the memory cells connected to one or more subsequent word lines is completed and the fine write operation for the memory cells connected to this word line is completed.
[0059] Therefore, data to be written to a QLC block must be held in some storage area until the fine write operation of that data is completed.
[0060] In this manner, the flash management unit 121 writes data having the minimum write size of the QLC block (64 KB, which is four times the page size) to multiple memory cells connected to each word line of the QLC block using a write mode (a multiple-stage write operation such as a foggy-fine write operation) in which data written to one of the multiple word lines included in the QLC block can be read after data is written to one or more word lines subsequent to the one word line.
[0061] In addition, when the NAND flash memory 5 has a multi-plane configuration including two planes, the write operation to two QLC physical blocks selected from the two planes is executed simultaneously. These two QLC physical blocks are treated as one QLC block (QLC superblock) including the two QLC physical blocks. Therefore, the minimum write size of the QLC block is 128KB.
[0062] On the other hand, in a write operation to the pSLC block, the flash management unit 121 uses a write mode (SLC mode) in which data written to one of the word lines included in the pSLC block can be read only by writing data to this one word line, and writes data having the minimum write size (page size) of the pSLC block to multiple memory cells connected to each word line of the pSLC block. In the SLC mode, one page of data is transferred to the NAND flash memory 5 only once. Then, one page of data is written to multiple memory cells connected to one word line so that one bit is written to each memory cell.
[0063] Hereinafter, the minimum write size of a QLC block is also referred to as a first minimum write size, and the minimum write size of a pSLC block is also referred to as a second minimum write size.
[0064] The pSLC block control unit 123 assigns a pSLC block to each QLC block opened as a write destination block in order to prevent data to be written to different QLC blocks from being mixed in one pSLC block. The pSLC block assigned to a certain QLC block is used as a non-volatile storage area that temporarily holds only data to be written to this QLC block. In other words, only data to be written to a certain QLC block is written to the pSLC block assigned to this QLC block. Data to be written to another QLC block is written to the pSLC block assigned to this other QLC block.
[0065] Therefore, one pSLC block is used to hold only the incomplete data of one QLC block, and does not hold the incomplete data of multiple QLC blocks at the same time. In other words, it is possible to prevent multiple types of data to be written to different QLC blocks from being mixed in one pSLC block. Therefore, it is not necessary to perform a garbage collection operation on the pSLC block.
[0066] Also, when a pSLC block allocated to a certain QLC block has an unwritten area remaining in the pSLC block and the QLC block is filled with readable data, the pSLC block control unit 123 releases the allocation of the pSLC block from the QLC block. Here, the readable data is data that has been written to the QLC block. Specifically, when writing to the QLC block is performed using a multi-stage write operation, the readable data is data that has been written to the multi-stage write operation. For example, when a fine write operation of certain data is completed, the data becomes readable data. When the QLC block is filled with readable data, all data already written to the pSLC block becomes write-completed data that has been written to the QLC block. The write-completed data stored in the pSLC block can be read from the QLC block. Therefore, the write-completed data that has been written to the QLC block does not need to be held in the pSLC block any more.
[0067] In this case, the pSLC block control unit 123 allocates the deallocated pSLC block to another QLC block opened as a write destination block. Then, only data to be written to the other QLC block is written to the unwritten area of this pSLC block. In this way, the pSLC block control unit 123 reuses the deallocated pSLC block as a non-volatile storage area that temporarily holds only data to be written to the other QLC block, and makes effective use of the unwritten area of this pSLC block.
[0068] The data that is the target of the garbage collection operation is only incomplete data that has not been written to a QLC block. Therefore, even if data that should be written to another QLC block is written to the remaining memory area of a pSLC block that was allocated to a certain QLC block, the incomplete data that exists in this pSLC block is only data that has not been written to another QLC block. In other words, incomplete data that corresponds to different QLC blocks is not mixed in this pSLC block. Therefore, garbage collection operation is not required for reused pSLC blocks.
[0069] Next, the write control process executed by the flash management unit 121 will be described.
[0070] When the flash management unit 121 receives one or more write commands for writing data to a QLC block assigned to a certain zone, the flash management unit 121 first writes only data (first data) associated with the received one or more write commands to a pSLC block assigned to the QLC block for each second minimum write size. In response to completion of writing the first data to the pSLC block, the flash management unit 121 writes the first data to the QLC block for each first minimum write size.
[0071] Next, an example of a process for writing data to a pSLC block for each second minimum write size and an example of a process for writing data to a QLC block for each first minimum write size will be described.
[0072] First, a case where the TWB 161 is not used will be described. In the following, a case where data is written to the QLC block #1 will be assumed. For example, when a write command is received from the host 2, the flash management unit 121 classifies the received write command into a plurality of groups corresponding to a plurality of write destination QLC blocks (a plurality of zones). Of the received write commands, each write command that specifies the QLC block #1 is classified into a group corresponding to the QLC block #1. Of the received write commands, each write command that specifies the QLC block #2 is classified into another group corresponding to the QLC block #2. The flash management unit 121 calculates the total size of the write data associated with the one or more received write commands that specify the QLC block #1. Each write command includes a parameter that indicates the size of the corresponding write data, that is, the data length. Therefore, the flash management unit 121 can calculate the total size of the write data associated with the one or more received write commands that specify the QLC block #1 based on the data length included in each of the one or more received write commands that specify the QLC block #1.
[0073] The flash management unit 121 waits until the total size of the write data associated with the received one or more write commands that specify the QLC block #1 reaches the second minimum write size. If the second minimum write size is 16 KB, the flash management unit 121 waits, for example, until one write command that specifies the QLC block #1 as the write destination block and specifies a data length of 16 KB is received, or until four write commands that specify the QLC block #1 as the write destination block and specifies a data length of 4 KB are received, or until two write commands that specify the QLC block #1 as the write destination block and specifies a data length of 16 KB are received. When the total size of the write data associated with the received one or more write commands that specify the QLC block #1 reaches the second minimum write size, the flash management unit 121 acquires the write data having the second minimum write size associated with the one or more write commands from the host write buffer 1021. Then, the flash management unit 121 writes the obtained write data having the second minimum write size to the pSLC block assigned to QLC block #1.
[0074] When writing of the write data having the second minimum write size into the pSLC block is completed, the flash management unit 121 transmits one or more completion responses to the host 2 indicating the completion of the received one or more write commands.
[0075] Upon receiving one or more subsequent write commands that specify QLC block #1, the flash management unit 121 again calculates the total size of the write data associated with the one or more subsequent write commands. The flash management unit 121 waits until the total size of the write data associated with the one or more subsequent write commands that specify QLC block #1 reaches the second minimum write size. When the total size of the write data associated with the one or more subsequent write commands that specify QLC block #1 reaches the second minimum write size, the flash management unit 121 acquires the write data associated with the one or more subsequent write commands from the host write buffer 1021 and having the second minimum write size. Then, the flash management unit 121 writes the acquired write data having the second minimum write size to the pSLC block assigned to QLC block #1.
[0076] When writing of the write data having the second minimum write size into the pSLC block is completed, the flash management unit 121 sends one or more completion responses to the host 2 indicating completion of the received subsequent one or more write commands.
[0077] In this manner, the flash management unit 121 writes data to the pSLC block in units of the second minimum write size.
[0078] The flash management unit 121 determines whether the total size of data written to the pSLC block reaches the first minimum write size. The flash management unit 121 waits until the total size of data written to the pSLC block reaches the first minimum write size. When the total size of data written to the pSLC block reaches the first minimum write size, the flash management unit 121 reads data having the first minimum write size from the pSLC block. Then, the flash management unit 121 writes the read data having the first minimum write size to QLC block #1.
[0079] In this case, for example, the flash management unit 121 transfers the data having the first minimum write size that has been read to the NAND flash memory 5, and writes the transferred data to multiple memory cells connected to the first word line in the QLC block #1 by a foggy write operation.
[0080] The flash management unit 121 again determines whether the total size of the new data written to the pSLC block reaches the first minimum write size. The flash management unit 121 waits until the total size of the new data written to the pSLC block reaches the first minimum write size. When the total size of the new data written to the pSLC block reaches the first minimum write size, the flash management unit 121 reads the new data having the first minimum write size from the pSLC block. Then, the flash management unit 121 writes the read data having the first minimum write size to QLC block #1.
[0081] In this case, for example, the flash management unit 121 transfers the data having the first minimum write size that has been read to the NAND flash memory 5, and writes the transferred data to multiple memory cells connected to the next word line in the QLC block #1 by a foggy write operation.
[0082] In this manner, the flash management unit 121 writes data to QLC block #1 in units of the first minimum write size.
[0083] When the fine write operation for one or more word lines subsequent to the first word line in the QLC block #1 is completed, the fine write operation for the first word line can be executed. In this case, the flash management unit 121 reads again from the pSLC block the data having the first minimum write size written to the first word line. Then, the flash management unit 121 transfers again the read data having the first minimum write size to the NAND flash memory 5, and writes the transferred data to the multiple memory cells connected to the first word line in the QLC block #1 by the fine write operation.
[0084] This completes the data write operation to the multiple memory cells connected to the first word line in QLC block #1, and this data becomes available to be read from QLC block #1.
[0085] Next, a case where the TWB 161 is used will be described. The flash management unit 121 calculates the total size of the write data associated with one or more received write commands that specify the QLC block #1. The flash management unit 121 waits until the total size of the write data associated with one or more received write commands that specify the QLC block #1 becomes the first minimum write size. If the first minimum write size is 128 KB, the flash management unit 121 waits, for example, until one write command that specifies the QLC block #1 as the write destination block and specifies a data length of 128 KB is received, or until four write commands that specify the QLC block #1 as the write destination block and specifies a data length of 32 KB are received, or until 32 write commands that specify the QLC block #1 as the write destination block and specifies a data length of 4 KB are received.
[0086] When the total size of the write data associated with the one or more received write commands that specify QLC block #1 reaches the first minimum write size, the flash management unit 121 transfers the write data having the first minimum write size associated with these one or more write commands from the host write buffer 1021 to the TWB 161. Then, the flash management unit 121 writes the write data having the first minimum write size transferred to the TWB 161 to the pSLC block assigned to QLC block #1.
[0087] Furthermore, the flash management unit 121 writes the write data having the first minimum write size transferred to the TWB 161 to multiple memory cells connected to the first word line of the QLC block #1 by a foggy write operation, without reading the write data having the first minimum write size from the pSLC block.
[0088] When writing of the write data having the first minimum write size into the pSLC block is completed, the flash management unit 121 transmits one or more completion responses to the host 2 indicating the completion of the received one or more write commands.
[0089] In this way, by transferring write data having the first minimum write size, which is the minimum write size of a QLC block, from the host write buffer 1021 to the TWB 161, it is possible to write the write data having the first minimum write size transferred to the TWB 161 to the QLC block #1 without reading the write data having the first minimum write size from the pSLC block. Therefore, it is possible to reduce the number of data transfers that need to be performed between the controller 4 and the NAND flash memory 5, compared to the case where the TWB 161 is not used.
[0090] When the flash management unit 121 receives one or more subsequent write commands that specify QLC block #1, the flash management unit 121 again calculates the total size of the write data associated with the one or more subsequent write commands. The flash management unit 121 waits until the total size of the write data associated with the one or more subsequent write commands that specify QLC block #1 reaches the first minimum write size. When the total size of the write data associated with the one or more subsequent write commands that specify QLC block #1 reaches the first minimum write size, the flash management unit 121 transfers the write data having the first minimum write size associated with the one or more subsequent write commands from the host write buffer 1021 to the TWB 161. Then, the flash management unit 121 writes the write data having the first minimum write size transferred to the TWB 161 to the pSLC block assigned to the QLC block #1. Then, the flash management unit 121 writes the write data having the first minimum write size transferred to the TWB 161 to multiple memory cells connected to the next word line of the QLC block #1 by a foggy write operation, without reading the write data having the first minimum write size from the pSLC block.
[0091] When writing of the write data having the first minimum write size into the pSLC block is completed, the flash management unit 121 sends one or more completion responses to the host 2 indicating completion of the received subsequent one or more write commands.
[0092] In this manner, the flash management unit 121 writes data to QLC block #1 in units of the first minimum write size.
[0093] When the fine write operation for one or more word lines subsequent to the first word line in the QLC block #1 is completed, the fine write operation for the first word line can be executed. In this case, the flash management unit 121 reads the data having the first minimum write size written to the first word line from the pSLC block. Then, the flash management unit 121 transfers the read data having the first minimum write size to the NAND flash memory 5 again, and writes the transferred data to the multiple memory cells connected to the first word line in the QLC block #1 by the fine write operation.
[0094] This completes the data write operation to the multiple memory cells connected to the first word line in QLC block #1, and this data becomes available to be read from QLC block #1.
[0095] Next, a description will be given of the storage area in the NAND flash memory 5. The storage area in the NAND flash memory 5 is roughly divided into a pSLC buffer 201 and a QLC area 202, as shown in FIG.
[0096] The QLC area 202 includes a plurality of QLC blocks. The pSLC buffer 201 includes a plurality of pSLC blocks. In other words, the plurality of blocks included in the NAND flash memory 5 may be configured by a QLC block group and a pSLC block group. The QLC block control unit 122 may use each of the plurality of QLC blocks included in the QLC area 202 only as a QLC block, and the pSLC block control unit 123 may use each of the plurality of pSLC blocks included in the pSLC buffer 201 only as a pSLC block.
[0097] Next, the relationship between the multiple channels and the multiple NAND flash memory dies will be described. Fig. 4 is a block diagram showing an example of the relationship between the multiple channels and the multiple NAND flash memory dies used in the memory system according to the embodiment.
[0098] The NAND flash memory 5 includes a plurality of NAND flash memory dies (also called NAND flash memory chips). Each NAND flash memory die can operate independently. For this reason, the NAND flash memory dies are treated as a unit capable of operating in parallel.
[0099] In FIG. 4, 16 channels Ch.1 to Ch.16 are connected to the NAND interface 13, and two NAND flash memory dies are connected to each of the 16 channels Ch.1 to Ch.16. In this case, the 16 NAND flash memory dies #1 to #16 connected to the channels Ch.1 to Ch.16 may be configured as bank #0, and the remaining 16 NAND flash memory dies #17 to #32 connected to the channels Ch.1 to Ch.16 may be configured as bank #1. A bank is a unit for operating multiple memory modules in parallel by bank interleaving. In the configuration example of FIG. 4, a maximum of 32 NAND flash memory dies can be operated in parallel by 16 channels and two bank interleaving.
[0100] The erase operation may be performed in units of one block (physical block), or in units of a block group (super block) including a set of multiple physical blocks capable of operating in parallel.
[0101] Next, a configuration example of a superblock will be described. Fig. 5 is a diagram showing a configuration example of a certain block group (superblock) used in the memory system according to the embodiment.
[0102] One block group, that is, one superblock including a set of multiple physical blocks, may include, but is not limited to, a total of 32 physical blocks 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 physical blocks selected one by one from the 64 planes corresponding to the NAND flash memory dies #1 to #32.
[0103] FIG. 5 illustrates one superblock (SB) including 32 physical blocks (here, physical block BLK2 in NAND flash memory die #1, physical block BLK3 in NAND flash memory die #2, physical block BLK7 in NAND flash memory die #3, physical block BLK4 in NAND flash memory die #4, physical block BLK6 in NAND flash memory die #5, ..., physical block BLK3 in NAND flash memory die #32).
[0104] Each QLC block in the QLC area 202 described in Fig. 3 may be realized by one superblock (QLC superblock) or one physical block (QLC physical block). Note that a configuration in which one superblock includes only one physical block may be used, in which case one superblock is equivalent to one physical block.
[0105] Each pSLC block included in the pSLC buffer 201 may also be composed of one physical block, or may be composed of a superblock including a set of multiple physical blocks.
[0106] Next, a description will be given of a foggy / fine write operation for a QLC block, which is executed by the flash management unit 121. Fig. 6 is a diagram for explaining an operation of writing data to a QLC block in a mode in which 4 bits are written per memory cell.
[0107] Here, we will show an example of a foggy-fine write operation that goes back and forth through five word lines. The foggy-fine write operation for a QLC block (QLC#1) is executed as follows.
[0108] (1) First, four pages (P0 to P3) of write data are transferred to the NAND flash memory 5 on a page-by-page basis, and a foggy write operation is executed to write these four pages (P0 to P3) of write data to multiple memory cells connected to word line WL0 in QLC#1.
[0109] (2) Next, the write data for the next four pages (P4 to P7) is transferred to the NAND flash memory 5 on a page-by-page basis, and a foggy write operation is executed to write the write data for these four pages (P4 to P7) to multiple memory cells connected to the word line WL1 in QLC#1.
[0110] (3) Next, the write data for the next four pages (P8 to P11) is transferred to the NAND flash memory 5 on a page-by-page basis, and a foggy write operation is executed to write the write data for these four pages (P8 to P11) to multiple memory cells connected to the word line WL2 in QLC#1.
[0111] (4) Next, the write data for the next four pages (P12 to P15) is transferred to the NAND flash memory 5 on a page-by-page basis, and a foggy write operation is executed to write the write data for these four pages (P12 to P15) to multiple memory cells connected to the word line WL3 in QLC#1.
[0112] (5) Next, the write data for the next four pages (P16 to P19) is transferred to the NAND flash memory 5 on a page-by-page basis, and a foggy write operation is executed to write the write data for these four pages (P16 to P19) to multiple memory cells connected to the word line WL4 in QLC#1.
[0113] (6) When the foggy write operation for the multiple memory cells connected to the word line WL4 is completed, the word line to be written returns to the word line WL0, and the fine write operation for the multiple memory cells connected to the word line WL0 can be executed. Then, the write data for the same four pages (P0 to P3) as the four pages (P0 to P3) used in the foggy write operation for the word line WL0 is transferred again to the NAND flash memory 5 in page units, and a fine write operation is executed to write the write data for these four pages (P0 to P3) to the multiple memory cells connected to the word line WL0 in QLC#1. This completes the foggy-fine write operation for pages P0 to P3. As a result, it becomes possible to correctly read the data corresponding to pages P0 to P3 from QLC#1.
[0114] (7) Next, the write data for the next four pages (P20 to P23) is transferred to the NAND flash memory 5 on a page-by-page basis, and a foggy write operation is executed to write the write data for these four pages (P20 to P23) to multiple memory cells connected to the word line WL5 in QLC#1.
[0115] (8) When the foggy write operation for the multiple memory cells connected to the word line WL5 is completed, the word line to be written returns to the word line WL1, and the fine write operation for the multiple memory cells connected to the word line WL1 can be executed. Then, the write data for the same four pages (P4 to P7) as the four pages (P4 to P7) used in the foggy write operation for the word line WL1 is transferred again to the NAND flash memory 5 in page units, and a fine write operation is executed to write the write data for these four pages (P4 to P7) to the multiple memory cells connected to the word line WL1 in QLC#1. This completes the foggy-fine write operation for pages P4 to P7. As a result, it becomes possible to correctly read the data corresponding to pages P4 to P7 from QLC#1.
[0116] Note that, although the above description has been given of a case where four pages of data are transferred to the NAND flash memory 5 in each of the foggy write operation and the fine write operation, when QLC#1 includes two QLC physical blocks selected from two planes included in the NAND flash memory 5, the data is simultaneously written to the two QLC physical blocks. Therefore, eight pages of data are transferred to the NAND flash memory 5 in each of the foggy write operation and the fine write operation.
[0117] Next, we will explain the configuration of multiple zones. Figure 7 is a diagram showing an example of the configuration of a zoned namespace defined by the NVMe standard.
[0118] The logical block address range of each zoned namespace starts at LBA 0. For example, the logical block address range of the zoned namespace in Figure 7 contains q contiguous LBAs, from LBA 0 to LBA q-1. This zoned namespace is divided into r zones, from zone #0 to zone #r-1. These r zones contain contiguous, non-overlapping logical block addresses.
[0119] More specifically, this zoned namespace has zone #0, zone #1, ..., zone #r-1 assigned to it. LBA 0 denotes the minimum LBA of zone #0. LBA q-1 denotes the maximum LBA of zone #r-1. Zone #0 contains LBA 0, LBA m-1. LBA 0 denotes the minimum LBA of zone #0. LBA m-1 denotes the maximum LBA of zone #0. Zone #1 contains LBA m, LBA m+1, ..., LBA n-2, LBA n-1. LBA m denotes the minimum LBA of zone #1. LBA n-1 denotes the maximum LBA of zone #1. Zone #r-1 contains LBA p, ..., LBA q-1. LBA p denotes the minimum LBA of zone #r-1. LBA q-1 denotes the maximum LBA of zone #r-1.
[0120] The controller 4 allocates one of a plurality of QLC blocks to each of a plurality of zones as a physical storage area. Furthermore, the controller 4 manages the mapping between each of the plurality of QLC blocks and each of the plurality of zones using a Z2P table 61.
[0121] For example, when a write command for writing data to a certain zone is received from the host 2, the controller 4 determines a QLC block assigned to this zone as a destination block, and writes data associated with the received write command to this destination block. When a write command for writing data to another zone is received from the host 2, the controller 4 determines a QLC block assigned to this other zone as a destination block, and writes data associated with the received write command to this destination block.
[0122] The write command includes, for example, a logical address (start LBA) indicating the first sector to which the write data should be written, the data size of this write data, and a data pointer (buffer address) indicating the location in the host write buffer 1021 where this write data is stored.
[0123] For example, the upper bits of the logical address (start LBA) included in the write command are used as an identifier specifying the zone where the write data associated with this write command should be written, that is, the zone start logical block address (ZSLBA) of this zone. Since each zone is assigned a QLC block, the ZSLBA is also used as an identifier specifying the QLC block where the data should be written. Also, the lower bits of the logical address (start LBA) included in the write command are used as the destination LBA (offset) within the zone where the write data should be written.
[0124] Therefore, the logical address specified by the write command indicates both one of the multiple zones and the offset from the beginning of the zone to the write destination position within the zone. A zone append command specifying only the ZSLBA may be used as the write command. In this case, the write destination LBA (offset) within the zone is determined by the controller 4 so that writing within the zone is performed sequentially.
[0125] The data size of the write data may be specified by, for example, the number of sectors (logical blocks). One sector corresponds to the minimum data size of the write data that can be specified by the host 2. In other words, the data size of the write data is expressed by a multiple of sectors.
[0126] The value of the next writable LBA in each zone is managed by a write pointer corresponding to each zone.
[0127] Next, the update operation of the write pointer will be described with reference to Fig. 8. The update operation of the write pointer is executed in the memory system according to the embodiment.
[0128] The controller 4 manages multiple write pointers corresponding to multiple zones, respectively. Each write pointer indicates the next writable LBA in the zone corresponding to the write pointer. When data is written sequentially to a certain zone, the controller 4 increments the value of the write pointer corresponding to this zone by the number of logical blocks to which the data has been written.
[0129] Here, we will explain the write pointer update operation using zone #1 as an example. Zone #1 includes the logical block address range from LBA m to LBA n-1. LBA m is the minimum logical block address of zone #1, that is, the zone start logical block address (ZSLBA) of zone #1.
[0130] When zone #1 is empty and does not contain valid data, the write pointer corresponding to zone #1 indicates LBA m, which is the zone start logical block address of zone #1. When a command to open zone #1 is received from host 2, controller 4 transitions the state of zone #1 to an open state in which data can be written. In this case, controller 4 assigns one of the empty QLC blocks (free QLC blocks) that does not contain valid data as an open physical storage area associated with zone #1, and executes an erase operation on this one QLC block. This opens this one QLC block as a write destination QLC block. As a result, writing to zone #1 becomes possible.
[0131] If the write location (start LBA) specified by a write command specifying zone #1 is equal to the write pointer of zone #1 (here, LBA m), the controller 4 writes data to the LBA range starting from the specified start LBA, for example, LBA m and LBA m+1.
[0132] The controller 4 updates the write pointer of zone #1 so that the value of the write pointer of zone #1 increases by the number of logical blocks to which data has been written. For example, when data is written to LBA m and LBA m+1, the controller 4 updates the value of the write pointer to LBA m+2. LBA m+2 indicates the smallest LBA among unwritten LBAs in zone #1, that is, the next writable LBA in zone #1.
[0133] If data is to be rewritten to a certain LBA range in Zone #1 where data has already been written, it is necessary to reset Zone #1, return the write pointer value to LBA m, and then reopen Zone #1.
[0134] Commands that the controller 4 receives from the host 2 include, in addition to write commands, read commands, open zone commands, close zone commands, reset zone commands, and the like.
[0135] The read command is a command (read request) to read data from the NAND flash memory 5. The read command includes a logical address (start LBA) indicating the first sector from which data (read target data) is to be read, the data size of the read target data, and a data pointer (buffer address) indicating the position in the read buffer of the host 2 to which the read target data is to be transferred. The read buffer of the host 2 is a storage area provided in the memory 102 of the host 2.
[0136] The upper bit part of the logical address included in the read command is used as an identifier for specifying the zone in which the data to be read is stored, and the lower bit part of the logical address included in the read command specifies an offset within the zone in which the data to be read is stored.
[0137] The open zone command is a command (open request) for transitioning one of a number of zones, each of which is in an empty state, to an open state available for writing data. In other words, the open zone command is used to transition a specific block group that is in an empty state containing no valid data to an open state available for writing data.
[0138] The open zone command includes a logical address that specifies the zone to be transitioned to the open state. For example, the upper bit portion of the logical address specified by the open zone command is used as an identifier that specifies the zone to be transitioned to the open state.
[0139] The close zone command is a command (close request) for transitioning one of the open zones to a closed state in which writing is suspended. The close zone command includes a logical address that specifies the zone to be transitioned to the closed state. For example, the upper bit portion of the logical address specified by the close zone command is used as an identifier that specifies the zone to be transitioned to the closed state.
[0140] The reset zone command is a command (reset request) for resetting a zone where rewriting is to be performed and transitioning it to an empty state. For example, the reset zone command is used to transition a full state zone, which is filled with data, to an empty state that does not contain valid data. Valid data means data associated with a logical address. The reset zone command includes a logical address that specifies the zone that should be transitioned to the empty state. For example, the upper bit portion of the logical address specified by the reset zone command is used as an identifier that specifies the zone that should be transitioned to the empty state. The value of the write pointer corresponding to the zone transitioned to the empty state by the reset zone command is set to a value indicating the ZSLBA of this zone.
[0141] For example, when zone #1 is reset, the controller 4 can treat the QLC block that was allocated as the physical storage area for zone #1 as a free QLC block that does not contain valid data. Therefore, the QLC block can be reused for writing data simply by performing an erase operation on the QLC block.
[0142] FIG. 9 is a diagram showing an example of the configuration of a Z2P table 61, which is a management table for managing the correspondence between each of a plurality of zones and each of a plurality of QLC blocks, used in a storage device according to the embodiment.
[0143] The Z2P table 61 has a number of entries corresponding to each of a number of zones included in an arbitrary zoned namespace. In Fig. 9, the Z2P table 61 has r entries for managing r zones.
[0144] In each of the multiple entries, an identifier (QLC block identifier) indicating a QLC block allocated to the zone corresponding to the entry is stored as a physical address PBA of the physical storage area corresponding to the zone. In FIG. 9, the entry corresponding to zone #0 stores a QLC block identifier indicating a QLC block allocated to zone #0. Also, the entry corresponding to zone #1 stores a QLC block identifier indicating a QLC block allocated to zone #1. Furthermore, the entry corresponding to zone #r-1 stores a QLC block identifier indicating a QLC block allocated to zone #1.
[0145] FIG. 9 illustrates an example of a Z2P table 61 corresponding to a certain zoned namespace, but the Z2P table 61 may include entries corresponding to multiple zones included in multiple zoned namespaces.
[0146] In this way, in an SSD 3 that complies with the zoned namespace, write data is written to a QLC block that is assigned to a zone specified by a write command received from a host 2. However, a write operation that requires multiple program operations, such as a foggy-fine write operation, may be executed in a write operation on a QLC block. In this case, the data needs to be held in a storage area other than the QLC block from the first write operation to the last write operation.
[0147] In addition, when the SSD 3 is used as a storage device for a server computer, for example, multiple zones corresponding to multiple applications (or multiple clients) may be used simultaneously so that multiple types of data are written to different zones. In this case, the time from when writing to a zone begins until the entire zone is filled with data and reaches a full state may differ for each zone.
[0148] In such a case, if data to be written to multiple zones is mixed in one pSLC block, necessary data (valid data) and unnecessary data (invalid data) will be mixed in one pSLC block due to the difference in the write completion timing of each zone. Data that has been written to a QLC block (written data) can be read from that QLC block. Therefore, written data stored in a pSLC block is unnecessary data. Data that has not been written to a QLC block (incomplete written data) cannot be read from that QLC block. Therefore, incomplete written data stored in a pSLC block is necessary data.
[0149] When the number of free pSLC blocks available for writing data decreases, it becomes necessary to perform a garbage collection operation that copies only valid data (data that has not yet been written) from pSLC blocks that contain a mixture of needed and unneeded data to other pSLC blocks.
[0150] However, performing garbage collection operations may cause a deterioration in write amplification by generating write operations to the NAND flash memory 5 that are not based on instructions from the host 2, such as a write command, and may increase the latency for commands issued by the host 2 due to the use of the NAND flash memory 5.
[0151] Therefore, in this embodiment, the controller 4 assigns a plurality of pSLC blocks to a plurality of QLC blocks opened as write destination blocks. Then, the controller 4 writes only data to be written to the corresponding QLC block to each of the pSLC blocks. Then, the pSLC block holds the written data as incomplete data until a fine write operation is performed on the data written to the pSLC block. The data written to the pSLC block gradually transitions from incomplete data to complete data as writing to the corresponding QLC block progresses. When the entire pSLC block is filled with data and all of the data becomes complete data, the pSLC block becomes a free block that does not contain valid data.
[0152] In this way, by allocating a pSLC block to each QLC block opened as a destination block, the controller 4 can efficiently write data to multiple QLC blocks without incurring increased write amplification.
[0153] Next, details of allocation of pSLC blocks to QLC blocks will be described. Fig. 10 is a diagram showing pSLC blocks allocated to each of a plurality of QLC blocks in a memory system according to an embodiment.
[0154] 10, n QLC blocks (QLC#1, QLC#2, ..., QLC#n) are opened as write destination blocks. Then, n pSLC blocks (pSLC#1, pSLC#2, ..., pSLC#n) are assigned to the n QLC blocks (QLC#1, QLC#2, ..., QLC#n).
[0155] In the left part of FIG. 10, pSLC#1 is assigned to QLC#1, pSLC#2 is assigned to QLC#2, and pSLC#n is assigned to QLC#n.
[0156] The Half Used pSLC block pool 63 stores identifiers of pSLC blocks that can be newly allocated to QLC blocks. The Half Used pSLC block pool 63 is used to manage each Half Used pSLC block, including a written area in which write-completed data is stored and an unwritten area. The Half Used pSLC block pool 63 includes pSLC blocks that have been selected from the Free pSLC block pool 62 and then erased, and pSLC blocks that have been deallocated from QLC blocks while including an unwritten area. Here, the Half Used pSLC block pool 63 includes pSLC blocks pSLC#i, ..., pSLC#j.
[0157] In response to a new QLC block (QLC#k in this case) being opened as a write destination block, the pSLC block control unit 123 selects an arbitrary pSLC block (pSLC#i in this case) from the Half Used pSLC block pool 63. Then, the pSLC block control unit 123 assigns the selected pSLC#i to the QLC#k. Furthermore, if there is no available pSLC block in the Half Used pSLC block pool 63 when a new QLC block is opened, the pSLC block control unit 123 may select an arbitrary pSLC block from the free pSLC block pool 62. The pSLC block control unit 123 executes an erase operation on the selected pSLC block, and manages the selected pSLC block as a Half Used pSLC block using the Half Used pSLC block pool 63. Alternatively, the pSLC block control unit 123 may perform an erase operation on the selected pSLC block and directly allocate the selected pSLC block to QLC#k without going through the Half Used pSLC block pool 63 .
[0158] As a result, pSLC#i is assigned to QLC#k as a dedicated write buffer for QLC#k. In this case, data to be written to other QLC blocks is not written to pSLC#i, and only data to be written to QLC#k is written to pSLC#i.
[0159] Next, a specific write operation and deallocation of a pSLC block will be described with reference to Fig. 11 and Fig. 12. Fig. 11 is a first diagram for explaining a write operation to a certain QLC block executed in a memory system according to an embodiment. Fig. 11 explains writing of data to QLC#1 and pSLC#1 allocated to QLC#1.
[0160] Among the data written in QLC#1, data for which the fine write operation has been completed is readable data. Among the data written in QLC#1, data for which the foggy write operation has been completed but the fine write operation has not been completed is unreadable data. Among the storage areas of QLC#1, storage areas to which no data has been written are unwritten areas.
[0161] Of the data written to pSLC#1, data for which the fine write operation to QLC#1 has been completed is written data. Of the data written to pSLC#1, data for which the fine write operation to QLC#1 has not been completed is written incomplete data. Also, of the storage area of pSLC#1, a storage area to which no data has been written is an unwritten area.
[0162] When a fine write operation for a word line of QLC#1 becomes executable, the flash management unit 121 executes the fine write operation for QLC#1 using the incomplete write data stored in pSLC#1. This incomplete write data is data that has already been used for a foggy write operation for this word line of QLC#1. Then, when the fine write operation for this word line is completed, the data in pSLC#1 that was used for this fine write operation becomes written complete data.
[0163] The flash management unit 121 writes data to be written in QLC#1 to pSLC block #1 until there is no unwritten area in pSLC#1. Then, the data in pSLC#1 for which the fine write operation to QLC#1 has been completed becomes written complete data. When there is no unwritten area in pSLC#1, the pSLC block control unit 123 allocates a new pSLC block (pSLC#2 in this case) to QLC#1. Here, the pSLC control unit 123 selects an arbitrary pSLC block from the Half Used pSLC block pool 63 and allocates the selected pSLC block to QLC#1. Also, if there is no pSLC block available for writing in the Half Used pSLC block pool 63, the pSLC block control unit 123 selects an arbitrary free pSLC block from the free pSLC block pool 62 and allocates the selected free pSLC block to QLC#1. Here, it is assumed that the pSLC block control unit 123 newly assigns pSLC#2, which does not have write completion data, to QLC#2.
[0164] The pSLC control unit 123 may select pSLC#2 from the free pSLC block pool 62, perform an erase operation on pSLC#2, and then move it to the Half Used pSLC block pool 63 and assign it to QLC#1, or it may perform an erase operation on pSLC#2 and then assign it directly to QLC#1.
[0165] Next, the flash management unit 121 writes the data to be written in QLC#1 to pSLC#2 as incompletely written data. The flash management unit 121 also executes a foggy write operation on QLC#1 using the data written in pSLC#2. Then, when a fine write operation becomes executable in response to executing the foggy write operation, the flash management unit 121 executes a fine write operation on QLC#1. By executing the fine write operation on QLC#1, a part of the incompletely written data in pSLC#1 becomes completely written data. When all of the data stored in pSLC#1 becomes completely written data, the pSLC block control unit 123 releases the allocation of pSLC#1 from QLC#1 and returns pSLC#1 to the free pSLC block pool 62.
[0166] Next, the subsequent operation will be described with reference to Fig. 12. The flash management unit 121 executes the foggy write operation on QLC #1 until there is no unwritten area in QLC #1. Then, when the fine write operation becomes executable in response to the execution of the foggy write operation, the flash management unit 121 executes the fine write operation on QLC #1.
[0167] Next, the flash management unit 121 executes the remaining fine write operation for QLC#1. When the fine write operation for all word lines of QLC#1 is completed, QLC#1 is filled with data that has been written to QLC#1. As a result, all data in QLC#1 becomes readable data. Then, all data that has not been written in pSLC#2 becomes written data.
[0168] At this time, pSLC#2 includes an unwritten area, but does not include unwritten data. Therefore, even if unwritten data to be written to a destination QLC block other than QLC#1 is written to the unwritten area of pSLC#2, unwritten data to be written to a different QLC block will not be mixed in pSLC#2. The pSLC block control unit 123 releases the allocation of pSLC#2 from QLC#1, and returns pSLC#2 to the Half Used pSLC block pool 63.
[0169] As a result, pSLC#2 is reused, for example, when a new QLC block is opened, to be assigned to that QLC block as a write buffer. When pSLC#2 is selected for assignment to that QLC block, it is assigned to that QLC block without performing an erase operation. Then, the flash management unit 121 writes the data to be written to that QLC block to the remaining unwritten area of pSLC#2.
[0170] Next, the reuse of pSLC blocks will be described. Fig. 13 is a diagram showing a pSLC block that is deallocated from a certain QLC block and then reused by being allocated to another QLC block in the memory system according to the embodiment.
[0171] First, when QLC#1 is opened, the pSLC block control unit 123 assigns pSLC#a to QLC#1. Then, the flash management unit 121 executes a write operation to QLC#1 and pSLC#a in the same manner as the operation described in FIG. 11 and FIG. 12.
[0172] When there is no unwritten area in pSLC#a, the pSLC block control unit 123 allocates a new pSLC to QLC#1. When there is no unwritten area in the new pSLC, the pSLC block control unit 123 allocates another new pSLC to QLC#1. In this way, the pSLC block control unit 123 sequentially allocates several pSLCs to QLC#1 while returning pSLCs filled with written data to the free pSLC block pool 62 according to the progress of writing to QLC#1. For example, when pSLC#b is allocated to QLC#1, data to be written to QLC#1 is written to pSLC#b. Then, when writing to QLC#1 progresses and all data in QLC#1 becomes readable data, all data in pSLC#b also becomes written data. At this time, if there is an unwritten area in pSLC#b, the pSLC block control unit 123 releases the allocation of pSLC#b from QLC#1. Then, the pSLC block control unit 123 returns the pSLC #b to the Half Used pSLC block pool 63 .
[0173] After that, in response to the new opening of QLC block QLC#2, the pSLC block control unit 123 selects pSLC#b in the Half Used pSLC block pool 63 and allocates pSLC#b to QLC#2. Then, the flash management unit 121 writes the data to be written to QLC#2 to an unwritten area of pSLC#b.
[0174] As a result, the controller 4 can reuse pSLC#b, which was allocated to QLC#1, by allocating it to the newly opened QLC#2. Even if pSLC#b is allocated to QLC#2 and data to be written to QLC#2 is written, all data related to QLC#1 remaining in pSLC#b is written data that has been written, so that incomplete data to be written to a different QLC block will not be mixed in pSLC#b.
[0175] 14 is a diagram showing a relationship between a certain QLC block and a plurality of pSLC blocks assigned to the QLC block in a memory system according to an embodiment. The relationship between QLC#1 and a plurality of pSLC blocks assigned to QLC#1 will be described below.
[0176] First, when a write command specifying QLC#1 is received from the host 2, the flash management unit 121 notifies the QLC block control unit 122 of information related to the received write command, such as the size of the data associated with the received write command and information indicating the position in the host write buffer 1021 where the data is stored.
[0177] The QLC block control unit 122 updates the QLC SA table 64 based on information related to the received write command. The QLC SA table 64 is used to hold a plurality of source addresses SA. Each of the plurality of source addresses SA indicates a location where data to be written to QLC #1 is stored. The QLC block control unit 122 stores, in the QLC SA table 64, information indicating a location in the host write buffer 1021 where data associated with the write command is stored, as a source address SA.
[0178] When the total size of data associated with one or more received write commands that specify QLC#1 reaches the second minimum write size, the flash management unit 121 updates the pSLC SA table 65 of the pSLC block control unit 123 by copying all source address SAs stored in the QLC SA table 64 to the pSLC SA table 65. Each source address SA in the pSLC SA table 65 indicates the location where data to be written to the pSLC block assigned to QLC#1 is stored.
[0179] The flash management unit 121 acquires data associated with one or more received write commands, i.e., data having the second minimum write size to be written to QLC#1, from the host write buffer 1021 based on each of the source addresses SA in the pSLC SA table 65. Then, the flash management unit 121 writes the acquired data to a pSLC block (here, pSLC#a).
[0180] When the data is written to pSLC#a, the flash management unit 121 transmits to the host 2 one or more completion responses indicating the completion of one or more write commands corresponding to this data.
[0181] In addition, when data having a second minimum write size is written to pSLC#a, the flash management unit 121 updates the QLC SA table 64 so that each source address SA of the data to be written to QLC#1 is changed from its location in the host write buffer 1021 to its location in pSLC#a to which the data has been written.
[0182] At this time, if a read command specifying this data as the data to be read is received from the host 2, the flash management unit 121 reads this read target data from pSLC#a based on the source address SA corresponding to this read target data, and transmits it to the host 2. Before this data is written to pSLC#a, the source address SA corresponding to this data indicates a position within the host write buffer 1021. Therefore, if a read command specifying this data as the data to be read is received from the host 2 before this data is written to pSLC#a, the flash management unit 121 reads this read target data from the host write buffer 1021 based on the source address SA corresponding to this read target data, and transmits it to the host 2.
[0183] When the total size of data written to pSLC#a reaches the first minimum write size, the flash management unit 121 reads data having the first minimum write size from pSLC#a to be written to QLC#1 based on each source address SA of the QLC SA table 64. Then, the flash management unit 121 writes the read data to QLC#1 by a foggy write operation.
[0184] When the write to QLC#1 progresses and a fine write operation can be performed on a word line in QLC#1, the flash management unit 121 reads the data to be written to this word line from pSLC#a again, and writes the read data to QLC#1 by a fine write operation.
[0185] By repeating such an operation, the pSLC #a will eventually have no unwritten areas. In this case, the pSLC block control unit 123 selects an arbitrary pSLC block (here, pSLC #b) from the Half Used pSLC block pool 63 and assigns the selected pSLC #b to QLC #1.
[0186] When all the data written to pSLC #a has been completely written, the pSLC block control unit 123 returns pSLC #a to the free pSLC block pool 62 .
[0187] When pSLC#b is assigned to QLC#1 and the entire QLC#1 is filled with data that has been written to QLC#1, i.e., readable data, the pSLC block control unit 123 returns pSLC#b to the Half Used pSLC block pool 63.
[0188] Through the above operations, the host 2 can, at the timing when it receives a completion response, release the storage area in the host write buffer 1021 in which the data associated with the write command related to that completion response is stored. Since the controller 4 transmits a completion response to the host 2 for each piece of data of the minimum write size of a pSLC block which is smaller than the minimum write size of a QLC block, the required size of the host write buffer 1021 can be reduced compared to a case in which a completion response is transmitted to the host 2 after writing of data of the minimum write size of a QLC block is completed.
[0189] Here, the number of data transfers executed between the NAND flash memory 5 and the controller 4 will be considered.
[0190] When the write operation described with reference to FIG. 14 is performed, five data transfers are required: (1) a data transfer from the controller 4 to the NAND flash memory 5 to write data to the pSLC block; (2) a data transfer from the NAND flash memory 5 to the controller 4 to read data from the pSLC block for foggy write; (3) a data transfer from the controller 4 to the NAND flash memory 5 to write data to the QLC block for foggy write; (4) a data transfer from the NAND flash memory 5 to the controller 4 to read data from the pSLC block for fine write; and (5) a data transfer from the controller 4 to the NAND flash memory 5 to write data for fine write.
[0191] When data written in the pSLC block is used for a write operation to the QLC block, the controller 4 needs to read the data from the pSLC block in order to perform error correction on the data written in the pSLC block. Therefore, data transfer between the controller 4 and the NAND flash memory 5 is performed twice each during foggy writing and fine writing.
[0192] Therefore, five times the bandwidth is used compared to the case where the write data is transferred from the controller 4 to the NAND flash memory 5 only once.
[0193] In the SSD 3 of this embodiment, a Temporary Write Buffer (TWB) 161 in the SRAM 16 and a Large Write Buffer (LWB) 66 in the DRAM 6 are used to reduce the bandwidth consumed.
[0194] FIG. 15 is a diagram showing a foggy write operation performed using the TWB in the memory system according to the embodiment.
[0195] (1) The flash management unit 121 calculates the total size of write data associated with one or more received write commands that specify a certain QLC block. The flash management unit 121 waits until the total size of write data associated with one or more received write commands that specify this QLC block reaches the first minimum write size. When the total size of write data associated with one or more received write commands that specify this QLC block reaches the first minimum write size, the flash management unit 121 transfers the write data having the first minimum write size that is associated with these one or more write commands from the host write buffer 1021 to the TWB 161 via the host interface 11.
[0196] The TWB 161 holds the data to be written to the QLC block until the foggy write operation for the QLC block is completed. The size of the storage area of the TWB 161 is, for example, the same as the minimum write size (first minimum write size) of the QLC block (for example, 128 KB).
[0197] (2) The controller 4 performs a write operation on the pSLC block by transferring the data having the first minimum write size transferred to the TWB 161 to the pSLC block.
[0198] (3) In response to the completion of the write operation to the pSLC, the controller 4 transmits one or more completion responses to the one or more write commands to the host 2 via the host interface 11. The data written to the pSLC block is already readable data. Therefore, the controller 4 is able to transmit the completion responses.
[0199] (4) The controller 4 executes foggy writing on the QLC block by transferring to the QLC block the data having the first minimum write size transferred to the TWB 161. After that, the controller 4 releases the storage area of the TWB 161 in response to the completion of the foggy writing operation.
[0200] As described above, by using the TWB 161, the controller 4 can perform foggy write operations on the QLC blocks without reading data stored in the pSLC blocks, thereby reducing the number of data transfers that need to be performed between the controller 4 and the NAND flash memory 5.
[0201] To further reduce the number of data transfers that need to be performed between the controller 4 and the NAND flash memory 5, the SSD 3 can use a large write buffer (LWB) 66. The LWB 66 is a first-in-first-out (FIFO) type volatile memory in which each entry has a storage area of the same size as the TWB 161. Here, the LWB 66 has five entries. The number of entries in the LWB 66 is determined so that the QLC block can store data of a size that enables it to perform a fine write operation. For example, if the SSD 3 performs a foggy-fine write operation that goes back and forth through two word lines, the LWB 66 may have two entries. Also, if the SSD 3 performs a foggy-fine write operation that goes back and forth through five word lines, the LWB 66 may have five entries.
[0202] Next, an operation of allocating the LWB 66 to a QLC block will be described. Fig. 16 is a diagram showing pSLC blocks and LWBs allocated to each of a plurality of QLC blocks in a memory system according to an embodiment.
[0203] 16, QLC blocks QLC#1, QLC#2, ..., QLC#n are opened and assigned to zones, respectively, and a pSLC block is assigned to each QLC block.
[0204] In the left part of FIG. 16, pSLC#1 is assigned to QLC#1, pSLC#2 is assigned to QLC#2, and pSLC#n is assigned to QLC#n.
[0205] The Half Used pSLC block pool 63 contains pSLC blocks that can be newly allocated to QLC blocks. The Half Used pSLC block pool 63 contains pSLC blocks that have been selected from the Free pSLC block pool 62 and then erased, and pSLC blocks that have been deallocated from QLC blocks and include unwritten areas. Here, the Half Used pSLC block pool 63 contains pSLC blocks pSLC#i, ..., pSLC#j.
[0206] Furthermore, LWB66 includes a large write buffer LWB#1 and a large write buffer LWB#2. LWB#1 is assigned to QLC#1, and LWB#2 is assigned to QLC#2.
[0207] Here, in response to the new opening of the QLC block QLC#k, the pSLC block control unit 123 selects an arbitrary pSLC block (pSLC#i) from the Half Used pSLC block pool 63. Then, the pSLC block control unit 123 assigns the selected pSLC#i to the QLC#k.
[0208] Then, the controller 4 selects an arbitrary LWB from LWB#1 and LWB#2. For example, the controller 4 may select the LWB in which the latest data was written (here, LWB#2). The controller 4 then releases the allocation of LWB#2 from QLC#2, and allocates LWB#2 to the newly opened QLC#k. This allows the controller 4 to allocate LWB66 preferentially to the newly opened QLC block.
[0209] 17 is a diagram showing switching between two types of write operations performed in a memory system according to an embodiment. The upper part of FIG. 17 shows a foggy / fine write to a QLC block to which LWB66 is allocated, and the lower part of FIG. 17 shows a foggy / fine write to a QLC block to which LWB66 is released.
[0210] When the data to be written to the QLC block to which the LWB66 is assigned is stored in the TWB161, the controller 4 copies the data to be written to the QLC block from the TWB161 to the LWB66 after completing the foggy write operation to the QLC block. Then, when the fine write operation to the QLC block becomes executable, the controller 4 executes the fine write operation to the QLC block using the data stored in the LWB66. Therefore, the QLC block to which the LWB66 is assigned does not need to read data from the pSLC block when executing not only the foggy write operation but also the fine write operation. Therefore, the bandwidth between the controller 4 and the NAND flash memory 5 is less consumed compared to the QLC block to which the LWB66 is not assigned.
[0211] The LWB 66 does not need to be allocated for all open QLC blocks. For QLC blocks where the LWB 66 is deallocated, such as QLC#2 in Figure 16, the controller 4 performs a fine write operation on the QLC block using data read from the pSLC block.
[0212] The controller 4 executes the foggy-fine write operation shown in FIG. 18 or FIG. 19 depending on whether or not the LWB 66 is assigned to the QLC block specified by the write command.
[0213] First, the details of the foggy-fine write operation for the QLC block to which the LWB66 is assigned will be described. Fig. 18 is a diagram showing a write operation performed using the TWB and the LWB in the memory system according to the embodiment.
[0214] (1) The controller 4 receives one or more write commands that specify a certain QLC block from the host 2 via the host interface 11. Then, the controller 4 transfers data having the first minimum write size from the host write buffer 1021 to the TWB 161 via the host interface 11 in response to the total size of data associated with the one or more write commands that specify a certain QLC block reaching the minimum write size (first minimum write size) of the QLC block.
[0215] (2) The controller 4 performs a write operation on the pSLC block by transferring the data having the first minimum write size transferred to the TWB 161 to the pSLC block.
[0216] (3) In response to the completion of the write operation to the pSLC, the controller 4 transmits one or more completion responses to the one or more write commands to the host 2 via the host interface 11. The data written to the pSLC block is already readable data. Therefore, the controller 4 is able to transmit the completion responses.
[0217] (4) The controller 4 performs a foggy write operation on the QLC block by transferring the data having the first minimum write size transferred to the TWB 161 to the QLC block.
[0218] (5) When the foggy write operation is completed, the controller 4 copies the data having the first minimum write size from the TWB 161 to the LWB 66. After that, the controller 4 releases the storage area of the TWB 161 in response to the completion of copying the data to the LWB 66.
[0219] The controller 4 repeats the above operations (1) to (5).
[0220] (6) Then, in response to the fine write operation being executable, the controller 4 executes the fine write operation to the QLC block using the data stored in the LWB 66.
[0221] Next, a foggy-fine write operation for a QLC block to which LWB66 is not assigned will be described in detail. Fig. 19 is a diagram showing a write operation performed using the TWB in the memory system according to the embodiment.
[0222] (1) The controller 4 receives one or more write commands that specify a certain QLC block from the host 2 via the host interface 11. Then, the controller 4 transfers data having the first minimum write size from the host write buffer 1021 to the TWB 161 via the host interface 11 in response to the total size of data associated with the one or more write commands that specify a certain QLC block reaching the minimum write size (first minimum write size) of the QLC block.
[0223] (2) The controller 4 performs a write operation on the pSLC block by transferring the data having the first minimum write size transferred to the TWB 161 to the pSLC block.
[0224] (3) In response to the completion of the write operation to the pSLC, the controller 4 transmits one or more completion responses to the one or more write commands to the host 2 via the host interface 11. The data written to the pSLC block is already readable data. Therefore, the controller 4 is able to transmit the completion responses.
[0225] (4) The controller 4 executes a foggy write operation on the QLC block by transferring to the QLC block the data having the first minimum write size transferred to the TWB 161. After that, the controller 4 releases the storage area of the TWB 161 in response to the completion of the foggy write on the QLC block.
[0226] The controller 4 repeats the above operations (1) to (4).
[0227] (5) In response to the fine write being executable, the controller 4 reads data from the pSLC block, and then executes a fine write operation on the QLC block using the read data.
[0228] Thereafter, the controller 4 sets the data for which fine writing has been completed, among the data written in the pSLC block, as write completion data.
[0229] Next, a procedure for allocating pSLC blocks to QLC blocks will be described with reference to a flowchart of FIG 20, which is executed in the memory system according to the embodiment to allocate pSLC blocks to QLC blocks.
[0230] The controller 4 starts the operation of allocating a pSLC block to a QLC block when any QLC block is opened, or when the unwritten area of a pSLC block allocated to any QLC block runs out.
[0231] First, the controller 4 determines whether or not a pSLC block exists in the Half Used pSLC block pool 63 (step S11).
[0232] If a pSLC block exists in the Half Used pSLC block pool 63 (Yes in step S11), the controller 4 selects an arbitrary pSLC block from among the pSLC blocks existing in the Half Used pSLC block pool 63 (step S12). The controller 4 may select pSLC blocks in the Half Used pSLC block pool 63 in consideration of wear leveling so that all pSLC blocks have approximately the same degree of wear.
[0233] The controller 4 allocates the pSLC block selected in step S12 to the QLC block (step S13).
[0234] If there is no pSLC block in the Half Used pSLC block pool 63 (No in step S11), the controller 4 selects an arbitrary pSLC block from among the pSLC blocks in the free pSLC block pool 62 (step S14). The controller 4 may select a pSLC block in the free pSLC block pool 62 taking wear leveling into consideration.
[0235] The controller 4 moves the pSLC block selected in step S14 to the Half Used pSLC block pool 63 (step S15). The controller 4 executes an erase operation on the pSLC block selected in step S14. Then, the controller 4 executes the operation of step S15 by adding this pSLC block to the list of the Half Used pSLC block pool 63.
[0236] Then, the controller 4 selects an arbitrary pSLC block from among the pSLC blocks present in the Half Used pSLC block pool 63 (step S12). In other words, the controller 4 selects the pSLC block moved to the Half Used pSLC block pool 63 in step S15.
[0237] The controller 4 allocates the pSLC block selected in step S12 (step S14) to the QLC block (step S13).
[0238] As a result, when allocating a pSLC block to a QLC block, the controller 4 preferentially allocates a pSLC block present in the Half Used pSLC block pool 63 to the QLC block. Furthermore, if no pSLC block exists in the Half Used pSLC block pool 63, the controller 4 selects a pSLC block from the Free pSLC block pool 62 and allocates the pSLC block to the QLC block via the Half Used pSLC block pool 63. Furthermore, the controller 4 may directly allocate a pSLC block present in the Free pSLC block pool 62 to a QLC block without going through the Half Used pSLC block pool 63.
[0239] Next, the procedure of the foggy write operation will be described. First, the foggy write operation will be described in the case where the TWB 161 is not used. Fig. 21 is a flowchart showing the procedure of the foggy write operation for a certain QLC block (QLC#1) executed in the memory system according to the embodiment.
[0240] First, when receiving one or more write commands specifying QLC#1, the controller 4 determines whether the total size of data associated with the received one or more write commands specifying QLC#1 has reached the minimum write size of a pSLC block (step S21).
[0241] If the total size of data associated with the one or more received write commands specifying QLC#1 has not reached the minimum write size of a pSLC block (No in step S21), the controller 4 waits until the total size of data associated with the one or more received write commands specifying QLC#1 reaches the minimum write size of a pSLC block. If the total size of data associated with the one or more write commands specifying QLC#1 has reached the minimum write size of a pSLC block (Yes in step S21), the controller 4 obtains data from the host write buffer 1021 (step S22).
[0242] The controller 4 writes the data acquired in step S23 to the pSLC block (pSLC#1) assigned to QLC#1 (step S23).
[0243] Then, the controller 4 transmits a completion response to each of these one or more write commands to the host 2 (step S24). That is, the controller 4 transmits to the host 2 a completion response to the write command with which the data written in step S23 was associated.
[0244] The controller 4 determines whether the total size of the data stored in pSLC#1 has reached the minimum write size of the QLC block (step S25).
[0245] If the total size of the data stored in pSLC#1 does not reach the minimum write size of the QLC block (No in step S25), the controller 4 returns to the process of step S21. That is, the controller 4 repeats the write operation to pSLC#1 until the total size of the data stored in pSLC#1 reaches the minimum write size of the QLC block.
[0246] If the total size of the data stored in pSLC#1 reaches the minimum write size of the QLC block (Yes in step S25), the controller 4 reads data having the minimum write size of the QLC block from pSLC#1 (step S26).
[0247] The controller 4 uses the data read in step S26 to execute foggy writing for QLC#1 (step S27).
[0248] Next, the procedure of the fine write operation will be described. First, the fine write operation in the case where LWB66 is not used will be described. Fig. 22 is a flowchart showing another example of the procedure of the fine write operation for QLC#1, which is executed in the memory system according to the embodiment.
[0249] First, the controller 4 determines whether or not a fine write operation for a certain word line of QLC#1 is executable (step S31).
[0250] If the fine write operation on the word line in which QLC#1 is located is not yet executable (No in step S31), the controller 4 waits until the fine write operation on the word line in which QLC#1 is located becomes executable.
[0251] When the fine write operation for a certain word line of QLC#1 becomes executable (Yes in step S31), the controller 4 reads the data used in the foggy write operation for this word line from pSLC#1 (step S32).
[0252] The controller 4 executes a fine write operation on this word line of QLC#1 using the data read in step S32 (step S33). By executing the fine write operation, the data written on this word line of QLC#1 becomes readable data.
[0253] Next, the procedure of the operation of allocating LWB66 to QLC#1 will be described. Fig. 23 is a flowchart showing the procedure of the operation of allocating LWB to a QLC block, which is executed in the memory system according to the embodiment. The allocation of the LWB to the QLC block is executed between the execution of the data erase operation of this QLC block and the first write to this QLC block.
[0254] First, the controller 4 judges whether or not a given QLC block (here, QLC#1) has been opened as a write destination block (step S41). When opening QLC#1, as described in paragraph
[0130] , the controller 4 executes a data erase operation of QLC#1, thereby making QLC#1 available for writing data.
[0255] If QLC #1 is not open (No in step S41), the controller 4 repeatedly executes the determination process in step S41 until QLC #1 is opened.
[0256] When QLC#1 is opened (Yes in step S41), the controller 4 judges whether or not there is an LWB 66 that is not assigned to any QLC block (step S42).
[0257] If there is an LWB 66 that is not assigned to any QLC block (YES in step S42), the controller 4 selects an arbitrary LWB 66 from among the LWBs 66 that are not assigned to any QLC block (step S43).
[0258] The controller 4 assigns the LWB 66 selected in step S43 to the QLC#1 (step S44).
[0259] If there is no LWB 66 that is not assigned to any QLC block (No in step S42), the controller 4 releases the allocation of the LWB 66 from any one of the multiple QLC blocks that have already been opened. The QLC block from which the allocation of the LWB 66 is released is, for example, the QLC block in which data was last written the oldest. In this case, the controller 4 selects the QLC block in which data was last written the oldest among the multiple open QLC blocks, and releases the allocation of the LWB 66 from the selected QLC block. Note that, among the multiple LWBs 66, the LWB 66 in which data was last written the oldest may be selected as the LWB 66 assigned to the QLC block in which data was last written the oldest. The LWB 66 in which the latest data was written the oldest is the LWB assigned to the QLC block in which data has not been written the most recently. Therefore, for example, the controller 4 may select the LWB 66 in which the latest data was last written the oldest (here, LWB#1) from among the multiple LWBs 66 (step S45). In step S45, the controller 4 may select the LWB 66 based on other algorithms.
[0260] The controller 4 releases the allocation of the LWB#1 selected in step S45 (step S46). The controller 4 releases the allocation of the LWB#1 from the QLC block to which the LWB#1 was allocated. As a result, the LWB#1 becomes LWB66 that is not allocated to any QLC block.
[0261] Then, the controller 4 assigns the LWB#1 selected in step S45 to the QLC#1 (step S44).
[0262] Next, a description will be given of a procedure for foggy write executed using the TWB 161. Fig. 24 is a flowchart showing a procedure for a foggy write operation to a certain QLC block executed using the TWB in the memory system according to the embodiment.
[0263] First, the controller 4 determines whether or not the total size of data associated with one or more write commands specifying QLC#1 has reached the minimum write size of a QLC block (step S51).
[0264] If the total size of data associated with one or more write commands that specify QLC#1 has not reached the minimum write size of a QLC block (No in step S51), the controller 4 waits until the total size of data associated with one or more write commands that specify QLC#1 reaches the minimum write size of a QLC block.
[0265] If the total size of data associated with one or more write commands specifying QLC#1 reaches the minimum write size of a QLC block (Yes in step S51), the controller 4 transfers data having the minimum write size of a QLC block from the host write buffer 1021 to the TWB 161 (step S52).
[0266] The controller 4 writes the data transferred to the TWB 161 to the pSLC#1 assigned to the QLC#1 (step S53). Then, the controller 4 transmits a completion response to each of the one or more write commands to the host 2 (step S54).
[0267] Thereafter, the controller 4 executes foggy writing to QLC#1 (step S55). The controller 4 executes foggy writing to QLC#1 by using the data transferred to the TWB 161. Therefore, when executing foggy writing, the controller 4 does not read data from pSLC#1.
[0268] The controller 4 determines whether or not a large write buffer (LWB) 66 is assigned to QLC#1 (step S56).
[0269] If the LWB 66 is assigned to the QLC #1 (Yes in step S56), the controller 4 copies the data stored in the TWB 161 to the LWB 66 assigned to the QLC #1 (step S57).
[0270] The controller 4 discards the data stored in the TWB 161 (step S58). This makes the TWB 161 available for storing new data.
[0271] If the LWB 66 is not assigned to the QLC#1 (No in step S56), the controller 4 skips the operation of step S57 and discards the data stored in the TWB 161 (step S58).
[0272] Next, a description will be given of a procedure for fine write executed using the TWB 161. Fig. 25 is a flowchart showing the procedure for a fine write operation to a certain QLC block executed using the TWB in the memory system according to the embodiment.
[0273] First, the controller 4 determines whether or not a fine write operation for a certain word line of QLC#1 is executable (step S61).
[0274] If the fine write operation on the word line in which QLC#1 is located is not yet executable (No in step S61), the controller 4 waits until the fine write operation on the word line in which QLC#1 is located is ready to be executed.
[0275] When a fine write operation on a certain word line of QLC#1 becomes executable (Yes in step S61), the controller 4 determines whether or not the LWB 66 is assigned to QLC#1 (step S62).
[0276] If the LWB 66 is assigned to QLC#1 (Yes in step S62), the controller 4 reads the data used in the foggy write operation for this word line from the LWB 66 (step S63).
[0277] Then, the controller 4 executes fine writing to this word line of QLC#1 using the data read in step S63 (step S64).
[0278] If the LWB 66 is not assigned to the QLC#1 (No in step S62), the controller 4 reads the data used in the foggy write operation for this word line from the pSLC#1 (step S65).
[0279] Then, the controller 4 executes fine writing to QLC#1 using the data read in step S65 (step S64).
[0280] As described above, according to this embodiment, the controller 4 allocates a pSLC block (e.g., pSLC #1) included in the pSLC buffer 201 to a QLC block (e.g., QLC #1) included in the QLC area 202. The controller 4 writes only data to be written to QLC #1 to pSLC #1. While pSLC #1 is allocated to QLC #1, the controller 4 does not write data to be written to a QLC block other than QLC #1 to pSLC #1.
[0281] Furthermore, when pSLC#1 has an unwritten area remaining and QLC#1 is filled with data that has been written to QLC#1, the controller 4 releases the allocation of pSLC#1 from QLC#1. Then, the controller 4 returns pSLC#1 to the Half Used pSLC block pool 63 so that pSLC#1 can be reused. After that, when pSLC#1 is allocated to QLC#2, the controller 4 writes only the data to be written to QLC#2 to the unwritten area of pSLC#1.
[0282] This prevents a situation in which incomplete data to be written to multiple QLC blocks is mixed in pSLC#1. The controller 4 can efficiently manage pSLC blocks without performing garbage collection processing on the pSLC buffer 201 including pSLC#1.
[0283] Furthermore, when performing a first-stage write operation (foggy write operation) on QLC#1, the controller 4 may use the data stored in the TWB 161 without reading data from pSLC#1. Furthermore, when performing a second-stage write operation (fine write operation) on QLC#1, the controller 4 may use the data stored in the LWB 66 without reading data from pSLC#1.
[0284] This allows the controller 4 to execute the foggy-fine write operation on the QLC#1 without reading data from the pSLC#1, thereby enabling the controller 4 to reduce consumption of the bandwidth for data transfer between the controller 4 and the NAND flash memory 5.
[0285] 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 new 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]
[0286] 1...information processing system, 2...host, 3...SSD, 4...controller, 5...NAND flash memory, 6...DRAM, 10...bus, 11...host interface, 12...CPU, 13...NAND interface, 14...DRAM interface, 15...DMAC, 16...SRAM, 17...ECC encoding / decoding unit, 61...Z2P table, 62...free pSLC block pool, 63...Half Used pSLC block pool, 64...QLC SA table, 65...pSLC SA table, 66...LWB, 101...processor, 102...memory, 121...flash management unit, 122...QLC block control unit, 123...pSLC block control unit, 161...TWB, 201...pSLC write buffer, 202...QLC area, 1021...host write buffer.
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; a controller electrically connected to the non-volatile memory, configured to manage a first group of blocks among the plurality of blocks and a second group of blocks among the plurality of blocks, and to control writing of data from the first group of blocks to a plurality of destination blocks assigned thereto; Each of the blocks included in the first block group has a first minimum write size, and each of the blocks included in the second block group has a second minimum write size that is smaller than the first minimum write size; The controller: when a first block included in the first block group is opened as a write destination block, assigning a second block included in the second block group to the first block; in response to receiving one or more write commands from the host specifying the first block, writing only first data associated with the one or more write commands to the second block for each of the second minimum write sizes; writing the first data to the first block in units of the first minimum write size in response to completion of writing the first data to the second block; a first destination block other than the first block, and writing only the data to be written to the first destination block to the unwritten area of the second block;
2. The controller: writing data having the first minimum write size to a plurality of memory cells connected to each word line of the first block using a first write mode in which reading of data written to one word line among a plurality of word lines included in the first block is possible after writing of data to one or more word lines subsequent to the one word line; 2. The memory system of claim 1, configured to write data having the second minimum write size to a plurality of memory cells connected to each word line of the second block using a second write mode in which reading of data written to one of a plurality of word lines included in the second block is possible only by writing data to the one word line of the second block.
3. The controller: writing the data having the second minimum write size to the second block when a total size of data associated with the received one or more write commands reaches the second minimum write size; responsive to completion of writing the data having the second minimum write size to the second block, sending one or more completion responses to the host indicating completion of the received one or more write commands; 2. The memory system of claim 1, configured to read data having the first minimum write size from the second block and write the read data to the first block when a total size of data written to the second block reaches the first minimum write size.
4. Writing data using the first write mode is performed by a multi-stage write operation including at least a first stage write operation including transferring data having the first minimum write size to the non-volatile memory, and a second stage write operation including transferring the data again to the non-volatile memory; The controller: When a total size of data associated with the one or more received write commands reaches the first minimum write size, transferring the data having the first minimum write size from a write buffer provided in the host to a first write buffer included in the memory system; writing the data transferred to the first write buffer into the second block; writing the data transferred to the first write buffer to the first block by the first-stage write operation without reading the data written to the second block; 3. The memory system of claim 2, configured to transmit one or more completion responses to the host indicating completion of the received one or more write commands upon completion of writing the data to the second block.
5. The controller: If one second write buffer among a plurality of second write buffers included in the memory system is assigned to the first block, the data used in the first stage write operation for the first block is transferred from the first write buffer to the one second write buffer; When the second phase write operation for the first word line of the first block can be started, reading data used in the first-phase write operation for the first word line of the first block from the one second write buffer; 5. The memory system according to claim 4, configured to write the read data to the plurality of memory cells connected to the first word line of the first block by the second stage write operation.
6. The controller:
6. The memory system of claim 5, further comprising: when none of the second write buffers among the plurality of second write buffers is assigned to the first block, the data used in the first phase write operation to the first word line of the first block is read from the second block, and the read data is written to the first block by the second phase write operation.
7. the controller is configured to, when opening the first block as a write destination block, allocate one of the second write buffers to the first block during a period from when a data erase operation of the first block is performed to when a first write is performed to the first block; 6. The memory system of claim 5, wherein if there are no unallocated second write buffers among the plurality of second write buffers that are not currently assigned to any of the destination blocks, the controller deallocates a second write buffer from any one of the plurality of already opened destination blocks and assigns the deallocated second write buffer to the first block.
8. The controller: Among multiple already opened write destination blocks, select the write destination block with the oldest data written time, 8. The memory system of claim 7, configured to deallocate a second write buffer from the selected destination block and allocate the deallocated second write buffer to the first block.
9. A control method for managing a first block group and a second block group among a plurality of blocks of a non-volatile memory included in a memory system, by a controller, and controlling writing of data to a plurality of write destination blocks assigned from the first block group, wherein each of the blocks included in the first block group has a first minimum write size, and each of the blocks included in the second block group has a second minimum write size smaller than the first minimum write size, The controller: when a first block included in the first block group is opened as a write destination block, allocating a second block included in the second block group to the first block; in response to receiving one or more write commands from a host specifying the first block, writing only first data associated with the one or more write commands to the second block for each of the second minimum write sizes; writing the first data to the first block for each of the first minimum write sizes in response to completion of writing the first data to the second block; a control method for controlling a write operation of a write-data-receiving unit that writes data to a first block to the second block, the control method comprising: when the first block is filled with data that has been written to the first block while an unwritten area remains in the second block, deallocating the second block from the first block, allocating the deallocated second block to a first destination block other than the first block, and writing only the data to be written to the first destination block to the unwritten area of the second block.
10. The writing to the first block is performed by the controller writing data having the first minimum write size to a plurality of memory cells connected to each word line of the first block using a first write mode in which reading of data written to one word line among a plurality of word lines included in the first block is possible after writing of data to one or more word lines subsequent to the one word line, The control method of claim 9, wherein writing to the second block is performed by the controller writing data having the second minimum write size to a plurality of memory cells connected to each word line of the second block using a second write mode in which reading of data written to one word line among a plurality of word lines included in the second block is possible only by writing data to the one word line of the second block.
11. The controller: when a total size of data associated with the one or more received write commands reaches the second minimum write size; writing the data having the second minimum write size to the second block; responsive to completion of writing the data having the second minimum write size to the second block, sending one or more completion responses to the host indicating completion of the received one or more write commands; 10. The control method of claim 9, further comprising: when a total size of data written to the second block reaches the first minimum write size, reading data having the first minimum write size from the second block and writing the read data to the first block.
12. Writing data using the first write mode is performed by a multi-stage write operation including at least a first stage write operation including transferring data having the first minimum write size to the non-volatile memory, and a second stage write operation including transferring the data again to the non-volatile memory; The controller: when a total size of data associated with the one or more received write commands reaches the first minimum write size; transferring the data having the first minimum write size from a write buffer provided in the host to a first write buffer included in the memory system; writing the data transferred to the first write buffer into the second block; writing the data transferred to the first write buffer to the first block by the first-stage write operation without reading the data written to the second block; 11. The control method according to claim 10, further comprising: sending one or more completion responses to the host indicating completion of the received one or more write commands in response to completion of writing the data to the second block.
13. The controller: When one second write buffer among a plurality of second write buffers included in the memory system is assigned to the first block, the data used in the first stage write operation for the first block is transferred from the first write buffer to the one second write buffer; When the second phase write operation for the first word line of the first block can be started, reading data used in the first-phase write operation to the first word line of the first block from the one second write buffer; 13. The control method according to claim 12, further comprising: writing the read data to the plurality of memory cells connected to the first word line of the first block by the second-stage write operation.
14. The controller: The control method of claim 13, further comprising the steps of: reading the data used in the first phase write operation to the first word line of the first block from the second block; and writing the read data to the first block by the second phase write operation when none of the second write buffers among the plurality of second write buffers is assigned to the first block.
15. The controller, when the first block is opened as a write destination block, allocating one of the second write buffers to the first block during a period from when a data erase operation of the first block is performed to when a first write operation is performed to the first block; 14. The control method of claim 13, further comprising: if there is no unallocated second write buffer among the plurality of second write buffers that is not currently assigned to any of the write destination blocks, deallocating a second write buffer from any one of the plurality of already opened write destination blocks, and assigning the deallocated second write buffer to the first block.
16. 16. The control method according to claim 15, wherein the destination block from which the second write buffer is deallocated is the destination block to which data was last written, among a plurality of already opened destination blocks.
Citation Information
Patent Citations
Memory system
JP2020035128A
Memory system and control method
JP2021081981A
US10,747,462
US10,956,067
US11,003,385
