Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6860722B2 - Memory system control method - Google Patents
[go: Go Back, main page]

JP6860722B2 - Memory system control method - Google Patents

Memory system control method Download PDF

Info

Publication number
JP6860722B2
JP6860722B2 JP2020038164A JP2020038164A JP6860722B2 JP 6860722 B2 JP6860722 B2 JP 6860722B2 JP 2020038164 A JP2020038164 A JP 2020038164A JP 2020038164 A JP2020038164 A JP 2020038164A JP 6860722 B2 JP6860722 B2 JP 6860722B2
Authority
JP
Japan
Prior art keywords
information
control unit
translation information
translation
area
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
JP2020038164A
Other languages
Japanese (ja)
Other versions
JP2020091911A (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 JP2020038164A priority Critical patent/JP6860722B2/en
Publication of JP2020091911A publication Critical patent/JP2020091911A/en
Application granted granted Critical
Publication of JP6860722B2 publication Critical patent/JP6860722B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System (AREA)

Description

本実施形態は、メモリシステムの制御方法に関する。 The present embodiment relates to a method of controlling a memory system.

従来、NAND型のフラッシュメモリを記憶媒体に用いたメモリシステムが知られている。メモリシステムに搭載される記憶媒体の容量は、増大する傾向にある。 Conventionally, a memory system using a NAND flash memory as a storage medium is known. The capacity of the storage medium mounted on the memory system tends to increase.

特開2009−211216号公報Japanese Unexamined Patent Publication No. 2009-21216

一つの実施形態は、利便性の高いメモリシステムを提供する。 One embodiment provides a highly convenient memory system.

一つの実施形態によれば、メモリシステムの制御方法は、論理位置情報と物理位置情報との対応関係を示す翻訳情報を管理することと、第1翻訳情報および第2翻訳情報を第1メモリが備える複数のページを備える第1領域に格納することであって、第1翻訳情報および第2翻訳情報を同じページに格納することと、を含む。論理位置情報はデータに関連付けられる論理的な位置情報である。物理位置情報はデータが格納された第1メモリ内の位置を示す物理的な位置情報である。翻訳情報は、複数の階層に階層化され、第1の階層に属する第1翻訳情報と第2の階層に属する第2翻訳情報とを含む。第1翻訳情報のサイズと第2翻訳情報のサイズとは等しい。各ページは前記第1メモリへの書き込み単位である。 According to one embodiment, the control method of the memory system is to manage the translation information indicating the correspondence between the logical position information and the physical position information, and the first memory transfers the first translation information and the second translation information. The present invention includes storing the first translation information and the second translation information in the same page, which is to store the plurality of pages in the first area. Logical position information is logical position information associated with data. The physical position information is physical position information indicating a position in the first memory in which data is stored. The translation information is hierarchized into a plurality of layers, and includes a first translation information belonging to the first layer and a second translation information belonging to the second layer. The size of the first translation information and the size of the second translation information are equal. Each page is a writing unit to the first memory.

図1は、第1の実施形態によるメモリシステムの構成の一例を示す図である。FIG. 1 is a diagram showing an example of a configuration of a memory system according to the first embodiment. 図2は、第1の実施形態におけるNANDメモリでのデータの処理単位と位置の最小の管理単位とを模式的に示す図である。FIG. 2 is a diagram schematically showing a data processing unit and a minimum position management unit in the NAND memory according to the first embodiment. 図3は、メモリシステムに保持される各種情報を示す図である。FIG. 3 is a diagram showing various information held in the memory system. 図4は、各種テーブルの構成の一例を説明する図である。FIG. 4 is a diagram illustrating an example of the configuration of various tables. 図5は、有効ビットマップを説明する図である。FIG. 5 is a diagram illustrating an effective bitmap. 図6は、ブロック管理情報を説明する図である。FIG. 6 is a diagram for explaining block management information. 図7は、第2テーブル、第3テーブル、および有効ビットマップの格納の様態の一例を示す図である。FIG. 7 is a diagram showing an example of the storage mode of the second table, the third table, and the effective bitmap. 図8は、キャッシュ管理情報の構成を示す図である。FIG. 8 is a diagram showing a structure of cache management information. 図9は、第2の実施形態の制御部の構成を示す図である。FIG. 9 is a diagram showing a configuration of a control unit according to the second embodiment. 図10は、第2の実施形態のRAMの構成を示す図である。FIG. 10 is a diagram showing the configuration of the RAM of the second embodiment. 図11は、第3の実施形態のRAMの構成を示す図である。FIG. 11 is a diagram showing the configuration of the RAM of the third embodiment. 図12は、第4の実施形態のRAMの構成を示す図である。FIG. 12 is a diagram showing the configuration of the RAM of the fourth embodiment. 図13は、各第1テーブルの格納の様態の変化を説明する図である。FIG. 13 is a diagram illustrating changes in the storage mode of each first table. 図14は、各第1テーブルの格納の様態の変化を説明する図である。FIG. 14 is a diagram illustrating changes in the storage mode of each first table. 図15は、各第1テーブルの格納の様態の変化を説明する図である。FIG. 15 is a diagram illustrating changes in the storage mode of each first table. 図16は、各第1テーブルの格納の様態の変化を説明する図である。FIG. 16 is a diagram illustrating changes in the storage mode of each first table. 図17は、各第1テーブルの格納の様態の変化を説明する図である。FIG. 17 is a diagram illustrating changes in the storage mode of each first table. 図18は、各第1テーブルの格納の様態の変化を説明する図である。FIG. 18 is a diagram illustrating changes in the storage mode of each first table. 図19は、各第1テーブルの格納の様態の変化を説明する図である。FIG. 19 is a diagram illustrating changes in the storage mode of each first table. 図20は、第5の実施形態のログストレージ領域を示す図である。FIG. 20 is a diagram showing a log storage area of the fifth embodiment. 図21は、メモリシステムの実装例を示す図である。FIG. 21 is a diagram showing an implementation example of a memory system.

以下に添付図面を参照して、実施形態にかかるメモリシステムを詳細に説明する。なお、これらの実施形態により本発明が限定されるものではない。 The memory system according to the embodiment will be described in detail with reference to the accompanying drawings. The present invention is not limited to these embodiments.

(第1の実施形態)
図1は、第1の実施形態によるメモリシステムの構成の一例を示す図である。このメモリシステム1は、例えば、SSD(Solid State Drive)である。以下では、不揮発性メモリとしてNAND型のフラッシュメモリ(以下、NANDメモリという)を用いる場合を例に挙げる。
(First Embodiment)
FIG. 1 is a diagram showing an example of a configuration of a memory system according to the first embodiment. The memory system 1 is, for example, an SSD (Solid State Drive). In the following, a case where a NAND type flash memory (hereinafter referred to as NAND memory) is used as the non-volatile memory will be described as an example.

メモリシステム1は、ホスト2と接続可能に構成されている。例えばCPU(Central Processing Unit)、パーソナルコンピュータ、携帯用情報機器、サーバ、等がホスト2に該当する。メモリシステム1とホスト2との間の通信のインタフェース規格としては、任意のインタフェース規格が採用可能である。2以上のホスト2がメモリシステム1に同時に接続されてもよい。ホスト2とメモリシステム1とは、ネットワークを介して接続されてもよい。 The memory system 1 is configured to be connectable to the host 2. For example, a CPU (Central Processing Unit), a personal computer, a portable information device, a server, etc. correspond to the host 2. Any interface standard can be adopted as the interface standard for communication between the memory system 1 and the host 2. Two or more hosts 2 may be connected to the memory system 1 at the same time. The host 2 and the memory system 1 may be connected via a network.

メモリシステム1は、ホスト2からのアクセスコマンドに応じてホスト2との間でデータの送受信を実行する。アクセスコマンドは、ライトコマンドおよびリードコマンドを含む。アクセスコマンドは、アクセス位置を論理的に示す位置情報を含む。論理的な位置情報としては、例えばLBA(Logical Block Address)が採用可能である。また、例えばメモリシステム1とホスト2との間の通信のインタフェース規格としてNVMeが採用される場合には、論理的な位置情報は、ネームスペースの識別情報とネームスペース内の位置を論理的に示すアドレス(例えばLBA)とが含まれていてもよい。ネームスペースとは、ネームスペースの識別情報によって特定される論理アドレス空間である。即ち、NVMeが採用される場合には、メモリシステム1は、複数の論理アドレス空間を管理することが可能である。以降、アクセスコマンドに含まれる論理的な位置情報を、論理アドレスと表記する。 The memory system 1 transmits / receives data to / from the host 2 in response to an access command from the host 2. Access commands include write commands and read commands. The access command includes location information that logically indicates the access location. For example, LBA (Logical Block Address) can be adopted as the logical position information. Further, for example, when NVMe is adopted as an interface standard for communication between the memory system 1 and the host 2, the logical position information logically indicates the identification information of the namespace and the position in the namespace. The address (eg, LBA) may be included. The namespace is a logical address space specified by the identification information of the namespace. That is, when NVMe is adopted, the memory system 1 can manage a plurality of logical address spaces. Hereinafter, the logical position information included in the access command is referred to as a logical address.

メモリシステム1は、ホストインタフェース部11、NANDメモリ12、NANDコントローラ13、RAM(Random Access Memory)14、および制御部15を備える。 The memory system 1 includes a host interface unit 11, a NAND memory 12, a NAND controller 13, a RAM (Random Access Memory) 14, and a control unit 15.

制御部15は、例えば、1以上のプロセッサを含んで構成される。制御部15は、予めメモリシステム1内の所定の位置に格納されているプログラムを実行することによって、メモリシステム1の制御を実行する。プログラムの格納位置は任意に設計される。例えば、プログラムは、予めNANDメモリ12に格納され、起動時にRAM14にロードされる。制御部15は、RAM14にロードされたプログラムを実行する。メモリシステム1の制御は、複数の処理によって構成される。制御部15が実行する複数の処理のうちの一部または全部はハードウェア回路によって実現されてもよい。また、制御部15を、ハードウェア回路である制御回路(Control Circuit)によって構成してもよい。制御部15が実行する各処理については後述する。 The control unit 15 includes, for example, one or more processors. The control unit 15 executes control of the memory system 1 by executing a program stored in a predetermined position in the memory system 1 in advance. The storage position of the program is arbitrarily designed. For example, the program is stored in the NAND memory 12 in advance and loaded into the RAM 14 at startup. The control unit 15 executes the program loaded in the RAM 14. The control of the memory system 1 is composed of a plurality of processes. A part or all of the plurality of processes executed by the control unit 15 may be realized by a hardware circuit. Further, the control unit 15 may be configured by a control circuit which is a hardware circuit. Each process executed by the control unit 15 will be described later.

ホストインタフェース部11は、メモリシステム1がホスト2と通信を行うためのインタフェース装置である。例えばホストインタフェース部11は、制御部15の制御下で、ホスト2とRAM14との間のユーザデータの転送を実行する。 The host interface unit 11 is an interface device for the memory system 1 to communicate with the host 2. For example, the host interface unit 11 transfers user data between the host 2 and the RAM 14 under the control of the control unit 15.

NANDコントローラ13は、NANDメモリ12に対するアクセスのためのインタフェース装置である。NANDコントローラ13は、制御部15による制御下で、RAM14とNANDメモリ12との間のユーザデータまたは管理情報の転送を実行する。詳細を省略するが、NANDコントローラ13は、誤り訂正処理行うことができる。 The NAND controller 13 is an interface device for accessing the NAND memory 12. The NAND controller 13 executes the transfer of user data or management information between the RAM 14 and the NAND memory 12 under the control of the control unit 15. Although details are omitted, the NAND controller 13 can perform error correction processing.

NANDメモリ12は、ストレージとして機能する不揮発性の記憶媒体である。NANDメモリ12は、1以上のチップによって構成される。 The NAND memory 12 is a non-volatile storage medium that functions as storage. The NAND memory 12 is composed of one or more chips.

図2は、第1の実施形態におけるNANDメモリ12でのデータの処理単位と位置の最小の管理単位とを模式的に示す図である。NANDメモリ12を構成するチップの内部において、データの記憶領域は、複数のブロックによって構成される。各ブロックは、複数のページによって構成される。ページは、ライトおよびリードのアクセスが可能な単位である。ブロックは、一括してデータの消去が可能な最小単位である。図2の例では、1ブロックは、n(nは自然数)個のページで構成されるものとされている。 FIG. 2 is a diagram schematically showing a data processing unit and a minimum position management unit in the NAND memory 12 in the first embodiment. Inside the chip that constitutes the NAND memory 12, the data storage area is composed of a plurality of blocks. Each block is composed of a plurality of pages. A page is a unit that can be accessed by write and read. A block is the smallest unit in which data can be erased all at once. In the example of FIG. 2, one block is composed of n (n is a natural number) pages.

1ページより小さい単位に対して物理的な位置情報(物理アドレス)が割り当てられる。ここでは、物理アドレスが割り当てられる単位を、クラスタ、と表記する。1クラスタのサイズは、ホスト2からの最小のアクセス単位と等しくてもよいし異なっていてもよい。 Physical location information (physical address) is assigned to units smaller than one page. Here, the unit to which the physical address is assigned is referred to as a cluster. The size of one cluster may be equal to or different from the minimum unit of access from host 2.

RAM14は、データを一時的に記憶するための記憶媒体である。RAM14としては、例えば、NANDメモリ12よりも高速な種類の記憶媒体が採用可能である。RAM14としては、例えば、揮発性または不揮発性の記憶媒体が採用可能である。RAM14としては、例えば、DRAM(Dynamic RAM)、SRAM(Static RAM)、FeRAM(Ferroelectric RAM)、MRAM(Magnetoresistive RAM)、PRAM(Phase change RAM)などが採用可能である。 The RAM 14 is a storage medium for temporarily storing data. As the RAM 14, for example, a storage medium of a type faster than the NAND memory 12 can be adopted. As the RAM 14, for example, a volatile or non-volatile storage medium can be adopted. As the RAM 14, for example, DRAM (Dynamic RAM), SRAM (Static RAM), FeRAM (Ferroelectric RAM), MRAM (Magnetoresistive RAM), PRAM (Phase change RAM) and the like can be adopted.

図3は、メモリシステム1に保持される各種情報を示す図である。NANDメモリ12には、緊急退避領域121、管理情報領域122、およびユーザデータ領域123が確保されている。管理情報領域122には、ログストレージ領域124が確保されている。 FIG. 3 is a diagram showing various information held in the memory system 1. An emergency evacuation area 121, a management information area 122, and a user data area 123 are secured in the NAND memory 12. A log storage area 124 is secured in the management information area 122.

ユーザデータ領域123には、1以上のユーザデータ301が格納される。各ユーザデータ301は、ホスト2から書き込み要求されたデータである。各ユーザデータ301は、1クラスタのサイズと同じサイズを有することとする。 One or more user data 301s are stored in the user data area 123. Each user data 301 is data requested to be written by the host 2. It is assumed that each user data 301 has the same size as the size of one cluster.

RAM14には、ライトバッファ141、リードバッファ142、およびキャッシュ領域143が確保されている。 A write buffer 141, a read buffer 142, and a cache area 143 are reserved in the RAM 14.

ライトバッファ141およびリードバッファ142は、ホスト2とNANDメモリ12との間のデータ転送のためのバッファである。具体的には、ライトバッファ141は、ホストインタフェース部11がホスト2から受信したユーザデータが格納される。ライトバッファ141に格納されたユーザデータは、NANDコントローラ13によってユーザデータ領域123に書き込まれる。リードバッファ142は、NANDコントローラ13によって、ユーザデータ領域123から読み出されたユーザデータ301が格納される。リードバッファ142に格納されたユーザデータ301は、ホストインタフェース部11によってホスト2に転送される。 The write buffer 141 and the read buffer 142 are buffers for data transfer between the host 2 and the NAND memory 12. Specifically, the write buffer 141 stores user data received from the host 2 by the host interface unit 11. The user data stored in the write buffer 141 is written to the user data area 123 by the NAND controller 13. The read buffer 142 stores the user data 301 read from the user data area 123 by the NAND controller 13. The user data 301 stored in the read buffer 142 is transferred to the host 2 by the host interface unit 11.

管理情報領域122は、メモリシステム1の管理のための情報(管理情報)を不揮発状態で記憶するための領域である。管理情報は、翻訳情報、有効情報、および統計情報225を含む。 The management information area 122 is an area for storing information (management information) for management of the memory system 1 in a non-volatile state. Management information includes translation information, valid information, and statistical information 225.

翻訳情報は、論理アドレスと物理アドレスとを対応付けるための情報である。論理アドレスが翻訳情報によって物理アドレスに対応付けられているため、ホスト2は論理アドレスを用いることによって当該論理アドレスに対応する物理アドレスが示す位置に格納されているユーザデータ301を読み出すことができる。ユーザデータ領域123に格納されている複数のユーザデータ301の格納位置は、翻訳情報によって論理アドレスに対応付けられている何れかの物理アドレスによって示されるか、または翻訳情報によって論理アドレスに対応付けられている何れの物理アドレスによっても示されない。前者の物理アドレスによって示される位置に格納されているユーザデータ301は、ホスト2が読み出すことができる。後者の物理アドレスによって示される位置に格納されているユーザデータ301は、ホスト2が読み出すことができない。 The translation information is information for associating a logical address with a physical address. Since the logical address is associated with the physical address by the translation information, the host 2 can read the user data 301 stored at the position indicated by the physical address corresponding to the logical address by using the logical address. The storage positions of the plurality of user data 301 stored in the user data area 123 are indicated by any physical address associated with the logical address by the translation information, or are associated with the logical address by the translation information. Not indicated by any physical address. The user data 301 stored at the position indicated by the former physical address can be read by the host 2. The user data 301 stored at the position indicated by the latter physical address cannot be read by the host 2.

制御部15は、第1のユーザデータ301をユーザデータ領域123内の第1の位置に格納する。その後、当該第1のユーザデータ301の書き込みの際に指定された論理アドレスと同一の論理アドレスの指定とともに書き込み要求されたユーザデータ301がホスト2から書き込み要求されると、制御部15は、当該書き込み要求されたユーザデータ301をユーザデータ領域123内における前記第1の位置と異なる位置に格納する。制御部15は、第1のユーザデータ301の書き込みの際に指定された論理アドレスと同一の論理アドレスの指定とともに書き込み要求されたユーザデータ301のうちの最新のユーザデータ301である第2のユーザデータ301の状態を、有効な状態として管理する。また、制御部15は、前記第1のユーザデータ301および当該第1のユーザデータ301の書き込みの際に指定された論理アドレスと同一の論理アドレスの指定とともに書き込み要求されたユーザデータ301のうちの、第2のユーザデータ301以外のユーザデータ301の状態を、無効な状態として管理する。なお、最新とは、同一の論理アドレスを指定した書き込み要求のうちの、最後の書き込み要求(但し後述するアトミックライトの書き込み要求を除く)によってホスト2から受信したことをいう。制御部15は、論理アドレスを、第1のユーザデータ301ではなく第2のユーザデータ301の格納位置を示す物理アドレスに対応付ける。言い換えると、有効なユーザデータ301の格納位置を示す物理アドレスは、翻訳情報によって、ある論理アドレスに対応付けられている。また、無効なユーザデータ301の格納位置を示す物理アドレスは、翻訳情報によって何れの論理アドレスにも対応付けられていない。 The control unit 15 stores the first user data 301 at the first position in the user data area 123. After that, when the user data 301 requested to be written together with the designation of the same logical address as the logical address specified at the time of writing the first user data 301 is requested to be written by the host 2, the control unit 15 performs the write request. The write-requested user data 301 is stored in the user data area 123 at a position different from the first position. The control unit 15 is a second user who is the latest user data 301 of the user data 301 requested to be written together with the designation of the same logical address as the logical address specified at the time of writing the first user data 301. The state of the data 301 is managed as a valid state. Further, the control unit 15 is among the user data 301 for which writing is requested together with the designation of the same logical address as the logical address specified at the time of writing the first user data 301 and the first user data 301. , The state of the user data 301 other than the second user data 301 is managed as an invalid state. Note that the latest means that the message was received from the host 2 by the last write request (excluding the atomic write write request described later) among the write requests for which the same logical address is specified. The control unit 15 associates the logical address with the physical address indicating the storage position of the second user data 301 instead of the first user data 301. In other words, the physical address indicating the storage position of the valid user data 301 is associated with a certain logical address by the translation information. Further, the physical address indicating the storage position of the invalid user data 301 is not associated with any logical address by the translation information.

近年、メモリシステム1の表記容量が増大するに応じて、翻訳情報のサイズが大きくなる傾向がある。表記容量とは、メモリシステム1が外部に提供する論理アドレス空間の合計サイズをいう。巨大なサイズの翻訳情報を管理するために、翻訳情報は、複数の階層に階層化される。複数の階層の翻訳情報の夫々は、記録された対応関係がカバーする論理アドレスの範囲のサイズが夫々異なる。上位の階層に属する翻訳情報に記録された対応関係がカバーする論理アドレスの範囲のサイズは、下位の階層に属する翻訳情報に記録された対応関係がカバーする論理アドレスの範囲のサイズよりも大きい。言い換えると、上位の階層に属する翻訳情報よりも下位の階層に属する翻訳情報の方が、記録されている対応関係の粒度が細かい。上位の階層に属する翻訳情報よりも下位の階層に属する翻訳情報の方がレコード数が大きくなるので、下位の階層に属する翻訳情報は、上位の階層に属する翻訳情報よりも細かく分割される。同一の階層に属する複数の翻訳情報は、記録されている対応関係がカバーする論理アドレスの範囲のサイズが等しい。 In recent years, the size of translation information tends to increase as the notation capacity of the memory system 1 increases. The notation capacity refers to the total size of the logical address space provided to the outside by the memory system 1. In order to manage a huge size of translation information, the translation information is hierarchized into a plurality of layers. Each of the translation information of the plurality of layers has a different size of the range of logical addresses covered by the recorded correspondence. The size of the range of logical addresses covered by the correspondence recorded in the translation information belonging to the upper hierarchy is larger than the size of the range of logical addresses covered by the correspondence recorded in the translation information belonging to the lower hierarchy. In other words, the granularity of the recorded correspondence is finer in the translation information belonging to the lower hierarchy than in the translation information belonging to the upper hierarchy. Since the number of records in the translation information belonging to the lower hierarchy is larger than that in the translation information belonging to the upper hierarchy, the translation information belonging to the lower hierarchy is divided into smaller pieces than the translation information belonging to the higher hierarchy. Multiple translation information belonging to the same hierarchy have the same size of the range of logical addresses covered by the recorded correspondence.

1つの階層に属する翻訳情報の格納位置は、前記1つの階層に属する翻訳情報よりも1つ上位の階層に属する翻訳情報によって示される。示されるとは、例えばポインタなどによってリンクされていることをいう。例えば、最も上位の階層に属する翻訳情報は、RAM14に読み出され、RAM14上で使用される。使用とは、参照または変更である。最も上位の階層を除く階層に属する翻訳情報は、適宜、NANDメモリ12からRAM14に読み出され、RAM14上で使用される。NANDメモリ12への書き込みの効率を良くするために、RAM14に読み出す単位のサイズを小さくしたいという要望がある。また、最も上位の階層に属する翻訳情報を記憶するRAM14内の領域のサイズを小さくしたいという要望がある。これらの要望に応えるために、翻訳情報は、3以上の階層に階層化される。第1の実施形態においては、一例として、翻訳情報は、3つの階層に階層化される。 The storage position of the translation information belonging to one hierarchy is indicated by the translation information belonging to one hierarchy higher than the translation information belonging to the one hierarchy. To be shown means that they are linked by, for example, a pointer. For example, the translation information belonging to the highest layer is read into the RAM 14 and used on the RAM 14. Use is a reference or modification. The translation information belonging to the hierarchy other than the highest hierarchy is appropriately read from the NAND memory 12 into the RAM 14 and used on the RAM 14. In order to improve the efficiency of writing to the NAND memory 12, there is a demand for reducing the size of the unit to be read into the RAM 14. Further, there is a request to reduce the size of the area in the RAM 14 that stores the translation information belonging to the highest layer. In order to meet these demands, the translation information is layered into three or more layers. In the first embodiment, as an example, the translation information is hierarchized into three layers.

管理情報領域122には、最も上位の階層に属する翻訳情報である第1テーブル201aが格納される。管理情報領域122内のログストレージ領域124には、第2階層に属する翻訳情報である第2テーブル202aおよび第3階層に属する翻訳情報である第3テーブル203aが格納される。 The management information area 122 stores the first table 201a, which is translation information belonging to the highest hierarchy. In the log storage area 124 in the management information area 122, the second table 202a, which is the translation information belonging to the second layer, and the third table 203a, which is the translation information belonging to the third layer, are stored.

図4は、各種テーブルの構成の一例を説明する図である。メモリシステム1の論理アドレス空間は、複数の部分空間(第1空間)に分割される。さらに、各第1空間は、複数の部分空間(第2空間)に分割される。各第2空間は、複数の第3空間に分割される。各第3空間のサイズは1クラスタのサイズと等しい。 FIG. 4 is a diagram illustrating an example of the configuration of various tables. The logical address space of the memory system 1 is divided into a plurality of subspaces (first space). Further, each first space is divided into a plurality of subspaces (second spaces). Each second space is divided into a plurality of third spaces. The size of each third space is equal to the size of one cluster.

1つの第3テーブル203aは、1つの第2空間に含まれる第3空間毎にレコードを備える。1つの第2テーブル202aを構成する各レコードは、論理アドレスと、その論理アドレスによって示されるユーザデータ301、が格納されている位置を示すアドレス情報(データアドレス)と、を対応付ける。データアドレスは、例えば、物理アドレスによって表記される。ある第3空間に対応するユーザデータ301がメモリシステム1内に格納されていない場合には、当該第3空間に対応するレコードには、例えば、ヌル値が記録される。 One third table 203a includes a record for each third space included in one second space. Each record constituting one second table 202a associates a logical address with an address information (data address) indicating a position in which the user data 301 indicated by the logical address is stored. The data address is represented by, for example, a physical address. When the user data 301 corresponding to a certain third space is not stored in the memory system 1, for example, a null value is recorded in the record corresponding to the third space.

第1テーブル201aは、第1空間毎にレコードを備える。第1テーブル201aの各レコードは、第2テーブル202aが格納されている位置を示す。第1テーブル201aの各レコードにおいては、第2テーブル202aが格納されている位置は、例えば、物理アドレスの形式で示される。 The first table 201a includes a record for each first space. Each record in the first table 201a indicates a position where the second table 202a is stored. In each record of the first table 201a, the position where the second table 202a is stored is indicated, for example, in the form of a physical address.

第2テーブル202aは、第2空間毎にレコードを備える。第2テーブル202aの各レコードは、第3テーブル203aが格納されている位置を示す。第2テーブル202aの各レコードにおいては、第3テーブル203aが格納されている位置は、例えば、物理アドレスの形式で示される。 The second table 202a includes a record for each second space. Each record in the second table 202a indicates a position where the third table 203a is stored. In each record of the second table 202a, the position where the third table 203a is stored is indicated, for example, in the form of a physical address.

有効情報は、各ユーザデータ301が有効であるか無効であるかを記録した情報である。有効情報は、ここでは一例として、第1階層に属する有効情報であるブロック管理情報211aと、第2階層に属する有効情報である有効ビットマップ212aと、の2つの階層に階層化される。 The valid information is information that records whether each user data 301 is valid or invalid. Here, as an example, the valid information is hierarchized into two layers, the block management information 211a which is the effective information belonging to the first layer and the effective bitmap 212a which is the effective information belonging to the second layer.

図5は、有効ビットマップ212aを説明する図である。有効ビットマップ212aは、ユーザデータ301が有効であるか無効であるかを記述したフラグを集めたビットマップ情報である。1つのフラグに対応する範囲は任意に設計される。図5の例によれば、各有効ビットマップ212aには、有効であるか無効であるかを示す1ビットのフラグがページ毎に記録される。各有効ビットマップ212aは、物理アドレスが連続する複数のページの分のフラグが記録される。有効ビットマップ212aは、ログストレージ領域124に格納される。 FIG. 5 is a diagram illustrating an effective bitmap 212a. The valid bitmap 212a is bitmap information that collects flags that describe whether the user data 301 is valid or invalid. The range corresponding to one flag is arbitrarily designed. According to the example of FIG. 5, in each valid bitmap 212a, a 1-bit flag indicating whether it is valid or invalid is recorded for each page. Each valid bitmap 212a records flags for a plurality of pages having consecutive physical addresses. The valid bitmap 212a is stored in the log storage area 124.

図6は、ブロック管理情報211aを説明する図である。各有効ビットマップ212aに記録される各フラグは、物理アドレスに対応付けられている。具体的には、ブロック管理情報211aは、1つの有効ビットマップ212aに記録されるフラグの数のページによって構成される物理アドレス空間ごとに、対応するブロック管理情報211aが格納されている位置を示す。ブロック管理情報211aは、管理情報領域122に格納される。 FIG. 6 is a diagram for explaining the block management information 211a. Each flag recorded in each valid bitmap 212a is associated with a physical address. Specifically, the block management information 211a indicates a position where the corresponding block management information 211a is stored for each physical address space composed of pages of the number of flags recorded in one valid bitmap 212a. .. The block management information 211a is stored in the management information area 122.

図7は、第2テーブル202a、第3テーブル203a、および有効ビットマップ212aの格納の様態の一例を示す図である。第1の実施形態においては、1つの第2テーブル202aのサイズと、1つの第3テーブル203aのサイズと、が等しくなるように、第1空間のサイズおよび第2空間のサイズが決められている。また、第1の実施形態においては、1つの第2テーブル202aのサイズと、1つの第3テーブル203aのサイズと、1つの有効ビットマップ212aのサイズと、が等しくなるように、1つの有効ビットマップ212aに記録されるフラグの数が決められている。なお、1つの第2テーブル202aのサイズとは、当該1つの第2テーブル202a自体のデータとしての大きさをいう。1つの第3テーブル203aのサイズとは、当該1つの第3テーブル203a自体のデータとしての大きさをいう。1つの有効ビットマップ212aのサイズとは、当該1つの有効ビットマップ212a自体のデータとしての大きさをいう。これにより、ログストレージ領域124は、第2テーブル202a、第3テーブル203a、および有効ビットマップ212aを混ぜて格納することが可能である。 FIG. 7 is a diagram showing an example of the storage mode of the second table 202a, the third table 203a, and the effective bitmap 212a. In the first embodiment, the size of the first space and the size of the second space are determined so that the size of one second table 202a and the size of one third table 203a are equal to each other. .. Further, in the first embodiment, one effective bit so that the size of one second table 202a, the size of one third table 203a, and the size of one effective bitmap 212a are equal to each other. The number of flags recorded on the map 212a is fixed. The size of one second table 202a means the size of the one second table 202a itself as data. The size of one third table 203a means the size of the one third table 203a itself as data. The size of one effective bitmap 212a means the size of the one effective bitmap 212a itself as data. As a result, the log storage area 124 can store the second table 202a, the third table 203a, and the effective bitmap 212a in a mixed manner.

具体的には、1つのページに異なる複数の単位情報を格納することが可能である。単位情報とは、第2テーブル202a、第3テーブル203a、または有効ビットマップ212aである。また、ページ当たりに記録される単位情報の数を常に一定にすることができる。また、各単位情報のサイズが等しいので、単位情報間の境界の位置の管理が容易である。単位情報の特定のために当該単位情報のサイズ情報を不要とすることができる。図7の例においては、1つのページに6つの単位情報が格納されている。 Specifically, it is possible to store a plurality of different unit information on one page. The unit information is the second table 202a, the third table 203a, or the effective bitmap 212a. In addition, the number of unit information recorded per page can always be constant. Moreover, since the size of each unit information is the same, it is easy to manage the position of the boundary between the unit information. The size information of the unit information can be unnecessary for specifying the unit information. In the example of FIG. 7, six unit information is stored on one page.

各単位情報は、使用時には、キャッシュ領域143に読み出される。言い換えると、各単位情報は、キャッシュ領域143にキャッシュされる。使用とは、参照または変更である。キャッシュ領域143に存在する第2テーブル202aを、第2テーブル202bと表記する。キャッシュ領域143に存在する第3テーブル203aを、第3テーブル203bと表記する。キャッシュ領域143に存在する有効ビットマップ212aを、有効ビットマップ212bと表記する。 Each unit information is read into the cache area 143 when it is used. In other words, each unit information is cached in the cache area 143. Use is a reference or modification. The second table 202a existing in the cache area 143 is referred to as the second table 202b. The third table 203a existing in the cache area 143 is referred to as the third table 203b. The effective bitmap 212a existing in the cache area 143 is referred to as an effective bitmap 212b.

キャッシュ領域143にキャッシュされている単位情報は、制御部15による変更によって、ログストレージ領域124に格納されている単位情報と異なる状態になる。ログストレージ領域124に格納されている単位情報と異なる、キャッシュ領域143にキャッシュされている単位情報の状態を、ダーティと表記する。ダーティな単位情報は、所定のタイミングでログストレージ領域124に書き戻される。ダーティな単位情報は、ログストレージ領域124に書き込まれることによって、非ダーティな状態に遷移する。 The unit information cached in the cache area 143 changes to a state different from the unit information stored in the log storage area 124 due to the change by the control unit 15. The state of the unit information cached in the cache area 143, which is different from the unit information stored in the log storage area 124, is referred to as dirty. The dirty unit information is written back to the log storage area 124 at a predetermined timing. Dirty unit information is written to the log storage area 124 to transition to a non-dirty state.

第1テーブル201aは、RAM14に読み出され、RAM14上において使用される。RAM14に読み出された第1テーブル201aを、第1テーブル201bと表記する。ブロック管理情報211aは、RAM14に読み出され、RAM14上において使用される。RAM14に読み出されたブロック管理情報211aを、ブロック管理情報211bと表記する。RAM14に格納された第1テーブル201bおよびブロック管理情報211bは、夫々、制御部15によって使用され、メモリシステム1の所定のタイミングで管理情報領域122にコピーされる。 The first table 201a is read into the RAM 14 and used on the RAM 14. The first table 201a read into the RAM 14 is referred to as the first table 201b. The block management information 211a is read into the RAM 14 and used on the RAM 14. The block management information 211a read into the RAM 14 is referred to as block management information 211b. The first table 201b and the block management information 211b stored in the RAM 14 are used by the control unit 15, respectively, and are copied to the management information area 122 at a predetermined timing of the memory system 1.

RAM14に格納されている第1テーブル201bの各レコードは、対応する第2テーブル202bがキャッシュ領域143にキャッシュされている場合には、当該対応する第2テーブル202bがキャッシュされている位置をさらに示す。また、キャッシュ領域143にキャッシュされている第2テーブル202bの各レコードは、対応する第3テーブル203bがキャッシュ領域143にキャッシュされている場合には、当該対応する第3テーブル203bがキャッシュされている位置をさらに示す。また、キャッシュ領域143にキャッシュされている第3テーブル203bの各レコードは、対応するユーザデータがライトバッファ141に格納されている場合には、ライトバッファ141において当該対応するユーザデータが格納されている位置を示す。 Each record of the first table 201b stored in the RAM 14 further indicates the position where the corresponding second table 202b is cached when the corresponding second table 202b is cached in the cache area 143. .. Further, in each record of the second table 202b cached in the cache area 143, when the corresponding third table 203b is cached in the cache area 143, the corresponding third table 203b is cached. The position is further indicated. Further, in each record of the third table 203b cached in the cache area 143, when the corresponding user data is stored in the write buffer 141, the corresponding user data is stored in the write buffer 141. Indicates the position.

RAM14内に格納されるブロック管理情報211bの各レコードは、対応する有効ビットマップ212bがキャッシュ領域143にキャッシュされている場合には、当該対応する有効ビットマップ212bがキャッシュされている位置をさらに示す。 Each record of the block management information 211b stored in the RAM 14 further indicates the position where the corresponding valid bitmap 212b is cached when the corresponding valid bitmap 212b is cached in the cache area 143. ..

ダーティな単位情報は、キャッシュ管理情報221によって管理される。 Dirty unit information is managed by cache management information 221.

図8は、キャッシュ管理情報221の構成を示す図である。キャッシュ管理情報221は、キャッシュ領域143の管理のための情報である。キャッシュ管理情報221は例えばRAM14に格納され、RAM14上で使用される。キャッシュ管理情報221は、ユーザダーティ情報222、GCダーティ情報223、およびフリー情報224を備える。ユーザダーティ情報222は、ライトバッファ141からユーザデータ領域123へのユーザデータ301の書き込みに応じてダーティとなった第2テーブル202bおよび第3テーブル203bを示す情報である。ユーザダーティ情報222は、ライトバッファ141からユーザデータ領域123へのユーザデータ301の書き込みに応じてダーティとなった有効ビットマップ212bをさらに示すように構成されてもよい。GCダーティ情報223は、ガベージコレクションによってダーティとなった第2テーブル202bおよび第3テーブル203bを示す情報である。GCダーティ情報223は、ガベージコレクションによってダーティとなった有効ビットマップ212bをさらに示すように構成されてもよい。フリー情報224は、使用されていないキャッシュラインを示す情報である。なお、例えば1つのキャッシュラインには1つの単位情報がキャッシュされる。ユーザダーティ情報222およびGCダーティ情報223は、ダーティとなった順番が認識可能な状態でダーティな単位情報を示す。例えば、ユーザダーティ情報222およびGCダーティ情報223は、リンクトリストのデータ構造を備える。フリー情報224は、使用されていないキャッシュラインを使用されていない状態となった順番が認識可能な状態で示す。例えば、フリー情報224は、リンクトリストのデータ構造を備える。 FIG. 8 is a diagram showing the configuration of cache management information 221. The cache management information 221 is information for managing the cache area 143. The cache management information 221 is stored in, for example, RAM 14, and is used on RAM 14. The cache management information 221 includes user dirty information 222, GC dirty information 223, and free information 224. The user dirty information 222 is information indicating the second table 202b and the third table 203b that have become dirty in response to the writing of the user data 301 from the write buffer 141 to the user data area 123. The user dirty information 222 may be configured to further indicate a valid bitmap 212b that has become dirty in response to the writing of the user data 301 from the write buffer 141 to the user data area 123. The GC dirty information 223 is information indicating the second table 202b and the third table 203b that have become dirty due to garbage collection. The GC dirty information 223 may be configured to further indicate the valid bitmap 212b that has been made dirty by garbage collection. Free information 224 is information indicating an unused cache line. For example, one unit information is cached in one cache line. The user dirty information 222 and the GC dirty information 223 indicate dirty unit information in a state in which the order in which they become dirty can be recognized. For example, user dirty information 222 and GC dirty information 223 include a linked list data structure. The free information 224 indicates the order in which the unused cache lines are not used in a recognizable state. For example, free information 224 comprises a linked list data structure.

なお、第1テーブル201bおよびブロック管理情報211bについても、ダーティ/非ダーティの管理が実行される。例えば、第1テーブル201bは、第1テーブル201aと異なった場合にダーティとして扱われる。例えば、第1テーブル201bを構成する複数のレコードのうちの、第1テーブル201aを構成する複数のレコードのうちの対応するレコード、と異なったレコード、がダーティとして管理されてもよい。また、例えば、ブロック管理情報211bは、ブロック管理情報211aと異なった場合にダーティとして管理されてもよい。また、例えば、ブロック管理情報211bを構成する複数のレコードのうちのブロック管理情報211aを構成する複数のレコードのうちの対応するレコードと異なったレコードのみがダーティとして管理されてもよい。第1テーブル201bは、例えば、ダーティとなったレコード数が所定数を超えた場合に、その時点の第1テーブル201bが管理情報領域122に第1テーブル201aとして書き込まれる。ブロック管理情報211bは、例えば、ダーティとなったレコード数が所定数を超えた場合に、その時点のブロック管理情報211bが管理情報領域122にブロック管理情報211aとして書き込まれる。第1テーブル201bおよびブロック管理情報211bの各レコードの状態は、管理情報領域122への書き込みに応じて、非ダーティに遷移する。 Dirty / non-dirty management is also executed for the first table 201b and the block management information 211b. For example, the first table 201b is treated as dirty when different from the first table 201a. For example, among the plurality of records constituting the first table 201b, records different from the corresponding records among the plurality of records constituting the first table 201a may be managed as dirty. Further, for example, the block management information 211b may be managed as dirty when different from the block management information 211a. Further, for example, only the records different from the corresponding records among the plurality of records constituting the block management information 211a among the plurality of records constituting the block management information 211b may be managed as dirty. In the first table 201b, for example, when the number of dirty records exceeds a predetermined number, the first table 201b at that time is written in the management information area 122 as the first table 201a. As for the block management information 211b, for example, when the number of dirty records exceeds a predetermined number, the block management information 211b at that time is written in the management information area 122 as the block management information 211a. The state of each record of the first table 201b and the block management information 211b transitions to non-dirty in response to writing to the management information area 122.

統計情報225は、動作状態を示す各種情報である。例えば、統計情報225は、NANDメモリ12の使用状況、メモリシステム1の使用状況、パワーオン時間、電源断によるダーティな情報の喪失の発生回数、パワーロスプロテクション(PLP)の動作回数、正常な電源断の発生回数、などを含む。正常な電源断とは、ここでは、ダーティな情報の喪失が起こらなかった電源断をいう。PLPとは、外部からの電源供給が突然停止した場合に、制御部15が、RAM14内の少なくともダーティな翻訳情報を緊急退避領域121に格納する処理をいう。PLPにおいては、ライトバッファ141内のユーザデータも格納の対象である。PLPにおいては、制御部15は、RAM14内のメモリイメージを緊急退避領域121にそのままダンプしてもよい。PLPは、メモリシステム1に内蔵されるバッテリ(図示せず)に蓄えられた電力を用いて実行される。制御部15は、統計情報225をRAM14内に生成し、生成した統計情報225を定期的に管理情報領域122にダンプする。 Statistical information 225 is various information indicating an operating state. For example, the statistical information 225 includes the usage status of the NAND memory 12, the usage status of the memory system 1, the power-on time, the number of times dirty information is lost due to the power failure, the number of operations of the power loss protection (PLP), and the normal power failure. The number of occurrences of, etc. are included. A normal power outage here means a power outage in which no dirty information loss has occurred. The PLP is a process in which the control unit 15 stores at least dirty translation information in the RAM 14 in the emergency evacuation area 121 when the power supply from the outside is suddenly stopped. In PLP, the user data in the write buffer 141 is also the target of storage. In the PLP, the control unit 15 may dump the memory image in the RAM 14 to the emergency evacuation area 121 as it is. The PLP is executed using the electric power stored in the battery (not shown) built in the memory system 1. The control unit 15 generates statistical information 225 in RAM 14, and periodically dumps the generated statistical information 225 to the management information area 122.

ユーザデータ領域123には、制御部15によって、ユーザデータ301の他に1以上のログ情報231が格納される。ログ情報231は、ユーザデータ301がユーザデータ領域123に書き込まれる際に当該ユーザデータ301と対応して記録される情報である。ログ情報231は、対応するユーザデータ301の位置を示す論理アドレスと、当該論理アドレスに当該対応するユーザデータ301の書き込みの前に対応づけられていた物理アドレス(旧物理アドレス)と、当該対応するユーザデータ301の書き込み先の位置を示す物理アドレス(新物理アドレス)と、が少なくとも記録されている。 In the user data area 123, one or more log information 231 is stored in addition to the user data 301 by the control unit 15. The log information 231 is information recorded in association with the user data 301 when the user data 301 is written to the user data area 123. The log information 231 corresponds to a logical address indicating the position of the corresponding user data 301 and a physical address (former physical address) associated with the logical address before writing the corresponding user data 301. At least a physical address (new physical address) indicating the position of the writing destination of the user data 301 is recorded.

次に、制御部15が実行する各処理を説明する。 Next, each process executed by the control unit 15 will be described.

(1)基本動作
制御部15が実行する処理は、大きく、起動時の処理、コマンド待機の処理、コマンド実行の処理、再起動待機の処理、に分類される。
(1) Basic operation The processing executed by the control unit 15 is roughly classified into a startup processing, a command waiting processing, a command execution processing, and a restart waiting processing.

(1−1)起動時の処理
制御部15は、起動時においては、スケジューラとしての初期化操作を実行する。その後、制御部15は、スケジューラに以下の処理(第1〜第3のスタートアップ処理)の何れかを登録する。制御部15は、登録されたスタートアップ処理を、スケジューラの指示によって実行する。
(1-1) Process at startup The control unit 15 executes an initialization operation as a scheduler at startup. After that, the control unit 15 registers any of the following processes (first to third startup processes) in the scheduler. The control unit 15 executes the registered startup process according to the instruction of the scheduler.

(1−1−1)第1のスタートアップ処理
電源断によってダーティな単位情報が喪失された場合には、第1のスタートアップ処理が実行される。第1のスタートアップ処理は、翻訳情報を再構築する処理である。再構築とは、喪失されたダーティな単位情報を回復することを含む。再構築は、ログ情報231を書き込み順または書き込み順とは逆順に参照することによって実行可能である。
(1-1-1) First Startup Process When dirty unit information is lost due to a power failure, the first startup process is executed. The first startup process is a process of reconstructing translation information. Reconstruction involves recovering lost dirty unit information. Reconstruction can be performed by referencing the log information 231 in the write order or in the reverse order of the write order.

(1−1−2)第2のスタートアップ処理
直前の電源断においてPLPなどによって緊急退避領域121に各種情報が格納された場合には、第2のスタートアップ処理が実行される。第2のスタートアップ処理は、緊急退避領域121に格納された各種情報を用いて、RAM14のメモリイメージを復元する処理である。
(1-1-2) Second Startup Process When various information is stored in the emergency evacuation area 121 by PLP or the like at the power failure immediately before, the second startup process is executed. The second startup process is a process of restoring the memory image of the RAM 14 by using various information stored in the emergency evacuation area 121.

(1−1−3)第3のスタートアップ処理
全てのダーティな単位情報が管理情報領域122に正常に書き込み完了することによって非ダーティな状態に電源断時において遷移した場合には、第3のスタートアップ処理が実行される。第3のスタートアップ処理は、第1テーブル201aをRAM14に第1テーブル201bとして読み出す処理である。
(1-1-3) Third startup process When all the dirty unit information is normally written to the management information area 122 and the state transitions to the non-dirty state when the power is turned off, the third startup process is performed. The process is executed. The third startup process is a process of reading the first table 201a into the RAM 14 as the first table 201b.

(1−2)コマンド待機の処理
制御部15は、割り込みハンドラとしての処理を実行する。ホスト2からのコマンドに応じて割り込みハンドラは対応する処理をスケジューラに登録する。コマンドは、対応する処理をスケジューラが実行することによって伝達される。また、メモリシステム1内部の割り込みハンドラが、対応する処理をスケジューラに登録することによってもコマンド実行が開始される。実行可能なコマンドがなければ、制御部15は、メモリシステム1の状態をスリープの状態に移行せしめてもよい。なお、メモリシステム1がスリープの状態であっても、制御部15は、タイマ割り込みの実行を行ってもよい。制御部15は、タイマ割り込みによって、メモリシステム1の状態をスリープの状態から通常の状態に遷移せしめる。
(1-2) Command standby processing The control unit 15 executes processing as an interrupt handler. In response to the command from host 2, the interrupt handler registers the corresponding process in the scheduler. The command is transmitted when the scheduler executes the corresponding process. The command execution is also started when the interrupt handler inside the memory system 1 registers the corresponding process in the scheduler. If there is no executable command, the control unit 15 may shift the state of the memory system 1 to the sleep state. Even when the memory system 1 is in the sleep state, the control unit 15 may execute the timer interrupt. The control unit 15 shifts the state of the memory system 1 from the sleep state to the normal state by a timer interrupt.

(1−3)コマンド実行の処理
(1−3−1)ホストコマンドキュー処理
ホストコマンドキュー処理は、例えば、割り込みハンドラとして制御部15に実装される。ホスト2からのコマンドは、割り込みによって通知される。ホストコマンドキュー処理は、ホスト2からのコマンドを解析する処理と、当該コマンドを発行待ちコマンドキュー(図示せず)に登録する処理を含む。発行待ちコマンドキューは、例えばリング型のキューである。ホストコマンドキュー処理においては、制御部15は、発行待ちコマンドキューに対しては、登録のみを実行することができる。発行待ちコマンドキュー内の発行待ち状態のコマンドの数は、登録側の位置情報と発行側の位置情報との比較によって算出可能である。ホストコマンドキュー処理においては、発行待ち状態のコマンドの数が所定のしきい値を超えている場合には、制御部15は、ホスト2からのコマンドの受け付けを停止する。ホストコマンドキュー処理においては、ホスト2からのコマンドの受け付けの停止中にホスト2からコマンドの登録が要求された場合には、制御部15は、ホスト2に対して受け付け拒絶を通知する。ホスト2は、受け付け拒絶の通知を受信した場合には、所定時間の経過後、コマンドの登録を再要求する。制御部15は、再要求時においてコマンドの受け付けの停止中でない場合には、ホストコマンドキュー処理において当該コマンドを受け付ける。発行待ちコマンドキュー内の発行待ち状態のコマンドの数と前記所定のしきい値との差分は、受け付け可能なコマンドの数を示す。制御部15は、ホストコマンドキュー処理において、受け付け可能なコマンドの数をステータス情報としてホスト2に送信してもよい。受け付け拒絶の通知および受け付け可能なコマンド数の通知の何れを使用するかは、ホスト2との取り決めによって設定される。ホストコマンドキュー処理において、制御部15は、ホストコマンド発行処理をスケジューラの実行待ちキュー(図示せず)に登録し、ホストコマンドキュー処理を終了する。登録されたコマンドは、夫々、実行状態(未実行状態、実行中状態、終了待機状態)を示す情報とともに管理される。
(1-3) Command execution processing (1-3-1) Host command queue processing The host command queue processing is implemented in the control unit 15 as an interrupt handler, for example. The command from host 2 is notified by an interrupt. The host command queue process includes a process of analyzing a command from host 2 and a process of registering the command in a command queue (not shown) waiting for issuance. The issue-waiting command queue is, for example, a ring-type queue. In the host command queue processing, the control unit 15 can only register the command queue waiting to be issued. The number of commands waiting to be issued in the command queue waiting to be issued can be calculated by comparing the position information on the registration side with the position information on the issuing side. In the host command queue processing, when the number of commands waiting to be issued exceeds a predetermined threshold value, the control unit 15 stops accepting commands from the host 2. In the host command queue processing, if the host 2 requests the registration of a command while the acceptance of the command from the host 2 is stopped, the control unit 15 notifies the host 2 of the acceptance refusal. When the host 2 receives the notification of acceptance refusal, the host 2 re-requests the registration of the command after a predetermined time has elapsed. If the command reception is not stopped at the time of re-request, the control unit 15 receives the command in the host command queue processing. The difference between the number of commands waiting to be issued in the command queue waiting to be issued and the predetermined threshold value indicates the number of commands that can be accepted. The control unit 15 may send the number of commands that can be accepted in the host command queue processing to the host 2 as status information. Whether to use the notification of acceptance refusal or the notification of the number of commands that can be accepted is set by the agreement with the host 2. In the host command queue processing, the control unit 15 registers the host command issuing process in the execution waiting queue (not shown) of the scheduler, and ends the host command queue processing. Each of the registered commands is managed together with information indicating the execution status (unexecuted status, running status, end waiting status).

(1−3−2)ホストコマンド発行処理
ホスト2からのコマンドの受け付け後、コマンドの終了時またはタイマ割り込みなどによってホストコマンド発行処理の実行要求がスケジューラに登録される。ホストコマンド発行処理においては、制御部15は、スケジューラに実行要求が登録されたコマンドの状態を実行中状態に遷移させる。また、例えばデータの転送が終了した場合などコマンドの実行が終了すると、制御部15は、コマンドの状態を終了待機状態に遷移させる。その後、ホスト2からの実行終了確認の受領に応じて、制御部15は、コマンドを発行待ちコマンドキューから削除する。制御部15は、未実行状態のコマンドの実行を開始する。
(1-3-2) Host command issuance process After receiving a command from host 2, an execution request for host command issuance process is registered in the scheduler at the end of the command or by a timer interrupt or the like. In the host command issuance process, the control unit 15 transitions the state of the command whose execution request is registered in the scheduler to the executing state. Further, when the execution of the command is completed, for example, when the data transfer is completed, the control unit 15 shifts the state of the command to the end waiting state. After that, upon receiving the execution end confirmation from the host 2, the control unit 15 deletes the command from the command queue waiting to be issued. The control unit 15 starts executing a command in the unexecuted state.

(1−3−3)リード処理
リード処理は、コマンドを解析する処理、翻訳情報にアクセスする処理、NANDメモリ12からユーザデータ301を読み出す処理、NANDメモリ12から読み出されたユーザデータ301をリードバッファ142に格納する処理、リードバッファ142に格納されたユーザデータ301をホスト2に送信する処理、およびコマンド実行終了をホスト2に通知する処理、を含む。リード処理においては、制御部15は、ホスト2がコマンド実行終了を確認した後、ホストコマンド発行処理にコマンドの終了を通知する。
(1-3-3) Read processing The read processing is a process of analyzing a command, a process of accessing translation information, a process of reading user data 301 from the NAND memory 12, and a process of reading the user data 301 read from the NAND memory 12. It includes a process of storing in the buffer 142, a process of transmitting the user data 301 stored in the read buffer 142 to the host 2, and a process of notifying the host 2 of the end of command execution. In the read process, the control unit 15 notifies the host command issuance process of the end of the command after the host 2 confirms the end of the command execution.

(1−3−4)ライト処理
ライト処理は、コマンドを解析する処理、コマンド実行をホスト2に通知する処理、ライトバッファ141にホスト2からのユーザデータを格納する処理、ライトバッファ141へのユーザデータの格納に応じて翻訳情報を更新する処理、およびコマンド実行終了をホスト2に通知する処理、を含む。ライトコマンドにFUAモードの指定が含まれている場合には、ライト処理において、制御部15は、ライトバッファ141に格納されたユーザデータをNANDメモリ12に格納する処理と、NANDメモリ12へのユーザデータの格納に応じて翻訳情報を更新する処理とをさらに実行する。ライト処理においては、制御部15は、ホスト2がコマンド実行終了を確認した後、ホストコマンド発行処理にコマンドの終了を通知する。
(1-3-4) Write processing The write processing is a process of analyzing a command, a process of notifying the host 2 of command execution, a process of storing user data from the host 2 in the write buffer 141, and a user in the write buffer 141. It includes a process of updating translation information according to data storage and a process of notifying host 2 of the end of command execution. When the write command includes the designation of the FUA mode, in the write process, the control unit 15 performs a process of storing the user data stored in the write buffer 141 in the NAND memory 12 and a user in the NAND memory 12. Further, the process of updating the translation information according to the storage of the data is executed. In the write process, the control unit 15 notifies the host command issuance process of the end of the command after the host 2 confirms the end of the command execution.

(1−3−5)キャッシュフラッシュ(Cache Flush)処理
キャッシュフラッシュ処理は、ライトバッファ141のフラッシュと、翻訳情報のダーティな部分のフラッシュとを実行する処理である。キャッシュフラッシュが通知されると、キャッシュフラッシュ処理において、制御部15は、次のライトコマンドの発行を、ライトバッファ141への書き込み実行フラグを立て終わるまで停止する。書き込み実行フラグは、ライトバッファ141に格納されているユーザデータがNANDメモリ12に書き込まれたか否かを示すフラグ情報である。書き込み実行フラグが立てられた状態は、対応するユーザデータがNANDメモリ12に書き込み済みであることを示す。なお、NVMeが採用される場合には、制御部15は、キャッシュフラッシュ処理をネームスペース毎に独立に実行してもよい。
(1-3-5) Cache Flush Process The cache flush process is a process of executing the flush of the write buffer 141 and the flush of the dirty part of the translation information. When the cache flush is notified, in the cache flush process, the control unit 15 stops issuing the next write command until the write execution flag to the write buffer 141 is set. The write execution flag is flag information indicating whether or not the user data stored in the write buffer 141 has been written to the NAND memory 12. The state in which the write execution flag is set indicates that the corresponding user data has been written to the NAND memory 12. When NVMe is adopted, the control unit 15 may execute the cache flush process independently for each namespace.

(1−3−6)トリム(Trim)処理
トリム処理は、指定された論理アドレスについて、当該論理アドレスと物理アドレスとの対応関係を解消する処理である。トリム処理において、制御部15は、新規のライトコマンドおよび新規のリードコマンドの発行を停止し、翻訳情報に含まれる対応するレコードを無効化する。NVMeが採用される場合には、トリムコマンドは、たとえばネームスペースを指定可能に構成されてもよい。制御部15は、トリム処理において、指定されたネームスペースに対するライトコマンドおよびリードコマンドの発行を停止する。
(1-3-6) Trim processing The trim processing is a processing for canceling the correspondence between the logical address and the physical address of the specified logical address. In the trim processing, the control unit 15 stops issuing a new write command and a new read command, and invalidates the corresponding record included in the translation information. If NVMe is adopted, the trim command may be configured to allow, for example, a namespace to be specified. The control unit 15 stops issuing write commands and read commands to the designated namespace in the trim processing.

(1−3−7)緊急退避(Evacuate)処理
緊急退避処理は、発行待ちのコマンドおよび実行中の全てのアクセスコマンドを破棄する処理と、ライトバッファ141内のユーザデータおよび翻訳情報のうちの全てのダーティな部分を緊急退避領域121に格納する処理とを含む。緊急退避処理において上記情報の格納に成功した場合には、制御部15は、Unexpected Shutdownフラグを下ろす。緊急退避処理において上記情報の格納に失敗した場合には、制御部15は、Unexpected Shutdownフラグを下ろさない。Unexpected Shutdownフラグは、例えば、NANDメモリ12の管理情報領域122に記録される。次回の起動時においては、第1のスタートアップ処理を実行するか否かが、Unexpected Shutdownフラグに基づいて判定される。緊急退避が通知されると、再起動以外の全てのコマンドの新規受付が停止される。緊急退避は、電源から通知される。
(1-3-7) Emergency evacuation processing The emergency evacuation processing includes processing for discarding commands waiting to be issued and all running access commands, and all of the user data and translation information in the write buffer 141. Includes a process of storing the dirty portion of the above in the emergency evacuation area 121. If the storage of the above information is successful in the emergency evacuation process, the control unit 15 lowers the Unexpected Shutdown flag. If the storage of the above information fails in the emergency evacuation process, the control unit 15 does not lower the Unexpected Shutdown flag. The Unexpected Shutdown flag is recorded in the management information area 122 of the NAND memory 12, for example. At the next startup, whether or not to execute the first startup process is determined based on the Unexpected Shutdown flag. When the emergency evacuation is notified, new acceptance of all commands except restart is stopped. Emergency evacuation is notified from the power supply.

(1−3−8)スリープ処理
スリープ処理は、発行待ちの全てのコマンドと実行中のアクセスコマンドの実行終了後、ライトバッファ141内のユーザデータおよび翻訳情報のうちの全てのダーティな部分を緊急退避領域121に格納する処理である。スリープ処理において上記情報の格納に成功した場合には、制御部15は、Unexpected Shutdownフラグを下ろす。スリープ処理において上記情報の格納に失敗した場合には、制御部15は、Unexpected Shutdownフラグを下ろさない。スリープが通知されると、復帰コマンド以外の全てのコマンドの新規受付が停止される。スリープは、ホスト2から通知される。
(1-3-8) Sleep processing In sleep processing, all dirty parts of the user data and translation information in the write buffer 141 are urgently required after the execution of all the commands waiting to be issued and the access command being executed is completed. This is a process of storing in the save area 121. If the storage of the above information is successful in the sleep process, the control unit 15 lowers the Unexpected Shutdown flag. If the storage of the above information fails in the sleep process, the control unit 15 does not lower the Unexpected Shutdown flag. When the sleep is notified, new acceptance of all commands other than the wakeup command is stopped. The sleep is notified from the host 2.

(1−3−9)シャットダウン処理
シャットダウン処理は、発行待ちの全てのコマンドの実行が終了後、キャッシュフラッシュ処理を実行する処理である。シャットダウンが通知されると、再起動以外の全てのコマンドの新規受付が停止される。シャットダウンは、ホスト2から通知される。フラッシュに成功した場合には、制御部15は、Unexpected Shutdownフラグを下ろす。フラッシュに失敗した場合には、制御部15は、Unexpected Shutdownフラグを下ろさない。
(1-3-9) Shutdown process The shutdown process is a process of executing a cache flush process after the execution of all commands waiting to be issued is completed. When the shutdown is notified, all new commands except the restart will be stopped. Host 2 notifies the shutdown. If the flush is successful, the control unit 15 lowers the Unexpected Shutdown flag. If the flush fails, the control unit 15 does not lower the Unexpected Shutdown flag.

(1−4)再起動待機の処理
再起動待機の処理とは、緊急退避処理またはシャットダウン処理が終了した後の状態をいう。再起動待機処理においては、制御部15は、再起動コマンドのみを受け付ける。
(1-4) Restart wait process The restart wait process is the state after the emergency evacuation process or shutdown process is completed. In the restart standby process, the control unit 15 accepts only the restart command.

(2)翻訳情報の復元処理
翻訳情報の復元処理は、第1テーブル201bを復元する処理である。翻訳情報の復元処理の実行中においては、制御部15は、アクセスコマンドを受け付けない。Signature応答およびIdentifyに対する応答は、許可される。翻訳情報の復元処理においては、「時刻」とは、システムトータルの書き換え回数で代用される。書き換え回数とは、ブロック毎の書き込みおよび消去の回数である。翻訳情報の復元処理においては、制御部15は、第1テーブル201bのレコードのうちの最新のレコードを復元する。制御部15は、ログストレージ領域124に記録されている単位情報のうち、対応する第1テーブル201aのレコードよりも時刻が新しいものを復元する。第1のスタートアップ処理内において翻訳情報の復元処理が実行される場合には、次の処理が実行される。
(2) Restoration process of translation information The restoration process of translation information is a process of restoring the first table 201b. While the translation information restoration process is being executed, the control unit 15 does not accept the access command. Signature and Identify responses are allowed. In the process of restoring translation information, the "time" is substituted by the total number of rewrites of the system. The number of rewrites is the number of writes and erases for each block. In the process of restoring the translation information, the control unit 15 restores the latest record among the records in the first table 201b. The control unit 15 restores the unit information recorded in the log storage area 124 whose time is newer than the corresponding record in the first table 201a. When the translation information restoration process is executed in the first startup process, the following process is executed.

即ち、制御部15は、ユーザデータ301が格納されているブロックのうちの、復元された翻訳情報よりも時刻が新しいブロックについて、翻訳情報の対応するレコードを復元する。制御部15は、ログ情報231に基づいて翻訳情報の対応するレコードを復元する。復元された翻訳情報よりも時刻が古いブロックについては、制御部15は、翻訳情報の対応するレコードを復元しない。復元されたレコードは、ダーティとして管理される。 That is, the control unit 15 restores the corresponding record of the translation information for the block in which the user data 301 is stored and whose time is newer than the restored translation information. The control unit 15 restores the corresponding record of the translation information based on the log information 231. For a block whose time is older than the restored translation information, the control unit 15 does not restore the corresponding record of the translation information. The restored records are managed as dirty.

翻訳情報の復元後、翻訳情報のダーティな部分はフラッシュされてもよいし、フラッシュされなくてもよい。翻訳情報の復元後に、翻訳情報のダーティな部分はフラッシュされるか否かは、外部から設定可能であってもよい。 After the translation information is restored, the dirty part of the translation information may or may not be flushed. Whether or not the dirty part of the translation information is flushed after the translation information is restored may be set externally.

(3)電源遮断処理
電源遮断処理には、正常処理とPLPとが存在する。
(3) Power cutoff processing There are two types of power cutoff processing: normal processing and PLP.

(3−1)正常処理
正常処理は、ライトバッファ141内のユーザデータのフラッシュ、各種ダーティな情報のフラッシュ、および統計情報225のフラッシュを含む。制御部15は、正常処理の終了後、Unexpected Shutdownフラグを下ろす。
(3-1) Normal processing The normal processing includes a flash of user data in the write buffer 141, a flash of various dirty information, and a flash of statistical information 225. The control unit 15 lowers the Unexpected Shutdown flag after the normal processing is completed.

(3−2)PLP
PLPは、ライトバッファ141内のユーザデータおよび各種ダーティな情報を緊急退避領域121に格納する処理を含む。制御部15は、PLPの終了後、Unexpected Shutdownフラグを下ろし、PLPフラグを立てる。PLPフラグは、PLPによってメモリシステム1が終了されたことを示すフラグであり、例えば管理情報領域122に記録される。統計情報225は、上記の情報の格納が完了した後に緊急退避領域121に格納される。PLPにおいては、統計情報225の保持は保証されなくてもよい。
(3-2) PLP
The PLP includes a process of storing the user data in the write buffer 141 and various dirty information in the emergency evacuation area 121. After the end of PLP, the control unit 15 lowers the Unexpected Shutdown flag and sets the PLP flag. The PLP flag is a flag indicating that the memory system 1 has been terminated by PLP, and is recorded in, for example, the management information area 122. The statistical information 225 is stored in the emergency evacuation area 121 after the storage of the above information is completed. In PLP, retention of statistical information 225 may not be guaranteed.

(4)ライト処理の動作
ライト処理とは、ホスト2からのコマンドに応じた書き込みをいう。ライト処理としては、キャッシュを用いたライト、FUAライト、アトミックライト、トリム処理、の4種類の種類がある。キャッシュを用いたライトは、4種類のライト処理の中で最も処理が早く終了する。キャッシュを用いたライトとは、ライトバッファ141にユーザデータが格納された時点で終了するライト処理である。FUAライトとは、NANDメモリ12へのユーザデータの書き込みまで終えた時点で終了するライト処理である。FUAライトの実行中においては、翻訳情報の更新が完了するまで、NANDメモリ12に書き込まれたユーザデータ301を読み出すことができない。FUAライトの実行中において翻訳情報の更新が完了するまでの間、該当のユーザデータ301の読み出しを要する場合には、制御部15は、ライトバッファ141からユーザデータを読み出す。アトミックライトは、複数のライトコマンドによって書き込み要求された全てのユーザデータの書き込みが完了した後に、翻訳情報の更新を行う書き込みである。アトミックライトによれば、複数のライトコマンドによって書き込み要求された全てのユーザデータの書き込みが完了するまで、各ユーザデータの読み出しはできない。トリム処理は、ライト処理のうちの1つとして扱われる。
(4) Operation of write processing The write processing means writing in response to a command from the host 2. There are four types of write processing: write using cache, FUA light, atomic light, and trim processing. The write using the cache finishes the processing earliest among the four types of write processing. The write using the cache is a write process that ends when the user data is stored in the write buffer 141. The FUA write is a write process that ends when the writing of user data to the NAND memory 12 is completed. While the FUA write is being executed, the user data 301 written in the NAND memory 12 cannot be read until the update of the translation information is completed. If it is necessary to read the corresponding user data 301 while the FUA write is being executed until the update of the translation information is completed, the control unit 15 reads the user data from the write buffer 141. Atomic write is a write that updates the translation information after the writing of all the user data requested to be written by a plurality of write commands is completed. According to Atomic Write, each user data cannot be read until all the user data requested to be written by a plurality of write commands has been written. The trim processing is treated as one of the light processing.

ライト処理に付帯するコマンドとして、キャッシュフラッシュコマンドが存在する。キャッシュフラッシュコマンドは、キャッシュフラッシュ処理を実行させるためのコマンドである。キャッシュフラッシュ処理においては、制御部15は、ライトバッファ141内のユーザデータをNANDメモリ12に書き込み、翻訳情報の更新を行う。キャッシュフラッシュ処理は、メモリシステム1全体を対象として実行されることが可能である。また、キャッシュフラッシュ処理は、ネームスペースまたはストリームを限定して実行されるように、メモリシステム1が構成されてもよい。PLPが実行可能なメモリシステム1においては、キャッシュフラッシュコマンドを無視することができるように設定可能にメモリシステム1が構成されてもよい。 There is a cache flush command as a command incidental to the write process. The cache flush command is a command for executing the cache flush process. In the cache flush process, the control unit 15 writes the user data in the write buffer 141 to the NAND memory 12 and updates the translation information. The cache flush process can be executed for the entire memory system 1. Further, the memory system 1 may be configured so that the cache flush process is executed in a limited namespace or stream. In the memory system 1 in which the PLP can be executed, the memory system 1 may be configured so as to be able to ignore the cache flush command.

(4−1)ライトバッファ処理
ライトバッファ141は、ダブルバッファの構成を備えた、FIFOのルールでデータの入出力がなされるバッファである。ライトバッファ141は、所定のサイズの領域毎に書き込み実行フラグを備える。
(4-1) Write Buffer Processing The write buffer 141 is a buffer having a double buffer configuration in which data is input / output according to FIFO rules. The write buffer 141 includes a write execution flag for each area of a predetermined size.

制御部15は、キャッシュを用いたライトまたはアトミックライトの場合、所定の量だけライトバッファ141に蓄積されるに応じてライトバッファ141内のユーザデータをNANDメモリ12にページ単位でコピーする。FUAライトの場合、制御部15は、ライトバッファ141にユーザデータが書き込まれた後にすぐに当該ユーザデータをNANDメモリ12にページ単位でコピーする。トリム処理の場合は、制御部15は、トリムの通知そのものをライトバッファ141に書き込み、当該トリムの通知をライトバッファ141からNANDメモリ12(NANDメモリ12のユーザデータ領域123)にコピーする。コピーの後、制御部15は、コピー元の領域に書き込み実行フラグを立てる。制御部15は、書き込み実行フラグが立てられた領域を、空き領域として扱うことができる。 In the case of a write using a cache or an atomic write, the control unit 15 copies the user data in the write buffer 141 to the NAND memory 12 on a page-by-page basis as a predetermined amount is accumulated in the write buffer 141. In the case of FUA write, the control unit 15 copies the user data to the NAND memory 12 in page units immediately after the user data is written to the write buffer 141. In the case of the trim processing, the control unit 15 writes the trim notification itself to the write buffer 141, and copies the trim notification from the write buffer 141 to the NAND memory 12 (user data area 123 of the NAND memory 12). After copying, the control unit 15 sets a write execution flag in the copy source area. The control unit 15 can treat the area in which the write execution flag is set as a free area.

NANDメモリ12へのコピーの間、ライトバッファ処理は、コピー元の領域の管理権を有さない。即ち、ライトバッファ処理において、制御部15はコピー元の領域に対する書き込みはできない。コピー元の領域以外の領域については、既にライトバッファ141に格納されているユーザデータと同じ論理アドレスを指定して別のユーザデータが送られてきた場合(再書き込み)、ライトバッファ処理において、制御部15は当該別のユーザデータを既にライトバッファ141に格納されているユーザデータに上書きする。 During copying to the NAND memory 12, the write buffer process does not have control of the copy source area. That is, in the write buffer process, the control unit 15 cannot write to the copy source area. For areas other than the copy source area, when another user data is sent by specifying the same logical address as the user data already stored in the write buffer 141 (rewrite), control is performed in the write buffer processing. The unit 15 overwrites the other user data with the user data already stored in the write buffer 141.

ライトバッファ処理において、制御部15は、ライトバッファ141に空き領域があるかぎり、ホスト2から送られてきたユーザデータを任意のタイミングでライトバッファ141に格納することができる。再書き込みの場合を除き、制御部15は、ライトバッファ141にユーザデータを格納するに応じて翻訳情報を更新する。具体的には、ライトバッファ141内の格納位置の物理アドレスを、ユーザデータの位置を示す論理アドレスに対応付ける。制御部15は、翻訳情報の更新を、RAM14上で実行する。対応する単位情報がキャッシュ領域143に存在しない場合には、制御部15は、対応する単位情報をログストレージ領域124からキャッシュ領域143に読み出した後、当該単位情報を更新する。単位情報の更新後、制御部15は、更新された単位情報および更新された単位情報を指す上位層の単位情報をダーティに設定する。 In the write buffer process, the control unit 15 can store the user data sent from the host 2 in the write buffer 141 at an arbitrary timing as long as the write buffer 141 has a free area. Except for the case of rewriting, the control unit 15 updates the translation information according to the storage of the user data in the write buffer 141. Specifically, the physical address of the storage position in the write buffer 141 is associated with the logical address indicating the position of the user data. The control unit 15 updates the translation information on the RAM 14. If the corresponding unit information does not exist in the cache area 143, the control unit 15 reads the corresponding unit information from the log storage area 124 to the cache area 143, and then updates the unit information. After updating the unit information, the control unit 15 sets the updated unit information and the unit information of the upper layer indicating the updated unit information dirty.

キャッシュフラッシュコマンドの受信時、FUAライトの実行時、FUAリードにおいて対象の翻訳情報が未書き込み状態でかつライトバッファ141にデータが存在する時、および予め設定された時間以上の時間のアイドル時間が検出された時、制御部15は、ライトバッファ141からNANDメモリ12へのコピーを実行する。FUAライトの場合、例えば制御部15は、FUAライトのライトコマンドによって書き込まれたユーザデータのみをライトバッファ141からNANDメモリ12にコピーする。制御部15は、NANDメモリ12への書き込みの対象のユーザデータをNANDメモリ12にコピーする際に書き込み先のページに空き領域がある場合には、書き込みの対象のユーザデータとともにNANDメモリ12への書き込みの対象にまだ設定されていないユーザデータをコピーしてもよい。 Detects when a cache flush command is received, when a FUA write is executed, when the target translation information is not written in the FUA read and data exists in the write buffer 141, and an idle time of a time longer than a preset time is detected. When this is done, the control unit 15 executes a copy from the write buffer 141 to the NAND memory 12. In the case of FUA write, for example, the control unit 15 copies only the user data written by the write command of FUA write from the write buffer 141 to the NAND memory 12. When copying the user data to be written to the NAND memory 12 to the NAND memory 12, the control unit 15 sends the user data to the NAND memory 12 together with the user data to be written if there is a free area on the write destination page. User data that has not yet been set for writing may be copied.

(4−2)書き込み先のブロックを選択する処理
制御部15は、1以上のフリーブロックのうちから、書き換え回数が出来るだけ少ないフリーブロックを、書き込み先のブロックとして選択する。フリーブロックとは、有効なユーザデータ301が格納されていないブロックをいう。フリーブロックは、ガベージコレクションにより生成される。制御部15は、2以上のフリーブロックから所定数のフリーブロックを候補としてランダムに選択し、選択された候補のうちの書き換え回数が最も少ないフリーブロックを書き込み先のブロックとして選択してもよい。フリーブロックは、例えば、生成された順番がわかるようにリスト形式(フリーブロックリスト)で管理される。制御部15は、最も古く生成された所定数のフリーブロックまたは最も新しく生成された所定数のフリーブロックを候補として選択してもよい。書き込み先のブロックとして選択されたフリーブロックは、消去後、書き込み先に設定される。消去に際しては、制御部15は、メモリシステム1内においてユニークなシーケンス番号をブロックに割り当てる。シーケンス番号は、消去が実行された順番を示す番号である。制御部15は、1つのブロックの最後のページに情報を書き込む際に、そのブロックのシーケンス番号を記録する。
(4-2) Processing for selecting a write-destination block The control unit 15 selects a free block having as few rewrites as possible from one or more free blocks as a write-destination block. The free block means a block in which valid user data 301 is not stored. Free blocks are generated by garbage collection. The control unit 15 may randomly select a predetermined number of free blocks as candidates from two or more free blocks, and select the free block having the least number of rewrites among the selected candidates as the write destination block. Free blocks are managed in a list format (free block list) so that the order in which they are generated can be known, for example. The control unit 15 may select the oldest generated predetermined number of free blocks or the latest generated predetermined number of free blocks as candidates. The free block selected as the write destination block is set as the write destination after being erased. At the time of erasing, the control unit 15 assigns a unique sequence number in the memory system 1 to the block. The sequence number is a number indicating the order in which the erasures are executed. When writing information on the last page of one block, the control unit 15 records the sequence number of that block.

(4−3)NANDメモリ12への書き込み
ユーザデータをライトバッファ141からNANDメモリ12に書き込む際、制御部15は、コピー元の領域をロックする。また、コピー先のページに空き領域がある場合には、制御部15は、例えば、リードモディファイライトの要領で、NANDメモリ12からデータを読み出して当該読み出したデータを書き込み対象のユーザデータと結合してコピー先のページに書き込む。NANDメモリ12へのユーザデータの書き込みの終了後、その書き込みがキャッシュを用いたライトまたはFUAライトに伴う処理である場合には、制御部15は、翻訳情報の更新要求(以降、単に更新要求)を発行する。更新要求は、論理アドレス、ライトバッファ141内のコピー元を示すアドレス、旧物理アドレス、新物理アドレス、およびデータのサイズを含む。トリム処理に関しては、制御部15は、トリムコマンドに基づき、無効化の対象の論理アドレス範囲を含む更新要求を発行する。
(4-3) Writing to NAND Memory 12 When writing user data from the write buffer 141 to the NAND memory 12, the control unit 15 locks the copy source area. When there is free space on the copy destination page, the control unit 15 reads data from the NAND memory 12 and combines the read data with the user data to be written, for example, in the manner of read-modify-write. And write to the copy destination page. After the writing of the user data to the NAND memory 12 is completed, if the writing is a process associated with a write using a cache or a FUA write, the control unit 15 requests an update of the translation information (hereinafter, simply an update request). Is issued. The update request includes a logical address, an address indicating a copy source in the write buffer 141, an old physical address, a new physical address, and a size of data. Regarding the trim processing, the control unit 15 issues an update request including the logical address range to be invalidated based on the trim command.

(4−4)アトミックライト
アトミックライトにおいては、制御部15は、アトミックライトの開始と終了とをユーザデータ領域123に書き込む。アトミックライトの動作としては2通りの動作が考えられる。
(4-4) Atomic Light In the atomic light, the control unit 15 writes the start and end of the atomic light in the user data area 123. There are two possible operations for the atomic light.

(4−4−1)第1のアトミックライト
制御部15は、アトミックライトの最後の書き込みを確認するまで更新要求をキューイングする。アトミックライトの最後の書き込みを確認した後、制御部15は、キューイングしておいた更新要求を発行する。アトミックライトに応じた翻訳情報の更新中には、制御部15は、アトミックライトの対象となった論理アドレス範囲に対する読み出しを停止する。アトミックライトに対応できる領域の大きさは、メモリシステム1の余裕容量と更新要求をキューイングできる量とで決定される。第1のアトミックライトによれば、ネストが可能である。
(4-4-1) The first atomic light control unit 15 queues the update request until the last write of the atomic write is confirmed. After confirming the last write of the atomic write, the control unit 15 issues the queued update request. During the update of the translation information in response to the atomic write, the control unit 15 stops reading the logical address range targeted by the atomic write. The size of the area corresponding to the atomic write is determined by the spare capacity of the memory system 1 and the amount that can queue the update request. According to the first atomic light, nesting is possible.

(4−4−2)第2のアトミックライト
制御部15は、更新要求を発行する。制御部15は、更新要求がなされた単位情報をキャッシュ領域143において複製する。制御部15は、アトミックライトの実行中には、単位情報の複製を更新する。アトミックライトの最後の書き込みを確認した後、制御部15は、単位情報の複製を複製元の単位情報に反映させる。読み出し動作またはアトミックライトでない書き込み動作の際には、制御部15は、複製元の単位情報を使用する。反映は、次のように実行される。即ち、制御部15は、単位情報の複製のうちの非ダーティの部分について、複製元の単位情報から単位情報の複製に上書きする。そして、制御部15は、単位情報の複製を示すように、上位の翻訳情報に記録されたテーブルアドレスを更新する。第2のアトミックライトに対応できる領域の大きさは、キャッシュ領域143において単位情報の複製を格納可能な量とメモリシステム1の余裕容量とで決定される。第2のアトミックライトによれば、複数の更新要求を逐次実行する必要がある第1のアトミックライトに比べ、翻訳情報の更新を早く完了することができる。即ち、読み出しを停止する期間を短くすることができる。なお、複数のアトミックライトが実行される場合には、制御部15は、アトミックライト毎に単位情報の複製を生成する。
(4-4-2) The second atomic light control unit 15 issues an update request. The control unit 15 duplicates the unit information for which the update request has been made in the cache area 143. The control unit 15 updates the copy of the unit information during the execution of the atomic write. After confirming the last writing of the atomic write, the control unit 15 reflects the duplication of the unit information in the unit information of the duplication source. In the read operation or the write operation other than the atomic write, the control unit 15 uses the unit information of the copy source. The reflection is executed as follows. That is, the control unit 15 overwrites the non-dirty portion of the copy of the unit information from the unit information of the copy source to the copy of the unit information. Then, the control unit 15 updates the table address recorded in the higher-level translation information so as to indicate the duplication of the unit information. The size of the area corresponding to the second atomic write is determined by the amount that can store a copy of the unit information in the cache area 143 and the spare capacity of the memory system 1. According to the second atomic light, the update of the translation information can be completed earlier than that of the first atomic light, which needs to execute a plurality of update requests sequentially. That is, the period for stopping reading can be shortened. When a plurality of atomic lights are executed, the control unit 15 generates a copy of the unit information for each atomic light.

(4−5)翻訳情報の更新処理
制御部15は、更新要求を受け付けると、翻訳情報の更新のタイミングを調べる。制御部15は、翻訳情報を更新できるタイミングに至るまで、更新要求をキューイングする。制御部15は、例えば、更新要求をストリーム毎にキューイングしてもよい。翻訳情報の更新の後、制御部15は、ライトバッファ141の解放を行う。
(4-5) Translation Information Update Processing When the control unit 15 receives the update request, the control unit 15 checks the update timing of the translation information. The control unit 15 queues the update request until the timing at which the translation information can be updated. The control unit 15 may queue the update request for each stream, for example. After updating the translation information, the control unit 15 releases the write buffer 141.

(4−6)トリム処理
トリム処理においては、制御部15は、受信したトリムコマンドをユーザデータ領域123に記録する。ユーザデータ領域123に書き込まれる最小の単位は、複数のトリムコマンドを収容可能である。制御部15は、トリムコマンドの記録の後、翻訳情報を更新し、対応する有効情報を更新する。単位情報のうちの全てのレコードが無効化される場合には、制御部15は、当該全てのレコードが無効化される単位情報を示す上位の翻訳情報のレコードを無効化する。
(4-6) Trimming process In the trim processing, the control unit 15 records the received trim command in the user data area 123. The smallest unit written to the user data area 123 can accommodate a plurality of trim commands. After recording the trim command, the control unit 15 updates the translation information and updates the corresponding valid information. When all the records of the unit information are invalidated, the control unit 15 invalidates the record of the higher translation information indicating the unit information in which all the records are invalidated.

(5)ガベージコレクション
ガベージコレクションは、1つのブロックに含まれる有効なユーザデータ301を他のブロックにコピーし、その後、前記1つのブロックに格納された全ユーザデータ301を無効化する処理をいう。内部に記憶する全てのユーザデータ301がガベージコレクションによって無効化されたブロックは、フリーブロックとして管理される。
(5) Garbage collection Garbage collection refers to a process of copying valid user data 301 included in one block to another block and then invalidating all user data 301 stored in the one block. A block in which all the user data 301 stored internally is invalidated by garbage collection is managed as a free block.

(5−1)ガベージコレクションの対象のブロックの選択
制御部15は、有効なユーザデータ301を記憶する1以上のブロックからガベージコレクションの対象のブロックを選択する。ガベージコレクションの対象のブロックを、GCブロックと表記する。GCブロックの選択方法は、遅延時間および書き込み倍率(Write Amplification)に影響する。制御部15は、例えば次の方法でGCブロックを選択する。
(5-1) Selection of Garbage Collection Target Block The control unit 15 selects a garbage collection target block from one or more blocks that store valid user data 301. The block targeted for garbage collection is referred to as a GC block. The method of selecting the GC block affects the delay time and the write amplification. The control unit 15 selects the GC block by, for example, the following method.

例えば、制御部15は、記憶している無効なユーザデータ301の数が最も大きいブロックをGCブロックとして選択する。この選択方法によれば、書き込み倍率を低減することができる。制御部15は、フリーブロックの枯渇が近くなった時に本選択方法でGCブロックを選択するように構成されてもよい。 For example, the control unit 15 selects the block having the largest number of stored invalid user data 301 as the GC block. According to this selection method, the writing magnification can be reduced. The control unit 15 may be configured to select the GC block by this selection method when the free block is almost exhausted.

例えば、制御部15は、記憶している無効なユーザデータ301の数が所定のしきい値を超えているブロックのうちからGCブロックを選択する。制御部15は、フリーブロックの枯渇が近くなった時に本選択方法でGCブロックを選択するように構成されてもよい。制御部15は、フリーブロックの数に応じてしきい値を変更してもよい。 For example, the control unit 15 selects a GC block from the blocks in which the number of invalid user data 301 stored exceeds a predetermined threshold value. The control unit 15 may be configured to select the GC block by this selection method when the free block is almost exhausted. The control unit 15 may change the threshold value according to the number of free blocks.

例えば、制御部15は、書き換えられてからの経過時間が大きいブロックと書き換えられてからの経過時間が小さいブロックとを分類し、書き換えられてからの経過時間が大きいブロックのうち、無効なユーザデータ301が格納されているブロックをGCブロックとして選択する。制御部15は、アイドル時間中に本選択方法でGCブロックを選択するように構成されてもよい。 For example, the control unit 15 classifies a block having a long elapsed time after being rewritten and a block having a short elapsed time from being rewritten, and among the blocks having a long elapsed time since being rewritten, invalid user data. The block in which 301 is stored is selected as the GC block. The control unit 15 may be configured to select the GC block by this selection method during the idle time.

(5−2)GC比の決定
制御部15は、GCブロックを選択した後、GC比を更新する。GC比は、ユーザデータのNANDメモリ12への書き込み量に対するガベージコレクションによるコピー量の比の設定値である。制御部15は、ブロック内の有効なユーザデータ301の数をブロック内の無効なユーザデータ301の数で除算して得られる数値を、GC比に設定する。以降、制御部15は、ユーザデータのNANDメモリ12への書き込みとガベージコレクションによるコピーとの進行に応じて、GC比を随時更新する。
(5-2) Determination of GC ratio The control unit 15 updates the GC ratio after selecting the GC block. The GC ratio is a set value of the ratio of the copy amount by garbage collection to the write amount of user data to the NAND memory 12. The control unit 15 sets the GC ratio as a numerical value obtained by dividing the number of valid user data 301 in the block by the number of invalid user data 301 in the block. After that, the control unit 15 updates the GC ratio at any time according to the progress of writing the user data to the NAND memory 12 and copying by garbage collection.

(5−3)コピー先のブロックの確保
制御部15は、フリーブロックのうち書き換え回数ができるだけ少ないブロックをコピー先のブロックとして選択する。例えば、制御部15は、2以上のフリーブロックから所定数のフリーブロックを候補としてランダムに選択し、選択された候補のうちの書き換え回数が最も少ないフリーブロックをコピー先のブロックとして選択してもよい。フリーブロックは、例えば、生成された順番がわかるようにリスト形式で管理される。制御部15は、最も古く生成された所定数のフリーブロックまたは最も新しく生成された所定数のフリーブロックを候補として選択してもよい。制御部15は、選択されたコピー先のブロックに、シーケンス番号をブロックに割り当てる。
(5-3) Securing a copy destination block The control unit 15 selects a block having as few rewrites as possible among free blocks as a copy destination block. For example, the control unit 15 may randomly select a predetermined number of free blocks as candidates from two or more free blocks, and select the free block having the least number of rewrites among the selected candidates as the copy destination block. Good. Free blocks are managed in a list format so that the order in which they are generated can be known, for example. The control unit 15 may select the oldest generated predetermined number of free blocks or the latest generated predetermined number of free blocks as candidates. The control unit 15 assigns a sequence number to the selected copy destination block.

(5−4)有効なユーザデータ301のコピー
制御部15は、有効情報に基づいて有効なユーザデータ301を特定する。制御部15は、特定された有効なユーザデータ301をコピー先のブロックにコピーするためのコピーコマンドを生成する。コピーコマンドは、論理アドレスとコピー元のユーザデータ301の位置を示す物理アドレスとを含む。制御部15は、コピーコマンドの実行の前に、コピー先の位置を示す物理アドレスを演算する。制御部15は、コピー先のブロックの先頭から順番にコピーによってユーザデータが格納されるように、コピー先の位置を示す物理アドレスを演算する。制御部15は、GC比に基づいてコピーコマンドの実行タイミングを調整する。制御部15は、コピーコマンドの実行を、コピーコマンドの生成よりも優先して実行する。制御部15は、コピーの後、GC比を更新する。制御部15は、当初の有効なユーザデータ301の数からコピー済みのユーザデータ301の数を減算して得られる値を、当初の無効なユーザデータ301の数からユーザデータの書き込み数を減算して得られる値で除算することによって、新しいGC比を演算する。
(5-4) Copy of Valid User Data 301 The control unit 15 identifies valid user data 301 based on the valid information. The control unit 15 generates a copy command for copying the specified valid user data 301 to the copy destination block. The copy command includes a logical address and a physical address indicating the location of the copy source user data 301. The control unit 15 calculates a physical address indicating the position of the copy destination before executing the copy command. The control unit 15 calculates a physical address indicating the position of the copy destination so that the user data is stored by copying in order from the beginning of the copy destination block. The control unit 15 adjusts the execution timing of the copy command based on the GC ratio. The control unit 15 executes the copy command with priority over the generation of the copy command. The control unit 15 updates the GC ratio after copying. The control unit 15 subtracts the value obtained by subtracting the number of copied user data 301 from the number of initially valid user data 301, and subtracts the number of user data writes from the number of initially invalid user data 301. Calculate the new GC ratio by dividing by the value obtained.

(5−5)翻訳情報および有効情報の更新
コピー後に、制御部15は、翻訳情報および有効情報を更新する。制御部15は、例えば、GCブロックに格納された全ての有効なユーザデータ301のコピーが完了した後に、翻訳情報および有効情報の更新を開始する。ガベージコレクションに伴う翻訳情報および有効情報の実行の優先度は、NANDメモリ12に対するアクセスを行う処理の実行の優先度よりも低く設定される。
(5-5) Update of translation information and valid information After copying, the control unit 15 updates the translation information and valid information. The control unit 15 starts updating the translation information and the valid information after the copying of all the valid user data 301 stored in the GC block is completed, for example. The execution priority of the translation information and the valid information associated with the garbage collection is set lower than the execution priority of the process of accessing the NAND memory 12.

例えば、コピー後、制御部15は、まず、コピー先のブロックにかかる有効情報を更新する。具体的には、制御部15は、コピー先のブロックにコピーされた全てのユーザデータ301が有効であるとして有効情報を更新する。続いて、制御部15は、翻訳情報がユーザデータ301のコピー元の位置を示していることを確認する。コピーが完了するまでの間に、ライトコマンドによるユーザデータの書き込みによって翻訳情報が更新される場合があるからである。翻訳情報がユーザデータ301のコピー元の位置を示している場合、制御部15は、ユーザデータ301のコピー元の位置をコピー先の位置を示すように翻訳情報を更新する。制御部15は、翻訳情報の更新よって単位情報の状態が非ダーティからダーティに遷移した場合、GCダーティ情報223を更新する。翻訳情報がユーザデータ301のコピー元の位置を示していない場合、制御部15は、翻訳情報の更新を行わず、該当するユーザデータ301を無効としてコピー先のブロックにかかる有効情報を更新する。制御部15は、コピーされた全てのユーザデータ301について翻訳情報および有効情報の更新を行った後、コピー元のブロックの有効情報を、全てのユーザデータ301が無効であるとして更新する。 For example, after copying, the control unit 15 first updates the valid information related to the copy destination block. Specifically, the control unit 15 updates the valid information assuming that all the user data 301 copied to the copy destination block are valid. Subsequently, the control unit 15 confirms that the translation information indicates the position of the copy source of the user data 301. This is because the translation information may be updated by writing the user data by the write command until the copy is completed. When the translation information indicates the position of the copy source of the user data 301, the control unit 15 updates the translation information so that the position of the copy source of the user data 301 indicates the position of the copy destination. The control unit 15 updates the GC dirty information 223 when the state of the unit information changes from non-dirty to dirty due to the update of the translation information. When the translation information does not indicate the position of the copy source of the user data 301, the control unit 15 does not update the translation information, invalidates the corresponding user data 301, and updates the valid information related to the copy destination block. After updating the translation information and the valid information for all the copied user data 301, the control unit 15 updates the valid information of the copy source block assuming that all the user data 301 are invalid.

制御部15は、有効情報を監視する。制御部15は、全てのユーザデータ301が無効として記録されたブロックがある場合には、そのブロックをフリーブロックとして管理する。具体的には、制御部15は、全てのユーザデータ301が無効として記録されたブロックを、フリーブロックリストに追加する。ブロックが追加される位置は、フリーブロックリストの末尾でなくてもよい。例えば、制御部15は、フリーブロックリストの末尾に記録されたブロックと追加対象のブロックとの間で書き換え回数を比較する。フリーブロックリストの末尾に記録されたブロックの書き換え回数が追加対象のブロックの書き換え回数よりも多い場合、制御部15は、追加対象のブロックをフリーブロックリストの末尾に記録されたブロックの1つ前の位置に追加する。フリーブロックリストの末尾に記録されたブロックの書き換え回数が追加対象のブロックの書き換え回数よりも少ない場合、制御部15は、追加対象のブロックをフリーブロックリストの末尾に記録されたブロックの後の位置に追加する。書き換え回数に基づく完全なソートをおこなわないのは、消去の実行間隔を延ばすことによってNANDメモリ12の寿命を延命するためである。 The control unit 15 monitors the valid information. If there is a block in which all user data 301 is recorded as invalid, the control unit 15 manages the block as a free block. Specifically, the control unit 15 adds a block in which all user data 301 are recorded as invalid to the free block list. The position where the block is added does not have to be at the end of the free block list. For example, the control unit 15 compares the number of rewrites between the block recorded at the end of the free block list and the block to be added. When the number of rewrites of the block recorded at the end of the free block list is larger than the number of rewrites of the block to be added, the control unit 15 sets the block to be added one before the block recorded at the end of the free block list. Add to the position of. When the number of rewrites of the block recorded at the end of the free block list is less than the number of rewrites of the block to be added, the control unit 15 positions the block to be added after the block recorded at the end of the free block list. Add to. The reason why the complete sort based on the number of rewrites is not performed is to extend the life of the NAND memory 12 by extending the erasing execution interval.

(6)リード処理
リード処理には、キャッシュを用いたリードと、FUAリードとがある。リードの種類は、リードコマンドによって指定可能である。FUAリードは、リードコマンドによって指定された範囲の論理アドレスがキャッシュに残っている場合にはフラッシュし、その後、NANDメモリ12のページバッファキャッシュの無効化要求を発行し、その後、キャッシュを用いたリードを実行する読み出しである。フラッシュの際にライトバッファ141にデータが存在する場合には、制御部15は、ライトバッファ141のフラッシュを実行する。キャッシュを用いたリードは、ライトコマンドによって指定された範囲の論理アドレスの翻訳と、NANDコントローラ13への読み出し要求の送信と、NANDコントローラ13から送られてきたユーザデータ301のリードバッファ142への格納と、リードバッファ142に格納されたユーザデータ301のホストへの送信と、を含む。
(6) Reed processing There are two types of reed processing: a read using a cache and a FUA read. The read type can be specified by a read command. The FUA read flushes if the range of logical addresses specified by the read command remains in the cache, then issues a request to invalidate the page buffer cache of the NAND memory 12, and then reads using the cache. Is a read that executes. If data exists in the write buffer 141 at the time of flashing, the control unit 15 flushes the write buffer 141. The read using the cache translates the logical address in the range specified by the write command, sends a read request to the NAND controller 13, and stores the user data 301 sent from the NAND controller 13 in the read buffer 142. And transmission of the user data 301 stored in the read buffer 142 to the host.

(6−1)リードキャッシュ
リードキャッシュとしては、ページバッファキャッシュと、リードバッファ142と、の2種類が存在する。ページバッファキャッシュは、NANDメモリ12を構成するチップの内部に具備される。NANDコントローラ13は、連続して同じ物理アドレスからユーザデータ301を読み出す際には、NANDメモリ12にリードコマンドを送信せず、ページバッファキャッシュに格納されているユーザデータ301を読み出す。リードバッファ142は、FIFOのルールに従ってデータが入出力される。
(6-1) Read cache There are two types of read cache, a page buffer cache and a read buffer 142. The page buffer cache is provided inside the chip that constitutes the NAND memory 12. When the NAND controller 13 continuously reads the user data 301 from the same physical address, the NAND controller 13 does not send a read command to the NAND memory 12 but reads the user data 301 stored in the page buffer cache. Data is input / output to / from the read buffer 142 according to the FIFO rules.

(7)キャッシュ領域143内のキャッシュラインの置換
(7−1)第1の置換
制御部15は、ライト処理またはリード処理の際にキャッシュラインを空ける場合、ガベージコレクションによってダーティとなったキャッシュラインを優先的に空ける。具体的には、制御部15は、まず、GCダーティ情報223を参照する。そして、制御部15は、GCダーティ情報223が示す単位情報のうちの最も古い単位情報を、ログストレージ領域124に書き戻し、キャッシュ領域143から削除する。ガベージコレクションによってダーティとなった単位情報が存在しない場合には、制御部15は、キャッシュ領域143にキャッシュされている単位情報をランダムに選択する。制御部15は、乱数を発生させ、発生させた乱数を用いることによって単位情報を選択する。制御部15は、選択された単位情報がダーティであるか否かを、ユーザダーティ情報222を参照することによって判定する。選択された単位情報がダーティでない場合、制御部15は、選択された単位情報をキャッシュ領域143から削除する。選択された単位情報がダーティである場合、制御部15は、ユーザダーティ情報222が示す単位情報のうちの最も古い単位情報を、ログストレージ領域124に書き戻し、キャッシュ領域143から削除する。
(7) Replacement of cache line in cache area 143 (7-1) First replacement When a cache line is vacated during write processing or read processing, the first replacement control unit 15 selects a cache line that has become dirty due to garbage collection. Priority is given to emptying. Specifically, the control unit 15 first refers to the GC dirty information 223. Then, the control unit 15 writes back the oldest unit information among the unit information indicated by the GC dirty information 223 to the log storage area 124 and deletes it from the cache area 143. When there is no unit information that has become dirty due to garbage collection, the control unit 15 randomly selects the unit information cached in the cache area 143. The control unit 15 generates a random number and selects unit information by using the generated random number. The control unit 15 determines whether or not the selected unit information is dirty by referring to the user dirty information 222. If the selected unit information is not dirty, the control unit 15 deletes the selected unit information from the cache area 143. When the selected unit information is dirty, the control unit 15 writes back the oldest unit information among the unit information indicated by the user dirty information 222 to the log storage area 124 and deletes it from the cache area 143.

(7−2)第2の置換
ガベージコレクションを行うためにキャッシュラインを空ける場合、制御部15は、次のようにキャッシュラインを置換する。即ち、制御部15は、GCダーティ情報223が示す単位情報の数に上限値を設定する。GCダーティ情報223が示す単位情報の数が上限値に達している場合には、制御部15は、GCダーティ情報223が示す単位情報のうちの最も古い単位情報を、ログストレージ領域124に書き戻し、キャッシュ領域143から削除する。GCダーティ情報223が示す単位情報の数が上限値に達していない場合には、制御部15は、キャッシュ領域143にキャッシュされている単位情報をランダムに選択する。選択された単位情報がダーティでない場合、制御部15は、選択された単位情報をキャッシュ領域143から削除する。選択された単位情報がダーティである場合、制御部15は、ユーザダーティ情報222が示す単位情報のうちの最も古い単位情報を、ログストレージ領域124に書き戻し、キャッシュ領域143から削除する。
(7-2) Second Replacement When a cache line is vacated for garbage collection, the control unit 15 replaces the cache line as follows. That is, the control unit 15 sets an upper limit value for the number of unit information indicated by the GC dirty information 223. When the number of unit information indicated by the GC dirty information 223 has reached the upper limit, the control unit 15 writes back the oldest unit information among the unit information indicated by the GC dirty information 223 to the log storage area 124. , Delete from the cache area 143. When the number of unit information indicated by the GC dirty information 223 has not reached the upper limit value, the control unit 15 randomly selects the unit information cached in the cache area 143. If the selected unit information is not dirty, the control unit 15 deletes the selected unit information from the cache area 143. When the selected unit information is dirty, the control unit 15 writes back the oldest unit information among the unit information indicated by the user dirty information 222 to the log storage area 124 and deletes it from the cache area 143.

以上述べたように、第1の実施形態においては、翻訳情報は、複数の階層に階層化されて管理される。そして、第2階層に属する翻訳情報である第2テーブル202aのサイズと、第2階層に属する翻訳情報である第3テーブル203aのサイズとが等しい。これにより、各テーブル202a、203aのサイズの管理が簡単になる。また、第2テーブル202aおよび第3テーブル203aを、ログストレージ領域124に混ぜて格納することが可能である。即ち、第2テーブル202aを格納する領域と第3テーブル203aを格納する領域とを分けて管理する必要がない。また、第2テーブル202aおよび第3テーブル203aを1つのページに混ぜて格納することが可能である。また、各ページに格納可能なテーブルの数を一定に維持することが可能である。このように、第1の実施形態によれば、翻訳情報の管理が簡単であるため、翻訳情報の管理コストが安く、利便性が高い。 As described above, in the first embodiment, the translation information is managed in a plurality of layers. Then, the size of the second table 202a, which is the translation information belonging to the second layer, is equal to the size of the third table 203a, which is the translation information belonging to the second layer. This makes it easy to manage the sizes of the tables 202a and 203a. Further, the second table 202a and the third table 203a can be mixed and stored in the log storage area 124. That is, it is not necessary to manage the area for storing the second table 202a and the area for storing the third table 203a separately. Further, the second table 202a and the third table 203a can be mixed and stored in one page. In addition, it is possible to keep the number of tables that can be stored in each page constant. As described above, according to the first embodiment, since the translation information is easily managed, the translation information management cost is low and the convenience is high.

なお、以上の説明においては、第2階層に属する翻訳情報である第2テーブル202aのサイズと第3階層に属する翻訳情報である第3テーブル203aのサイズとが等しい、として説明した。翻訳情報は、4以上の階層に階層化され、任意の2つの階層の夫々に属する翻訳情報のサイズが互いに等しくなるように構成されてもよい。例えば、第i階層に属する翻訳情報のサイズと、第j階層に属する翻訳情報のサイズとが等しくなるように構成された場合、第i階層に属する翻訳情報と第j階層に属する翻訳情報とを同じ領域に混ぜて格納することが可能である。 In the above description, it has been described that the size of the second table 202a, which is the translation information belonging to the second layer, and the size of the third table 203a, which is the translation information belonging to the third layer, are equal. The translation information may be layered into four or more layers, and the size of the translation information belonging to each of the two arbitrary layers may be equal to each other. For example, when the size of the translation information belonging to the i-th layer and the size of the translation information belonging to the j-th layer are configured to be equal to each other, the translation information belonging to the i-th layer and the translation information belonging to the j-th layer are combined. It is possible to mix and store in the same area.

また、各有効ビットマップ212aのサイズは、第2テーブル202aおよび第3テーブル203aのサイズと等しい。これにより、有効ビットマップ212a、第2テーブル202aおよび第3テーブル203aを、ログストレージ領域124に混ぜて格納することが可能である。また、有効ビットマップ212a、第2テーブル202aおよび第3テーブル203aを、1つのページに混ぜて格納することが可能である。各ページに格納可能な単位情報の数を一定に維持することが可能である。 Further, the size of each effective bitmap 212a is equal to the size of the second table 202a and the third table 203a. As a result, the effective bitmap 212a, the second table 202a, and the third table 203a can be mixed and stored in the log storage area 124. Further, the effective bitmap 212a, the second table 202a, and the third table 203a can be mixed and stored in one page. It is possible to keep the number of unit information that can be stored on each page constant.

(第2の実施形態)
第2の実施形態は、第1の実施形態のメモリシステム1に適用することが可能である。第2の実施形態によれば、制御部15は、2以上のプロセッサを備えて構成される。
(Second Embodiment)
The second embodiment can be applied to the memory system 1 of the first embodiment. According to the second embodiment, the control unit 15 includes two or more processors.

図9は、第2の実施形態の制御部15の構成を示す図である。本図の例によれば、制御部15は、複数(ここでは3つ)のプロセッサ151を備える。3つのプロセッサ151のうちの1つは、他の2つのプロセッサ151に対して動的にタスクを分配する、ダイナミックタスクスケジューラとして機能する。ダイナミックタスクスケジューラとしてのプロセッサ151を、マスタプロセッサ151aと表記する。マスタプロセッサ151aからタスクを分配される2つのプロセッサ151を、スレーブプロセッサ151bと表記する。なお、タスクは、メモリシステム1の制御を構成する。メモリシステム1の制御は、複数のタスクによって構成される。1つの処理は、1つのタスクによって構成されてもよい。1つの処理は、複数のタスクによって構成されてもよい。複数の処理は1つのタスクによって構成されてもよい。 FIG. 9 is a diagram showing the configuration of the control unit 15 of the second embodiment. According to the example in this figure, the control unit 15 includes a plurality of (three in this case) processors 151. One of the three processors 151 functions as a dynamic task scheduler that dynamically distributes tasks to the other two processors 151. The processor 151 as a dynamic task scheduler is referred to as a master processor 151a. The two processors 151 whose tasks are distributed from the master processor 151a are referred to as slave processors 151b. The task constitutes the control of the memory system 1. The control of the memory system 1 is composed of a plurality of tasks. One process may be composed of one task. One process may be composed of a plurality of tasks. The plurality of processes may be composed of one task.

図10は、第2の実施形態のRAM14の構成を示す図である。図3において説明した構成についてはここでは省略する。第2の実施形態によれば、RAM14は、プログラムロード領域144およびワークエリア145を備える。プログラムロード領域144には、1以上のタスクプログラム241がロードされる。タスクプログラム241は、1つのタスクを実現するためのプログラムコードの集合である。 FIG. 10 is a diagram showing the configuration of the RAM 14 of the second embodiment. The configuration described with reference to FIG. 3 will be omitted here. According to the second embodiment, the RAM 14 includes a program load area 144 and a work area 145. One or more task programs 241 are loaded in the program load area 144. The task program 241 is a set of program codes for realizing one task.

1つのタスクプログラム241は、複数のプロセッサ151によって同時に実行されてもよい。ワークエリア145は、実行毎に確保されたり解放されたりするデータエリア242を備える。各データエリア242には、タスクの実行のために使用される値が格納される。 One task program 241 may be executed simultaneously by a plurality of processors 151. The work area 145 includes a data area 242 that is reserved and released for each execution. Each data area 242 stores a value used to execute the task.

例えば、翻訳情報を更新するタスクは、1つのタスクプログラム241によって実現する。翻訳情報の更新のための1つのタスクプログラム241に対し、更新要求毎に、異なるデータエリア242が確保される。各データエリア242には、更新要求に含まれる論理アドレス、旧物理アドレス、および新物理アドレスなどが、タスクの実行のために使用される値として格納される。翻訳情報を更新するタスクのための1つのタスクプログラム241は、複数のプロセッサ151によって同時に実行され、当該翻訳情報を更新するタスクのための1つのタスクプログラム241を同時に実行する複数のプロセッサ151は、互いに異なるデータエリア242を使用するように構成される。これにより、制御部15は、互いに異なる複数の更新要求を並行して処理することが可能である。 For example, the task of updating translation information is realized by one task program 241. A different data area 242 is secured for each update request for one task program 241 for updating translation information. In each data area 242, the logical address, the old physical address, the new physical address, and the like included in the update request are stored as values used for executing the task. The one task program 241 for the task of updating the translation information is executed simultaneously by the plurality of processors 151, and the plurality of processors 151 simultaneously executing the one task program 241 for the task of updating the translation information. It is configured to use different data areas 242. As a result, the control unit 15 can process a plurality of update requests different from each other in parallel.

例えば、コマンドを解析するタスクは、1つのタスクプログラム241によって実現する。コマンドの解析のための1つのタスクプログラム241に対し、コマンド毎に異なるデータエリア242が確保される。各データエリア242には、コマンドの識別情報およびコマンドに含まれるパラメータなどが、タスクの実行のために使用される値として格納される。コマンドを解析するタスクのための1つのタスクプログラム241は、複数のプロセッサ151によって同時に実行され、当該コマンドを解析するタスクのための1つのタスクプログラム241を同時に実行する複数のプロセッサ151は、互いに異なるデータエリア242を使用する。これにより、制御部15は、互いに異なる複数のコマンドを並行して解析することが可能である。 For example, the task of analyzing commands is realized by one task program 241. A different data area 242 is secured for each command for one task program 241 for analyzing the command. In each data area 242, the identification information of the command, the parameters included in the command, and the like are stored as values used for executing the task. One task program 241 for a task that parses a command is executed simultaneously by a plurality of processors 151, and a plurality of processors 151 that simultaneously execute one task program 241 for a task that parses the command are different from each other. Data area 242 is used. As a result, the control unit 15 can analyze a plurality of commands different from each other in parallel.

1つのタスクプログラム241に対して実行毎に異なる複数のデータエリア242が割り当て可能にメモリシステム1が構成されているので、実行毎にタスクプログラム241をプログラムロード領域144にロードする必要がない。制御部15は、スタートアップ処理において、全てのタスクプログラム241をプログラムロード領域144にロードする。制御部15は、複数のタスク間でのデータの授受を、データエリア242を用いて実行することができる。 Since the memory system 1 is configured so that a plurality of data areas 242 different for each execution can be allocated to one task program 241, it is not necessary to load the task program 241 into the program load area 144 for each execution. The control unit 15 loads all the task programs 241 into the program load area 144 in the startup process. The control unit 15 can transfer data between a plurality of tasks using the data area 242.

マスタプロセッサ151aは、マスタキュー152aを備える。各スレーブプロセッサ151bは、スレーブキュー152bを備える。マスタキュー152aには、実行待ちのタスクが登録される。具体的には、マスタキュー152aには、実行待ちのタスクを実現するタスクプログラム241を示す識別情報が、当該タスクの実行のために使用されるデータエリア242を指定する情報と対応付けられて登録される。マスタプロセッサ151aは、マスタキュー152aに登録された1以上のタスクを、2つのスレーブプロセッサ151bに分配する。マスタプロセッサ151aは、マスタキュー152aに登録されたタスクを、いずれかのスレーブプロセッサ151bに具備されるスレーブキュー152bに登録する。各スレーブプロセッサ151bは、自身に具備されるスレーブキュー152bに登録されたタスクを実行する。言い換えると、各スレーブプロセッサ151bは、自身に具備されるスレーブキュー152bに登録されている識別情報が示すタスクプログラム241を、当該識別情報に対応付けられている情報が指定するデータエリア242を使用しながら実行する。 The master processor 151a includes a master queue 152a. Each slave processor 151b includes a slave queue 152b. A task waiting to be executed is registered in the master queue 152a. Specifically, the identification information indicating the task program 241 that realizes the task waiting to be executed is registered in the master queue 152a in association with the information that specifies the data area 242 used for executing the task. Will be done. The master processor 151a distributes one or more tasks registered in the master queue 152a to two slave processors 151b. The master processor 151a registers the task registered in the master queue 152a in the slave queue 152b provided in any of the slave processors 151b. Each slave processor 151b executes a task registered in the slave queue 152b provided therein. In other words, each slave processor 151b uses the data area 242 designated by the information associated with the identification information for the task program 241 indicated by the identification information registered in the slave queue 152b provided in the slave processor 151b. Execute while.

タスクを分配する手法は任意に設計される。例えば、各スレーブキュー152bには、登録可能なタスクの数に上限値が設定される。マスタプロセッサ151aは、上限値に達するまで、各スレーブキュー152bにタスクを登録する。各スレーブプロセッサ151bは、自身に具備されるスレーブキュー152bに登録されたタスクを実行完了する毎に、マスタプロセッサ151aに完了通知を送信する。完了通知を受信したマスタプロセッサ151aは、完了通知を送信したスレーブプロセッサ151bに具備されるスレーブキュー152bに、新たなタスクを登録する。 The method of distributing tasks is arbitrarily designed. For example, an upper limit is set for the number of tasks that can be registered in each slave queue 152b. The master processor 151a registers tasks in each slave queue 152b until the upper limit is reached. Each slave processor 151b transmits a completion notification to the master processor 151a each time the task registered in the slave queue 152b provided in the slave processor 151b is executed. The master processor 151a that has received the completion notification registers a new task in the slave queue 152b provided in the slave processor 151b that has transmitted the completion notification.

なお、1つのタスクは、別のタスクを生成してもよい。当該別のタスクは、マスタキュー152aに登録されたのち、何れかのスレーブキュー152bに分配される。1つのタスクは、別のタスクを実行させるスレーブプロセッサ151bを指定可能に構成されてもよい。その場合には、当該別のタスクは、マスタキュー152aを経ることなく、指定されたスレーブプロセッサ151bに具備されるスレーブキュー152bに直接に登録されてもよい。また、別のタスクを実行させるスレーブプロセッサ151bが指定された場合には、指定されたスレーブプロセッサ151bに具備されるスレーブキュー152bに登録されているタスクの数が上限値に達しているか否かにかかわらず、当該別のタスクが指定されたスレーブプロセッサ151bに具備されるスレーブキュー152bに登録されてもよい。 Note that one task may generate another task. The other task is registered in the master queue 152a and then distributed to any of the slave queues 152b. One task may be configured to allow the slave processor 151b to execute another task. In that case, the other task may be directly registered in the slave queue 152b provided in the designated slave processor 151b without going through the master queue 152a. When a slave processor 151b for executing another task is specified, whether or not the number of tasks registered in the slave queue 152b provided in the specified slave processor 151b has reached the upper limit. Regardless, the other task may be registered in the slave queue 152b provided in the designated slave processor 151b.

このように、マスタプロセッサ151aは、複数のスレーブプロセッサ151bにタスクを動的に分散させることができる。 In this way, the master processor 151a can dynamically distribute tasks to a plurality of slave processors 151b.

複数のスレーブプロセッサ151bの夫々に対し、個別に電源を供給したり電源の供給を停止したりすることが可能に構成されてもよい。例えば、メモリシステム1は、通常モードと、当該通常モードよりも電力消費が低い低消費電力モードと、の2つのモードで動作が可能に構成される。電源制御部は、通常モードにおいては、2つのスレーブプロセッサ151bに電源を供給する。電源制御部は、2つのスレーブプロセッサ151bのうちの1つのみに電源を供給する。電源制御部は、ハードウェア、ソフトウェア、または両者の組み合わせによって構成される。例えば、マスタプロセッサ151aは、電源制御部として機能する。マスタプロセッサ151aは、通常モードにおいては2つのスレーブプロセッサ151bにタスクを分配する。マスタプロセッサ151aは、低消費電力モードにおいては、2つのスレーブプロセッサ151bのうちの電源が供給されているスレーブプロセッサ151bのみにタスクを供給する。このように、マスタプロセッサ151aはタスクの登録先を動的に決定するので、制御部15は、電源が供給されているスレーブプロセッサ151bの数が変化しても、メモリシステム1の制御を継続することができる。 Each of the plurality of slave processors 151b may be configured to be able to individually supply power or stop supplying power. For example, the memory system 1 is configured to be able to operate in two modes, a normal mode and a low power consumption mode in which power consumption is lower than that of the normal mode. The power control unit supplies power to the two slave processors 151b in the normal mode. The power control unit supplies power to only one of the two slave processors 151b. The power control unit is composed of hardware, software, or a combination of both. For example, the master processor 151a functions as a power supply control unit. The master processor 151a distributes the task to the two slave processors 151b in the normal mode. In the low power consumption mode, the master processor 151a supplies a task only to the slave processor 151b to which the power is supplied out of the two slave processors 151b. In this way, since the master processor 151a dynamically determines the task registration destination, the control unit 15 continues to control the memory system 1 even if the number of slave processors 151b to which power is supplied changes. be able to.

なお、マスタプロセッサ151aは、マスタキュー152aのほかにスレーブキュー152bを具備してもよい。マスタプロセッサ151aは、自身が備えるスレーブキュー152bにタスクを分配してもよい。 The master processor 151a may include a slave queue 152b in addition to the master queue 152a. The master processor 151a may distribute tasks to its own slave queue 152b.

第2の実施形態においては、翻訳情報および有効情報の一貫性を維持するために、翻訳情報を更新するタスクおよび有効情報を更新するタスクは、予め決められたスレーブプロセッサ151bにおいて実行される。 In the second embodiment, in order to maintain the consistency of the translated information and the valid information, the task of updating the translated information and the task of updating the valid information are executed by the predetermined slave processor 151b.

例えば、翻訳情報の場合、メモリシステム1の論理アドレス空間が2つの論理アドレス範囲に分割される。翻訳情報を更新するタスクを登録するタスクが、何れかのプロセッサ151において実行される。翻訳情報を更新するタスクを登録するタスクは、2つの論理アドレス範囲のうちの第1の論理アドレス範囲に含まれる論理アドレスについての更新要求を、2つのスレーブプロセッサ151bのうちの予め決められた一のスレーブプロセッサ151bに実行させる。また、翻訳情報を更新するタスクを登録するタスクは、2つの論理アドレス範囲のうちの第2の論理アドレス範囲に含まれる論理アドレスについての更新要求を、2つのスレーブプロセッサ151bのうちの他のスレーブプロセッサ151bに実行させる。翻訳情報を更新するタスクが複数、1つのスレーブキュー152bに登録されている場合には、そのスレーブキュー152bを備えるスレーブプロセッサ151bは、翻訳情報を更新する各タスクを、スレーブキュー152bに登録された順番で実行することとする。このように、翻訳情報の更新に関し、担当の論理アドレス範囲がスレーブプロセッサ151b毎に予め設定されていることによって、翻訳情報の一貫性が維持される。 For example, in the case of translation information, the logical address space of the memory system 1 is divided into two logical address ranges. The task of registering the task of updating the translation information is executed in any of the processors 151. The task of registering the task of updating the translation information makes an update request for a logical address included in the first logical address range of the two logical address ranges, which is a predetermined one of the two slave processors 151b. Is executed by the slave processor 151b of. Further, the task of registering the task of updating the translation information makes an update request for the logical address included in the second logical address range of the two logical address ranges, and the other slave of the two slave processors 151b. Let the processor 151b execute it. When a plurality of tasks for updating translation information are registered in one slave queue 152b, the slave processor 151b including the slave queue 152b registers each task for updating translation information in the slave queue 152b. It will be executed in order. In this way, regarding the update of the translation information, the consistency of the translation information is maintained by presetting the logical address range in charge for each slave processor 151b.

例えば、有効情報の場合、メモリシステム1の物理アドレス空間が2つの部分空間に分割される。有効情報を更新するタスクを登録するタスクが、何れかのプロセッサ151において実行される。有効情報を更新するタスクを登録するタスクは、2つの物理アドレス範囲のうちの第1の物理アドレス範囲に含まれる論理アドレスについての更新要求を、2つのスレーブプロセッサ151bのうちの予め決められた一のスレーブプロセッサ151bに実行させる。また、有効情報を更新するタスクを登録するタスクは、2つの物理アドレス範囲のうちの第2の物理アドレス範囲に含まれる論理アドレスについての更新要求を、2つのスレーブプロセッサ151bのうちの他のスレーブプロセッサ151bに実行させる。有効情報を更新するタスクが複数、1つのスレーブキュー152bに登録されている場合には、そのスレーブキュー152bを備えるスレーブプロセッサ151bは、有効情報を更新する各タスクを、そのスレーブキュー152bに登録された順番で実行することとする。このように、有効情報の更新に関し、担当の物理アドレス範囲がスレーブプロセッサ151b毎に予め設定されていることによって、有効情報の一貫性が維持される。 For example, in the case of valid information, the physical address space of the memory system 1 is divided into two subspaces. The task of registering the task of updating the valid information is executed in any of the processors 151. The task of registering the task for updating valid information makes an update request for a logical address included in the first physical address range of the two physical address ranges, which is a predetermined one of the two slave processors 151b. Is executed by the slave processor 151b of. Further, the task of registering the task of updating the valid information makes an update request for the logical address included in the second physical address range of the two physical address ranges, and the other slave of the two slave processors 151b. Let the processor 151b execute it. When a plurality of tasks for updating valid information are registered in one slave queue 152b, the slave processor 151b including the slave queue 152b registers each task for updating valid information in the slave queue 152b. It shall be executed in the order of. In this way, regarding the update of the valid information, the consistency of the valid information is maintained by presetting the physical address range in charge for each slave processor 151b.

例えば、ガベージコレクションにおいては、コピーコマンドを生成するタスクを登録するタスクが実行される。コピーコマンドを生成するタスクを登録するタスクは、GCブロックの物理アドレス範囲を、2つの物理アドレス範囲に分割する。コピーコマンドを生成するタスクを登録するタスクは、2つの物理アドレス範囲のうちの第1の物理アドレス範囲の有効ビットマップ212bを、2つのスレーブプロセッサ151bのうちの予め決められた一のスレーブプロセッサ151bに渡し、当該一のスレーブプロセッサ151bにコピーコマンドを生成するタスクを登録する。当該一のスレーブプロセッサ151bは、登録されたタスクに基づいてコピーコマンドを生成する際には、第1の物理アドレス範囲の有効ビットマップ212bに基づいてコピー対象の有効なユーザデータ301を特定する。また、コピーコマンドを生成するタスクを登録するタスクは、2つの物理アドレス範囲のうちの第2の物理アドレス範囲の有効ビットマップ212bを、2つのスレーブプロセッサ151bのうちの他のスレーブプロセッサ151bに渡し、当該他のスレーブプロセッサ151bにコピーコマンドを生成するタスクを登録する。当該他のスレーブプロセッサ151bは、登録されたタスクに基づいてコピーコマンドを生成する際には、第2の物理アドレス範囲の有効ビットマップ212bに基づいてコピー対象の有効なユーザデータ301を特定する。 For example, in garbage collection, a task to register a task to generate a copy command is executed. The task of registering the task of generating the copy command divides the physical address range of the GC block into two physical address ranges. The task of registering the task of generating the copy command sets the effective bitmap 212b of the first physical address range of the two physical address ranges to the predetermined slave processor 151b of the two slave processors 151b. And register the task to generate the copy command in the one slave processor 151b. When the one slave processor 151b generates a copy command based on the registered task, the one slave processor 151b identifies valid user data 301 to be copied based on the valid bitmap 212b of the first physical address range. Further, the task of registering the task of generating the copy command passes the effective bitmap 212b of the second physical address range of the two physical address ranges to the other slave processor 151b of the two slave processors 151b. , Register a task to generate a copy command in the other slave processor 151b. When the other slave processor 151b generates a copy command based on the registered task, the other slave processor 151b identifies valid user data 301 to be copied based on the valid bitmap 212b of the second physical address range.

このように、第2の実施形態においては、メモリシステム1は、複数のプロセッサ151を備える。各プロセッサ151は、論理アドレスの範囲が夫々設定される。各プロセッサ151は、翻訳情報のうちの、自身に設定された論理アドレスの範囲に含まれる論理アドレスにかかるレコードの更新を実行する。これにより、翻訳情報の更新を複数のプロセッサ151で並行して実行することが可能となるので、翻訳情報の更新を1つのプロセッサ151のみで実行する場合に比べ、翻訳情報を高速に更新することができる。また、翻訳情報の一貫性を損なうことなく翻訳情報を高速に更新することができる。 Thus, in the second embodiment, the memory system 1 includes a plurality of processors 151. Each processor 151 is set with a range of logical addresses. Each processor 151 executes the update of the record related to the logical address included in the range of the logical address set to itself in the translation information. As a result, the translation information can be updated in parallel on a plurality of processors 151. Therefore, the translation information can be updated at a higher speed than when the translation information is updated on only one processor 151. Can be done. In addition, the translated information can be updated at high speed without impairing the consistency of the translated information.

また、各プロセッサ151は、物理アドレスの範囲が夫々設定される。各プロセッサ151は、自身に設定された物理アドレスの範囲の有効情報のレコードの更新を実行する。これにより、有効情報の更新を複数のプロセッサ151で並行して実行することが可能となるので、有効情報の更新を1つのプロセッサ151のみで実行する場合に比べ、有効情報を高速に更新することができる。また、有効情報の一貫性を損なうことなく有効情報を高速に更新することができる。 Further, each processor 151 is set with a range of physical addresses. Each processor 151 updates a record of valid information in the range of physical addresses set to itself. As a result, the valid information can be updated in parallel on a plurality of processors 151. Therefore, the valid information can be updated at a higher speed than when the valid information is updated by only one processor 151. Can be done. In addition, the valid information can be updated at high speed without impairing the consistency of the valid information.

また、1つのプロセッサ151は、ガベージコレクションの際に、複数のプロセッサ151にコピーコマンドを生成する処理を分担させる。具体的には、1つのプロセッサ151は、GCブロックを複数の領域に分割する。各プロセッサ151は、分割された領域の1つに格納されている有効なユーザデータ301を特定し、特定した有効なユーザデータ301をコピーするためのコピーコマンドを生成する。これにより、GCブロックに格納されている有効なユーザデータ301が多くても、高速にコピーコマンドを作成することができる。 Further, one processor 151 causes a plurality of processors 151 to share the process of generating a copy command at the time of garbage collection. Specifically, one processor 151 divides the GC block into a plurality of areas. Each processor 151 identifies valid user data 301 stored in one of the divided areas and generates a copy command for copying the identified valid user data 301. As a result, even if there is a large amount of valid user data 301 stored in the GC block, a copy command can be created at high speed.

(第3の実施形態)
第3の実施形態は、第1の実施形態および第2の実施形態の何れのメモリシステム1に適用することが可能である。第3の実施形態によれば、メモリシステム1は、ソフトウェア定義型(Software Defined)プラットフォームを備える。ソフトウェア定義型プラットフォームは、例えば、メモリシステム1の機能をハードウェアの制御から切り離し、ソフトウェアにより制御を実行する。
(Third Embodiment)
The third embodiment can be applied to any of the memory systems 1 of the first embodiment and the second embodiment. According to a third embodiment, the memory system 1 includes a Software Defined platform. The software-defined platform, for example, separates the function of the memory system 1 from the control of the hardware and executes the control by the software.

第3の実施形態においては、第2の実施形態と同様に、制御部15は、複数(ここでは3つ)のプロセッサ151を備える。3つのプロセッサ151は、1つのマスタプロセッサ151aおよび2つのスレーブプロセッサ151bを含む。 In the third embodiment, as in the second embodiment, the control unit 15 includes a plurality of (three in this case) processors 151. The three processors 151 include one master processor 151a and two slave processors 151b.

メモリシステム1の構成のうち、ホストインタフェース部11、NANDコントローラ13、RAM14、および3つのプロセッサ151は、ハードウェアに含まれる。 In the configuration of the memory system 1, the host interface unit 11, the NAND controller 13, the RAM 14, and the three processors 151 are included in the hardware.

図11は、第3の実施形態のRAM14の構成を示す図である。図3において説明した構成についてはここでは省略する。第3の実施形態によれば、RAM14は、プログラムロード領域144およびワークエリア145を備える。プログラムロード領域144には、2以上のアプリケーションプログラム251と、制御プログラム252とがロードされる。各アプリケーションプログラム251は、1以上のタスクプログラム241によって構成される。ワークエリア145は、実行毎に確保されたり解放されたりするデータエリア242を備える。 FIG. 11 is a diagram showing the configuration of the RAM 14 of the third embodiment. The configuration described with reference to FIG. 3 will be omitted here. According to the third embodiment, the RAM 14 includes a program load area 144 and a work area 145. Two or more application programs 251 and a control program 252 are loaded in the program load area 144. Each application program 251 is composed of one or more task programs 241. The work area 145 includes a data area 242 that is reserved and released for each execution.

第3の実施形態のソフトウェア定義型プラットフォームは、制御プログラム252、ハードウェア、およびNANDメモリ12を含む。ソフトウェア定義型のSSDプラットフォームを用いることで、SSDの機能をハードウェアの制御から切り離して、ソフトウェアの制御が可能である。第3の実施形態において、プラットフォームとは、ハードウェア又はソフトウェアを動作させるために必要な基盤となるハードウェア、オペレーティングシステム(OS)、ミドルウェア、それらの組み合わせ、設定、環境などの総体を意味する。 The software-defined platform of the third embodiment includes a control program 252, hardware, and NAND memory 12. By using the software-defined SSD platform, it is possible to control the software by separating the SSD function from the hardware control. In the third embodiment, the platform means a whole of hardware, an operating system (OS), middleware, a combination thereof, a setting, an environment, etc., which are the foundations necessary for operating hardware or software.

各プロセッサ151は、制御プログラム252を実行する。マスタプロセッサ151aは、マスタキュー152aを備える。スレーブプロセッサ151bは、スレーブキュー152bを備える。 Each processor 151 executes the control program 252. The master processor 151a includes a master queue 152a. The slave processor 151b includes a slave queue 152b.

制御プログラム252は、ハードウェアの違いを吸収する共通モジュールである。具体的には、制御プログラム252は、各アプリケーションプログラム251がハードウェアに非依存となるように、各アプリケーションプログラム251とハードウェアとの間で基本動作を実現する。非依存とは、少なくとも、協働する他方のソフトウェア又はハードウェアが取り替えられたとしても、引き続き利用可能な性質をいう。そのため、制御プログラム252は、API(Application Program Interface)に準拠している。 The control program 252 is a common module that absorbs differences in hardware. Specifically, the control program 252 realizes a basic operation between each application program 251 and the hardware so that each application program 251 becomes hardware-independent. Independent means, at least, the property that remains available even if the other software or hardware with which it collaborates is replaced. Therefore, the control program 252 conforms to the API (Application Program Interface).

例えば、制御プログラム252は、アプリケーションプログラム251によって特定のインタフェースにしたがって発行されたコマンドを受け、コマンドに基づいてハードウェアおよびNANDメモリ12に対する制御を実行する。制御プログラム252は、タスクのスケジューリングを行う。マスタプロセッサ151aは、2つのスレーブキュー152bの状態を監視し、マスタキュー152aに登録されているタスクを、2つのスレーブキュー152bに分配する。各スレーブプロセッサ151bは、夫々のスレーブキュー152bに登録されているタスクを実行する。 For example, the control program 252 receives a command issued by the application program 251 according to a specific interface, and executes control over the hardware and the NAND memory 12 based on the command. The control program 252 schedules the task. The master processor 151a monitors the status of the two slave queues 152b and distributes the tasks registered in the master queue 152a to the two slave queues 152b. Each slave processor 151b executes a task registered in each slave queue 152b.

RAM14内における、制御プログラム252の格納位置および各アプリケーションプログラム251の格納位置は、メモリシステム1の起動時に決定され、その後起動中は再配置されない。 The storage position of the control program 252 and the storage position of each application program 251 in the RAM 14 are determined when the memory system 1 is started, and are not rearranged during the subsequent startup.

各アプリケーションプログラム251は、例えば、ファームウェアのような各種のソフトウェアである。各アプリケーションプログラム251は、ファームウェア以外のソフトウェアを含んで構成されてもよい。 Each application program 251 is various software such as firmware. Each application program 251 may be configured to include software other than firmware.

第3の実施形態においては、各アプリケーションプログラム251は、単独でSSDの機能を実現することができる。2以上のアプリケーションプログラム251の夫々は、コマンドを解析するタスクを実現するタスクプログラム241、翻訳情報を更新するタスクを実現するタスクプログラム241、有効情報を更新するタスクを実現するタスクプログラム241、などを備えているため、2以上のアプリケーションプログラム251の何れを用いても、SSDの機能を実現することができる。 In the third embodiment, each application program 251 can independently realize the SSD function. Each of the two or more application programs 251 includes a task program 241 that realizes a task that analyzes a command, a task program 241 that realizes a task that updates translation information, a task program 241 that realizes a task that updates valid information, and the like. Since it is provided, the SSD function can be realized by using any of two or more application programs 251.

同一種のタスクを実現するタスクプログラム241は、アプリケーションプログラム251毎に異なっていてもよい。例えば、第1のアプリケーションプログラム251に含まれる、リード処理を実現するタスクプログラム241は、LBAを用いた位置指定に対応することができ、第2のアプリケーションプログラム251に含まれる、リード処理を実現するタスクプログラム241は、KVS(Key-Value Store)を用いた位置指定に対応することができる。また、例えば、第1のアプリケーションプログラム251に含まれる、翻訳情報の管理を実現するタスクプログラム241と、第2のアプリケーションプログラム251に含まれる、翻訳情報の管理を実現するタスクプログラム241と、では、翻訳情報の管理単位が異なる。また、例えば、プロセッサ151からRAM14へのアクセスは、暗号化される。例えば、第1のアプリケーションプログラム251の制御の下でプロセッサ151がRAM14にアクセスする際の暗号化キーと、第2のアプリケーションプログラム251の制御の下でプロセッサ151がRAM14にアクセスする際の暗号化キーと、が異なる。なお、暗号化キーは、アプリケーションプログラム251毎に異なる。暗号化キーは、タスクプログラム241毎に異なっていてもよい。 The task program 241 that realizes the same type of task may be different for each application program 251. For example, the task program 241 that realizes the read processing included in the first application program 251 can correspond to the position designation using the LBA, and realizes the read processing included in the second application program 251. The task program 241 can support position designation using KVS (Key-Value Store). Further, for example, the task program 241 that realizes the management of the translation information included in the first application program 251 and the task program 241 that realizes the management of the translation information included in the second application program 251 may be used. The management unit of translation information is different. Also, for example, access from processor 151 to RAM 14 is encrypted. For example, an encryption key when the processor 151 accesses RAM 14 under the control of the first application program 251 and an encryption key when the processor 151 accesses RAM 14 under the control of the second application program 251. And are different. The encryption key is different for each application program 251. The encryption key may be different for each task program 241.

なお、例えば、制御プログラム252は、メモリシステム1のメーカによって作成され、初期的にメモリシステム1に格納される。各アプリケーションプログラム251は、初期的にメモリシステム1に格納されなくてもよい。2以上のアプリケーションプログラム251のうちの一部または全部は、顧客、メモリシステム1の購入者、またはソフトウェア開発者など、メーカとは異なる者によって作成されてもよいし格納されてもよい。 For example, the control program 252 is created by the manufacturer of the memory system 1 and initially stored in the memory system 1. Each application program 251 does not have to be initially stored in the memory system 1. Part or all of the two or more application programs 251 may be created or stored by a person other than the manufacturer, such as a customer, a purchaser of the memory system 1, or a software developer.

ホスト2は、2以上のアプリケーションプログラム251のうちの、使用するアプリケーションプログラム251を選択することができる。 The host 2 can select the application program 251 to be used from the two or more application programs 251.

例えば、メモリシステム1とホスト2との間の通信のインタフェース規格としてNVMeが採用される場合において、ホスト2がメモリシステム1内にネームスペースを生成する際に、ホスト2は、2以上のアプリケーションプログラム251のうちの、使用するアプリケーションプログラム251を指定する。制御部15は、ホスト2とネームスペースとの対応関係を記憶し、ホスト2からコマンドを受信した際、コマンドの送信元のホスト2またはアクセス先のネームスペースに応じて、対応するアプリケーションプログラム251を特定する。 For example, when NVMe is adopted as an interface standard for communication between the memory system 1 and the host 2, when the host 2 creates a namespace in the memory system 1, the host 2 uses two or more application programs. Of the 251 applications, the application program 251 to be used is specified. The control unit 15 stores the correspondence between the host 2 and the namespace, and when the command is received from the host 2, the control unit 15 executes the corresponding application program 251 according to the namespace of the host 2 from which the command is sent or the namespace of the access destination. Identify.

このように、第3の実施形態によれば、メモリシステム1は、複数のアプリケーションプログラム251をRAM14にロードする。メモリシステム1は、複数のアプリケーションプログラム251のうちから、使用されるアプリケーションプログラム251が選択可能に構成される。これにより、例えばメモリシステム1に複数のホスト2が接続される場合、メモリシステム1は、ホスト2毎に異なる動作を行うことが可能となる。 As described above, according to the third embodiment, the memory system 1 loads a plurality of application programs 251 into the RAM 14. The memory system 1 is configured so that the application program 251 to be used can be selected from the plurality of application programs 251. As a result, for example, when a plurality of hosts 2 are connected to the memory system 1, the memory system 1 can perform different operations for each host 2.

また、メモリシステム1は、ネームスペースの作成時にアプリケーションプログラム251を選択可能に構成される。これにより、メモリシステム1は、ネームスペース毎に異なる動作を行うことが可能となる。 Further, the memory system 1 is configured so that the application program 251 can be selected when the namespace is created. As a result, the memory system 1 can perform different operations for each namespace.

(第4の実施形態)
第4の実施形態は、第1〜第3の実施形態の何れのメモリシステム1に適用することが可能である。第4の実施形態によれば、メモリシステム1は、互いに独立した複数の論理アドレス空間が構築可能に構成される。互いに独立した複数の論理アドレス空間の夫々は、例えばネームスペースである。
(Fourth Embodiment)
The fourth embodiment can be applied to any of the memory systems 1 of the first to third embodiments. According to the fourth embodiment, the memory system 1 is configured so that a plurality of logical address spaces independent of each other can be constructed. Each of the plurality of logical address spaces that are independent of each other is, for example, a namespace.

制御部15は、ホスト2からの生成要求に応じて新規のネームスペースを追加する。また、制御部15は、ホスト2からの削除要求に応じて既存のネームスペースを削除する。制御部15は、全ネームスペースの合計サイズがメモリシステム1の表記容量に至るまで、新規のネームスペースを追加することができる。 The control unit 15 adds a new namespace in response to the generation request from the host 2. Further, the control unit 15 deletes the existing namespace in response to the deletion request from the host 2. The control unit 15 can add new namespaces until the total size of all namespaces reaches the notation capacity of the memory system 1.

図12は、第4の実施形態のRAM14の構成を示す図である。第4の実施形態においては、RAM14には第1テーブル記憶領域146が確保される。制御部15は、ネームスペース毎に第1テーブル201bを管理する。第1テーブル記憶領域146は、ネームスペース毎の第1テーブル201bを記憶する。 FIG. 12 is a diagram showing the configuration of the RAM 14 of the fourth embodiment. In the fourth embodiment, the first table storage area 146 is secured in the RAM 14. The control unit 15 manages the first table 201b for each namespace. The first table storage area 146 stores the first table 201b for each namespace.

制御部15は、ホスト2からの生成要求に応じて新規の第1テーブル201bを生成する。また、制御部15は、ホスト2からの削除要求に応じて、削除要求によって指定されたネームスペースに対応する第1テーブル201bを削除する。ネームスペースの削除は、トリムの場合と同様に、有効情報の更新を伴う。制御部15は、各第1テーブル201bを連続した領域に格納する。制御部15は、各第1テーブル201bの格納位置をネームスペースと対応付けて管理する。 The control unit 15 generates a new first table 201b in response to a generation request from the host 2. Further, the control unit 15 deletes the first table 201b corresponding to the namespace specified by the deletion request in response to the deletion request from the host 2. Removing the namespace involves updating the valid information, as in the case of trimming. The control unit 15 stores each first table 201b in a continuous area. The control unit 15 manages the storage position of each first table 201b in association with the namespace.

各第1テーブル201bの管理単位は、ネームスペース間で同一であってもよいし、ネームスペース毎に異なっていてもよい。ここでは一例として、各第1テーブル201bの管理単位は、ネームスペース間で同一であることとする。第1テーブル記憶領域146のサイズは、全ネームスペースの合計サイズが上限に至った場合における全ての第1テーブル201bの合計サイズの、少なくとも2倍のサイズである。 The management unit of each first table 201b may be the same between the namespaces, or may be different for each namespace. Here, as an example, it is assumed that the management unit of each first table 201b is the same between the namespaces. The size of the first table storage area 146 is at least twice the size of the total size of all the first tables 201b when the total size of all namespaces reaches the upper limit.

図13〜図19は、各第1テーブル201bの格納の様態の変化を説明する図である。メモリシステム1が3つのネームスペース(NS#0、NS#1、およびNS#2)を有する場合、例えば図13に示すように、各第1テーブル201bは、第1テーブル記憶領域146の先頭から順番に配置される。各第1テーブル201bは、各第1テーブル201bの間にスペースを空けずに配置される。 13 to 19 are views for explaining changes in the storage mode of each first table 201b. When the memory system 1 has three namespaces (NS # 0, NS # 1, and NS # 2), for example, as shown in FIG. 13, each first table 201b starts from the beginning of the first table storage area 146. Arranged in order. Each first table 201b is arranged without a space between each first table 201b.

制御部15は、図13の状態においてNS#1の削除要求を受信した場合、図14に示すように、NS#1の第1テーブル201bを削除する。なお、制御部15は、NS#1の第1テーブル201bの削除の前に、有効情報を更新する。具体的には、制御部15は、NS#1を指定して書き込まれたユーザデータ301を全て無効化する。また、制御部15は、NS#1の第1テーブル201bの削除の前に、NS#1の翻訳情報のうちの下位の階層に属する翻訳情報を全て無効化する。 When the control unit 15 receives the deletion request of NS # 1 in the state of FIG. 13, the control unit 15 deletes the first table 201b of NS # 1 as shown in FIG. The control unit 15 updates the valid information before deleting the first table 201b of NS # 1. Specifically, the control unit 15 invalidates all the user data 301 written by designating NS # 1. Further, the control unit 15 invalidates all the translation information belonging to the lower hierarchy of the translation information of NS # 1 before deleting the first table 201b of NS # 1.

続いて、制御部15は、第1テーブル201bの削除によって生じたスペースを詰める作業を行う。例えば、図14の状態においては、制御部15は、NS#2の第1テーブル201bを再配置する。再配置は、次のようにして実行される。制御部15は、図15に示すように、再配置対象の第1テーブル201bであるNS#2の第1テーブル201bを、第1テーブル記憶領域146の空き領域に複製する。複製された第1テーブル201bを、第1テーブル201cと表記する。第1テーブル記憶領域146は、各第1テーブル201bの合計サイズの最大値の2倍以上のサイズを有するので、第1テーブル記憶領域146においては、第1テーブル201bのサイズの大きさに関係なく当該第1テーブル201bを複製することが可能である。また、各第1テーブル201bは、第1テーブル記憶領域146の先頭から詰めて配置されるので、第1テーブル記憶領域146の中央から末尾までの領域が第1テーブル201bの複製が格納される領域として使用可能である。 Subsequently, the control unit 15 performs an operation of filling the space created by the deletion of the first table 201b. For example, in the state of FIG. 14, the control unit 15 rearranges the first table 201b of NS # 2. The relocation is performed as follows. As shown in FIG. 15, the control unit 15 duplicates the first table 201b of NS # 2, which is the first table 201b to be rearranged, in the free area of the first table storage area 146. The duplicated first table 201b is referred to as the first table 201c. Since the first table storage area 146 has a size that is at least twice the maximum value of the total size of each first table 201b, the size of the first table storage area 146 is irrespective of the size of the first table 201b. It is possible to duplicate the first table 201b. Further, since each first table 201b is arranged from the beginning of the first table storage area 146, the area from the center to the end of the first table storage area 146 is an area in which a duplicate of the first table 201b is stored. Can be used as.

続いて、制御部15は、図16に示すように、NS#2の第1テーブル201bを第1テーブル記憶領域146から削除する。そして、制御部15は、図17に示すように、NS#2の第1テーブル201cを、NS#0の第1テーブル201bの末尾に連続する位置に、NS#2の第1テーブル201bとして複製する。そして、制御部15は、図18に示すように、NS#2の第1テーブル201cを第1テーブル記憶領域146から削除し、NS#2の第1テーブル201bの再配置を完了する。 Subsequently, as shown in FIG. 16, the control unit 15 deletes the first table 201b of NS # 2 from the first table storage area 146. Then, as shown in FIG. 17, the control unit 15 duplicates the first table 201c of NS # 2 as the first table 201b of NS # 2 at a position continuous with the end of the first table 201b of NS # 0. To do. Then, as shown in FIG. 18, the control unit 15 deletes the first table 201c of NS # 2 from the first table storage area 146, and completes the rearrangement of the first table 201b of NS # 2.

なお、第1テーブル201bの削除によって生じたスペースを詰めるために再配置するべき第1テーブル201bが複数存在する場合には、制御部15は、当該複数の第1テーブル201bの夫々を順次再配置する。制御部15は、再配置するべき複数の第1テーブル201bを、スペースに近い第1テーブル201bから順番に再配置する。 When there are a plurality of first tables 201b to be rearranged in order to fill the space created by the deletion of the first table 201b, the control unit 15 sequentially rearranges each of the plurality of first tables 201b. To do. The control unit 15 rearranges the plurality of first tables 201b to be rearranged in order from the first table 201b closest to the space.

制御部15は、図18の状態においてNS#3の追加要求を受信した場合、NS#3の第1テーブル201bを、図19に示すように、NS#2の第1テーブル201bの末尾に連続する位置に生成する。 When the control unit 15 receives the additional request of NS # 3 in the state of FIG. 18, the control unit 15 continuously attaches the first table 201b of NS # 3 to the end of the first table 201b of NS # 2, as shown in FIG. Generate at the position where you want to.

なお、制御部15は、スペースを詰める作業を完了するまで、新規のネームスペースの追加を禁止する。また、再配置対象の第1テーブル201bは、再配置が完了するまで、二重化されている。制御部15は、二重化された第1テーブル201bにかかるネームスペースに対するアクセスを実行する場合において、翻訳情報を更新する際、第1テーブル201bおよび第1テーブル201cの両方を更新する。 The control unit 15 prohibits the addition of a new namespace until the work of filling the space is completed. Further, the first table 201b to be relocated is duplicated until the relocation is completed. The control unit 15 updates both the first table 201b and the first table 201c when updating the translation information in the case of executing the access to the namespace related to the duplicated first table 201b.

このように、第4の実施形態によれば、メモリシステム1は、複数の論理アドレス空間を外部に提供する。RAM14は、第1テーブル記憶領域146が確保される。制御部15は、論理アドレス毎の第1テーブル201bを第1テーブル記憶領域146に格納する。制御部15は、ホスト2からの削除要求に応じて第1テーブル201bを削除する。制御部15は、削除によって2つの第1テーブル201bの間に生じた空き領域を詰める。第1の論理アドレス空間のための第1テーブル201bと、第2の論理アドレス空間のための第1テーブル201bと、の間に第1の空き領域がある場合、制御部15は、第1の空き領域をなくすために、第2の論理アドレス空間のための第1テーブル201bを再配置する。具体的には、制御部15は、第2の論理アドレス空間のための第1テーブル201bを、第2の空き領域に複製する。そして、制御部15は、複製元の第1テーブル201bを削除する。そして、制御部15は、第2の論理アドレス空間のための第1テーブル201cを、第1の空き領域の第1の論理アドレス空間のための第1テーブル201bに連続する位置に、さらに複製する。そして、制御部15は、第2の論理アドレス空間のための第1テーブル201cを削除する。これにより、制御部15は、論理アドレス毎の第1テーブル201bを、間に空き領域を発生させることなく第1テーブル記憶領域146に格納することができる。したがって、第1テーブル記憶領域146を効率的に使用することが可能となる。 As described above, according to the fourth embodiment, the memory system 1 provides a plurality of logical address spaces to the outside. In the RAM 14, the first table storage area 146 is secured. The control unit 15 stores the first table 201b for each logical address in the first table storage area 146. The control unit 15 deletes the first table 201b in response to the deletion request from the host 2. The control unit 15 fills the free area created between the two first tables 201b due to the deletion. When there is a first free area between the first table 201b for the first logical address space and the first table 201b for the second logical address space, the control unit 15 uses the first free area. The first table 201b for the second logical address space is rearranged to eliminate free space. Specifically, the control unit 15 replicates the first table 201b for the second logical address space in the second free area. Then, the control unit 15 deletes the copy source first table 201b. Then, the control unit 15 further duplicates the first table 201c for the second logical address space at a position continuous with the first table 201b for the first logical address space in the first free area. .. Then, the control unit 15 deletes the first table 201c for the second logical address space. As a result, the control unit 15 can store the first table 201b for each logical address in the first table storage area 146 without generating an empty area between them. Therefore, the first table storage area 146 can be used efficiently.

また、第1テーブル記憶領域146は、第1テーブル201bの合計サイズの最大値の少なくとも2倍のサイズを有する。これにより、前述した再配置が可能となる。 Further, the first table storage area 146 has a size at least twice the maximum value of the total size of the first table 201b. This enables the above-mentioned rearrangement.

また、制御部15は、第1テーブル201bの再配置中に当該第1テーブル201bを更新する場合には、当該第1テーブル201bおよび第1テーブル201cの両方を更新する。これにより、翻訳情報の一貫性が維持される。 Further, when the control unit 15 updates the first table 201b during the rearrangement of the first table 201b, the control unit 15 updates both the first table 201b and the first table 201c. This maintains the consistency of the translated information.

(第5の実施形態)
第5の実施形態は、第1〜第4の実施形態の何れのメモリシステム1に適用することが可能である。
(Fifth Embodiment)
The fifth embodiment can be applied to any of the memory systems 1 of the first to fourth embodiments.

図20は、第5の実施形態のログストレージ領域124を示す図である。図示するように、ログストレージ領域124には、ホットストレージ124aおよびコールドストレージ124bが確保されている。 FIG. 20 is a diagram showing a log storage area 124 of the fifth embodiment. As shown in the figure, hot storage 124a and cold storage 124b are secured in the log storage area 124.

ホットストレージ124aは、FIFOのルールに従って単位情報が入出力される。制御部15は、ダーティな単位情報をホットストレージ124aに書き込む。制御部15は、ホットストレージ124aから単位情報をFIFOのルールに従って取り出し、取り出した単位情報のうちの有効な単位情報をコールドストレージ124bに書き込む。有効な単位情報とは、第1テーブル201bまたはブロック管理情報211bによって直接に示されている単位情報か、または第1テーブル201bによって示されている第2テーブル202aによって示されている単位情報である。 Unit information is input / output to / from the hot storage 124a according to the FIFO rules. The control unit 15 writes dirty unit information to the hot storage 124a. The control unit 15 extracts the unit information from the hot storage 124a according to the rules of the FIFO, and writes the valid unit information of the extracted unit information to the cold storage 124b. The valid unit information is the unit information directly indicated by the first table 201b or the block management information 211b, or the unit information indicated by the second table 202a indicated by the first table 201b. ..

なお、ホットストレージ124aおよびコールドストレージ124bのサイズは可変に構成されてもよい。例えば制御部15は、ローカリティが高いときにはホットストレージ124aのサイズを小さくし、コールドストレージ124bのサイズを大きくする。そして、制御部15は、ローカリティが低いときにはコールドストレージ124bのサイズを小さくし、ホットストレージ124aのサイズを大きくする。なお、例えば、制御部15は、出力される単位情報のうちの有効な単位情報の割合を測定する。制御部15は、測定された割合を、ローカリティの測定値として使用することができる。 The sizes of the hot storage 124a and the cold storage 124b may be variably configured. For example, the control unit 15 reduces the size of the hot storage 124a and increases the size of the cold storage 124b when the locality is high. Then, when the locality is low, the control unit 15 reduces the size of the cold storage 124b and increases the size of the hot storage 124a. For example, the control unit 15 measures the ratio of valid unit information to the output unit information. The control unit 15 can use the measured ratio as a measured value of locality.

このように、第5の実施形態によれば、ログストレージ領域124は、ホットストレージ124aとコールドストレージ124bとを備え、制御部15は、更新されてからの経過時間に応じて単位情報をホットストレージ124aとコールドストレージ124bとの何れかに格納する。なお、ログストレージ領域124は、3つ以上の領域を備え、制御部15は、更新されてからの経過時間に応じて単位情報を3つ以上の領域の何れかに格納してもよい。 As described above, according to the fifth embodiment, the log storage area 124 includes the hot storage 124a and the cold storage 124b, and the control unit 15 hot stores the unit information according to the elapsed time from the update. It is stored in either 124a or cold storage 124b. The log storage area 124 includes three or more areas, and the control unit 15 may store unit information in any of the three or more areas according to the elapsed time since the update.

(第6の実施形態)
図21は、メモリシステム1の実装例を示す図である。メモリシステム1は、例えばサーバシステム1000に実装される。サーバシステム1000は、ディスクアレイ2000とラックマウントサーバ3000とが通信インタフェース4000によって接続されて構成される。通信インタフェース4000の規格としては任意の規格が採用可能である。ラックマウントサーバ3000は、サーバラックに1以上のホスト2がマウントされて構成される。複数のホスト2は、通信インタフェース4000を介してディスクアレイ2000にアクセスすることができる。
(Sixth Embodiment)
FIG. 21 is a diagram showing an implementation example of the memory system 1. The memory system 1 is implemented in, for example, the server system 1000. The server system 1000 is configured by connecting the disk array 2000 and the rack mount server 3000 by a communication interface 4000. Any standard can be adopted as the standard of the communication interface 4000. The rack mount server 3000 is configured by mounting one or more hosts 2 on the server rack. The plurality of hosts 2 can access the disk array 2000 via the communication interface 4000.

また、ディスクアレイ2000は、サーバラックに1以上のメモリシステム1がマウントされて構成される。ディスクアレイ2000は、メモリシステム1の他に、1以上のハードディスクユニットがマウントされてもよい。各メモリシステム1は、各ホスト2からのコマンドを実行することができる。また、各メモリシステム1は、第1または第2の実施形態が採用された構成を有している。これにより、各メモリシステム1は、簡単にアトミックライトを実行することができる。 Further, the disk array 2000 is configured by mounting one or more memory systems 1 on a server rack. In the disk array 2000, one or more hard disk units may be mounted in addition to the memory system 1. Each memory system 1 can execute a command from each host 2. Further, each memory system 1 has a configuration in which the first or second embodiment is adopted. As a result, each memory system 1 can easily execute atomic write.

なお、ディスクアレイ2000においては、例えば、各メモリシステム1は、1以上のハードディスクユニットのキャッシュとして使用されてもよい。ディスクアレイ2000は、1以上のメモリシステム1を利用してRAIDを構築するストレージコントローラユニットがマウントされてもよい。 In the disk array 2000, for example, each memory system 1 may be used as a cache for one or more hard disk units. The disk array 2000 may be mounted with a storage controller unit for constructing a RAID using one or more memory systems 1.

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

1 メモリシステム、2 ホスト、11 ホストインタフェース部、12 NANDメモリ、13 NANDコントローラ、14 RAM、15 制御部、121 緊急退避領域、122 管理情報領域、123 ユーザデータ領域、124 ログストレージ領域、124a ホットストレージ、124b コールドストレージ、141 ライトバッファ、142 リードバッファ、143 キャッシュ領域、144 プログラムロード領域、145 ワークエリア、146 第1テーブル記憶領域、151 プロセッサ、151a マスタプロセッサ、151b スレーブプロセッサ、152a マスタキュー、152b スレーブキュー、201a,201b,201c 第1テーブル、202a,202b 第2テーブル、203a,203b 第3テーブル、211a,211b ブロック管理情報、212a,212b 有効ビットマップ、221 キャッシュ管理情報、225 統計情報、231 ログ情報、241 タスクプログラム、242 データエリア、251 アプリケーションプログラム、252 制御プログラム、301 ユーザデータ、1000 サーバシステム、2000 ディスクアレイ、3000 ラックマウントサーバ。 1 memory system, 2 hosts, 11 host interface, 12 NAND memory, 13 NAND controller, 14 RAM, 15 control, 121 emergency save area, 122 management information area, 123 user data area, 124 log storage area, 124a hot storage , 124b cold storage, 141 write buffer, 142 read buffer, 143 cache area, 144 program load area, 145 work area, 146 first table storage area, 151 processor, 151a master processor, 151b slave processor, 152a master queue, 152b slave. Queue, 201a, 201b, 201c 1st table, 202a, 202b 2nd table, 203a, 203b 3rd table, 211a, 211b Block management information, 212a, 212b Effective bitmap, 221 cache management information, 225 statistics, 231 logs Information, 241 task programs, 242 data areas, 251 application programs, 252 control programs, 301 user data, 1000 server systems, 2000 disk arrays, 3000 rack mount servers.

Claims (16)

論理位置情報と物理位置情報との対応関係を示す翻訳情報を管理することと、前記論理位置情報はデータに関連付けられる論理的な位置情報であり、前記物理位置情報は前記データが格納された不揮発性の第1メモリ内の位置を示す物理的な位置情報であり、前記翻訳情報は、複数の階層に階層化され、第1の階層に属する第1翻訳情報と第2の階層に属する第2翻訳情報とを含み、前記第1翻訳情報のサイズと前記第2翻訳情報のサイズとは等しく、
前記第1翻訳情報および前記第2翻訳情報を前記第1メモリが備える第1領域に格納することであって、前記第1領域は複数のページを備え、各ページは前記第1メモリへの書き込み単位であり、前記第1翻訳情報および前記第2翻訳情報を同じページに格納することと、
を含むメモリシステムの制御方法。
Management of translation information indicating the correspondence between logical position information and physical position information, the logical position information is logical position information associated with data, and the physical position information is non-volatile in which the data is stored. It is physical position information indicating a position in the first memory of the sex, and the translation information is hierarchized into a plurality of layers, and the first translation information belonging to the first layer and the second translation information belonging to the second layer. The size of the first translation information and the size of the second translation information are equal to each other, including the translation information.
The first translation information and the second translation information are stored in the first area included in the first memory. The first area includes a plurality of pages, and each page is written to the first memory. It is a unit, and the first translation information and the second translation information are stored on the same page.
How to control the memory system, including.
前記第1翻訳情報および前記第2翻訳情報を前記第1領域から第2メモリに読み出すことと、
前記第2メモリに格納された前記第1翻訳情報および前記第2翻訳情報を使用することと、
使用後の前記第1翻訳情報および前記第2翻訳情報を前記第1領域に格納することと、
をさらに含む請求項1に記載のメモリシステムの制御方法。
Reading the first translation information and the second translation information from the first area to the second memory,
Using the first translation information and the second translation information stored in the second memory, and
To store the first translation information and the second translation information after use in the first area, and
The method for controlling a memory system according to claim 1, further comprising.
前記データを前記第1メモリが備える第2領域に書き込むことと、
前記第2領域内のデータが第1状態であるか第2状態であるかを記録した状態管理情報を管理することと、前記第1翻訳情報のサイズと前記第2翻訳情報のサイズと前記状態管理情報のサイズとは等しい、
をさらに含む請求項1に記載のメモリシステムの制御方法。
Writing the data to the second area included in the first memory and
Managing state management information that records whether the data in the second region is in the first state or the second state, the size of the first translation information, the size of the second translation information, and the state. Equal to the size of management information,
The method for controlling a memory system according to claim 1, further comprising.
前記第1翻訳情報、前記第2翻訳情報および前記状態管理情報を前記第1領域に記憶すること、
をさらに含む請求項3に記載のメモリシステムの制御方法。
To store the first translation information, the second translation information, and the state management information in the first area.
The memory system control method according to claim 3, further comprising.
前記第1翻訳情報、前記第2翻訳情報および前記状態管理情報を同じページに格納すること、
を含む請求項4に記載のメモリシステムの制御方法。
To store the first translation information, the second translation information, and the state management information on the same page.
4. The method for controlling a memory system according to claim 4.
前記第1翻訳情報、前記第2翻訳情報および前記状態管理情報を前記第1領域から第2メモリに読み出すことと、
前記第2メモリに格納された前記第1翻訳情報、前記第2翻訳情報および前記状態管理情報を使用することと、
使用後の前記第1翻訳情報、前記第2翻訳情報および前記状態管理情報を前記第1領域に格納することと、
をさらに含む請求項5に記載のメモリシステムの制御方法。
Reading the first translation information, the second translation information, and the state management information from the first area to the second memory,
Using the first translation information, the second translation information, and the state management information stored in the second memory, and
To store the first translation information, the second translation information, and the state management information after use in the first area.
The memory system control method according to claim 5, further comprising.
第1のデータを前記第2領域内の第1の位置に格納することと、
前記第1のデータと同一の論理位置情報が指定されたデータのうちの最新のデータである第2のデータを第2の位置に格納することと、
前記第1のデータの状態を前記第1状態として管理することと、
前記第2のデータの状態を前記第2状態として管理することと、
をさらに含む請求項3に記載のメモリシステムの制御方法。
To store the first data in the first position in the second area, and
The second data, which is the latest data among the data to which the same logical position information as the first data is specified, is stored in the second position.
Managing the state of the first data as the first state and
Managing the state of the second data as the second state and
The memory system control method according to claim 3, further comprising.
論理位置情報と物理位置情報との対応関係を示す翻訳情報を管理することと、前記論理位置情報はデータに関連付けられる論理的な位置情報であり、前記物理位置情報は前記データが格納された不揮発性の第1メモリ内の位置を示す物理的な位置情報であり、前記翻訳情報は、第1翻訳情報を含み、
前記データを前記第1メモリが備える第1領域に書き込むことと、
前記第1領域内のデータが第1状態であるか第2状態であるかを記録した状態管理情報を管理することと、前記状態管理情報は、第1状態管理情報を含み、前記第1翻訳情報のサイズと前記第1状態管理情報のサイズとは等しく、
前記第1翻訳情報および前記第1状態管理情報を前記第1メモリが備える第2領域に書き込むことであって、前記第2領域は複数のページを備え、各ページは前記第1メモリへの書き込み単位であり、前記第1翻訳情報および前記第1状態管理情報を同じページに格納することと、
を含むメモリシステムの制御方法。
Management of translation information indicating the correspondence between logical position information and physical position information, the logical position information is logical position information associated with data, and the physical position information is non-volatile in which the data is stored. It is the physical position information indicating the position in the first memory of the sex, and the translation information includes the first translation information.
Writing the data to the first area included in the first memory and
The state management information that records whether the data in the first region is the first state or the second state is managed, and the state management information includes the first state management information and is the first translation. The size of the information is equal to the size of the first state management information,
Writing the first translation information and the first state management information to a second area included in the first memory, the second area includes a plurality of pages, and each page is written to the first memory. It is a unit, and the first translation information and the first state management information are stored on the same page.
How to control the memory system, including.
前記第1翻訳情報および前記第1状態管理情報を前記第2領域から第2メモリに読み出すことと、
前記第2メモリに格納された前記第1翻訳情報および前記第1状態管理情報を使用することと、
使用後の前記第1翻訳情報および前記第1状態管理情報を前記第2領域に格納することと、
をさらに含む請求項8に記載のメモリシステムの制御方法。
Reading the first translation information and the first state management information from the second area to the second memory,
Using the first translation information and the first state management information stored in the second memory, and
To store the first translation information and the first state management information after use in the second area, and
The memory system control method according to claim 8, further comprising.
第1のデータを前記第1領域内の第1の位置に格納することと、
前記第1のデータと同一の論理位置情報が指定されたデータのうちの最新のデータである第2のデータを前記第1領域内の第2の位置に格納することと、
前記第1のデータの状態を前記第1状態として管理することと、
前記第2のデータの状態を前記第2状態として管理することと、
をさらに含む請求項8に記載のメモリシステムの制御方法。
To store the first data in the first position in the first area, and
The second data, which is the latest data among the data to which the same logical position information as the first data is specified, is stored in the second position in the first area.
Managing the state of the first data as the first state and
Managing the state of the second data as the second state and
The memory system control method according to claim 8, further comprising.
前記翻訳情報は、複数の階層に階層化され、前記第1翻訳情報は、第1の階層に属する第2翻訳情報と第2の階層に属する第3翻訳情報とを含む、
請求項8に記載のメモリシステムの制御方法。
The translation information is layered into a plurality of layers, and the first translation information includes a second translation information belonging to the first layer and a third translation information belonging to the second layer.
The method for controlling a memory system according to claim 8.
論理位置情報と物理位置情報との対応関係を示す翻訳情報を管理することと、前記論理位置情報はデータに関連付けられる論理的な位置情報であり、前記物理位置情報は前記データが格納された不揮発性の第1メモリ内の位置を示す物理的な位置情報であり、前記翻訳情報は、第1翻訳情報を含み、
前記データを前記第1メモリが備える第1領域に書き込むことと、
前記第1領域内のデータが第1状態であるか第2状態であるかを記録した状態管理情報を管理することと、前記状態管理情報は、第1状態管理情報を含み、前記翻訳情報は、複数の階層に階層化され、前記第1翻訳情報は、第1の階層に属する第2翻訳情報と第2の階層に属する第3翻訳情報とを含み、前記第2翻訳情報のサイズと前記第3翻訳情報のサイズと前記第1状態管理情報のサイズとは等しい、
を含むメモリシステムの制御方法。
Management of translation information indicating the correspondence between logical position information and physical position information, the logical position information is logical position information associated with data, and the physical position information is non-volatile in which the data is stored. It is the physical position information indicating the position in the first memory of the sex, and the translation information includes the first translation information.
Writing the data to the first area included in the first memory and
The state management information that records whether the data in the first region is the first state or the second state is managed, the state management information includes the first state management information, and the translated information includes the first state management information. , The first translation information is layered into a plurality of layers, and the first translation information includes a second translation information belonging to the first layer and a third translation information belonging to the second layer, and the size of the second translation information and the above. The size of the third translation information is equal to the size of the first state management information,
How to control the memory system, including.
前記第1翻訳情報および前記第1状態管理情報を前記第1メモリが備える第2領域に記憶すること、
をさらに含む請求項12に記載のメモリシステムの制御方法。
To store the first translation information and the first state management information in the second area included in the first memory.
The memory system control method according to claim 12, further comprising.
前記第2領域は複数のページを備え、各ページは前記第1メモリへの書き込み単位であり、
前記第1翻訳情報および前記第1状態管理情報を同じページに格納すること、
を含む請求項13に記載のメモリシステムの制御方法。
The second area includes a plurality of pages, and each page is a writing unit to the first memory.
To store the first translation information and the first state management information on the same page,
13. The method for controlling a memory system according to claim 13.
前記第1翻訳情報および前記第1状態管理情報を前記第2領域から第2メモリに読み出すことと、
前記第2メモリに格納された前記第1翻訳情報および前記第1状態管理情報を使用することと、
使用後の前記第1翻訳情報および前記第1状態管理情報を前記第2領域に格納することと、
をさらに含む請求項14に記載のメモリシステムの制御方法。
Reading the first translation information and the first state management information from the second area to the second memory,
Using the first translation information and the first state management information stored in the second memory, and
To store the first translation information and the first state management information after use in the second area, and
14. The method for controlling a memory system according to claim 14.
第1のデータを前記第1領域内の第1の位置に格納することと、
前記第1のデータと同一の論理位置情報が指定されたデータのうちの最新のデータである第2のデータを前記第1領域内の第2の位置に格納することと、
前記第1のデータの状態を前記第1状態として管理することと、
前記第2のデータの状態を前記第2状態として管理することと、
をさらに含む請求項12に記載のメモリシステムの制御方法。
To store the first data in the first position in the first area, and
The second data, which is the latest data among the data to which the same logical position information as the first data is specified, is stored in the second position in the first area.
Managing the state of the first data as the first state and
Managing the state of the second data as the second state and
The memory system control method according to claim 12, further comprising.
JP2020038164A 2020-03-05 2020-03-05 Memory system control method Active JP6860722B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020038164A JP6860722B2 (en) 2020-03-05 2020-03-05 Memory system control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020038164A JP6860722B2 (en) 2020-03-05 2020-03-05 Memory system control method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2018212752A Division JP6675466B2 (en) 2018-11-13 2018-11-13 Memory system

Publications (2)

Publication Number Publication Date
JP2020091911A JP2020091911A (en) 2020-06-11
JP6860722B2 true JP6860722B2 (en) 2021-04-21

Family

ID=71012990

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020038164A Active JP6860722B2 (en) 2020-03-05 2020-03-05 Memory system control method

Country Status (1)

Country Link
JP (1) JP6860722B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3694501B2 (en) * 2002-10-30 2005-09-14 松下電器産業株式会社 Storage device

Also Published As

Publication number Publication date
JP2020091911A (en) 2020-06-11

Similar Documents

Publication Publication Date Title
JP6441171B2 (en) Memory system
US11693463B2 (en) Memory system and controller
US12038834B2 (en) Memory system and method for controlling nonvolatile memory during command processing without replacing defective blocks
TWI700586B (en) Computer system and control method of storage device
JP6437656B2 (en) Storage device, storage system, and storage system control method
US10140031B2 (en) Hierarchical flash translation layer structure and method for designing the same
JP4902501B2 (en) Power control method, computer system, and program
CN106201335B (en) Storage system
WO2015169145A1 (en) Memory management method and device
US20160266793A1 (en) Memory system
WO2016056104A1 (en) Storage device and memory control method
US20130318316A1 (en) Storage device and method for controlling storage device
US8930732B2 (en) Fast speed computer system power-on and power-off method
US11966590B2 (en) Persistent memory with cache coherent interconnect interface
JP6860722B2 (en) Memory system control method
JP6675466B2 (en) Memory system
JP5382471B2 (en) Power control method, computer system, and program
JP5334048B2 (en) Memory device and computer
JP6640940B2 (en) Memory system control method
JP7663192B2 (en) STORAGE DEVICE, CACHE MEMORY WRITE PROGRAM, AND WRITE METHOD
CN116662217A (en) Persistent memory device and method using persistent memory device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200305

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210204

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210326

R150 Certificate of patent or registration of utility model

Ref document number: 6860722

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150