JP6666405B2 - Memory system and control method - Google Patents

Memory system and control method Download PDF

Info

Publication number
JP6666405B2
JP6666405B2 JP2018180110A JP2018180110A JP6666405B2 JP 6666405 B2 JP6666405 B2 JP 6666405B2 JP 2018180110 A JP2018180110 A JP 2018180110A JP 2018180110 A JP2018180110 A JP 2018180110A JP 6666405 B2 JP6666405 B2 JP 6666405B2
Authority
JP
Japan
Prior art keywords
data
block
write
host
write command
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
JP2018180110A
Other languages
Japanese (ja)
Other versions
JP2019016383A (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 JP2018180110A priority Critical patent/JP6666405B2/en
Publication of JP2019016383A publication Critical patent/JP2019016383A/en
Application granted granted Critical
Publication of JP6666405B2 publication Critical patent/JP6666405B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System (AREA)

Description

本発明の実施形態は、不揮発性メモリを制御する技術に関する。   Embodiments described herein relate generally to a technique for controlling a nonvolatile memory.

近年、不揮発性メモリを備えるメモリシステムが広く普及している。   2. Description of the Related Art In recent years, memory systems including a nonvolatile memory have become widespread.

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

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

最近では、ホストからの制御によってSSDの性能改善を図る試みがされ始めている。   Recently, attempts have been made to improve the performance of the SSD by control from the host.

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

しかし、SSDの性能を改善できるようにするためには、性能改善のための有用な情報をホストに提供するための新たな機能の実現が要求される。   However, in order to improve the performance of the SSD, it is required to realize a new function for providing useful information for improving the performance to the host.

本発明が解決しようとする課題は、データの更新頻度に関する情報をホストに提供することができるメモリシステムおよび制御方法を提供することである。   The problem to be solved by the present invention is to provide a memory system and a control method that can provide a host with information on the frequency of updating data.

実施形態によれば、メモリシステムは、不揮発性メモリと、ホストから受信されるライトコマンドに応じて前記不揮発性メモリにデータを書き込むように構成されたコントローラとを具備する。前記コントローラは、第1の論理アドレスを含む前回のライトコマンドである第1のライトコマンドを前記ホストから受信する。前記コントローラは、前記第1のライトコマンドを受信した後、前記第1の論理アドレスと同じ論理アドレスを含む今回のライトコマンドである第2のライトコマンドを前記ホストから受信する。前記コントローラは、前記第1のライトコマンドを受信してから前記第2のライトコマンドを受信するまでの間に前記ホストから受信したデータの総量、または前記第1のライトコマンドを受信してから前記第2のライトコマンドを受信するまでの経過時間に関する値を取得する。前記コントローラは、前記データの総量、または前記経過時間に関する値を、前記ホストに通知する。 According to an embodiment, a memory system includes a nonvolatile memory and a controller configured to write data to the nonvolatile memory in response to a write command received from a host. The controller receives a first write command, which is a previous write command including a first logical address, from the host. After receiving the first write command, the controller receives, from the host, a second write command that is a current write command including the same logical address as the first logical address. Said controller, said after receiving the first of the total amount of data received from the host during the period from the reception of the write command until it receives the second write command or the first write command, A value related to an elapsed time until the second write command is received is obtained. The controller notifies the host of a total amount of the data or a value related to the elapsed time.

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

以下、図面を参照して、実施形態を説明する。
まず、図1を参照して、一実施形態に係るメモリシステムを含む情報処理システム1の構成を説明する。
Hereinafter, embodiments will be described with reference to the drawings.
First, a 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 nonvolatile memory and read data from the nonvolatile memory. This memory system is implemented, 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 functioning 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 interconnecting the host 2 and the SSD 3, SCSI, Serial Attached SCSI (SAS), ATA, Serial ATA (SATA), PCI Express (PCIe), Ethernet (registered trademark), Fiber channel, and the like are used. obtain.

SSD3は、コントローラ4、不揮発性メモリ(NANDメモリ)5、およびDRAM6を備える。NANDメモリ5は、限定されないが、複数のNANDフラッシュメモリチップを含んでいてもよい。   The SSD 3 includes a controller 4, a nonvolatile 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 an erasing unit. 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 the pages P0 to Pn-1. In the NAND memory 5, data reading and data writing are performed in page units. Data erasure is performed in block units.

コントローラ4は、Toggle、ONFIのようなNANDインタフェース13を介して、不揮発性メモリであるNANDメモリ5に電気的に接続されている。コントローラ4は、NANDメモリ5のデータ管理とNANDメモリ5のブロック管理とを実行するように構成されたフラッシュトランスレーション層(FTL)として機能し得る。   The controller 4 is electrically connected to a NAND memory 5 which is a nonvolatile memory via a NAND interface 13 such as Toggle or 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内の物理記憶位置を示す。物理アドレスは、物理ブロックアドレスと物理ページアドレスとを含む。物理ページアドレスは全てのページに割り当てられており、また物理ブロックアドレスは全てのブロックに割り当てられている。   Data management includes (1) management of mapping information indicating the correspondence between logical block addresses (LBAs) and physical addresses, and (2) concealment of read / write in page units and erasure operations in block units. , Etc. are included. The management of the mapping between the LBA and the physical address is executed using a look-up table (LUT) 33 functioning as a logical-physical address conversion table. The look-up table (LUT) 33 manages mapping between LBAs and physical addresses in predetermined management size units. Many of the write commands from the host 2 require writing of 4 Kbytes of data. Therefore, the look-up table (LUT) 33 may manage the mapping between the LBA and the physical address, for example, in units of 4 Kbytes. The physical address corresponding to a certain LBA indicates a physical storage position in the NAND memory 5 to which the data of this LBA has been 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 a 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 in the NAND memory 5. That is, the controller 4 writes data to this other page. Then, the controller 4 updates the look-up table (LUT) 33 to associate this LBA with this another page, and invalidates the original page (that is, old data with which this LBA was associated).

ブロック管理には、不良ブロックの管理と、ウェアレベリングと、ガベージコレクション動作等が含まれる。ウェアレベリングは、物理ブロックそれぞれのプログラム/イレーズ回数を平準化するための動作である。   Block management includes management of bad blocks, wear leveling, garbage collection operations, 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 free space in the NAND memory 5. This garbage collection operation copies all valid data in some blocks in which valid data and invalid data are mixed to another block (copy destination free block) in order to increase the number of free blocks in the NAND memory 5. . Then, the garbage collection operation updates the look-up table (LUT) 33 and maps each LBA of the copied valid data to a correct physical address. When valid data is copied to another block, a block regarded as invalid data is released as a free block. This allows this block to be reused after erasure.

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

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 a page of a block in the NAND memory 5. Further, by updating the look-up table (LUT) 33, the controller 4 maps the LBA corresponding to the written data to a physical address indicating the physical storage location where the data has been 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 to which data from the host 2 is to be written, and is also referred to as a “write destination block” or an “input block”. While updating the look-up table (LUT) 33, the controller 4 sequentially writes the write data received from the host 2 to an available page of the write target block (write destination block). When there is no available page 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 a 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 specified by the 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 specified by the read command. The read command includes the LBA (start 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 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, under the control of the CPU 12, the controller 4 executes the following write operation of writing write data specified by the write command to the NAND memory 5.

つまり、コントローラ4は、ライトデータを現在の書き込み先ブロックの物理記憶位置(利用可能ページ)に書き込み、そしてルックアップテーブル(LUT)33を更新して、ライトコマンドに含まれるLBA(開始LBA)にこの物理記憶位置の物理アドレスをマッピングする。   That is, the controller 4 writes the write data to the physical storage location (available page) of the current write destination block, updates the look-up table (LUT) 33 to 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として機能させる。   These FTL processing and command processing may be controlled by 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のライトアンプリフィケーションを増加させる要因となり得る。   Data written to the SSD 3 by the host 2 may have a data locality that a part of the data is frequently rewritten and the remaining part is not frequently rewritten. In this case, for example, if the GC operation is performed by a normal GC algorithm of selecting some upper blocks having a large amount of invalid data as the GC target blocks, the frequency of updating increases as the GC operation is repeated many times. Data and infrequently updated data tend to be mixed in the same block. A mixture of frequently updated data and infrequently updated data may cause an increase in SSD3 write amplification.

なぜなら、更新頻度の高いデータ(Hotデータ)と更新頻度の低いデータ(Coldデータ)とが混在するブロックにおいては、Hotデータの更新によってブロック内の一部の領域だけが早いタイミングで無効化される一方、このブロック内の残りの領域(Coldデータ)は有効状態に長い間維持されるからである。   This is because, in a block in which frequently updated data (hot data) and infrequently updated data (cold data) are mixed, only a part of the area in the block is invalidated at an early timing by updating 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 a block is filled only with Hot data, there is a high possibility that all data in this block will be invalidated at relatively early timing by updating (rewriting) those data. Therefore, this block can be reused only by erasing the block without performing a garbage collection operation.

一方、Coldデータのみによってブロックが満たされているならば、このブロック内の全てのデータは、長い間、有効状態に維持される。したがって、このブロックは、長い間、ガベージコレクション動作の対象とならない可能性が高い。   On the other hand, if the block is filled only with Cold data, all 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 from host to SSD"
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 rewrites (program / erase) of each block in the SSD 3. That is, as the write amplification (WA) is larger, the number of times of program / erase of the block is more likely to reach the upper limit value of the number of times of program / erase. As a result, the durability and the life of the SSD 3 are deteriorated.

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

ガベージコレクション(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 a “GC function in consideration of the number of GCs of data in a block”. The “GC function in consideration of the number of GCs of data in a block” executes an improved garbage collection (GC) operation capable of suppressing an increase in SSD3 write amplification 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) times for each block including data written by the host 2. The GC count of a certain block indicates the number of times data in this block has been copied by a garbage collection (GC) operation. That is, the GC count of a certain block indicates how many times data in this block has been copied as valid data in the past.

ホスト2によってデータがライトされた直後のブロック、つまりそのデータがGCによって一度も集められた(コピーされた)ことのないブロックについては、このブロックのGC回数はゼロに設定される。   For a block immediately after data has been written by the host 2, that is, a block whose data has never been collected (copied) by 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 valid data of these blocks is copied to the copy destination free block, the GC count management unit 21 performs this copy. The GC count of the first free block is set to 1. This is because the data in the copy destination free block is data copied once from the GC target block (copy source block) as valid data.

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

GC回数が1である幾つかのブロック(コピー元ブロック)がガベージコレクション(GC)の対象ブロックとして選択され、これらブロックの有効データがコピー先フリーブロックにコピーされたならば、GC回数管理部21は、このコピー先のフリーブロックのGC回数を2に設定する。このコピー先フリーブロック内のデータは、有効データとして過去に2回コピーされたデータであるからである。   If some blocks (copy source blocks) whose GC count is 1 are selected as garbage collection (GC) target blocks and valid data of these blocks is copied to the copy destination free block, the GC count management unit 21 Sets the GC count of the free block at the copy destination to 2. This is because the data in the 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 GCs associated with a certain block is determined by how many times data in this block has been copied by past GC operations, that is, how many GC operations have been performed on data in this block in the past. Indicates whether it was executed.

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

例えば、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 a block group associated with the same number of GCs (that is, a set of blocks having the same number of GCs). The GC operation control unit 22 copies valid data in these blocks selected as the GC target blocks to a copy destination free block. Then, a value obtained by adding 1 to the number of GCs of these blocks selected as the GC target block is set as the number of GCs of the copy destination free block by the GC number management unit 21.

「LBAベースの更新頻度通知機能」は、個々のライトコマンドに含まれる個々のLBAへのライトの頻度をホスト2に通知することによって、ホスト2がHotデータ/Coldデータを分離するのを効率良くアシストする機能である。   The “LBA-based update frequency notification function” notifies the host 2 of the frequency of writing to each LBA included in each write command, thereby efficiently separating the host 2 from Hot data / Cold data. It 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に分散させるための処理等を実行することができる。   Upon receiving a write command including an LBA from the host 2, the update frequency information response unit 23 determines whether a value related to the time elapsed from the previous write to this LBA to the current write to this LBA, or the previous time to this LBA. The host 2 is notified of the cumulative amount of data written from this write to the current write to this LBA as a response to this write command. Accordingly, the host 2 can be notified of the actual update frequency (rewrite frequency) of the user data, so that the host 2 can update the user data with a plurality of types of data having different update frequencies, for example, frequently updating the user data. Data (Hot data), data of low update frequency (Cold data), and data of 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 as needed.

次に、コントローラ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の格納のために用いられてもよい。   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 to the NAND memory 5. The storage area of the DRAM 6 may be used as a GC buffer 32 for temporarily storing data moved during a garbage collection (GC) operation. Further, the storage area of the DRAM 6 may be used for storing the above-described lookup table 33.

さらに、DRAM6の記憶領域は、GC回数管理リスト34、およびブロック使用順序管理リスト35として利用されてもよい。   Further, the storage area of the DRAM 6 may be used as a GC count management list 34 and a 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 ID (for example, physical block address) of each block and the GC count 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 of GC count = 0 holds a list of block IDs (for example, physical block addresses) of the blocks associated with the GC count of 0. The GC count list of GC count = 1 holds a list of block IDs (for example, physical block addresses) of the blocks associated with one GC count.

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

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

ファイルシステム43は、ファイルの操作(作成、保存、更新、削除等)のための制御を行うために使用される。例えば、ZFS、Btrfs、XFS、ext4、NTFSなどがファイルシステム43として使用されても良い。あるいは、ファイルオブジェクトシステム(例えば、Ceph Object Storage Daemon)、Key Value Store System (例えば、Rocks DB) がファイルシステム43として使用されても良い。   The file system 43 is used for controlling file operations (creation, storage, update, deletion, 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. 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, details of the “GC function in consideration of the number of times of GC of data in a block” will be described with reference to FIGS.

図2は、SSD3によって実行されるGC回数管理動作とGC動作とを示す。   FIG. 2 shows a GC count management operation and a 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 for writing data (write data) from the host 2 (write destination block), and can use the write data received from the host 2 in the 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 (a block including 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 from the first page to the last page of the current write destination block in the order of arrival.

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

時間が経過するにつれ、ブロックB11〜B17の各々のデータの一部は、その書き換えによって無効化されるかもしれない。これにより、ブロックB11〜B17の各々においては、有効データと無効データとが混在される場合がある。   As time passes, a part of the data in each of the blocks B11 to B17 may be invalidated by the rewriting. Thus, 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 a GC operation for creating free blocks from several blocks in which valid data and invalid data are mixed.

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

コントローラ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 count 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 number of GCs of the GC target block is inherited by the copy destination free block. It is possible to correctly indicate whether or not 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 GC count are selected as GC target blocks, and valid data of these blocks B11 and B12 is copied to the copy destination free block B21, the 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, and B15 associated with the same GC count are selected as GC target blocks, and valid data of these blocks B13, B14, and 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 (here, 0) of the blocks B13, B14, and B15.

同様に、同じ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 GC count are selected as GC target blocks, and the valid data of these blocks B16 and B17 is copied to the copy destination free block B23, the copy destination free block The GC count of B23 is set to a value (here, 1) obtained by adding 1 to the GC count (here, 0) of the blocks B16 and B17.

時間が経過するに連れ、ブロックB21、B22、B23の各々のデータの一部は、その書き換えによって無効化されるかもしれない。これにより、ブロックB21、B22、B23の各々においては、有効データと無効データとが混在される場合がある。   As time passes, a part 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 valid data of these blocks B21 and B22 is copied to the copy destination free block B31, the GC of this copy destination free block B31 The number of times is set to a value (here, 2) obtained by adding 1 to the number of GCs (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 data in the block has been copied by a past GC operation. In order to correctly manage the number of times of GC, a value obtained by adding 1 to the number of times of GC of the GC target block is taken over by 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 times of GC to be managed is 10, for example, the number-of-GCs management list 34 may be composed of eleven GC number lists respectively corresponding to the number of GCs = 0 to the number of GCs = 10.

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 (for example, physical block addresses) of the blocks associated with GC count = 0. The GC count list of GC count = 1 indicates a list of block IDs (for example, physical block addresses) of the blocks associated with GC count = 1. Similarly, the GC count list of GC count = 10 indicates a list of block IDs (for example, physical block addresses) of the blocks associated with GC count = 10. Each GC count list is not limited, but may include 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 a GC target block, the garbage collection operation control unit 22 of the controller 4 firstly selects a GC target block group from a plurality of block groups (a plurality of GC count lists) respectively associated with different GC counts. May be selected. In FIG. 4, a block group with the number of GC = 5 (block B2, block B5, block B11, block B21) is selected as a block group to be subjected to GC. The case where a target block is selected is illustrated.

GC対象ブロックを選択する処理においては、例えば、まず、所定の条件に合致するブロックが最初のGC候補として選択されてもよい。所定の条件に合致するブロックは、アクティブブロック(ホスト2によって書き込まれたデータを含むブロック)の中で最も無効データ量が多いブロックであってもよい。他の実施形態では、所定の条件に合致するブロックは、アクティブブロックの中で最も古いブロックであってもよい。以下では、最も無効データ量が多いブロックが、最初のGC候補として選択される場合を想定する。   In the process of selecting a GC target block, for example, first, a block that meets a predetermined condition may be selected as the first GC candidate. The block that satisfies the predetermined condition may be a block having the largest amount of invalid data among the active blocks (blocks including 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 having 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 with the largest invalid data amount is the block B5, the controller 4 specifies a GC count list including the block B5 (here, a GC count list of 5 GC counts), A block group (block B2, block B5, block B11, block B21) indicated by the count list is selected as a GC target block group, and some GC target blocks are selected from the GC target block group. For example, among the blocks B2, B5, B11, and B21, some upper blocks having a large invalid data amount may be selected as the GC target blocks. In this case, for example, the block B5 and one or more upper blocks having the largest invalid data amount among the blocks B2, B11, and B21 may be selected as the GC target blocks.

図5は、コントローラ4によって実行されるGC動作を示す。   FIG. 5 shows a 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 blocks (here, blocks B2, B5, and B11) having the same GC count to the copy destination free block B1000. Then, the controller 4 updates the lookup table 33 and maps each LBA of the 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. Block B1000 is added to the GC count list of GC count = 6. 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 where the GC count is 5.

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

図6では、互いに更新頻度の異なる3種類のデータ(データA、データB、データC)がSSD3に書き込まれる場合が想定されている。SSD3のデータ記憶領域(LBAスペース)は、LBAグループA、B、Cに対応する3つのスペースを含む。   FIG. 6 assumes that three types of data (data A, data B, and 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 LBA groups A, B, and C.

LBAグループAに書き込まれるデータAは更新頻度の低いデータであり、且つデータAの量はデータA、B、Cの中で最も多い。つまり、LBAグループAは最も大きいLBA範囲を有する。   The data A written to 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 to the LBA group C is frequently updated data, 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 to the LBA group B has an intermediate update frequency between the data A and the data C, and the amount of the data B is intermediate 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 SSD 3 may be, for example, 50%. The ratio of the amount of data B to the total user capacity of SSD 3 may be, for example, 30%. The ratio of the amount of the data C to the total user capacity of the SSD 3 may be, for example, 20%.

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

この場合、例えば、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. The host 2 issues a write command requesting a write to the data A (LBA group A) from the host 2 to the SSD 3 at a rate of once every five write commands. For example, the data C is updated at a high frequency of one time (50%) for two write commands.

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

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

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

データCの更新(書き換え)よって無効データ量が増えたブロックそれぞれは、いずれGC対象ブロックとなり、これらブロックからコピー先フリーブロックに有効データがコピーされる。各GC対象ブロックにおいては、データCの多くが無効化され且つデータA、データBの多くが有効データに維持されている確率が高い。このため、コピー先ブロックにおいては、GC対象ブロックに比べてデータAの量とデータBの量とが増え、代わりに、GC対象ブロックに比べてデータCの量が減る。   Each block in which the amount of invalid data has increased due to the update (rewrite) of the data C eventually becomes a GC target block, and valid data is copied from these blocks to a 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. For this reason, in the copy destination block, the amount of data A and the amount of data B increase as compared with the GC target block, and instead, the amount of data C decreases as compared with the GC target block.

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

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

ブロックの容量に対するデータCの量の割合は、1回または2回程度のGC動作によって速く低下される。GC回数が増えるにつれて、ブロックの容量に対するデータBの量の割合も徐々に低下される。   The ratio of the amount of data C to the capacity of the block is rapidly reduced by one or two GC operations. As the number of GC 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, since the valid data in the block with a small number of GC times and the valid data in the block with a large number of GC times are not copied to the same copy destination free block, (1) a group containing almost only data A (for example, about 7 to 10 times of GC); (2) a group containing data A and data B and containing almost no data C (for example, about 3 to 6 times of GC). ), (3) It can be classified into a group including data A, data B and data C (for example, about 0 to 2 times of GC).

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

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

図8のフローチャートは、コントローラ4によって実行されるGC動作の手順を示す。   The flowchart of FIG. 8 shows a 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 smaller than the threshold th1 (step S12). This check may be performed periodically. For example, the number of remaining free blocks may be checked when a new free block is to 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 th1 (YES in step S12), the controller 4 first selects the first GC candidate from all active blocks. The first GC candidate may be a 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 the 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 having the maximum invalid data amount). Is selected, and some GC target blocks are selected from the first block group (step S14). In step S14, a block group (first block group) indicated by the GC count list including the first GC candidate (for example, the block with the maximum invalid data amount) is selected, and several blocks are selected from the first block group. Is selected. In this case, the first GC candidate (for example, the block with the maximum invalid data amount) and another one or more blocks included in the GC count list may be selected as the GC target blocks.

コントローラ4は、これら選択されたGC対象ブロック内の全ての有効データをコピー先フリーブロックにコピーする(ステップS15)。ステップS15では、これら選択されたGC対象ブロック内の有効ページそれぞれから有効データがリードされ、リードされた有効データがコピー先フリーブロックの利用可能ページそれぞれに書き込まれる。ステップS15では、さらに、コントローラ4は、ルックアップテーブル(LUT)33を更新して、コピーされた有効データのLBAをコピー先フリーブロックの物理アドレスに関連付けると共に、ページ管理テーブルを更新して、各GC対象ブロック内の元のページ(つまりこのLBAが関連付けられていた古いデータ)を無効化する。この場合、コントローラ4は、まず、ルックアップテーブル(LUT)33を参照することによって、コピーされた有効データが格納されている元のページの物理アドレスを取得してもよく、そして、ページ管理テーブルを更新して、この物理アドレスに対応する有効/無効フラグを無効を示す値に設定してもよい。   The controller 4 copies all the valid data in the selected GC target block to the copy destination free block (Step S15). In step S15, valid data is read from each of the valid pages in the selected GC target block, and the read valid data is written to each available page of the copy destination free block. In step S15, 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 updates the page management table, The original page in the GC target block (that is, the old data associated with this LBA) 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. 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)。   Thereafter, the controller 4 sets the GC count of the selected GC target block + 1, that is, a value obtained by adding 1 to the GC count of the first block group as the GC count 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 counts.

例えば、最大無効データ量のブロックの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 with the maximum invalid data amount is smaller than the threshold, 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 count as close as possible to the GC count 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 times of GC of the block B300 is 10. In this case, the controller 4 checks the total valid 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 count management list with the GC count of 10 is only the block B300, or when about 2 or 3 blocks are included in the GC count management list with the GC count of 10, Is very small, the controller 4 selects a block group on which the GC operation is to be executed together with the block group of GC count = 10.

この場合、コントローラ4は、最大無効データ量のブロックB300のGC回数よりも1回以上少ないGC回数を有する全てのブロック群(ここでは、GC回数9のブロック群、GC回数8のブロック群、GC回数7のブロック群、…GC回数0のブロック群)の中で、最大のガベージコレクション回数を有するブロック群を選択してもよい。   In this case, the controller 4 determines that all the blocks having the number of GCs that are at least one less than the number of GCs of the block B300 having the maximum invalid data amount (here, the block group having the number of GCs 9; the block group having the number of GCs 8; A 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 times GC is 0.

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

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, and B43). Then, the controller 4 copies the valid data of the block B300 and the valid data of the block group with the GC count = 8 to the copy destination free block. In this case, not all the valid data in the blocks B41, B42, and B43 need be used, and valid data in at least one of the blocks B41, B42, and 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 numbers of times of GC.

コントローラ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 smaller than the threshold th1 (step S22). As mentioned above, this check may be performed periodically.

残りフリーブロックの数が閾値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 th1 (YES in step S22), the controller 4 first selects the first GC candidate from all active blocks. The first GC candidate may be a 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 the 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 having the maximum invalid data amount). Is determined, and it is determined whether or not the total amount of valid data of this block group (first block group) is equal to or smaller than a threshold th2 (step S24).

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

例えば、閾値th2は、SSD3内の一つのブロックの容量を示す値に予め設定されていてもよい。これにより、最初のGC候補のGC回数と同じGC回数に関連づけられたブロック群のみでGC動作が実行できない場合にのみ、マージ処理の実行を許可することができる。あるいは、閾値th2は、SSD3内の1つのブロックの容量の整数倍、例えば2倍の値に設定されていても良い。   For example, the threshold th2 may be set in advance to a value indicating the capacity of one block in the SSD3. Thus, the execution of the merge process can be permitted only when the GC operation cannot be executed only in 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, a value that is twice as large.

この第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 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 with 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 look-up table (LUT) 33 to associate the LBA of the copied valid data with the physical address of the free block at the copy destination and to change the original page in each GC target block. Disable.

この後、コントローラ4は、これら選択されたGC対象ブロックのGC回数+1を、つまり第1ブロック群のGC回数に1を加えた値を、コピー先フリーブロックのGC回数として設定する(ステップS26)。   Thereafter, the controller 4 sets the GC count of the selected GC target block + 1, that is, a value obtained by adding 1 to the GC count of the first block group, as the GC count 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 equal to or smaller than the threshold th2 (YES in step S24), the controller 4 is associated with the number of GC times smaller than the number of GC times in the first block group by one or more times. A block group (second block group) associated with the maximum number of GCs is selected from all the block groups (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 free block at the copy destination and to change the original page in each GC target block. Disable.

コントローラ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 +1 of the second block group as the GC count of the copy destination free block, or sets the GC count +1 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 number of GC times of the second block group + 1 is set as the number of GC times 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 of the first block group + 1 plus 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 merging process only for a block group having a specific GC count or more.

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

一方、GC回数の少ないブロックにおいては、データBまたはデータCが含まれている可能性が高い。このようなブロックについては、そのブロックのGC動作をすぐに実行せずとも、時管理経過に伴ってブロック内の全てのデータが無効化される可能性がある。   On the other hand, a block having a small number of times of GC is likely to include data B or data C. Regarding such a block, even if the GC operation of the block is not immediately executed, all data in the block may be invalidated with the passage of time management.

したがって、マージ処理を許可するブロック群をマージ許可閾値th3以上のGC回数を有するブロック群に対してのみに許可することにより、無駄なコピーの発生を防ぐことができ、GCの効率を高めることができる。   Accordingly, by permitting only the blocks having the number of GCs equal to or greater than the merge permission threshold th3 to permit the group of blocks to be permitted to perform the merging process, it is possible to prevent the occurrence of useless copying and to increase the efficiency of GC. it can.

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

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

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

図12のフローチャートは、マージ処理を特定のGC回数以上のブロック群に対してのみ許可する動作を含むGC動作の手順を示す。   The flowchart of FIG. 12 shows a procedure of a GC operation including an operation of permitting a merge process only for a block group having a specific number of GC 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 in addition to the processes described in FIG. Hereinafter, the processing of steps S30 to S33 will be mainly described.

第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 th2 (YES in step S24), the process of the controller 4 proceeds to step S30. In step S30, the controller 4 determines whether or not the GC count of the first block group is equal to or larger than the merge permission threshold th3.

第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 processing in steps S27 to S29 described with reference to FIG.

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

ステップ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 a block having the largest amount of invalid data next to the block of the first GC candidate as a new GC candidate, and selects a block group indicated by the GC count list including the new GC candidate as a GC. It may be selected 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 destination free block and the GC count of the GC target block group. A value is set (step S33).

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

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

図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 allocates 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 use 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 an allocation number (sequential number) corresponding to each block address. These allocation numbers indicate the order relation of the blocks allocated to the write destination block 62. That is, the controller 4 assigns an assignment number indicating the assignment order to each of the blocks assigned as the write target blocks, and manages these assignment 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 to the write buffer 31. Thereafter, 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 more 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 a 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 assignment number (sequential number) of this block assigned as the new write destination block 62 to 2.

アクティブブロックリスト61内の何れかのブロックの全てのデータがその更新によって無効化されたならば、このブロックはフリーブロックリスト60に移動される。   If all data in any block in the active block list 61 has been 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 falls below the threshold th1, the above-described GC operation for creating free blocks is performed.

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

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

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

(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 included in block (3) First physical storage location (old physical address) in NAND memory 5 to which data was written by the previous write to the same LBA
(4) Second physical storage location (new physical address) in the NAND memory 5 to which data is to be written by the current write
(5) Allocated for writing data from the host 2 between the allocation of the block including the first physical storage location (old physical address) and the allocation of the block including the second physical storage location (new physical address). The number of blocks (1) to (4) is ordinary management information in the SSD 3 and is not prepared exclusively for calculating the accumulated data writing amount. For example, by referring to the look-up table (LUT) 33, the controller 4 can easily acquire the physical address mapped to the LBA in the received write command as the first physical storage location.

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

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

図15では、LBA10を含むライトコマンドが受信された時に実行される累積データ書き込み量算出動作を示している。   FIG. 15 shows an operation of calculating the accumulated data write amount 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. Have been. If the allocation number of the block B51 is 10 and the allocation number of the block B51 is 13, it is understood that two write destination blocks (for example, blocks B52 and B61) have been allocated between the block 51 and the block B62. .

累積データ書き込み量は、d1+d2+d2+d3で与えられる。   The cumulative data writing 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 following the page Px, or the capacity corresponding to the number of 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 larger the number of write commands received from the host 2 between the reception of the previous write command including the LBA 10 and the reception of the current write command including the LBA 10, the larger the accumulated data write amount. Therefore, the above-described cumulative data write amount can represent the update frequency of data specified by the LBA 10, that is, the frequency of writing to the LBA 10.

ライトコマンドの受信時に、コントローラ4は、以下の手順で累積データ書き込み量を取得(算出)してもよい。   When receiving the write command, the controller 4 may acquire (calculate) the accumulated data write amount in 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 acquires the old physical address (here, PA1) mapped to the LBA (here, LBA10) included in the write command with reference to the look-up table (LUT) 33. Then, the controller 4 refers to the block use order management list 35 and assigns the block assignment number (here, 10) specified by the old physical address and the block assignment number specified by the new physical address (here, PA2). And a number (here, 13). 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 calculates the difference between the assignment of the block designated by the old physical address and the assignment of the block designated by the new physical address from the difference between the assignment numbers (13) and (10). The total number of blocks (here, 2) allocated as the write destination block is obtained. As a result, the accumulated data write amount (= d1 + d2 + d2 + d3) can be obtained (calculated).

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

ここでは、この処理シーケンスが、ライトコマンドとライトデータとが分割されているNCQ(Native Command Queing)システムに適用される場合を想定する。   Here, it is assumed that this processing sequence is applied to an NCQ (Native Command Quing) 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 the 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. Is transmitted to the host 2. The command permission response is a permission response indicating an acknowledgment (permission of execution of the write command) for the received write command. When the SSD 3 transmits a permission response to the host 2, transfer of the write data specified by the write command is started. The permission response may include a value for identifying a write command to be permitted to be executed. The accumulated 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 receiving 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 transmits 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 to the write buffer 31.

ホスト2は、SSD3から受信されるコマンド許可応答に含まれる累積データ書き込み量に基づいて、LBAxのデータの実際の更新頻度(LBAxへのライトの頻度)を把握することができる。   The host 2 can grasp the actual update frequency of LBAx data (frequency of writing to LBAx) based on the accumulated 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 update frequency of the LBAx data expected by the host 2, for example, the actual update frequency of the LBAx data is expected by the host 2. If the update frequency is higher than the update frequency, the host 2 may send an abort command to the SSD 3 to abort the sent write command as necessary. In this case, the writing of the data specified by the write command is not executed.

図17のフローチャートは、コントローラ4によって実行される累積データ書き込み量応答処理の手順を示す。   The flowchart of FIG. 17 shows the procedure of the cumulative data writing 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 the start LBA from the host 2 (Step S51). The controller 4 includes an old physical address mapped to the LBAx, a new physical address to be mapped to the LBAx, an allocation number given to a block including a physical storage location specified by the old physical address, and a new physical address. The accumulated data write amount from the previous write to the LBAx to the current write to the LBAx is calculated based on the assignment number assigned to the block (current write destination block) including the physical storage location specified by It is calculated (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 write data corresponding to the write command or an abort command for aborting the write command is received from the host 2 (step S54).

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

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

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

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

図18は、累積データ書き込み量応答処理の別の処理シーケンスを示す。   FIG. 18 shows another processing sequence of the cumulative data writing 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 receiving the write command, the controller 4 of the SSD 3 transmits a command permission response to the host 2. In response to receiving the command permission response, the host 2 sends the write data to the SSD 3. The write data is written to the write buffer 31. The controller 4 of the SSD 3 calculates the accumulated data write amount (Step S58). The process of calculating the accumulated data write amount may be started in response to receiving a write command.

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

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

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

コントローラ4は、LBAxを開始LBAとして含むライトコマンドをホスト2から受信する(ステップS61)。コントローラ4は、許可応答をホスト2へ返す(ステップS62)。コントローラ4は、ライトデータをホスト2から受信する(ステップS63)。ライトデータはライトバッファ31に書き込まれる。   The controller 4 receives a write command including LBAx as the 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 to the write buffer 31.

コントローラ4は、LBAxにマッピングされている旧物理アドレスと、LBAxにマッピングされるべき新物理アドレスと、旧物理アドレスによって指定される物理記憶位置を含むブロックに付与された割り当て番号と、新物理アドレスによって指定される物理記憶位置を含むブロック(現在の書き込み先ブロック)に付与された割り当て番号等に基づいて、LBAxへの前回の書き込みからLBAxへの今回の書き込みまでの累積データ書き込み量を算出する(ステップS64)。コントローラ4は、ステップS65に進む。   The controller 4 includes an old physical address mapped to the LBAx, a new physical address to be mapped to the LBAx, an allocation number given to a block including a physical storage location specified by the old physical address, and a new physical address. Is calculated from the last write to LBAx to the current write to LBAx based on the assignment number and the like 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, maps the new physical address to LBAx, and updates the page management table. To invalidate the old physical address (old data).

この後、コントローラ4は、累積データ書き込み量を含む、コマンド完了のレスポンスをホスト2へ返す(ステップS66)。   Thereafter, 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, a command completion response may be transmitted to the host 2 when the write data is written to the write buffer 31.

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

この時間経過値は同じLBAへの前回のライトからの時間経過に関する情報であり、時間経過値の例は、同じLBAへの前回のライトの時刻であってもよいし、同じLBAへの前回のライトの時刻とこの同じLBAへの今回のライトの時刻との間の時間間隔であってもよい。   The elapsed time value is information on the elapsed time from the previous write to the same LBA, and the example of the elapsed time value may be the time of the previous write to the same LBA or the previous write to the same LBA. It may be a 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 look-up table (LUT) 33 configured to manage the correspondence between the LBA, the physical address, and the last write time in a predetermined management unit such as 4 Kbytes. Show.

ルックアップテーブル(LUT)33は、LBA毎に物理アドレス記憶領域33Aと時刻記憶領域33Bとを含む。各時刻記憶領域33Bは、対応するLBAへのライトが発生した時刻を示す値、つまり対応するLBAのデータがライトされた時刻を示す値、を保持するために使用される。各時刻記憶領域33Bに保持される時刻は、例えば、時分秒であってもよい。   The look-up 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 a time at which writing to the corresponding LBA has occurred, that is, a value indicating a time at which data of the corresponding LBA has been written. The time held in each time storage area 33B may be, for example, hours, minutes, and seconds.

ある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 stores the data specified by the write command in the time area 33B corresponding to this LBA. The time at which (write data) was written is registered. The physical address indicates the physical address of the physical storage location where the data specified by the write command is written. The write time may be the time at which the write command was received, the time at which the data specified by the write command was written to the write buffer 31, or the data specified by the write command. May be the time at which was written to the write destination block of the NAND memory 5.

図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 permission response including the elapsed time 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 the start LBA from the host 2 (Step S71). The controller 4 refers to the look-up table (LUT) 33 and acquires the time of the previous write to LBAx, that is, the time at which 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 the 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 (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 the write command or the abort command for aborting the write command is received from the host 2 (step S74).

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

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

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

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

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

図22のフローチャートは、SSD3から通知される累積データ書き込み量/時間経過値に基づいてホスト2によって実行される処理の手順を示す。   The flowchart of FIG. 22 shows a procedure of processing executed by the host 2 based on the accumulated data writing amount / time elapsed 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 / time elapsed value notified from the SSD 3. For example, the file system 43 of the host 2 includes a data management unit. The data management unit classifies data into a plurality of types of data groups, and includes a data group (hot data) in which data is frequently updated and a frequency. It may be separated into a data group (Cold data) that is not updated. If the update frequency of the data written to the SSD 3 is equal to or greater than a certain threshold, the data management unit can recognize that the data is Hot data.

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

あるいは、もしSSD3が高い耐久性を有する高価格SSDとして実現されているならば、HotデータをSSD3内に残し、ColdデータをSSD3から別のストレージデバイスに移動しても良い。高い耐久性を有する高価格SSDの例は、メモリセル当たりに1ビットの情報を格納するSLC−SSDを含む。   Alternatively, if the SSD 3 is realized as a high-priced SSD having 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 one bit of information per memory cell.

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

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

ホスト2は、LBAxを含むライトコマンドをSSD3に送信し(ステップS81)、累積データ書き込み量または時間経過値を含む応答(許可応答、コマンド完了レスポンス)をSSD3から受信する(ステップS82)。   The host 2 transmits 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 frequency of updating the LBAx data (the frequency of writing to the LBAx) is equal to or higher than a predetermined upper limit frequency (threshold value th4) based on the accumulated data write amount or the elapsed time value (step S83). ). For example, in a case where the cumulative data writing amount is notified from the SSD 3, the host 2 may determine whether the cumulative data writing amount is equal to or larger than the threshold data amount indicated by the threshold th4. In the case where the time elapsed value (time of the previous write to the same LBA) is notified from the SSD 3, the host 2 calculates a time interval by subtracting the time of the previous write from the current time, and this time interval is , May be determined to be equal to or longer than the threshold time interval indicated by the threshold th4. Alternatively, the host 2 converts the accumulated data write amount or the elapsed time value into a ratio [percent] indicating the number of write accesses to the LBAx at one time, and this time interval is It may be determined whether or not it is equal to or longer than the threshold time interval indicated by the threshold th4.

LBAxのデータの更新頻度(LBAxへのライトの頻度)が閾値th4以上であるならば(ステップS83のYES)、ホスト2は、LBAxのデータを高更新頻度データグループ(Hotデータ)に分類し(ステップS84)、LBAxのデータをSSD3から他のストレージデバイスに移動する(ステップS85)。   If the update frequency of the LBAx data (the frequency of writing to the LBAx) is equal to or greater than the threshold th4 (YES in step S83), the host 2 classifies the LBAx data into a high update frequency data group (Hot data) ( In step S84, the data of LBAx is moved from the SSD 3 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 a permission response to the write command, the host 2 may execute a process of aborting the write command.

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

この情報処理装置は、サーバコンピュータ、またはパーソナルコンピュータとして実現される。この情報処理装置は、プロセッサ(CPU)101、メインメモリ102、BIOS−ROM103、ネットワークコントローラ105、周辺インタフェースコントローラ106、コントローラ107、およびエンベデッドコントローラ(EC)108等を含む。   This information processing device is realized as a server computer or a personal computer. The information processing apparatus 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 the information processing device. The processor 101 executes various programs loaded from any one of the plurality of SSDs 3 into the main memory 102. The main memory 102 is composed of a random access memory such as a DRAM. The program executed by the processor 101 includes the above-described application software layer 41, OS 42, and file system 43.

また、プロセッサ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 nonvolatile 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. The peripheral interface controller 106 is configured to execute communication with a peripheral device such as a USB device.

コントローラ107は、複数のコネクタ107Aにそれぞれ接続されるデバイスとの通信を実行するように構成されている。本実施形態では、複数のSSD3が複数のコネクタ107Aにそれぞれ接続される。コントローラ107は、SAS expander、PCIe Switch、PCIe expander、フラッシュアレイコントローラ、またはRAIDコントローラ等である。   The controller 107 is configured to execute communication with devices respectively connected to the plurality of connectors 107A. In the present embodiment, a plurality of SSDs 3 are connected to a 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 execute power management of the information processing device. The EC 108 powers on and off the information processing device in response to a user's operation of a power switch. 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 processing described in FIG. 22 is executed by the processor 101 under the control of the file system 43.

図24は、複数のSSD3とホスト2とを含む情報処理装置の構成例を示す。   FIG. 24 illustrates a configuration example of an information processing apparatus 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 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として機能する。   A system board (motherboard) 202 is arranged in the housing 201. Various electronic components including the CPU 101, the memory 102, the network controller 105, and the controller 107 are mounted on the system board (motherboard) 202. These electronic components function as the host 2.

以上説明したように、本実施形態の「LBAベースの更新頻度通知機能」によれば、LBAを含むライトコマンドがホスト2から受信された場合、このLBAへの前回のライトからこのLBAへの今回のライトまでにホスト2によってNANDメモリ5に書き込まれたデータの総量、またはこのLBAへの前回のライトからこのLBAへの今回のライトまでの時間経過に関する値が取得される。そして、データの総量、または時間経過に関する値が、受信されたライトコマンドに対する応答としてホスト2に通知される。したがって、データの更新頻度を、各ライトコマンドに含まれるLBAの単位で、ホスト2に提供することが可能となる。   As described above, according to the “LBA-based update frequency notification function” of the present embodiment, when a write command including an LBA is received from the host 2, the last write to this LBA is performed this time to this LBA. The total amount of data written to the NAND memory 5 by the host 2 until the writing of the LBA, or a value related to the time elapsed from the previous writing to this LBA to the current writing to this LBA is obtained. Then, the host 2 is notified of the total amount of data or the value relating to the passage of time as a response to the received write command. Therefore, the data update frequency can be provided to the host 2 in units of LBA included in each write command.

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

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   Although several embodiments of the present invention have been described, these embodiments are provided by way of example and are not intended to limit the scope of the invention. These new embodiments can be implemented in other various 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 their equivalents.

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

Claims (8)

不揮発性メモリと、
ホストから受信されるライトコマンドに応じて前記不揮発性メモリにデータを書き込むように構成されたコントローラとを具備し、
前記コントローラは、
第1の論理アドレスを含む前回のライトコマンドである第1のライトコマンドを前記ホストから受信し、
前記第1のライトコマンドを受信した後、前記第1の論理アドレスと同じ論理アドレスを含む今回のライトコマンドである第2のライトコマンドを前記ホストから受信し、
前記第1のライトコマンドを受信してから前記第2のライトコマンドを受信するまでの間に前記ホストから受信したデータの総量、または前記第1のライトコマンドを受信してから前記第2のライトコマンドを受信するまでの経過時間に関する値を取得し、
前記データの総量、または前記経過時間に関する値を、前記ホストに通知するように構成されている、メモリシステム。
A non-volatile memory;
Anda controller configured to write data into the nonvolatile memory in response to a write command received from the host,
The controller is
Receiving from the host a first write command that is a previous write command including a first logical address;
After receiving the first write command, receiving from the host a second write command that is a current write command including the same logical address as the first logical address;
The total amount of data received from the host between the time when the first write command is received and the time when the second write command is received, or the time when the second write command is received after the first write command is received. Get the value about the elapsed time until receiving the command,
A memory system configured to notify the host of a total amount of the data or a value related to the elapsed time.
前記コントローラは、
前記第1のライトコマンドによってデータが書き込まれた前記不揮発性メモリ内の第1物理記憶位置と、前記第2のライトコマンドによってデータが書き込まれるべき前記不揮発性メモリ内の第2物理記憶位置と、前記第1物理記憶位置を含む第1ブロックの割り当てから前記第2物理記憶位置を含む第2ブロックの割り当てまでの間に前記ホストからのデータの書き込みのために割り当てられたブロックの数とに基づいて、前記データの総量を取得し、
前記取得された前記データの総量を、前記ホストに通知するように構成されている請求項1記載のメモリシステム。
The controller is
A first physical storage position of the first light the non-volatile memory in which data is written by the command, and the second physical storage location of the second write the nonvolatile memory where data is to be written by the command, A number of blocks allocated for writing data from the host between an allocation of a first block including the first physical storage location and an allocation of a second block including the second physical storage location. To obtain the total amount of the data,
2. The memory system according to claim 1, wherein the memory is configured to notify the host of the total amount of the acquired data.
前記コントローラは、論理アドレスと物理アドレスとの間のマッピングを管理する論理物理アドレス変換テーブルを参照することによって、前記第1の論理アドレスにマッピングされている物理アドレスを、前記第1物理記憶位置として取得するように構成されている請求項2記載のメモリシステム。   The controller refers to a logical-physical address conversion table that manages mapping between a logical address and a physical address, and sets a physical address mapped to the first logical address as the first physical storage location. 3. The memory system of claim 2, wherein the memory system is configured to acquire. 前記コントローラは、
前記不揮発性メモリ内のフリーブロックの一つを、前記ホストからのデータが書き込まれるべき書き込み対象ブロックとして割り当て、
前記ホストから受信されるライトデータを前記書き込み対象ブロックの書き込み可能ページに書き込み、
前記書き込み対象ブロックに書き込み可能ページが無くなった場合に、新たなフリーブロックを前記書き込み対象ブロックとして割り当て、
前記書き込み対象ブロックとして割り当てられたブロックそれぞれに対してその割り当て順序を示す番号を付与し、
前記第1物理記憶位置を含む第1ブロックに付与された番号と前記第2物理記憶位置を含む第2ブロックに付与された番号とに基づいて、前記第1ブロックの割り当てから前記第2ブロックの割り当てまでの間に前記ホストからのデータの書き込みのために割り当てられた前記ブロックの数を取得するように構成されている請求項2記載のメモリシステム。
The controller is
Allocating one of the free blocks in the nonvolatile memory as a write target block to which data from the host is to be written,
Write write data received from the host to a writable page of the write target block,
When there is no writable page in the write target block, a new free block is allocated as the write target block,
A number indicating the order of assignment is assigned to each of the blocks assigned as the write target block,
Based on the number assigned to the first block including the first physical storage location and the number assigned to the second block including the second physical storage location, the assignment of the first block to the second block 3. The memory system according to claim 2, wherein the memory system is configured to acquire a number of the blocks allocated for writing data from the host before the allocation.
不揮発性メモリと、
ホストから受信されるライトコマンドに応じて前記不揮発性メモリにデータを書き込むように構成されたコントローラとを具備し、
前記コントローラは、
第1の論理アドレスを含む前回のライトコマンドである第1のライトコマンドを前記ホストから受信し、
前記第1のライトコマンドを受信した後、前記第1の論理アドレスと同じ論理アドレスを含む今回のライトコマンドである第2のライトコマンドを前記ホストから受信し、
前記第1のライトコマンドによってデータが書き込まれた前記不揮発性メモリ内の第1物理記憶位置と、前記第2のライトコマンドによってデータが書き込まれるべき前記不揮発性メモリ内の第2物理記憶位置と、前記第1物理記憶位置を含む第1ブロックの割り当てから前記第2物理記憶位置を含む第2ブロックの割り当てまでの間に前記ホストからのデータの書き込みのために割り当てられたブロックの数とに基づいて、前記第1のライトコマンドを受信してから前記第2のライトコマンドを受信するまでに、前記ホストから受信したデータの総量を取得し、
前記取得された前記データの総量を前記ホストに通知するように構成されている、メモリシステム。
A non-volatile memory;
Anda controller configured to write data into the nonvolatile memory in response to a write command received from the host,
The controller is
Receiving a first write command, which is a previous write command including a first logical address, from the host;
After receiving the first write command, receiving from the host a second write command that is a current write command including the same logical address as the first logical address;
A first physical storage position of the first light the non-volatile memory in which data is written by the command, and the second physical storage location of the second write the nonvolatile memory where data is to be written by the command, A number of blocks allocated for writing data from the host between an allocation of a first block including the first physical storage location and an allocation of a second block including the second physical storage location. Obtaining a total amount of data received from the host from the reception of the first write command to the reception of the second write command;
A memory system configured to notify the host of the total amount of the acquired data.
不揮発性メモリを制御し、ホストから受信されるライトコマンドに応じて前記不揮発性メモリにデータを書き込む制御方法であって、
第1の論理アドレスを含む前回のライトコマンドである第1のライトコマンドを前記ホストから受信することと、
前記第1のライトコマンドに応じて前記不揮発性メモリにデータを書き込むことと、
前記第1のライトコマンドを受信した後、前記第1の論理アドレスと同じ論理アドレスを含む今回のライトコマンドである第2のライトコマンドを前記ホストから受信することと、
前記第1のライトコマンドを受信してから前記第2のライトコマンドを受信するまでの間に前記ホストから受信したデータの総量、または前記第1のライトコマンドを受信してから前記第2のライトコマンドを受信するまでの経過時間に関する値を取得することと、
前記データの総量または前記経過時間に関する値を、前記ホストに通知することと、を具備する制御方法。
A control method for controlling a nonvolatile memory and writing data to the nonvolatile memory according to a write command received from a host,
Receiving from the host a first write command that is a previous write command including a first logical address;
Writing data to the non-volatile memory in response to the first write command;
Receiving, from the host, a second write command that is a current write command including the same logical address as the first logical address after receiving the first write command;
The total amount of data received from the host between the time when the first write command is received and the time when the second write command is received, or the time when the second write command is received after the first write command is received. Obtaining a value for the elapsed time before receiving the command;
Notifying the host of a value relating to the total amount of data or the elapsed time to the host.
前記取得することは、前記第1のライトコマンドによってデータが書き込まれた前記不揮発性メモリ内の第1物理記憶位置と、前記第2のライトコマンドによってデータが書き込まれるべき前記不揮発性メモリ内の第2物理記憶位置と、前記第1物理記憶位置を含む第1ブロックの割り当てから前記第2物理記憶位置を含む第2ブロックの割り当てまでの間に前記ホストからのデータの書き込みのために割り当てられたブロックの数とに基づいて、前記データの総量を取得することを含み、
前記通知することは、前記取得された前記データの総量を、前記ホストに通知することを含む請求項6記載の制御方法。
The obtaining may include a first physical storage location in the nonvolatile memory to which data is written by the first write command, and a second physical storage location in the nonvolatile memory to which data is to be written by the second write command. 2 physical storage locations and allocated for writing data from the host between the allocation of the first block including the first physical storage location and the allocation of the second block including the second physical storage location. Obtaining the total amount of the data based on the number of blocks and
The control method according to claim 6, wherein the notifying includes notifying the host of the total amount of the acquired data.
不揮発性メモリと、
前記不揮発性メモリを制御するコントローラとを具備し、
前記コントローラは、
第1の論理アドレスを含む前回のライトコマンドである第1のライトコマンドをホストから受信してから前記第1の論理アドレスと同じ論理アドレスを含む今回のライトコマンドである第2のライトコマンドを前記ホストから受信するまでの経過時間に関する値を前記ホストに通知するように構成されている、メモリシステム。
A non-volatile memory;
Anda controller for controlling the nonvolatile memory,
The controller is
After receiving a first write command, which is a previous write command including a first logical address, from a host , a second write command, which is a current write command including the same logical address as the first logical address , is described above. A memory system configured to notify the host of a value relating to an elapsed time until reception from the host.
JP2018180110A 2018-09-26 2018-09-26 Memory system and control method Active JP6666405B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018180110A JP6666405B2 (en) 2018-09-26 2018-09-26 Memory system and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018180110A JP6666405B2 (en) 2018-09-26 2018-09-26 Memory system and control method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2015242998A Division JP6414853B2 (en) 2015-12-14 2015-12-14 Memory system and control method

Publications (2)

Publication Number Publication Date
JP2019016383A JP2019016383A (en) 2019-01-31
JP6666405B2 true JP6666405B2 (en) 2020-03-13

Family

ID=65358709

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018180110A Active JP6666405B2 (en) 2018-09-26 2018-09-26 Memory system and control method

Country Status (1)

Country Link
JP (1) JP6666405B2 (en)

Also Published As

Publication number Publication date
JP2019016383A (en) 2019-01-31

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
US11847318B2 (en) Memory system for controlling nonvolatile memory
US10592117B2 (en) Memory system and method for controlling nonvolatile memory
JP6448570B2 (en) Storage system, information processing system, and control method
JP6444917B2 (en) Storage system, information processing system, and control method
US10209894B2 (en) Memory system and method for controlling nonvolatile memory
KR102094236B1 (en) Storage device and computer system
JP2017162065A (en) Storage system, information processing system, and control method
JP2016170583A (en) Memory system and information processing system
JP2017027388A (en) Memory system and control method for nonvolatile memory
JP6716757B2 (en) Memory system and control method
JP6649452B2 (en) Memory system and control method for nonvolatile memory
JP6666405B2 (en) Memory system and control method
JP6721765B2 (en) Memory system and control method
JP6552701B2 (en) Memory system and control method
JP2018200720A (en) Memory system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180926

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190523

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190604

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190802

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: 20200121

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200220

R150 Certificate of patent or registration of utility model

Ref document number: 6666405

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150