Memory system and information processing system
Patent Information
- Application Number
- JP2020171750
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-10-12
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2040-10-12
Smart Images

Figure 0007558745000001 
Figure 0007558745000002 
Figure 0007558745000003
Abstract
Description
[Technical field]
[0001] FIELD An embodiment of the present invention relates to a memory system and an information processing system. [Background technology]
[0002] 2. Description of the Related Art In recent years, memory systems equipped with nonvolatile memories have become widespread. One known example of such a memory system is a solid state drive (SSD) equipped with a NAND flash memory.
[0003] Incidentally, the validity of the data written in the non-volatile memory (i.e., whether the data is valid or invalid) is managed using a data map, but it is desirable to efficiently manage the validity of the data. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2018-041204 A Summary of the Invention [Problem to be solved by the invention]
[0005] Therefore, an object of the present invention is to provide a memory system and an information processing system capable of efficiently managing the validity of data written in a non-volatile memory. [Means for solving the problem]
[0006] According to an embodiment, a memory system connectable to a host is provided. The memory system includes a non-volatile memory and a data map for managing validity of data written in the non-volatile memory. The data map has a hierarchical structure consisting of at least a first hierarchy and a second hierarchy higher than the first hierarchy, and includes a plurality of first fragment tables corresponding to the first hierarchy and a second fragment table corresponding to the second hierarchy. Each of the plurality of first fragment tables is used to manage validity of each of data of a predetermined size written in a range of physical addresses in the non-volatile memory assigned to the first fragment table. The second fragment table is used to manage reference destination information for referencing the first fragment table for each of the first fragment tables. [Brief description of the drawings]
[0007] [Figure 1] 1 is a block diagram showing an example of a configuration of an information processing system including a memory system according to an embodiment. [Diagram 2] 3A and 3B are diagrams for conceptually explaining an LUT in the embodiment. [Diagram 3] 5 is a diagram showing an example of the data structure of an LUT fragment table in the embodiment. [Figure 4] FIG. 13 is a diagram for explaining a VDM in a comparative example of the embodiment. [Diagram 5] FIG. 2 is a diagram for conceptually explaining a VDM in the embodiment. [Figure 6] FIG. 13 is a diagram showing an example of the data structure of a first VDM fragment table in the embodiment. [Figure 7] FIG. 13 is a diagram showing an example of the data structure of a second VDM fragment table in the embodiment. [Figure 8] 11A and 11B are diagrams showing the relationship between the PBA management number of a LUT fragment table and the PBA management number of a VDM fragment table corresponding to each layer in the embodiment. [Figure 9] 11A and 11B are diagrams showing the relationship between the PBA management number of a LUT fragment table and the PBA management number of a VDM fragment table corresponding to each layer in the embodiment. [Figure 10] 11A and 11B are diagrams showing the relationship between the PBA management number of a LUT fragment table and the PBA management number of a VDM fragment table corresponding to each layer in the embodiment. [Figure 11] 11A and 11B are diagrams showing the relationship between the PBA management number of a LUT fragment table and the PBA management number of a VDM fragment table corresponding to each layer in the embodiment. [Figure 12] 11A and 11B are diagrams showing the relationship between the PBA management number of a LUT fragment table and the PBA management number of a VDM fragment table corresponding to each layer in the embodiment. [Figure 13] 11A and 11B are diagrams showing the relationship between the PBA management number of a LUT fragment table and the PBA management number of a VDM fragment table corresponding to each layer in the embodiment. [Figure 14] 11A and 11B are diagrams showing the relationship between the PBA management number of a LUT fragment table and the PBA management number of a VDM fragment table corresponding to each layer in the embodiment. [Figure 15] 11A and 11B are diagrams showing the relationship between the PBA management number of a LUT fragment table and the PBA management number of a VDM fragment table corresponding to each layer in the embodiment. [Figure 16] 11A and 11B are diagrams showing the relationship between the PBA management number of a LUT fragment table and the PBA management number of a VDM fragment table corresponding to each layer in the embodiment. [Figure 17] 11A and 11B are diagrams showing the relationship between the PBA management number of a LUT fragment table and the PBA management number of a VDM fragment table corresponding to each layer in the embodiment. [Figure 18] 11 is a flowchart showing an example of a processing procedure of the memory system according to the embodiment when a write command is transmitted from the host. [Figure 19] 11 is a flowchart showing an example of a processing procedure of the memory system according to the embodiment when a Trim command is transmitted from the host. [Figure 20] 11 is a flowchart showing an example of a processing procedure of the memory system according to the embodiment when checking whether data written to a specific PBA in the nonvolatile memory is valid or invalid. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0008] 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 this embodiment.
[0009] In this embodiment, the memory system is a semiconductor storage device configured to write data (user data) to a non-volatile memory and read data from the non-volatile memory. This memory system may be realized as, for example, a solid state drive (SSD) or other storage device such as a memory card. In this embodiment, it is assumed that the memory system is realized as an SSD.
[0010] 1, the information processing system 1 includes a host 2 and a memory system 3. The host 2 is an information processing device that operates as a host device for the memory system 3, and can be realized as, for example, a personal computer, a server device, a mobile phone, an imaging device, a mobile terminal (such as a tablet computer or a smartphone), a game device, or an in-vehicle terminal (such as a car navigation system).
[0011] The memory system 3 is configured to be connectable to the host 2, and includes a non-volatile memory 4, and a controller 5 (control circuit) that controls writing and reading of data to the non-volatile memory 4. The non-volatile memory 4 may be configured to be detachable from the controller 5. This allows the memory capacity of the memory system 3 to be freely expanded.
[0012] When the memory system 3 is realized as an SSD as described above, the nonvolatile memory 4 is, for example, a NAND type flash memory. In this case, the nonvolatile memory 4 (NAND type flash memory) includes a plurality of memory cells (memory cell array) arranged in a matrix. The nonvolatile memory 4 may be a two-dimensional NAND type flash memory or a three-dimensional NAND type flash memory.
[0013] The memory cell array of the non-volatile memory 4 includes a number of blocks, each of which is organized into a number of pages. In the memory system 3 (SSD), each block functions as a data erase unit. Each page is a unit of data write and read operations.
[0014] Various data is written to the nonvolatile memory 4, which further stores an address conversion table called a Look Up Table (LUT) 41 (hereinafter simply referred to as LUT). The LUT 41 is also called a Logical address to Physical address (L2P). The LUT 41 corresponds to data for managing the correspondence between a logical address used when the host 2 accesses the memory system 3 (to write data to the nonvolatile memory 4 or to read data from the nonvolatile memory 4) and a physical address indicating the physical location where the data is written in the nonvolatile memory 4. In other words, the LUT 41 stores a physical address corresponding to each logical address in association with the logical address.
[0015] When the nonvolatile memory 4 is a NAND type flash memory, the logical addresses managed in the LUT 41 are logical block addresses (LBAs) and the physical addresses are physical block addresses (PBAs). In the following description, the logical addresses are LBAs and the physical addresses are PBAs.
[0016] The nonvolatile memory 4 further stores a data map called a VDM (Valid Data Map) (hereinafter, simply referred to as VDM) 42. The VDM 42 corresponds to data for managing the validity of data written to physical addresses in the nonvolatile memory 4 (i.e., whether the data is valid or invalid).
[0017] At least one of the LUT 41 and the VDM 42 may be stored in a nonvolatile memory other than the nonvolatile memory 4. The nonvolatile memory 4 may be configured to separate the memory (area) for storing the data, the LUT 41, and the VDM 42.
[0018] The controller 5 includes a communication interface control unit 51, a write buffer memory 52, a read buffer memory 53, a non-volatile memory controller 54, a memory 55, and a processor 56. The communication interface control unit 51, the write buffer memory 52, the read buffer memory 53, the non-volatile memory controller 54, the memory 55, and the processor 56 are electrically connected to each other via an internal bus IB.
[0019] The communication interface control unit 51 controls communication between an external device (for example, the host 2) and the memory system 3. Specifically, the communication interface control unit 51 receives various commands from the host 2. The various commands from the host 2 include, for example, a write command (write request) and a read command (read request).
[0020] The write command received by the communication interface control unit 51 includes the data to be written to the non-volatile memory 4 based on the write command and the LBA used by the host 2 when accessing the data. The read command received by the communication interface control unit 51 includes the LBA used by the host 2 when accessing the data read based on the read command (i.e., the LBA corresponding to the data).
[0021] Here, when a write command is received by the communication interface control unit 51, data is written to the nonvolatile memory 4 based on the write command, and the write buffer memory 52 temporarily stores the data to be written to the nonvolatile memory 4. The data stored in the write buffer memory 52 is written to the nonvolatile memory 4 via the nonvolatile memory controller 54.
[0022] On the other hand, when the communication interface control unit 51 receives a read command, data is read from the nonvolatile memory 4 based on the read command, and the read buffer memory 53 temporarily stores the data read from the nonvolatile memory 4 by the nonvolatile memory controller 54. The data stored in the read buffer memory 53 is transmitted to the host 2 via the communication interface control unit 51.
[0023] The nonvolatile memory controller 54 controls writing of data to the nonvolatile memory 4 and reading of data from the nonvolatile memory 4. Although detailed description will be omitted, the nonvolatile memory controller 54 may be configured to include a DMAC (Direct Memory Access Controller), an error correction unit, a randomizer (or a scrambler), and the like.
[0024] The memory 55 is a main storage device used as a working memory for the processor 56. The memory 55 is, for example, a dynamic random access memory (DRAM), but may be another semiconductor memory such as a static random access memory (SRAM).
[0025] The memory 55 can be written to and read from at a higher speed than the nonvolatile memory 4, and includes a cache memory 551 (an area used as a cache memory). The cache memory 551 stores cache data such as the LUT 41 and VDM 42 stored in the nonvolatile memory 4.
[0026] The processor 56 controls the overall operation of the controller 5 via the internal bus IB. The processor 56 executes various processes (e.g., processes for various commands received from the host 2, etc.) by executing a control program (firmware) stored in, for example, a ROM (Read Only Memory) not shown.
[0027] In this embodiment, the controller 5, by means of such a processor 56, functions as a flash translation layer (FTL) configured to perform data management and block management of the non-volatile memory 4 (NAND type flash memory).
[0028] The processor 56 may be, for example, a central processing unit (CPU), a micro-processing unit (MPU), or a digital signal processor (DSP).
[0029] The processor 56 executes the above-mentioned control program to realize functional units such as a write control unit 561, a read control unit 562, a garbage collection control unit 563, an address conversion unit 564, a management unit 565, and a cache memory control unit 566.
[0030] Although each of these units 561 to 566 is realized by a control program (that is, software) as described above, they may also be realized by hardware or a combination of software and hardware.
[0031] When a write command is received by the communication interface control unit 51, the write control unit 561 controls the communication interface control unit 51, the write buffer memory 52, and the non-volatile memory controller 54, and performs a process of writing the data contained in the write command to the non-volatile memory 4.
[0032] When a read command is received by the communication interface control unit 51, the read control unit 562 controls the communication interface control unit 51, the read buffer memory 53, and the non-volatile memory controller 54, and executes a process of reading data corresponding to the LBA included in the read command from the non-volatile memory 4.
[0033] The garbage collection control unit 563, for example, cooperates with the write control unit 561, the read control unit 562, and the nonvolatile memory controller 54 to refer to the above-mentioned VDM 42 and execute garbage collection (GC) on the nonvolatile memory 4. Garbage collection is a process of releasing unnecessary storage areas (memory areas) of the nonvolatile memory 4. Compaction, which eliminates fragmentation of the storage areas of the nonvolatile memory 4, may be performed together with the garbage collection.
[0034] When the communication interface control unit 51 receives the above-mentioned read command, the address conversion unit 564 executes a process of converting the LBA included in the read command into a PBA (physical address) by using the LUT 41 stored in the nonvolatile memory 4. In the memory system 3, it becomes possible to read data (data corresponding to the LBA) from the nonvolatile memory 4 based on the PBA converted from the LBA by the address conversion unit 564 in this way.
[0035] The management unit 565 executes a process of updating the LUT 41 and the VDM 42 when the above-mentioned write command is received by the communication interface control unit 51 and data is written to the non-volatile memory 4 based on the write command.
[0036] The cache memory control unit 566 executes a process of reading (a part of) the LUT 41 or (a part of) the VDM 42 from the nonvolatile memory 4 via, for example, the read control unit 562, and storing the LUT 41 or VDM 42 in the cache memory 551. In addition, the cache memory control unit 566 executes a process of reading (a part of) the LUT 41 or (a part of) the VDM 42 stored in the cache memory 551, and writing (writing back) the LUT 41 or VDM 42 to the nonvolatile memory 4 via the write control unit 561.
[0037] 1 illustrates an example in which the memory system 3 is provided outside the host 2, but an interface between the host 2 and the memory system 3 may be, for example, MVMe over Fabrics. The memory system 3 may be built into the host 2. Furthermore, the memory system 3 may be connected to multiple hosts 2, or multiple memory systems 3 may be connected to one or more hosts 2.
[0038] Here, the above-mentioned LUT 41 manages the correspondence between LBA (logical address) and PBA (physical address), but for example, when a write command from the host 2 is received by the communication interface control unit 51 and data is written to the non-volatile memory 4 based on the write command, the management unit 565 needs to update the correspondence in LUT 41 between the LBA included in the write command and the PBA in the non-volatile memory 4 to which the data has been written (i.e., register the correspondence in LUT 41).
[0039] However, when a wide range of LBAs is specified in the write command, the process of updating the correspondence between LBAs and PBAs in the LUT 41 takes time.
[0040] For this reason, the LUT 41 in this embodiment has a hierarchical structure made up of a plurality of hierarchical levels, and is configured to include a plurality of tables (hereinafter, referred to as LUT fragment tables) corresponding to the plurality of hierarchical levels. Note that the hierarchical structure of the LUT 41 is determined based on setting information of the memory system 3 including, for example, the capacity of the non-volatile memory 4.
[0041] In such an LUT 41, each of the multiple LUT fragment tables is assumed to be, for example, the same size. In addition, although details will be described later, in the LUT fragment table corresponding to a higher hierarchical level among the multiple LUT fragment tables corresponding to multiple hierarchical levels, LBA (range) and reference destination information (hereinafter, referred to as LUT pointer) for referencing the LUT fragment table corresponding to a lower hierarchical level than the LUT fragment table are stored. Note that the LUT pointer includes, for example, a PBA in the non-volatile memory 4 in which the reference destination LUT fragment table is stored. In addition, in the LUT fragment table corresponding to the lowest hierarchical level in the hierarchical structure of the LUT 41, PBAs corresponding to each of the LBAs assigned to the LUT fragment table are stored.
[0042] That is, in this embodiment, the LUT 41 has a hierarchical structure that allows sequential reference from a LUT fragment table corresponding to a higher layer to a LUT fragment table corresponding to a lower layer, and the correspondence between LBA and PBA is managed in this hierarchical structure.
[0043] Hereinafter, the LUT 41 having a hierarchical structure will be conceptually described with reference to Fig. 2. In the example shown in Fig. 2, it is assumed that the LUT 41 has a hierarchical structure consisting of four levels. In this case, the LUT 41 includes a plurality of LUT fragment tables T411 to T414.
[0044] As shown in FIG. 2, the first LUT fragment table T411 is a LUT fragment table corresponding to the lowest layer (hereinafter referred to as the first layer) in the hierarchical structure of the LUT 41. The second LUT fragment table T412 is a LUT fragment table corresponding to a layer (hereinafter referred to as the second layer) above the first LUT fragment table T411 in the hierarchical structure of the LUT 41. The third LUT fragment table T413 is a LUT fragment table corresponding to a layer (hereinafter referred to as the third layer) above the second LUT fragment table T412 in the hierarchical structure of the LUT 41. The fourth LUT fragment table T414 is a LUT fragment table corresponding to a layer (hereinafter referred to as the fourth layer) above the third LUT fragment table T413 in the hierarchical structure of the LUT 41. In the example shown in FIG. 2, the fourth layer is the highest layer in the hierarchical structure of the LUT 41.
[0045] Each of the first LUT fragment table T411 to the fourth LUT fragment table T414 will be described in detail below.
[0046] First, a range of consecutive LBAs is assigned to each of the multiple first LUT fragment tables T411, and the first LUT fragment table T411 includes multiple entries C411. Also, each of the multiple entries C411 included in the first LUT fragment table T411 is assigned a different LBA from the range of LBAs assigned to the first LUT fragment table T411, and stores a PBA corresponding to the LBA (i.e., a PBA in which data corresponding to the LBA is written).
[0047] In this embodiment, the entire range of LBAs used by the host 2 when accessing the memory system 3 is divided into the number of first LUT fragment tables T411, and the divided LBA ranges are assigned to each of the first LUT fragment tables T411. This makes it possible to manage PBAs corresponding to each of the entire range of LBAs used by the host 2 when accessing the memory system 3 in multiple first LUT fragment tables T411.
[0048] Next, each of the multiple second LUT fragment tables T412 is assigned a wider LBA range than the first LUT fragment table T411 described above, and the second LUT fragment table T412 includes multiple entries C412. Also, each of the multiple entries C412 included in the second LUT fragment table T412 is assigned an LBA range assigned to the first LUT fragment table T411 corresponding to the lower layer of the second LUT fragment table T412, and an LUT pointer indicating (the position of) the first LUT fragment table T411 is stored. In this case, the LBA range assigned to each of the second LUT fragment tables T412 corresponds to the LBA range assigned to all first LUT fragment tables T411 indicated by the LUT pointer stored in each of the multiple entries C412 included in the second LUT fragment table T412.
[0049] Moreover, each of the multiple third LUT fragment tables T413 is assigned a wider LBA range than the above-mentioned second LUT fragment table T412, and the third LUT fragment table T413 includes multiple entries C413. Moreover, each of the multiple entries C413 included in the third LUT fragment table T413 is assigned an LBA range assigned to the second LUT fragment table T412 corresponding to the lower layer of the third LUT fragment table T413, and an LUT pointer indicating (the position of) the second LUT fragment table T412 is stored. In this case, the LBA range assigned to each of the third LUT fragment tables T413 corresponds to the LBA range assigned to all second LUT fragment tables T412 indicated by the LUT pointer stored in each of the multiple entries C413 included in the third LUT fragment table T413.
[0050] Furthermore, each of the multiple fourth LUT fragment tables T414 is assigned a wider LBA range than the above-mentioned third LUT fragment table T413, and the fourth LUT fragment table T414 includes multiple entries C414. Also, each of the multiple entries C414 included in the fourth LUT fragment table T414 is assigned the LBA range assigned to the third LUT fragment table T413 for the lower layer of the fourth LUT fragment table T414, and a LUT pointer indicating (the position of) the third LUT fragment table T413 is stored. In this case, the LBA range assigned to each of the fourth LUT fragment tables T414 corresponds to the LBA range assigned to all the third LUT fragment tables T413 indicated by the LUT pointer stored in each of the multiple entries C414 included in the fourth LUT fragment table T414.
[0051] Here, each of the multiple fourth LUT fragment tables T414 corresponding to the fourth hierarchical level (i.e., the highest hierarchical level in the hierarchical structure) corresponds to each of the multiple namespaces. A namespace is an area obtained by logically dividing the storage area (multiple blocks) of the non-volatile memory 4. By assigning a namespace to each storage area of a predetermined range, it becomes possible to access appropriate data using a namespace ID (identification information for identifying a namespace) and an LBA, even if the LBA overlaps in two or more storage areas. This allows access to different namespaces to be treated in the same way as access to different devices.
[0052] 2, the multiple fourth LUT fragment tables T414 correspond to namespaces NS1 to NSn (n is a natural number equal to or greater than 2). In this case, the number of the multiple fourth LUT fragment tables T414 is n.
[0053] As shown in FIG. 2, LUT41 has a hierarchical structure for each namespace NS1 to NSn (corresponding fourth LUT fragment table T414), but the number of hierarchies for each namespace NS1 to NSn is determined according to (the size of) the storage area allocated to the namespace NS1 to NSn. For example, if the size of the storage area allocated to a namespace is small, the number of hierarchies for that namespace will be small. On the other hand, if the size of the storage area allocated to a namespace is large, the number of hierarchies for that namespace will be large. Note that the example shown in FIG. 2 shows a case where the number of hierarchies for each of the namespaces NS1 to NSn is the same.
[0054] In the LUT41 having the hierarchical structure shown in FIG. 2 described above, the LUT pointer stored in each of the entries C414 included in the fourth LUT fragment table T414 corresponding to the fourth hierarchy (the highest hierarchy) points to the third LUT fragment table T413 corresponding to the third hierarchy, the LUT pointer stored in each of the entries C413 included in the third LUT fragment table T413 points to the second LUT fragment table T412 corresponding to the second hierarchy, the LUT pointer stored in each of the entries C412 included in the second LUT fragment table T412 points to the first LUT fragment table T411 corresponding to the first hierarchy (the lowest hierarchy), and the entry C411 included in the first LUT fragment table T411 is configured to store a PBA corresponding to one LBA.
[0055] With such an LUT41, for example, the PBA corresponding to an LBA specified in various commands (an LBA included in various commands) can be identified by sequentially referring to the fourth LUT fragment table T414, the third LUT fragment table T413, the second LUT fragment table T412, and the first LUT fragment table T411.
[0056] 2, the first LUT fragment table T411 is an LUT fragment table corresponding to the lowest hierarchical level in the hierarchical structure of the LUT 41, and each entry C411 included in the first LUT fragment table T411 stores a PBA corresponding to one LBA. In this case, if the size of data written to one PBA is 4 KiB and one first LUT fragment table T411 includes 32 entries C411, a range of 32 LBAs (i.e., LBAs for accessing 128 KiB of data) is assigned to one first LUT fragment table T411 corresponding to the first hierarchical level.
[0057] Similarly, assuming that one second LUT fragment table T412 contains 32 entries C412, and a LUT pointer indicating a first LUT fragment table T411 to which 32 LBAs for accessing 128 KiB of data is assigned is stored in each of the entries C412 (i.e., each entry C412 is assigned a range of 32 LBAs assigned to the first LUT fragment table T411), one second LUT fragment table T412 corresponding to the second tier is assigned a range of 32 x 32 = 1,024 LBAs (i.e., LBAs for accessing 4 MiB of data).
[0058] Furthermore, assuming that one third LUT fragment table T413 includes 32 entries C413, and that each entry C413 stores an LUT pointer indicating the second LUT fragment table T412 to which 1,024 LBAs are assigned for accessing 4 MiB of data (i.e., each entry C413 is assigned the range of 1,024 LBAs assigned to the second LUT fragment table T412), one third LUT fragment table T413 corresponding to the third tier is assigned a range of 1,024 x 32 = 32,768 LBAs (i.e., LBAs for accessing 128 MiB of data).
[0059] In addition, assuming that one fourth LUT fragment table T414 includes 32 entries C414 and that an LUT pointer indicating the third LUT fragment table T413 to which 32,768 LBAs for accessing 128 MiB of data is assigned is stored in each of the entries C414 (i.e., each entry C414 is assigned a range of 32,768 LBAs assigned to the third LUT fragment table T413), one fourth LUT fragment table T414 corresponding to the fourth hierarchical level is assigned a range of 32,768 x 32 = 1,048,576 LBAs (i.e., LBAs for accessing 4 GiB of data).
[0060] That is, in the example of LUT41 shown in Figure 2, each of the first LUT fragment tables T411 manages an LBA range for accessing 128KiB of data, each of the second LUT fragment tables T412 manages an LBA range for accessing 4MiB of data, each of the third LUT fragment tables T413 manages an LBA range for accessing 128MiB of data, and each of the fourth LUT fragment tables T414 manages an LBA range for accessing 4GiB of data.
[0061] 2, for example, a LUT pointer is stored in each of the multiple entries C414 included in the fourth LUT fragment table T414. However, when multiple third LUT fragment tables T413 indicated by each of the LUT pointers are arranged consecutively in the non-volatile memory 4, the fourth LUT fragment table T414 may be configured to store only the LUT pointer indicating the first third LUT fragment table T413 among the multiple third LUT fragment tables T413 (i.e., omit the LUT pointer indicating the third LUT fragment table T413 that is not the first). This makes it possible to reduce the size of the LUT 41. Here, the fourth LUT fragment table T414 has been described, but the same applies to other LUT fragment tables.
[0062] Furthermore, for example, when the continuity of the PBAs in the non-volatile memory 4 in which data corresponding to the range of LBAs assigned to one LUT fragment table is written is guaranteed, it is also possible to omit the LUT fragment table corresponding to a lower hierarchy than the LUT fragment table (i.e., indicated by the LUT pointer stored in the entry included in the LUT fragment table).
[0063] Specifically, for example, the second LUT fragment table T412 manages the range of LBAs for accessing 4MiB of data, but when the 4MiB of data accessed by the LBAs managed in the second LUT fragment table T412 is written in consecutive PBAs, the entry C413 included in the third LUT fragment table T413 may store the first PBA in which the 4MiB of data is written, instead of the LUT pointer indicating the second LUT fragment table T412. This makes it unnecessary to refer to the second LUT fragment table T412 and the first LUT fragment table T411, which are lower than the third LUT fragment table T413, so that the LUT 41 can be efficiently referred to, and it is possible to improve the access speed to the data written in the non-volatile memory 4.
[0064] 3 shows an example of the data structure of the LUT fragment table included in the LUT 41 in this embodiment. Here, the data structure of the first LUT fragment table T411 will be mainly described.
[0065] The first LUT fragment table T411 includes, for example, a plurality of PBA storage sections 41a, LBA storage sections 41b, and management data storage sections 41c.
[0066] The PBA storage section 41a corresponds to the entry C411 included in the first LUT fragment table T411 described in FIG. 2. That is, the number of the PBA storage sections 41a is, for example, 32. The PBA storage section 41a stores a PBA corresponding to one LBA allocated to the PBA storage section 41a (entry C411) (that is, a PBA in which data corresponding to the LBA is written). When data corresponding to one LBA allocated to the PBA storage section 41a is stored in the cache memory 551, the address information (PBA) in the cache memory 551 is stored in the PBA storage section 41a. The size of the PBA stored in the PBA storage section 41a is, for example, 32 bits.
[0067] Further, the PBA stored in the PBA storage unit 41a is assigned, for example, 8-bit management data MD1, and the management data MD1 is stored together with the PBA in the PBA storage unit 41a. The management data MD1 assigned to the PBA in this manner includes, for example, data for managing whether the PBA is a PBA in the non-volatile memory 4 or address information in the cache memory 551.
[0068] In this case, the size of each PBA storage section 41a is 40 bits obtained by adding the size of the PBA (32 bits) to the size of the management data MD1 (8 bits), and the total size of the 32 PBA storage sections 41a is 160 bytes.
[0069] The LBA storage section 41b stores the first LBA in the range of LBAs assigned to the first LUT fragment table T411.
[0070] The management data storage unit 41c stores a namespace ID for identifying the namespace to which the first LUT fragment table T411 belongs and a grain corresponding to the LBA range assigned to the first LUT fragment table T411 (the LBA range managed by the first LUT fragment table T411).
[0071] Note that other information may be stored in the management data storage unit 41c. Specifically, the management data storage unit 41c may store identification information (layer ID) for identifying the layer (first layer) corresponding to the first LUT fragment table T411.
[0072] Here, in this embodiment, for example, when the LUT 41 is updated, a part of the LUT 41 (the LUT fragment table to be updated) is stored in the cache memory 551. In this case, the part of the LUT 41 is stored in units of cache lines. Also, the part of the LUT 41 updated in the cache memory 551 is written back to the non-volatile memory 4 in units of cache lines.
[0073] Assume that the first LUT fragment table T411 is stored in the cache memory 551 in units of cache lines as described above. If the first LUT fragment table T411 stored in the cache memory 551 in this way is LUT cache data, the LUT cache data further includes, in addition to the PBA storage unit 41a, the LBA storage unit 41b, and the management data storage unit 41c described above, a pointer indicating the LUT cache data to be associated with each other in the cache memory 551, for example.
[0074] Specifically, the LUT cache data includes a previous pointer storage section 41d that stores a pointer indicating the LUT cache data that is referenced before the LUT cache data, and a next pointer storage section 41e that stores a pointer indicating other LUT cache data that is referenced next to the LUT cache data.
[0075] As the pointers stored in the previous pointer storage unit 41d and the next pointer storage unit 41e, for example, PBAs in which other LUT cache data are stored are used, but addresses in other formats may also be used.
[0076] By using pointers to the LUT cache data before and after the LUT cache data to be referenced, it is possible to speed up access to the cache memory 551 and realize continuous access. The LUT cache data may further include other management data.
[0077] Although the data structure of one first LUT fragment table T411 has been described with reference to FIG. 3, the multiple first LUT fragment tables T411 included in the LUT 41 all have the same data structure.
[0078] The data structures of the other LUT fragment tables (second LUT fragment table T412 to fourth LUT fragment table T414) other than the first LUT fragment table T411 are also similar to that of the first LUT fragment table T411. However, in each of the PBA storage units 41a included in the second LUT fragment table T412 to fourth LUT fragment table T414, a PBA (32 bits) in the non-volatile memory 4 in which the LUT fragment table is stored is stored as a LUT pointer indicating the LUT fragment table corresponding to the lower layer. When the LUT fragment table corresponding to the lower layer is stored in the cache memory 551, the PBA storage unit 41a stores address information in the cache memory 551.
[0079] Furthermore, even if the PBA storage section 41a is included in the second LUT fragment table T412 to the fourth LUT fragment table T414, it may be the case that the first PBA in which data corresponding to the range of LBAs assigned to the PBA storage section 41a (entry C412, C413 or C424) is written is stored.
[0080] In the example shown in FIG. 3, the size of each of the first LUT fragment table T411 to the fourth LUT fragment table T414 is a fixed length of, for example, 168 bytes, and the size of each of the LUT cache data stored in the cache memory 551 is a fixed length of, for example, 188 bytes. However, in this embodiment, the first LUT fragment table T411 to the fourth LUT fragment table T414 (i.e., the multiple LUT fragment tables included in the LUT41) are configured to have the same data structure.
[0081] Here, the LUT 41 has been described as having a hierarchical structure made up of a plurality of hierarchical levels, but in this embodiment, the VDM 42 also has a hierarchical structure similar to the LUT 41.
[0082] Below, the VDM 42 in this embodiment will be described, but first, a VDM in a comparative example of this embodiment will be described with reference to Fig. 4. The VDM in the comparative example of this embodiment is configured to manage the validity of data written to physical addresses in the non-volatile memory 4 in a single hierarchy.
[0083] 4, a VDM42' in the comparative example of this embodiment includes multiple VDM fragment tables T421' corresponding to a single tier. A different PBA (physical address) range is assigned to each of the multiple VDM fragment tables T421', and each of the VDM fragment tables T421' manages the validity of the data stored in the PBA range assigned to the VDM fragment table T421' (i.e., whether the data is valid or invalid).
[0084] In this case, for example, the entire range of PBAs in the non-volatile memory 4 to which data can be written based on a write command from the host 2 is divided into the number of VDM fragment tables T421', and the divided PBA ranges are assigned to each of the first VDM fragment tables T421'. This makes it possible to manage the validity of data written in the entire range of PBAs in the non-volatile memory 4 to which data can be written based on a write command from the host 2 in multiple VDM fragment tables T421'. Note that in each of the multiple VDM fragment tables T421', the validity of data written in the range of the PBA assigned to the VDM fragment table T421' is managed using a bitmap (BMP) described later.
[0085] Here, for example, when data is written to a PBA in the non-volatile memory 4 based on a write command from the host 2, it is necessary to refer to the VDM fragment table T421' to which the PBA is assigned in order to update the validity of the data written to the PBA, but in order to refer to the VDM fragment table T421', it is necessary to hold (expand) a pointer indicating each (position) of the above-mentioned multiple VDM fragment tables T421' in the memory 55. The pointer thus held in the memory 55 includes, for example, the PBA in the non-volatile memory 4 in which each of the multiple VDM fragment tables T421' is stored.
[0086] For example, if the size of the memory area of non-volatile memory 4 where the validity of data is managed is 2PiB and the size of data written to one PBA (i.e., the unit of data for which validity is managed) is 4KiB, then 2PiB÷4KiB=549,755,813,888, and VDM42' needs to manage the validity of approximately 512G of 4KiB of data.
[0087] Furthermore, if one VDM fragment table T421' manages, for example, 1,280 pieces of 4 KiB data, then 512G÷1,280=429,496,729.6, and the number of VDM fragment tables T421' required in the VDM 42' is 429,496,730.
[0088] Furthermore, if the size of the pointer indicating each of the multiple VDM fragment tables T421' is 32 bits (4 bytes), the total size of the pointers indicating all of the above-mentioned 429,496,730 VDM fragment tables T421' is 429,496,730 x 4 Bytes = 1,717,986,920 Bytes, which is approximately 1.6 GiB.
[0089] That is, when managing the validity of data written in the PBA in the non-volatile memory 4 using the VDM42' according to the comparative example of this embodiment, it is necessary to constantly hold a pointer indicating the above-mentioned 1.6 GiB total VDM fragment table T421' in the memory 55 (that is, the information required for managing the VDM42' continues to occupy the memory 55), which may impair usability. Specifically, it is useful to hold the LUT41 in the memory 55 (cache memory 551) in order to improve the response speed (IO response speed) to commands from the host 2, but there is a possibility that it is not possible to secure a sufficient storage area for holding the LUT41 by each pointer of the above-mentioned VDM fragment table T421'.
[0090] In addition, the non-volatile memory 4 is composed of multiple chips, and if, for example, the number of chips or the capacity of the chips themselves is increased, the number of PBAs in the non-volatile memory 4 (i.e., the memory area managed by the memory system 3) increases.
[0091] According to this, the number of VDM fragment tables T421' described above also increases, and therefore the number of pointers pointing to the VDM fragment tables T421' also increases, so that a larger storage area needs to be reserved in the memory 55 for the pointers.
[0092] Similarly, if the number of PBAs in non-volatile memory 4 increases, the size of VDM 42' itself will also increase, and it may be necessary to expand the storage area for caching VDM 42', if necessary.
[0093] One possible solution to this problem is to secure storage space by, for example, adding memory (DRAM), but it is necessary to avoid an increase in cost. In other words, in the VDM 42' in the comparative example of this embodiment, it is difficult to respond to technological innovations in the non-volatile memory 4 (i.e., an increase in storage capacity).
[0094] Furthermore, when the memory system 3 is started, it is necessary to develop the pointers indicating all the VDM fragment tables T421' in the memory 55 as described above.
[0095] In addition, when the memory system 3 is terminated (stopped), all the pointers held in the memory 55 must be made non-volatile. Specifically, for example, when one VDM fragment table T421' is cached in the memory 55 (cache memory 551), the pointer indicating the VDM fragment table T421' held in the memory 55 is changed to the address information in the cache memory 551. When the memory system 3 is terminated, such a VDM fragment table T421' is written back to the non-volatile memory 4 (i.e., made non-volatile). In this case, the pointer indicating the VDM fragment table T421' (address information in the cache memory 551) must be changed to the PBA in the non-volatile memory 4 to which the VDM fragment table T421' is written, and the changed PBA in the non-volatile memory 4 (i.e., the pointer) must be written to the non-volatile memory 4. When the memory system 3 is terminated, such processing is executed for all the VDM fragment tables T421' cached in the cache memory 551.
[0096] That is, in the VDM 42' in the comparative example of this embodiment, the internal processes (start-up process and shutdown process) when starting up and shutting down the memory system 3 take time.
[0097] Therefore, in this embodiment, similar to the above-described LUT 41, a VDM 42 having a hierarchical structure is adopted, thereby realizing efficient management of the validity of the data written in the non-volatile memory 4.
[0098] Specifically, the VDM 42 in this embodiment has a hierarchical structure made up of a plurality of hierarchical layers, and is configured to include a plurality of VDM fragment tables for the plurality of hierarchical layers.
[0099] In such a VDM42, each of the multiple VDM fragment tables is assumed to be, for example, the same size. In addition, although details will be described later, in the VDM fragment table corresponding to a higher tier among the multiple VDM fragment tables corresponding to multiple tiers, a PBA (range) and reference destination information (hereinafter, referred to as a VDM pointer) for referencing a VDM fragment table corresponding to a tier lower than the VDM fragment table are stored. Note that the VDM pointer includes, for example, a PBA in the non-volatile memory 4 in which the VDM fragment table to be referenced is stored. In addition, the VDM fragment table corresponding to the lowest tier in the hierarchical structure of VDM42 manages the validity of each data of a predetermined size (for example, 4KiB data) stored in the range of the PBA allocated to the VDM fragment table.
[0100] Hereinafter, a VDM42 having a hierarchical structure in this embodiment will be conceptually described with reference to Fig. 5. In the example shown in Fig. 5, for convenience, it is assumed that the VDM42 has a hierarchical structure consisting of four hierarchical levels. In this case, the VDM42 includes a plurality of VDM fragment tables T421 to T424.
[0101] As shown in FIG. 5, the first VDM fragment table T421 is a VDM fragment table corresponding to the lowest hierarchical level (hereinafter referred to as the first hierarchical level) in the hierarchical structure of VDM42. The second VDM fragment table T422 is a VDM fragment table corresponding to the hierarchical level (hereinafter referred to as the second hierarchical level) above the first VDM fragment table T421 in the hierarchical structure of VDM42. The third VDM fragment table T423 is a VDM fragment table corresponding to the hierarchical level (hereinafter referred to as the third hierarchical level) above the second VDM fragment table T422 in the hierarchical structure of VDM42. The fourth VDM fragment table T424 is a VDM fragment table corresponding to the hierarchical level (hereinafter referred to as the fourth hierarchical level) above the third VDM fragment table T423 in the hierarchical structure of VDM42. 5, the fourth hierarchical layer is the highest hierarchical layer in the hierarchical structure of VDM42, and in VDM42, the number of VDM fragment tables corresponding to the highest hierarchical layer (i.e., the fourth VDM fragment table T424) is, for example, 1. In this embodiment, the number of fourth VDM fragment tables T424 (VDM fragment tables corresponding to the highest hierarchical layer) is described as 1, but the number of the fourth VDM fragment tables T424 may be multiple.
[0102] Each of the first VDM fragment table T421 to the fourth VDM fragment table T424 will now be described in detail.
[0103] First, a range of consecutive PBAs is assigned to each of the multiple first VDM fragment tables T421, and the first VDM fragment table T421 includes multiple entries C421. Also, each of the multiple entries C421 included in the first VDM fragment table T421 stores a bitmap (BMP) consisting of 1-bit bit information that manages the validity of data stored in each of the multiple PBAs corresponding to the range of PBAs assigned to the first VDM fragment table T421. In such a bitmap, for example, when the bit information is 1 for each PBA, it can indicate that the data stored in the PBA is valid, and when the bit information is 0, it can indicate that the data stored in the PBA is invalid.
[0104] 4, the entire range of PBAs in the non-volatile memory 4 to which data can be written based on a write command from the host 2 is divided into the number of VDM fragment tables T421, and the divided PBA ranges are assigned to each of the first VDM fragment tables T421. This makes it possible to manage the validity of data written in the entire range of PBAs in the non-volatile memory 4 to which data can be written based on a write command from the host 2 in the multiple VDM fragment tables T421.
[0105] Next, each of the multiple second VDM fragment tables T422 is assigned a wider PBA range than the above-mentioned first VDM fragment table T421, and the second VDM fragment table T422 includes multiple entries C422. Also, each of the multiple entries C422 included in the second VDM fragment table T422 is assigned a PBA range assigned to the first VDM fragment table T421 corresponding to the lower layer of the second VDM fragment table T422, and a VDM pointer indicating the first VDM fragment table T421 (the position) is stored. In this case, the PBA range assigned to each of the second VDM fragment tables T422 corresponds to the PBA range assigned to all first VDM fragment tables T421 indicated by the VDM pointer stored in each of the multiple entries C422 included in the second VDM fragment table T422.
[0106] Moreover, each of the multiple third VDM fragment tables T423 is assigned a wider PBA range than the above-mentioned second VDM fragment table T422, and the third VDM fragment table T423 includes multiple entries C423. Moreover, each of the multiple entries C423 included in the third VDM fragment table T423 is assigned a PBA range assigned to the second VDM fragment table T422 corresponding to the lower layer of the third VDM fragment table T423, and a VDM pointer indicating the second VDM fragment table T422 (the position) is stored. In this case, the PBA range assigned to each of the third VDM fragment tables T423 corresponds to the PBA range assigned to all second VDM fragment tables T422 indicated by the VDM pointer stored in each of the multiple entries C423 included in the third VDM fragment table T423.
[0107] Furthermore, the fourth VDM fragment table T424 is assigned a wider PBA range than the third VDM fragment table T423, and the fourth VDM fragment table T424 includes a plurality of entries C424. Each of the plurality of entries C424 included in the fourth VDM fragment table T424 is assigned a PBA range assigned to the third VDM fragment table T423 for a lower layer of the fourth VDM fragment table T424, and a VDM pointer indicating the third VDM fragment table T423 (the position of the third VDM fragment table T423) is stored. In this case, the LBA range assigned to the fourth VDM fragment table T424 corresponds to the PBA range assigned to all the third VDM fragment tables T423 indicated by the VDM pointer stored in each of the plurality of entries C424 included in the fourth VDM fragment table T424.
[0108] Furthermore, as described above, when the number of fourth VDM fragment tables T424 corresponding to the highest hierarchical level in the hierarchical structure of VDM42 is 1, the range of PBAs assigned to the fourth VDM fragment table T424 covers the entire range of PBAs in non-volatile memory 4 where data validity is managed.
[0109] In the VDM42 having the hierarchical structure shown in Figure 5 described above, the VDM pointer stored in each of the entries C424 included in the fourth VDM fragment table T424 corresponding to the fourth hierarchy (the highest hierarchy) points to the third VDM fragment table T423 corresponding to the third hierarchy, the VDM pointer stored in each of the entries C423 included in the third VDM fragment table T423 points to the second VDM fragment table T422 corresponding to the second hierarchy, the VDM pointer stored in each of the entries C422 included in the second VDM fragment table T422 points to the first VDM fragment table T421 corresponding to the first hierarchy (the lowest hierarchy), and each of the entries C421 included in the first VDM fragment table T421 is configured to store flag information (bitmap) indicating the validity of each of the data of a predetermined size stored in multiple PBAs.
[0110] With such a VDM42, the validity of the data to be confirmed can be grasped, for example, by sequentially referring to the fourth VDM fragment table T424, the third VDM fragment table T423, the second VDM fragment table T422, and the first VDM fragment table T421 based on the PBA in which the data to be confirmed for validity is stored.
[0111] That is, in the VDM42 shown in Figure 5, the validity of the data stored in all PBAs (i.e., the validity of the data managed in the first VDM fragment table) can be grasped from the fourth VDM fragment table T424 corresponding to the fourth hierarchical level, so unlike the VDM42' in the comparative example of this embodiment described in Figure 4 above, it is sufficient for memory 55 to hold only a VDM pointer (i.e., one pointer) indicating the fourth VDM fragment table T424.
[0112] Here, in the example shown in Fig. 5, the first VDM fragment table T421 is a VDM fragment table corresponding to the lowest hierarchical layer in the hierarchical structure of the VDM42, and each entry C421 included in the first VDM fragment table T421 stores flag information (bitmap) indicating the validity of each data of a predetermined size stored in a range of consecutive PBAs. In this case, if one first VDM fragment table T421 includes 32 entries C421 and furthermore, if one entry C421 stores a 32-bit bitmap indicating the validity of the 32 pieces of data, then one first VDM fragment table T421 corresponding to the first hierarchical layer is assigned a range of 32 x 32 = 1,024 PBAs. In this case, if the size of data written to one PBA is 4 KiB as described above, one first VDM fragment table T421 can manage the validity of 4 KiB x 1,024 = 4 MiB of data.
[0113] Similarly, if one second VDM fragment table T422 includes 32 entries C422, and a VDM pointer indicating the first VDM fragment table T421 to which 1,024 PBAs in which 4MiB of data are stored is stored in each of the entries C422 (that is, each entry C422 is assigned a range of 1,024 PBAs assigned to the first VDM fragment table T421), then one second VDM fragment table T422 corresponding to the second tier is assigned a range of 1,024×32=32,768 PBAs. In this case, one second VDM fragment table T422 can manage the validity of 4KiB×32,768=128MiB of data.
[0114] Furthermore, assuming that one third VDM fragment table T423 includes 32 entries C423, and a pointer indicating the second VDM fragment table T422 to which 32,768 PBAs in which 128 MiB of data are assigned is stored in each of the entries C423 (i.e., each entry C423 is assigned a range of 32,768 PBAs assigned to the second VDM fragment table T422), one third VDM fragment table T423 corresponding to the third tier is assigned a range of 32,768 x 32 = 1,048,576 PBAs. In this case, one third VDM fragment table T423 can manage the validity of 4 KiB x 1,048,576 = 4 GiB of data.
[0115] Also, assuming that one fourth VDM fragment table T424 includes 32 entries C414, and a pointer indicating the third VDM fragment table T423 to which 1,048,576 PBAs in which 4 GiB of data are assigned is stored in each of the entries C424 (i.e., each entry C424 is assigned a range of 1,048,576 PBAs assigned to the third VDM fragment table T423), one fourth VDM fragment table T424 corresponding to the fourth tier is assigned a range of 1,048,576 x 32 = 33,554,432 PBAs. In this case, one fourth VDM fragment table T424 can manage the validity of 4 KiB x 33,554,432 = 128 GiB of data.
[0116] That is, in the example of VDM42 shown in Figure 5, each of the first VDM fragment tables T421 manages a range of PBAs in which 4 MiB of data is stored, each of the second VDM fragment tables T422 manages a range of PBAs in which 128 MiB of data is stored, each of the third VDM fragment tables T423 manages a range of PBAs in which 4 GiB of data is stored, and each of the fourth VDM fragment tables T424 manages a range of PBAs in which 128 GiB of data is stored.
[0117] 5, for example, a VDM pointer is stored in each of the multiple entries C424 included in the fourth VDM fragment table T424. However, when multiple third VDM fragment tables T423 indicated by each of the VDM pointers are arranged consecutively in the non-volatile memory 4, the fourth VDM fragment table T424 may be configured to store only the VDM pointer indicating the first third VDM fragment table T423 among the multiple third VDM fragment tables T423 (i.e., omit the VDM pointer indicating the third VDM fragment table T423 that is not the first). This makes it possible to reduce the size of the VDM 42. Here, the fourth VDM fragment table T424 has been described, but the same applies to other VDM fragment tables.
[0118] Furthermore, for example, if the validity (valid or invalid) of each of 4KiB of data written in the range of the PBA assigned to one VDM fragment table is the same, it is possible to collectively manage the validity of the data written in the range of the PBA in the VDM fragment table, and omit the VDM fragment table corresponding to a lower hierarchy than the VDM fragment table (i.e., indicated by a pointer stored in an entry included in the VDM fragment table).
[0119] Specifically, for example, the second VDM fragment table T422 manages the range of the PBA in which 128 MiB of data is stored, but assume that the 128 MiB of data (all 4 KiB of data constituting the 128 MiB of data) is either all valid or all invalid. In this case, the third VDM fragment table T423 corresponding to a higher hierarchical level than the second VDM fragment table T422 (i.e., including an entry that stores a VDM pointer indicating the second VDM fragment table T422) may hold management data indicating that the 128 MiB of data stored in the range of the PBA allocated to the second VDM fragment table T422 is all valid or all invalid, thereby discarding the second VDM fragment table T422 and the first VDM fragment table T421 corresponding to a lower hierarchical level than the second VDM fragment table T422. This makes it unnecessary to refer to the second VDM fragment table T422 and the first VDM fragment table T421, which are lower than the third VDM fragment table T423, and therefore makes it possible to improve the access speed to the VDM42.
[0120] FIG. 6 shows an example of the data structure of the first VDM fragment table T421 included in the VDM 42 in this embodiment.
[0121] The first VDM fragment table T421 includes, for example, a plurality of map storage sections 42a, a PBA storage section 42b, and a management data storage section 42c.
[0122] The map storage unit 42a corresponds to the entry C421 included in the first VDM fragment table T421 described in FIG. 5. That is, the number of the map storage units 42a is, for example, 32. The map storage unit 42a stores a bitmap consisting of 1-bit flag information that manages the validity (valid or invalid) of each of the 4 KiB data written in the range of the PBA allocated to the map storage unit 42a (entry C421). When a range of 32 PBAs is allocated to the map storage unit 42a, the size of the bitmap stored in the map storage unit 42a is 1 bit×32=32 bits.
[0123] Moreover, for example, 8-bit management data MD2 is added to the bitmap stored in the map storage unit 42a, and the management data MD2 is stored in the map storage unit 42a together with the bitmap. For example, a magic number called a VDM mode is set as the management data MD2 added to the bitmap. Magic numbers set as the management data MD2 include "0xff" and "0x00".
[0124] As described above, the bitmap stored in the map storage unit 42a is composed of 1-bit flag information indicating the validity of the 4KiB of data stored in each of the 32 PBAs assigned to the map storage unit 42a. In the following description, for convenience, the 4KiB of data stored in each of the 32 PBAs will be referred to as the data managed in the bitmap.
[0125] The magic number "0xff" indicates that all data managed in the bitmap to which the magic number (management data MD2) is assigned is valid (that is, all flag information constituting the bitmap is 1). In other words, this magic number "0xff" allows the validity of data written in a certain PBA range to be managed collectively, and it is possible to know that all data managed in the bitmap is valid without referring to the bitmap to which the magic number is assigned.
[0126] The magic number "0x00" indicates that all data managed in the bitmap to which the magic number (management data MD2) is assigned is invalid (i.e., all flag information constituting the bitmap is 0). That is, with this magic number "0x00", like the above-mentioned magic number "0xff", it is possible to collectively manage the validity of data written in a certain PBA range, and it is possible to know that all data managed in the bitmap is invalid without referring to the bitmap to which the magic number is assigned.
[0127] In addition, if the magic numbers "0xff" and "0x00" are not set as the management data MD2, it means that the bitmap to which the management data MD2 is attached is composed of flag information indicating valid and flag information indicating invalid (in other words, flag information indicating valid and flag information indicating invalid are mixed in the bitmap).
[0128] As described above, when a bitmap and management data MD2 are stored in the map storage unit 42a, the size of each map storage unit 42a is 40 bits, which is the sum of the size of the bitmap (32 bits) and the size of the management data MD2 (8 bits), and the total size of the 32 map storage units 42a is 160 bytes.
[0129] The PBA storage section 42b stores the first PBA in the range of PBAs assigned to the first VDM fragment table T421.
[0130] The management data storage unit 42c stores a Valid ADU Count indicating the number of valid data among the multiple 4 KiB data stored in the range of the PBA allocated to the first VDM fragment table T421, and a Grain corresponding to the range of the PBA allocated to the first VDM fragment table T421 (the range of the PBA managed by the first VDM fragment table T421). In the case of the first VDM fragment table T421, the maximum value of the Valid ADU Count is 1,024.
[0131] Note that other information may be stored in the management data storage unit 42c. Specifically, the management data storage unit 42c may store identification information (layer ID) for identifying the layer (first layer) corresponding to the first VDM fragment table T421.
[0132] Here, in this embodiment, for example, when the VDM 42 is updated, a portion of the VDM 42 (the VDM fragment table that is the subject of the update) is stored in the cache memory 551. In this case, the portion of the VDM 42 is stored in units of cache lines. Also, the portion of the VDM 42 updated in the cache memory 551 is written back to the non-volatile memory 4 in units of cache lines.
[0133] Assume that the first VDM fragment table T421 is stored in the cache memory 551 in the above-described cache line units. If the first VDM fragment table T421 stored in the cache memory 551 in this manner is VDM cache data, the VDM cache data further includes, in addition to the above-described map storage unit 42a, PBA storage unit 42b, and management data storage unit 42c, pointers indicating the VDM cache data that should be associated with each other in the cache memory 551, for example.
[0134] Specifically, the VDM cache data includes a previous pointer storage unit 42d that stores a pointer indicating VDM cache data that is referenced before the VDM cache data, and a next pointer storage unit 42e that stores a pointer indicating other VDM cache data that is referenced next to the VDM cache data. Note that the previous pointer storage unit 42d and the next pointer storage unit 42e may store pointers indicating the above-mentioned LUT cache data.
[0135] As the pointers stored in the previous pointer storage unit 42d and the next pointer storage unit 42e, for example, PBAs in which other VDM cache data are stored are used, but addresses in other formats may also be used.
[0136] By using pointers to the VDM cache data before and after the VDM cache data to be referenced, it is possible to speed up access to the cache memory 551 and realize continuous access. The VDM cache data may further include other management data.
[0137] Although the data structure of one first VDM fragment table T421 has been described with reference to FIG. 6, the multiple first VDM fragment tables T421 included in the VDM 42 all have the same data structure.
[0138] Next, Fig. 7 shows an example of the data structure of the second VDM fragment table T422 included in the VDM 42 in this embodiment. Note that the following mainly describes the differences from the first VDM fragment table T421 shown in Fig. 6 above.
[0139] In FIG. 6, the first VDM fragment table T421 has been described as including the map storage section 42a, but the second VDM fragment table T422 includes a PBA storage section 42f instead of the map storage section 42a.
[0140] The PBA storage section 42f corresponds to the entry C422 included in the second VDM fragment table T422 described in FIG. 5. That is, the number of the PBA storage sections 42f is, for example, 32. The PBA storage section 42f stores the PBA in the non-volatile memory 4 in which the first VDM fragment table T421 is stored as a pointer indicating the first VDM fragment table T421 corresponding to the lower layer of the second VDM fragment table T422. When the first VDM fragment table T421 corresponding to the lower layer is stored in the cache memory 551, the PBA storage section 42f stores address information in the cache memory 551. The size of the PBA stored in the PBA storage section 42f is, for example, 32 bits.
[0141] In addition, the PBA stored in the PBA storage section 42f is assigned, for example, 8-bit management data MD3, and the management data MD3 is stored in the PBA storage section 42f together with the bitmap. As the management data MD3 assigned to the bitmap in this manner, a magic number called a VDM mode is set, similar to the management data MD2 described in FIG. 6 above.
[0142] In the above description, the magic numbers "0xff" and "0x00" are set as the management data MD2, but the magic numbers set as the management data MD3 further include "0xfc" and "0xfd" in addition to "0xff" and "0x00".
[0143] The magic number "0xfc" indicates that the PBA to which the magic number (management data MD3) is assigned is a PBA in the non-volatile memory 4. This magic number "0xfc" makes it possible to refer to (obtain) the first VDM fragment table T421 stored in the non-volatile memory 4 based on the PBA to which the magic number is assigned.
[0144] The magic number "0xfd" indicates that the PBA to which the magic number (management data MD3) is assigned is address information within the cache memory 551. According to this magic number "0xfd", it is possible to refer to (obtain) the first VDM fragment table T421 stored in the cache memory 551 based on the PBA to which the magic number is assigned.
[0145] As described above, the first VDM fragment table T421 referenced based on the PBA stored in the PBA storage unit 42f is a VDM fragment table corresponding to the first hierarchical level to which the range of PBAs assigned to the PBA storage unit 42f (entry C422) is assigned.
[0146] Furthermore, the above-mentioned magic number "0xff" or "0x00" may be set as the management data MD3. When the magic number "0xff" is set as the management data MD3, it means that all of the 4KiB data stored in the range of the PBA (e.g., 1,024 PBAs) assigned to the PBA storage unit 42f storing the PBA to which the magic number is assigned is valid. On the other hand, when the magic number "0x00" is set as the management data MD3, it means that all of the 4KiB data stored in the range of the PBA (e.g., 1,024 PBAs) assigned to the PBA storage unit 42f storing the PBA to which the magic number is assigned is invalid.
[0147] That is, when one of the magic numbers "0xff" and "0x00" is set as the management data MD3, it is possible to know that all data stored in the range of the PBA assigned to the PBA storage unit 42f (entry C422) that stores the PBA to which that magic number is assigned is valid or invalid. In this case, it is not necessary to refer to the first VDM fragment table T421 corresponding to the lower hierarchical level based on the PBA to which the magic number "0xff" or "0x00" is assigned.
[0148] On the other hand, if the magic numbers "0xff" and "0x00" are not set as the management data MD3 (i.e., the magic numbers "0xfc" or "0xfd" are set), it can be understood that valid data and invalid data are mixed within the range of the PBAs assigned to the PBA storage unit 42f (entry C422) that stores the PBA to which the magic number is assigned. In this case, it is necessary to refer to the first VDM fragment table T421 corresponding to the lower hierarchical level based on the PBA to which the magic number "0xfc" or "0xfd" is assigned.
[0149] As described above, when a PBA and management data MD3 are stored in the PBA storage section 42f, the size of each PBA storage section 42f is 40 bits obtained by adding the size of the PBA (32 bits) to the size of the management data MD3 (8 bits), and the total size of the 32 PBA storage sections 42f is 160 bytes.
[0150] In addition, the second VDM fragment table T422 further includes a PBA storage section 42b and a management data storage section 42c in addition to the PBA storage section 42f. However, since the PBA storage section 42b and the management data storage section 42c are as described in FIG. 6, detailed description thereof will be omitted here.
[0151] In addition, the second VDM fragment table T422 (VDM cache data) stored in the cache memory 551 includes a previous pointer storage section 42d and a next pointer storage section 42e, but since the previous pointer storage section 42d and the next pointer storage section 42e are also as described in Figure 6, detailed explanations thereof will be omitted here.
[0152] Although the data structure of one second VDM fragment table T422 has been described with reference to FIG. 7, the multiple second VDM fragment tables T422 included in the VDM42 all have the same data structure.
[0153] The data structures of the other VDM fragment tables (third VDM fragment table T423 and fourth VDM fragment table T424) other than the second VDM fragment table T422 are also the same as that of the second VDM fragment table T422. That is, for example, in the third VDM fragment table T423, when one of the magic numbers "0xff" and "0x00" is set as the management data MD3, there is no need to refer to the second VDM fragment table T422 corresponding to the lower layer based on the PBA to which the magic number is assigned. The same is true for the fourth VDM fragment table T424.
[0154] In the examples shown in Figures 6 and 7 above, the size of each of the first VDM fragment table T421 to the fourth VDM fragment table T424 is a fixed length of, for example, 168 bytes, and the size of each of the VDM cache data stored in the cache memory 551 is a fixed length of, for example, 188 bytes; however, in this embodiment, the first VDM fragment table T421 to the fourth VDM fragment table T424 (i.e., the multiple VDM fragment tables included in VDM42) are configured to have the same data structure.
[0155] 3, 6, and 7, the LUT 41 (each LUT fragment table included therein) and the VDM 42 (each VDM fragment table included therein) in this embodiment are configured to have the same data structure. The relationship between the LUT 41 and the VDM 42 will be described below.
[0156] First, as described above, the LUT41 is data for managing PBAs corresponding to LBAs, and if one first LUT fragment table T411 corresponding to the lowest hierarchical level (first hierarchical level) includes 32 entries C411 (PBA storage unit 41a), then 32 LBAs (corresponding PBAs) can be managed in the first LUT fragment table T411. If one second LUT fragment table T412 corresponding to the next higher hierarchical level (second hierarchical level) from the lowest hierarchical level similarly includes 32 entries C412, then 32×32=1,024 LBAs (corresponding PBAs) can be managed in the second LUT fragment table T412. Here, the second hierarchical level has been described, but the same is true for hierarchical levels higher than the second hierarchical level.
[0157] On the other hand, as described above, the VDM42 is data for managing the validity of data stored in each PBA. If a 32-bit bitmap is stored in one entry C421 (map storage unit 42a) of one first VDM fragment table T421 corresponding to the lowest hierarchical level (first hierarchical level), the first VDM fragment table T421 can manage 32 bits x 32 = 1,024 PBAs (data stored therein). If a second VDM fragment table T422 corresponding to the next higher hierarchical level (second hierarchical level) from the lowest hierarchical level similarly includes 32 entries C422, the second VDM fragment table T422 can manage 1,024 x 32 = 32,768 PBAs (data stored therein). Here, the second hierarchical level has been described, but the same applies to hierarchical levels higher than the second hierarchical level.
[0158] That is, in this embodiment, LUT41 and VDM42 each manage one fragment table corresponding to a lower hierarchical level with one entry, and in both LUT41 and VDM42, the number of PBAs can be 32 times higher each time the hierarchical level goes up.
[0159] Here, it is assumed that 4 MiB of data corresponding to a range of 1,024 consecutive LBAs has been written (sequentially written) to 1,024 consecutive PBAs in the non-volatile memory 4. It is assumed that 4 KiB of data has been written to each of the 1,024 PBAs.
[0160] In this case, it is necessary to manage in LUT41 the correspondence between the LBA corresponding to the 4 MiB of data written to the non-volatile memory 4 and the PBA to which the data is written, but as described above, the second LUT fragment table T412 can manage 1,024 LBAs (corresponding PBAs).
[0161] Therefore, when the 1,024 LBAs managed by the second LUT fragment table T412 (i.e., assigned to the second LUT fragment table T412) match the 1,024 LBAs corresponding to the above-mentioned 4MiB data, among the LUT pointers stored in the multiple entries C413 included in the third LUT fragment table T413 corresponding to the upper layer of the second LUT fragment table T412, the LUT pointer indicating the second LUT fragment table T412 can be updated to the first PBA of the 1,024 PBAs in which the 4MiB data is written. This makes it possible to manage the correspondence between the LBAs corresponding to the above-mentioned 4MiB data and the PBAs in which the data is written in one entry C413 included in the third LUT fragment table T413.
[0162] On the other hand, as described above, if 4 MiB of data is written to 1,024 consecutive PBAs in non-volatile memory 4, the 4 MiB of data needs to be managed as valid data in VDM42, but as described above, the first VDM fragment table T421 is capable of managing 1,024 PBAs.
[0163] Therefore, when the 1,024 PBAs managed by the first VDM fragment table T421 (i.e., assigned to the first VDM fragment table T421) match the 1,024 PBAs in which the above-mentioned 4MiB of data is written, the management data MD3 (magic number) attached to the VDM pointer indicating the first VDM fragment table T421 among the VDM pointers stored in the multiple entries C422 included in the second VDM fragment table T422 corresponding to the higher hierarchical level of the first VDM fragment table T421 can be updated to "0xff." This makes it possible to manage that the above-mentioned 4MiB of data stored in the 1,024 PBAs is valid with one entry C422 included in the second VDM fragment table T422.
[0164] That is, when 4MiB of data corresponding to a range of 1,024 consecutive LBAs is written to 1,024 consecutive PBAs as described above, the correspondence between the LBAs and the PBAs can be managed by changing one entry (PBA) included in the LUT fragment table corresponding to the layer two levels above the lowest layer included in the LUT 41. Also, the validity of the 4MiB of data written in this way to the non-volatile memory 4 can be managed by changing one entry (magic number) included in the VDM fragment table corresponding to the layer one level above the lowest layer included in the VDM 42.
[0165] In this embodiment, by making each fragment table contained in LUT41 and VDM42 have a similar data structure and aligning the management units in LUT41 and VDM42, it is possible to complete the update of LUT41 and VDM42 simply by changing the entries contained in the fragment table of a higher hierarchy, without updating the fragment table corresponding to the lowest hierarchy.
[0166] In order to complete the update of the LUT 41 and the VDM 42 by changing the entries included in the fragment table corresponding to the higher layer as described above, a VDM fragment table included in the VDM 42 having a data structure similar to that of the LUT fragment table included in the LUT 41 is required. M=y×N^x (hereafter referred to as the conditional expression) must be met.
[0167] In the above conditional formula, N is the number of entries included in the first VDM fragment table T421 corresponding to the lowest tier, and M is the number of 4KiB of data (i.e., the number of PBAs in which the data is stored) whose validity is managed in one entry included in the first VDM fragment table T421 corresponding to the lowest tier. In addition, in the conditional formula, x is an integer greater than or equal to 0, and y is an integer greater than or equal to 1 and less than N, or the reciprocal of an integer greater than or equal to 1 and less than N.
[0168] The relationship between N and M will be specifically described below. Here, the number of LBAs (corresponding PBAs) assigned to each LUT fragment table will be referred to as the PBA management number of the LUT fragment table, and the number of PBAs assigned to each VDM fragment table will be referred to as the PBA management number of the VDM fragment table.
[0169] Note that the number of LBAs (corresponding PBAs) assigned to one entry included in the LUT fragment table (first LUT fragment table T411) corresponding to the first layer (lowest layer) is 1, and this is also assumed in the following explanation.
[0170] FIG. 8 shows the relationship between the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table corresponding to each layer when N=32 and M=32.
[0171] Here, when N=32 and M=32, the PBA management number of the LUT fragment table corresponding to the first hierarchical layer is 32, and the PBA management number of the VDM fragment table corresponding to the first hierarchical layer (first VDM fragment table T421) is 1,024. Also, the PBA management number of the LUT fragment table corresponding to the second hierarchical layer (second LUT fragment table T412) is 1,024, and the PBA management number of the VDM fragment table corresponding to the second hierarchical layer (second VDM fragment table T422) is 32,768.
[0172] A detailed explanation of the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table corresponding to hierarchical levels higher than the second hierarchical level will be omitted, but when N=32, the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table both become 32 times higher when the hierarchical level is raised by one.
[0173] As described above, when comparing the LUT fragment table and the VDM fragment table corresponding to the same layer, the number of PBAs managed by the VDM fragment table is greater than the number of PBAs managed by the LUT fragment table. Also, when the number of PBAs managed by the entire LUT41 is the same as the number of PBAs managed by the entire VDM42, the number of layers constituting the hierarchical structure of the VDM42 in this embodiment is less than the number of layers constituting the hierarchical structure of the LUT41.
[0174] In addition, when N=32 and M=32, the above conditional formula is satisfied when x=1 and y=1. When the conditional formula is satisfied in this way, x corresponds to the difference in hierarchy between the LUT fragment table and the VDM fragment table, and y corresponds to the ratio of the PBA management number of the LUT fragment table to the PBA management number of the VDM fragment table (i.e., "PBA management number of the VDM fragment table / PBA management number of the LUT fragment table"). Specifically, when focusing on the LUT fragment table corresponding to the second hierarchy and the VDM fragment table corresponding to the first hierarchy, where the hierarchy difference is 1 (i.e., x=1), the PBA management number of the LUT fragment table is 1,024, the PBA management number of the VDM fragment table is 1,024, and "PBA management number of the VDM fragment table / PBA management number of the LUT fragment table" is 1 (i.e., y=1).
[0175] In this way, if N and M satisfy the above-mentioned conditional formula, for example, when data corresponding to a range of 1,024 LBAs allocated to the LUT fragment table corresponding to the second hierarchical level is written to the non-volatile memory 4, the update of the LUT 41 can be completed by changing one entry (PBA stored in the PBA storage unit 41a) included in the LUT fragment table corresponding to the third hierarchical level. Similarly, when data corresponding to a range of 1,024 LBAs is written to 1,024 PBAs allocated to the VDM fragment table corresponding to the first hierarchical level, the update of the VDM 42 can be completed by changing one entry (magic number stored in the map storage unit 42a) included in the VDM fragment table corresponding to the second hierarchical level.
[0176] In other words, when N=32 and M=32, the ratio of the number of PBAs managed in the LUT fragment table corresponding to the i (i is an integer greater than or equal to 1) hierarchical level to the number of PBAs managed in the VDM fragment table corresponding to the i-1 hierarchical level is 1:1, and, for example, when continuity of the LBAs and PBAs is ensured, a change to one entry in the LUT fragment table can accommodate an update to LUT41, and a change to one entry in VDM42 can accommodate an update to VDM42.
[0177] Note that N=32 and M=32 described in FIG. 8 is one example in which LUT41 (the correspondence between LBA and PBA) and VDM42 (validity of data) can be managed most efficiently. However, even if N is changed, efficient management of LUT41 and VDM42 can be realized as long as the above-mentioned conditional expressions are satisfied.
[0178] Below, a case where N is changed will be described, but detailed description of the same parts as those described in FIG. 8 will be omitted.
[0179] FIG. 9 shows the relationship between the PBA management number of the LUT fragment table and the management number of the VDM fragment table corresponding to each layer when N=8 and M=32.
[0180] Here, when N=8 and M=32, the PBA management number of the LUT fragment table corresponding to the first hierarchical layer is 8, and the PBA management number of the VDM fragment table corresponding to the first hierarchical layer is 256. Also, the PBA management number of the LUT fragment table corresponding to the second hierarchical layer is 64, and the PBA management number of the VDM fragment table corresponding to the second hierarchical layer is 2,048.
[0181] A detailed explanation of the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table corresponding to hierarchical levels higher than the second hierarchical level will be omitted, but when N=8, the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table both become eight times higher when the hierarchical level is raised by one.
[0182] Furthermore, when N=8 and M=32, the above conditional formula is satisfied when x=1 and y=4. Specifically, when focusing on the LUT fragment table corresponding to the second hierarchical level and the VDM fragment table corresponding to the first hierarchical level, where the hierarchical difference is 1 (i.e., x=1), the PBA management number of the LUT fragment table is 64, the PBA management number of the VDM fragment table is 256, and the "PBA management number of the VDM fragment table / PBA management number of the LUT fragment table" is 4 (i.e., y=4).
[0183] In this way, if N and M satisfy the above-mentioned conditional formula, for example, when data corresponding to a range of 256 LBAs allocated to four LUT fragment tables corresponding to the second hierarchical level is written to the non-volatile memory 4, the update of the LUT 41 can be completed by changing four entries included in the LUT fragment table corresponding to the third hierarchical level. Similarly, when data corresponding to a range of 256 LBAs is written to 256 PBAs allocated to the VDM fragment table corresponding to the first hierarchical level, the update of the VDM 42 can be completed by changing one entry included in the VDM fragment table corresponding to the second hierarchical level.
[0184] In other words, when N = 8 and M = 32, the ratio of the number of PBAs managed in the LUT fragment table corresponding to the i th tier to the number of PBAs managed in the VDM fragment table corresponding to the i-1 tier is 1:4, and when the continuity of the LBAs and PBAs is ensured as described above, updating of LUT41 can be accommodated by changing four entries in the LUT fragment table, and updating of VDM42 can be accommodated by changing one entry in VDM42.
[0185] Note that when N = 8 and M = 32, the above conditional formula is also satisfied when x = 2 and y = 1 / 2. A detailed explanation will be omitted, but in this case, the ratio of the number of PBAs managed in the LUT fragment table corresponding to the i th tier to the number of PBAs managed in the VDM fragment table corresponding to the i-2 tier is 2:1, and when the continuity of the LBAs and PBAs is ensured as described above, a change to one entry in the LUT fragment table can accommodate an update to LUT41, and a change to two entries in the VDM fragment table can accommodate an update to VDM42.
[0186] FIG. 10 shows the relationship between the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table corresponding to each layer when N=16 and M=32.
[0187] Here, when N=16 and M=32, the PBA management number of the LUT fragment table corresponding to the first hierarchical layer is 16, and the PBA management number of the VDM fragment table corresponding to the first hierarchical layer is 512. Furthermore, the PBA management number of the LUT fragment table corresponding to the second hierarchical layer is 256, and the PBA management number of the VDM fragment table corresponding to the second hierarchical layer is 8,192.
[0188] A detailed explanation of the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table corresponding to hierarchical levels higher than the second hierarchical level will be omitted, but when N=16, the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table both become 16 times higher when the hierarchical level is raised by one.
[0189] Furthermore, when N=16 and M=32, the above conditional formula is satisfied when x=1 and y=2. Specifically, when focusing on the LUT fragment table corresponding to the second hierarchical level and the VDM fragment table corresponding to the first hierarchical level, where the hierarchical difference is 1 (i.e., x=1), the PBA management number of the LUT fragment table is 256, the PBA management number of the VDM fragment table is 512, and the "PBA management number of the VDM fragment table / PBA management number of the LUT fragment table" is 2 (i.e., y=2).
[0190] In this way, if N and M satisfy the above-mentioned conditional formula, for example, when data corresponding to a range of 512 LBAs allocated to two LUT fragment tables corresponding to the second hierarchical level is written to the non-volatile memory 4, the update of the LUT 41 can be completed by changing two entries included in the LUT fragment table corresponding to the third hierarchical level. Similarly, when data corresponding to a range of 512 LBAs is written to 512 PBAs allocated to the VDM fragment table corresponding to the first hierarchical level, the update of the VDM 42 can be completed by changing one entry included in the VDM fragment table corresponding to the second hierarchical level.
[0191] In other words, when N = 16 and M = 32, the ratio of the number of PBAs managed in the LUT fragment table corresponding to the i th tier to the number of PBAs managed in the VDM fragment table corresponding to the i-1 tier is 1:2, and when the continuity of the LBAs and PBAs is ensured as described above, a change to two entries in the LUT fragment table can accommodate an update to LUT41, and a change to one entry in the VDM fragment table can accommodate an update to VDM42.
[0192] Note that when N = 16 and M = 32, the above conditional formula is also satisfied when x = 2 and y = 1 / 8. A detailed explanation will be omitted, but in this case, the ratio of the number of PBAs managed in the LUT fragment table corresponding to the i th tier to the number of PBAs managed in the VDM fragment table corresponding to the i-2 tier is 8:1, and when the continuity of the LBAs and PBAs is ensured as described above, a change to one entry in the LUT fragment table can accommodate an update to LUT41, and a change to eight entries in the VDM fragment table can accommodate an update to VDM42.
[0193] FIG. 11 shows the relationship between the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table corresponding to each layer when N=64 and M=32.
[0194] Here, when N=64 and M=32, the PBA management number of the LUT fragment table corresponding to the first hierarchical layer is 64, and the PBA management number of the VDM fragment table corresponding to the first hierarchical layer is 2,048. Also, the PBA management number of the LUT fragment table corresponding to the second hierarchical layer is 4,096, and the PBA management number of the VDM fragment table corresponding to the second hierarchical layer is 131,072.
[0195] A detailed explanation of the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table corresponding to hierarchical levels higher than the second hierarchical level will be omitted, but when N=64, the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table both become 64 times higher when the hierarchical level is raised by one.
[0196] Furthermore, when N=64 and M=32, the above conditional formula is satisfied when x=0 and y=32. Specifically, when focusing on the LUT fragment table corresponding to the first hierarchical level and the VDM fragment table corresponding to the first hierarchical level, where the hierarchical difference is 0 (i.e., x=0), the PBA management number of the LUT fragment table is 64, the PBA management number of the VDM fragment table is 2,048, and the "PBA management number of the VDM fragment table / PBA management number of the LUT fragment table" is 32 (i.e., y=32).
[0197] In this way, if N and M satisfy the above-mentioned conditional formula, for example, when data corresponding to a range of 2,048 LBAs allocated to a 32-item LUT fragment table corresponding to the first hierarchical level is written to the non-volatile memory 4, the update of the LUT 41 can be completed by changing 32 entries included in the LUT fragment table corresponding to the second hierarchical level. Similarly, when data corresponding to a range of 2,048 LBAs is written to 2,048 PBAs allocated to the VDM fragment table corresponding to the first hierarchical level, the update of the VDM 42 can be completed by changing one entry included in the VDM fragment table corresponding to the second hierarchical level.
[0198] In other words, when N = 64 and M = 32, the ratio of the number of PBAs managed in the LUT fragment table corresponding to the i tier to the number of PBAs managed in the VDM fragment table corresponding to the i tier is 1:32, and when the continuity of the LBAs and PBAs is ensured as described above, a change to 32 entries in the LUT fragment table can accommodate an update to LUT41, and a change to one entry in the VDM fragment table can accommodate an update to VDM42.
[0199] Note that when N = 64 and M = 32, the above conditional formula is also satisfied when x = 1 and y = 1 / 2. A detailed explanation will be omitted, but in this case, the ratio of the number of PBAs managed in the LUT fragment table corresponding to the i th tier to the number of PBAs managed in the VDM fragment table corresponding to the i-1 tier is 2:1, and when the continuity of the LBAs and PBAs is ensured as described above, a change to one entry in the LUT fragment table can accommodate an update to LUT41, and a change to two entries in the VDM fragment table can accommodate an update to VDM42.
[0200] FIG. 12 shows the relationship between the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table corresponding to each layer when N=128 and M=32.
[0201] Here, when N=128 and M=32, the PBA management number of the LUT fragment table corresponding to the first hierarchical layer is 128, and the PBA management number of the VDM fragment table corresponding to the first hierarchical layer is 4,096. Also, the PBA management number of the LUT fragment table corresponding to the second hierarchical layer is 16,384, and the PBA management number of the VDM fragment table corresponding to the second hierarchical layer is 524,288.
[0202] A detailed explanation of the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table corresponding to hierarchical levels higher than the second hierarchical level will be omitted, but when N=128, the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table both become 128 times higher when the hierarchical level is raised by one.
[0203] Furthermore, when N=128 and M=32, the above conditional formula is satisfied when x=0 and y=32. Specifically, when focusing on the LUT fragment table corresponding to the first hierarchical level and the VDM fragment table corresponding to the first hierarchical level, where the hierarchical difference is 0 (i.e., x=0), the PBA management number of the LUT fragment table is 128, the PBA management number of the VDM fragment table is 4,096, and the "PBA management number of the VDM fragment table / PBA management number of the LUT fragment table" is 32 (i.e., y=32).
[0204] In this way, if N and M satisfy the above-mentioned conditional formula, for example, when data corresponding to a range of 4,096 LBAs allocated to a 32 LUT fragment table corresponding to the first hierarchical level is written to the non-volatile memory 4, the update of the LUT 41 can be completed by changing 32 entries included in the LUT fragment table corresponding to the second hierarchical level. Similarly, when data corresponding to a range of 4,096 LBAs is written to 4,096 PBAs allocated to a VDM fragment table corresponding to the first hierarchical level, the update of the VDM 42 can be completed by changing one entry included in the VDM fragment table corresponding to the second hierarchical level.
[0205] In other words, when N = 128 and M = 32, the ratio of the number of PBAs managed in the LUT fragment table corresponding to the i tier to the number of PBAs managed in the VDM fragment table corresponding to the i tier is 1:32, and when the continuity of the LBAs and PBAs is ensured as described above, a change to 32 entries in the LUT fragment table can accommodate an update to LUT41, and a change to one entry in the VDM fragment table can accommodate an update to VDM42.
[0206] Note that when N = 128 and M = 32, the above conditional formula is also satisfied when x = 1 and y = 1 / 4. Although a detailed explanation will be omitted, in this case, the ratio of the number of PBAs managed in the LUT fragment table corresponding to the i th tier to the number of PBAs managed in the VDM fragment table corresponding to the i-1 tier is 4:1, and when the continuity of the LBAs and PBAs is ensured as described above, a change to one entry in the LUT fragment table can accommodate an update to LUT41, and a change to four entries in the VDM fragment table can accommodate an update to VDM42.
[0207] 8 to 12 above, the case where M=32 will be described, but below, the case where M=64 will be described with reference to Figures 13 to 17. Note that, since the cases are the same as Figures 8 to 12 above except that M has been changed, the explanation of Figures 13 to 17 will be simplified as appropriate.
[0208] FIG. 13 shows the relationship between the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table corresponding to each layer when N=64 and M=64.
[0209] When N = 64, M = 64, the above conditional formula is satisfied when x = 1, y = 1. In other words, when N = 64, M = 64, the ratio of the PBA management number in the LUT fragment table corresponding to the i th tier to the PBA management number in the VDM fragment table corresponding to the i-1 th tier is 1:1, and when the continuity of the LBAs and PBAs is ensured as described above, a change of one entry in the LUT fragment table can accommodate an update of LUT41, and a change of one entry in VDM42 can accommodate an update of VDM42.
[0210] 8, even when N=32 and M=32, a change to one entry in the LUT fragment table can accommodate an update to the LUT 41, and a change to one entry in the VDM 42 can accommodate an update to the VDM 42. That is, in this embodiment, when N=M, it can be said that more efficient management of the LUT 41 and the VDM 42 can be achieved.
[0211] FIG. 14 shows the relationship between the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table corresponding to each layer when N=8 and M=64.
[0212] When N = 8, M = 64, the above conditional formula is satisfied when x = 2, y = 1. In other words, when N = 8, M = 64, the ratio of the PBA management number in the LUT fragment table corresponding to the i th tier to the PBA management number in the VDM fragment table corresponding to the i-2 th tier is 1:1, and when the continuity of the LBAs and PBAs is ensured as described above, a change of one entry in the LUT fragment table can accommodate an update of LUT41, and a change of one entry in VDM42 can accommodate an update of VDM42.
[0213] In this way, even if N is not equal to M, it may be possible to handle both updates of the LUT 41 and updates of the VDM 42 with one entry. This makes it possible to achieve more efficient management of the LUT 41 and the VDM 42, for example, even if M=N^x holds true.
[0214] FIG. 15 shows the relationship between the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table corresponding to each layer when N=16 and M=64.
[0215] When N = 16, M = 32, the above conditional formula is satisfied when x = 1, y = 4. In other words, when N = 16, M = 64, the ratio of the number of PBAs managed in the LUT fragment table corresponding to the i th tier to the number of PBAs managed in the VDM fragment table corresponding to the i-1 th tier is 1:4, and when the continuity of the LBAs and PBAs is ensured as described above, a change of four entries in the LUT fragment table can accommodate an update of LUT41, and a change of one entry in the VDM fragment table can accommodate an update of VDM42.
[0216] Note that when N = 16 and M = 64, the above conditional formula is also satisfied when x = 2 and y = 1 / 4. In this case, the ratio of the number of PBAs managed in the LUT fragment table corresponding to the i th tier to the number of PBAs managed in the VDM fragment table corresponding to the i-2 tier is 4:1, and when the continuity of the LBAs and PBAs is ensured as described above, a change to one entry in the LUT fragment table can accommodate an update to LUT41, and a change to four entries in the VDM fragment table can accommodate an update to VDM42.
[0217] FIG. 16 shows the relationship between the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table corresponding to each layer when N=32 and M=64.
[0218] When N = 32, M = 64, the above conditional formula is satisfied when x = 1, y = 2. In other words, when N = 32, M = 64, the ratio of the PBA management number in the LUT fragment table corresponding to the i th tier to the PBA management number in the VDM fragment table corresponding to the i-1 th tier is 1:2, and when the continuity of the LBAs and PBAs is ensured as described above, a change to two entries in the LUT fragment table can accommodate an update to LUT41, and a change to one entry in the VDM fragment table can accommodate an update to VDM42.
[0219] Note that when N = 32 and M = 64, the above conditional formula is also satisfied when x = 2 and y = 1 / 16. In this case, the ratio of the number of PBAs managed in the LUT fragment table corresponding to the i th tier to the number of PBAs managed in the VDM fragment table corresponding to the i-2 tier is 16:1, and when the continuity of the LBAs and PBAs is ensured as described above, a change to one entry in the LUT fragment table can accommodate an update to LUT41, and a change to 16 entries in the VDM fragment table can accommodate an update to VDM42.
[0220] FIG. 17 shows the relationship between the PBA management number of the LUT fragment table and the PBA management number of the VDM fragment table corresponding to each layer when N=128 and M=64.
[0221] When N=128 and M=64, the above conditional formula is satisfied when x=0 and y=64. In other words, when N=128 and M=64, the ratio of the number of PBAs managed in the LUT fragment table corresponding to the i tier to the number of PBAs managed in the VDM fragment table corresponding to the i tier is 1:64, and when the continuity of the LBAs and PBAs is ensured as described above, a change to 64 entries in the LUT fragment table can accommodate an update to LUT41, and a change to one entry in the VDM fragment table can accommodate an update to VDM42.
[0222] Note that when N = 128 and M = 64, the above conditional formula is also satisfied when x = 1 and y = 1 / 2. In this case, the ratio of the number of PBAs managed in the LUT fragment table corresponding to the i th tier to the number of PBAs managed in the VDM fragment table corresponding to the i-1 th tier is 2:1, and when the continuity of the LBAs and PBAs is ensured as described above, a change to one entry in the LUT fragment table can accommodate an update to LUT41, and a change to two entries in the VDM fragment table can accommodate an update to VDM42.
[0223] In this embodiment, the cases where M=32 and M=64 have been described, but M may be determined so as to correspond to the operation bit width in the memory system 3 (for example, 32 bits or 64 bits, etc.).
[0224] Next, the operation of the memory system 3 according to this embodiment will be described. First, an example of a processing procedure of the memory system 3 when a write command is transmitted from the host 2 will be described with reference to the flowchart in FIG.
[0225] When a write command is sent from the host 2 as described above, the communication interface control unit 51 receives the write command (step S1). The write command received in step S1 includes data to be written to the non-volatile memory 4 based on the write command (hereinafter referred to as target data) and an LBA for accessing the data (hereinafter referred to as target LBA). The target data is temporarily stored in the write buffer memory 52.
[0226] Next, the write control unit 561 writes the target data stored in the write buffer memory 52 to the nonvolatile memory 4 via the nonvolatile memory controller 54 (step S2). In the following description, for convenience, the PBA in the nonvolatile memory 4 to which the target data is written in step S2 is referred to as the target PBA.
[0227] When the process of step S2 is executed, the management unit 565 updates the VDM 42 based on the target PBA (step S3) by cooperating with, for example, the nonvolatile memory controller 54 and the cache memory control unit 566. In this step S3, the VDM 42 is updated so as to manage that the target data is valid (that is, that the data written to the target PBA is valid).
[0228] Here, in this embodiment, the VDM 42 has a hierarchical structure and includes a plurality of VDM fragment tables corresponding to each hierarchical level. In this case, in step S3, one or more VDM fragment tables to which the target PBA is assigned are identified by referring to the VDM 42, and the identified VDM fragment tables are read from the non-volatile memory 4 as necessary. The VDM fragment tables thus read from the non-volatile memory 4 are stored in the cache memory 551 and updated on the cache memory 551. Note that, if the VDM fragment table identified as described above is already stored in the cache memory 551, it is not necessary to read the VDM fragment table from the non-volatile memory 4.
[0229] Next, among the entries included in the VDM fragment table identified in this way, the entry to which the target PBA is assigned is changed. The VDM fragment table whose entry has been changed in this way is read out from the cache memory 551 and written back to the non-volatile memory 4.
[0230] The VDM fragment table whose entry is changed may be a VDM fragment table corresponding to the lowest hierarchical layer in the hierarchical structure as described above, or may be a VDM fragment table corresponding to a higher hierarchical layer than that hierarchical layer.
[0231] Specifically, if the target PBA is a PBA of a relatively narrow range and the validity of the target data written to the target PBA cannot be managed without changing the entry included in the VDM fragment table corresponding to the lowest hierarchical layer, the entry included in the VDM fragment table corresponding to the lowest hierarchical layer is changed. In this case, the flag information (flag information corresponding to the target PBA) constituting the bitmap stored in the entry (map storage unit 42a) to which the target PBA is assigned among the entries included in the VDM fragment table corresponding to the lowest hierarchical layer is changed. In addition, if the entire range of consecutive PBAs assigned to at least one entry included in the VDM fragment table corresponding to the lowest hierarchical layer is the target PBA, the magic number (management data MD2) stored in the entry is changed to "0xff".
[0232] On the other hand, if the target PBA is a contiguous PBA in a comparatively wide range, and the validity of the target data written to the target PBA can be managed by changing an entry in the VDM fragment table corresponding to a tier other than the lowest tier, the entry in the VDM fragment table corresponding to the tier other than the lowest tier can be changed. In this case, the magic number (management data MD3) stored in the entry (PBA storage unit 42f) to which the target PBA is assigned, among the entries in the VDM fragment table corresponding to a tier other than the lowest tier, is changed to "0xff".
[0233] Furthermore, when an entry contained in a VDM fragment table corresponding to a hierarchy other than the lowest hierarchy is changed in this manner, the validity of the target data can be managed only by that VDM fragment table, so the VDM fragment table corresponding to the hierarchy lower than that VDM fragment table (i.e., the VDM fragment table pointed to by the pointer stored in the entry) can be discarded.
[0234] On the other hand, if an entry contained in a VDM fragment table corresponding to the lowest hierarchical level needs to be changed and the VDM fragment table does not exist (has been discarded), a new VDM fragment table containing an entry to which the target PBA is assigned is created.
[0235] In step S3, such processing is executed, thereby updating the VDM 42 stored in the non-volatile memory 4. Note that the VDM 42 may be written back to the non-volatile memory 4 at any timing after step S3.
[0236] When the process of step S3 is executed, the management unit 565 updates the LUT 41 based on the write command (target LBA) and the target PBA (step S4) by, for example, cooperating with the nonvolatile memory controller 54 and the cache memory control unit 566. In this step S4, the LUT 41 is updated so as to manage the correspondence between the target LBA and the target PBA (that is, to make it possible to convert the target LBA to the target PBA).
[0237] Here, in this embodiment, the LUT 41 has a hierarchical structure and includes a plurality of LUT fragment tables corresponding to each hierarchy. In this case, in step S4, one or a plurality of LUT fragment tables to which the target LBA is assigned are specified by referring to the LUT 41, and the specified LUT fragment table is read from the non-volatile memory 4 as necessary. The LUT fragment table thus read from the non-volatile memory 4 is stored in the cache memory 551 and updated on the cache memory 551. Note that, if the LUT fragment table specified as described above is already stored in the cache memory 551, it is not necessary to read the LUT fragment table from the non-volatile memory 4.
[0238] Next, the entry to which the target LBA is assigned among the entries included in the LUT fragment table thus identified is changed. In this case, the PBA stored in the entry (PBA storage unit 41a) to which the target LBA is assigned is changed to the target PBA. The LUT fragment table whose entry has been changed in this way is read from the cache memory 551 and written back to the non-volatile memory 4.
[0239] The LUT fragment table whose entry is changed may be a LUT fragment table corresponding to the lowest hierarchical level in the hierarchical structure as described above, or may be a LUT fragment table corresponding to a higher hierarchical level than that hierarchical level.
[0240] Specifically, if the target LBA is an LBA in a relatively narrow range, and the correspondence between the target LBA and the target PBA cannot be managed without changing the entry contained in the LUT fragment table corresponding to the lowest hierarchy, the entry contained in the LUT fragment table corresponding to the lowest hierarchy is changed.
[0241] On the other hand, if the target LBAs are, for example, consecutive LBAs over a relatively wide range, the target data is written to consecutive PBAs, and the correspondence between the target LBAs and the target PBAs can be managed by changing an entry contained in the LUT fragment table corresponding to a hierarchy other than the lowest hierarchy, then it is sufficient to change the entry contained in the LUT fragment table corresponding to the hierarchy other than the lowest hierarchy.
[0242] In step S4, such processing is performed, thereby updating the LUT 41 stored in the nonvolatile memory 4. Note that the LUT 41 may be written back to the nonvolatile memory 4 at any timing after step S4.
[0243] When the process of step S4 is executed, the management unit 565 transmits a response (completion response) to the write command received in step S1 to the host 2 via the communication interface control unit 51 (step S5).
[0244] Here, a case has been described in which the LUT 41 and VDM 42 are updated based on a write command from the host 2, but the LUT 41 and VDM 42 also need to be updated in the same manner when, for example, a Trim command is sent from the host 2.
[0245] Hereinafter, an example of a processing procedure of the memory system 3 when a Trim command is transmitted from the host 2 will be described with reference to the flowchart of FIG.
[0246] The Trim command is a command for invalidating data corresponding to a specific file when that file is deleted, for example, in a file system used by the host 2. The Trim command is also called, for example, an Unmap command, depending on the interface standard for connecting the storage device. Note that the Trim command does not erase data written in the non-volatile memory 4, but the data is erased by garbage collection.
[0247] When the above-mentioned Trim command is sent from the host 2, the communication interface control unit 51 receives the Trim command (step S11). The Trim command received in step S11 includes (a range of) LBAs for accessing the data to be invalidated. In the following description, the LBA included in the Trim command is referred to as the target LBA.
[0248] When the process of step S11 is executed, the address conversion unit 564 converts the target LBA to a PBA by referring to the LUT fragment table included in the LUT 41 in order from the highest hierarchical level (step S12). As a result, the address conversion unit 564 acquires a PBA corresponding to the target LBA. In the following description, the PBA acquired by the address conversion unit 564 is referred to as the target PBA.
[0249] Next, the management unit 565 updates the VDM 42 so as to manage that the data stored in the target PBA (i.e., the data corresponding to the target LBA) is invalid (step S13). Note that the update process of the VDM 42 based on the Trim command is similar to the process shown in step S3 in Fig. 18 except that the VDM 42 is updated so as to manage that the data is invalid, so a detailed description thereof will be omitted here.
[0250] In addition, if the target PBA is a consecutive PBA in a relatively wide range, and it is possible to manage that the data written to the target PBA is invalid by changing an entry contained in the VDM fragment table corresponding to a hierarchy other than the lowest hierarchy, the magic number stored in the entry to which the target PBA is assigned, among the entries contained in the VDM fragment table corresponding to the hierarchy other than the lowest hierarchy, is changed to "0x00".
[0251] In addition, if the entire range of consecutive PBAs assigned to at least one entry included in the VDM fragment table corresponding to the lowest hierarchy is the target PBA, the magic number stored in the entry is changed to "0x00".
[0252] Furthermore, the management unit 565 updates the LUT 41 so as to invalidate the correspondence between the target LBA and the target PBA (the PBA in which the data to be invalidated is stored) (step S14). When invalidating the correspondence between the LBA and the PBA in the LUT 41, for example, a magic number is set in the entry (PBA storage unit 41a) included in the LUT fragment table to which the LBA is assigned. Note that the update process of the LUT 41 based on the Trim command is the same as step S4 shown in FIG. 18 above, except for invalidating the correspondence between the LBA and the PBA, and therefore a detailed description thereof will be omitted here.
[0253] When the LUT 41 and the VDM 42 are updated as described above, the management unit 565 transmits a response (completion response) to the Trim command to the host 2 via the communication interface control unit 51 (step S15).
[0254] In the example shown in Figure 19, it is described that a completion response is sent to host 2 after LUT 41 and VDM 42 are updated, but it is also possible to configure the update of VDM 42 to be performed after the completion response is sent (i.e., delayed execution).
[0255] Here, the above-mentioned VDM42 is necessary to perform garbage collection efficiently, but when the garbage collection is performed, it is necessary to refer to the VDM42 to confirm whether the data written to each PBA in the non-volatile memory 4 is valid or invalid.
[0256] Below, with reference to the flowchart of Figure 20, we will explain an example of the processing procedure of the memory system 3 when checking whether data written to a specific PBA (hereinafter referred to as the target PBA) in the non-volatile memory 4 is valid or invalid.
[0257] First, in this embodiment, the VDM 42 has a hierarchical structure composed of a plurality of hierarchies, and a VDM pointer (PBA in which the VDM fragment table is stored) indicating a VDM fragment table corresponding to the highest hierarchical level among the plurality of hierarchies is held in the memory 55. When the VDM fragment table corresponding to the highest hierarchical level is stored in the non-volatile memory 4, the VDM pointer held in the memory 55 is the PBA in the non-volatile memory 4. When the VDM fragment table corresponding to the highest hierarchical level is stored in the cache memory 551, the VDM pointer held in the memory 55 is address information in the cache memory 551.
[0258] In this case, the management unit 565 reads the VDM fragment table from the non-volatile memory 4 or the cache memory 551 based on the VDM pointer held in the memory 55 (step S21).
[0259] Next, the management unit 565 refers to the magic number (hereinafter referred to as the target magic number) stored in the entry to which the target PBA is assigned among the multiple entries contained in the VDM fragment table (the VDM fragment table corresponding to the highest hierarchy) read in step S1 (step S22).
[0260] In addition, if the VDM fragment table read in step S21 is not a VDM fragment table corresponding to the lowest hierarchy, the magic number (management data MD3) stored in the entry contained in the VDM fragment table is set to one of the above-mentioned "0xff", "0x00", "0xfc", and "0xfd".
[0261] The management unit 565 determines whether the target magic number referred to in this manner is "0xff" or "0x00" (step S23).
[0262] If it is determined that the target magic number is neither "0xff" nor "0x00" (NO in step S23), the management unit 565 determines whether the target magic number is "0xfc" or "0xfd" (step S24).
[0263] If it is determined that the target magic number is "0xfc" or "0xfd" (YES in step S24), the management unit 565 acquires the VDM pointer to which the target magic number is assigned (step S25). If step S25 is executed, the process returns to step S21 and is repeated.
[0264] Here, the magic number "0xfc" indicates that the VDM pointer (PBA) to which the magic number is assigned is a PBA in the non-volatile memory 4, as described above. Therefore, when the target magic number is "0xfc", in step S21 executed after step S25, a VDM fragment table corresponding to the next layer (lower layer) is read from the non-volatile memory 4 based on the VDM pointer acquired in step S24.
[0265] On the other hand, the magic number "0xfd" indicates that the VDM pointer (PBA) to which the magic number is assigned is address information in the cache memory 551, as described above. For this reason, when the target magic number is "0xfd", in step S21 executed after step S25, a VDM fragment table corresponding to the next layer (lower layer) is read from the cache memory 551 based on the VDM pointer acquired in step S24.
[0266] In this embodiment, the processes of steps S21 to S25 are repeated in this manner, making it possible to sequentially refer to the VDM fragment tables corresponding to each layer.
[0267] On the other hand, it is assumed that the target magic number is determined to be "0xff" or "0x00" in step S23 (YES in step S23).
[0268] Here, the magic number "0xff" indicates that all data written in the entire range of the PBA assigned to the entry in which the magic number is stored is valid. In other words, when the target magic number is "0xff", it can be determined that the data stored in the target PBA is valid, and the process shown in FIG. 20 is terminated.
[0269] Also, the magic number "0x00" indicates that the data written in the entire range of the PBA assigned to the entry in which the magic number is stored is invalid. In other words, when the target magic number is "0x00", it can be determined that the data stored in the target PBA is invalid, and the process shown in FIG. 20 is terminated.
[0270] Also, if it is determined in step S24 that the target magic number is not "0xfc" or "0xfd" (NO in step S24), the magic numbers "0xff", "0x00", "0xfc" and "0xfd" are not set in the entry to which the target PBA is assigned. In this case, the VDM fragment table read in step S21 is the VDM fragment table corresponding to the lowest hierarchical level, and it is found that the validity of the data stored in the range of PBAs including the target PBA included in the VDM fragment table is not the same (that is, valid data and invalid data are mixed). In this case, the management unit 565 acquires a bitmap stored in the entry to which the target PBA is assigned in the VDM fragment table (the VDM fragment table corresponding to the lowest hierarchical level) read in step S21 (step S26). The management unit 565 can grasp whether the data is valid or invalid based on flag information indicating the validity of the data stored in the target PBA (that is, flag information corresponding to the target PBA) among the multiple flag information constituting the bitmap acquired in step S26.
[0271] As described above, in this embodiment, the VDM42 (data map) stored in the non-volatile memory 4 has a hierarchical structure consisting of multiple hierarchies including at least a first hierarchical level (the lowest hierarchical level) and a second hierarchical level (a level higher than the lowest hierarchical level), and includes multiple first VDM fragment tables corresponding to the first hierarchical level and a second VDM fragment table corresponding to the second hierarchical level. Also, in this embodiment, each of the multiple first VDM fragment tables manages the validity of each data of a predetermined size (e.g., 4 KiB) written in a range of PBAs (physical addresses) in the non-volatile memory 4 allocated to the first VDM fragment table. Also, in this embodiment, the second VDM fragment table manages, for each first VDM fragment table, a VDM pointer (reference destination information for referencing the first VDM fragment table) indicating the first VDM fragment table.
[0272] Here, as explained in the comparative example of this embodiment, when the VDM 42' is configured to include only a plurality of VDM fragment tables T421' corresponding to a single hierarchical layer, it is necessary to hold all of the pointers (PBAs in which the VDM fragment tables T421' are stored) indicating each of the plurality of VDM fragment tables T421' in the memory 55. In contrast, in this embodiment, with the above-mentioned configuration, it is only necessary to hold in the memory 55 the VDM pointer indicating the VDM fragment table corresponding to the highest hierarchical layer, so that it is possible to reduce data that continues to occupy a certain storage area on the memory 55 (bring it as close to 0 as possible as management information for the VDM 42), and it becomes possible to efficiently manage the validity of the data written in the non-volatile memory 4.
[0273] Furthermore, in this embodiment, by reducing the data (VDM pointer indicating the VDM fragment table) stored in the memory 55 (for example, DRAM) as described above, it is possible to preferentially expand the LUT 41 on the memory 55 (cache in the cache memory 551), and therefore it is possible to shorten the response time (I / O response time) to commands from the host 2. When processing is executed in response to a read command from the host 2, it is not necessary to update the VDM 42, and therefore it is possible to further shorten the I / O response time. Also, when processing is executed in response to the above-mentioned Trim command, the processing to update the VDM 42 may be delayed, and in such a configuration, the storage areas (i.e., memory ratios) allocated to the LUT 41 and VDM 42 may be dynamically changed.
[0274] Furthermore, in the comparative example of this embodiment, as described above, the internal processing (start-up processing and shutdown processing) when starting up and shutting down the memory system 3 takes time, but in this embodiment, during the startup processing, a VDM pointer indicating the VDM fragment table corresponding to the highest hierarchy is expanded in memory 55, and during the shutdown processing, the VDM pointer is made non-volatile, so that the time required for internal processing can be shortened.
[0275] In this embodiment, the second VDM fragment table manages a VDM pointer that indicates the first VDM fragment table corresponding to a lower hierarchical level when the validity of each piece of data of a specified size written in the range of the PBA allocated to the first VDM fragment table is not the same (i.e., valid data and invalid data are mixed as the data written in the range of the PBA).The second VDM fragment table manages the validity of the data collectively when the validity of each piece of data of a specified size written in the range of the PBA allocated to the first VDM fragment table is the same (i.e., all of the data of the specified size written in the range of the PBA is either valid or invalid).
[0276] In this embodiment, such a configuration allows, for example, when updating the validity of data written in a wide range of continuous PBAs, to update the VDM 42 simply by changing the entry (magic number) included in the second VDM fragment table, and therefore the process for managing the validity of data can be simplified. Specifically, in the case of a memory system 3 (non-volatile memory 4) capable of storing several PiB of data, for example, a range of several G of PBAs can be operated (updated) all at once simply by changing the magic number (8 bits) stored in one entry included in the VDM fragment table corresponding to the highest layer.
[0277] That is, in this embodiment, for example, bit manipulation such as individually updating bitmaps included in the first VDM fragment table can be suppressed, and processing costs can be reduced.
[0278] Furthermore, in this embodiment, since the range (granularity) of the PBAs assigned to the VDM fragment table differs depending on the tier, the VDM 42 can be flexibly updated.
[0279] Also, for example, in the case where the validity of each piece of data of a predetermined size written in the range of the PBA allocated to the first VDM fragment table is collectively managed in the second VDM fragment table, the first VDM fragment table can be discarded and the storage area in which the first VDM fragment table was stored can be released. As a result, in this embodiment, it is possible to reduce the storage area required to store the VDM 42.
[0280] Furthermore, in this embodiment, the first VDM fragment table corresponding to the first hierarchical layer and the second VDM fragment table corresponding to the second hierarchical layer have the same data structure. Specifically, the first VDM fragment table manages the validity of a plurality of data of a predetermined size (4KiB) in each of a predetermined number (e.g., 32) of entries. Also, the second VDM fragment table manages VDM pointers that indicate each of the first VDM fragment data in each of a predetermined number (e.g., 32) of entries.
[0281] In this embodiment, this configuration simplifies the hierarchical structure of the VDM 42, and reduces the calculation cost when referencing the VDM 42 (each VDM fragment table). In addition, for example, in order to refer to the VDM fragment table to which the target PBA is assigned, it is necessary to trace multiple hierarchies, but since the processing in such a case can be unified regardless of the hierarchy (i.e., the same software code can be used), it becomes possible to efficiently refer to the VDM 42.
[0282] Note that, although it is sufficient for VDM42 in this embodiment to have a hierarchical structure including at least a first and second hierarchical layer, the number of hierarchical layers constituting the hierarchical structure of VDM42 may be three or more. Note that the number of hierarchical layers constituting the hierarchical structure of VDM42 may be changed as appropriate based on, for example, the storage capacity of non-volatile memory 4 (the number of PBAs) and the like.
[0283] Furthermore, in this embodiment, like the VDM 42, the LUT 41 (address conversion table) also has a hierarchical structure, but each of the multiple LUT fragment tables included in the LUT 41 has the same data structure as the VDM fragment table included in the VDM 42.
[0284] According to such a configuration, even when multiple hierarchies are traced to refer to the LUT 41, the same software code as that of the VDM 42 can be used, so that efficient processing can be realized. Also, for example, the LUT 41 (LUT fragment table) and VDM 42 (VDM fragment table) updated on the cache memory 551 need to be written back to the non-volatile memory 4 (i.e., made non-volatile), but since the LUT fragment table and the VDM fragment table are configured to have the same size, it is possible to make the LUT fragment table and the VDM fragment table non-volatile all at once without distinguishing between them. This improves the efficiency of writing the LUT fragment table and the VDM fragment table to the non-volatile memory 4, and reduces the cost of making them non-volatile.
[0285] In this embodiment, the number of PBAs managed in the LUT fragment table corresponding to the lowest hierarchy is less than the number of PBAs managed in the VDM fragment table corresponding to that hierarchy, so the number of hierarchies (first number) constituting the hierarchical structure of VDM42 is less than the number of hierarchies (second number) constituting the hierarchical structure of LUT41.
[0286] In addition, in this embodiment, the number N of entries in the VDM fragment table and the number M of data of a predetermined size whose validity is managed in one entry of the VDM fragment table corresponding to the lowest hierarchy (i.e., the PBA managed in the entry) are determined so as to satisfy the above-mentioned conditional formula (M = y × N^x), and the LUT fragment table and the VDM fragment table are configured to have the same data structure.
[0287] In this embodiment, with such a configuration, the LUT 41 can be updated simply by changing the entry (PBA) included in the LUT fragment table corresponding to the higher layer, and the VDM 42 can be updated simply by changing the entry (magic number) included in the VDM fragment table without changing the bitmap (performing bit manipulation). Therefore, in this embodiment, it is possible to efficiently manage the correspondence between the LBA and PBA in the LUT 41 and efficiently manage the validity of the data in the VDM 42 at the same time.
[0288] In order to realize more efficient management in the LUT 41 and the VDM 42, N and M may be adopted that satisfy the conditional formula M=N^x (i.e., M is a power of N), such as N=8, M=64 described in Fig. 14 above, or N and M may be adopted that satisfy the conditional formula M=N (i.e., M is equal to N), such as N=32, M=32 described in Fig. 8 and N=64, M=64 described in Fig. 13. In addition, (the values of) N and M may be configured to be appropriately set or changed by an administrator of the memory system 3, etc.
[0289] Here, for example, the pointer size in C language is the same as the operation bit width. In this case, if M is smaller than the operation bit width, the pointer (address information in the cache memory 551) cannot be stored as is in the entry of the fragment table. To solve this problem, it is possible to divide the pointer and store it, but this would result in high processing costs.
[0290] On the other hand, if M is larger than the operation bit width, it is possible to store the pointer directly in the fragment table entry, but since there are unused bits, it is not efficient (cache is wasted). Furthermore, in this case, the size of the fragment table becomes large, so the non-volatile cost increases. To address this, for example, it is possible to perform a process to remove unnecessary parts before making the fragment table non-volatile, but this would result in high processing costs.
[0291] Therefore, in this embodiment, M may be determined to correspond to (for example, match) the operation bit width (32 bits or 64 bits) in the memory system 3. With this configuration, a pointer (address information in the cache memory 551) whose size is the same as the operation bit width can be stored in an entry of the fragment table without processing, so that the LUT 41 and the VDM 42 can be managed efficiently. Also, with this configuration, there is no need to unnecessarily increase the size of the fragment table.
[0292] In this embodiment, the controller 5 included in the memory system 3 has been described as functioning as a flash translation layer (FTL) configured to execute data management and block management of the non-volatile memory 4 (NAND flash memory), but the function as the FTL may be possessed by the host 2 connected to the memory system 3. In such a configuration, the LUT 41 and VDM 42 described in this embodiment are managed by the host 2, and update processing of the LUT 41 and VDM 42 is executed on the host 2 side. In addition, in such a configuration, address conversion from LBA to PBA may also be executed on the host 2 side, and in this case, a command from the host 2 (for example, a read command) may include a PBA.
[0293] 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 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 of the invention and its equivalents described in the claims, as well as in the scope and spirit of the invention. [Explanation of symbols]
[0294] 1...information processing system, 2...host, 3...memory system, 4...non-volatile memory, 5...controller, 41...LUT (address conversion table), 41a...PBA storage (entry), 41b...LBA storage unit, 41c...management data storage unit, 41d...previous pointer storage unit, 41e...next pointer storage unit, 42...VDM (data map), 42a...map storage unit, 42b...PBA storage unit, 42c...management data storage unit, 42d...previous pointer storage unit, 42e...next pointer storage unit, 42f...PBA storage unit, 51...communication interface control unit, 52...write buffer memory, 53...read buffer memory, 54...non-volatile memory controller, 55...memory, 56...processor, 551...cache memory, 561...write control unit, 562...read control unit, 563...garbage collection control unit, 564...address conversion unit, 565...management unit, 566...cache memory control unit.
Claims
1. In a memory system connectable to a host, A non-volatile memory; A data map for managing the validity of data written in the nonvolatile memory. Equipped with The data map has a hierarchical structure including at least a first hierarchy and a second hierarchy higher than the first hierarchy, and includes a plurality of first fragment tables corresponding to the first hierarchy and a second fragment table corresponding to the second hierarchy; Each of the plurality of first fragment tables is used to manage the validity of each of data of a predetermined size written in a range of physical addresses in the non-volatile memory assigned to the corresponding first fragment table; The second fragment table is used to manage reference destination information for referencing the first fragment table for each of the first fragment tables. Memory system.
2. The second fragment table includes: is used to manage the reference information when the validity of each of the data of the predetermined size written in the range of physical addresses assigned to the first fragment table is not common; When the validity of each piece of data of the predetermined size written in the range of physical addresses assigned to the first fragment table is common, the validity of the data of the predetermined size is collectively managed.
2. The memory system of claim 1.
3. the data map includes a plurality of the second fragment tables, and further includes a third fragment table corresponding to a third hierarchy higher than the second hierarchy; The third fragment table is used to manage reference destination information for referencing the second fragment table for each of the second fragment tables.
3. The memory system according to claim 1.
4. the first fragment table and the second fragment table have the same data structure; the first fragment table is used to manage validity of a plurality of data of a predetermined size in each of a predetermined number of entries; The second fragment table is used to manage the reference destination information in each of the predetermined number of entries.
3. The memory system according to claim 1.
5. an address conversion table for managing a correspondence relationship between a logical address used when the host accesses the memory system and a physical address in which data in the nonvolatile memory is written; the address conversion table has a hierarchical structure composed of a plurality of hierarchical layers, and includes a plurality of fourth fragment tables corresponding to the plurality of hierarchical layers; Each of the plurality of fourth fragment tables included in the address conversion table has the same data structure as the first and second fragment tables.
5. The memory system of claim 4.
6. 6. The memory system of claim 5, wherein when the number of entries in the first fragment table is N and the number of data of the specified size whose validity is managed in one entry of the first fragment table is M, M = y x N^x (where x is an integer greater than or equal to 0, and y is an integer greater than or equal to 1 and less than N, or the reciprocal of an integer greater than or equal to 1 and less than N).
7. 7. The memory system according to claim 6, wherein M is a power of N.
8. 7. The memory system of claim 6, wherein M is equal to N.
9. 9. The memory system according to claim 6, wherein the M corresponds to an operation bit width in the memory system.
10. A memory system as claimed in any one of claims 5 to 9, wherein a first number, which is the number of hierarchies constituting the hierarchical structure of the data map, is less than a second number, which is the number of hierarchies constituting the hierarchical structure of the address conversion table.
11. 11. The memory system according to claim 1, wherein the non-volatile memory is a NAND type flash memory.
12. An information processing system including a host and a memory system communicatively connected to the host, the memory system comprises a non-volatile memory; The host includes a data map for managing validity of data written in the non-volatile memory; The data map has a hierarchical structure including at least a first hierarchy and a second hierarchy higher than the first hierarchy, and includes a plurality of first fragment tables corresponding to the first hierarchy and a second fragment table corresponding to the second hierarchy; Each of the plurality of first fragment tables is used to manage the validity of each of data of a predetermined size written in a range of physical addresses in the non-volatile memory assigned to the corresponding first fragment table; The second fragment table is used to manage reference destination information for referencing the first fragment table for each of the first fragment tables. Information processing system.
13. The second fragment table includes: is used to manage the reference information when the validity of each of the data of the predetermined size written in the range of physical addresses assigned to the first fragment table is not common; When the validity of each piece of data of the predetermined size written in the range of physical addresses assigned to the first fragment table is common, the validity of the data of the predetermined size is collectively managed.
13. The information processing system according to claim 12.
14. the data map includes a plurality of the second fragment tables, and further includes a third fragment table corresponding to a third hierarchy higher than the second hierarchy; The third fragment table is used to manage reference destination information for referencing the second fragment table for each of the second fragment tables.
14. An information processing system according to claim 12 or 13.
15. the first fragment table and the second fragment table have the same data structure; the first fragment table is used to manage validity of a plurality of data of a predetermined size in each of a predetermined number of entries; The second fragment table is used to manage the reference destination information in each of the predetermined number of entries.
14. An information processing system according to claim 12 or 13.
16. the host further includes an address conversion table for managing a correspondence relationship between a logical address used when the host accesses the memory system and a physical address to which data in the non-volatile memory is written; the address conversion table has a hierarchical structure composed of a plurality of hierarchical layers, and includes a plurality of fourth fragment tables corresponding to the plurality of hierarchical layers; Each of the plurality of fourth fragment tables included in the address conversion table has the same data structure as the first and second fragment tables.
16. An information processing system according to claim 15.
17. An information processing system as described in claim 16, wherein when the number of entries in the first fragment table is N and the number of data of the specified size whose validity is managed in one entry of the first fragment table is M, M = y x N^x (where x is an integer greater than or equal to 0, and y is an integer greater than or equal to 1 and less than N, or the reciprocal of an integer greater than or equal to 1 and less than N).
18. 18. The information processing system according to claim 17, wherein M is a power of N.
19. 18. The information processing system according to claim 17, wherein the M is equal to the N.
20. 20. The information processing system according to claim 17, wherein the M corresponds to an operation bit width in the memory system.
21. An information processing system according to any one of claims 16 to 20, wherein a first number, which is the number of hierarchies constituting the hierarchical structure of the data map, is less than a second number, which is the number of hierarchies constituting the hierarchical structure of the address conversion table.
22. 22. The information processing system according to claim 12, wherein the non-volatile memory is a NAND type flash memory.
Citation Information
Patent Citations
Storage device, electronic apparatus, and method for correcting error data
JP2012063882A
Non-volatile storage
JP2013152676A
Memory device and information processing system
JP2018041204A
