[go: up one dir, main page]

JP2013196155A - Memory system - Google Patents

Memory system Download PDF

Info

Publication number
JP2013196155A
JP2013196155A JP2012060660A JP2012060660A JP2013196155A JP 2013196155 A JP2013196155 A JP 2013196155A JP 2012060660 A JP2012060660 A JP 2012060660A JP 2012060660 A JP2012060660 A JP 2012060660A JP 2013196155 A JP2013196155 A JP 2013196155A
Authority
JP
Japan
Prior art keywords
block
pointer
stored
storage unit
unit
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.)
Pending
Application number
JP2012060660A
Other languages
Japanese (ja)
Inventor
Eiji Yoshihashi
鋭二 吉橋
Aurelien Tran
オレリアン トラン
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2012060660A priority Critical patent/JP2013196155A/en
Publication of JP2013196155A publication Critical patent/JP2013196155A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a memory system in which exhaustion of a flash memory is mitigated by effectively using storage area storing a pointer.SOLUTION: When snap shot conditions are satisfied, a management table is stored from a first storage part to a first block of a second storage part as a snap shot, a pointer indicating the storage location of the management table is stored in a write-in unit in a second block of the second storage part, and a part of the management table is stored in an unwritten area in the write-in unit in the second block where the pointer is stored.

Description

本発明の実施形態は、不揮発性半導体メモリを備えたメモリシステムに関する。   Embodiments described herein relate generally to a memory system including a nonvolatile semiconductor memory.

SSD(solid state drive)においては、外部から供給される論理アドレス(LBA)と、フラッシュメモリ上でデータが記憶されている位置を示す物理アドレスとの対応関係を表す論物変換テーブルなどの管理テーブルを用いて、データを管理することが多い。これらの管理テーブルは、起動時、不揮発性のフラッシュメモリからDRAMなどの揮発性メモリに展開され、揮発性メモリに展開された管理テーブルはフラッシュメモリ上にデータが書き込まれるたびに更新される。管理テーブルは、電源断をまたいで使用するので、揮発性メモリからフラッシュメモリにバックアップすることが必要となる。   In a solid state drive (SSD), a management table such as a logical-physical conversion table indicating a correspondence relationship between a logical address (LBA) supplied from the outside and a physical address indicating a position where data is stored on the flash memory. Data is often managed using These management tables are expanded from a nonvolatile flash memory to a volatile memory such as a DRAM at startup, and the management table expanded in the volatile memory is updated every time data is written on the flash memory. Since the management table is used across power interruptions, it is necessary to back up the volatile memory to the flash memory.

また、フラッシュメモリ上での管理情報の記憶位置を示すポインタをフラッシュメモリ上に記憶する方式がある。このポインタ方式では、まずポインタをフラッシュメモリから読み出して、その後ポインタが示すフラッシュメモリ上の位置のデータを読み出すことで、管理情報を取得する。   There is also a method of storing a pointer indicating the storage position of management information on the flash memory on the flash memory. In this pointer method, management information is acquired by first reading a pointer from the flash memory and then reading data at a position on the flash memory indicated by the pointer.

特開2009−211188号公報JP 2009-2111188 A

本発明の一つの実施形態は、ポインタが記憶される記憶領域を有効活用することで、フラッシュメモリの疲弊を少なくするメモリシステムを提供することを目的とする。   An object of one embodiment of the present invention is to provide a memory system that reduces fatigue of a flash memory by effectively using a storage area in which pointers are stored.

本発明の一つの実施形態によれば、メモリシステムは、揮発性の第1の記憶部と、所定の書き込み単位で書き込みが行われ、前記書き込み単位より大きなブロック単位で消去が行われる不揮発性の第2の記憶部と、第1の記憶部を介してホスト装置と前記第2の記憶部との間のデータ転送を行なうとともに、ホスト装置から指定された論理アドレスと第2の記憶部でのデータの記憶位置とを対応付ける論物変換情報を含む管理テーブルを起動時に第2の記憶部から第1の記憶部に転送し、該転送された管理テーブルを更新しながら管理テーブルに基づいて前記第2の記憶部でのデータ管理を行なうコントローラとを備える。コントローラは、第1の条件が成立したときに、前記管理テーブルを第1の記憶部から第2の記憶部の第1のブロックにスナップショットとして保存し、前記管理テーブルの保存位置を示すポインタを第2の記憶部の第2のブロック内の書き込み単位に保存し、さらに前記ポインタが保存された第2のブロックの書き込み単位内の未書き込み領域に前記管理テーブルの一部を保存するテーブル管理部を備える。   According to one embodiment of the present invention, a memory system includes a volatile first storage unit and a nonvolatile memory in which writing is performed in a predetermined writing unit and erasing is performed in a block unit larger than the writing unit. Data is transferred between the host device and the second storage unit via the second storage unit and the first storage unit, and the logical address designated by the host device and the second storage unit A management table including logical-physical conversion information that correlates with a data storage position is transferred from the second storage unit to the first storage unit at the time of activation, and is updated based on the management table while updating the transferred management table. And a controller for managing data in the two storage units. When the first condition is satisfied, the controller stores the management table as a snapshot from the first storage unit to the first block of the second storage unit, and stores a pointer indicating the storage position of the management table. A table management unit for storing a part of the management table in an unwritten area in the writing unit of the second block in which the pointer is stored, and storing in a writing unit in the second block of the second storage unit Is provided.

図1は、SSDの構成例を示すブロック図。FIG. 1 is a block diagram illustrating a configuration example of an SSD. 図2は、スナップショットとログの生成形態を概念的に示す図。FIG. 2 is a diagram conceptually showing how snapshots and logs are generated. 図3は、比較例によるスナップショット記憶方式を示す図。FIG. 3 is a diagram showing a snapshot storage system according to a comparative example. 図4は、実施形態によるスナップショット記憶方式を示す図。FIG. 4 is a diagram illustrating a snapshot storage method according to the embodiment. 図5は、ブロックの未書き込み領域に次のスナップショットを保存する例を示す図。FIG. 5 is a diagram illustrating an example in which the next snapshot is stored in an unwritten area of a block. 図6は、ブロックの未書き込み領域にログ保存する例を示す図。FIG. 6 is a diagram illustrating an example of storing logs in an unwritten area of a block.

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

(第1の実施形態)
図1は、SSD(Solid State Drive)100の構成例を示すブロック図である。SSD100は、ATAインタフェース(ATA I/F)などのホストインタフェース2を介してパーソナルコンピュータあるいはCPUなどのホスト装置(以下、ホストと略す)1と接続され、ホスト1の外部記憶装置として機能する。ホスト1は、例えば、パーソナルコンピュータのCPU、スチルカメラ、ビデオカメラなどの撮像装置のCPUである。SSD100は、ホストインタフェース2と、不揮発性半導体メモリとしてのNAND型フラッシュメモリ(以下、NANDと略す)10と、NAND10よりも高速アクセスが可能な揮発性の半導体メモリであるRAM20と、コントローラ30とを備える。
(First embodiment)
FIG. 1 is a block diagram illustrating a configuration example of an SSD (Solid State Drive) 100. The SSD 100 is connected to a host device (hereinafter abbreviated as a host) 1 such as a personal computer or a CPU via a host interface 2 such as an ATA interface (ATA I / F), and functions as an external storage device of the host 1. The host 1 is a CPU of an imaging apparatus such as a CPU of a personal computer, a still camera, or a video camera. The SSD 100 includes a host interface 2, a NAND flash memory (hereinafter abbreviated as “NAND”) 10 as a nonvolatile semiconductor memory, a RAM 20 that is a volatile semiconductor memory that can be accessed at a higher speed than the NAND 10, and a controller 30. Prepare.

RAM20は、ホスト1からのデータをNAND10にライトする際に一時的にデータを保存するためのライトバッファ21としての記憶領域と、SSD100を管理するための管理情報を記憶、更新するための記憶領域と、NAND10からリードされたデータを一時記憶するなどのための作業領域を有する。SSD100を管理するための管理情報としては、SSD100を管理するための管理テーブルであるマスターテーブル22と、マスターテーブル22に加えるべき変更に関する変更前後の差分情報を含むマスターログ23とを含む。マスターテーブル22は、NAND10に記憶されているバックアップ管理テーブル12が起動時などに展開されたものである。RAM20としては、揮発性のDRAM、SRAMなどが採用される。   The RAM 20 stores a storage area as a write buffer 21 for temporarily storing data when data from the host 1 is written to the NAND 10, and a storage area for storing and updating management information for managing the SSD 100. And a work area for temporarily storing data read from the NAND 10. The management information for managing the SSD 100 includes a master table 22 that is a management table for managing the SSD 100 and a master log 23 that includes difference information before and after the change related to the change to be applied to the master table 22. The master table 22 is obtained by expanding the backup management table 12 stored in the NAND 10 at the time of startup or the like. As the RAM 20, volatile DRAM, SRAM, or the like is employed.

NAND10は、複数のメモリセルがマトリクス状に配列されたメモリセルアレイを有し、個々のメモリセルは上位ページ及び下位ページを使用して多値記憶が可能である。NAND10は、複数のメモリチップによって構成され、各メモリチップは、データ消去の単位であるブロックを複数配列して構成される。また、NAND10では、ページごとにデータの書き込み及びデータの読み出しが行われる。すなわち、NAND10でのデータの書き込み単位及び読み出し単位は、ページである。ブロックは、複数のページによって構成されている。   The NAND 10 has a memory cell array in which a plurality of memory cells are arranged in a matrix, and each memory cell can store multiple values using an upper page and a lower page. The NAND 10 is constituted by a plurality of memory chips, and each memory chip is constituted by arranging a plurality of blocks which are data erasing units. The NAND 10 performs data writing and data reading for each page. That is, the data write unit and read unit in the NAND 10 are pages. The block is composed of a plurality of pages.

NAND10には、ホスト1によって指定されたユーザデータを記憶するユーザデータ記憶部11と、SSD100を管理するための各種管理情報が記憶されている。管理情報としては、マスターテーブル22のバックアップとしてのバックアップ管理テーブル12と、マスターログ23のバックアップとしてのバックアップログ13などを含む。   The NAND 10 stores a user data storage unit 11 that stores user data designated by the host 1 and various management information for managing the SSD 100. The management information includes a backup management table 12 as a backup of the master table 22, a backup log 13 as a backup of the master log 23, and the like.

ホスト1はSSD100に対しデータをライトする際には、ホストインタフェース2を介して論理アドレスとしてのLBA(Logical Block Addressing)と、データサイズとを含むライトコマンドとライトデータとをSSD100に入力する。LBAは、セクタ(サイズ:例えば512B)に対して0からの通し番号をつけた論理アドレスである。   When writing data to the SSD 100, the host 1 inputs a write command and write data including an LBA (Logical Block Addressing) as a logical address and a data size via the host interface 2 to the SSD 100. LBA is a logical address in which a serial number from 0 is assigned to a sector (size: eg, 512 B).

マスターテーブル22(バックアップ管理テーブル12)で管理される管理情報としては、論理アドレスとしてのLBAとデータがデータが記憶されているNAND10上の記憶位置(物理アドレス)との関係を示す論物変換テーブル、NAND10の各ブロックが使用中であるか未使用であるかを示すブロック使用/未使用情報や、エラーが多いなど記憶領域として使用できないバッドブロックを識別するバッドブロック情報などを管理するブロック管理テーブルなどを含む。   As management information managed by the master table 22 (backup management table 12), a logical-physical conversion table showing the relationship between the LBA as a logical address and the storage location (physical address) on the NAND 10 where the data is stored. Block management table for managing block usage / unused information indicating whether each block of the NAND 10 is in use or unused, bad block information for identifying bad blocks that cannot be used as a storage area due to many errors, etc. Etc.

NAND10上の管理情報とRAM20上の管理情報の関係について説明する。マスターテーブル22で管理される管理情報によって、ホスト1とNAND10との間のデータのやり取りを行うことが可能となる。バックアップ管理テーブル12は、不揮発性のNAND10に記憶されており、起動時に、NAND10に記憶されていたバックアップ管理テーブル12をRAM20の作業領域にマスターテーブル22として展開し、この展開されたマスターテーブル22をコントローラ30が使用することで、マスターテーブル22は更新されていく。   The relationship between the management information on the NAND 10 and the management information on the RAM 20 will be described. The management information managed by the master table 22 enables data exchange between the host 1 and the NAND 10. The backup management table 12 is stored in the nonvolatile NAND 10, and at the time of startup, the backup management table 12 stored in the NAND 10 is expanded as a master table 22 in the work area of the RAM 20, and the expanded master table 22 is expanded. The master table 22 is updated as the controller 30 uses it.

マスターテーブル22は、電源が切れても、電源が切れる以前の状態に復元する必要があり、このためマスターテーブルを不揮発性のNAND10にバックアップ管理テーブル12として保存する。スナップショットは、NAND10上のバックアップ管理テーブル12の全体を指し、RAM20に展開されたマスターテーブル22をそのままNAND10に保存することを、スナップショットをとるとも表現する。マスターログ23は、前述したように、マスターテーブル22の変更差分情報を含む。マスターテーブル22の更新の度に、スナップショットをとっていたのでは、速度も遅く、NAND10への書き込み数が増えるために、通常は変更差分としてのログだけをバックアップログ13としてNAND10に保存していく。マスターログ23をマスターテーブル22に反映し、NAND10に保存することを、コミットするとも表現する。   Even if the power is turned off, the master table 22 needs to be restored to the state before the power is turned off. Therefore, the master table is stored in the nonvolatile NAND 10 as the backup management table 12. The snapshot refers to the entire backup management table 12 on the NAND 10, and storing the master table 22 expanded in the RAM 20 in the NAND 10 as it is is also expressed as taking a snapshot. As described above, the master log 23 includes the change difference information of the master table 22. Since the snapshot is taken every time the master table 22 is updated, the speed is slow and the number of writes to the NAND 10 increases. Therefore, usually only the log as the change difference is stored in the NAND 10 as the backup log 13. Go. Reflecting the master log 23 in the master table 22 and storing it in the NAND 10 is also expressed as committing.

図2に、データ更新時に、スナップショットとログがどのように更新されるかを示す。コントローラ30がデータ更新する際に、マスターテーブル22に加えた変更内容をRAM20上のマスターログ23に蓄積する。管理テーブルの種類によっては、マスターテーブル22を直接更新し、更新内容をマスターログ23に蓄積したり、マスターテーブル22には直接変更を加えず、変更領域をマスターログ23上に確保して、その領域に更新内容を記録したりする。データの読み書き処理の際には、マスターテーブル22の他に蓄積されたマスターログ23も参照する。   FIG. 2 shows how snapshots and logs are updated when data is updated. When the controller 30 updates the data, the change contents added to the master table 22 are accumulated in the master log 23 on the RAM 20. Depending on the type of the management table, the master table 22 is directly updated and the updated contents are accumulated in the master log 23, or the master table 22 is not directly changed, and a change area is secured on the master log 23. Update content is recorded in the area. In the data read / write process, the master log 23 stored in addition to the master table 22 is also referred to.

データの更新が安定したら、ログのコミットを行う。コミット処理では、マスターログ23の内容を必要に応じてマスターテーブル22に反映させ、さらにマスターログ23の内容をバックアップログ13としてNAND10に保存して不揮発化する。スナップショットをNANDメモリ10に保存するのは、正常な電源断シーケンスの際あるいはマスターログ23の保存領域が不足した場合などのスナップショット条件が成立したときとする。ログまたはスナップショットがNAND10に書き終わった時点で、管理テーブルの不揮発化が完了する。   When the data update is stable, commit the log. In the commit process, the contents of the master log 23 are reflected in the master table 22 as necessary, and the contents of the master log 23 are stored in the NAND 10 as the backup log 13 and made nonvolatile. The snapshot is stored in the NAND memory 10 when a snapshot condition is satisfied during a normal power-off sequence or when the storage area of the master log 23 is insufficient. When the log or snapshot has been written to the NAND 10, the management table is non-volatile.

図1において、コントローラ30は、読み書き制御部31、テーブル管理部32、ログ管理部33を有する。読み書き制御部31は、ホスト1からリードコマンドおよびリードアドレスとしてのLBAが入力されると、マスターテーブル22およびマスターログ23を参照してLBAに対応するデータをライトバッファ21あるいはNAND10から読み出し、読み出したデータをホスト1に送信する。読み書き制御部31は、ライコマンド、ライトアドレスとしてのLBA、ライトデータが入力されると、LBAで指定されたデータをライトバッファ21に書き込む。ライトバッファ21に空き領域がない場合は、マスターテーブル22およびマスターログ23を参照してライトバッファ21からデータを追い出して、NAND10に書き込む。ライトバッファ21へのデータ書込み、NAND10へのデータ書込みに応じて、マスターテーブル22あるいはマスターログ23を更新する。   In FIG. 1, the controller 30 includes a read / write control unit 31, a table management unit 32, and a log management unit 33. When the read command and the LBA as the read address are input from the host 1, the read / write control unit 31 reads the data corresponding to the LBA from the write buffer 21 or the NAND 10 by referring to the master table 22 and the master log 23. Data is transmitted to the host 1. When a live command, an LBA as a write address, and write data are input, the read / write control unit 31 writes the data specified by the LBA into the write buffer 21. If there is no free space in the write buffer 21, the master table 22 and the master log 23 are referred to, data is evicted from the write buffer 21 and written to the NAND 10. The master table 22 or the master log 23 is updated in accordance with data writing to the write buffer 21 and data writing to the NAND 10.

SSD100では、例えば、同じLBAのデータを上書きする場合、読み書き制御部31は、つぎのような処理を実行する。論理アドレスA1にブロックサイズの有効なデータが保存されており、記憶領域としてはブロックB1が使用されていたとする。ホスト1から論理アドレスA1のブロックサイズの更新データを上書きするコマンドを受信した場合、内部に有効データを含まない用途未割り当てのブロックであるフリーブロック(ブロックB2とする)を1個確保し、そのフリーブロックにホスト1から受信したデータを書き込む。その後、論理アドレスA1とブロックB2を関係付ける管理情報の更新を行う。その結果、ブロックB2は、内部に有効データを含み、用途が割り当てられたブロックであるアクティブブロックになり、ブロックB1に保存されたデータは無効になるためブロックB1はフリーブロックとなる。   In the SSD 100, for example, when data of the same LBA is overwritten, the read / write control unit 31 executes the following processing. It is assumed that valid data having a block size is stored at the logical address A1, and the block B1 is used as a storage area. When a command for overwriting update data having a block size of the logical address A1 is received from the host 1, one free block (referred to as block B2) that is an unassigned block not including valid data is secured. Write the data received from the host 1 to the free block. Thereafter, the management information relating the logical address A1 and the block B2 is updated. As a result, the block B2 contains valid data inside and becomes an active block which is a block to which a use is assigned, and the data stored in the block B1 becomes invalid, so the block B1 becomes a free block.

このように、SSD100では、同じ論理アドレスA1のデータであっても、実際の記録領域として使用されるブロックは書込みの度に変化する。なお、ブロックサイズの更新データ書き込みでは、必ず書き込み先ブロックが変化するが、ブロックサイズ未満の更新データ書き込みでは、同じブロックに更新データが書き込まれることもある。例えばブロックサイズ未満のページデータが更新される場合、当該ブロック内において同じ論理アドレスの旧ページデータが無効化され、新たに書き込まれた最新のページデータが有効ページとして管理される。ブロック内の全データが無効化されると、当該ブロックはフリーブロックとして解放される。   As described above, in the SSD 100, even if the data has the same logical address A1, the block used as the actual recording area changes every time writing is performed. Note that, in writing update data with a block size, the write destination block always changes, but with update data writing with a block size less than that, update data may be written in the same block. For example, when page data smaller than the block size is updated, old page data having the same logical address in the block is invalidated, and the latest page data newly written is managed as a valid page. When all the data in the block is invalidated, the block is released as a free block.

テーブル管理部32は、
・NAND10に保存されたバックアップ管理テーブル(スナップショット)12を起動時にマスターテーブル22としRAM20に転送する処理、
・正常な電源断シーケンスが発生する、マスターログ23の保存領域が不足した場合などのスナップショット条件が成立したときに、RAM20上のマスターテーブル22をNAND10にスナップショットとして保存するスナップショット処理を実行する。
The table manager 32
A process of transferring the backup management table (snapshot) 12 stored in the NAND 10 to the RAM 20 as a master table 22 at startup,
When a snapshot condition is satisfied, such as when a normal power-off sequence occurs or when the storage area of the master log 23 is insufficient, a snapshot process for storing the master table 22 on the RAM 20 as a snapshot in the NAND 10 is executed. To do.

ログ管理部33は、
・マスターテーブル22を更新すべき事象が発生した際、マスターテーブル22の更新前後の差分情報である差分ログをマスターログ23に蓄積記憶する処理、
・マスターログ23の量がある値に達するとか、更新した各管理テーブル間で整合がとれる時点に達するなどの所定のコミット条件が成立したときに、RAM20上のマスターログ23をNAND10のバックアップログ(不揮発ログ)13に順次追記的に保存するとともに、マスターログ23をマスターテーブル22に反映する前述のコミット処理を実行する。
The log management unit 33
A process of accumulating and storing in the master log 23 a difference log, which is difference information before and after updating the master table 22, when an event that should update the master table 22 occurs;
The master log 23 on the RAM 20 is stored in the backup log of the NAND 10 when a predetermined commit condition such as when the amount of the master log 23 reaches a certain value or when the updated management tables are consistent is reached. The above-described commit process for reflecting the master log 23 in the master table 22 is executed in addition to the non-volatile log) 13 in order.

スナップショットまたはコミットが行われると、RAM20上に蓄積されてきたマスターログ23は、無効化される。   When a snapshot or commit is performed, the master log 23 accumulated on the RAM 20 is invalidated.

つぎに、スナップショットについてより詳細に説明する。図3は、スナップショット記憶方式の比較例を示すものである。図3においては、NAND10の所定のブロックであるルートブロックRBのページにルートポインタRP(左下がりハッチング部分)を記憶し、ルートポインタRPが指し示すブロックであるセカンドブロックSBにセカンドポインタSP(左下がりハッチング部分)を記憶し、セカンドポインタSPが指し示すブロックであるデータブロックDBにバックアップ管理テーブル(スナップショット)12を記憶している。このポインタ方式では、まずルートポインタRPをフラッシュメモリから読み出して、ルートポインタRPが指し示すNAND10上の位置のデータであるセカンドポインタSPを読み出し、さらにセカンドポインタSPが指し示すNAND10上の位置のデータであるスナップショット12を読み出すことで、管理情報を取得する。   Next, snapshots will be described in more detail. FIG. 3 shows a comparative example of the snapshot storage method. In FIG. 3, the root pointer RP (lower left hatched portion) is stored in the page of the root block RB which is a predetermined block of the NAND 10, and the second pointer SP (lower left hatched) is stored in the second block SB which is the block indicated by the root pointer RP. And a backup management table (snapshot) 12 is stored in the data block DB, which is a block indicated by the second pointer SP. In this pointer method, first, the root pointer RP is read from the flash memory, the second pointer SP that is data at the position on the NAND 10 pointed to by the root pointer RP is read, and the snap that is the data at the position on the NAND 10 pointed to by the second pointer SP. Management information is acquired by reading the shot 12.

図3では、ブロック内の1つの区画がNANDの書き込み単位である1ページを示している。ルートブロックRB、セカンドブロックSBに保存するポインタ情報は次のブロックのアドレスなので、数10バイトあれば足りる。それに対して、NAND10のページサイズは8KiB、または16KiBであり、各ページには情報が書き込まれない無駄な未書き込み領域MMが多く含まれている。   FIG. 3 shows one page in which one section in the block is a NAND write unit. Since the pointer information stored in the root block RB and the second block SB is the address of the next block, several tens of bytes are sufficient. On the other hand, the page size of the NAND 10 is 8 KiB or 16 KiB, and each page includes a lot of useless unwritten areas MM where information is not written.

そこで、本実施形態においては、図4に示すように、ルートブロックRB、セカンドブロックSBの各ページには、ポインタ情報(ルートポインタRP、セカンドポインタSP)の他に、ポインタ情報でその記憶位置がポインティングされるデータであるバックアップ管理テーブル(スナップショット)12の一部を保存することとする。以下、図4を用いて、本実施形態のスナップショット記憶方式について詳述する。   Therefore, in the present embodiment, as shown in FIG. 4, each page of the root block RB and the second block SB has pointer information (root pointer RP, second pointer SP), and the storage position of the page in the pointer information. A part of the backup management table (snapshot) 12 that is the data to be pointed is stored. Hereinafter, the snapshot storage system of this embodiment will be described in detail with reference to FIG.

図4に示すように、この実施形態では、書き換え数増大によるルートブロックRBの疲弊を防ぐために、ルートブロックRBおよびセカンドブロックSBを用いデータ領域へのポインタを2段管理している。ルートブロックRBとしては、NAND10の固定領域(予め決められた所定のブロックであり、コントローラ30はそのブロックアドレスを認識している)が使用される。ルートポインタRPには、セカンドブロックSBのブロックアドレスを示す情報が書き込まれており、ルートポインタRPは、最初、ルートブロックRBの先頭ページに書き込まれる。セカンドポインタSPが書き込まれるセカンドブロックSBが満杯となって、次の異なるブロックがセカンドブロックSBとして使用されるときに、ルートポインタRPは、ルートブロックRBの先頭ページの次のページに書き込まれる。このような処理が繰り返される。したがって、ルートブロックRBにおける未書き込み状態のページの直前のページが最新のルートポインタRPである。   As shown in FIG. 4, in this embodiment, in order to prevent exhaustion of the root block RB due to an increase in the number of rewrites, the pointer to the data area is managed in two stages using the root block RB and the second block SB. As the root block RB, a fixed area of the NAND 10 (a predetermined block determined in advance and the controller 30 recognizes the block address) is used. Information indicating the block address of the second block SB is written in the root pointer RP, and the root pointer RP is first written in the first page of the root block RB. When the second block SB to which the second pointer SP is written becomes full and the next different block is used as the second block SB, the root pointer RP is written to the next page of the first page of the root block RB. Such a process is repeated. Therefore, the page immediately before the unwritten page in the root block RB is the latest root pointer RP.

セカンドブロックSBとしては、NAND10の任意のブロックが使用される。セカンドポインタSPには、バックアップ管理テーブル(スナップショット)12を記憶しているNAND10上の位置を示す情報が書き込まれており、セカンドポインタSPは、最初、セカンドブロックSBの先頭ページに書き込まれる。すなわち、セカンドポインタSPがポインティングするポインタ情報としては、バックアップ管理テーブル(スナップショット)12が保存されるデータブロックDBの記憶位置(スナップショット12の記憶開始位置を示すブロックアドレス+ページアドレスと、使用されるブロックの識別情報)を示す情報を含む。   Any block of the NAND 10 is used as the second block SB. Information indicating the position on the NAND 10 storing the backup management table (snapshot) 12 is written in the second pointer SP, and the second pointer SP is first written in the first page of the second block SB. That is, as the pointer information to which the second pointer SP points, the storage position of the data block DB in which the backup management table (snapshot) 12 is stored (the block address indicating the storage start position of the snapshot 12 + the page address) is used. Information indicating the block identification information).

バックアップ管理テーブル(スナップショット)12のNAND10上の記憶位置が変更されたときに、セカンドポインタSPは、セカンドブロックSBの先頭ページの次のページに書き込まれる。このような処理が繰り返される。したがって、セカンドブロックSBにおける未書き込み状態のページの直前のページが最新のセカンドポインタSPである。セカンドポインタSPが書き込まれるセカンドブロックSBが満杯となって場合、他のブロックがセカンドブロックSBとして使用される。このとき、前述したように、ルートポインタRPが更新され、その更新データが現ページの次のページに書き込まれる。   When the storage position on the NAND 10 of the backup management table (snapshot) 12 is changed, the second pointer SP is written to the page following the first page of the second block SB. Such a process is repeated. Therefore, the page immediately before the unwritten page in the second block SB is the latest second pointer SP. When the second block SB in which the second pointer SP is written becomes full, another block is used as the second block SB. At this time, as described above, the route pointer RP is updated, and the updated data is written to the next page of the current page.

バックアップ管理テーブル(スナップショット)12が保存されるデータブロックDBとしては、NAND10の任意の1〜複数のブロックが使用される。スナップショットを保存した後、ブロックに未書き込みページが残った場合は、図5に示すように、次回のスナップショットをこの未書き込みページから保存するようにしてもよいし、図6に示すように、コミット条件が成立したときに、ログをこの未書き込みページから保存するようにしてもよい。   As the data block DB in which the backup management table (snapshot) 12 is stored, any one or more blocks of the NAND 10 are used. If an unwritten page remains in the block after saving the snapshot, the next snapshot may be saved from this unwritten page as shown in FIG. 5, or as shown in FIG. When the commit condition is satisfied, the log may be saved from this unwritten page.

図4の場合は、スナップショットは、データブロックDBの他に、ルートブロックRBおよびセカンドブロックSBにも保存している。すなわち、セカンドブロックSBの最新のセカンドポインタSPが保存されたページ内の未書き込み領域には、常にスナップショットの一部が保存される。ポインタはサイズが固定であるので、ページ内で、ポインタ記憶部分とスナップショット記憶部分とを識別することが可能である。   In the case of FIG. 4, the snapshot is stored in the root block RB and the second block SB in addition to the data block DB. That is, a part of the snapshot is always saved in the unwritten area in the page where the latest second pointer SP of the second block SB is saved. Since the pointer has a fixed size, it is possible to identify the pointer storage portion and the snapshot storage portion in the page.

また、ルートブロックRBの最新のルートポインタRPが保存されたページ内の未書き込み領域には、セカンドポインタSPを保存するセカンドブロックSBが変更されてルートポインタRPが変更されるときのみに、スナップショットの一部が保存される。ルートブロックRBに保存されたスナップショットの一部は、セカンドブロックSBが変更されてセカンドブロックSBの先頭ページにセカンドポインタSPおよびスナップショットの一部が保存されるときのみに有効なスナップショットとして使用され、セカンドポインタSPがこのセカンドブロックSBの次のページ以降に保存されるときには、無効なスナップショットとして扱われる。   Further, in the unwritten area in the page in which the latest root pointer RP of the root block RB is saved, the snapshot is only taken when the second pointer SB for saving the second pointer SP is changed and the root pointer RP is changed. A part of is saved. A part of the snapshot saved in the root block RB is used as a valid snapshot only when the second block SB is changed and the second pointer SP and a part of the snapshot are saved on the first page of the second block SB. When the second pointer SP is stored after the next page of the second block SB, it is treated as an invalid snapshot.

本実施形態において、NAND10に保存されたスナップショットを読み出す際には、コントローラ30は、まずルートポインタRPを含むページをルートブロックRBから読み出し、ルートポインタRPが指し示すNAND10上のブロックであるセカンドブロックSB内の未使用ページの直前のページを読み出してセカンドポインタSPを含むページを取得し、さらにセカンドポインタSPが指し示すNAND10上の位置のデータを読み出して、データブロックDB中のスナップショット12を取得する。さらに、コントローラは、データブロックDB中のスナップショット12と、セカンドポインタSPを含むページ中のスナップショット12とを合成し、さらにルートポインタRPを含むページ中のスナップショット12が有効である場合は、ルートポインタRPを含むページ中のスナップショット12も合成することで、スナップショットの全体を取得する。   In this embodiment, when reading a snapshot stored in the NAND 10, the controller 30 first reads a page including the root pointer RP from the root block RB, and a second block SB that is a block on the NAND 10 indicated by the root pointer RP. The page immediately before the unused page is read to obtain the page including the second pointer SP, and the data at the position on the NAND 10 pointed to by the second pointer SP is read to obtain the snapshot 12 in the data block DB. Further, the controller combines the snapshot 12 in the data block DB and the snapshot 12 in the page including the second pointer SP, and if the snapshot 12 in the page including the root pointer RP is valid, By combining the snapshots 12 in the page including the root pointer RP, the entire snapshot is acquired.

なお、ルートブロックRBには、スナップショットの一部を一切保存せず、セカンドブロックSBのみにスナップショットの一部を保存するようにしてもよい。   Note that a part of the snapshot may not be stored in the root block RB, and a part of the snapshot may be stored only in the second block SB.

このようにこの実施形態においては、ルートブロックRB、セカンドブロックSBにおいて、ポインタ情報を保存するページの空き領域にスナップショットの一部を保存することでポインタ情報が記憶される記憶領域を有効活用することとしているので、データブロックへ保存するスナップショットのデータ量を削減することができ、これにより、その分だけブロックを有効活用できブロックの摩耗を防ぐことができる。また、データブロックへの保存に使用するページ数が少なくなるので、その分だけスナップショットの書き込み、読み出しに必要な時間が短縮される。   As described above, in this embodiment, in the root block RB and the second block SB, a part of the snapshot is saved in the empty area of the page where the pointer information is saved, thereby effectively using the storage area in which the pointer information is stored. Therefore, it is possible to reduce the amount of snapshot data to be stored in the data block, thereby making it possible to effectively use the block and prevent wear of the block. In addition, since the number of pages used for storage in the data block is reduced, the time required for writing and reading the snapshot is reduced accordingly.

なお、ブロック内の書き込み単位がページと異なる場合は、この書き込み単位毎に、ポインタ情報およびスナップショットの一部を保存するようにすればよい。また、実施形態では、二重ポインタ方式を採用したが、一重ポインタ方式、三重以上のポインタ方式が採用された場合でも、ポインタ情報が保存されるページの空き領域にスナップショットの一部を保存するようにすればよい。   When the writing unit in the block is different from the page, the pointer information and a part of the snapshot may be saved for each writing unit. In the embodiment, the double pointer method is adopted. However, even when the single pointer method or the triple pointer method or more is adopted, a part of the snapshot is saved in the free area of the page where the pointer information is saved. What should I do?

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

1 ホスト装置、2 ホストインタフェース、10 NAND型フラッシュメモリ、11 ユーザデータ記憶部、12 バックアップ管理テーブル、13 バックアップログ、20 RAM、21 ライトバッファ、22 マスターテーブル、23 マスターログ、30 コントローラ、31 読み書き制御部、32 テーブル管理部、33 ログ管理部。   1 host device, 2 host interface, 10 NAND flash memory, 11 user data storage unit, 12 backup management table, 13 backup log, 20 RAM, 21 write buffer, 22 master table, 23 master log, 30 controller, 31 read / write control Section, 32 table management section, 33 log management section.

Claims (4)

揮発性の第1の記憶部と、
所定の書き込み単位で書き込みが行われ、前記書き込み単位より大きなブロック単位で消去が行われる不揮発性の第2の記憶部と、
前記第1の記憶部を介してホスト装置と前記第2の記憶部との間のデータ転送を行なうとともに、ホスト装置から指定された論理アドレスと第2の記憶部でのデータの記憶位置とを対応付ける論物変換情報を含む管理テーブルを起動時に第2の記憶部から第1の記憶部に転送し、該転送された管理テーブルを更新しながら管理テーブルに基づいて前記第2の記憶部でのデータ管理を行なうコントローラと、
を備え、
前記コントローラは、
第1の条件が成立したときに、前記管理テーブルを第1の記憶部から第2の記憶部の第1のブロックにスナップショットとして保存し、前記管理テーブルの保存位置を示すポインタを第2の記憶部の第2のブロック内の書き込み単位に保存し、さらに前記ポインタが保存された第2のブロック内の書き込み単位内の未書き込み領域に前記管理テーブルの一部を保存するテーブル管理部
を備えることを特徴とするメモリシステム。
A volatile first storage unit;
A non-volatile second storage unit in which writing is performed in a predetermined writing unit and erasing is performed in block units larger than the writing unit;
The data transfer between the host device and the second storage unit is performed via the first storage unit, and the logical address designated by the host device and the storage position of the data in the second storage unit are determined. A management table including logical-physical conversion information to be associated is transferred from the second storage unit to the first storage unit at startup, and the second storage unit updates the transferred management table based on the management table while updating the transferred management table. A controller for data management;
With
The controller is
When the first condition is satisfied, the management table is saved as a snapshot from the first storage unit to the first block of the second storage unit, and a pointer indicating the storage position of the management table is set to the second A table management unit for storing a part of the management table in an unwritten area in the writing unit in the second block in which the pointer is stored, and storing in the writing unit in the second block of the storage unit; A memory system characterized by that.
前記ポインタが保存される第2のブロックは、
前記管理テーブルの保存位置を示すセカンドポインタが保存される第3のブロックと、セカンドポインタの保存位置を示すルートポインタが保存される第4のブロックとを有し、
前記テーブル管理部は、
セカンドポインタが保存される第3のブロック内の書き込み単位、ルートポインタが保存される第4のブロック内の書き込み単位のうちの少なくともセカンドポインタが保存される第3のブロック内の書き込み単位内の未書き込み領域に前記管理テーブルの一部を保存することを特徴とする請求項1に記載のメモリシステム。
The second block in which the pointer is stored is
A third block in which a second pointer indicating the storage position of the management table is stored; and a fourth block in which a root pointer indicating the storage position of the second pointer is stored;
The table management unit
Of the write unit in the third block in which the second pointer is stored and the write unit in the fourth block in which the root pointer is stored, at least in the write unit in the third block in which the second pointer is stored. The memory system according to claim 1, wherein a part of the management table is stored in a write area.
スナップショットが保存された第1のブロックの未書き込み領域から次のスナップショットを追加記録することを特徴とする請求項1に記載のメモリシステム。   The memory system according to claim 1, wherein the next snapshot is additionally recorded from an unwritten area of the first block in which the snapshot is stored. 前記コントローラは、
前記管理テーブルに変更が生じた場合の変更前後での差分情報であるログを第1の記憶部に格納し、第2の条件が成立したときに、前記ログを、第1の記憶部から第2の記憶部におけるスナップショットが保存された第1のブロックの未書き込み領域から追加記録するログ管理部
をさらに備えることを特徴とする請求項1に記載のメモリシステム。
The controller is
When a change occurs in the management table, a log that is difference information before and after the change is stored in the first storage unit, and when the second condition is satisfied, the log is transferred from the first storage unit to the first storage unit. The memory system according to claim 1, further comprising: a log management unit that additionally records an unwritten area of the first block in which the snapshot in the second storage unit is stored.
JP2012060660A 2012-03-16 2012-03-16 Memory system Pending JP2013196155A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012060660A JP2013196155A (en) 2012-03-16 2012-03-16 Memory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012060660A JP2013196155A (en) 2012-03-16 2012-03-16 Memory system

Publications (1)

Publication Number Publication Date
JP2013196155A true JP2013196155A (en) 2013-09-30

Family

ID=49395074

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012060660A Pending JP2013196155A (en) 2012-03-16 2012-03-16 Memory system

Country Status (1)

Country Link
JP (1) JP2013196155A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9710378B2 (en) 2014-05-29 2017-07-18 International Business Machines Corporation Writing an address conversion table for nonvolatile memory wear leveling
US9891838B2 (en) 2015-03-13 2018-02-13 Samsung Electronics Co., Ltd. Method of operating a memory system having a meta data manager
CN115079952A (en) * 2022-06-29 2022-09-20 阿里巴巴(中国)有限公司 Method and device for realizing mutual exclusion of write operations
CN115543868A (en) * 2022-11-24 2022-12-30 苏州浪潮智能科技有限公司 A data storage method, device, electronic device and readable medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9710378B2 (en) 2014-05-29 2017-07-18 International Business Machines Corporation Writing an address conversion table for nonvolatile memory wear leveling
US9710375B2 (en) 2014-05-29 2017-07-18 International Business Machines Corporation Writing an address conversion table for nonvolatile memory wear leveling
US9891838B2 (en) 2015-03-13 2018-02-13 Samsung Electronics Co., Ltd. Method of operating a memory system having a meta data manager
CN115079952A (en) * 2022-06-29 2022-09-20 阿里巴巴(中国)有限公司 Method and device for realizing mutual exclusion of write operations
CN115543868A (en) * 2022-11-24 2022-12-30 苏州浪潮智能科技有限公司 A data storage method, device, electronic device and readable medium
CN115543868B (en) * 2022-11-24 2023-08-15 苏州浪潮智能科技有限公司 A data storage method, device, electronic device and readable medium

Similar Documents

Publication Publication Date Title
US11693463B2 (en) Memory system and controller
US10061710B2 (en) Storage device
US10915475B2 (en) Methods and apparatus for variable size logical page management based on hot and cold data
US8135900B2 (en) Integrated memory management and memory management method
US9442841B2 (en) Semiconductor memory device and method for logging monitored events into a buffer
US9092323B2 (en) Systems and methods for recovering addressing data
JP2013061799A (en) Memory device, control method for memory device and controller
US9785384B2 (en) Semiconductor storage device and method for controlling nonvolatile semiconductor memory
CN106201335B (en) Storage system
US10223001B2 (en) Memory system
JP4909963B2 (en) Integrated memory management device
US20150339069A1 (en) Memory system and method
JP2013196155A (en) Memory system
US9304906B2 (en) Memory system, controller and control method of memory
US20230076365A1 (en) Fast lba/pba table rebuild
CN111949212B (en) File system and file management method based on self-defined open channel SSD
JP6640940B2 (en) Memory system control method
JP2013200722A (en) Logical block construction method for semiconductor storage device
TWI863440B (en) Method of handling trim command in flash memory and related memory controller and storage system thereof
US11941247B2 (en) Storage device, storage system, and method
JP2013200726A (en) Semiconductor memory
US7996598B2 (en) Memory management module