JP5579135B2 - Data storage device, memory control device, and memory control method - Google Patents

Data storage device, memory control device, and memory control method Download PDF

Info

Publication number
JP5579135B2
JP5579135B2 JP2011167041A JP2011167041A JP5579135B2 JP 5579135 B2 JP5579135 B2 JP 5579135B2 JP 2011167041 A JP2011167041 A JP 2011167041A JP 2011167041 A JP2011167041 A JP 2011167041A JP 5579135 B2 JP5579135 B2 JP 5579135B2
Authority
JP
Japan
Prior art keywords
block
compaction
threshold value
threshold
flash memory
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.)
Expired - Fee Related
Application number
JP2011167041A
Other languages
Japanese (ja)
Other versions
JP2013030081A (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.)
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 JP2011167041A priority Critical patent/JP5579135B2/en
Priority to US13/560,486 priority patent/US8930614B2/en
Publication of JP2013030081A publication Critical patent/JP2013030081A/en
Application granted granted Critical
Publication of JP5579135B2 publication Critical patent/JP5579135B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System (AREA)

Description

本発明の実施形態は、不揮発性メモリを使用するデータ記憶装置、メモリ制御装置及びメモリ制御方法に関する。   Embodiments described herein relate generally to a data storage device, a memory control device, and a memory control method that use a nonvolatile memory.

近年、データ記憶装置として、書き換え可能な不揮発性メモリであるNAND型フラッシュメモリ(以下、単にフラッシュメモリと表記する場合がある)を使用するSSD(solid state drive)の開発が推進されている。   2. Description of the Related Art In recent years, development of an SSD (solid state drive) using a NAND flash memory (hereinafter sometimes simply referred to as a flash memory), which is a rewritable nonvolatile memory, has been promoted as a data storage device.

フラッシュメモリは、データの書き込みを行なう記憶領域に対して、その書き込みの前にデータの消去処理が必要である。また、フラッシュメモリは、書き込み単位(ページ単位)と消去処理の消去単位(ブロック単位)とが異なる。ここで、1ブロックは、例えば64ページに相当する記憶領域である。   In the flash memory, data erasure processing is necessary before the data is written into a storage area where data is written. In the flash memory, a writing unit (page unit) and an erasing unit (block unit) for erasing processing are different. Here, one block is a storage area corresponding to, for example, 64 pages.

SSDでは、フラッシュメモリに対するデータの書き換えが進むと、無効なデータ(最新でないデータ)により、ブロック内は有効データを格納できない記憶領域の割合が増大する。SSDは、ブロック内の記憶領域を有効活用するために、コンパクション(compaction)処理を実行する。コンパクション処理とは、有効データの記憶領域が低密度になったブロックから有効データを集めて、別のブロックに書き直す処理である。コンパクション対象ブロックは、書き直し処理後の消去処理により、有効活用できる記憶領域として再生することになる。   In SSD, when data rewrite to the flash memory proceeds, the ratio of storage areas in which valid data cannot be stored in the block increases due to invalid data (data that is not the latest). The SSD executes a compaction process in order to effectively use the storage area in the block. The compaction process is a process in which valid data is collected from a block whose effective data storage area has become low density and rewritten to another block. The compaction target block is reproduced as a storage area that can be effectively used by the erasing process after the rewriting process.

特開2009−211219号公報JP 2009-211119 A

コンパクション処理を効果的に行うためには、コンパクション対象ブロックとして、より低密度のブロックを検索することが重要である。コンパクション対象ブロックの検索処理は、コンパクション処理の性能に大きく影響する。従来、有効トラック数別に全ブロックIDを分類する管理テーブルを用いた検索方法が提案されているが、管理テーブルの専用メモリ領域が多く必要となるなど、必ずしも有効な検索処理ではない。   In order to effectively perform the compaction process, it is important to search for a block having a lower density as a compaction target block. The search process for the compaction target block greatly affects the performance of the compaction process. Conventionally, a search method using a management table that classifies all block IDs according to the number of valid tracks has been proposed. However, this is not necessarily an effective search process because a large dedicated memory area is required for the management table.

本発明の目的は、有効なコンパクション対象ブロックの検索処理を実現することで、コンパクション処理の効率化を図ることができるデータ記憶装置を提供することにある。   An object of the present invention is to provide a data storage device that can improve the efficiency of compaction processing by realizing effective compaction target block search processing.

実施形態によれば、データ記憶装置は、ブロックをデータ消去単位とするフラッシュメモリとコントローラとを具備する。前記コントローラは、前記フラッシュメモリに対するコンパクション処理を実行するコンパクション処理手段を含む。前記コンパクション処理手段は、前記フラッシュメモリの使用可能な記憶容量及びブロック内の有効データ量に基づいてブロック内の有効データ量の閾値を算出し、前記使用可能な記憶容量の変動に応じて前記閾値を更新した最新の閾値を算出する閾値算出手段と、前記閾値算出手段から取得した前記最新の閾値に基づいて相対的に有効データ量が少ないブロックを、前記コンパクション処理の対象ブロックとして検索する検索手段とを有する。 According to the embodiment, the data storage device includes a flash memory having a block as a data erasing unit and a controller. The controller includes compaction processing means for performing compaction processing on the flash memory . The compaction processing unit calculates a threshold value of the effective data amount in the block based on the usable storage capacity of the flash memory and the effective data amount in the block, and the threshold value is determined according to the change in the usable storage capacity. And a search unit for searching for a block having a relatively small effective data amount as a target block of the compaction process based on the latest threshold acquired from the threshold calculation unit . And have.

実施形態に関するSSDの構成を説明するためのブロック図。The block diagram for demonstrating the structure of SSD regarding embodiment. 実施形態に関するフラッシュメモリコントローラの構成を説明するためのブロック図。1 is a block diagram for explaining a configuration of a flash memory controller according to an embodiment. FIG. 実施形態に関する有効クラスタ数閾値テーブルを説明するための図。The figure for demonstrating the effective cluster number threshold value table regarding embodiment. 実施形態に関する有効クラスタ数の閾値算出処理を説明するためのフローチャート。7 is a flowchart for explaining threshold value calculation processing for the number of effective clusters according to the embodiment. 実施形態に関するコンパクション対象ブロックの検索処理を説明するためのフローチャート。The flowchart for demonstrating the search process of the compaction object block regarding embodiment. 実施形態に関するコンパクション処理を説明するためのフローチャート。The flowchart for demonstrating the compaction process regarding embodiment.

以下図面を参照して、実施形態を説明する。   Embodiments will be described below with reference to the drawings.

[データ記憶装置の構成]
図1は、実施形態に係るデータ記憶装置の構成を示すブロック図である。
[Configuration of data storage device]
FIG. 1 is a block diagram illustrating a configuration of a data storage device according to the embodiment.

図1に示すように、データ記憶装置はSSD(solid state drive)であり、SSDコントローラ10と、不揮発性メモリのNAND型フラッシュメモリ(以下、フラッシュメモリ)11とを有する。フラッシュメモリ11はSSDのデータ記憶媒体であり、例えばチャネル単位またはパッケージ単位での外付け接続が可能である。   As shown in FIG. 1, the data storage device is an SSD (solid state drive), and includes an SSD controller 10 and a NAND flash memory (hereinafter, flash memory) 11 that is a nonvolatile memory. The flash memory 11 is an SSD data storage medium, and can be externally connected in units of channels or packages, for example.

SSDコントローラ10は、フラッシュメモリコントローラ12と、ホストインターフェース(ホストI/F)13と、バッファ管理モジュール14と、バッファメモリ(DRAM)15と、マイクロプロセッサ(CPU)16とを有する。CPU16は、SSDコントローラ10の全体的制御を実行する。DRAM15は、バッファメモリとして動作し、論理/物理アドレスの変換テーブルやホストシステム1から転送されるデータなどを保持する。   The SSD controller 10 includes a flash memory controller 12, a host interface (host I / F) 13, a buffer management module 14, a buffer memory (DRAM) 15, and a microprocessor (CPU) 16. The CPU 16 performs overall control of the SSD controller 10. The DRAM 15 operates as a buffer memory and holds a logical / physical address conversion table, data transferred from the host system 1, and the like.

ホストI/F13は、ホストシステム1とSSDコントローラ10との間で、データ、コマンド、アドレスの転送を制御する。ホストシステム1は、例えばSATA(Serial ATA)規格のインターフェースを含むコンピュータなどである。バッファ管理モジュール14はバッファメモリ(DRAM)15を制御し、ホストI/F13とバッファメモリ15間のデータ転送を制御する。また、バッファ管理モジュール14は、フラッシュメモリコントローラ12とバッファメモリ15間のデータ転送を制御する。   The host I / F 13 controls the transfer of data, commands, and addresses between the host system 1 and the SSD controller 10. The host system 1 is, for example, a computer including an interface of SATA (Serial ATA) standard. The buffer management module 14 controls a buffer memory (DRAM) 15 and controls data transfer between the host I / F 13 and the buffer memory 15. The buffer management module 14 controls data transfer between the flash memory controller 12 and the buffer memory 15.

フラッシュメモリコントローラ12は、入出力インターフェース(単にインターフェース)20と、メモリアクセスコントローラ21とを含む。インターフェース20は、フラッシュメモリ11とメモリアクセスコントローラ21との間でのデータの入出力、及びフラッシュメモリ11とコンパクションモジュール24との間でのデータの入出力を行なう。メモリアクセスコントローラ21は、インターフェース20を介してフラッシュメモリ11に対するデータの読み出し動作及び書き込み動作を制御する。   The flash memory controller 12 includes an input / output interface (simply an interface) 20 and a memory access controller 21. The interface 20 performs data input / output between the flash memory 11 and the memory access controller 21 and data input / output between the flash memory 11 and the compaction module 24. The memory access controller 21 controls a data read operation and a write operation with respect to the flash memory 11 via the interface 20.

メモリアクセスコントローラ21は、コントローラ22と、ブロック管理モジュール23と、コンパクションモジュール24とを含む。コントローラ22は、内部バスを介して接続されたブロック管理モジュール23及びコンパクションモジュール24などの各モジュールの動作を制御する。ブロック管理モジュール23は、各ブロックの有効クラスタを管理するテーブルや、フリーブロック(未使用の待機状態ブロック)などを管理する管理情報を有し、フラッシュメモリ11の各ブロックを管理する。   The memory access controller 21 includes a controller 22, a block management module 23, and a compaction module 24. The controller 22 controls the operation of each module such as the block management module 23 and the compaction module 24 connected via the internal bus. The block management module 23 has management information for managing a table for managing the effective cluster of each block, a free block (unused standby state block), and the like, and manages each block of the flash memory 11.

(コンパクションモジュール)
コンパクションモジュール24は、図2に示すように、ブロック検索モジュール30と、有効クラスタ数閾値算出モジュール(以下、閾値算出モジュールと略する場合がある)31と、コンパクションブロックリスト管理モジュール(以下、ブロックリスト管理モジュールと略する場合がある)32と、クラスタ検索モジュール33と、コマンドリスト生成モジュール34と、コマンドリスト投入モジュール35とを有する。
(Compact module)
As shown in FIG. 2, the compaction module 24 includes a block search module 30, an effective cluster number threshold value calculation module (hereinafter sometimes abbreviated as a threshold value calculation module) 31, and a compaction block list management module (hereinafter referred to as a block list). A cluster search module 33, a command list generation module 34, and a command list input module 35.

ブロック検索モジュール30は、有効データが記録されているアクティブブロック群から、コンパクション対象ブロックの候補を検索する。閾値算出モジュール31は、ブロック検索モジュール30が実行するブロック検索処理での条件として利用する有効クラスタ数の閾値(有効クラスタ数閾値と呼ぶ)を算出する。ブロックリスト管理モジュール32は、コンパクション対象ブロックの候補およびコンパクション処理中のブロックを、それぞれリスト構造により管理する。   The block search module 30 searches for a candidate for a compaction target block from an active block group in which valid data is recorded. The threshold calculation module 31 calculates a threshold for the number of effective clusters (referred to as an effective cluster number threshold) used as a condition in the block search processing executed by the block search module 30. The block list management module 32 manages the compaction target block candidates and the blocks being subjected to compaction processing, respectively, according to a list structure.

クラスタ検索モジュール33は、ブロックリスト管理モジュール32により管理されているリスト内で、コンパクション処理中の各ブロックについてリード可能な最小単位であるクラスタ単位での有効データまたは無効データのいずれであるかを判定する。クラスタ検索モジュール33は、クラスタ単位での有効データである有効クラスタを検索する。   The cluster search module 33 determines whether the valid data or invalid data in the cluster unit, which is the smallest readable unit for each block in the compaction process, in the list managed by the block list management module 32. To do. The cluster search module 33 searches for valid clusters that are valid data in cluster units.

コマンドリスト生成モジュール34は、クラスタ検索モジュール33により検索された有効クラスタについて、コンパクション処理の要求コマンド(コンパクション要求コマンド)セットを生成する。コマンドリスト投入モジュール35は、コマンドリスト生成モジュール34から受け取ったコンパクション要求コマンドを、インタフェース20に投入する。これにより、フラッシュメモリ11に対するコンパクション処理が実行される。   The command list generation module 34 generates a compaction processing request command (compaction request command) set for the valid clusters searched by the cluster search module 33. The command list input module 35 inputs the compaction request command received from the command list generation module 34 to the interface 20. Thereby, the compaction process for the flash memory 11 is executed.

[コンパクション処理]
以下、図3、及び図4から図6のフローチャートを参照して、本実施形態のコンパクション処理を説明する。
[Compact processing]
Hereinafter, the compaction processing of this embodiment will be described with reference to the flowcharts of FIGS. 3 and 4 to 6.

SSDは、後述するように、ブロック内の記憶領域を有効活用するためにコンパクション処理を実行する(図6を参照)。本実施形態のコンパクションモジュール24では、図2に示すように、各モジュール30〜35が連携して、コンパクション処理を高速かつ効率的に実行する。   As will be described later, the SSD executes a compaction process in order to effectively use the storage area in the block (see FIG. 6). In the compaction module 24 of this embodiment, as shown in FIG. 2, the modules 30 to 35 cooperate to execute compaction processing at high speed and efficiently.

まず、ブロック検索モジュール30は、図5のフローチャートに示すように、有効データが記録されているアクティブブロック群から、コンパクション対象ブロックの候補を検索する。この場合、コンパクション処理を効果的に行うためには、できるだけ有効クラスタ数の少ない低密度のブロックをコンパクション対象ブロックとして検索する必要がある。   First, as shown in the flowchart of FIG. 5, the block search module 30 searches for a candidate for a compaction target block from an active block group in which valid data is recorded. In this case, in order to effectively perform the compaction process, it is necessary to search a low-density block with as few effective clusters as possible as a compaction target block.

ここで、クラスタ(cluster)は、フラッシュメモリ11からデータを読み出す場合の最小アクセス単位である。1クラスタは、例えば1物理ページの半分に対応するデータ量である。マルチチャネル構成のSSDの場合、チャネル数×プレーン(plane)数の物理ページから論理ページが構成される。従って、有効クラスタはクラスタ単位の有効データである。また、有効クラスタ数(CN)は、1ブロック内の有効データ量である。   Here, the cluster is a minimum access unit when reading data from the flash memory 11. One cluster is, for example, a data amount corresponding to half of one physical page. In the case of a multi-channel SSD, a logical page is composed of physical pages of the number of channels × the number of planes. Therefore, the effective cluster is effective data in units of clusters. The effective cluster number (CN) is the effective data amount in one block.

ブロック検索モジュール30は、後述するように、コンパクション対象ブロックの候補を検索する場合の条件として、有効クラスタ数(CN)に係る閾値(有効クラスタ数閾値TH)を使用する。有効クラスタ数閾値THは、閾値算出モジュール31により算出される。以下、図4のフローチャートを参照して、閾値算出モジュール31の処理を説明する。   As will be described later, the block search module 30 uses a threshold value related to the number of effective clusters (CN) (effective cluster number threshold value TH) as a condition for searching for a compaction target block candidate. The effective cluster number threshold TH is calculated by the threshold calculation module 31. Hereinafter, the processing of the threshold calculation module 31 will be described with reference to the flowchart of FIG.

閾値算出モジュール31は、図3に示すように、有効クラスタ数閾値を管理する管理テーブル100を有する。管理テーブル100は、フラッシュメモリ11の記憶容量の余裕率(M)と有効クラスタ密度(CD)とが対応付けられている。余裕率(M)は、装置表記容量に対して実際に使用可能な記憶容量の割合である。   As illustrated in FIG. 3, the threshold calculation module 31 includes a management table 100 that manages the effective cluster number threshold. In the management table 100, the margin ratio (M) of the storage capacity of the flash memory 11 and the effective cluster density (CD) are associated with each other. The margin ratio (M) is the ratio of the storage capacity that can actually be used to the device notation capacity.

閾値算出モジュール31は、使用不可のブロック(BB:Bad Block)の発生したタイミングで、ブロック管理モジュール23からその発生通知を受け付ける(ブロック400)。閾値算出モジュール31は、その発生通知を受け付けると、記憶容量の余裕率(M)を算出(再計算)する(ブロック401)。ここで、余裕率(M)は、数式「M=MC÷TC×100(%)」により算出される。MCは余裕容量であり、ユーザデータの記憶に利用可能な全記憶容量からTCを差し引いた容量である。TCは、フラッシュメモリ11の装置表記容量である。   The threshold calculation module 31 accepts the occurrence notification from the block management module 23 at the timing when the unusable block (BB: Bad Block) occurs (block 400). When the threshold calculation module 31 accepts the occurrence notification, the threshold calculation module 31 calculates (recalculates) a margin rate (M) of the storage capacity (block 401). Here, the margin ratio (M) is calculated by the equation “M = MC ÷ TC × 100 (%)”. MC is a spare capacity, which is a capacity obtained by subtracting TC from the total storage capacity available for storing user data. TC is a device notation capacity of the flash memory 11.

さらに、閾値算出モジュール31は、管理テーブル100を参照して、算出した余裕率(M)に対応する有効クラスタ密度(CD)を算出する(ブロック402)。ここで、1クラスタは、例えば1ページ(物理ページ)の半分に対応するデータ量である。また、1論理ページは例えば32物理ページから構成され、1ブロックは例えば64論理ページ分のデータ量である。これらの関係から、余裕率(M)と有効クラスタ密度(CD)とが対応付けられた情報が、管理テーブル100として予め作成されている。   Further, the threshold calculation module 31 refers to the management table 100 and calculates an effective cluster density (CD) corresponding to the calculated margin rate (M) (block 402). Here, one cluster is a data amount corresponding to half of one page (physical page), for example. Further, one logical page is composed of, for example, 32 physical pages, and one block is a data amount of, for example, 64 logical pages. From these relationships, information in which the margin ratio (M) and the effective cluster density (CD) are associated with each other is created in advance as the management table 100.

次に、閾値算出モジュール31は、管理テーブル100から算出した有効クラスタ密度(CD)から有効クラスタ数閾値(TH)を算出する(ブロック403)。有効クラスタ数閾値(TH)は、数式「TH=TN×CD」により算出される。TNは、論理ブロックの総クラスタ数である。閾値算出モジュール31は、算出した有効クラスタ数閾値(TH)を内部メモリに記憶する。   Next, the threshold calculation module 31 calculates the effective cluster number threshold (TH) from the effective cluster density (CD) calculated from the management table 100 (block 403). The effective cluster number threshold (TH) is calculated by the formula “TH = TN × CD”. TN is the total number of clusters in the logical block. The threshold value calculation module 31 stores the calculated effective cluster number threshold value (TH) in the internal memory.

閾値算出モジュール31は、内部メモリに記憶した前の有効クラスタ数閾値(TH)と、今回算出した現在値とを比較する(ブロック404)。閾値算出モジュール31は、閾値が変化している場合には、内部メモリの既存値を有効クラスタ数閾値(TH)の現在値(最新値)に更新する(ブロック405)。   The threshold value calculation module 31 compares the previous effective cluster number threshold value (TH) stored in the internal memory with the current value calculated this time (block 404). If the threshold value has changed, the threshold value calculation module 31 updates the existing value in the internal memory to the current value (latest value) of the effective cluster number threshold value (TH) (block 405).

要するに、閾値算出モジュール31は、フラッシュメモリ11の余裕率の変動に応じて管理テーブル100から対応する有効クラスタ密度(CD)を求めて、この有効クラスタ密度(CD)から最新の有効クラスタ数閾値(TH)を算出する。閾値算出モジュール31は、内部メモリの既存値を最新の有効クラスタ数閾値(TH)に更新する。なお、閾値算出モジュール31は、アクティブブロック群の平均有効クラスタ数を算出し、その平均値に基づいて最新の有効クラスタ数閾値(TH)を算出し、内部メモリに記憶してもよい。   In short, the threshold calculation module 31 obtains the corresponding effective cluster density (CD) from the management table 100 according to the fluctuation of the margin ratio of the flash memory 11, and uses the latest effective cluster number threshold (from the effective cluster density (CD)). TH) is calculated. The threshold calculation module 31 updates the existing value in the internal memory to the latest effective cluster number threshold (TH). The threshold value calculation module 31 may calculate the average effective cluster number of the active block group, calculate the latest effective cluster number threshold value (TH) based on the average value, and store it in the internal memory.

次に、ブロック検索モジュール30は、図5のフローチャートに示すように、閾値算出モジュール31の内部メモリに格納されている最新の有効クラスタ数閾値(TH)を取得する(ブロック500)。さらに、ブロック検索モジュール30は、各アクティブブロック(有効データが記録されているブロック)から、有効クラスタ数(CN)を取得する(ブロック501)。この場合、ブロックモジュール30は、ブロック管理モジュール23から各アクティブブロック毎の有効クラスタ数(CN)を取得する。   Next, the block search module 30 acquires the latest effective cluster number threshold (TH) stored in the internal memory of the threshold calculation module 31 as shown in the flowchart of FIG. 5 (block 500). Further, the block search module 30 acquires the number of valid clusters (CN) from each active block (a block in which valid data is recorded) (block 501). In this case, the block module 30 acquires the effective cluster number (CN) for each active block from the block management module 23.

ブロック検索モジュール30は、取得した有効クラスタ数(CN)が0であるブロックを検索すると、当該ブロックをフリーブロック(未使用の待機状態ブロック)として解放するための通知をブロック管理モジュール23に行なう(ブロック502のYES,505)。コントローラ21は、当該ブロックに対する消去処理を実行する。ブロック管理モジュール23は、消去処理後のブロックをフリーブロックとして登録する。   When the block search module 30 searches for a block whose acquired effective cluster number (CN) is 0, the block search module 30 notifies the block management module 23 to release the block as a free block (unused standby state block) ( YES in block 502, 505). The controller 21 executes an erasing process on the block. The block management module 23 registers the block after the erasure process as a free block.

一方、ブロック検索モジュール30は、有効クラスタ数(CN)が0でないブロックの場合には、有効クラスタ数(CN)と有効クラスタ数閾値(TH)とを比較する(ブロック503)。ブロック検索モジュール30は、有効クラスタ数(CN)が閾値(TH)より少ない場合には、当該有効クラスタ数(CN)のブロックをコンパクション対象ブロックとして候補リストに登録する(ブロック504)。   On the other hand, if the number of valid clusters (CN) is not 0, the block search module 30 compares the number of valid clusters (CN) with the number of valid clusters threshold (TH) (block 503). When the number of valid clusters (CN) is smaller than the threshold (TH), the block search module 30 registers the block of the number of valid clusters (CN) as a compaction target block in the candidate list (block 504).

ブロック検索モジュール30は、所定範囲のアクティブブロックに対する検索処理を繰り返し、閾値(TH)より少ない有効クラスタ数(CN)のブロックを候補リストに追加していく(ブロック506)。ここで、ブロック検索モジュール30は、有効クラスタ数(CN)が閾値(TH)より少ないブロックの中で、有効クラスタ数(CN)の少ない順に所定数のブロックをコンパクション対象ブロックとして選定してもよい。   The block search module 30 repeats the search process for a predetermined range of active blocks, and adds blocks with the number of effective clusters (CN) smaller than the threshold (TH) to the candidate list (block 506). Here, the block search module 30 may select a predetermined number of blocks as the compaction target blocks in the order from the smallest effective cluster number (CN) among the blocks whose effective cluster number (CN) is smaller than the threshold (TH). .

ブロックリスト管理モジュール32は、コンパクション対象ブロックの候補およびコンパクション処理中のブロックを、それぞれリスト構造により管理する。具体的には、ブロックリスト管理モジュール32は、ブロック検索モジュール30により選出されたブロック群のブロックID(識別情報)をコンパクション対象ブロックの候補としてリスト構造で管理する。   The block list management module 32 manages the compaction target block candidates and the blocks being subjected to compaction processing, respectively, according to a list structure. Specifically, the block list management module 32 manages the block ID (identification information) of the block group selected by the block search module 30 as a compaction target block candidate in a list structure.

なお、ブロックリスト管理モジュール32は、コンパクション対象ブロックの候補リストとしては、目的に応じて例えば3種類のリストを有し、コンパクション対象ブロックを管理する。1種類目のリストは、通常のコンパクション処理用で、選出されたブロックのブロックIDを管理するためのものである。即ち、通常のコンパクション処理では、コントローラ22は、ブロック管理モジュール23により管理しているフリーブロック数を確認し、それが規定数以下であればフリーブロックの枯渇状態を回避するために、ブロック検索モジュール30に対してコンパクション対象ブロックの検索処理を開始させる。   The block list management module 32 has, for example, three types of lists as the compaction target block candidate list according to the purpose, and manages the compaction target block. The first type list is for normal compaction processing, and is used for managing the block ID of the selected block. In other words, in normal compaction processing, the controller 22 checks the number of free blocks managed by the block management module 23, and if it is less than the specified number, in order to avoid a free block depletion state, the block search module 30 starts the compaction target block search process.

また、2種類目のリストは、エラー修復目的のコンパクション処理用である。例えば、コントローラ22は、定期的にリード確認を行い、エラービットが規定値以上多くなったブロックの場合に、退避の目的で当該ブロック内のデータを他のブロックに移動する処理に使用する。このようなコンパクション処理は、パトロールリフレッシュ処理と呼ばれることがある。3種類目のリストは、フラッシュメモリ11の延命のためのウェアレベリング(wear leveling)目的のコンパクション処理用である。フラッシュメモリ11の寿命は、ブロックの消去回数および消去時間間隔に依存するため、ブロックの疲弊度を平準化する必要がある。このコンパクション処理は、図示しないウェアレベリングモジュールにより、ウェアレベリングが必要と判定された場合に開始される。   The second list is for compaction processing for error recovery purposes. For example, the controller 22 periodically performs read confirmation, and in the case of a block in which the error bit has exceeded a specified value, the controller 22 uses the data in the block to move to another block for the purpose of saving. Such compaction processing is sometimes called patrol refresh processing. The third list is for compaction processing for the purpose of wear leveling for extending the life of the flash memory 11. Since the lifetime of the flash memory 11 depends on the number of block erases and the erase time interval, it is necessary to equalize the fatigue level of the blocks. This compaction process is started when it is determined that wear leveling is necessary by a wear leveling module (not shown).

ブロックリスト管理モジュール32は、コンパクション対象ブロックの候補リストから各目的に応じて優先順位をつけ、コンパクション処理中にコンパクション対象ブロックのリストを生成する。以下、図6のフローチャートを参照して、コンパクション処理を具体的に説明する。   The block list management module 32 assigns priorities according to each purpose from the compaction target block candidate list, and generates a compaction target block list during the compaction process. Hereinafter, the compaction process will be described in detail with reference to the flowchart of FIG.

クラスタ検索モジュール33は、ブロックリスト管理モジュール32により管理されているリスト内で、各コンパクション対象ブロックについてクラスタ単位での有効データまたは無効データのいずれであるかを判定し、有効データである有効クラスタを検索する(ブロック600)。   The cluster search module 33 determines whether each compaction target block is valid data or invalid data for each compaction target block in the list managed by the block list management module 32, and determines valid clusters that are valid data. A search is made (block 600).

コマンドリスト生成モジュール34は、クラスタ検索モジュール33により検索された有効クラスタについて、コンパクション処理の要求コマンド(コンパクション要求コマンド)セットを生成する(ブロック601)。コマンドリスト投入モジュール35は、コマンドリスト生成モジュール34から受け取ったコンパクション要求コマンドを、インターフェース20に投入する(ブロック602,603)。これにより、フラッシュメモリ11に対するコンパクション処理が実行される(ブロック604)。   The command list generation module 34 generates a compaction processing request command (compaction request command) set for the valid clusters searched by the cluster search module 33 (block 601). The command list input module 35 inputs the compaction request command received from the command list generation module 34 to the interface 20 (blocks 602 and 603). Thereby, the compaction process for the flash memory 11 is executed (block 604).

ここで、コンパクション要求コマンドとは、コンパクション対象ブロックから有効クラスタをリードし、別のブロックに書き直すためのコマンドである。本実施形態では、コマンドリスト生成モジュール34は、ライト可能な最小単位であるページ単位でまとめてコマンド発行を行うものとする。マルチチャネル構成のSSDの場合、例えば、「チャネル数−Parity用チャネル−移動先ブロックのNULLブロック数)×プレーン(plane)数×ページ当たりのクラスタ数」のクラスタ数個分のコマンドを1セットとして生成する。   Here, the compaction request command is a command for reading a valid cluster from the compaction target block and rewriting it in another block. In the present embodiment, it is assumed that the command list generation module 34 issues commands in units of pages, which is the smallest writable unit. In the case of an SSD having a multi-channel configuration, for example, a command corresponding to a number of clusters of “number of channels−number of parity channels−number of NULL blocks of destination block” × number of planes × number of clusters per page ”is set as one set. Generate.

コンパクション処理が完了すると、コントローラ21は、コンパクション対象ブロックに対する消去処理を実行する。ブロック管理モジュール23は、消去処理後のブロックをフリーブロックとして登録するためのリストを生成する(ブロック606)。   When the compaction process is completed, the controller 21 executes an erasure process on the compaction target block. The block management module 23 generates a list for registering the erased block as a free block (block 606).

以上のように本実施形態によれば、コンパクション処理の実行時にコンパクション対象ブロックを検索する場合に、有効クラスタの少ない低密度ブロックを有効クラスタ数閾値に基づいて判定する。この有効クラスタ数閾値は、フラッシュメモリ11のメモリ容量の余裕率の変動に応じて最新の閾値として更新される。   As described above, according to the present embodiment, when searching for a compaction target block at the time of performing the compaction process, a low-density block with few valid clusters is determined based on the valid cluster number threshold. This effective cluster number threshold is updated as the latest threshold according to the fluctuation of the margin ratio of the memory capacity of the flash memory 11.

このような本実施形態の検索方法であれば、コンパクション対象ブロックを高速かつ効率的に検索することが可能となり、結果としてコンパクション処理時間の短縮化を実現することができる。即ち、コンパクション対象ブロックを検索する場合に、できるだけ低密度のブロック検索を実現するためには、有効クラスタ数閾値が小さいことが望ましい。しかし一方で、フラッシュメモリ11の余裕率が減少すると、コンパクション対象ブロックの候補を検索することが困難となる。また逆に、余裕をもたせて有効クラスタ数閾値を予め大きめの値に設定した場合には、コンパクション処理の効率が低下する。   With such a search method of the present embodiment, it is possible to search a compaction target block quickly and efficiently, and as a result, it is possible to reduce the compaction processing time. That is, when searching for a compaction target block, it is desirable that the threshold number of effective clusters is small in order to realize block search with the lowest possible density. On the other hand, however, if the margin ratio of the flash memory 11 decreases, it becomes difficult to search for candidates for the compaction target block. Conversely, when the effective cluster number threshold is set to a large value in advance with a margin, the efficiency of the compaction process decreases.

従って、本実施形態であれば、有効クラスタ数閾値を余裕率の変動に応じて更新することにより、コンパクション対象ブロックを高速かつ効率的に検索することが可能となる。また、コンパクション対象ブロックの検索処理に要する専用メモリ領域として、閾値算出モジュール31が有する有効クラスタ数閾値テーブル及び閾値を記憶するメモリ領域だけである。このため、専用メモリ領域を最小限にすることが可能である。要するに、本実施形態であれば、最小限の専用メモリ領域で、フラッシュメモリの使用状態(余裕率)に適した効果的なコンパクション対象ブロックの検索処理を実現できる。   Therefore, according to the present embodiment, it is possible to search for the compaction target block at high speed and efficiently by updating the effective cluster number threshold according to the fluctuation of the margin ratio. Further, the dedicated memory area required for the search process for the compaction target block is only the memory area for storing the effective cluster number threshold value table and the threshold value that the threshold value calculation module 31 has. For this reason, it is possible to minimize the dedicated memory area. In short, according to the present embodiment, an effective compaction target block search process suitable for the use state (margin ratio) of the flash memory can be realized with a minimum dedicated memory area.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   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…ホストシステム、10…SSDコントローラ、11…NAND型フラッシュメモリ、
12…フラッシュメモリコントローラ、
13…ホストインターフェース(ホストI/F)、
14…バッファ管理モジュール、15…バッファメモリ(DRAM)、
16…マイクロプロセッサ(CPU)、20…入出力インターフェース、
21…メモリアクセスコントローラ、22…コントローラ、
23…ブロック管理モジュール、24…コンパクションモジュール、
30…ブロック検索モジュール、31…有効クラスタ数閾値算出モジュール、
32…コンパクションブロックリスト管理モジュール、
33…クラスタ検索モジュール、34…コマンドリスト生成モジュール、
35…コマンドリスト投入モジュール。
1 ... Host system, 10 ... SSD controller, 11 ... NAND flash memory,
12: Flash memory controller,
13: Host interface (host I / F),
14 ... Buffer management module, 15 ... Buffer memory (DRAM),
16 ... Microprocessor (CPU), 20 ... I / O interface,
21 ... Memory access controller, 22 ... Controller,
23 ... Block management module, 24 ... Compaction module,
30 ... Block search module, 31 ... Valid cluster count threshold calculation module,
32 ... Compaction block list management module,
33 ... Cluster search module, 34 ... Command list generation module,
35 ... Command list input module.

Claims (9)

ブロックをデータ消去単位とするフラッシュメモリと、
前記フラッシュメモリに対するコンパクション処理を実行するコンパクション処理手段を含むコントローラとを具備し、
前記コンパクション処理手段は、
前記フラッシュメモリの使用可能な記憶容量及びブロック内の有効データ量に基づいてブロック内の有効データ量の閾値を算出し、前記使用可能な記憶容量の変動に応じて前記閾値を更新した最新の閾値を算出する閾値算出手段と、
前記閾値算出手段から取得した前記最新の閾値に基づいて相対的に有効データ量が少ないブロックを、前記コンパクション処理の対象ブロックとして検索する検索手段と
を有するデータ記憶装置。
Flash memory with blocks as data erasure units;
A controller including compaction processing means for performing compaction processing on the flash memory,
The compaction processing means includes
The threshold value of the effective data amount in the block is calculated based on the usable storage capacity of the flash memory and the effective data amount in the block, and the threshold value is updated according to the change in the usable storage capacity. Threshold calculation means for calculating
A data storage device comprising: search means for searching for a block having a relatively small effective data amount as a target block for the compaction processing based on the latest threshold value acquired from the threshold value calculation means .
前記閾値算出手段は、
前記使用可能な記憶容量の割合を示す余裕率と前記閾値を算出するための有効データ密度とを対応付けしたテーブル情報を有し、
前記テーブル情報を参照し、前記余裕率の変動に応じた前記有効データ密度から前記最新の閾値を算出する請求項1に記載のデータ記憶装置。
The threshold calculation means includes
Table information in which a margin ratio indicating a ratio of the usable storage capacity is associated with an effective data density for calculating the threshold;
The data storage device according to claim 1, wherein the latest threshold value is calculated from the effective data density according to the fluctuation of the margin ratio with reference to the table information .
前記閾値算出手段は、前記閾値を記憶するメモリ手段を有し、前記メモリ手段に記憶した閾値を前記余裕率の変動に応じて更新し、
前記検索手段は、前記閾値算出手段から前記メモリ手段に記憶されている最新の閾値を取得し、前記最新の閾値に基づいて前記コンパクション処理の対象ブロックを検索する請求項2に記載のデータ記憶装置。
The threshold value calculation means includes a memory means for storing the threshold value, and updates the threshold value stored in the memory means in accordance with a change in the margin ratio,
3. The data storage device according to claim 2, wherein the retrieval unit obtains a latest threshold value stored in the memory unit from the threshold value calculation unit, and retrieves a target block for the compaction process based on the latest threshold value. .
前記閾値算出手段は、
前記フラッシュメモリの使用可能なブロック群の平均有効データ量を算出し、当該平均値に基づいて前記最新の閾値を算出する請求項1に記載のデータ記憶装置。
The threshold calculation means includes
The data storage device according to claim 1, wherein an average effective data amount of a usable block group of the flash memory is calculated, and the latest threshold value is calculated based on the average value .
前記検索手段は、
前記最新の閾値より小さい有効データ量の各ブロックの中で、前記有効データ量の小さい順に所定数のブロックを、前記コンパクション処理の対象ブロックとして選定する請求項1から請求項4のいずれか1項に記載のデータ記憶装置。
The search means includes
5. The block according to claim 1, wherein a predetermined number of blocks are selected as target blocks of the compaction process in order of increasing effective data amount among the blocks having an effective data amount smaller than the latest threshold value. The data storage device described in 1.
前記コントローラは、
前記コンパクション処理手段により検索されたコンパクション処理の対象ブロックに対して前記コンパクション処理を実行するコンパクション処理実行手段を有し、
前記コンパクション処理実行手段は、
前記コンパクション処理の対象ブロックから有効データを検索し、
前記有効データを他のブロックに書き直す請求項1から請求項5のいずれか1項に記載のデータ記憶装置。
The controller is
A compaction process executing means for executing the compaction process on a target block of the compaction process searched by the compaction processing means;
The compaction process execution means includes:
Search valid data from the target block of the compaction process,
The data storage device according to any one of claims 1 to 5, wherein the valid data is rewritten in another block .
前記コントローラは、
前記コンパクション処理実行手段による前記コンパクション処理の完了後に、前記コンパクション処理の対象ブロックを消去処理する手段と、
前記消去処理後の対象ブロックをフリーブロックとして管理するブロック管理手段とを有する請求項6に記載のデータ記憶装置。
The controller is
Means for erasing the target block of the compaction process after completion of the compaction process by the compaction process execution means;
The data storage device according to claim 6 , further comprising: a block management unit that manages the target block after the erasure process as a free block .
ブロックをデータ消去単位とするフラッシュメモリを使用するデータ記憶装置に適用するメモリ制御装置であって、
前記フラッシュメモリに対するコンパクション処理を実行するコンパクション処理手段を含むコントローラを具備し、
前記コンパクション処理手段は、
前記フラッシュメモリの使用可能な記憶容量及びブロック内の有効データ量に基づいてブロック内の有効データ量の閾値を算出し、前記使用可能な記憶容量の変動に応じて前記閾値を更新した最新の閾値を算出する閾値算出手段と、
前記閾値算出手段から取得した前記最新の閾値に基づいて相対的に有効データ量が少ないブロックを、前記コンパクション処理の対象ブロックとして検索する検索手段と
を有するメモリ制御装置
A memory control device applied to a data storage device using a flash memory whose block is a data erasure unit,
A controller including compaction processing means for performing compaction processing on the flash memory;
The compaction processing means includes
The threshold value of the effective data amount in the block is calculated based on the usable storage capacity of the flash memory and the effective data amount in the block, and the threshold value is updated according to the change in the usable storage capacity. Threshold calculation means for calculating
Search means for searching a block having a relatively small effective data amount as a target block of the compaction process based on the latest threshold acquired from the threshold calculation means;
A memory control device .
ブロックをデータ消去単位とするフラッシュメモリ及び前記フラッシュメモリに対するコンパクション処理を実行するコントローラを含むデータ記憶装置に適用するメモリ制御方法であって、
前記フラッシュメモリの使用可能な記憶容量及びブロック内の有効データ量に基づいてブロック内の有効データ量の閾値を算出し、
前記使用可能な記憶容量の変動に応じて前記閾値を更新した最新の閾値を算出し、
前記最新の閾値に基づいて相対的に有効データ量が少ないブロックを、前記コンパクション処理の対象ブロックとして検索するメモリ制御方法
A memory control method applied to a data storage device including a flash memory having a block as a data erasing unit and a controller for performing compaction processing on the flash memory,
Based on the usable storage capacity of the flash memory and the effective data amount in the block, the threshold of the effective data amount in the block is calculated,
Calculate the latest threshold updated the threshold according to the change in the usable storage capacity,
A memory control method for retrieving a block having a relatively small effective data amount as a target block of the compaction process based on the latest threshold .
JP2011167041A 2011-07-29 2011-07-29 Data storage device, memory control device, and memory control method Expired - Fee Related JP5579135B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2011167041A JP5579135B2 (en) 2011-07-29 2011-07-29 Data storage device, memory control device, and memory control method
US13/560,486 US8930614B2 (en) 2011-07-29 2012-07-27 Data storage apparatus and method for compaction processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011167041A JP5579135B2 (en) 2011-07-29 2011-07-29 Data storage device, memory control device, and memory control method

Publications (2)

Publication Number Publication Date
JP2013030081A JP2013030081A (en) 2013-02-07
JP5579135B2 true JP5579135B2 (en) 2014-08-27

Family

ID=47787049

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011167041A Expired - Fee Related JP5579135B2 (en) 2011-07-29 2011-07-29 Data storage device, memory control device, and memory control method

Country Status (1)

Country Link
JP (1) JP5579135B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10296455B2 (en) 2017-03-23 2019-05-21 Toshiba Memory Corporation Memory system and control method of nonvolatile memory

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015001909A (en) * 2013-06-17 2015-01-05 富士通株式会社 Information processor, control circuit, control program, and control method
JP6414852B2 (en) * 2015-12-14 2018-10-31 東芝メモリ株式会社 Memory system and control method
JP6443571B1 (en) 2018-02-02 2018-12-26 富士通株式会社 Storage control device, storage control method, and storage control program
JP2023044824A (en) 2021-09-21 2023-04-03 キオクシア株式会社 memory system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0704803B1 (en) * 1994-09-30 1997-03-05 Alcatel SEL Aktiengesellschaft Flash memory management method
RU2479013C2 (en) * 2007-10-05 2013-04-10 Кондусив Текнолоджиз Корпорэйшн Method of optimising solid-state drive and optimiser
US20090271562A1 (en) * 2008-04-25 2009-10-29 Sinclair Alan W Method and system for storage address re-mapping for a multi-bank memory device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10296455B2 (en) 2017-03-23 2019-05-21 Toshiba Memory Corporation Memory system and control method of nonvolatile memory

Also Published As

Publication number Publication date
JP2013030081A (en) 2013-02-07

Similar Documents

Publication Publication Date Title
US10761780B2 (en) Memory system
US8930614B2 (en) Data storage apparatus and method for compaction processing
JP5405513B2 (en) MEMORY SYSTEM, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY DEVICE CONTROL METHOD, AND PROGRAM
US9298534B2 (en) Memory system and constructing method of logical block
US9753653B2 (en) High-priority NAND operations management
JP4844639B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US8966205B1 (en) System data management using garbage collection and hybrid self mapping
JP2008015769A (en) Storage system and writing distribution method
US9442841B2 (en) Semiconductor memory device and method for logging monitored events into a buffer
JP6139381B2 (en) Memory system and method
CN110674056B (en) Garbage recovery method and device
US9361201B2 (en) Memory system and memory controller
US20200034081A1 (en) Apparatus and method for processing data in memory system
JP5579135B2 (en) Data storage device, memory control device, and memory control method
JP4666081B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US8037236B2 (en) Flash memory writing method and storage system and controller using the same
US8671257B2 (en) Memory system having multiple channels and method of generating read commands for compaction in memory system
US11016889B1 (en) Storage device with enhanced time to ready performance
CN116737064A (en) Data management method and system for solid state disk
US20190012260A1 (en) Flash memory package and storage system including flash memory package
US20150205538A1 (en) Storage apparatus and method for selecting storage area where data is written
US9304906B2 (en) Memory system, controller and control method of memory
JP2015053075A (en) Memory system, information processing device, and storage device
US20110264848A1 (en) Data recording device
JP5649709B2 (en) MEMORY SYSTEM, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY DEVICE CONTROL METHOD AND PROGRAM

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130905

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131205

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131212

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131219

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131226

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20140109

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140310

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140415

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140523

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140708

R151 Written notification of patent or utility model registration

Ref document number: 5579135

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees