JP6721765B2 - Memory system and control method - Google Patents

Memory system and control method Download PDF

Info

Publication number
JP6721765B2
JP6721765B2 JP2019118522A JP2019118522A JP6721765B2 JP 6721765 B2 JP6721765 B2 JP 6721765B2 JP 2019118522 A JP2019118522 A JP 2019118522A JP 2019118522 A JP2019118522 A JP 2019118522A JP 6721765 B2 JP6721765 B2 JP 6721765B2
Authority
JP
Japan
Prior art keywords
block
data
write
garbage collection
blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019118522A
Other languages
Japanese (ja)
Other versions
JP2019160347A (en
Inventor
菅野 伸一
伸一 菅野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kioxia Corp
Original Assignee
Kioxia Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kioxia Corp filed Critical Kioxia Corp
Priority to JP2019118522A priority Critical patent/JP6721765B2/en
Publication of JP2019160347A publication Critical patent/JP2019160347A/en
Application granted granted Critical
Publication of JP6721765B2 publication Critical patent/JP6721765B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System (AREA)

Description

本発明の実施形態は、不揮発性メモリを制御する技術に関する。 Embodiments of the present invention relate to a technique for controlling a non-volatile memory.

近年、不揮発性メモリを備えるメモリシステムが広く普及している。 In recent years, a memory system including a non-volatile memory has become widespread.

このようなメモリシステムの一つとして、NANDフラッシュ技術ベースのソリッドステートドライブ(SSD)が知られている。 A NAND flash technology based solid state drive (SSD) is known as one of such memory systems.

SSDは、その低電力消費、高性能という特徴により、様々なコンピュータのメインストレージとして使用されている。 SSDs are used as main storages in various computers due to their low power consumption and high performance.

国際公開第2012/020544号International Publication No. 2012/020544

ところで、ホストによってSSDに書かれるデータには、そのデータの一部分が頻繁に書き換えられ、残りの部分は頻繁に書き換えられない、というデータ局所性が存在する場合がある。 By the way, the data written in the SSD by the host may have data locality that a part of the data is frequently rewritten and the remaining part is not rewritten frequently.

このようなデータ局所性は、SSDのライトアンプリフィケーションを増加させ、結果としてSSDの性能および寿命に影響を及ぼす場合がある。 Such data locality may increase the write amplification of the SSD and consequently affect the performance and life of the SSD.

本発明が解決しようとする課題は、データ局所性によるライトアンプリフィケーションを増加を抑制することができるメモリシステムおよび制御方法を提供することである。 The problem to be solved by the present invention is to provide a memory system and a control method capable of suppressing an increase in write amplification due to data locality.

実施形態によれば、メモリシステムは、不揮発性メモリと、前記不揮発性メモリに電気的に接続され、前記不揮発性メモリのガベージコレクション動作を実行するように構成されたコントローラとを具備する。前記コントローラは、第1のガベージコレクション回数をそれぞれ有する第1のブロックと第2のブロックとをガベージコレクション対象ブロックとして選択する。前記第1のガベージコレクション回数は前記第1のブロックと前記第2のブロックの各々内のデータが過去のガベージコレクション動作によってコピーされた回数を示す。前記コントローラは、前記第1のブロック内の有効データと前記第2のブロック内の有効データを、フリーブロックである第3のブロックにコピーする。前記コントローラは、第2のガベージコレクション回数をそれぞれ有する第4のブロックと第5のブロックとをガベージコレクション対象ブロックとして選択する。前記第2のガベージコレクション回数は前記第4のブロックと前記第5のブロックの各々内のデータが過去のガベージコレクション動作によってコピーされた回数を示す。前記コントローラは、前記第4のブロック内の有効データと前記第5のブロック内の有効データを、フリーブロックである第6のブロックにコピーする。前記コントローラは、前記第3のブロックおよび前記第6のブロックの各々のデータの一部が無効化され、且つ前記第1のガベージコレクション回数が前記第2のガベージコレクション回数と同じである場合、前記第3のブロックと前記第6のブロックとをガベージコレクション対象ブロックとして選択し、前記第3のブロック内の有効データと前記第6のブロック内の有効データを、フリーブロックである第7のブロックにコピーする。 According to an embodiment, a memory system comprises a non-volatile memory and a controller electrically connected to the non-volatile memory and configured to perform a garbage collection operation of the non-volatile memory. The controller selects a first block and a second block, each of which has a first garbage collection count, as a garbage collection target block. The first number of garbage collections indicates the number of times the data in each of the first block and the second block has been copied by a past garbage collection operation. The controller copies valid data in the first block and valid data in the second block to a third block which is a free block. The controller selects a fourth block and a fifth block, each of which has a second garbage collection count, as garbage collection target blocks. The second number of garbage collections indicates the number of times the data in each of the fourth block and the fifth block has been copied by a past garbage collection operation. The controller copies valid data in the fourth block and valid data in the fifth block to a sixth block which is a free block. When the controller invalidates a part of the data of each of the third block and the sixth block, and the first garbage collection count is the same as the second garbage collection count, The third block and the sixth block are selected as garbage collection target blocks, and the valid data in the third block and the valid data in the sixth block are converted into a seventh block which is a free block. make a copy.

実施形態に係るメモリシステムの構成例を説明するブロック図。3 is a block diagram illustrating a configuration example of a memory system according to an embodiment. FIG. 同実施形態のメモリシステムによって実行される、ガベージコレクション回数管理動作とガベージコレクション動作とを説明するための図。FIG. 4 is an exemplary view for explaining a garbage collection count management operation and a garbage collection operation executed by the memory system of the same embodiment. 同実施形態のメモリシステムにおいて用いられるガベージコレクション(GC)回数管理リストの例を説明する図。FIG. 6 is a diagram illustrating an example of a garbage collection (GC) number management list used in the memory system of the same embodiment. ガベージコレクション回数管理リストに基づいて同実施形態のメモリシステムによって実行されるガベージコレクション対象ブロック選択動作を説明するための図。FIG. 6 is a view for explaining a garbage collection target block selecting operation executed by the memory system of the embodiment based on the garbage collection count management list. 同実施形態のメモリシステムによって実行されるガベージコレクション動作を説明する図。FIG. 3 is a diagram illustrating a garbage collection operation executed by the memory system of the same embodiment. 同実施形態のメモリシステムに書き込まれる複数種のデータの例を説明する図。FIG. 3 is a diagram illustrating an example of a plurality of types of data written in the memory system of the same embodiment. ガベージコレクション回数と複数種のデータ間のデータ量の割合との関係の例を説明する図。The figure explaining the example of the relationship between the frequency of garbage collection and the ratio of the amount of data between multiple types of data. 同実施形態のメモリシステムによって実行されるガベージコレクション動作の手順を説明するフローチャート。6 is an exemplary flowchart illustrating a procedure of a garbage collection operation executed by the memory system of the same embodiment. 同実施形態のメモリシステムによって実行される、異なるガベージコレクション回数を有する2つのブロック群の有効データをマージする処理を含むガベージコレクション動作を説明する図。FIG. 6 is a diagram illustrating a garbage collection operation including a process of merging valid data of two block groups having different garbage collection times, which is executed by the memory system of the embodiment. 同実施形態のメモリシステムによって実行される、異なるガベージコレクション回数を有する2つのブロック群の有効データをマージする処理を含むガベージコレクション動作の手順を説明するフローチャート。5 is an exemplary flowchart illustrating a procedure of a garbage collection operation including a process of merging valid data of two block groups having different garbage collection times, which is executed by the memory system of the same embodiment. マージ処理を特定のガベージコレクション回数以上のブロック群にのみ許可する動作を説明する図。The figure explaining the operation|movement which permits a merge process only to the block group more than a specific garbage collection frequency. マージ処理を特定のガベージコレクション回数以上のブロック群にのみ許可する動作を含むガベージコレクション動作の手順を説明するフローチャート。6 is a flowchart illustrating a procedure of a garbage collection operation including an operation of permitting a merge process only to a block group having a specific garbage collection count or more. 同実施形態のメモリシステムによって実行される、ホストからのデータの書き込み用にフリーブロックを順次割り当てる動作を説明するための図。FIG. 6 is a view for explaining an operation of sequentially allocating free blocks for writing data from a host, which is executed by the memory system of the same embodiment. 同実施形態のメモリシステムによって使用されるブロック使用順序管理リストの例を説明するための図。FIG. 3 is an exemplary view for explaining an example of a block use order management list used by the memory system of the same embodiment. 同じLBAへのライトが要求された時に同実施形態のメモリシステムによって実行される累積データ書き込み量算出動作を説明するための図。FIG. 6 is a diagram for explaining a cumulative data write amount calculation operation executed by the memory system of the embodiment when a write to the same LBA is requested. 同実施形態のメモリシステムによって実行される累積データ書き込み量応答処理の処理シーケンスを説明するための図。FIG. 5 is an exemplary view for explaining a processing sequence of cumulative data write amount response processing executed by the memory system of the embodiment. 同実施形態のメモリシステムによって実行される累積データ書き込み量応答処理の手順を説明するフローチャート。6 is an exemplary flowchart illustrating a procedure of cumulative data write amount response processing executed by the memory system of the embodiment. 同実施形態のメモリシステムによって実行される累積データ書き込み量応答処理の別の処理シーケンスを説明するための図。FIG. 8 is an exemplary view for explaining another processing sequence of the cumulative data write amount response processing executed by the memory system of the embodiment. 同実施形態のメモリシステムによって実行される累積データ書き込み量応答処理の別の手順を説明するフローチャート。9 is a flowchart illustrating another procedure of cumulative data write amount response processing executed by the memory system of the embodiment. 同実施形態のメモリシステムにおいて使用されるルックアップテーブルの例を説明するための図。FIG. 3 is an exemplary view for explaining an example of a lookup table used in the memory system of the same embodiment. 同じLBAへのライトが要求された時に同実施形態のメモリシステムによって実行される時間経過応答処理の手順を説明するためのフローチャート。6 is a flowchart for explaining a procedure of time lapse response processing executed by the memory system of the embodiment when a write to the same LBA is requested. 同実施形態のメモリシステムから受信される累積データ書き込み量/時間経過情報に基づいてホストによって実行される処理の手順の例を説明するフローチャート。9 is an exemplary flowchart illustrating an example of a procedure of processing executed by a host based on cumulative data write amount/time lapse information received from the memory system of the embodiment. ホストの構成例を説明するブロック図。FIG. 3 is a block diagram illustrating a configuration example of a host. 同実施形態のメモリシステムとホストとを含むコンピュータの構成例を示す図。FIG. 3 is a diagram showing a configuration example of a computer including a memory system and a host of the same embodiment.

以下、図面を参照して、実施形態を説明する。
まず、図1を参照して、一実施形態に係るメモリシステムを含む情報処理システム1の構成を説明する。
Hereinafter, embodiments will be described with reference to the drawings.
First, the configuration of an information processing system 1 including a memory system according to an embodiment will be described with reference to FIG.

このメモリシステムは、不揮発性メモリにデータをライトし、不揮発性メモリからデータをリードするように構成された半導体ストレージデバイスである。このメモリシステムは、例えば、NANDフラッシュ技術ベースのソリッドステートドライブ(SSD)3として実現されている。 This memory system is a semiconductor storage device configured to write data to a non-volatile memory and read data from the non-volatile memory. This memory system is realized, for example, as a solid state drive (SSD) 3 based on NAND flash technology.

情報処理システム1は、ホスト(ホストデバイス)2と、SSD3とを含む。ホスト2は、サーバ、パーソナルコンピュータのような情報処理装置である。 The information processing system 1 includes a host (host device) 2 and an SSD 3. The host 2 is an information processing device such as a server or a personal computer.

SSD3は、ホスト2として機能する情報処理装置のメインストレージとして使用され得る。SSD3は、情報処理装置に内蔵されてもよいし、情報処理装置にケーブルまたはネットワークを介して接続されてもよい。 The SSD 3 can be used as a main storage of the information processing device that functions as the host 2. The SSD 3 may be built in the information processing device, or may be connected to the information processing device via a cable or a network.

ホスト2とSSD3とを相互接続するためのインタフェースとしては、SCSI、Serial Attached SCSI(SAS)、ATA、Serial ATA(SATA)、PCI Express(PCIe)、Ethernet(登録商標),Fibre channel等が使用し得る。 As an interface for connecting the host 2 and the SSD 3 to each other, SCSI, Serial Attached SCSI (SAS), ATA, Serial ATA (SATA), PCI Express (PCIe), Ethernet (registered trademark), Fiber channel, etc. are used. obtain.

SSD3は、コントローラ4、不揮発性メモリ(NANDメモリ)5、およびDRAM6を備える。NANDメモリ5は、限定されないが、複数のNANDフラッシュメモリチップを含んでいてもよい。 The SSD 3 includes a controller 4, a non-volatile memory (NAND memory) 5, and a DRAM 6. The NAND memory 5 may include, but is not limited to, a plurality of NAND flash memory chips.

NANDメモリ5は、多数のNANDブロック(ブロック)B0〜Bm−1を含む。ブロックB0〜Bm−1は、消去単位として機能する。ブロックは「物理ブロック」または「消去ブロック」と称されることもある。 The NAND memory 5 includes a large number of NAND blocks (blocks) B0 to Bm-1. The blocks B0 to Bm-1 function as erase units. Blocks are sometimes referred to as "physical blocks" or "erase blocks."

ブロックB0〜Bm−1は多数のページ(物理ページ)を含む。つまり、ブロックB0〜Bm−1の各々は、ページP0〜Pn−1を含む。NANDメモリ5においては、データのリードおよびデータのライトはページ単位で実行される。データの消去はブロック単位で実行される。 The blocks B0 to Bm-1 include many pages (physical pages). That is, each of the blocks B0 to Bm-1 includes pages P0 to Pn-1. In the NAND memory 5, data read and data write are executed in page units. Data is erased in block units.

コントローラ4は、Toggle、ONFIのようなNANDインタフェース13を介して、不揮発性メモリであるNANDメモリ5に電気的に接続されている。コントローラ4は、NANDメモリ5のデータ管理とNANDメモリ5のブロック管理とを実行するように構成されたフラッシュトランスレーション層(FTL)として機能し得る。 The controller 4 is electrically connected to the NAND memory 5 which is a non-volatile memory via a NAND interface 13 such as Toggle and ONFI. The controller 4 may function as a flash translation layer (FTL) configured to perform data management of the NAND memory 5 and block management of the NAND memory 5.

データ管理には、(1)論理ブロックアドレス(LBA)と物理アドレスとの間の対応関係を示すマッピング情報の管理、(2)ページ単位のリード/ライトとブロック単位の消去動作とを隠蔽するための処理、等が含まれる。LBAと物理アドレスとの間のマッピングの管理は、論理物理アドレス変換テーブルとして機能するルックアップテーブル(LUT)33を用いて実行される。ルックアップテーブル(LUT)33は、所定の管理サイズ単位で、LBAと物理アドレスとの間のマッピングを管理する。ホスト2からのライトコマンドの多くは、4Kバイトのデータの書き込みを要求する。したがって、ルックアップテーブル(LUT)33は、例えば4Kバイト単位で、LBAと物理アドレスとの間のマッピングを管理してもよい。あるLBAに対応する物理アドレスは、このLBAのデータがライトされたNANDメモリ5内の物理記憶位置を示す。物理アドレスは、物理ブロックアドレスと物理ページアドレスとを含む。物理ページアドレスは全てのページに割り当てられており、また物理ブロックアドレスは全てのブロックに割り当てられている。 The data management includes (1) management of mapping information indicating a correspondence between a logical block address (LBA) and a physical address, and (2) concealment of read/write in page units and erase operation in block units. Processing, etc. are included. The management of the mapping between the LBA and the physical address is executed by using a look-up table (LUT) 33 that functions as a logical-physical address conversion table. The lookup table (LUT) 33 manages the mapping between the LBA and the physical address in a predetermined management size unit. Most of the write commands from the host 2 request writing of 4 Kbytes of data. Therefore, the lookup table (LUT) 33 may manage the mapping between the LBA and the physical address in units of 4 Kbytes, for example. The physical address corresponding to a certain LBA indicates the physical storage position in the NAND memory 5 in which the data of this LBA is written. The physical address includes a physical block address and a physical page address. Physical page addresses are assigned to all pages, and physical block addresses are assigned to all blocks.

ページへのデータ書き込みは、1消去サイクル当たり1回のみ可能である。 Data can be written to the page only once per erase cycle.

このため、コントローラ4は、同じLBAへのライト(上書き)を、NANDメモリ5上の別のページにマッピングする。つまり、コントローラ4は、この別のページにデータをライトする。そして、コントローラ4は、ルックアップテーブル(LUT)33を更新してこのLBAをこの別のページに関連付けると共に、元のページ(つまりこのLBAが関連付けられていた古いデータ)を無効化する。 Therefore, the controller 4 maps a write (overwrite) to the same LBA to another page on the NAND memory 5. That is, the controller 4 writes data to this other page. Then, the controller 4 updates the lookup table (LUT) 33 to associate this LBA with this other page and invalidates the original page (that is, the old data with which this LBA was associated).

ブロック管理には、不良ブロックの管理と、ウェアレベリングと、ガベージコレクション動作等が含まれる。ウェアレベリングは、物理ブロックそれぞれのプログラム/イレーズ回数を平準化するための動作である。 Block management includes bad block management, wear leveling, garbage collection operation, and the like. Wear leveling is an operation for leveling the program/erase count of each physical block.

ガベージコレクション動作は、NANDメモリ5内のフリースペースを作り出すための動作である。このガベージコレクション動作は、NANDメモリ5のフリーブロックの個数を増やすため、有効データと無効データとが混在する幾つかのブロック内の全ての有効データを別のブロック(コピー先フリーブロック)にコピーする。そして、ガベージコレクション動作は、ルックアップテーブル(LUT)33を更新して、コピーされた有効データのLBAそれぞれを正しい物理アドレスにマッピングする。有効データが別のブロックにコピーされることによって無効データのみなったブロックはフリーブロックとして開放される。これによって、このブロックは消去後に再利用することが可能となる。 The garbage collection operation is an operation for creating a free space in the NAND memory 5. In this garbage collection operation, in order to increase the number of free blocks in the NAND memory 5, all valid data in some blocks in which valid data and invalid data are mixed are copied to another block (copy destination free block). .. Then, the garbage collection operation updates the look-up table (LUT) 33 to map each LBA of the copied valid data to the correct physical address. By copying the valid data to another block, the block regarded as the invalid data is released as a free block. This allows this block to be reused after being erased.

ホスト2は、ライトコマンドをSSD3に送出する。このライトコマンドは、ライトデータ(つまり書き込むべきデータ)の論理アドレス(開始論理アドレス)と、転送長とを含む。この実施形態においては、LBAが論理アドレスとして使用されるが、他の実施形態においてはオブジェクトIDが論理アドレスとして使用されても良い。LBAは、論理セクタ(論理ブロック)に付与されるシリアル番号によって表現される。シリアル番号はゼロから始まる。論理セクタのサイズは、例えば512バイトである。 The host 2 sends a write command to the SSD 3. This write command includes the logical address (start logical address) of the write data (that is, the data to be written) and the transfer length. In this embodiment, LBA is used as the logical address, but in other embodiments the object ID may be used as the logical address. The LBA is represented by a serial number given to a logical sector (logical block). Serial numbers start from zero. The size of the logical sector is 512 bytes, for example.

SSD3のコントローラ4は、ライトコマンド内の開始論理アドレスと転送長とによって指定されるライトデータを、NANDメモリ5内のブロックのページにライトする。さらに、コントローラ4は、ルックアップテーブル(LUT)33を更新することによって、ライトされたデータに対応するLBAを、このデータがライトされた物理記憶位置を示す物理アドレスにマッピングする。 The controller 4 of the SSD 3 writes the write data specified by the start logical address and the transfer length in the write command to the page of the block in the NAND memory 5. Further, the controller 4 updates the look-up table (LUT) 33 to map the LBA corresponding to the written data to the physical address indicating the physical storage position where the data is written.

より詳しくは、コントローラ4は、NANDメモリ5内のフリーブロックの一つを、ホスト2からのデータの書き込みのために割り当てる。この割り当てられたブロックは、ホスト2からのデータが書き込まれるべき書き込み対象ブロックであり、「書き込み先ブロック」、または「入力ブロック」、等とも称される。コントローラ4は、ルックアップテーブル(LUT)33を更新しながら、ホスト2から受信されるライトデータを書き込み対象ブロック(書き込み先ブロック)の利用可能ページに順次書き込む。書き込み先ブロックに利用可能ページが無くなった場合に、コントローラ4は、新たなフリーブロックを書き込み先ブロックとして割り当てる。 More specifically, the controller 4 allocates one of the free blocks in the NAND memory 5 for writing data from the host 2. The allocated block is a write target block in which the data from the host 2 is to be written, and is also called a “write destination block” or an “input block”. The controller 4 sequentially writes the write data received from the host 2 to the available pages of the write target block (write destination block) while updating the lookup table (LUT) 33. When there are no available pages in the write destination block, the controller 4 allocates a new free block as the write destination block.

次に、コントローラ4の構成について説明する。 Next, the configuration of the controller 4 will be described.

コントローラ4は、ホストインタフェース11、CPU12、NANDインタフェース13、DRAMインタフェース14、SRAM15等を含む。これらCPU12、NANDインタフェース13、DRAMインタフェース14、SRAM15は、バス10を介して相互接続される。 The controller 4 includes a host interface 11, a CPU 12, a NAND interface 13, a DRAM interface 14, an SRAM 15, and the like. The CPU 12, NAND interface 13, DRAM interface 14, and SRAM 15 are interconnected via the bus 10.

ホストインタフェース11は、ホスト2から様々なコマンド(ライトコマンド、リードコマンド、アンマップ(UNMAP)コマンド、等)を受信する。 The host interface 11 receives various commands (write command, read command, unmap (UNMAP) command, etc.) from the host 2.

ライトコマンドは、SSD3に対し、このライトコマンドによって指定されたデータをライトするように要求する。ライトコマンドは、ライトされるべき最初の論理ブロックのLBA(開始LBA)と、転送長(論理ブロックの数)とを含む。リードコマンドは、SSD3に対し、このリードコマンドによって指定されたデータをリードするように要求する。リードコマンドは、リードされるべき最初の論理ブロックのLBA(開始LBA)と、転送長(論理ブロックの数)とを含む。 The write command requests the SSD 3 to write the data designated by this write command. The write command includes the LBA (start LBA) of the first logical block to be written and the transfer length (the number of logical blocks). The read command requests the SSD 3 to read the data designated by this read command. The read command includes the LBA (starting LBA) of the first logical block to be read and the transfer length (the number of logical blocks).

CPU12は、ホストインタフェース11、NANDインタフェース13、DRAMインタフェース14、SRAM15を制御するように構成されたプロセッサである。CPU12は、上述のFTLの処理に加え、ホスト2からの様々なコマンドを処理するためのコマンド処理等を実行する。 The CPU 12 is a processor configured to control the host interface 11, the NAND interface 13, the DRAM interface 14, and the SRAM 15. The CPU 12 executes command processing for processing various commands from the host 2 and the like in addition to the above-described FTL processing.

例えば、コントローラ4がホスト2からライトコマンドを受信した時、CPU12の制御の下、コントローラ4はライトコマンドによって指定されるライトデータをNANDメモリ5に書き込む以下のライト動作を実行する。 For example, when the controller 4 receives a write command from the host 2, the controller 4 executes the following write operation under the control of the CPU 12 to write the write data designated by the write command into the NAND memory 5.

つまり、コントローラ4は、ライトデータを現在の書き込み先ブロックの物理記憶位置(利用可能ページ)に書き込み、そしてルックアップテーブル(LUT)33を更新して、ライトコマンドに含まれるLBA(開始LBA)にこの物理記憶位置の物理アドレスをマッピングする。 That is, the controller 4 writes the write data to the physical storage position (available page) of the current write destination block, updates the lookup table (LUT) 33, and sets the LBA (start LBA) included in the write command. The physical address of this physical storage location is mapped.

これらFTL処理およびコマンド処理は、CPU12によって実行されるファームウェアによって制御されてもよい。このファームウェアは、CPU12を、ガベージコレクション(GC)回数管理部21、ガベージコレクション(GC)動作制御部22、および更新頻度情報応答部23として機能させる。 The FTL processing and the command processing may be controlled by the firmware executed by the CPU 12. This firmware causes the CPU 12 to function as a garbage collection (GC) number management unit 21, a garbage collection (GC) operation control unit 22, and an update frequency information response unit 23.

ホスト2によってSSD3に書かれるデータには、そのデータの一部分が頻繁に書き換えられ、残りの部分は頻繁には書き換えられない、というデータ局所性が存在する場合がある。この場合、例えば、無効データ量の多い上位幾つかのブロックをGC対象ブロックとして選択するという通常のGCアルゴリズムによってGC動作が実行されると、何度もGC動作が繰り返されるにつれて、更新頻度の高いデータと更新頻度の低いデータとが同じブロックに混在しやくなる。更新頻度の高いデータと更新頻度の低いデータとの混在は、SSD3のライトアンプリフィケーションを増加させる要因となり得る。 The data written to the SSD 3 by the host 2 may have data locality in which a part of the data is frequently rewritten and the remaining part is not frequently rewritten. In this case, for example, when the GC operation is executed by the normal GC algorithm of selecting some upper blocks having a large amount of invalid data as the GC target block, the update frequency increases as the GC operation is repeated many times. Data and data with low update frequency tend to be mixed in the same block. A mixture of data with a high update frequency and data with a low update frequency can be a factor that increases the write amplification of the SSD 3.

なぜなら、更新頻度の高いデータ(Hotデータ)と更新頻度の低いデータ(Coldデータ)とが混在するブロックにおいては、Hotデータの更新によってブロック内の一部の領域だけが早いタイミングで無効化される一方、このブロック内の残りの領域(Coldデータ)は有効状態に長い間維持されるからである。 This is because, in a block in which data with a high update frequency (Hot data) and data with a low update frequency (Cold data) are mixed, only a part of the area in the block is invalidated by the update of the Hot data. On the other hand, the remaining area (Cold data) in this block is maintained in the valid state for a long time.

もしHotデータのみによってブロックが満たされていたならば、このブロック内の全てのデータがそれらデータの更新(書き替え)によって、比較的速いタイミングで無効化される可能性が高い。したがって、このブロックは、ガベージコレクション動作を実行すること無しで、このブロックを消去することのみによって、再利用することが可能となる。 If the block is filled with only Hot data, all the data in this block is likely to be invalidated at a relatively fast timing by updating (rewriting) the data. Therefore, this block can be reused only by erasing it without performing a garbage collection operation.

一方、Coldデータのみによってブロックが満たされているならば、このブロック内の全てのデータは、長い間、有効状態に維持される。したがって、このブロックは、長い間、ガベージコレクション動作の対象とならない可能性が高い。 On the other hand, if the block is filled with only Cold data, all the data in this block will remain valid for a long time. Therefore, this block is likely not to be subject to garbage collection operations for a long time.

ライトアンプリフィケーション(WA)は、以下のように定義される。 Write amplification (WA) is defined as follows.

WA=「SSDにライトされたデータの総量」 / 「ホストからSSDにライトされたデータの総量」
「SSDにライトされたデータの総量」は、ホストからSSDにライトされたデータの総量とガベージコレクション動作等によって内部的にSSDにライトされたデータの総量との和に相当する。
WA=“total amount of data written to SSD” / “total amount of data written to SSD from host”
The "total amount of data written to the SSD" corresponds to the sum of the total amount of data written to the SSD from the host and the total amount of data internally written to the SSD by a garbage collection operation or the like.

ライトアンプリフィケーション(WA)の増加は、SSD3内のブロックそれぞれの書き換え回数(プログラム/イレーズ回数)の増加を引き起こす。つまり、ライトアンプリフィケーション(WA)が大きい程、ブロックのプログラム/イレーズ回数が、そのプログラム/イレーズ回数の上限値に速く達しやすくなる。この結果、SSD3の耐久性および寿命の劣化が引き起こされる。 An increase in the write amplification (WA) causes an increase in the number of times of rewriting (program/erase number) of each block in the SSD 3. That is, the larger the write amplification (WA), the easier the program/erase count of the block reaches the upper limit of the program/erase count. As a result, the durability and life of the SSD 3 deteriorate.

本実施形態では、更新頻度の高いデータと更新頻度の低いデータとを分離できるようにするために、「ブロック内のデータのGC回数を考慮したGC機能」と、「LBAベースの更新頻度通知機能」とを有している。 In the present embodiment, in order to be able to separate data with a high update frequency and data with a low update frequency, a “GC function that considers the number of GC times of data in a block” and an “LBA-based update frequency notification function”. It has.

ガベージコレクション(GC)回数管理部21およびガベージコレクション(GC)動作制御部22は、「ブロック内のデータのGC回数を考慮したGC機能」を実行する。「ブロック内のデータのGC回数を考慮したGC機能」は、データ局所性に起因するSSD3のライトアンプリフィケーションの増加を抑制可能な改善されたガベージコレクション(GC)動作を実行する。 The garbage collection (GC) number management unit 21 and the garbage collection (GC) operation control unit 22 execute the "GC function in consideration of the number of GCs of data in a block". The “GC function considering the number of times of GC of data in a block” executes an improved garbage collection (GC) operation capable of suppressing an increase in write amplification of SSD3 due to data locality.

ガベージコレクション(GC)回数管理部21は、ホスト2によって書き込まれたデータを含むブロック毎に、ガベージコレクション(GC)回数を管理する。あるブロックのGC回数は、このブロック内のデータがガベージコレクション(GC)動作によってコピーされた回数を示す。つまり、あるブロックのGC回数は、このブロック内のデータが有効データとして過去に何回コピーされたかを示す。 The garbage collection (GC) number management unit 21 manages the number of garbage collection (GC) for each block including the data written by the host 2. The GC count of a block indicates the number of times the data in this block has been copied by a garbage collection (GC) operation. That is, the GC count of a block indicates how many times the data in this block has been copied as valid data in the past.

ホスト2によってデータがライトされた直後のブロック、つまりそのデータがGCによって一度も集められた(コピーされた)ことのないブロックについては、このブロックのGC回数はゼロに設定される。 For a block immediately after data is written by the host 2, that is, for a block whose data has never been collected (copied) by the GC, the GC count of this block is set to zero.

GC回数がゼロである幾つかのブロックがGCの対象ブロック(コピー元ブロック)として選択され、これらブロックの有効データがコピー先フリーブロックにコピーされたならば、GC回数管理部21は、このコピー先フリーブロックのGC回数を1に設定する。コピー先フリーブロック内のデータは、有効データとしてGC対象ブロック(コピー元ブロック)から1回コピーされたデータであるからである。 If some blocks whose GC count is zero are selected as GC target blocks (copy source blocks) and the valid data of these blocks are copied to the copy destination free block, the GC count management unit 21 Set the GC count of the first free block to 1. This is because the data in the copy destination free block is data that has been copied once from the GC target block (copy source block) as valid data.

有効データがコピー先フリーブロックにコピーされることによって無効データのみなった各ブロック(コピー元ブロック)は、フリーブロックとなる。フリーブロックはデータを含まないので、このフリーブロックのGC回数は管理する必要はない。 By copying the valid data to the copy destination free block, each block regarded as invalid data (copy source block) becomes a free block. Since the free block does not contain data, it is not necessary to manage the GC count of this free block.

GC回数が1である幾つかのブロック(コピー元ブロック)がガベージコレクション(GC)の対象ブロックとして選択され、これらブロックの有効データがコピー先フリーブロックにコピーされたならば、GC回数管理部21は、このコピー先のフリーブロックのGC回数を2に設定する。このコピー先フリーブロック内のデータは、有効データとして過去に2回コピーされたデータであるからである。 If some blocks (copy source blocks) having a GC count of 1 are selected as target blocks for garbage collection (GC), and valid data of these blocks are copied to a copy destination free block, the GC count management unit 21 Sets the number of GCs of this copy destination free block to 2. This is because the data in this copy destination free block is data that has been copied twice in the past as valid data.

このように、あるブロックに関連づけられたGC回数の値は、このブロック内のデータが過去のGC動作によって何回コピーされたか、つまりこのブロック内のデータに対して過去に何回のGC動作が実行されたかを示す。 In this way, the value of the number of GC times associated with a block indicates how many times the data in this block has been copied by the past GC operation, that is, how many times in the past the GC operation has performed on the data in this block. Indicates whether it has been executed.

GC動作制御部22は、同じGC回数に関連づけられた幾つかのブロックをガベージコレクション(GC)動作の対象ブロックとして選択し、これら同じGC回数に関連づけられたブロックの有効データのみを同じコピー先ブロックにコピーする、という改良されたGC動作を実行する。 The GC operation control unit 22 selects some blocks associated with the same GC count as target blocks for a garbage collection (GC) operation, and only valid data of blocks associated with the same GC count is used as the same copy destination block. Perform an improved GC operation of copying to.

例えば、GC動作制御部22は、同じGC回数に関連づけられたブロック群(つまり、同じGC回数を有するブロックの集合)の中から、幾つかのブロックを、GCのための対象ブロックとして選択する。GC動作制御部22は、このGC対象ブロックとして選択されたこれらブロック内の有効データをコピー先フリーブロックにコピーする。そして、GC対象ブロックとして選択されたこれらブロックのGC回数に1を加えた値が、GC回数管理部21によって、このコピー先フリーブロックのGC回数として設定される。 For example, the GC operation control unit 22 selects some blocks as target blocks for GC from the block group associated with the same GC count (that is, a set of blocks having the same GC count). The GC operation control unit 22 copies the valid data in these blocks selected as the GC target block to the copy destination free block. Then, a value obtained by adding 1 to the GC count of these blocks selected as the GC target block is set as the GC count of this copy destination free block by the GC count management unit 21.

「LBAベースの更新頻度通知機能」は、個々のライトコマンドに含まれる個々のLBAへのライトの頻度をホスト2に通知することによって、ホスト2がHotデータ/Coldデータを分離するのを効率良くアシストする機能である。 The “LBA-based update frequency notification function” notifies the host 2 of the write frequency to each LBA included in each write command, so that the host 2 can efficiently separate Hot data/Cold data. This is a function to assist.

「LBAベースの更新頻度通知機能」は、更新頻度情報応答部23によって実行される。 The “LBA-based update frequency notification function” is executed by the update frequency information response unit 23.

更新頻度情報応答部23は、ホスト2からLBAを含むライトコマンドを受信した際に、このLBAへの前回のライトからこのLBAへの今回のライトまでの時間経過に関する値、またはこのLBAへの前回のライトからこのLBAへの今回のライトまでの累積データ書き込み量を、このライトコマンドに対する応答としてホスト2に通知する。これにより、ホスト2に対して、ユーザデータの実際の更新頻度(書き替え頻度)を知らせることができるので、ホスト2は、ユーザデータを互いに更新頻度の異なる複数種のデータ、例えば、頻繁に更新されるタイプのデータ(Hotデータ)、更新の頻度が低いタイプのデータ(Coldデータ)、HotデータとColdデータの中間の更新頻度を有するタイプのデータ(Warmデータ)に、に分類できる。この結果、例えば、ホスト2は、必要に応じて、これら異なるタイプのデータを、異なるSSDに分散させるための処理等を実行することができる。 When the update frequency information response unit 23 receives a write command including an LBA from the host 2, the update frequency information response unit 23 receives a value regarding the time elapsed from the last write to this LBA to the current write to this LBA, or the previous time to this LBA. The accumulated data write amount from the write to the LBA to the present write is notified to the host 2 as a response to the write command. This allows the host 2 to be notified of the actual update frequency (rewriting frequency) of the user data, so that the host 2 updates the user data with a plurality of types of data having different update frequencies, for example, frequently. The data can be categorized into data of a type (Hot data), data of a low update frequency (Cold data), and data of a type having an update frequency intermediate between Hot data and Cold data (Warm data). As a result, for example, the host 2 can execute processing for distributing these different types of data to different SSDs, if necessary.

次に、コントローラ4内の他のコンポーネントについて説明する。 Next, other components in the controller 4 will be described.

NANDインタフェース13は、CPU12の制御の下、NANDメモリ5を制御するように構成されたNANDコントローラである。 The NAND interface 13 is a NAND controller configured to control the NAND memory 5 under the control of the CPU 12.

DRAMインタフェース14は、CPU12の制御の下、DRAM6を制御するように構成されたDRAMコントローラである。 The DRAM interface 14 is a DRAM controller configured to control the DRAM 6 under the control of the CPU 12.

DRAM6の記憶領域の一部は、NANDメモリ5にライトすべきデータを一時的に格納するためのライトバッファ(WB)31として利用されてもよい。また、DRAM6の記憶領域は、ガベージコレクション(GC)動作中に移動されるデータを一時的に格納するためのGCバッファ32として利用されてもよい。また、DRAM6の記憶領域は、上述のルックアップテーブル33の格納のために用いられてもよい。 A part of the storage area of the DRAM 6 may be used as a write buffer (WB) 31 for temporarily storing data to be written in the NAND memory 5. Further, the storage area of the DRAM 6 may be used as the GC buffer 32 for temporarily storing the data moved during the garbage collection (GC) operation. Further, the storage area of the DRAM 6 may be used for storing the above-mentioned lookup table 33.

さらに、DRAM6の記憶領域は、GC回数管理リスト34、およびブロック使用順序管理リスト35として利用されてもよい。 Further, the storage area of the DRAM 6 may be used as the GC count management list 34 and the block use order management list 35.

GC回数管理リスト34は、ホスト2によって書き込まれたデータを含むブロック毎に、GC回数を保持するためのリストである。GC回数管理リスト34は、ブロックそれぞれのブロックID(例えば物理ブロックアドレス)とこれらブロック内のデータのGC回数との間の対応関係を示す表であってもよい。 The GC count management list 34 is a list for holding the GC count for each block including data written by the host 2. The GC count management list 34 may be a table showing the correspondence between the block IDs (for example, physical block addresses) of the blocks and the GC counts of the data in these blocks.

あるいは、GC回数管理リスト34は、GC回数(例えば、GC回数=0〜GC回数=n)別にブロックそれぞれを管理するための複数のGC回数リストから構成されてもよい。ここで、nは、管理すべきGC回数の上限値である。例えば、GC回数=0のGC回数リストは、0回のGC回数に関連づけられたブロックそれぞれのブロックID(例えば物理ブロックアドレス)のリストを保持する。GC回数=1のGC回数リストは、1回のGC回数に関連づけられたブロックそれぞれのブロックID(例えば物理ブロックアドレス)のリストを保持する。 Alternatively, the GC count management list 34 may be composed of a plurality of GC count lists for managing each block for each GC count (for example, GC count=0 to GC count=n). Here, n is the upper limit of the number of times of GC to be managed. For example, the GC count list with the GC count=0 holds a list of block IDs (eg, physical block addresses) of the blocks associated with the GC count of 0 times. The GC count list with the GC count=1 holds a list of block IDs (eg, physical block addresses) of the blocks associated with one GC count.

ブロック使用順序管理リスト35は、書き込み先ブロック用に割り当てられたブロックそれぞれに付与される割り当て番号(シーケンシャル番号)を保持する。すなわち、コントローラ4は、書き込み対象ブロックとして割り当てられたブロックそれぞれに対してその割り当て順序を示す番号(割り当て番号)を付与する。番号は1から始まるシーケンシャル番号であってもよい。例えば、最初に書き込み先ブロック用に割り当てられたブロックには割り当て番号=1が付与され、2番目に書き込み先ブロック用に割り当てられたブロックには割り当て番号=2が付与され、3番目に書き込み先ブロック用に割り当てられたブロックには割り当て番号=3が付与される。これにより、どのブロックがどのような順序で書き込み先ブロックとして割り当てられたかを示すブロック使用履歴を管理することができる。割り当て番号としては、新たなフリーブロックが書き込み先ブロック用に割り当てられる度にインクリメントされるカウンタの値を使用できる。 The block usage order management list 35 holds allocation numbers (sequential numbers) assigned to the blocks allocated for the write destination blocks. That is, the controller 4 gives a number (allocation number) indicating the allocation order to each block allocated as the write target block. The number may be a sequential number starting at 1. For example, the block first assigned to the write destination block is assigned the assignment number=1, the second block assigned to the write destination block is assigned the assignment number=2, and the third write destination block is assigned. An allocation number=3 is given to the block allocated for the block. As a result, it is possible to manage the block use history indicating which block is assigned as the write destination block and in what order. As the allocation number, the value of the counter that is incremented each time a new free block is allocated for the write destination block can be used.

SSD3は、さらに他の様々な管理情報を保持していてもよい。このような管理情報の例には、物理アドレスそれぞれに対応する有効/無効フラグを保持するページ管理テーブルが含まれていても良い。各有効/無効フラグは、対応する物理アドレス(物理ページ)が有効であるか無効であるかを示す。物理ページが有効であるとは、その物理ページ内のデータが有効データであることを意味する。物理ページが無効であるとは、その物理ページ内のデータが更新(書き替え)によって無効化されたデータであることを意味する。 The SSD 3 may also hold various other management information. An example of such management information may include a page management table holding valid/invalid flags corresponding to respective physical addresses. Each valid/invalid flag indicates whether the corresponding physical address (physical page) is valid or invalid. The physical page being valid means that the data in the physical page is valid data. The invalid physical page means that the data in the physical page is invalidated by updating (rewriting).

次に、ホスト2の構成について説明する。 Next, the configuration of the host 2 will be described.

ホスト2は、様々なプログラムを実行する情報処理装置である。情報処理装置によって実行されるプログラムには、アプリケーションソフトウェアレイヤ41、オペレーティングシステム(OS)42、ファイルシステム43が含まれる。 The host 2 is an information processing device that executes various programs. The programs executed by the information processing device include an application software layer 41, an operating system (OS) 42, and a file system 43.

一般に知られているように、オペレーティングシステム(OS)42は、ホスト2全体を管理し、ホスト2内のハードウェアを制御し、アプリケーションがハードウェアおよびSSD3を使用することを可能にするための制御を実行するように構成されたソフトウェアである。 As is generally known, an operating system (OS) 42 manages the entire host 2, controls hardware in the host 2, and controls for allowing an application to use the hardware and the SSD 3. Is software configured to perform.

ファイルシステム43は、ファイルの操作(作成、保存、更新、削除等)のための制御を行うために使用される。例えば、ZFS、Btrfs、XFS、ext4、NTFSなどがファイルシステム43として使用されても良い。あるいは、ファイルオブジェクトシステム(例えば、Ceph Object Storage Daemon)、Key Value Store System (例えば、Rocks DB) がファイルシステム43として使用されても良い。 The file system 43 is used to perform control for file operations (creating, saving, updating, deleting, etc.). For example, ZFS, Btrfs, XFS, ext4, NTFS, etc. may be used as the file system 43. Alternatively, a file object system (for example, Ceph Object Storage Daemon) or a Key Value Store System (for example, Rocks DB) may be used as the file system 43.

様々なアプリケーションソフトウェアスレッドがアプリケーションソフトウェアレイヤ41上で走る。アプリケーションソフトウェアスレッドの例としては、クライアントソフトウェア、データベースソフトウェア、仮想マシン等がある。 Various application software threads run on the application software layer 41. Examples of application software threads include client software, database software, virtual machines and the like.

アプリケーションソフトウェアレイヤ41がリードコマンドまたはライトコマンドのようなリクエストをSSD3に送出することが必要な時、アプリケーションソフトウェアレイヤ41は、OS42にそのリクエストを送出する。OS42はそのリクエストをファイルシステム43に送出する。ファイルシステム43は、そのリクエストを、コマンド(リードコマンド、ライトコマンド等)にトランスレートする。ファイルシステム43は、コマンドを、SSD3に送出する。SSD3からのレスポンスが受信された際、ファイルシステム43は、そのレスポンスをOS42に送出する。OS42は、そのレスポンスをアプリケーションソフトウェアレイヤ41に送出する。 When the application software layer 41 needs to send a request such as a read command or a write command to the SSD 3, the application software layer 41 sends the request to the OS 42. The OS 42 sends the request to the file system 43. The file system 43 translates the request into a command (read command, write command, etc.). The file system 43 sends the command to the SSD 3. When the response from the SSD 3 is received, the file system 43 sends the response to the OS 42. The OS 42 sends the response to the application software layer 41.

次に、図2〜図12を参照して、「ブロック内のデータのGC回数を考慮したGC機能」の詳細を説明する。 Next, with reference to FIGS. 2 to 12, details of the “GC function considering the number of times of GC of data in a block” will be described.

図2は、SSD3によって実行されるGC回数管理動作とGC動作とを示す。 FIG. 2 shows the GC count management operation and the GC operation executed by the SSD 3.

SSD3のコントローラ4は、あるフリーブロックを、ホスト2からのデータ(ライトデータ)の書き込み用のブロック(書き込み先ブロック)として割り当て、ホスト2から受信されるライトデータをこの書き込み先ブロック内の利用可能ページに順次書き込む。現在の書き込み先ブロックの全てのページがデータで満たされた時、コントローラ4は、現在の書き込み先ブロックをアクティブブロック(データを含むブロック)として管理する。さらに、コントローラ4は、別のフリーブロックを新たな書き込み先ブロックとして割り当てる。このようにして、SSD3においては、ホスト2から受信されるデータ(ライトデータ)は、その到着順に、現在の書き込み先ブロックの最初のページから最後のページに向けて順次書き込まれる。 The controller 4 of the SSD 3 allocates a certain free block as a block (write destination block) for writing data (write data) from the host 2, and the write data received from the host 2 can be used in this write destination block. Write to pages sequentially. When all pages of the current write destination block are filled with data, the controller 4 manages the current write destination block as an active block (block containing data). Further, the controller 4 allocates another free block as a new write destination block. In this way, in the SSD 3, the data (write data) received from the host 2 is sequentially written in the order of arrival from the first page to the last page of the current write destination block.

図2のブロックB11〜B17は、ホスト2によってデータがライトされた直後のブロック、つまりそのブロック内のデータがガベージコレクション(GC)動作によって一度もコピーされたことのないブロックである。これらブロックB11〜B17に対応するGC回数は0である。 The blocks B11 to B17 in FIG. 2 are blocks immediately after the data is written by the host 2, that is, the data in the block has never been copied by the garbage collection (GC) operation. The number of GCs corresponding to these blocks B11 to B17 is 0.

時間が経過するにつれ、ブロックB11〜B17の各々のデータの一部は、その書き換えによって無効化されるかもしれない。これにより、ブロックB11〜B17の各々においては、有効データと無効データとが混在される場合がある。 Over time, some of the data in each of blocks B11-B17 may be invalidated by the rewriting. As a result, valid data and invalid data may be mixed in each of the blocks B11 to B17.

フリーブロックの数が閾個数以下に低下した場合、コントローラ4は、有効データと無効データとが混在される幾つかのブロックからフリーブロックを作り出すGC動作を開始する。 When the number of free blocks falls below the threshold number, the controller 4 starts the GC operation of creating free blocks from some blocks in which valid data and invalid data are mixed.

コントローラ4は、まず、有効データと無効データとが混在する幾つかのブロックをGC対象ブロックとして選択する。このGC対象ブロックの選択においては、コントローラ4は、上述したように、同じGC回数に関連づけられたブロック群をGC対象ブロックとして選択する。このブロック群は、例えば、最も無効データの量が多いブロックが属するブロック群、つまり最も無効データの量が多いブロックのGC回数と同じGC回数を有するブロックの集合、であってよい。この場合、コントローラ4は、最初に、ホスト2によって書き込まれたデータを含むブロックから、無効データ量が最も多いブロックを選択してもよい。次いで、コントローラ4は、無効データ量が最も多いブロックと、この無効データ量が最も多いブロックのGC回数と同じGC回数に関連づけられた一以上のブロックとを、ガベージコレクション(GC)動作の対象ブロックとして選択してもよい。 The controller 4 first selects some blocks in which valid data and invalid data are mixed as GC target blocks. In the selection of the GC target block, the controller 4 selects the block group associated with the same GC number of times as the GC target block, as described above. This block group may be, for example, a block group to which a block having the largest amount of invalid data belongs, that is, a set of blocks having the same GC count as the GC count of the block having the largest invalid data amount. In this case, the controller 4 may first select the block having the largest invalid data amount from the blocks including the data written by the host 2. Next, the controller 4 sets the block having the largest invalid data amount and one or more blocks associated with the same GC number as the GC number of the block having the largest invalid data amount as the target blocks of the garbage collection (GC) operation. May be selected as

コントローラ4は、選択した幾つかのGC対象ブロック(同じGC回数に関連づけられた幾つかのブロック)内の有効データをコピー先フリーブロックにコピーし、これらGC対象ブロックのGC回数に1を加えた値を、コピー先フリーブロックのGC回数として設定する。これにより、GC対象ブロックのGC回数に1を加えた値がコピー先フリーブロックに引き継がれるので、コピー先フリーブロックのGC回数は、そのコピー先フリーブロック内のデータがGC動作によって過去に何回コピーされたかを正しく表すことができる。 The controller 4 copies valid data in some selected GC target blocks (several blocks associated with the same GC count) to a copy destination free block, and adds 1 to the GC counts of these GC target blocks. The value is set as the GC count of the copy destination free block. As a result, the value obtained by adding 1 to the GC count of the GC target block is carried over to the copy-destination free block. Therefore, the GC count of the copy-destination free block depends on how many times the data in the copy-destination free block was past by the GC operation. It can correctly represent whether it has been copied.

例えば、同じGC回数に関連づけられた2つのブロックB11,B12がGC対象ブロックとして選択され、これらブロックB11,B12の有効データがコピー先フリーブロックB21にコピーされたならば、このコピー先フリーブロックB21のGC回数は、ブロックB11,B12のGC回数(ここでは、0)に1を加えた値(ここでは1)に設定される。 For example, if two blocks B11 and B12 associated with the same number of GCs are selected as GC target blocks and the valid data of these blocks B11 and B12 are copied to the copy destination free block B21, this copy destination free block B21. Is set to a value (here, 1) obtained by adding 1 to the number of GCs (here, 0) of the blocks B11 and B12.

同様に、同じGC回数に関連づけられた3つのブロックB13、B14、B15がGC対象ブロックとして選択され、これらブロックB13、B14、B15の有効データがコピー先フリーブロックB22にコピーされたならば、このコピー先フリーブロックB22のGC回数は、ブロックB13、B14、B15のGC回数(ここでは、0)に1を加えた値(ここでは1)に設定される。 Similarly, if three blocks B13, B14, B15 associated with the same number of GCs are selected as GC target blocks and valid data of these blocks B13, B14, B15 are copied to the copy destination free block B22, The number of GCs of the copy destination free block B22 is set to a value (here, 1) obtained by adding 1 to the number of GCs of the blocks B13, B14, and B15 (here, 0).

同様に、同じGC回数に関連づけられた2つのブロックB16、B17がGC対象ブロックとして選択され、これらブロックB16、B17の有効データがコピー先フリーブロックB23にコピーされたならば、このコピー先フリーブロックB23のGC回数は、ブロックB16、B17のGC回数(ここでは、0)に1を加えた値(ここでは1)に設定される。 Similarly, if two blocks B16 and B17 associated with the same number of GCs are selected as GC target blocks and the valid data of these blocks B16 and B17 are copied to the copy destination free block B23, this copy destination free block. The GC number of B23 is set to a value (here, 1) obtained by adding 1 to the GC number of blocks B16 and B17 (here, 0).

時間が経過するに連れ、ブロックB21、B22、B23の各々のデータの一部は、その書き換えによって無効化されるかもしれない。これにより、ブロックB21、B22、B23の各々においては、有効データと無効データとが混在される場合がある。 Over time, some of the data in each of the blocks B21, B22, and B23 may be invalidated by the rewriting. As a result, valid data and invalid data may be mixed in each of the blocks B21, B22, and B23.

同じGC回数に関連づけられた2つのブロックB21、B22がGC対象ブロックとして選択され、これらブロックB21、B22の有効データがコピー先フリーブロックB31にコピーされたならば、このコピー先フリーブロックB31のGC回数は、ブロックB21、B22のGC回数(ここでは1)に1を加えた値(ここでは2)に設定される。 If two blocks B21 and B22 associated with the same GC count are selected as GC target blocks and the valid data of these blocks B21 and B22 are copied to the copy destination free block B31, the GC of this copy destination free block B31 is selected. The number of times is set to a value (here, 2) obtained by adding 1 to the number of GC times (here, 1) of the blocks B21 and B22.

このように、本実施形態では、ブロック毎に管理されるGC回数はそのブロック内のデータが過去のGC動作によってコピーされた回数を示す。このGC回数を正しく管理するために、GC対象ブロックのGC回数に1を加えた値が、コピー先フリーブロック内のデータに引き継がれる。 As described above, in the present embodiment, the number of GCs managed for each block indicates the number of times the data in the block has been copied by the past GC operation. In order to manage this GC count correctly, the value obtained by adding 1 to the GC count of the GC target block is carried over to the data in the copy destination free block.

図3は、GC回数管理リスト34の例を示す。 FIG. 3 shows an example of the GC count management list 34.

管理すべきGC回数の上限値nが例えば10である場合、GC回数管理リスト34は、GC回数=0〜GC回数=10にそれぞれ対応する11個のGC回数リストから構成されてもよい。 When the upper limit value n of the number of GCs to be managed is 10, for example, the GC number management list 34 may be composed of eleven GC number lists corresponding to GC number=0 to GC number=10, respectively.

GC回数=0のGC回数リストは、GC回数=0に関連づけられたブロックそれぞれのブロックID(例えば物理ブロックアドレス)のリストを示す。GC回数=1のGC回数リストは、GC回数=1に関連づけられたブロックそれぞれのブロックID(例えば物理ブロックアドレス)のリストを示す。同様にして、GC回数=10のGC回数リストは、GC回数=10に関連づけられたブロックそれぞれのブロックID(例えば物理ブロックアドレス)のリストを示す。各GC回数リストは、限定されないが、有効データと無効データとが混在するブロックだけを含んでもよい。 The GC count list of GC count=0 indicates a list of block IDs (eg, physical block addresses) of the blocks associated with the GC count=0. The GC count list with the GC count=1 indicates a list of block IDs (eg, physical block addresses) of the blocks associated with the GC count=1. Similarly, the GC count list with the GC count=10 shows a list of block IDs (for example, physical block addresses) of the blocks associated with the GC count=10. Each GC count list may include, but is not limited to, only blocks in which valid data and invalid data are mixed.

図4は、コントローラ4によって実行されるGC対象ブロック選択動作を示す。 FIG. 4 shows a GC target block selection operation executed by the controller 4.

GC対象ブロックを選択する処理においては、コントローラ4のガベージコレクション動作制御部22は、最初に、異なるGC回数にそれぞれ関連づけられた複数のブロック群(複数のGC回数リスト)から、GC対象のブロック群を選択してもよい。図4では、GC回数=5のブロック群(ブロックB2、ブロックB5、ブロックB11、ブロックB21)がGC対象のブロック群として選択され、さらに、このGC回数=5のブロック群から、幾つかのGC対象ブロックが選択される場合が例示されている。 In the process of selecting the GC target block, the garbage collection operation control unit 22 of the controller 4 first selects the GC target block group from the plurality of block groups (the plurality of GC frequency lists) associated with different GC frequencies. May be selected. In FIG. 4, the block group with the number of GC=5 (block B2, block B5, block B11, block B21) is selected as the block group of the GC target, and further, some GCs are selected from the block group with the number of GC=5. The case where the target block is selected is illustrated.

GC対象ブロックを選択する処理においては、例えば、まず、所定の条件に合致するブロックが最初のGC候補として選択されてもよい。所定の条件に合致するブロックは、アクティブブロック(ホスト2によって書き込まれたデータを含むブロック)の中で最も無効データ量が多いブロックであってもよい。他の実施形態では、所定の条件に合致するブロックは、アクティブブロックの中で最も古いブロックであってもよい。以下では、最も無効データ量が多いブロックが、最初のGC候補として選択される場合を想定する。 In the process of selecting the GC target block, for example, first, a block that matches a predetermined condition may be selected as the first GC candidate. The block that meets the predetermined condition may be the block having the largest invalid data amount among the active blocks (the block including the data written by the host 2). In another embodiment, the block that meets the predetermined condition may be the oldest block among the active blocks. In the following, it is assumed that the block with the largest amount of invalid data is selected as the first GC candidate.

最も無効データ量が多いブロックがブロックB5であるならば、コントローラ4は、ブロックB5を含むGC回数リスト(ここでは、GC回数=5のGC回数リスト)を特定し、このGC回数=5のGC回数リストによって示されるブロック群(ブロックB2、ブロックB5、ブロックB11、ブロックB21)をGC対象のブロック群として選択し、このGC対象のブロック群から、幾つかのGC対象ブロックを選択する。例えば、これらブロックB2、ブロックB5、ブロックB11、ブロックB21の中で無効データ量が多い上位幾つかのブロックがGC対象ブロックとして選択されてもよい。この場合、例えば、ブロックB5と、ブロックB2、ブロックB11、ブロックB21内の中で最も無効データ量が多い上位の一つ以上のブロックとが、GC対象ブロックとして選択されてもよい。 If the block having the largest amount of invalid data is the block B5, the controller 4 specifies the GC number list including the block B5 (here, the GC number list of GC number=5), and the GC number of GC=5. A block group (block B2, block B5, block B11, block B21) indicated by the number of times list is selected as a GC target block group, and some GC target blocks are selected from this GC target block group. For example, among these blocks B2, block B5, block B11, and block B21, some upper blocks having a large invalid data amount may be selected as the GC target block. In this case, for example, the block B5 and one or more upper blocks having the largest invalid data amount in the block B2, the block B11, and the block B21 may be selected as the GC target block.

図5は、コントローラ4によって実行されるGC動作を示す。 FIG. 5 shows the GC operation performed by the controller 4.

コントローラ4は、全てのフリーブロックを含むフリーブロックプール(フリーブロックリスト)60を管理する。コントローラ4は、これらフリーブロックから一つのフリーブロックを選択する。コントローラ4は、選択されたフリーブロックを、コピー先フリーブロックB1000として割り当てる。コントローラ4は、同じGC回数を有するGC対象ブロック(ここでは、ブロックB2、B5、B11)からコピー先フリーブロックB1000に全ての有効データをコピーする。そして、コントローラ4は、ルックアップテーブル33を更新して有効データのLBAそれぞれをコピー先フリーブロックB1000の物理アドレスそれぞれにマッピングする。 The controller 4 manages a free block pool (free block list) 60 including all free blocks. The controller 4 selects one free block from these free blocks. The controller 4 allocates the selected free block as the copy destination free block B1000. The controller 4 copies all valid data from the GC target block (here, blocks B2, B5, and B11) having the same number of GCs to the copy destination free block B1000. Then, the controller 4 updates the lookup table 33 to map each LBA of valid data to each physical address of the copy destination free block B1000.

コピー先フリーブロックB1000のGC回数は、ブロックB2、B5、B11のGC回数(=5)+1に設定される。ブロックB1000は、GC回数=6のGC回数リストに追加される。ブロックB2、B5、B11は、有効データを含まないフリーブロックとなる。フリーブロックとなったブロックB2、B5、B11は、GC回数=5のGC回数リストから破棄される。 The GC count of the copy destination free block B1000 is set to the GC count (=5)+1 of the blocks B2, B5, and B11. The block B1000 is added to the GC count list with the GC count=6. The blocks B2, B5, and B11 are free blocks that do not include valid data. The blocks B2, B5, and B11 that have become free blocks are discarded from the GC count list of GC count=5.

図6は、SSD3に書き込まれる複数種のデータの例を示す。 FIG. 6 shows an example of plural kinds of data written in the SSD 3.

図6では、互いに更新頻度の異なる3種類のデータ(データA、データB、データC)がSSD3に書き込まれる場合が想定されている。SSD3のデータ記憶領域(LBAスペース)は、LBAグループA、B、Cに対応する3つのスペースを含む。 In FIG. 6, it is assumed that three types of data (data A, data B, data C) having different update frequencies are written to the SSD 3. The data storage area (LBA space) of the SSD 3 includes three spaces corresponding to the LBA groups A, B, and C.

LBAグループAに書き込まれるデータAは更新頻度の低いデータであり、且つデータAの量はデータA、B、Cの中で最も多い。つまり、LBAグループAは最も大きいLBA範囲を有する。 The data A written in the LBA group A is data with a low update frequency, and the amount of the data A is the largest among the data A, B, and C. That is, LBA group A has the largest LBA range.

LBAグループCに書き込まれるデータCは、更新頻度の高いデータであり、且つデータCの量はデータA、B、Cの中で最も少ない。つまり、LBAグループCは最も小さいLBA範囲を有する。 The data C written in the LBA group C is data with a high update frequency, and the amount of the data C is the smallest among the data A, B, and C. That is, LBA group C has the smallest LBA range.

LBAグループBに書き込まれるデータBは、データAとデータCの中間の更新頻度を有するデータであり、且つデータBの量はデータAの量とデータCの量の中間である。 The data B written in the LBA group B is data having an update frequency intermediate between the data A and the data C, and the amount of the data B is between the amount of the data A and the amount of the data C.

SSD3の総ユーザ容量に対するデータAの量の割合は、例えば、50%であってもよい。SSD3の総ユーザ容量に対するデータBの量の割合は、例えば、30%であってもよい。SSD3の総ユーザ容量に対するデータCの量の割合は、例えば、20%であってもよい。 The ratio of the amount of data A to the total user capacity of the SSD 3 may be 50%, for example. The ratio of the amount of data B to the total user capacity of the SSD 3 may be 30%, for example. The ratio of the amount of data C to the total user capacity of the SSD 3 may be 20%, for example.

データAの更新頻度つまりLBAグループAへのライトの頻度は、例えば、20%であってもよい。データBの更新頻度つまりLBAグループBへのライトの頻度は、例えば、30%であってもよい。データCの更新頻度つまりLBAグループCへのライトの頻度は、例えば、50%であってもよい。 The update frequency of the data A, that is, the write frequency to the LBA group A may be 20%, for example. The update frequency of the data B, that is, the write frequency to the LBA group B may be 30%, for example. The update frequency of the data C, that is, the write frequency to the LBA group C may be 50%, for example.

この場合、例えば、SSD3がデータA、データB、データCで満たされた後は、2回のライトコマンドに1回の割合で、データC(LBAグループC)へのライトを要求するライトコマンドがホスト2からSSD3に発行され、また5回のライトコマンドに1回の割合で、データA(LBAグループA)へのライトを要求するライトコマンドがホスト2からSSD3に発行される。例えば、データCは、2回のライトコマンドに1回の割合(50%)という高い頻度で更新される。 In this case, for example, after the SSD 3 is filled with the data A, the data B, and the data C, a write command requesting a write to the data C (LBA group C) is issued once every two write commands. A write command is issued from the host 2 to the SSD 3, and once every 5 write commands, a write command requesting a write to the data A (LBA group A) is issued from the host 2 to the SSD 3. For example, the data C is updated at a high frequency of once (50%) for every two write commands.

SSD3に書き込まれるデータが図6のようなデータ局所性を有する場合においては、図6の下部に示すように、各書き込み先ブロックにはデータA、データB、データCが混在される。 When the data written in the SSD 3 has data locality as shown in FIG. 6, as shown in the lower part of FIG. 6, data A, data B, and data C are mixed in each write destination block.

一つの書き込み先ブロックにおいて、ブロックの容量に対するデータCの量の割合は50%、ブロックの容量に対するデータBの量の割合は30%、ブロックの容量に対するデータAの量の割合は20%となる。 In one write destination block, the ratio of the amount of data C to the capacity of the block is 50%, the ratio of the amount of data B to the capacity of the block is 30%, and the ratio of the amount of data A to the capacity of the block is 20%. ..

上述したように、データCの量は、データA、データBよりも少なく、且つデータCの更新頻度は、データA、データBよりも高いので、各ブロック内のデータCのほとんどは速いタイミングで無効化される確率が高い。一方、データAおよびデータBについては、特にデータAについては、長い間、有効状態に維持される確率が高い。 As described above, the amount of the data C is smaller than that of the data A and the data B, and the update frequency of the data C is higher than that of the data A and the data B. Therefore, most of the data C in each block is at a fast timing. High probability of being invalidated. On the other hand, the data A and the data B, especially the data A, have a high probability of being kept in the valid state for a long time.

データCの更新(書き換え)よって無効データ量が増えたブロックそれぞれは、いずれGC対象ブロックとなり、これらブロックからコピー先フリーブロックに有効データがコピーされる。各GC対象ブロックにおいては、データCの多くが無効化され且つデータA、データBの多くが有効データに維持されている確率が高い。このため、コピー先ブロックにおいては、GC対象ブロックに比べてデータAの量とデータBの量とが増え、代わりに、GC対象ブロックに比べてデータCの量が減る。 Each block whose invalid data amount has increased due to the update (rewriting) of the data C becomes a GC target block, and valid data is copied from these blocks to the copy destination free block. In each GC target block, there is a high probability that most of the data C is invalidated and most of the data A and data B are maintained as valid data. Therefore, in the copy destination block, the amount of data A and the amount of data B increase compared to the GC target block, and instead, the amount of data C decreases compared to the GC target block.

本実施形態では、同じGC回数の幾つかのブロック内の有効データがコピー先フリーブロックにコピーされるので、GC回数の少ないブロック内の有効データとGC回数の多いブロック内の有効データとがGC動作によって同じコピー先フリーブロックにコピーされることはない。したがって、GC回数の多いブロックほど、そのブロックの容量に対するデータAの量の割合を増やすことができ、これによってデータA(Coldデータ)を、データC(ホットデータ)から分離することができる。 In the present embodiment, since valid data in some blocks having the same number of GCs is copied to the copy destination free block, valid data in a block having a small number of GCs and valid data in a block having a large number of GCs are GC. The operation does not copy to the same copy destination free block. Therefore, as the number of GC times increases, the ratio of the amount of data A to the capacity of the block can be increased, whereby the data A (Cold data) can be separated from the data C (hot data).

図7は、GC回数と、各ブロック内のデータA,B,C間のデータ量の割合との関係の例を示す。 FIG. 7 shows an example of the relationship between the number of GCs and the ratio of the amount of data among the data A, B, and C in each block.

GC回数=0の各ブロックにおいては、ブロックの容量に対するデータCの量の割合は50%、ブロックの容量に対するデータBの量の割合は30%、ブロックの容量に対するデータAの量の割合は20%である。 In each block with the number of GC=0, the ratio of the amount of data C to the capacity of the block is 50%, the ratio of the amount of data B to the capacity of the block is 30%, and the ratio of the amount of data A to the capacity of the block is 20%. %.

ブロックの容量に対するデータCの量の割合は、1回または2回程度のGC動作によって速く低下される。GC回数が増えるにつれて、ブロックの容量に対するデータBの量の割合も徐々に低下される。 The ratio of the amount of data C to the capacity of the block is quickly reduced by one or two GC operations. As the number of GCs increases, the ratio of the amount of data B to the capacity of the block also gradually decreases.

上述したように、本実施形態では、GC回数の少ないブロック内の有効データとGC回数の多いブロック内の有効データとが同じコピー先フリーブロックにコピーされることはないので、データを含むブロックそれぞれを、(1)ほぼデータAのみを含むグループ(例えばGC回数7〜10程度)、(2)データAとデータBとを含み、且つデータCをほとんど含まないグループ(例えばGC回数3〜6程度)、(3)データAとデータBとデータCを含むグループ(例えばGC回数0〜2程度)に分類できる。 As described above, in the present embodiment, valid data in a block having a small number of GCs and valid data in a block having a large number of GCs are not copied to the same copy-destination free block. (1) A group containing almost only data A (for example, the number of GCs is about 7 to 10), (2) A group including only data A and data B and hardly containing data C (for example, the number of GCs is about 3 to 6). ), (3) It can be classified into a group including the data A, the data B, and the data C (for example, about 0 to 2 times of GC).

換言すれば、本実施形態では、同じGC回数のブロックについては、それらブロックに含まれるデータA、B、Cの量の割合を同じにすることができる。 In other words, in the present embodiment, for blocks having the same GC number of times, the ratios of the amounts of data A, B, and C contained in those blocks can be made the same.

よって、同じGC回数の幾つかのブロック内の有効データを同じコピー先フリーブロックにコピーするという本実施形態の改良されたGC動作は、たとえSSD3に書かれるデータが高いデータ局所性を有する場合であっても、ほぼデータAのみを含むブロックのグループと、データAとデータBとを含み且つデータCをほとんど含まないブロックのグループと、データAとデータBとデータCを含むブロックのグループとを作ることができ、これによってHotデータとColdデータとを徐々に分離することができる。この結果、SSD3のライトアンプリフィケーションの増加を抑制することができる。 Therefore, the improved GC operation of this embodiment of copying the valid data in several blocks with the same number of GC times to the same copy-destination free block is effective even if the data written in SSD3 has high data locality. Even if there are, there are a group of blocks containing almost only data A, a group of blocks containing data A and data B and almost no data C, and a group of blocks containing data A, data B and data C. It is possible to make it possible to gradually separate Hot data and Cold data. As a result, an increase in write amplification of the SSD 3 can be suppressed.

図8のフローチャートは、コントローラ4によって実行されるGC動作の手順を示す。 The flowchart of FIG. 8 shows the procedure of the GC operation executed by the controller 4.

コントローラ4は、残りフリーブロックの数をチェックし(ステップS11)、残りフリーブロックの数が閾値th1以下であるか否かを判定する(ステップS12)。このチェックは、定期的に実行されてもよい。例えば、新たなフリーブロックを書き込み先ブロックとして割り当てるべき時に残りフリーブロックの数をチェックしてもよい。 The controller 4 checks the number of remaining free blocks (step S11), and determines whether the number of remaining free blocks is equal to or less than the threshold th1 (step S12). This check may be performed on a regular basis. For example, the number of remaining free blocks may be checked when a new free block should be assigned as a write destination block.

残りフリーブロックの数が閾値th1以下であるならば(ステップS12のYES)、コントローラ4は、まず、全てのアクティブブロックから最初のGC候補を選択する。最初のGC候補は、最大無効データ量のブロックであってもよい。この場合、全てのアクティブブロックから最大無効データ量のブロックが最初のGC候補として選択される(ステップS13)。コントローラ4は、GC回数管理リスト34を参照して、最初のGC候補(ここでは、例えば、最大無効データ量のブロック)のGC回数と同じGC回数に関連づけられたブロック群(第1ブロック群)を選択し、さらに、この第1ブロック群から、幾つかのGC対象ブロックを選択する(ステップS14)。ステップS14では、最初のGC候補(例えば、最大無効データ量のブロック)が含まれているGC回数リストによって示されるブロック群(第1ブロック群)が選択され、そして第1ブロック群から、幾つかのGC対象ブロックが選択される。この場合、最初のGC候補(例えば、最大無効データ量のブロック)と、このGC回数リストに含まれる別の1以上のブロックとが、GC対象ブロックとして選択されてもよい。 If the number of remaining free blocks is equal to or smaller than the threshold value th1 (YES in step S12), the controller 4 first selects the first GC candidate from all active blocks. The first GC candidate may be the block with the maximum invalid data amount. In this case, the block with the maximum invalid data amount is selected as the first GC candidate from all active blocks (step S13). The controller 4 refers to the GC count management list 34, and a block group (first block group) associated with the same GC count as the GC count of the first GC candidate (here, for example, the block with the maximum invalid data amount). Is selected, and some GC target blocks are selected from the first block group (step S14). In step S14, the block group (first block group) indicated by the GC count list including the first GC candidate (for example, the block having the maximum invalid data amount) is selected, and some of the first block group are selected. GC target block is selected. In this case, the first GC candidate (for example, the block having the maximum invalid data amount) and one or more blocks included in the GC count list may be selected as the GC target block.

コントローラ4は、これら選択されたGC対象ブロック内の全ての有効データをコピー先フリーブロックにコピーする(ステップS15)。ステップS15では、これら選択されたGC対象ブロック内の有効ページそれぞれから有効データがリードされ、リードされた有効データがコピー先フリーブロックの利用可能ページそれぞれに書き込まれる。ステップS15では、さらに、コントローラ4は、ルックアップテーブル(LUT)33を更新して、コピーされた有効データのLBAをコピー先フリーブロックの物理アドレスに関連付けると共に、ページ管理テーブルを更新して、各GC対象ブロック内の元のページ(つまりこのLBAが関連付けられていた古いデータ)を無効化する。この場合、コントローラ4は、まず、ルックアップテーブル(LUT)33を参照することによって、コピーされた有効データが格納されている元のページの物理アドレスを取得してもよく、そして、ページ管理テーブルを更新して、この物理アドレスに対応する有効/無効フラグを無効を示す値に設定してもよい。 The controller 4 copies all the valid data in these selected GC target blocks to the copy destination free block (step S15). In step S15, valid data is read from each valid page in the selected GC target block, and the read valid data is written in each available page of the copy destination free block. In step S15, the controller 4 further updates the lookup table (LUT) 33 to associate the LBA of the copied valid data with the physical address of the copy destination free block, and also updates the page management table to update each The original page in the GC target block (that is, the old data with which this LBA was associated) is invalidated. In this case, the controller 4 may first obtain the physical address of the original page in which the copied valid data is stored by referring to the lookup table (LUT) 33, and then the page management table May be updated and the valid/invalid flag corresponding to this physical address may be set to a value indicating invalid.

この後、コントローラ4は、これら選択されたGC対象ブロックのGC回数+1、つまり第1ブロック群のGC回数に1を加えた値を、コピー先フリーブロックのGC回数として設定する(ステップS16)。 After that, the controller 4 sets the number of GCs of the selected GC target block+1, that is, a value obtained by adding 1 to the number of GCs of the first block group as the number of GCs of the copy destination free block (step S16).

図9は、異なるGC回数を有する2つのブロック群の有効データをマージする処理を含むGC動作を示す。 FIG. 9 shows a GC operation including a process of merging valid data of two block groups having different GC times.

例えば、最大無効データ量のブロックのGC回数と同じGC回数に関連づけられたブロック群(GC対象ブロック群)に含まれる有効データの量が閾値よりも少ない場合、コントローラ4は、異なるGC回数を有する2つのブロック群の有効データをマージする処理を実行する。この場合、コントローラ4は、GC対象ブロック群のGC回数と出来るだけ近いGC回数を有する別の一つのブロック群を選択してもよい。 For example, when the amount of valid data included in the block group (GC target block group) associated with the same GC count as the GC count of the block having the maximum invalid data amount is smaller than the threshold value, the controller 4 has a different GC count. A process of merging valid data of two block groups is executed. In this case, the controller 4 may select another block group having a GC number as close as possible to the GC number of the GC target block group.

例えば、いま、最大無効データ量のブロックがブロックB300であり、ブロックB300のGC回数が10である場合を想定する。この場合、コントローラ4は、GC回数=10のGC回数管理リストに含まれるブロック群の総有効データ量をチェックする。例えば、GC回数=10のGC回数管理リストに含まれるブロックがブロックB300のみである場合、あるいはGC回数=10のGC回数管理リストに2つまたは3つ程度のブロックが含まれているがこれら各々の有効データ量が非常に少ない場合には、コントローラ4は、GC回数=10のブロック群と一緒にGC動作が実行されるべきブロック群を選択する。 For example, it is assumed that the block having the maximum invalid data amount is the block B300 and the number of GCs of the block B300 is 10. In this case, the controller 4 checks the total effective data amount of the block group included in the GC count management list with the GC count=10. For example, when the block included in the GC number management list with the GC number=10 is only the block B300, or the GC number management list with the GC number=10 includes two or three blocks. When the effective data amount of is very small, the controller 4 selects the block group in which the GC operation is to be executed together with the block group with the GC count=10.

この場合、コントローラ4は、最大無効データ量のブロックB300のGC回数よりも1回以上少ないGC回数を有する全てのブロック群(ここでは、GC回数9のブロック群、GC回数8のブロック群、GC回数7のブロック群、…GC回数0のブロック群)の中で、最大のガベージコレクション回数を有するブロック群を選択してもよい。 In this case, the controller 4 has all the block groups having a GC number that is one or more times smaller than the GC number of the block B300 having the maximum invalid data amount (here, a block group having a GC number of 9, a block group having a GC number of 8, The block group having the maximum number of garbage collections may be selected from among the block group having the number of times 7 and the block group having the number of GC times 0).

コントローラ4は、最初にGC回数=9のGC回数管理リストを参照して、GC回数=9のブロックが存在するか否かを判定する。GC回数=9のブロックが存在しないならば、コントローラ4は、GC回数=8のGC回数管理リストを参照して、GC回数=8のブロックが存在するか否かを判定する。 The controller 4 first refers to the GC count management list with the GC count=9 to determine whether or not there is a block with the GC count=9. If the block with the GC count=9 does not exist, the controller 4 refers to the GC count management list with the GC count=8 to determine whether the block with the GC count=8 exists.

GC回数=9のブロックが存在せず、GC回数=8のブロックが存在するならば、コントローラ4は、GC回数=8のブロック群(例えば、ブロックB41、B42、B43)を、選択する。そして、コントローラ4は、ブロックB300の有効データとGC回数=8のブロック群の有効データとをコピー先フリーブロックにコピーする。この場合、ブロックB41、B42、B43の全ての有効データが必ずしも利用される必要は無く、ブロックB41、B42、B43内の少なくとも一つのブロック内の有効データが利用されればよい。 If there is no block with the number of GCs=9 and there is a block with the number of GCs=8, the controller 4 selects a block group with the number of GCs=8 (for example, blocks B41, B42, B43). Then, the controller 4 copies the valid data of the block B300 and the valid data of the block group having the GC count=8 to the copy destination free block. In this case, all the valid data of the blocks B41, B42, B43 do not necessarily have to be used, and the valid data in at least one block of the blocks B41, B42, B43 may be used.

図10のフローチャートは、異なるGC回数を有する2つのブロック群の有効データをマージする処理を含むGC動作の手順を示す。 The flowchart of FIG. 10 shows a procedure of a GC operation including a process of merging valid data of two block groups having different GC times.

コントローラ4は、残りフリーブロックの数をチェックし(ステップS21)、残りフリーブロックの数が閾値th1以下であるか否かを判定する(ステップS22)。上述したように、このチェックは、定期的に実行されてもよい。 The controller 4 checks the number of remaining free blocks (step S21), and determines whether the number of remaining free blocks is equal to or less than the threshold th1 (step S22). As mentioned above, this check may be performed on a regular basis.

残りフリーブロックの数が閾値th1以下であるならば(ステップS22のYES)、コントローラ4は、まず、全てのアクティブブロックから最初のGC候補を選択する。最初のGC候補は、最大無効データ量のブロックであってもよい。この場合、全てのアクティブブロックから最大無効データ量のブロックが最初のGC候補として選択される(ステップS23)。コントローラ4は、GC回数管理リスト34を参照して、最初のGC候補(ここでは、例えば、最大無効データ量のブロック)のGC回数と同じGC回数に関連づけられたブロック群(第1ブロック群)を選択し、このブロック群(第1ブロック群)の有効データの総量が閾値th2以下であるか否かを判定する(ステップS24)。 If the number of remaining free blocks is equal to or smaller than the threshold value th1 (YES in step S22), the controller 4 first selects the first GC candidate from all active blocks. The first GC candidate may be the block with the maximum invalid data amount. In this case, the block having the maximum invalid data amount is selected as the first GC candidate from all active blocks (step S23). The controller 4 refers to the GC count management list 34, and a block group (first block group) associated with the same GC count as the GC count of the first GC candidate (here, for example, the block with the maximum invalid data amount). Is selected, and it is determined whether or not the total amount of valid data of this block group (first block group) is less than or equal to the threshold value th2 (step S24).

閾値th2の値は、固定であっても良いし、必要に応じて変更できる値であっても良い。閾値th2の値が大きいほど、上述のマージ処理の実行が許可されやすくなる。 The value of the threshold value th2 may be fixed or may be a value that can be changed as necessary. The larger the threshold value th2, the easier the permission to execute the above-described merge process.

例えば、閾値th2は、SSD3内の一つのブロックの容量を示す値に予め設定されていてもよい。これにより、最初のGC候補のGC回数と同じGC回数に関連づけられたブロック群のみでGC動作が実行できない場合にのみ、マージ処理の実行を許可することができる。あるいは、閾値th2は、SSD3内の1つのブロックの容量の整数倍、例えば2倍の値に設定されていても良い。 For example, the threshold th2 may be preset to a value indicating the capacity of one block in the SSD3. As a result, the merge process can be permitted only when the GC operation cannot be executed only by the block group associated with the same GC count as the GC count of the first GC candidate. Alternatively, the threshold value th2 may be set to a value that is an integral multiple of the capacity of one block in the SSD 3, for example, double.

この第1ブロック群の有効データの総量が閾値th2以下でないならば(ステップS24のNO)、コントローラ4は、この第1ブロック群から、幾つかのGC対象ブロックを選択する(ステップS25)。ステップS25では、最初のGC候補(例えば、最大無効データ量のブロック)が含まれているGC回数リストによって示される第1ブロック群から、これらGC対象ブロックが選択される。この場合、最初のGC候補(例えば、最大無効データ量のブロック)と、このGC回数リストに含まれる別のブロックとが、GC対象ブロックとして選択されてもよい。 If the total amount of valid data in the first block group is not equal to or smaller than the threshold value th2 (NO in step S24), the controller 4 selects some GC target blocks from the first block group (step S25). In step S25, these GC target blocks are selected from the first block group indicated by the GC count list including the first GC candidate (for example, the block having the maximum invalid data amount). In this case, the first GC candidate (for example, the block with the maximum invalid data amount) and another block included in the GC count list may be selected as the GC target block.

ステップS25では、コントローラ4は、これら選択されたGC対象ブロック内の全ての有効データをコピー先フリーブロックにコピーする。ステップS25では、さらに、コントローラ4は、ルックアップテーブル(LUT)33を更新して、コピーされた有効データのLBAをコピー先フリーブロックの物理アドレスに関連付けると共に、各GC対象ブロック内の元のページを無効化する。 In step S25, the controller 4 copies all the valid data in the selected GC target block to the copy destination free block. In step S25, the controller 4 further updates the lookup table (LUT) 33 to associate the LBA of the copied valid data with the physical address of the copy-destination free block, and also to update the original page in each GC target block. Invalidate.

この後、コントローラ4は、これら選択されたGC対象ブロックのGC回数+1を、つまり第1ブロック群のGC回数に1を加えた値を、コピー先フリーブロックのGC回数として設定する(ステップS26)。 Thereafter, the controller 4 sets the number of GCs of the selected GC target block+1, that is, a value obtained by adding 1 to the number of GCs of the first block group as the number of GCs of the copy destination free block (step S26). ..

一方、第1ブロック群の有効データの総量が閾値th2以下であるならば(ステップS24のYES)、コントローラ4は、この第1ブロック群のGC回数よりも1回以上少ないGC回数に関連づけられた全てのブロック群の中で、最大GC回数に関連づけられたブロック群(第2ブロック群)を選択する(ステップS27)。 On the other hand, if the total amount of valid data in the first block group is less than or equal to the threshold value th2 (YES in step S24), the controller 4 is associated with the GC number that is one or more times less than the GC number in the first block group. Among all the block groups, a block group (second block group) associated with the maximum GC number is selected (step S27).

コントローラ4は、第1ブロック群の有効データと第2ブロック群の有効データとをコピー先フリーブロックにコピーする(ステップS28)。ステップS28では、さらに、コントローラ4は、ルックアップテーブル(LUT)33を更新して、コピーされた有効データのLBAをコピー先フリーブロックの物理アドレスに関連付けると共に、各GC対象ブロック内の元のページを無効化する。 The controller 4 copies the valid data of the first block group and the valid data of the second block group to the copy destination free block (step S28). In step S28, the controller 4 further updates the look-up table (LUT) 33 to associate the LBA of the copied valid data with the physical address of the copy-destination free block, and also to update the original page in each GC target block. Invalidate.

コントローラ4は、第2ブロック群のGC回数+1をコピー先フリーブロックのGC回数として設定するか、あるいは第1ブロック群のGC回数+1をコピー先フリーブロックのGC回数として設定する(ステップS29)。あるいは、第1ブロック群内のGC対象ブロックの数よりも第2ブロック群内のGC対象ブロックの数が多い場合には、第2ブロック群のGC回数+1をコピー先フリーブロックのGC回数として設定してもよく、第1ブロック群内のGC対象ブロックの数が第2ブロック群内のGC対象ブロックの数よりも多い場合には、第1ブロック群のGC回数+1をコピー先フリーブロックのGC回数として設定してもよい。 The controller 4 sets the GC count of the second block group+1 as the GC count of the copy destination free block, or sets the GC count of the first block group+1 as the GC count of the copy destination free block (step S29). Alternatively, when the number of GC target blocks in the second block group is larger than the number of GC target blocks in the first block group, the GC count of the second block group+1 is set as the GC count of the copy destination free block. Alternatively, if the number of GC target blocks in the first block group is larger than the number of GC target blocks in the second block group, the number of GCs in the first block group+1 is the GC of the copy destination free block. It may be set as the number of times.

図11は、マージ処理を特定のGC回数以上のブロック群に対してのみ許可する動作を示す。 FIG. 11 shows an operation of permitting the merge process only to a block group having a specific GC count or more.

GC回数の多いブロック内に含まれている有効データは、更新頻度の低いデータ(データA)である可能性が高い。しかし、データAも20%の割合で書き替えられるので、GC回数の多いブロック、例えばGC回数=10のブロック、についても、その無効データ量が多くなる場合がある。GC回数の多いブロック内の有効データは、これまで一度も更新(書き替え)されたことのないデータ、つまり、長い間、有効状態に維持されているデータである。このため、この有効データは、これからも更新されない確率が高い。 The valid data included in the block with a large number of GCs is highly likely to be data with a low update frequency (data A). However, since the data A is also rewritten at a rate of 20%, the invalid data amount may be large even for a block having a large number of GCs, for example, a block having a GC number=10. The valid data in a block with a large number of GCs is data that has never been updated (rewritten), that is, data that has been kept in a valid state for a long time. Therefore, there is a high probability that this valid data will not be updated in the future.

一方、GC回数の少ないブロックにおいては、データBまたはデータCが含まれている可能性が高い。このようなブロックについては、そのブロックのGC動作をすぐに実行せずとも、時管理経過に伴ってブロック内の全てのデータが無効化される可能性がある。 On the other hand, it is highly possible that data B or data C is included in a block with a small number of GCs. For such a block, there is a possibility that all the data in the block may be invalidated as time management progresses without immediately executing the GC operation of the block.

したがって、マージ処理を許可するブロック群をマージ許可閾値th3以上のGC回数を有するブロック群に対してのみに許可することにより、無駄なコピーの発生を防ぐことができ、GCの効率を高めることができる。 Therefore, by permitting the block group for which the merge processing is permitted only to the block group having the GC number of times equal to or larger than the merge permission threshold th3, it is possible to prevent the unnecessary copying from occurring and improve the efficiency of the GC. it can.

図11では、マージ許可閾値th3がGC回数=8に設定されている場合が例示されている。 FIG. 11 exemplifies a case where the merge permission threshold th3 is set to the number of GCs=8.

この場合、最初のGC候補のGC回数と同じGC回数に関連づけられたブロック群(第1ブロック群)のGC回数が8以上であるならば、第1ブロック群と他のブロック群とのマージ処理が許可される。 In this case, if the number of GCs of the block group (first block group) associated with the same number of GCs as the first GC candidate is 8 or more, the merging process of the first block group and another block group is performed. Is allowed.

例えば、GC回数=10のブロック群と他のブロック群とのマージ処理、およびGC回数=9のブロック群と他のブロック群とのマージ処理が、許可される。一方、例えば、GC回数=7のブロック群と他のブロック群とのマージ処理は禁止される。 For example, a merge process of a block group with a GC count of 10 and another block group, and a merge process of a block group with a GC count of 9 and another block group are permitted. On the other hand, for example, the merge process of the block group having the number of GC=7 and another block group is prohibited.

図12のフローチャートは、マージ処理を特定のGC回数以上のブロック群に対してのみ許可する動作を含むGC動作の手順を示す。 The flowchart of FIG. 12 shows the procedure of the GC operation including the operation of permitting the merge process only to a block group having a specific GC number of times or more.

この図12のフローチャートに示されるGC動作においては、図10で説明した処理に加え、ステップS30〜S33の処理が追加されている。以下では、ステップS30〜S33の処理を主に説明する。 In the GC operation shown in the flowchart of FIG. 12, the processes of steps S30 to S33 are added to the process described in FIG. Below, the process of step S30-S33 is mainly demonstrated.

第1ブロック群の有効データの総量が閾値th2以下であるならば(ステップS24のYES)、コントローラ4の処理は、ステップS30に進む。ステップS30において、コントローラ4は、第1ブロック群のGC回数がマージ許可閾値th3以上であるか否かを判定する。 If the total amount of valid data in the first block group is equal to or smaller than the threshold value th2 (YES in step S24), the process of the controller 4 proceeds to step S30. In step S30, the controller 4 determines whether the number of GCs in the first block group is the merge permission threshold th3 or more.

第1ブロック群のGC回数がマージ許可閾値th3以上であるならば(ステップS30のYES)、コントローラ4は、図10で説明したステップS27〜S29のマージ処理を実行する。 If the GC count of the first block group is equal to or greater than the merge permission threshold th3 (YES in step S30), the controller 4 executes the merge process of steps S27 to S29 described in FIG.

一方、第1ブロック群のGC回数(最初のGC候補のブロックのGC回数)がマージ許可閾値th3よりも少ないならば(ステップS30のNO)、コントローラ4は、ステップS27〜S29のマージ処理の実行を禁止し、代わりに、ステップS31〜S33の処理を実行する。 On the other hand, if the number of GCs of the first block group (the number of GCs of the first GC candidate block) is smaller than the merge permission threshold th3 (NO in step S30), the controller 4 executes the merge process in steps S27 to S29. Is prohibited, and instead, the processes of steps S31 to S33 are executed.

ステップS31において、コントローラ4は、第1ブロック群とは異なる別のブロック群をGC対象ブロック群として選択する。例えば、コントローラ4は、最初のGC候補のブロックの次に無効データ量が多いブロックを新たなGC候補として選択し、この新たなGC候補が含まれているGC回数リストによって示されるブロック群をGC対象ブロック群として選択してもよい。 In step S31, the controller 4 selects another block group different from the first block group as the GC target block group. For example, the controller 4 selects, as a new GC candidate, a block having the second largest amount of invalid data after the first GC candidate block, and the block group indicated by the GC count list including this new GC candidate is set to GC. You may select as a target block group.

次いで、コントローラ4は、選択されたGC対象ブロック群の有効データをコピー先フリーブロックにコピーし(ステップS32)、コピー先フリーブロックのGC回数を、GC対象ブロック群のGC回数に1を加えた値に設定する(ステップS33)。 Next, the controller 4 copies the valid data of the selected GC target block group to the copy destination free block (step S32) and adds 1 to the GC count of the copy target free block. The value is set (step S33).

最初のGC候補のブロックが、マージ許可閾値th3よりも少ないGC回数に関連付けられている場合には、この最初のGC候補のブロックは、頻繁に更新されるデータを含んでいる可能性が高い。このため、コントローラ4は、最初のGC候補のブロックに対するGCを実行せずに、このブロックの有効データが全て無効化されるまで待っても良い。 If the first GC candidate block is associated with a GC count that is less than the merge allowance threshold th3, then this first GC candidate block is likely to contain frequently updated data. Therefore, the controller 4 may wait for all the valid data of this block to be invalidated without executing the GC for the first GC candidate block.

次に、図13〜図22を参照して、「LBAベースの更新頻度通知機能」の詳細を説明する。 Next, details of the “LBA-based update frequency notification function” will be described with reference to FIGS. 13 to 22.

図13は、フリーブロックをホスト2からのデータの書き込み用に順次割り当てる動作を示す。 FIG. 13 shows an operation of sequentially allocating free blocks for writing data from the host 2.

コントローラ4は、フリーブロックリスト60によって示されるフリーブロックの一つを書き込み先ブロック62として割り当てる。この場合、コントローラ4は、ブロック使用順序管理リスト35を更新して、書き込み先ブロック62として最初に割り当てられたブロックの割り当て番号(シーケンシャル番号)を1に設定する。ブロック使用順序管理リスト35は、図14に示されているように、ブロックアドレスそれぞれに対応する割り当て番号(シーケンシャル番号)を保持する。これら割り当て番号は、書き込み先ブロック62に割り当てられたブロックの順序関係を示す。つまり、コントローラ4は、書き込み対象ブロックとして割り当てられたブロックそれぞれに対してその割り当て順序を示す割り当て番号を付与し、これら割り当て番号をブロック使用順序管理リスト35を使用して管理する。 The controller 4 assigns one of the free blocks indicated by the free block list 60 as the write destination block 62. In this case, the controller 4 updates the block usage order management list 35 and sets the allocation number (sequential number) of the block initially allocated as the write destination block 62 to 1. As shown in FIG. 14, the block use order management list 35 holds allocation numbers (sequential numbers) corresponding to the block addresses. These allocation numbers indicate the order relation of the blocks allocated to the write destination block 62. That is, the controller 4 assigns an allocation number indicating the allocation order to each block allocated as the write target block, and manages these allocation numbers using the block use order management list 35.

コントローラ4は、ホスト2から受信されるライトデータをライトバッファ31に書き込む。この後、コントローラ4は、ルックアップテーブル(LUT)33を更新しながら、ライトバッファ31内のライトデータを書き込み先ブロック62の先頭ページから最終ページに向けて順次ライトする。 The controller 4 writes the write data received from the host 2 in the write buffer 31. After that, the controller 4 sequentially writes the write data in the write buffer 31 from the first page to the last page of the write destination block 62 while updating the look-up table (LUT) 33.

書き込み先ブロック62に利用可能ページが無くなったならば、コントローラ4は、書き込み先ブロック62をアクティブブロックリスト61に移動し、フリーブロックリスト60のフリーブロックを新たな書き込み先ブロック62として割り当てる。この場合、コントローラ4は、ブロック使用順序管理リスト35を更新して、この新たな書き込み先ブロック62として割り当てられたこのブロックの割り当て番号(シーケンシャル番号)を2に設定する。 When there are no available pages in the write destination block 62, the controller 4 moves the write destination block 62 to the active block list 61 and allocates the free block in the free block list 60 as a new write destination block 62. In this case, the controller 4 updates the block use order management list 35 and sets the allocation number (sequential number) of this block allocated as the new write destination block 62 to 2.

アクティブブロックリスト61内の何れかのブロックの全てのデータがその更新によって無効化されたならば、このブロックはフリーブロックリスト60に移動される。 If all the data in any block in the active block list 61 is invalidated by the update, this block is moved to the free block list 60.

フリーブロックリスト60内のフリーブロックの数が閾値th1以下に低下したならば、フリーブロックを作り出す上述のGC動作が実行される。 If the number of free blocks in the free block list 60 drops below the threshold th1, then the above-described GC operation of creating free blocks is performed.

図15は、同じLBAへのライトが要求された時に実行される累積データ書き込み量算出動作を示す。 FIG. 15 shows a cumulative data write amount calculation operation executed when a write request to the same LBA is requested.

コントローラ4は、ホスト2からあるLBAを含むライトコマンドを受信した際に、このLBAへの前回のライトからの累積データ書き込み量を、このライトコマンドに対する応答としてホスト2に通知する。累積データ書き込み量は、受信されたライトコマンドのLBAと同じLBAへの前回のライトからライトコマンドのLBAへの今回のライトまでの間にホスト2によってNANDメモリ5に書き込まれたデータの総量を示す。 When the controller 4 receives a write command including a certain LBA from the host 2, the controller 4 notifies the host 2 of the accumulated data write amount from the previous write to this LBA as a response to this write command. The cumulative data write amount indicates the total amount of data written to the NAND memory 5 by the host 2 from the previous write to the same LBA as the received write command to the current write to the write command LBA. ..

累積データ書き込み量は、例えば、次の値から算出することができる。 The cumulative data write amount can be calculated, for example, from the following values.

(1)ブロック当たりの容量
(2)ブロック内に含まれるページの数
(3)同じLBAへの前回のライトによってデータが書き込まれたNANDメモリ5内の第1物理記憶位置(旧物理アドレス)
(4)今回のライトによってデータが書き込まれるべきNANDメモリ5内の第2物理記憶位置(新物理アドレス)
(5)第1物理記憶位置(旧物理アドレス)を含むブロックの割り当てから第2物理記憶位置(新物理アドレス)を含むブロックの割り当てまでの間にホスト2からのデータの書き込みのために割り当てられたブロックの数
(1)〜(4)の値は、SSD3内の通常の管理情報であり、累積データ書き込み量の算出のために専用に用意されたものではない。例えば、コントローラ4は、ルックアップテーブル(LUT)33を参照することによって、受信されたライトコマンド内のLBAにマッピングされている物理アドレスを第1物理記憶位置として容易に取得することができる。
(1) Capacity per block (2) Number of pages contained in the block (3) First physical storage position (old physical address) in the NAND memory 5 in which data was written by the previous write to the same LBA
(4) Second physical storage position (new physical address) in the NAND memory 5 in which data should be written by this write
(5) Allocated for writing data from the host 2 between the allocation of the block containing the first physical storage location (old physical address) and the allocation of the block containing the second physical storage location (new physical address) The number of blocks (1) to (4) is normal management information in the SSD 3, and is not prepared exclusively for calculating the cumulative data write amount. For example, the controller 4 can easily obtain the physical address mapped to the LBA in the received write command as the first physical storage location by referring to the lookup table (LUT) 33.

(5)の「ブロックの数」は、例えば、第1物理記憶位置を含むブロックに付与された割り当て番号と第2物理記憶位置を含むブロックに付与された割り当て番号とから容易に算出することができる。 The “number of blocks” in (5) can be easily calculated, for example, from the allocation number given to the block containing the first physical storage location and the allocation number given to the block containing the second physical storage location. it can.

割り当て番号(シーケンシャル番号)は、図14のブロック使用順序管理リスト35によって管理されている。これら割り当て番号(シーケンシャル番号)の管理単位は、ブロック単位であるので、これら割り当て番号を保持するために必要な容量は少なくて済む。したがって、累積データ書き込み量は、その算出のための専用の管理情報をほとんど使用すること無く、低コストで取得することができる。 The allocation number (sequential number) is managed by the block usage order management list 35 of FIG. Since the management unit of these allocation numbers (sequential numbers) is a block unit, the capacity required to hold these allocation numbers can be small. Therefore, the cumulative data write amount can be acquired at low cost with almost no use of dedicated management information for the calculation.

図15では、LBA10を含むライトコマンドが受信された時に実行される累積データ書き込み量算出動作を示している。 FIG. 15 shows the cumulative data write amount calculation operation executed when a write command including the LBA 10 is received.

ここでは、LBA10への前回のライトによってデータがブロックB51のページPxに既に書き込まれており、且つLBA10への今回のライトによってデータが現在の書き込み先ブロックB62のページPyに書き込まれるべき場合が想定されている。もしブロックB51の割り当て番号が10で、ブロックB51の割り当て番号が13であれば、ブロック51とブロックB62との間に2つの書き込み先ブロック(例えばブロックB52、B61)が割り当てられていたことが分かる。 Here, it is assumed that data has already been written to page Px of block B51 by the previous write to LBA10, and that data should be written to page Py of the current write destination block B62 by this write to LBA10. Has been done. If the allocation number of the block B51 is 10 and the allocation number of the block B51 is 13, it can be seen that two write destination blocks (for example, the blocks B52 and B61) are allocated between the block 51 and the block B62. ..

累積データ書き込み量は、d1+d2+d2+d3で与えられる。 The cumulative data write amount is given by d1+d2+d2+d3.

ここで、d1は、ページPxに後続するブロックB51内のページの数、またはこれらページの数に対応する容量を示す。d2は、一つのブロック内のページの数、または一つのブロックの容量を示す。d3は、ページPyに先行するブロックB62内のページの数、またはこのページの数に対応する容量を示す。 Here, d1 indicates the number of pages in the block B51 subsequent to the page Px, or the capacity corresponding to the number of these pages. d2 indicates the number of pages in one block or the capacity of one block. d3 indicates the number of pages in the block B62 preceding the page Py, or the capacity corresponding to the number of pages.

LBA10を含む前回のライトコマンドの受信からLBA10を含む今回のライトコマンドの受信までの間にホスト2から受信されるライトコマンドの数が多いほど、累積データ書き込み量は増加する。したがって、上述の累積データ書き込み量は、LBA10によって指定されるデータの更新頻度、つまりLBA10へのライトの頻度を表すことができる。 The accumulated write amount increases as the number of write commands received from the host 2 increases from the reception of the previous write command including the LBA 10 to the reception of the current write command including the LBA 10. Therefore, the above-mentioned cumulative data write amount can represent the update frequency of the data designated by the LBA 10, that is, the write frequency to the LBA 10.

ライトコマンドの受信時に、コントローラ4は、以下の手順で累積データ書き込み量を取得(算出)してもよい。 Upon receiving the write command, the controller 4 may acquire (calculate) the cumulative data write amount by the following procedure.

まず、コントローラ4は、ルックアップテーブル(LUT)33を参照してライトコマンドに含まれるLBA(ここではLBA10)にマッピングされている旧物理アドレス(ここではPA1)を取得する。そして、コントローラ4は、ブロック使用順序管理リスト35を参照して、旧物理アドレスによって指定されるブロックの割り当て番号(ここでは10)と、新物理アドレス(ここではPA2)によって指定されるブロックの割り当て番号(ここでは13)とを取得する。コントローラ4は、ブロック内に含まれるページの数と旧物理アドレス(PA1)とからd1を求め、ブロック内に含まれるページの数と新物理アドレス(PA2)とからd3を求める。さらに、コントローラ4は、割り当て番号(13)と割り当て番号(10)との間の差分から、旧物理アドレスによって指定されるブロックの割り当てから新物理アドレスによって指定されるブロックの割り当てまでの間に、書き込み先ブロックとして割り当てられたブロックの総数(ここでは、2)を求める。これにより、累積データ書き込み量(=d1+d2+d2+d3)を取得(算出)することができる。 First, the controller 4 refers to the look-up table (LUT) 33 to obtain the old physical address (here, PA1) mapped to the LBA (here, LBA10) included in the write command. Then, the controller 4 refers to the block use order management list 35, and allocates a block allocation number (here, 10) specified by the old physical address and a block specified by the new physical address (here, PA2). The number (13 here) is acquired. The controller 4 obtains d1 from the number of pages included in the block and the old physical address (PA1), and obtains d3 from the number of pages included in the block and the new physical address (PA2). Further, the controller 4 determines, from the difference between the allocation number (13) and the allocation number (10), from the allocation of the block specified by the old physical address to the allocation of the block specified by the new physical address. The total number of blocks (here, 2) assigned as the write destination block is obtained. This makes it possible to acquire (calculate) the cumulative data write amount (=d1+d2+d2+d3).

図16は、累積データ書き込み量応答処理の処理シーケンスを示す。 FIG. 16 shows a processing sequence of cumulative data write amount response processing.

ここでは、この処理シーケンスが、ライトコマンドとライトデータとが分割されているNCQ(Native Command Queing)システムに適用される場合を想定する。 Here, it is assumed that this processing sequence is applied to an NCQ (Native Command Queuing) system in which a write command and write data are divided.

ホスト2は、あるLBA(=LBAx)を示す開始LBAを含むライトコマンドをSSD3に送出する。このライトコマンドの受信に応答して、SSD3のコントローラ4は、LBAxへの前回のライトからLBAxへの今回のライトまでの累積データ書き込み量を算出し(ステップS41)、算出された累積データ書き込み量を含むコマンド許可応答をホスト2に送信する。コマンド許可応答は、受信されたライトコマンドに対するアクノリッジ(ライトコマンドの実行許可)を示す許可応答である。SSD3からホスト2に許可応答が送信されることにより、このライトコマンドによって指定されるライトデータの転送が開始される。許可応答は、実行を許可すべきライトコマンドを識別する値を含んでいても良い。累積データ書き込み量は、例えば、バイトで表されてもよいし、論理ブロック(論理セクタ)の数によって表されてもよい。 The host 2 sends a write command including a start LBA indicating a certain LBA (=LBAx) to the SSD 3. In response to the reception of this write command, the controller 4 of the SSD 3 calculates the cumulative data write amount from the previous write to LBAx to the current write to LBAx (step S41), and calculates the calculated cumulative data write amount. A command authorization response including "" is transmitted to the host 2. The command permission response is a permission response indicating an acknowledgment (write command execution permission) for the received write command. By transmitting a permission response from the SSD 3 to the host 2, the transfer of the write data designated by this write command is started. The permission response may include a value that identifies a write command whose execution should be permitted. The cumulative data write amount may be represented by, for example, bytes or the number of logical blocks (logical sectors).

コマンド許可応答の受信に応答して、ホスト2は、ライトデータをSSD3に送出する。SSD3のコントローラ4は、ライトデータをライトバッファ31に書き込み、ライトバッファ31のライトデータを書き込み先ブロックに書き込み(ステップS42)、コマンド完了の応答(レスポンス)をホスト2に送信する。なお、ライトデータをライトバッファ31に書き込んだ時点でコマンド完了のレスポンスをホスト2に送信してもよい。 In response to the reception of the command permission response, the host 2 sends the write data to the SSD 3. The controller 4 of the SSD 3 writes the write data to the write buffer 31, writes the write data of the write buffer 31 to the write destination block (step S42), and sends a command completion response (response) to the host 2. A command completion response may be transmitted to the host 2 when the write data is written in the write buffer 31.

ホスト2は、SSD3から受信されるコマンド許可応答に含まれる累積データ書き込み量に基づいて、LBAxのデータの実際の更新頻度(LBAxへのライトの頻度)を把握することができる。 The host 2 can grasp the actual update frequency of the data of LBAx (the frequency of writing to LBAx) based on the cumulative data write amount included in the command permission response received from the SSD 3.

もしLBAxのデータの実際の更新頻度が、ホスト2によって予期されていたLBAxのデータの更新頻度と異なるならば、例えば、LBAxのデータの実際の更新頻度がホスト2によって予期されていたLBAxのデータの更新頻度よりも高いならば、ホスト2は、必要に応じて、送出したライトコマンドをアボートするためのアボートコマンドをSSD3に送出してもよい。この場合、ライトコマンドによって指定されたデータの書き込みは実行されない。 If the actual update frequency of the LBAx data is different from the expected update frequency of the LBAx data by the host 2, for example, the actual update frequency of the LBAx data is the LBAx data expected by the host 2. If the update frequency is higher than the update frequency, the host 2 may send an abort command for aborting the sent write command to the SSD 3, if necessary. In this case, the writing of the data designated by the write command is not executed.

図17のフローチャートは、コントローラ4によって実行される累積データ書き込み量応答処理の手順を示す。 The flowchart of FIG. 17 shows the procedure of the cumulative data write amount response process executed by the controller 4.

コントローラ4は、LBAxを開始LBAとして含むライトコマンドをホスト2から受信する(ステップS51)。コントローラ4は、LBAxにマッピングされている旧物理アドレスと、LBAxにマッピングされるべき新物理アドレスと、旧物理アドレスによって指定される物理記憶位置を含むブロックに付与された割り当て番号と、新物理アドレスによって指定される物理記憶位置を含むブロック(現在の書き込み先ブロック)に付与された割り当て番号、等とに基づいて、LBAxへの前回の書き込みからLBAxへの今回の書き込みまでの累積データ書き込み量を算出する(ステップS52)。コントローラ4は、累積データ書き込み量を含む許可応答をホスト2へ返す(ステップS53)。 The controller 4 receives a write command including LBAx as a start LBA from the host 2 (step S51). The controller 4 uses the old physical address mapped to LBAx, the new physical address to be mapped to LBAx, the allocation number assigned to the block including the physical storage location specified by the old physical address, and the new physical address. The cumulative data write amount from the previous write to LBAx to the current write to LBAx based on the allocation number assigned to the block (current write destination block) including the physical storage location specified by Calculate (step S52). The controller 4 returns a permission response including the accumulated data write amount to the host 2 (step S53).

コントローラ4は、このライトコマンドに対応するライトデータまたはこのライトコマンドをアボートするためのアボートコマンドのいずれがホスト2から受信されるかを判定する(ステップS54)。 The controller 4 determines whether the write data corresponding to this write command or the abort command for aborting this write command is received from the host 2 (step S54).

もしライトデータが受信されたならば、コントローラ4は、ステップS55に進む。ステップS55では、コントローラ4は、このライトデータをライトバッファ31に書き込み、ライトバッファ31内のライトデータを現在の書き込み先ブロックに書き込み、ルックアップテーブル(LUT)33を更新してLBAxに新物理アドレスをマッピングし、そしてページ管理テーブルを更新して旧物理アドレス(旧データ)を無効化する。 If the write data is received, the controller 4 proceeds to step S55. In step S55, the controller 4 writes this write data in the write buffer 31, writes the write data in the write buffer 31 in the current write destination block, updates the lookup table (LUT) 33, and updates the LBAx with the new physical address. And the page management table is updated to invalidate the old physical address (old data).

この後、コントローラ4は、コマンド完了のレスポンスをホスト2へ返す(ステップS56)。 After that, the controller 4 returns a command completion response to the host 2 (step S56).

なお、上述したように、ライトデータをライトバッファ31に書き込んだ時点でコマンド完了のレスポンスをホスト2に送信してもよい。 As described above, the command completion response may be transmitted to the host 2 when the write data is written in the write buffer 31.

一方、アボートコマンドが受信されたならば、コントローラ4は、このライトコマンドを破棄する(ステップS57)。 On the other hand, if the abort command is received, the controller 4 discards this write command (step S57).

図18は、累積データ書き込み量応答処理の別の処理シーケンスを示す。 FIG. 18 shows another processing sequence of the cumulative data write amount response processing.

ホスト2は、あるLBA(=LBAx)を開始LBAとして含むライトコマンドをSSD3に送出する。このライトコマンドの受信に応答して、SSD3のコントローラ4は、コマンド許可応答をホスト2に送信する。コマンド許可応答の受信に応答して、ホスト2は、ライトデータをSSD3に送出する。ライトデータはライトバッファ31に書き込まれる。SSD3のコントローラ4は、累積データ書き込み量を算出する(ステップS58)。累積データ書き込み量を算出する処理は、ライトコマンドの受信に応答して開始しても良い。 The host 2 sends a write command including a certain LBA (=LBAx) as a start LBA to the SSD 3. In response to the reception of this write command, the controller 4 of the SSD 3 sends a command permission response to the host 2. In response to the reception of the command permission response, the host 2 sends the write data to the SSD 3. The write data is written in the write buffer 31. The controller 4 of the SSD 3 calculates the cumulative data write amount (step S58). The process of calculating the cumulative data write amount may be started in response to the reception of the write command.

この後、コントローラ4は、書き込み先ブロックへのライトデータの書き込みを実行し(ステップS59)、算出された累積データ書き込み量を含む、コマンド完了のレスポンスをホスト2に送信する。 After that, the controller 4 executes writing of write data to the write destination block (step S59), and transmits a command completion response including the calculated cumulative data write amount to the host 2.

なお、上述したように、ライトデータがライトバッファ31に書き込まれた時点で、累積データ書き込み量を含むコマンド完了のレスポンスをホスト2に送信してもよい。 As described above, when the write data is written in the write buffer 31, a command completion response including the accumulated data write amount may be transmitted to the host 2.

図19のフローチャートは、累積データ書き込み量応答処理の別の手順を示す。 The flowchart of FIG. 19 shows another procedure of the cumulative data write amount response process.

コントローラ4は、LBAxを開始LBAとして含むライトコマンドをホスト2から受信する(ステップS61)。コントローラ4は、許可応答をホスト2へ返す(ステップS62)。コントローラ4は、ライトデータをホスト2から受信する(ステップS63)。ライトデータはライトバッファ31に書き込まれる。 The controller 4 receives a write command including LBAx as a start LBA from the host 2 (step S61). The controller 4 returns a permission response to the host 2 (step S62). The controller 4 receives the write data from the host 2 (step S63). The write data is written in the write buffer 31.

コントローラ4は、LBAxにマッピングされている旧物理アドレスと、LBAxにマッピングされるべき新物理アドレスと、旧物理アドレスによって指定される物理記憶位置を含むブロックに付与された割り当て番号と、新物理アドレスによって指定される物理記憶位置を含むブロック(現在の書き込み先ブロック)に付与された割り当て番号等に基づいて、LBAxへの前回の書き込みからLBAxへの今回の書き込みまでの累積データ書き込み量を算出する(ステップS64)。コントローラ4は、ステップS65に進む。 The controller 4 uses the old physical address mapped to LBAx, the new physical address to be mapped to LBAx, the allocation number assigned to the block including the physical storage location specified by the old physical address, and the new physical address. The cumulative data write amount from the previous write to LBAx to the current write to LBAx is calculated based on the allocation number assigned to the block (current write destination block) including the physical storage location specified by (Step S64). The controller 4 proceeds to step S65.

ステップS65では、コントローラ4は、ライトバッファ31内のライトデータを現在の書き込み先ブロックに書き込み、ルックアップテーブル(LUT)33を更新してLBAxに新物理アドレスをマッピングし、そしてページ管理テーブルを更新して旧物理アドレス(旧データ)を無効化する。 In step S65, the controller 4 writes the write data in the write buffer 31 to the current write destination block, updates the lookup table (LUT) 33 to map the new physical address to LBAx, and updates the page management table. Then, the old physical address (old data) is invalidated.

この後、コントローラ4は、累積データ書き込み量を含む、コマンド完了のレスポンスをホスト2へ返す(ステップS66)。 After that, the controller 4 returns a command completion response including the accumulated data write amount to the host 2 (step S66).

なお、上述したように、ライトデータをライトバッファ31に書き込んだ時点でコマンド完了のレスポンスをホスト2に送信してもよい。 As described above, the command completion response may be transmitted to the host 2 when the write data is written in the write buffer 31.

次に、図20〜図23を参照して、累積データ書き込み量の代わりに、同じLBAへの前回のライトからの時間経過値をホスト2に通知する処理について説明する。 Next, with reference to FIGS. 20 to 23, a process of notifying the host 2 of the elapsed time value from the previous write to the same LBA instead of the accumulated data write amount will be described.

この時間経過値は同じLBAへの前回のライトからの時間経過に関する情報であり、時間経過値の例は、同じLBAへの前回のライトの時刻であってもよいし、同じLBAへの前回のライトの時刻とこの同じLBAへの今回のライトの時刻との間の時間間隔であってもよい。 This time elapsed value is information regarding the time elapsed from the previous write to the same LBA, and the example of the time elapsed value may be the time of the previous write to the same LBA or the previous time of the same LBA. It may be the time interval between the time of the write and the time of the current write to this same LBA.

図20は、例えば4Kバイトのような所定の管理単位で、LBAと、物理アドレスと、前回ライトされた時刻との対応関係を管理するように構成されたルックアップテーブル(LUT)33の例を示す。 FIG. 20 shows an example of a lookup table (LUT) 33 configured to manage the correspondence between the LBA, the physical address, and the last written time in a predetermined management unit such as 4 Kbytes. Show.

ルックアップテーブル(LUT)33は、LBA毎に物理アドレス記憶領域33Aと時刻記憶領域33Bとを含む。各時刻記憶領域33Bは、対応するLBAへのライトが発生した時刻を示す値、つまり対応するLBAのデータがライトされた時刻を示す値、を保持するために使用される。各時刻記憶領域33Bに保持される時刻は、例えば、時分秒であってもよい。 The lookup table (LUT) 33 includes a physical address storage area 33A and a time storage area 33B for each LBA. Each time storage area 33B is used to hold a value indicating the time when the writing to the corresponding LBA occurred, that is, a value indicating the time when the data of the corresponding LBA was written. The time stored in each time storage area 33B may be, for example, hour, minute, second.

あるLBAを含むライトコマンドが受信された時、コントローラ4は、このLBAに対応する物理アドレス領域33Aに物理アドレスを登録すると共に、このLBAに対応する時刻領域33Bに、ライトコマンドによって指定されるデータ(ライトデータ)がライトされた時刻を登録する。物理アドレスは、ライトコマンドによって指定されたデータが書き込まれた物理記憶位置の物理アドレスを示す。ライトされた時刻は、ライトコマンドが受信された時刻であってもよいし、ライトコマンドによって指定されたデータがライトバッファ31に書き込まれた時刻であってもよいし、ライトコマンドによって指定されたデータがNANDメモリ5の書き込み先ブロックにライトされた時刻であってもよい。 When a write command including a certain LBA is received, the controller 4 registers the physical address in the physical address area 33A corresponding to this LBA, and the data specified by the write command in the time area 33B corresponding to this LBA. Register the time when (write data) was written. The physical address indicates the physical address of the physical storage location where the data designated by the write command is written. The written time may be the time when the write command is received, the time when the data designated by the write command is written in the write buffer 31, or the data designated by the write command. May be the time when the write-in block of the NAND memory 5 was written.

図21のフローチャートは、コントローラ4によって実行される時間経過応答処理の手順を示す。 The flowchart of FIG. 21 shows the procedure of the time lapse response process executed by the controller 4.

ここでは、時間経過値を含むコマンド許可応答をホスト2に送信する場合を想定する。 Here, it is assumed that a command authorization response including a time elapsed value is transmitted to the host 2.

コントローラ4は、LBAxを開始LBAとして含むライトコマンドをホスト2から受信する(ステップS71)。コントローラ4は、ルックアップテーブル(LUT)33を参照して、LBAxへの前回のライトの時刻、つまりLBAxを含む前回のライトコマンドによってデータがライトされた時刻を、取得する(ステップS72)。コントローラ4は、LBAxへの前回のライトの時刻を示す時間経過値を含む許可応答をホスト2へ返す(ステップS73)。上述したように、時間経過値は、LBAxへの前回のライトの時刻とLBAxの今回のライトの時刻との間の時間間隔、つまり現在時刻(LBAxへの今回のライトの時刻)からLBAxへの前回のライトの時刻を引いた値であってもよい。 The controller 4 receives a write command including LBAx as a start LBA from the host 2 (step S71). The controller 4 refers to the look-up table (LUT) 33 to obtain the time of the previous write to LBAx, that is, the time when the data was written by the previous write command including LBAx (step S72). The controller 4 returns a permission response including a time elapsed value indicating the time of the previous write to LBAx to the host 2 (step S73). As described above, the elapsed time value is the time interval between the time of the previous write to LBAx and the time of the current write of LBAx, that is, the current time (the time of the current write to LBAx) to LBAx. It may be a value obtained by subtracting the time of the previous write.

コントローラ4は、このライトコマンドに対応するライトデータまたはこのライトコマンドをアボートするためのアボートコマンドのどちらがホスト2から受信されるかを判定する(ステップS74)。 The controller 4 determines whether the write data corresponding to this write command or the abort command for aborting this write command is received from the host 2 (step S74).

ライトデータが受信されたならば、コントローラ4は、ステップS75に進む。ステップS75では、コントローラ4は、このライトデータをライトバッファ31に書き込み、ライトバッファ31内のライトデータを現在の書き込み先ブロックに書き込み、ルックアップテーブル(LUT)33を更新してLBAxに新物理アドレスと新ライト時刻とをマッピングし、そしてページ管理テーブルを更新して旧物理アドレス(旧データ)を無効化する。 If the write data is received, the controller 4 proceeds to step S75. In step S75, the controller 4 writes this write data in the write buffer 31, writes the write data in the write buffer 31 in the current write destination block, updates the lookup table (LUT) 33, and updates the LBAx with the new physical address. And the new write time are mapped, and the page management table is updated to invalidate the old physical address (old data).

この後、コントローラ4は、コマンド完了のレスポンスをホスト2へ返す(ステップS76)。 After that, the controller 4 returns a command completion response to the host 2 (step S76).

なお、上述したように、ライトデータをライトバッファ31に書き込んだ時点でコマンド完了のレスポンスをホスト2に送信してもよい。 As described above, the command completion response may be transmitted to the host 2 when the write data is written in the write buffer 31.

一方、アボートコマンドが受信されたならば、コントローラ4は、このライトコマンドを破棄する(ステップS77)。 On the other hand, if the abort command is received, the controller 4 discards this write command (step S77).

図21のフローチャートでは、時間経過値を含むコマンド許可応答をホスト2に送信する場合を説明したが、時間経過値を含むコマンド完了のレスポンスをホスト2に送信してもよい。時間経過値を含むコマンド完了のレスポンスの送信は、図18、図19と同様の手順によって実行することができる。 In the flowchart of FIG. 21, the case where the command permission response including the time elapsed value is transmitted to the host 2 has been described, but the command completion response including the time elapsed value may be transmitted to the host 2. The transmission of the command completion response including the elapsed time value can be executed by the same procedure as in FIGS. 18 and 19.

図22のフローチャートは、SSD3から通知される累積データ書き込み量/時間経過値に基づいてホスト2によって実行される処理の手順を示す。 The flowchart of FIG. 22 shows a procedure of processing executed by the host 2 based on the accumulated data write amount/elapsed time value notified from the SSD 3.

ホスト2は、SSD3から通知される累積データ書き込み量/時間経過値に基づいて、データを更新頻度の異なる複数種のデータグループに分類してもよい。例えば、ホスト2のファイルシステム43がデータ管理部を含み、このデータ管理部が、データを複数種のデータグループに分類して、データを頻繁に更新されるデータグループ(Hotデータ)と頻度には更新されないデータグループ(Coldデータ)とに分離してもよい。SSD3に書き込んだデータの更新頻度がある閾値以上であるならば、データ管理部は、このデータがHotデータであると認識することができる。 The host 2 may classify the data into a plurality of types of data groups having different update frequencies based on the cumulative data write amount/elapsed time value notified from the SSD 3. For example, the file system 43 of the host 2 includes a data management unit, and this data management unit classifies the data into a plurality of types of data groups, and the data group is frequently updated (Hot data) and the frequency. It may be separated into a data group that is not updated (Cold data). If the update frequency of the data written in the SSD 3 is equal to or higher than a threshold value, the data management unit can recognize that this data is Hot data.

データ管理部は、同じSSD内におけるLBA範囲それぞれの更新頻度をできるだけ同じ範囲の頻度に揃えるために、Hotデータであると認識されたデータをSSD3から別のストレージデバイスに移動しても良い。 The data management unit may move the data recognized as Hot data from the SSD 3 to another storage device in order to make the update frequencies of the LBA ranges in the same SSD equal to the frequency of the same range as much as possible.

あるいは、もしSSD3が高い耐久性を有する高価格SSDとして実現されているならば、HotデータをSSD3内に残し、ColdデータをSSD3から別のストレージデバイスに移動しても良い。高い耐久性を有する高価格SSDの例は、メモリセル当たりに1ビットの情報を格納するSLC−SSDを含む。 Alternatively, if the SSD 3 is realized as a high-priced SSD with high durability, the Hot data may be left in the SSD 3 and the Cold data may be moved from the SSD 3 to another storage device. Examples of high-endurance high-cost SSDs include SLC-SSDs that store 1 bit of information per memory cell.

SSDの耐久性を示す指標の一つに、DWPD(Drive Write Per Day)がある。例えば、DWPD=10は、1Tバイトの総容量を有するSSDに関しては、1日当たり10Tバイト(=10×1Tバイト)のデータのライトを5年間に渡って毎日実行することができることを意味する。 DWPD (Drive Write Per Day) is one of the indicators showing the durability of SSD. For example, DWPD=10 means that for an SSD having a total capacity of 1 Tbyte, 10 Tbytes (=10×1 Tbyte) of data can be written every day for 5 years every day.

以下では、前者のための処理の手順の例を説明する。 Hereinafter, an example of a procedure of processing for the former will be described.

ホスト2は、LBAxを含むライトコマンドをSSD3に送信し(ステップS81)、累積データ書き込み量または時間経過値を含む応答(許可応答、コマンド完了レスポンス)をSSD3から受信する(ステップS82)。 The host 2 sends a write command including LBAx to the SSD 3 (step S81), and receives a response (permission response, command completion response) including the accumulated data write amount or the elapsed time value from the SSD 3 (step S82).

ホスト2は、累積データ書き込み量または時間経過値に基づき、LBAxのデータの更新頻度(LBAxへのライトの頻度)が所定の上限頻度(閾値th4)以上であるか否かを判定する(ステップS83)。例えば、SSD3から累積データ書き込み量が通知されるケースにおいては、ホスト2は、累積データ書き込み量が閾値th4によって示される閾データ量以上であるかを判定してもよい。SSD3から時間経過値(同じLBAへの前回のライトの時刻)が通知されるケースにおいては、ホスト2は、現在時刻から前回のライトの時刻を引くことによって時間間隔を算出し、この時間間隔が、閾値th4によって示される閾時間間隔以上であるか否かを判定してもよい。あるいは、ホスト2は、累積データ書き込み量または時間経過値を、何回のライトアクセスに1回の割合でLBAxへのライトが発生するかを示す割合[パーセント]に換算し、この時間間隔が、閾値th4によって示される閾時間間隔以上であるか否かを判定してもよい。 The host 2 determines whether the update frequency of LBAx data (frequency of writing to LBAx) is equal to or higher than a predetermined upper limit frequency (threshold th4) based on the cumulative data write amount or the elapsed time value (step S83). ). For example, in the case where the cumulative data write amount is notified from the SSD 3, the host 2 may determine whether the cumulative data write amount is equal to or larger than the threshold data amount indicated by the threshold value th4. In the case where the SSD 3 is notified of the elapsed time value (the time of the previous write to the same LBA), the host 2 calculates the time interval by subtracting the time of the previous write from the current time, and this time interval is Alternatively, it may be determined whether the time is equal to or longer than the threshold time interval indicated by the threshold th4. Alternatively, the host 2 converts the cumulative data write amount or the elapsed time value into a ratio [percent] indicating how many times write access is performed to write to LBAx, and this time interval is You may determine whether it is more than the threshold time interval shown by threshold value th4.

LBAxのデータの更新頻度(LBAxへのライトの頻度)が閾値th4以上であるならば(ステップS83のYES)、ホスト2は、LBAxのデータを高更新頻度データグループ(Hotデータ)に分類し(ステップS84)、LBAxのデータをSSD3から他のストレージデバイスに移動する(ステップS85)。 If the update frequency of LBAx data (write frequency to LBAx) is greater than or equal to the threshold th4 (YES in step S83), the host 2 classifies the LBAx data into a high update frequency data group (Hot data) ( (Step S84), the data of LBAx is moved from SSD3 to another storage device (Step S85).

ステップS84においては、もし累積データ書き込み量または時間経過値が含まれるレスポンスがライトコマンドに対する許可応答であったならば、ホスト2は、ライトコマンドをアボートする処理を実行してもよい。 In step S84, if the response including the accumulated data write amount or the elapsed time value is the permission response to the write command, the host 2 may execute the process of aborting the write command.

図23は、ホスト2として機能する情報処理装置のハードウェア構成例を示す。 FIG. 23 shows a hardware configuration example of the information processing apparatus that functions as the host 2.

この情報処理装置は、サーバコンピュータ、またはパーソナルコンピュータとして実現される。この情報処理装置は、プロセッサ(CPU)101、メインメモリ102、BIOS−ROM103、ネットワークコントローラ105、周辺インタフェースコントローラ106、コントローラ107、およびエンベデッドコントローラ(EC)108等を含む。 This information processing apparatus is realized as a server computer or a personal computer. This information processing device includes a processor (CPU) 101, a main memory 102, a BIOS-ROM 103, a network controller 105, a peripheral interface controller 106, a controller 107, an embedded controller (EC) 108, and the like.

プロセッサ101は、この情報処理装置の各コンポーネントの動作を制御するように構成されたCPUである。このプロセッサ101は、複数のSSD3のいずれか1つからメインメモリ102にロードされる様々なプログラムを実行する。メインメモリ102は、DRAMのようなランダムアクセスメモリから構成される。プロセッサ101によって実行されるプログラムは、上述のアプリケーションソフトウェアレイヤ41、OS42およびファイルシステム43を含む。 The processor 101 is a CPU configured to control the operation of each component of this information processing apparatus. The processor 101 executes various programs loaded into the main memory 102 from any one of the plurality of SSDs 3. The main memory 102 is composed of a random access memory such as DRAM. The program executed by the processor 101 includes the application software layer 41, the OS 42, and the file system 43 described above.

また、プロセッサ101は、不揮発性メモリであるBIOS−ROM103に格納された基本入出力システム(BIOS)も実行する。BIOSはハードウェア制御のためのシステムプログラムである。 The processor 101 also executes a basic input/output system (BIOS) stored in the BIOS-ROM 103 which is a non-volatile memory. BIOS is a system program for hardware control.

ネットワークコントローラ105は、有線LANコントローラ、無線LANコントローラのような通信デバイスである。周辺インタフェースコントローラ106は、USBデバイスのような周辺デバイスとの通信を実行するように構成されている。 The network controller 105 is a communication device such as a wired LAN controller or a wireless LAN controller. Peripheral interface controller 106 is configured to perform communication with peripheral devices such as USB devices.

コントローラ107は、複数のコネクタ107Aにそれぞれ接続されるデバイスとの通信を実行するように構成されている。本実施形態では、複数のSSD3が複数のコネクタ107Aにそれぞれ接続される。コントローラ107は、SAS expander、PCIe Switch、PCIe expander、フラッシュアレイコントローラ、またはRAIDコントローラ等である。 The controller 107 is configured to perform communication with the devices respectively connected to the plurality of connectors 107A. In this embodiment, the plurality of SSDs 3 are connected to the plurality of connectors 107A, respectively. The controller 107 is a SAS expander, a PCIe switch, a PCIe expander, a flash array controller, a RAID controller, or the like.

EC108は、情報処理装置の電力管理を実行するように構成されたシステムコントローラとして機能する。EC108は、ユーザによる電源スイッチの操作に応じて情報処理装置をパワーオンおよびパワーオフする。EC108はワンチップマイクロコントローラのような処理回路として実現されている。EC108は、キーボード(KB)などの入力デバイスを制御するキーボードコントローラを内蔵していてもよい。 The EC 108 functions as a system controller configured to perform power management of the information processing device. The EC 108 powers on and powers off the information processing device according to the operation of the power switch by the user. The EC 108 is realized as a processing circuit such as a one-chip microcontroller. The EC 108 may include a keyboard controller that controls an input device such as a keyboard (KB).

図22で説明した処理は、ファイルシステム43の制御の下、プロセッサ101によって実行される。 The process described in FIG. 22 is executed by the processor 101 under the control of the file system 43.

図24は、複数のSSD3とホスト2とを含む情報処理装置の構成例を示す。 FIG. 24 shows a configuration example of an information processing device including a plurality of SSDs 3 and a host 2.

この情報処理装置は、ラックに収容可能な薄い箱形の筐体201を備える。多数のSSD3は筐体201内に配置されても良い。この場合、各SSD3は筐体201の前面201Aに設けられたスロットに取り外し可能に挿入されてもよい。 This information processing apparatus includes a thin box-shaped housing 201 that can be housed in a rack. A large number of SSDs 3 may be arranged in the housing 201. In this case, each SSD 3 may be removably inserted into a slot provided on the front surface 201A of the housing 201.

システムボード(マザーボード)202は筐体201内に配置される。システムボード(マザーボード)202上においては、CPU101、メモリ102、ネットワークコントローラ105、コントローラ107を含む様々な電子部品が実装されている。これら電子部品がホスト2として機能する。 The system board (motherboard) 202 is arranged in the housing 201. Various electronic components including a CPU 101, a memory 102, a network controller 105, and a controller 107 are mounted on a system board (motherboard) 202. These electronic components function as the host 2.

以上説明したように、本実施形態の「ブロック内のデータのGC回数を考慮したGC機能」によれば、ホスト2によって書き込まれたデータを含むブロック毎に、当該ブロック内のデータがガベージコレクション(GC)動作によってコピーされた回数を示すGC回数が管理され、且つ同じGC回数に関連づけられた複数のブロック(第1ブロック)が、ガベージコレクション(GC)動作の対象ブロックとして選択される。そして、これら第1ブロック内の有効データがコピー先フリーブロックにコピーされ、これら第1ブロックのGC回数に1を加えた値が、コピー先フリーブロックのGC回数として設定される。したがって、更新頻度の高いデータと更新頻度の低いデータとがGC動作によって一緒に同じブロックにコピーされてしまうことを防止できるようになる。これにより、GC回数の多いブロックほど、ブロックの容量に対する更新頻度の低いデータの量の割合を増やすことができるので、更新頻度の低いデータを、更新頻度の高いデータから分離することが可能とする。このことは、更新頻度の異なる複数種のデータが混在するブロックの数の増加を抑制できることを意味する。よって、たとえSSD3に書かれるデータが高いデータ局所性を有する場合であっても、更新頻度の高いデータと更新頻度の低いデータとが混在するブロックの数の増加を抑制でき、この結果、SSD3のライトアンプリフィケーションの増加を抑制できる。 As described above, according to the “GC function considering the number of GC times of data in a block” of the present embodiment, the data in the block is garbage collected (for each block including the data written by the host 2). The GC number indicating the number of times of copying by the (GC) operation is managed, and a plurality of blocks (first blocks) associated with the same GC number are selected as target blocks for the garbage collection (GC) operation. Then, the valid data in these first blocks is copied to the copy destination free block, and the value obtained by adding 1 to the GC count of these first blocks is set as the GC count of the copy destination free block. Therefore, it is possible to prevent the data having a high update frequency and the data having a low update frequency from being copied to the same block together by the GC operation. As a result, as the number of GCs increases, the ratio of the amount of data with a low update frequency to the capacity of the block can be increased, so that the data with a low update frequency can be separated from the data with a high update frequency. .. This means that it is possible to suppress an increase in the number of blocks in which a plurality of types of data having different update frequencies are mixed. Therefore, even if the data written in the SSD3 has a high data locality, it is possible to suppress an increase in the number of blocks in which data with a high update frequency and data with a low update frequency are mixed, and as a result, the SSD3's It is possible to suppress an increase in write amplification.

なお、本実施形態では、不揮発性メモリとしてNANDメモリを例示した。しかし、本実施形態の機能は、例えば、MRAM(Magnetoresistive Random Access Memory)、PRAM(Phase change Random Access Memory)、ReRAM(Resistive Random Access Memory)、又は、FeRAM(Ferroelectric Random Access Memory)のような他の様々な不揮発性メモリにも適用できる。 In addition, in the present embodiment, the NAND memory is illustrated as the nonvolatile memory. However, the functions of the present embodiment are, for example, MRAM (Magnetoresistive Random Access Memory), PRAM (Phase change Random Access Memory), ReRAM (Resistive Random Access Memory), or ReRAM (Resistive Random Access Memory). It can also be applied to various non-volatile memories.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。 Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and gist of the invention, and are also included in the invention described in the claims and the scope of equivalents thereof.

2…ホスト、3…SSD、4…コントローラ、5…NANDメモリ、21…ガベージコレクション回数管理部、22…ガベージコレクション動作制御部、23…更新頻度情報応答部。 2... Host, 3... SSD, 4... Controller, 5... NAND memory, 21... Garbage collection frequency management unit, 22... Garbage collection operation control unit, 23... Update frequency information response unit.

Claims (8)

複数のブロックを含む不揮発性メモリと、
前記不揮発性メモリに電気的に接続され、前記不揮発性メモリのガベージコレクション動作を実行するように構成されたコントローラとを具備し、
前記コントローラは、
第1のガベージコレクション回数をそれぞれ有する第1のブロックと第2のブロックとをガベージコレクション対象ブロックとして選択し、前記第1のガベージコレクション回数は前記第1のブロックと前記第2のブロックの各々内のデータが過去のガベージコレクション動作によってコピーされた回数を示し、
前記第1のブロック内の有効データと前記第2のブロック内の有効データを、フリーブロックである第3のブロックにコピーし、
第2のガベージコレクション回数をそれぞれ有する第4のブロックと第5のブロックとをガベージコレクション対象ブロックとして選択し、前記第2のガベージコレクション回数は前記第4のブロックと前記第5のブロックの各々内のデータが過去のガベージコレクション動作によってコピーされた回数を示し、
前記第4のブロック内の有効データと前記第5のブロック内の有効データを、フリーブロックである第6のブロックにコピーし、
前記第3のブロックおよび前記第6のブロックの各々のデータの一部が無効化され、且つ前記第1のガベージコレクション回数が前記第2のガベージコレクション回数と同じである場合、前記第3のブロックと前記第6のブロックとをガベージコレクション対象ブロックとして選択し、前記第3のブロック内の有効データと前記第6のブロック内の有効データを、フリーブロックである第7のブロックにコピーするように構成されている、メモリシステム。
A non-volatile memory including a plurality of blocks,
A controller electrically connected to the non-volatile memory and configured to perform a garbage collection operation of the non-volatile memory,
The controller is
A first block and a second block each having a first garbage collection frequency are selected as garbage collection target blocks, and the first garbage collection frequency is within each of the first block and the second block. Shows the number of times the data in was copied by a past garbage collection operation,
Copying valid data in the first block and valid data in the second block to a third block which is a free block,
A fourth block and a fifth block each having a second garbage collection number are selected as garbage collection target blocks, and the second garbage collection number is within each of the fourth block and the fifth block. Shows the number of times the data in was copied by a past garbage collection operation,
The valid data in the fourth block and the valid data in the fifth block are copied to a sixth block which is a free block,
When a part of the data of each of the third block and the sixth block is invalidated, and the first garbage collection count is the same as the second garbage collection count, the third block And the sixth block are selected as garbage collection target blocks, and the valid data in the third block and the valid data in the sixth block are copied to the seventh block which is a free block. The memory system that is configured.
前記第1のブロック内の有効データと前記第2のブロック内の有効データが前記第3のブロックにコピーされた場合、前記第3のブロックのガベージコレクション回数は前記第1のガベージコレクション回数に1を加えた値に設定される請求項1記載のメモリシステム。 When the valid data in the first block and the valid data in the second block are copied to the third block, the garbage collection count of the third block is 1 in the first garbage collection count. The memory system according to claim 1, wherein the memory system is set to a value obtained by adding. 前記第4のブロック内の有効データと前記第5のブロック内の有効データが前記第6のブロックにコピーされた場合、前記第6のブロックのガベージコレクション回数は前記第2のガベージコレクション回数に1を加えた値に設定される請求項1記載のメモリシステム。 When the valid data in the fourth block and the valid data in the fifth block are copied to the sixth block, the garbage collection count of the sixth block is 1 times the second garbage collection count. The memory system according to claim 1, wherein the memory system is set to a value obtained by adding. 前記コントローラは、前記不揮発性メモリの残りフリーブロックの数が閾値以下である場合、前記ガベージコレクション動作を実行するように構成されている請求項1記載のメモリシステム。 The memory system according to claim 1, wherein the controller is configured to execute the garbage collection operation when the number of remaining free blocks of the nonvolatile memory is equal to or less than a threshold value. 複数のブロックを含む不揮発性メモリを制御し、前記不揮発性メモリのガベージコレクション動作を実行する制御方法であって、
第1のガベージコレクション回数をそれぞれ有する第1のブロックと第2のブロックとをガベージコレクション対象ブロックとして選択することと、前記第1のガベージコレクション回数は前記第1のブロックと前記第2のブロックの各々内のデータが過去のガベージコレクション動作によってコピーされた回数を示し、
前記第1のブロック内の有効データと前記第2のブロック内の有効データを、フリーブロックである第3のブロックにコピーすることと、
第2のガベージコレクション回数をそれぞれ有する第4のブロックと第5のブロックとをガベージコレクション対象ブロックとして選択することと、前記第2のガベージコレクション回数は前記第4のブロックと前記第5のブロックの各々内のデータが過去のガベージコレクション動作によってコピーされた回数を示し、
前記第4のブロック内の有効データと前記第5のブロック内の有効データを、フリーブロックである第6のブロックにコピーすることと、
前記第3のブロックおよび前記第6のブロックの各々のデータの一部が無効化され、且つ前記第1のガベージコレクション回数が前記第2のガベージコレクション回数と同じである場合、前記第3のブロックと前記第6のブロックとをガベージコレクション対象ブロックとして選択し、前記第3のブロック内の有効データと前記第6のブロック内の有効データを、フリーブロックである第7のブロックにコピーすることとを具備する制御方法。
A control method for controlling a non-volatile memory including a plurality of blocks, and performing a garbage collection operation of the non-volatile memory,
Selecting a first block and a second block, each of which has a first garbage collection count, as a garbage collection target block, and the first garbage collection count is the same as that of the first block and the second block. Shows the number of times the data in each has been copied by past garbage collection operations,
Copying valid data in the first block and valid data in the second block to a third block which is a free block;
Selecting a fourth block and a fifth block, each of which has a second garbage collection count, as garbage collection target blocks, and the second garbage collection count is the same as that of the fourth block and the fifth block. Shows the number of times the data in each was copied by past garbage collection operations,
Copying valid data in the fourth block and valid data in the fifth block to a sixth block which is a free block;
If a part of the data of each of the third block and the sixth block is invalidated, and the first garbage collection count is the same as the second garbage collection count, the third block And the sixth block are selected as garbage collection target blocks, and the valid data in the third block and the valid data in the sixth block are copied to a seventh block which is a free block. A control method comprising:
前記第1のブロック内の有効データと前記第2のブロック内の有効データが前記第3のブロックにコピーされた場合、前記第3のブロックのガベージコレクション回数は前記第1のガベージコレクション回数に1を加えた値に設定される請求項5記載の制御方法。 When the valid data in the first block and the valid data in the second block are copied to the third block, the garbage collection count of the third block is 1 in the first garbage collection count. The control method according to claim 5, wherein the control method is set to a value obtained by adding 前記第4のブロック内の有効データと前記第5のブロック内の有効データが前記第6のブロックにコピーされた場合、前記第6のブロックのガベージコレクション回数は前記第2のガベージコレクション回数に1を加えた値に設定される請求項5記載の制御方法。 When the valid data in the fourth block and the valid data in the fifth block are copied to the sixth block, the garbage collection count of the sixth block is 1 in the second garbage collection count. The control method according to claim 5, wherein the control method is set to a value obtained by adding 前記不揮発性メモリの残りフリーブロックの数が閾値以下である場合、前記ガベージコレクション動作を実行する請求項5記載の制御方法。 The control method according to claim 5, wherein the garbage collection operation is executed when the number of remaining free blocks in the nonvolatile memory is equal to or less than a threshold value.
JP2019118522A 2019-06-26 2019-06-26 Memory system and control method Active JP6721765B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019118522A JP6721765B2 (en) 2019-06-26 2019-06-26 Memory system and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019118522A JP6721765B2 (en) 2019-06-26 2019-06-26 Memory system and control method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2018180710A Division JP6552701B2 (en) 2018-09-26 2018-09-26 Memory system and control method

Publications (2)

Publication Number Publication Date
JP2019160347A JP2019160347A (en) 2019-09-19
JP6721765B2 true JP6721765B2 (en) 2020-07-15

Family

ID=67994068

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019118522A Active JP6721765B2 (en) 2019-06-26 2019-06-26 Memory system and control method

Country Status (1)

Country Link
JP (1) JP6721765B2 (en)

Also Published As

Publication number Publication date
JP2019160347A (en) 2019-09-19

Similar Documents

Publication Publication Date Title
US10713161B2 (en) Memory system and method for controlling nonvolatile memory
US10789162B2 (en) Memory system and method for controlling nonvolatile memory
US11474702B2 (en) Storage device that writes data from a host during garbage collection
US10592117B2 (en) Memory system and method for controlling nonvolatile memory
US20240061574A1 (en) Memory system for controlling nonvolatile memory
US20200218655A1 (en) Storage system and information processing system for controlling nonvolatile memory
JP6517685B2 (en) Memory system and control method
KR102094236B1 (en) Storage device and computer system
US20170139826A1 (en) Memory system, memory control device, and memory control method
JP2016170583A (en) Memory system and information processing system
JP6721765B2 (en) Memory system and control method
WO2018167890A1 (en) Computer system and management method
JP6666405B2 (en) Memory system and control method
JP6552701B2 (en) Memory system and control method
KR20210142863A (en) Apparatus and method for increasing operation efficiency in a memory system
US12019872B2 (en) Storage device that writes data from a host during garbage collection

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190626

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190703

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200424

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200519

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200618

R150 Certificate of patent or registration of utility model

Ref document number: 6721765

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150