JP2023138818A - Memory system and control method - Google Patents

Memory system and control method Download PDF

Info

Publication number
JP2023138818A
JP2023138818A JP2023131082A JP2023131082A JP2023138818A JP 2023138818 A JP2023138818 A JP 2023138818A JP 2023131082 A JP2023131082 A JP 2023131082A JP 2023131082 A JP2023131082 A JP 2023131082A JP 2023138818 A JP2023138818 A JP 2023138818A
Authority
JP
Japan
Prior art keywords
data
block
write
host
command
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2023131082A
Other languages
Japanese (ja)
Inventor
伸一 菅野
Shinichi Sugano
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
Priority claimed from JP2018175148A external-priority patent/JP7091203B2/en
Application filed by Kioxia Corp filed Critical Kioxia Corp
Priority to JP2023131082A priority Critical patent/JP2023138818A/en
Publication of JP2023138818A publication Critical patent/JP2023138818A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a memory system capable of improving I/O performance.SOLUTION: A memory system which can be connected to a host includes: a nonvolatile memory including a plurality of blocks; and a controller electrically connected to the nonvolatile memory to control the nonvolatile memory. The controller is configured, when receiving, from the host, a write instruction that designates a location on a memory of the host where write data exists, to write the write data acquired from the memory of the host to the nonvolatile memory, and control a notification to the host regarding the write instruction, when receiving, from the host, a read instruction to read the write data on the memory of the host, so that the write data on the memory of the host may not be discarded.SELECTED DRAWING: Figure 50

Description

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

近年、不揮発性メモリを備えるメモリシステムが広く普及している。
このようなメモリシステムの一つとして、NANDフラッシュ技術ベースのソリッドステートドライブ(SSD)が知られている。
最近では、ホストとストレージとの間の新たなインタフェースが提案され始めている。
In recent years, memory systems including nonvolatile memory have become widespread.
As one such memory system, a solid state drive (SSD) based on NAND flash technology is known.
Recently, new interfaces between hosts and storage have begun to be proposed.

Yiying Zhang, 外, "De-indirection for flash-based SSDs with nameless writes." FAST. 2012, [online], [平成29年9月13日検索], インターネット<URL: https://www.usenix.org/system/files/conference/fast12/zhang.pdf>Yiying Zhang, outside, "De-indirection for flash-based SSDs with nameless writes." FAST. 2012, [online], [Retrieved September 13, 2017], Internet <URL: https://www.usenix. org/system/files/conference/fast12/zhang.pdf>

しかし、一般に、NAND型フラッシュメモリの制御は複雑であるため、I/O性能を改善するための新たなインタフェースの実現に際しては、ホストとストレージ(メモリシステム)との間の適切な役割分担を考慮することが必要とされる。
本発明が解決しようとする課題は、I/O性能の改善を図ることができるメモリシステムおよび制御方法を提供することである。
However, in general, controlling NAND flash memory is complex, so when creating a new interface to improve I/O performance, it is necessary to consider appropriate division of roles between the host and storage (memory system). It is necessary to do so.
An object of the present invention is to provide a memory system and control method that can improve I/O performance.

実施形態によれば、ホストに接続可能なメモリシステムは、複数のブロックを含む不揮発性メモリと、前記不揮発性メモリに電気的に接続され、前記不揮発性メモリを制御するコントローラとを含む。前記コントローラは、書き込むべきライトデータが存在する前記ホストのメモリ上の位置を指定する書き込み命令を前記ホストから受信した場合、前記ライトデータを前記ホストのメモリから取得して前記不揮発性メモリに書き込み、前記ホストのメモリ上の前記ライトデータが対象となる読み出し命令を前記ホストから受信した場合、前記ホストのメモリ上の前記ライトデータが破棄されないように前記書き込み命令に関する前記ホストに対する通知を制御する。 According to an embodiment, a memory system connectable to a host includes a non-volatile memory including a plurality of blocks, and a controller electrically connected to the non-volatile memory and controlling the non-volatile memory. When the controller receives a write command from the host that specifies a location in the host's memory where write data to be written exists, the controller obtains the write data from the host's memory and writes it to the nonvolatile memory; When a read command that targets the write data on the memory of the host is received from the host, notification to the host regarding the write command is controlled so that the write data on the memory of the host is not discarded.

ホストと実施形態のメモリシステム(フラッシュストレージデバイス)との関係を示すブロック図。FIG. 2 is a block diagram showing the relationship between a host and a memory system (flash storage device) according to an embodiment. 従来型SSDとホストとの間の役割分担と、同実施形態のフラッシュストレージデバイスとホストとの間の役割分担とを説明するための図。FIG. 3 is a diagram for explaining the division of roles between a conventional SSD and a host, and the division of roles between a flash storage device and a host according to the same embodiment. 複数のホストと複数のフラッシュストレージデバイスとの間のデータ転送がネットワーク機器を介して実行される計算機システムの構成例を示すブロック図。1 is a block diagram illustrating a configuration example of a computer system in which data transfer between multiple hosts and multiple flash storage devices is performed via network equipment. 同実施形態のメモリシステムの構成例を示すブロック図。FIG. 2 is a block diagram showing a configuration example of a memory system according to the embodiment. 同実施形態のメモリシステムに設けられたNANDインタフェースと複数のNAND型フラッシュメモリダイとの関係を示すブロック図。FIG. 3 is a block diagram showing the relationship between a NAND interface provided in the memory system of the embodiment and a plurality of NAND flash memory dies. 複数のブロックの集合によって構築されるスーパーブロックの構成例を示す図。The figure which shows the example of a structure of the super block constructed|assembled by the set of several blocks. ホストが論理アドレスとブロック番号とを指定し且つ同実施形態のメモリシステムがブロック内物理アドレス(ブロック内オフセット)を決定するデータ書き込み動作と、ホストがブロック番号とブロック内物理アドレス(ブロック内オフセット)とを指定するデータ読み出し動作とを説明するための図。A data write operation in which the host specifies a logical address and a block number and the memory system of the same embodiment determines a physical address within a block (intra-block offset), and a data write operation in which the host specifies a block number and a physical address within a block (intra-block offset). FIG. 3 is a diagram for explaining a data read operation specifying a 同実施形態のメモリシステムに適用されるライトコマンドを説明するための図。FIG. 3 is a diagram for explaining a write command applied to the memory system of the embodiment. 図8のライトコマンドに対するレスポンスを説明するための図。FIG. 9 is a diagram for explaining a response to the write command in FIG. 8; 同実施形態のメモリシステムに適用されるTrimコマンドを説明するための図。FIG. 7 is a diagram for explaining a Trim command applied to the memory system of the embodiment. 物理アドレスを表す、ブロック番号およびオフセットを説明するための図。A diagram for explaining block numbers and offsets representing physical addresses. ライトコマンドに応じて実行される書き込み動作を説明するための図。FIG. 3 is a diagram for explaining a write operation executed in response to a write command. 不良ページをスキップする書き込み動作を説明するための図。FIG. 3 is a diagram for explaining a write operation that skips a bad page. 不良ページをスキップする書き込み動作の別の例を説明するための図。FIG. 7 is a diagram for explaining another example of a write operation that skips a bad page. 論理アドレスとデータのペアをブロック内のページに書き込む動作を説明するための図。A diagram for explaining the operation of writing a logical address and data pair to a page within a block. データをブロック内のページのユーザデータ領域に書き込み、このデータの論理アドレスをこのページの冗長領域に書き込む動作を説明するための図。FIG. 3 is a diagram for explaining the operation of writing data to a user data area of a page in a block and writing a logical address of this data to a redundant area of this page. スーパーブロックが使用される場合におけるブロック番号とオフセットとの関係を説明するための図。FIG. 3 is a diagram for explaining the relationship between block numbers and offsets when super blocks are used. 同実施形態のメモリシステムに適用される最大ブロック番号ゲットコマンドを説明するための図。FIG. 3 is a diagram for explaining a maximum block number get command applied to the memory system of the embodiment. 最大ブロック番号ゲットコマンドに対するレスポンスを説明するための図。FIG. 7 is a diagram for explaining a response to a maximum block number get command. 同実施形態のメモリシステムに適用されるブロックサイズゲットコマンドを説明するための図。FIG. 3 is a diagram for explaining a block size get command applied to the memory system of the embodiment.

ブロックサイズゲットコマンドに対するレスポンスを説明するための図。A diagram for explaining a response to a block size get command. 同実施形態のメモリシステムに適用されるブロックアロケートコマンド(ブロック割り当て要求)を説明するための図。FIG. 3 is a diagram for explaining a block allocation command (block allocation request) applied to the memory system of the embodiment. ブロックアロケートコマンドに対するレスポンスを説明するための図。FIG. 3 is a diagram for explaining a response to a block allocate command. ホストと同実施形態のメモリシステムとによって実行されるブロック情報取得処理を示すシーケンスチャート。7 is a sequence chart showing block information acquisition processing executed by a host and a memory system of the same embodiment. ホストと同実施形態のメモリシステムとによって実行される書き込み処理のシーケンスを示すシーケンスチャート。5 is a sequence chart showing a sequence of write processing executed by a host and a memory system of the same embodiment. すでに書き込まれているデータに対する更新データを書き込むデータ更新動作を示す図。FIG. 7 is a diagram showing a data update operation of writing update data to data that has already been written. 同実施形態のメモリシステムによって管理されるブロック管理テーブルを更新する動作を説明するための図。FIG. 7 is a diagram for explaining an operation of updating a block management table managed by the memory system of the embodiment. ホストによって管理されるルックアップテーブル(論理物理アドレス変換テーブル)を更新する動作を説明するための図。FIG. 3 is a diagram for explaining the operation of updating a lookup table (logical-physical address translation table) managed by a host. 無効化すべきデータに対応するブロック番号および物理アドレスを示すホストからの通知に応じてブロック管理テーブルを更新する動作を説明するための図。FIG. 3 is a diagram for explaining an operation of updating a block management table in response to a notification from a host indicating a block number and physical address corresponding to data to be invalidated. 同実施形態のメモリシステムに適用されるリードコマンドを説明するための図。FIG. 3 is a diagram for explaining a read command applied to the memory system of the same embodiment. 同実施形態のメモリシステムによって実行されるリード動作を説明するための図。FIG. 4 is a diagram for explaining a read operation executed by the memory system of the embodiment. ホストからのリードコマンドに応じて、異なる物理記憶位置にそれぞれ格納されているデータ部をリードする動作を説明するための図。FIG. 3 is a diagram for explaining an operation of reading data portions stored in different physical storage locations in response to a read command from a host. ホストと同実施形態のメモリシステムとによって実行されるリード処理のシーケンスを示すシーケンスチャート。5 is a sequence chart showing a sequence of read processing executed by a host and a memory system of the same embodiment. 同実施形態のメモリシステムに適用されるガベージコレクション(GC)制御コマンドを説明するための図。FIG. 3 is a diagram for explaining garbage collection (GC) control commands applied to the memory system of the embodiment. 同実施形態のメモリシステムに適用されるGC用コールバックコマンドを説明するための図。FIG. 3 is a diagram for explaining a GC callback command applied to the memory system of the embodiment. ホストと同実施形態のメモリシステムとによって実行されるガベージコレクション(GC)動作の手順を示すシーケンスチャート。5 is a sequence chart showing the procedure of a garbage collection (GC) operation executed by the host and the memory system of the same embodiment. ガベージコレクション(GC)のために実行されるデータコピー動作の例を説明するための図。FIG. 3 is a diagram for explaining an example of a data copy operation executed for garbage collection (GC). 図37のデータコピー動作の結果に基づいて更新されるホストのルックアップテーブルの内容を説明するための図。FIG. 38 is a diagram for explaining the contents of a host lookup table that is updated based on the result of the data copy operation in FIG. 37; ホストと同実施形態のメモリシステムとのシステムアーキテクチャを示す図。FIG. 3 is a diagram showing a system architecture of a host and a memory system of the same embodiment. 同実施形態のメモリシステム上における仮想ストレージデバイスの定義例を示す図。FIG. 3 is a diagram showing an example of definition of a virtual storage device on the memory system of the embodiment.

同実施形態のメモリシステム上において仮想ストレージデバイス毎にQoSドメインが管理される例を示す図。FIG. 6 is a diagram illustrating an example in which QoS domains are managed for each virtual storage device on the memory system of the embodiment. 同実施形態のメモリシステムのブロックリユースコマンド受信時におけるフラッシュストレージデバイス3の動作手順(第1ケース)を示すフローチャート。7 is a flowchart showing the operation procedure (first case) of the flash storage device 3 when receiving a block reuse command in the memory system of the same embodiment. 同実施形態のメモリシステムのブロックリユースコマンド受信時におけるフラッシュストレージデバイス3の動作手順(第2ケース)を示すフローチャート。7 is a flowchart showing the operation procedure (second case) of the flash storage device 3 when receiving a block reuse command in the memory system of the same embodiment. 同実施形態のメモリシステムによって実行されるI/Oコマンド処理を説明するためのブロック図。FIG. 3 is a block diagram for explaining I/O command processing executed by the memory system of the embodiment. 同実施形態のメモリシステムによって実行される複数段階の書き込み動作を説明するための図。FIG. 3 is a diagram for explaining a multi-stage write operation executed by the memory system of the embodiment. 同実施形態のメモリシステム内のある書き込み先ブロックへのデータの書き込み順序を説明するための図。FIG. 3 is a diagram for explaining the order of writing data to a certain write destination block in the memory system of the same embodiment. 不揮発性メモリのデータ書き込み単位と同じサイズの単位でライトデータをホストから同実施形態のメモリシステムに転送する動作を説明するための図。FIG. 3 is a diagram for explaining the operation of transferring write data from the host to the memory system of the embodiment in units of the same size as data write units of the nonvolatile memory. 同実施形態のメモリシステムによって実行されるデータ書き込み処理の手順を示すフローチャート。7 is a flowchart showing the procedure of data write processing executed by the memory system of the embodiment. 同実施形態のメモリシステムによって実行されるデータ書き込み処理の別の手順を示すフローチャート。7 is a flowchart showing another procedure of data write processing executed by the memory system of the same embodiment. 同実施形態のメモリシステムによって実行されるホストへの解放可能通知の送信処理の手順を示すフローチャート。7 is a flowchart illustrating a process of transmitting a releasable notification to a host, which is executed by the memory system of the embodiment. ホストによって実行されるライトデータ破棄処理の手順を示すフローチャート。7 is a flowchart showing the procedure of write data discard processing executed by the host. 最後のライトコマンドが受信されてから閾期間、次のライトコマンドが受信されない場合に、同実施形態のメモリシステムによって実行されるダミーデータ書き込み処理を説明するための図。FIG. 6 is a diagram for explaining dummy data write processing executed by the memory system of the embodiment when the next write command is not received for a threshold period after the last write command is received. 同実施形態のメモリシステムによって実行されるダミーデータ書き込み処理の手順を示すフローチャート。5 is a flowchart showing the procedure of dummy data write processing executed by the memory system of the embodiment. 内部バッファを使用して同実施形態のメモリシステムによって実行されるデータ転送動作を示すブロック図。FIG. 3 is a block diagram illustrating data transfer operations performed by the memory system of the embodiment using internal buffers. 内部バッファを使用して同実施形態のメモリシステムによって実行されるデータ書き込み処理の手順を示すフローチャート。7 is a flowchart illustrating the procedure of a data write process executed by the memory system of the embodiment using an internal buffer. 同実施形態のメモリシステムによって実行されるデータ読み出し処理の手順を示すフローチャート。5 is a flowchart showing the procedure of data read processing executed by the memory system of the embodiment. 同実施形態のメモリシステムに適用されるブロックリユースコマンドコマンドを説明するための図。FIG. 3 is a diagram for explaining a block reuse command applied to the memory system of the embodiment. 同実施形態のメモリシステムに適用されるライトコマンドの別の例を説明するための図。FIG. 6 is a diagram for explaining another example of a write command applied to the memory system of the embodiment. 図58のライトコマンドに対するレスポンスを説明するための図。FIG. 59 is a diagram for explaining a response to the write command in FIG. 58; ホストと同実施形態のメモリシステムとによって実行される書き込み動作処理のシーケンスの別の例を示すシーケンスチャート。7 is a sequence chart showing another example of a write operation processing sequence executed by the host and the memory system of the same embodiment.

同実施形態のメモリシステムに適用されるガベージコレクション(GC)制御コマンドの別の例を説明するための図。FIG. 6 is a diagram for explaining another example of a garbage collection (GC) control command applied to the memory system of the embodiment. 同実施形態のメモリシステムによって実行されるガベージコレクション(GC)動作の手順の別の例を示すシーケンスチャート。7 is a sequence chart illustrating another example of a garbage collection (GC) operation procedure executed by the memory system of the embodiment. 同実施形態のメモリシステムにおける書き込み先ブロックの割り当ての手順を示すフローチャート。5 is a flowchart showing a procedure for allocating a write destination block in the memory system of the embodiment. 同実施形態のメモリシステムにおけるGCデスティネーションブロックの割り当ての手順を示すフローチャート。7 is a flowchart showing a procedure for allocating a GC destination block in the memory system of the embodiment.

以下、図面を参照して、実施形態を説明する。
まず、図1を参照して、一実施形態に係るメモリシステムを含む計算機システムの構成を説明する。
このメモリシステムは、不揮発性メモリにデータを書き込み、不揮発性メモリからデータを読み出すように構成された半導体ストレージデバイスである。このメモリシステムは、NANDフラッシュ技術ベースのフラッシュストレージデバイス3として実現されている。
Hereinafter, embodiments will be described with reference to the drawings.
First, with reference to FIG. 1, the configuration of a computer system including a memory system according to an embodiment will be described.
The memory system is a semiconductor storage device configured to write data to and read data from non-volatile memory. This memory system is realized as a flash storage device 3 based on NAND flash technology.

この計算機システムは、ホスト(ホストデバイス)2と、複数のフラッシュストレージデバイス3とを含んでいてもよい。ホスト2は、複数のフラッシュストレージデバイス3によって構成されるフラッシュアレイをストレージとして使用するように構成されたサーバであってもよい。ホスト(サーバ)2と複数のフラッシュストレージデバイス3は、インタフェース50を介して相互接続される(内部相互接続)。この内部相互接続のためのインタフェース50としては、これに限定されないが、PCI Express(PCIe)(登録商標)、NVM Express(NVMe)(登録商標)、Ethernet(登録商標)、NVMe over Fabrics(NVMeOF)等を使用し得る。 This computer system may include a host (host device) 2 and a plurality of flash storage devices 3. The host 2 may be a server configured to use a flash array configured by a plurality of flash storage devices 3 as storage. The host (server) 2 and the plurality of flash storage devices 3 are interconnected via an interface 50 (internal interconnection). Examples of the interface 50 for this internal interconnection include, but are not limited to, PCI Express (PCIe) (registered trademark), NVM Express (NVMe) (registered trademark), Ethernet (registered trademark), and NVMe over Fabrics (NVMeOF). etc. can be used.

ホスト2として機能するサーバの典型例としては、データセンター内のサーバが挙げられる。
ホスト2がデータセンター内のサーバによって実現されるケースにおいては、このホスト(サーバ)2は、ネットワーク51を介して複数のエンドユーザ端末(クライアント)61に接続されてもよい。ホスト2は、これらエンドユーザ端末61に対して様々なサービスを提供することができる。
A typical example of a server functioning as the host 2 is a server in a data center.
In the case where the host 2 is realized by a server in a data center, the host (server) 2 may be connected to a plurality of end user terminals (clients) 61 via the network 51. The host 2 can provide various services to these end user terminals 61.

ホスト(サーバ)2によって提供可能なサービスの例には、(1)システム稼働プラットフォームを各クライアント(各エンドユーザ端末61)に提供するプラットホーム・アズ・ア・サービス(PaaS)、(2)仮想サーバのようなインフラストラクチャを各クライアント(各エンドユーザ端末61)に提供するインフラストラクチャ・アズ・ア・サービス(IaaS)、等がある。 Examples of services that can be provided by the host (server) 2 include (1) platform as a service (PaaS) that provides a system operating platform to each client (each end user terminal 61), (2) virtual server. There is infrastructure as a service (IaaS), etc., which provides infrastructure such as this to each client (each end user terminal 61).

複数の仮想マシンが、このホスト(サーバ)2として機能する物理サーバ上で実行されてもよい。ホスト(サーバ)2上で走るこれら仮想マシンの各々は、対応する幾つかのクライアント(エンドユーザ端末61)に各種サービスを提供するように構成された仮想サーバとして機能することができる。 Multiple virtual machines may be executed on this physical server functioning as the host (server) 2. Each of these virtual machines running on the host (server) 2 can function as a virtual server configured to provide various services to several corresponding clients (end user terminals 61).

ホスト(サーバ)2は、フラッシュアレイを構成する複数のフラッシュストレージデバイス3を管理するストレージ管理機能と、エンドユーザ端末61それぞれに対してストレージアクセスを含む様々なサービスを提供するフロントエンド機能とを含む。
従来型SSDにおいては、NAND型フラッシュメモリのブロック/ページの階層構造はSSD内のフラッシュトランスレーション層(FTL)によって隠蔽されている。つまり、従来型SSDのFTLは、(1)論理物理アドレス変換テーブルとして機能するルックアップテーブルを使用して、論理アドレスそれぞれとNAND型フラッシュメモリの物理アドレスそれぞれとの間のマッピングを管理する機能、(2)ページ単位のリード/ライトとブロック単位の消去動作とを隠蔽するための機能、(3)NAND型フラッシュメモリのガベージコレクション(GC)を実行する機能、等を有している。論理アドレスそれぞれとNAND型フラッシュメモリの物理アドレスとの間のマッピングは、ホストからは見えない。NAND型フラッシュメモリのブロック/ページ構造もホストからは見えない。
The host (server) 2 includes a storage management function that manages a plurality of flash storage devices 3 that constitute a flash array, and a front end function that provides various services including storage access to each end user terminal 61. .
In conventional SSDs, the block/page hierarchy of NAND flash memory is hidden by a flash translation layer (FTL) within the SSD. In other words, the FTL of a conventional SSD includes (1) the ability to manage the mapping between each logical address and each physical address of the NAND flash memory using a lookup table that functions as a logical-physical address translation table; It has (2) a function to hide read/write operations in page units and erase operations in block units, and (3) a function to execute garbage collection (GC) of NAND flash memory. The mapping between each logical address and the physical address of the NAND flash memory is invisible to the host. The block/page structure of the NAND flash memory is also invisible to the host.

一方、ホストにおいても、一種のアドレス変換(アプリケーションレベルアドレス変換)が実行されることがある。このアドレス変換は、アプリケーションレベルアドレス変換テーブルを使用して、アプリケーションレベルの論理アドレスそれぞれとSSD用の論理アドレスそれぞれとの間のマッピングを管理する。また、ホストにおいても、SSD用の論理アドレス空間上に生じるフラグメントの解消のために、この論理アドレス空間上のデータ配置を変更する一種のGC(アプリケーションレベルGC)が実行される。 On the other hand, a type of address translation (application level address translation) may also be executed in the host. This address translation uses an application level address translation table to manage the mapping between each application level logical address and each logical address for the SSD. Also, in the host, a type of GC (application level GC) is executed to change the data arrangement on the logical address space for the SSD in order to eliminate fragments occurring on the logical address space for the SSD.

しかし、ホストおよびSSDがそれぞれアドレス変換テーブルを有するという冗長な構成(SSDは論理物理アドレス変換テーブルとして機能するルックアップテーブルを有し、ホストはアプリケーションレベルアドレス変換テーブルを有する)においては、これらアドレス変換テーブルを保持するために膨大なメモリリソースが消費される。さらに、ホスト側のアドレス変換とSSD側のアドレス変換とを含む2重のアドレス変換は、I/O性能を低下させる要因にもなる。 However, in a redundant configuration where the host and SSD each have an address translation table (the SSD has a lookup table that functions as a logical-physical address translation table, and the host has an application-level address translation table), these address translations Huge memory resources are consumed to maintain the table. Furthermore, double address translation, including address translation on the host side and address translation on the SSD side, is also a factor that reduces I/O performance.

さらに、ホスト側のアプリケーションレベルGCは、SSDへのデータ書き込み量を実際のユーザデータ量の数倍(例えば2倍)程度に増やす要因となる。このようなデータ書き込み量の増加は、SSDのライトアンプリフィケーションとあいまってシステム全体のストレージ性能を低下させ、またSSDの寿命も短くする。 Furthermore, the application level GC on the host side becomes a factor that increases the amount of data written to the SSD to several times (for example, twice) the actual amount of user data. Such an increase in the amount of data written, together with write amplification of the SSD, reduces the storage performance of the entire system and also shortens the life of the SSD.

このような問題点を解消するために、従来型SSDのFTLの機能の全てをホストに移すという対策も考えられる。
しかし、この対策を実装するためには、NAND型フラッシュメモリのブロックおよびページをホストが直接的にハンドリングすることが必要となる。NAND型フラッシュメモリにおいては、ページ書き込み順序制約があるため、ホストがページを直接ハンドリングすることは困難である。また、NAND型フラッシュメモリにおいては、ブロックが不良ページ(バッドページ)を含む場合がある。バッドページをハンドリングすることはホストにとってはなおさら困難である。
In order to solve these problems, one possible measure is to move all of the FTL functions of the conventional SSD to the host.
However, in order to implement this measure, it is necessary for the host to directly handle blocks and pages of the NAND flash memory. In a NAND flash memory, there are page write order restrictions, so it is difficult for a host to directly handle pages. Furthermore, in a NAND flash memory, a block may include a defective page (bad page). Handling bad pages is even more difficult for hosts.

そこで、本実施形態では、FTLの役割はホスト2とフラッシュストレージデバイス3との間で分担される。概していえば、ホスト2は論理物理アドレス変換テーブルとして機能するルックアップテーブルを管理するが、ホスト2はデータが書き込まれるべきブロックのブロック番号とこのデータに対応する論理アドレスだけを指定し、このデータが書き込まれるべきこのブロック内の位置(書き込み先位置)はフラッシュストレージデバイス3によって決定される。決定されたこのブロック内の位置(書き込み先位置)を示すブロック内物理アドレスは、フラッシュストレージデバイス3からホスト2に通知される。 Therefore, in this embodiment, the role of FTL is shared between the host 2 and the flash storage device 3. Generally speaking, the host 2 manages a lookup table that functions as a logical-physical address translation table, but the host 2 only specifies the block number of the block into which data is to be written and the logical address corresponding to this data, and The location within this block (destination location) to which is to be written is determined by the flash storage device 3. The host 2 is notified from the flash storage device 3 of the physical address within the block indicating the determined position within the block (write destination position).

このように、ホスト2はブロックのみをハンドリングし、ブロック内の位置(例えば、ページ、ページ内の位置)はフラッシュストレージデバイス3によってハンドリングされる。
フラッシュストレージデバイス3にデータを書き込む必要がある時、ホスト2は、ブロック番号を選択(またはフラッシュストレージデバイス3にフリーブロックを割り当てるように要求)し、論理アドレスと、選択したブロックのブロック番号(またはフラッシュストレージデバイス3によって通知される割り当てられたブロックのブロック番号)とを指定するライト要求(ライトコマンド)をフラッシュストレージデバイス3に送信する。フラッシュストレージデバイス3は、指定されたブロック番号を有するブロックにホスト2からのデータを書き込む。この場合、フラッシュストレージデバイス3は、このブロック内の位置(書き込み先位置)を決定し、ホスト2からのデータをこのブロック内の位置(書き込み先位置)に書き込む。そして、フラッシュストレージデバイス3は、このブロック内の位置(書き込み先位置)を示すブロック内物理アドレスを、ライト要求に対するレスポンス(返り値)としてホスト2に通知する。以下では、ホスト2に移されたFTL機能をグローバルFTLと称する。
In this way, the host 2 only handles blocks, and positions within blocks (eg, pages, positions within pages) are handled by the flash storage device 3.
When the host 2 needs to write data to the flash storage device 3, it selects a block number (or requests the flash storage device 3 to allocate a free block) and writes the logical address and block number of the selected block (or A write request (write command) specifying the block number of the allocated block notified by the flash storage device 3 is sent to the flash storage device 3. The flash storage device 3 writes data from the host 2 to the block having the specified block number. In this case, the flash storage device 3 determines a position within this block (write destination position) and writes the data from the host 2 to the position within this block (write destination position). Then, the flash storage device 3 notifies the host 2 of the physical address within the block indicating the position within the block (write destination position) as a response (return value) to the write request. In the following, the FTL function transferred to host 2 will be referred to as global FTL.

ホスト2のグローバルFTLは、ストレージサービスを実行する機能、ウェアー制御機能、高可用性を実現するための機能、同じ内容を有する複数の重複データ部がストレージに格納されることを防止する重複排除(De-duplication)機能、ガベージコレクション(GC)ブロック選択機能、QoS制御機能等を有する。QoS制御機能には、QoSドメイン毎(またはブロック毎)にアクセス単位を決める機能が含まれる。アクセス単位は、ホスト2がライト/リードすることが可能な最小データサイズ(Grain)を示す。フラッシュストレージデバイス3は単一、あるいは複数のアクセス単位(Grain)をサポートしており、ホスト2は、フラッシュストレージデバイス3が複数のアクセス単位をサポートしている場合にはQoSドメイン毎(またはブロック毎)に、使用すべきアクセス単位をフラッシュストレージデバイス3に指示することができる。 The global FTL of host 2 includes a function to execute storage services, a software control function, a function to realize high availability, and deduplication (Deduplication) to prevent multiple duplicate data parts with the same content from being stored in the storage. -duplication) function, garbage collection (GC) block selection function, QoS control function, etc. The QoS control function includes a function of determining access units for each QoS domain (or each block). The access unit indicates the minimum data size (grain) that the host 2 can write/read. The flash storage device 3 supports single or multiple access units (grain), and the host 2 can perform QoS for each domain (or for each block) if the flash storage device 3 supports multiple access units (grain). ), it is possible to instruct the flash storage device 3 which access unit to use.

また、QoS制御機能には、QoSドメイン間の性能干渉をできるだけ防ぐための機能が含まれている。この機能は、基本的には、安定したレイテンシを保つための機能である。
一方、フラッシュストレージデバイス3は、ローレベルアブストラクション(LLA)を実行することができる。LLAはNAND型フラッシュメモリのアブストラクションのための機能である。LLAは、不良ページ(バッドページ)を隠蔽する機能、ページ書き込み順序制約を守る機能を含む。LLAは、GC実行機能も含む。GC実行機能は、ホスト2によって指定されたコピー元ブロック(GCソースブロック)内の有効データを、ホスト2によって指定されたコピー先ブロック(GCデスティネーションブロック)にコピーする。フラッシュストレージデバイス3のGC実行機能は、有効データを書き込むべきGCデスティネーションブロック内の位置(コピー先位置)を決定し、GCソースブロック内の有効データを、GCデスティネーションブロック内のコピー先位置にコピーする。
Furthermore, the QoS control function includes a function to prevent performance interference between QoS domains as much as possible. This function is basically a function to maintain stable latency.
On the other hand, the flash storage device 3 is capable of performing low level abstraction (LLA). LLA is a function for abstracting NAND flash memory. LLA includes a function to hide bad pages and a function to protect page write order constraints. LLA also includes GC execution functions. The GC execution function copies valid data in a copy source block (GC source block) specified by the host 2 to a copy destination block (GC destination block) specified by the host 2. The GC execution function of the flash storage device 3 determines the position (copy destination position) in the GC destination block where valid data is to be written, and writes the valid data in the GC source block to the copy destination position in the GC destination block. make a copy.

図2は、従来型SSDとホストとの間の役割分担と、本実施形態のフラッシュストレージデバイス3とホスト2との間の役割分担とを示す。
図2の左部は、従来型SSDと仮想ディスクサービスを実行するホストとを含む計算機システム全体の階層構造を表している。
FIG. 2 shows the division of roles between the conventional SSD and the host and the division of roles between the flash storage device 3 and the host 2 of this embodiment.
The left side of FIG. 2 represents the hierarchical structure of the entire computer system including a conventional SSD and a host that executes a virtual disk service.

ホスト(サーバ)においては、複数のエンドユーザに複数の仮想マシンを提供するための仮想マシンサービス101が実行される。仮想マシンサービス101上の各仮想マシンにおいては、対応するエンドユーザによって使用されるオペレーティングシステムおよびユーザアプリケーション102が実行される。 A virtual machine service 101 for providing multiple virtual machines to multiple end users is executed on the host (server). Each virtual machine on the virtual machine service 101 executes an operating system and user application 102 used by a corresponding end user.

また、ホスト(サーバ)においては、複数のユーザアプリケーション102に対応する複数の仮想ディスクサービス103が実行される。各仮想ディスクサービス103は、従来型SSD内のストレージリソースの容量の一部を、対応するユーザアプリケーション102用のストレージリソース(仮想ディスク)として割り当てる。各仮想ディスクサービス103においては、アプリケーションレベルアドレス変換テーブルを使用して、アプリケーションレベルの論理アドレスをSSD用の論理アドレスに変換するアプリケーションレベルアドレス変換も実行される。さらに、ホストにおいては、アプリケーションレベルGC104も実行される。 Further, in the host (server), a plurality of virtual disk services 103 corresponding to a plurality of user applications 102 are executed. Each virtual disk service 103 allocates a portion of the storage resource capacity in the conventional SSD as a storage resource (virtual disk) for the corresponding user application 102. In each virtual disk service 103, application level address translation is also performed to convert an application level logical address into a logical address for SSD using an application level address translation table. Furthermore, an application level GC 104 is also executed in the host.

ホスト(サーバ)から従来型SSDへのコマンドの送信および従来型SSDからホスト(サーバ)へのコマンド完了のレスポンスの返送は、ホスト(サーバ)および従来型SSDの各々に存在するI/Oキュー200を介して実行される。
従来型SSDは、ライトバッファ(WB)301、ルックアップテーブル(LUT)302、ガベージコレクション機能303、NAND型フラッシュメモリ(NANDフラッシュアレイ)304を含む。従来型SSDは、一つのルックアップテーブル(LUT)302のみを管理しており、NAND型フラッシュメモリ(NANDフラッシュアレイ)304のリソースは複数の仮想ディスクサービス103によって共有される。
Sending commands from the host (server) to the conventional SSD and returning command completion responses from the conventional SSD to the host (server) are performed using the I/O queue 200 that exists in each of the host (server) and the conventional SSD. is executed via.
The conventional SSD includes a write buffer (WB) 301, a look-up table (LUT) 302, a garbage collection function 303, and a NAND flash memory (NAND flash array) 304. A conventional SSD manages only one lookup table (LUT) 302, and the resources of a NAND flash memory (NAND flash array) 304 are shared by multiple virtual disk services 103.

この構成においては、仮想ディスクサービス103下のアプリケーションレベルGC104と従来型SSD内のガベージコレクション機能303(LUTレベルGC)とを含む重複したGCにより、ライトアンプリフィケーションが大きくなる。また、従来型SSDにおいては、あるエンドユーザまたはある仮想ディスクサービス103からのデータ書き込み量の増加によってGCの頻度が増加し、これによって他のエンドユーザまたは他の仮想ディスクサービス103に対するI/O性能が劣化するというノイジーネイバー問題が生じうる。 In this configuration, write amplification increases due to redundant GC including the application level GC 104 under the virtual disk service 103 and the garbage collection function 303 (LUT level GC) in the conventional SSD. In addition, in conventional SSDs, the frequency of GC increases due to an increase in the amount of data written by a certain end user or a certain virtual disk service 103, which increases the I/O performance for other end users or other virtual disk services 103. A noisy neighbor problem may occur where the

また、各仮想ディスクサービス内のアプリケーションレベルアドレス変換テーブルと従来型SSD内のLUT302とを含む重複したリソースの存在により、多くのメモリリソースが消費される。
図2の右部は、本実施形態のフラッシュストレージデバイス3とホスト2とを含む計算機システム全体の階層構造を表している。
Additionally, the presence of duplicate resources, including application level address translation tables within each virtual disk service and LUTs 302 within a conventional SSD, consumes a large amount of memory resources.
The right side of FIG. 2 represents the hierarchical structure of the entire computer system including the flash storage device 3 and host 2 of this embodiment.

ホスト(サーバ)2においては、複数のエンドユーザに複数の仮想マシンを提供するための仮想マシンサービス401が実行される。仮想マシンサービス401上の各仮想マシンにおいては、対応するエンドユーザによって使用されるオペレーティングシステムおよびユーザアプリケーション402が実行される。 In the host (server) 2, a virtual machine service 401 is executed to provide a plurality of virtual machines to a plurality of end users. Each virtual machine on virtual machine service 401 executes an operating system and user application 402 used by a corresponding end user.

また、ホスト(サーバ)2においては、複数のユーザアプリケーション402に対応する複数のI/Oサービス403が実行される。これらI/Oサービス403には、LBAベースのブロックI/Oサービス、キー・バリュー・ストアサービスなどが含まれてもよい。各I/Oサービス403は、論理アドレスそれぞれとフラッシュストレージデバイス3の物理アドレスそれぞれとの間のマッピングを管理するルックアップテーブル(LUT)411を含む。ここで、論理アドレスとは、アクセス対象のデータを識別可能な識別子を意味する。この論理アドレスは、論理アドレス空間上の位置を指定する論理ブロックアドレス(LBA)であってもよいし、あるいは、キー・バリュー・ストアのキー(タグ)であってもよいし、キーのハッシュ値であってもよい。 Further, in the host (server) 2, a plurality of I/O services 403 corresponding to a plurality of user applications 402 are executed. These I/O services 403 may include LBA-based block I/O services, key-value store services, and the like. Each I/O service 403 includes a lookup table (LUT) 411 that manages the mapping between each logical address and each physical address of the flash storage device 3 . Here, the logical address means an identifier that can identify data to be accessed. This logical address may be a logical block address (LBA) specifying a location in the logical address space, a key (tag) of a key-value store, or a hash value of the key. It may be.

LBAベースのブロックI/Oサービスにおいては、論理アドレス(LBA)それぞれとフラッシュストレージデバイス3の物理アドレスそれぞれとの間のマッピングを管理するLUT411が使用されてもよい。
キー・バリュー・ストアサービスにおいては、論理アドレス(つまり、キーのようなタグ)それぞれとこれら論理アドレス(つまり、キーのようなタグ)に対応するデータが格納されているフラッシュストレージデバイス3内の物理記憶位置を示す物理アドレスそれぞれとの間のマッピングを管理するLUT411が使用されてもよい。このLUT411においては、タグと、このタグによって識別されるデータが格納されている物理アドレスと、このデータのデータ長との対応関係が管理されてもよい。
In LBA-based block I/O services, a LUT 411 may be used that manages the mapping between each logical address (LBA) and each physical address of the flash storage device 3.
In the key-value store service, each logical address (i.e., key-like tag) and the physical A LUT 411 may be used to manage the mapping between each physical address indicating a storage location. In this LUT 411, a correspondence relationship between a tag, a physical address where data identified by this tag is stored, and a data length of this data may be managed.

各エンドユーザは、使用すべきアドレッシング方法(LBA、キー・バリュー・ストアのキー、等)を選択することができる。
これら各LUT411は、ユーザアプリケーション402からの論理アドレスそれぞれをフラッシュストレージデバイス3用の論理アドレスそれぞれに変換するのではなく、ユーザアプリケーション402からの論理アドレスそれぞれをフラッシュストレージデバイス3の物理アドレスそれぞれに変換する。つまり、これら各LUT411は、フラッシュストレージデバイス3用の論理アドレスを物理アドレスに変換するテーブルとアプリケーションレベルアドレス変換テーブルとが統合(マージ)されたテーブルである。
Each end user can select the addressing method to use (LBA, key-value store keys, etc.).
Each of these LUTs 411 does not convert each logical address from the user application 402 into each logical address for the flash storage device 3, but converts each logical address from the user application 402 into each physical address of the flash storage device 3. . In other words, each of these LUTs 411 is a table in which a table for converting a logical address for the flash storage device 3 into a physical address and an application level address conversion table are integrated (merged).

また、各I/Oサービス403は、GCブロック選択機能を含む。GCブロック選択機能は、対応するLUTを使用して各ブロックの有効データ量を管理することができ、これによってGCソースブロックを選択することができる。
ホスト(サーバ)2においては、上述のQoSドメイン毎にI/Oサービス403が存在してもよい。あるQoSドメインに属するI/Oサービス403は、対応するQoSドメイン内のユーザアプリケーション402によって使用される論理アドレスそれぞれと対応するQoSドメインに割り当てられたリソースグループに属するブロック群のブロック番号それぞれとの間のマッピングを管理してもよい。
Each I/O service 403 also includes a GC block selection function. The GC block selection function can manage the effective data amount of each block using a corresponding LUT, and thereby can select a GC source block.
In the host (server) 2, an I/O service 403 may exist for each of the above-mentioned QoS domains. An I/O service 403 that belongs to a certain QoS domain has a link between each logical address used by the user application 402 in the corresponding QoS domain and each block number of a group of blocks belonging to a resource group allocated to the corresponding QoS domain. may manage the mapping of

ホスト(サーバ)2からフラッシュストレージデバイス3へのコマンドの送信およびフラッシュストレージデバイス3からホスト(サーバ)2へのコマンド完了のレスポンス等の返送は、ホスト(サーバ)2およびフラッシュストレージデバイス3の各々に存在するI/Oキュー500を介して実行される。これらI/Oキュー500も、複数のQoSドメインに対応する複数のキューグループに分類されていてもよい。 Sending commands from the host (server) 2 to the flash storage device 3 and returning command completion responses from the flash storage device 3 to the host (server) 2 are sent to each of the host (server) 2 and flash storage device 3. This is done via the existing I/O queue 500. These I/O queues 500 may also be classified into multiple queue groups corresponding to multiple QoS domains.

フラッシュストレージデバイス3は、複数のQoSドメインに対応する複数のライトバッファ(WB)601、複数のQoSドメインに対応する複数のガベージコレクション(GC)機能602、NAND型フラッシュメモリ(NANDフラッシュアレイ)603を含む。 The flash storage device 3 includes multiple write buffers (WB) 601 corresponding to multiple QoS domains, multiple garbage collection (GC) functions 602 corresponding to multiple QoS domains, and NAND flash memory (NAND flash array) 603. include.

この図2の右部に示す構成においては、上位階層(ホスト2)はブロック境界を認識することができるので、ブロック境界/ブロックサイズを考慮してユーザデータを各ブロックに書き込むことができる。つまり、ホスト2はNAND型フラッシュメモリ(NANDフラッシュアレイ)603の個々のブロックを認識することができ、これにより、例えば、一つのブロック全体に一斉にデータを書き込む、一つのブロック内のデータ全体を削除または更新によって無効化する、といった制御を行うことが可能となる。この結果、一つのブロックに有効データと無効データが混在されるという状況を起こりにくくすることが可能となる。したがって、GCを実行することが必要となる頻度を低減することができる。GCの頻度を低減することにより、ライトアンプリフィケーションが低下され、フラッシュストレージデバイス3の性能の向上、フラッシュストレージデバイス3の寿命の最大化を実現できる。このように、上位階層(ホスト2)がブロック番号を認識可能な構成は有用である。 In the configuration shown on the right side of FIG. 2, the upper layer (host 2) can recognize block boundaries, so user data can be written into each block while taking the block boundaries/block size into consideration. In other words, the host 2 can recognize individual blocks of the NAND flash memory (NAND flash array) 603, and thereby, for example, write data to an entire block at once, or write data to the entire block. It becomes possible to perform control such as invalidation by deletion or update. As a result, it becomes possible to make it difficult for a situation in which valid data and invalid data are mixed in one block to occur. Therefore, the frequency with which it is necessary to perform GC can be reduced. By reducing the frequency of GC, write amplification is reduced, the performance of the flash storage device 3 can be improved, and the life of the flash storage device 3 can be maximized. In this way, a configuration in which the upper layer (host 2) can recognize the block number is useful.

一方、データが書き込まれるべきブロック内の位置は、上位階層(ホスト2)ではなく、フラッシュストレージデバイス3によって決定される。したがって、不良ページ(バッドページ)を隠蔽することができ、またページ書き込み順序制約を守ることができる。 On the other hand, the location within the block where data is to be written is determined by the flash storage device 3, not by the upper layer (host 2). Therefore, defective pages (bad pages) can be hidden, and page write order constraints can be observed.

図3は、図1のシステム構成の変形例を示す。
図3においては、複数のホスト2Aと複数のフラッシュストレージデバイス3との間のデータ転送がネットワーク機器(ここでは、ネットワークスイッチ1)を介して実行される。
すなわち、図3の計算機システムにおいては、図1のホスト(サーバ)2のストレージ管理機能がマネージャ2Bに移され、且つホスト(サーバ)2のフロントエンド機能が複数のホスト(エンドユーザサービス用ホスト)2Aに移されている。
FIG. 3 shows a modification of the system configuration of FIG. 1.
In FIG. 3, data transfer between multiple hosts 2A and multiple flash storage devices 3 is performed via a network device (here, network switch 1).
That is, in the computer system shown in FIG. 3, the storage management function of the host (server) 2 shown in FIG. It has been moved to 2A.

マネージャ2Bは、複数のフラッシュストレージデバイス3を管理し、各ホスト(エンドユーザサービス用ホスト)2Aからの要求に応じて、これらフラッシュストレージデバイス3のストレージリソースを各ホスト(エンドユーザサービス用ホスト)2Aに割り当てる。 The manager 2B manages a plurality of flash storage devices 3 and distributes the storage resources of these flash storage devices 3 to each host (end user service host) 2A in response to a request from each host (end user service host) 2A. Assign to

各ホスト(エンドユーザサービス用ホスト)2Aは、ネットワークを介して一つ以上のエンドユーザ端末61に接続される。各ホスト(エンドユーザサービス用ホスト)2Aは、上述の統合(マージ)された論理物理アドレス変換テーブルであるルックアップテーブル(LUT)を管理する。各ホスト(エンドユーザサービス用ホスト)2Aは、自身のLUTを使用して、対応するエンドユーザによって使用される論理アドレスそれぞれと自身に割り当てられたリソースの物理アドレスそれぞれとの間のマッピングのみを管理する。したがって、この構成は、システムを容易にスケールアウトすることを可能にする。 Each host (end-user service host) 2A is connected to one or more end-user terminals 61 via a network. Each host (end user service host) 2A manages a lookup table (LUT) which is the above-mentioned integrated (merged) logical-physical address translation table. Each host (end user service host) 2A uses its own LUT to manage only the mapping between each logical address used by the corresponding end user and each physical address of the resources assigned to it. do. Therefore, this configuration allows the system to be easily scaled out.

各ホスト2AのグローバルFTLは、ルックアップテーブル(LUT)を管理する機能、高可用性を実現するための機能、QoS制御機能、GCブロック選択機能等を有する。
マネージャ2Bは、複数のフラッシュストレージデバイス3を管理するための専用のデバイス(計算機)である。マネージャ2Bは、各ホスト2Aから要求された容量分のストレージリソースを予約するグローバルリソース予約機能を有する。さらに、マネージャ2Bは、各フラッシュストレージデバイス3の消耗度を監視するためのウェアー監視機能、予約されたストレージリソース(NANDリソース)を各ホスト2Aに割り当てるNANDリソース割り当て機能、QoS制御機能、グローバルクロック管理機能、等を有する。
The global FTL of each host 2A has a look-up table (LUT) management function, a high availability function, a QoS control function, a GC block selection function, and the like.
The manager 2B is a dedicated device (computer) for managing multiple flash storage devices 3. The manager 2B has a global resource reservation function that reserves storage resources for the capacity requested by each host 2A. Furthermore, the manager 2B has a wear monitoring function for monitoring the degree of wear of each flash storage device 3, a NAND resource allocation function that allocates reserved storage resources (NAND resources) to each host 2A, a QoS control function, and a global clock management function. It has functions, etc.

各フラッシュストレージデバイス3のローレベルアブストラクション(LLA)は、不良ページ(バッドページ)を隠蔽する機能、ページ書き込み順序制約を守る機能、ライトバッファを管理する機能、GC実行機能等を有する。
図3のシステム構成によれば、各フラッシュストレージデバイス3の管理はマネージャ2Bによって実行されるので、各ホスト2Aは、自身に割り当てられた一つ以上のフラッシュストレージデバイス3にI/O要求を送信する動作と、フラッシュストレージデバイス3からのレスポンスを受信するという動作とのみを実行すればよい。つまり、複数のホスト2Aと複数のフラッシュストレージデバイス3との間のデータ転送はネットワークスイッチ1のみを介して実行され、マネージャ2Bはこのデータ転送には関与しない。また、上述したように、ホスト2Aそれぞれによって管理されるLUTの内容は互いに独立している。よって、容易にホスト2Aの数を増やすことができるので、スケールアウト型のシステム構成を実現することができる。
The low level abstraction (LLA) of each flash storage device 3 has a function of hiding a bad page (bad page), a function of observing page write order constraints, a function of managing a write buffer, a function of executing GC, etc.
According to the system configuration of FIG. 3, management of each flash storage device 3 is executed by the manager 2B, so each host 2A sends an I/O request to one or more flash storage devices 3 assigned to itself. It is only necessary to perform the operations of ``receiving the response'' and ``receiving the response'' from the flash storage device 3. That is, data transfer between the multiple hosts 2A and the multiple flash storage devices 3 is performed only via the network switch 1, and the manager 2B is not involved in this data transfer. Further, as described above, the contents of the LUTs managed by each host 2A are independent from each other. Therefore, since the number of hosts 2A can be easily increased, a scale-out system configuration can be realized.

図4は、フラッシュストレージデバイス3の構成例を示す。
フラッシュストレージデバイス3は、コントローラ4および不揮発性メモリ(NAND型フラッシュメモリ)5を備える。フラッシュストレージデバイス3は、ランダムアクセスメモリ、例えば、DRAM6も備えていてもよい。
FIG. 4 shows a configuration example of the flash storage device 3.
The flash storage device 3 includes a controller 4 and a nonvolatile memory (NAND flash memory) 5. Flash storage device 3 may also include random access memory, eg DRAM 6.

NAND型フラッシュメモリ5は、マトリクス状に配置された複数のメモリセルを含むメモリセルアレイを含む。NAND型フラッシュメモリ5は、2次元構造のNAND型フラッシュメモリであってもよいし、3次元構造のNAND型フラッシュメモリであってもよい。 The NAND flash memory 5 includes a memory cell array including a plurality of memory cells arranged in a matrix. The NAND flash memory 5 may be a two-dimensional NAND flash memory or a three-dimensional NAND flash memory.

NAND型フラッシュメモリ5のメモリセルアレイは、複数のブロックBLK0~BLKm-1を含む。ブロックBLK0~BLKm-1の各々は多数のページ(ここではページP0~Pn-1)によって編成される。ブロックBLK0~BLKm-1は、消去単位として機能する。ブロックは、「消去ブロック」、「物理ブロック」、または「物理消去ブロック」と称されることもある。ページP0~Pn-1の各々は、同一ワード線に接続された複数のメモリセルを含む。ページP0~Pn-1は、データ書き込み動作およびデータ読み込み動作の単位である。
コントローラ4は、Toggle、オープンNANDフラッシュインタフェース(ONFI)のようなNANDインタフェース13を介して、不揮発性メモリであるNAND型フラッシュメモリ5に電気的に接続されている。コントローラ4は、NAND型フラッシュメモリ5を制御するように構成されたメモリコントローラ(制御回路)である。
The memory cell array of the NAND flash memory 5 includes a plurality of blocks BLK0 to BLKm-1. Each of blocks BLK0 to BLKm-1 is organized by a large number of pages (pages P0 to Pn-1 here). Blocks BLK0 to BLKm-1 function as erase units. A block may also be referred to as an "erasure block,""physicalblock," or "physical erase block." Each of pages P0 to Pn-1 includes a plurality of memory cells connected to the same word line. Pages P0 to Pn-1 are units of data write operations and data read operations.
The controller 4 is electrically connected to a NAND flash memory 5, which is a nonvolatile memory, via a NAND interface 13 such as Toggle or an open NAND flash interface (ONFI). The controller 4 is a memory controller (control circuit) configured to control the NAND flash memory 5.

NAND型フラッシュメモリ5は、図5に示すように、複数のNAND型フラッシュメモリダイを含む。各NAND型フラッシュメモリダイは、複数のブロックBLKを含むメモリセルアレイとこのメモリセルアレイを制御する周辺回路とを含む不揮発性メモリダイである。個々のNAND型フラッシュメモリダイは独立して動作可能である。このため、NAND型フラッシュメモリダイは、並列動作単位として機能する。NAND型フラッシュメモリダイは、「NAND型フラッシュメモリチップ」または「不揮発性メモリチップ」とも称される。図5においては、NANDインタフェース13に16個のチャンネルCh1、Ch2、…Ch16が接続されており、これらチャンネルCh1、Ch2、…Ch16の各々に、同数(例えばチャンネル当たり2個のダイ)のNAND型フラッシュメモリダイそれぞれが接続されている場合が例示されている。各チャンネルは、対応するNAND型フラッシュメモリダイと通信するための通信線(メモリバス)を含む。 As shown in FIG. 5, the NAND flash memory 5 includes a plurality of NAND flash memory dies. Each NAND flash memory die is a nonvolatile memory die that includes a memory cell array including a plurality of blocks BLK and a peripheral circuit that controls the memory cell array. Each NAND flash memory die can operate independently. Therefore, the NAND flash memory die functions as a parallel operating unit. A NAND flash memory die is also referred to as a "NAND flash memory chip" or a "nonvolatile memory chip." In FIG. 5, 16 channels Ch1, Ch2, ... Ch16 are connected to the NAND interface 13, and each of these channels Ch1, Ch2, ... Ch16 has the same number of NAND dies (for example, two dies per channel). A case is illustrated in which each flash memory die is connected. Each channel includes a communication line (memory bus) for communicating with a corresponding NAND flash memory die.

コントローラ4は、チャンネルCh1、Ch2、…Ch16を介してNAND型フラッシュメモリダイ#1~#32を制御する。コントローラ4は、チャンネルCh1、Ch2、…Ch16を同時に駆動することができる。
チャンネルCh1~Ch16に接続された16個のNAND型フラッシュメモリダイ#1~#16は第1のバンクとして編成されてもよく、またチャンネルCh1~Ch16に接続された残りの16個のNAND型フラッシュメモリダイ#17~#32は第2のバンクとして編成されてもよい。バンクは、複数のメモリモジュールをバンクインタリーブによって並列動作させるための単位として機能する。図5の構成例においては、16チャンネルと、2つのバンクを使用したバンクインタリーブとによって、最大32個のNAND型フラッシュメモリダイを並列動作させることができる。
The controller 4 controls the NAND flash memory dies #1 to #32 via channels Ch1, Ch2, . . . Ch16. The controller 4 can drive channels Ch1, Ch2, . . . Ch16 simultaneously.
The 16 NAND flash memory dies #1 to #16 connected to channels Ch1 to Ch16 may be organized as a first bank, and the remaining 16 NAND flash memory dies #1 to #16 connected to channels Ch1 to Ch16 Memory dies #17-#32 may be organized as a second bank. A bank functions as a unit for operating multiple memory modules in parallel by bank interleaving. In the configuration example of FIG. 5, a maximum of 32 NAND flash memory dies can be operated in parallel with 16 channels and bank interleaving using two banks.

本実施形態では、コントローラ4は、各々が複数のブロックBLKから構成される複数のブロック(以下、スーパーブロックと称する)を管理してもよく、スーパーブロックの単位で消去動作を実行してもよい。
スーパーブロックは、これに限定されないが、NAND型フラッシュメモリダイ#1~#32から一つずつ選択される計32個のブロックBLKを含んでいてもよい。なお、NAND型フラッシュメモリダイ#1~#32の各々はマルチプレーン構成を有していてもよい。例えば、NAND型フラッシュメモリダイ#1~#32の各々が、2つのプレーンを含むマルチプレーン構成を有する場合には、一つのスーパーブロックは、NAND型フラッシュメモリダイ#1~#32に対応する64個のプレーンから一つずつ選択される計64個のブロックBLKを含んでいてもよい。図6には、一つのスーパーブロックSBが、NAND型フラッシュメモリダイ#1~#32から一つずつ選択される計32個のブロックBLK(図5においては太枠で囲まれているブロックBLK)から構成される場合が例示されている。
In the present embodiment, the controller 4 may manage a plurality of blocks (hereinafter referred to as superblocks) each made up of a plurality of blocks BLK, and may execute the erase operation in units of superblocks. .
The super block may include, but is not limited to, a total of 32 blocks BLK selected one by one from NAND flash memory dies #1 to #32. Note that each of the NAND flash memory dies #1 to #32 may have a multiplane configuration. For example, if each of the NAND flash memory dies #1 to #32 has a multiplane configuration including two planes, one superblock has 64 planes corresponding to the NAND flash memory dies #1 to #32. A total of 64 blocks BLK may be included, one selected from each plane. In FIG. 6, one super block SB is a total of 32 blocks BLK selected one by one from NAND flash memory dies #1 to #32 (blocks BLK surrounded by thick frames in FIG. 5). An example is shown in which the

図4に示されているように、コントローラ4は、ホストインタフェース11、CPU12、NANDインタフェース13、およびDRAMインタフェース14等を含む。これらCPU12、NANDインタフェース13、DRAMインタフェース14は、バス10を介して相互接続される。 As shown in FIG. 4, the controller 4 includes a host interface 11, a CPU 12, a NAND interface 13, a DRAM interface 14, and the like. These CPU 12, NAND interface 13, and DRAM interface 14 are interconnected via a bus 10.

このホストインタフェース11は、ホスト2との通信を実行するように構成されたホストインタフェース回路である。このホストインタフェース11は、例えば、PCIeコントローラ(NVMeコントローラ)であってもよい。ホストインタフェース11は、ホスト2から様々な要求(コマンド)を受信する。これら要求(コマンド)には、ライト要求(ライトコマンド)、リード要求(リードコマンド)、他の様々な要求(コマンド)が含まれる。 This host interface 11 is a host interface circuit configured to communicate with the host 2. This host interface 11 may be, for example, a PCIe controller (NVMe controller). The host interface 11 receives various requests (commands) from the host 2. These requests (commands) include write requests (write commands), read requests (read commands), and various other requests (commands).

CPU12は、ホストインタフェース11、NANDインタフェース13、DRAMインタフェース14を制御するように構成されたプロセッサである。CPU12は、フラッシュストレージデバイス3の電源オンに応答してNAND型フラッシュメモリ5または図示しないROMから制御プログラム(ファームウェア)をDRAM6にロードし、そしてこのファームウェアを実行することによって様々な処理を行う。なお、ファームウェアはコントローラ4内の図示しないSRAM上にロードされてもよい。このCPU12は、ホスト2からの様々なコマンドを処理するためのコマンド処理等を実行することができる。CPU12の動作は、CPU12によって実行される上述のファームウェアによって制御される。なお、コマンド処理の一部または全部は、コントローラ4内の専用ハードウェアによって実行してもよい。 The CPU 12 is a processor configured to control the host interface 11, the NAND interface 13, and the DRAM interface 14. The CPU 12 loads a control program (firmware) from the NAND flash memory 5 or a ROM (not shown) into the DRAM 6 in response to power-on of the flash storage device 3, and executes the firmware to perform various processes. Note that the firmware may be loaded onto an SRAM (not shown) in the controller 4. This CPU 12 can execute command processing and the like for processing various commands from the host 2. The operation of the CPU 12 is controlled by the above-mentioned firmware executed by the CPU 12. Note that part or all of the command processing may be executed by dedicated hardware within the controller 4.

CPU12は、ライト動作制御部21、リード動作制御部22、およびGC動作制御部23として機能することができる。これらライト動作制御部21、リード動作制御部22、およびGC動作制御部23においては、図2の右部に示すシステム構成を実現するためのアプリケーションプログラムインタフェース(API)が実装されている。 The CPU 12 can function as a write operation control section 21, a read operation control section 22, and a GC operation control section 23. In these write operation control section 21, read operation control section 22, and GC operation control section 23, an application program interface (API) for realizing the system configuration shown on the right side of FIG. 2 is implemented.

ライト動作制御部21は、ブロック番号と論理アドレスを指定するライト要求(ライトコマンド)をホスト2から受信する。論理アドレスは、書き込むべきデータ(ユーザデータ)を識別可能な識別子であり、例えば、LBAであってもよいし、あるいはキー・バリュー・ストアのキーのようなタグであってもよいし、キーのハッシュ値であってもよい。ブロック番号は、このデータが書き込まれるべきブロックを指定する識別子である。ブロック番号としては、複数のブロック内の任意の一つを一意に識別可能な様々な値を使用し得る。ブロック番号によって指定されるブロックは、物理ブロックであってもよいし、上述のスーパーブロックであってもよい。ライトコマンドを受信した場合、ライト動作制御部21は、まず、ホスト2からのデータを書き込むべき、この指定されたブロック番号を有するブロック(書き込み先ブロック)内の位置(書き込み先位置)を決定する。次いで、ライト動作制御部21は、ホスト2からのデータ(ライトデータ)を、この書き込み先ブロックの書き込み先位置に書き込む。この場合、ライト動作制御部21は、ホスト2からのデータのみならず、このデータとこのデータの論理アドレスの双方を書き込み先ブロックに書き込むことができる。 The write operation control unit 21 receives from the host 2 a write request (write command) specifying a block number and a logical address. The logical address is an identifier that can identify the data (user data) to be written, and for example, it may be an LBA, a tag such as a key in a key-value store, or a tag such as a key in a key-value store. It may be a hash value. The block number is an identifier that specifies the block in which this data is to be written. As the block number, various values that can uniquely identify any one of the plurality of blocks may be used. The block designated by the block number may be a physical block or the above-mentioned super block. When receiving a write command, the write operation control unit 21 first determines the position (destination position) in the block having the specified block number (destination block) to which data from the host 2 is to be written. . Next, the write operation control unit 21 writes the data (write data) from the host 2 to the write destination position of this write destination block. In this case, the write operation control unit 21 can write not only the data from the host 2 but also both this data and the logical address of this data to the write destination block.

そして、ライト動作制御部21は、この書き込み先ブロックの上述の書き込み先位置を示すブロック内物理アドレスをホスト2に通知する。このブロック内物理アドレスは、この書き込み先ブロック内の書き込み先位置を示すブロック内オフセットによって表される。 Then, the write operation control unit 21 notifies the host 2 of the physical address within the block indicating the above-mentioned write destination position of this write destination block. This intra-block physical address is represented by an intra-block offset indicating the write destination position within this write destination block.

この場合、このブロック内オフセットは、書き込み先ブロックの先頭から書き込み先位置までのオフセット、つまり書き込み先ブロックの先頭に対する書き込み先位置のオフセットを示す。書き込み先ブロックの先頭から書き込み先位置までのオフセットのサイズは、ページサイズとは異なるサイズを有する粒度(Grain)の倍数で示される。粒度(Grain)は、上述のアクセス単位である。粒度(Grain)のサイズの最大値は、ブロックサイズまでに制限される。換言すれば、ブロック内オフセットは、書き込み先ブロックの先頭から書き込み先位置までのオフセットをページサイズとは異なるサイズを有する粒度の倍数で示す。 In this case, the intra-block offset indicates the offset from the beginning of the writing destination block to the writing destination position, that is, the offset of the writing destination position from the beginning of the writing destination block. The size of the offset from the beginning of the write destination block to the write destination position is expressed as a multiple of a grain having a size different from the page size. Grain is the above-mentioned access unit. The maximum value of the grain size is limited to the block size. In other words, the intra-block offset indicates the offset from the beginning of the write destination block to the write destination position as a multiple of a granularity having a size different from the page size.

粒度(Grain)は、ページサイズよりも小さいサイズを有していてもよい。例えば、ページサイズが16Kバイトである場合、粒度(Grain)は、そのサイズが4Kバイトであってもよい。この場合、ある一つのブロックにおいては、各々サイズが4Kバイトである複数のオフセット位置が規定される。ブロック内の最初のオフセット位置に対応するブロック内オフセットは、例えば0であり、ブロック内の次のオフセット位置に対応するブロック内オフセットは、例えば1である、ブロック内のさらに次のオフセット位置に対応するブロック内オフセットは、例えば2である。 Grain may have a size smaller than the page size. For example, if the page size is 16K bytes, the grain size may be 4K bytes. In this case, a plurality of offset positions each having a size of 4K bytes are defined in one block. The intra-block offset corresponding to the first offset position within the block is, for example, 0, and the intra-block offset corresponding to the next offset position within the block is, for example, 1, corresponding to the next further offset position within the block. The intra-block offset to be used is, for example, 2.

あるいは、粒度(Grain)は、ページサイズよりも大きなサイズを有していてもよい。例えば、粒度(Grain)は、ページサイズの数倍のサイズであってもよい。ページサイズが16Kバイトである場合、粒度は、32Kバイトのサイズであってもよい。 Alternatively, the grain size may have a size larger than the page size. For example, the grain size may be several times the page size. If the page size is 16K bytes, the granularity may be 32K bytes in size.

このように、ライト動作制御部21は、ホスト2からのブロック番号を有するブロック内の書き込み先位置を自身で決定し、そしてホスト2からのライトデータをこのブロック内のこの書き込み先位置に書き込む。そして、ライト動作制御部21は、この書き込み先位置を示すブロック内物理アドレス(ブロック内オフセット)をライト要求に対応するレスポンス(返り値)としてホスト2に通知する。あるいは、ライト動作制御部21は、ブロック内物理アドレス(ブロック内オフセット)のみをホスト2に通知するのではなく、論理アドレスとブロック番号とブロック内物理アドレス(ブロック内オフセット)との組をホスト2に通知してもよい。 In this manner, the write operation control unit 21 determines by itself the write destination position within the block having the block number from the host 2, and writes the write data from the host 2 to this write destination position within this block. Then, the write operation control unit 21 notifies the host 2 of the intra-block physical address (intra-block offset) indicating the write destination position as a response (return value) corresponding to the write request. Alternatively, instead of notifying the host 2 of only the intra-block physical address (intra-block offset), the write operation control unit 21 notifies the host 2 of a set of a logical address, block number, and intra-block physical address (intra-block offset). may be notified.

したがって、フラッシュストレージデバイス3は、ブロック番号をホスト2にハンドリングさせつつ、ページ書き込み順序制約、バッドページ、ページサイズ等を隠蔽することができる。
この結果、ホスト2は、ブロック境界は認識できるが、ページ書き込み順序制約、バッドページ、ページサイズについては意識することなく、どのユーザデータがどのブロック番号に存在するかを管理することができる。
Therefore, the flash storage device 3 can hide page write order constraints, bad pages, page sizes, etc. while allowing the host 2 to handle block numbers.
As a result, although the host 2 can recognize block boundaries, it can manage which user data exists in which block number without being aware of page write order constraints, bad pages, and page sizes.

リード動作制御部22は、物理アドレス(すなわち、ブロック番号およびブロック内オフセット)を指定するリード要求(リードコマンド)をホスト2から受信した場合、これらブロック番号およびブロック内オフセットに基づいて、リード対象のブロック内のリード対象の物理記憶位置からデータをリードする。リード対象のブロックは、ブロック番号によって特定される。このブロック内のリード対象の物理記憶位置は、ブロック内オフセットによって特定される。このブロック内オフセットを使用することにより、ホスト2は、NAND型フラッシュメモリの世代毎の異なるページサイズをハンドリングする必要がない。 When the read operation control unit 22 receives a read request (read command) specifying a physical address (that is, a block number and an intra-block offset) from the host 2, the read operation control unit 22 determines the read target based on these block numbers and intra-block offsets. Read data from the physical storage location to be read within the block. The block to be read is identified by the block number. The physical storage location to be read within this block is specified by the intra-block offset. By using this intra-block offset, the host 2 does not need to handle different page sizes for each generation of NAND flash memory.

リード対象の物理記憶位置を得るために、リード動作制御部22は、まず、このブロック内オフセットを、ページサイズを表す粒度の数(ページサイズが16Kバイトで粒度(Grain)が4Kバイトである場合には、ページサイズを表す粒度の数は4)で除算し、そしてこの除算によって得られる商および余りを、リード対象のページ番号およびリード対象のページ内オフセットとしてそれぞれ決定してもよい。 In order to obtain the physical storage location to be read, the read operation control unit 22 first converts this intra-block offset into the number of grains representing the page size (if the page size is 16K bytes and the grain is 4K bytes) In this case, the number of granularity representing the page size may be divided by 4), and the quotient and remainder obtained by this division may be determined as the page number of the read target and the offset within the page of the read target, respectively.

GC動作制御部23は、NAND型フラッシュメモリ5のガベージコレクションのためのコピー元ブロック番号(GCソースブロック番号)およびコピー先ブロック番号(GCデスティネーションブロック番号)を指定するGC制御コマンドをホスト2から受信した場合、NAND型フラッシュメモリ5の複数のブロックから、指定されたコピー元ブロック番号を有するブロックと指定されたコピー先ブロック番号を有するブロックとをコピー元ブロック(GCソースブロック)およびコピー先ブロック(GCデスティネーションブロック)として選択する。GC動作制御部23は、選択されたGCソースブロックに格納されている有効データを書き込むべきGCデスティネーションブロック内のコピー先位置を決定し、有効データをGCデスティネーションブロック内のコピー先位置にコピーする。 The GC operation control unit 23 receives a GC control command from the host 2 that specifies a copy source block number (GC source block number) and a copy destination block number (GC destination block number) for garbage collection of the NAND flash memory 5. If received, a block having the specified copy source block number and a block having the specified copy destination block number are selected from multiple blocks of the NAND flash memory 5 as a copy source block (GC source block) and a copy destination block. (GC destination block). The GC operation control unit 23 determines a copy destination position in the GC destination block to which valid data stored in the selected GC source block is to be written, and copies the valid data to the copy destination position in the GC destination block. do.

そして、GC動作制御部23は、有効データの論理アドレスと、コピー先ブロック番号と、GCデスティネーションブロック内のコピー先位置を示すブロック内物理アドレス(ブロック内オフセット)とを、ホスト2に通知する。
有効データ/無効データの管理は、ブロック管理テーブル32を使用して実行されてもよい。このブロック管理テーブル32は、例えば、ブロック毎に存在してもよい。あるブロックに対応するブロック管理テーブル32においては、このブロック内のデータそれぞれの有効/無効を示すビットマップフラグが格納されている。ここで、有効データとは、論理アドレスから最新のデータとして紐付けられているデータであって、後にホスト2からリードされる可能性があるデータを意味する。無効データとは、もはやホスト2からリードされる可能性が無いデータを意味する。例えば、ある論理アドレスに関連付けられているデータは有効データであり、どの論理アドレスにも関連付けられていないデータは無効データである。
Then, the GC operation control unit 23 notifies the host 2 of the logical address of the valid data, the copy destination block number, and the intra-block physical address (intra-block offset) indicating the copy destination position within the GC destination block. .
Valid data/invalid data management may be performed using the block management table 32. This block management table 32 may exist for each block, for example. In the block management table 32 corresponding to a certain block, bitmap flags indicating validity/invalidity of each data in this block are stored. Here, valid data means data that is linked as the latest data from a logical address and that may be read from the host 2 later. Invalid data means data that can no longer be read by the host 2. For example, data that is associated with a certain logical address is valid data, and data that is not associated with any logical address is invalid data.

上述したように、GC動作制御部23は、コピー元ブロック(GCソースブロック)内に格納されている有効データを書き込むべきコピー先ブロック(GCデスティネーションブロック)内の位置(コピー先位置)を決定し、有効データをコピー先ブロック(GCデスティネーションブロック)のこの決定された位置(コピー先位置)にコピーする。この場合、GC動作制御部23は、有効データとこの有効データの論理アドレスの双方を、コピー先ブロック(GCデスティネーションブロック)にコピーしてもよい。 As described above, the GC operation control unit 23 determines the position (copy destination position) in the copy destination block (GC destination block) to which the valid data stored in the copy source block (GC source block) is to be written. Then, the valid data is copied to this determined position (copy destination position) of the copy destination block (GC destination block). In this case, the GC operation control unit 23 may copy both the valid data and the logical address of this valid data to the copy destination block (GC destination block).

本実施形態では、上述したように、ライト動作制御部21は、ホスト2からのデータ(ライトデータ)とホスト2からの論理アドレスの双方を書き込み先ブロックに書き込むことができる。このため、GC動作制御部23は、コピー元ブロック(GCソースブロック)内の各データの論理アドレスをこのコピー元ブロック(GCソースブロック)から容易に取得することができるので、コピーされた有効データの論理アドレスをホスト2に容易に通知することができる。 In this embodiment, as described above, the write operation control unit 21 can write both the data (write data) from the host 2 and the logical address from the host 2 to the write destination block. Therefore, since the GC operation control unit 23 can easily obtain the logical address of each data in the copy source block (GC source block) from this copy source block (GC source block), the copied valid data The logical address of the host 2 can be easily notified to the host 2.

NANDインタフェース13は、CPU12の制御の下、NAND型フラッシュメモリ5を制御するように構成されたメモリ制御回路である。DRAMインタフェース14は、CPU12の制御の下、DRAM6を制御するように構成されたDRAM制御回路である。DRAM6の記憶領域の一部は、内部バッファ(共有キャッシュ)31の格納のために使用される。また、DRAM6の記憶領域の他の一部は、ブロック管理テーブル32の格納のために使用される。なお、これら内部バッファ(共有キャッシュ)31、およびブロック管理テーブル32は、コントローラ4内の図示しないSRAMに格納されてもよい。 The NAND interface 13 is a memory control circuit configured to control the NAND flash memory 5 under the control of the CPU 12. The DRAM interface 14 is a DRAM control circuit configured to control the DRAM 6 under the control of the CPU 12. A part of the storage area of the DRAM 6 is used for storing an internal buffer (shared cache) 31. Further, another part of the storage area of the DRAM 6 is used for storing the block management table 32. Note that the internal buffer (shared cache) 31 and block management table 32 may be stored in an SRAM (not shown) in the controller 4.

図7は、ホスト2が論理アドレスとブロック番号とを指定し且つフラッシュストレージデバイス3がブロック内物理アドレス(ブロック内オフセット)を決定するデータ書き込み動作と、ホスト2がブロック番号とブロック内物理アドレス(ブロック内オフセット)とを指定するデータ読み出し動作とを示す。 FIG. 7 shows a data write operation in which the host 2 specifies a logical address and a block number, and the flash storage device 3 determines an intra-block physical address (intra-block offset), and a data write operation in which the host 2 specifies a block number and an intra-block physical address ( The data read operation specifies the block offset) and the data read operation.

データ書き込み動作は以下の手順で実行される。
(1)ホスト2のライト処理部412がフラッシュストレージデバイス3にデータ(ライトデータ)を書き込むことが必要な時、ライト処理部412は、フリーブロックを割り当てるようにフラッシュストレージデバイス3に要求してもよい。フラッシュストレージデバイス3のコントローラ4は、NAND型フラッシュメモリ5のフリーブロック群を管理するブロック割り当て部701を含む。ブロック割り当て部701がライト処理部412からこの要求(ブロック割り当て要求)を受信した時、ブロック割り当て部701は、フリーブロック群の一つのフリーブロックをホスト2に割り当て、割り当てられたブロックのブロック番号(BLK#)をホスト2に通知する。
The data write operation is executed in the following steps.
(1) When the write processing unit 412 of the host 2 needs to write data (write data) to the flash storage device 3, the write processing unit 412 requests the flash storage device 3 to allocate a free block. good. The controller 4 of the flash storage device 3 includes a block allocation unit 701 that manages free block groups of the NAND flash memory 5. When the block allocation unit 701 receives this request (block allocation request) from the write processing unit 412, the block allocation unit 701 allocates one free block of the free block group to the host 2, and the block number of the allocated block ( BLK#) to the host 2.

あるいは、ライト処理部412がフリーブロック群を管理する構成においては、ライト処理部412が自身で書き込み先ブロックを選択してもよい。
(2)ライト処理部412は、ライトデータに対応する論理アドレス(例えばLBA)と書き込み先ブロックのブロック番号(BLK#)とを指定するライト要求をフラッシュストレージデバイス3に送信する。
Alternatively, in a configuration in which the write processing unit 412 manages the free block group, the write processing unit 412 may select the write destination block by itself.
(2) The write processing unit 412 transmits a write request to the flash storage device 3 that specifies the logical address (for example, LBA) corresponding to the write data and the block number (BLK#) of the write destination block.

(3)フラッシュストレージデバイス3のコントローラ4は、データ書き込み用のページを割り当てるページ割り当て部702を含む。ページ割り当て部702がライト要求を受信した時、ページ割り当て部702は、ライト要求によって指定されたブロック番号を有するブロック(書き込み先ブロック)内の書き込み先位置を示すブロック内物理アドレス(ブロック内PBA)を決定する。ブロック内物理アドレス(ブロック内PBA)は、上述のブロック内オフセット(単にオフセットとしても参照される)によって表すことができる。コントローラ4は、ライト要求によって指定されたブロック番号と、ブロック内物理アドレス(ブロック内PBA)とに基づいて、ホスト2からのライトデータを、書き込み先ブロック内の書き込み先位置に書き込む。 (3) The controller 4 of the flash storage device 3 includes a page allocation unit 702 that allocates pages for data writing. When the page allocation unit 702 receives a write request, the page allocation unit 702 uses an intra-block physical address (intra-block PBA) indicating the write destination position in the block having the block number specified by the write request (write destination block). Determine. The intra-block physical address (intra-block PBA) can be represented by the above-mentioned intra-block offset (also simply referred to as offset). The controller 4 writes the write data from the host 2 to the write destination position in the write destination block based on the block number specified by the write request and the intra-block physical address (intra-block PBA).

(4)コントローラ4は、書き込み先位置を示すブロック内物理アドレス(ブロック内PBA)をライト要求に対するレスポンスとしてホスト2に通知する。あるいは、コントローラ4は、ライトデータに対応する論理アドレス(LBA)と、書き込み先ブロックのブロック番号(BLK#)と、書き込み先位置を示すブロック内PBA(オフセット)との組を、ライト要求に対するレスポンスとしてホスト2に通知してもよい。換言すれば、コントローラは、ブロック内物理アドレス、または論理アドレスとブロック番号とブロック内物理アドレスとの組のいずれかを、ホスト2に通知する。ホスト2においては、ライトデータが書き込まれた物理記憶位置を示す物理アドレス(ブロック番号、ブロック内物理アドレス(ブロック内オフセット))が、このライトデータの論理アドレスにマッピングされるように、LUT411が更新される。 (4) The controller 4 notifies the host 2 of the intra-block physical address (intra-block PBA) indicating the write destination position as a response to the write request. Alternatively, the controller 4 sends a set of a logical address (LBA) corresponding to the write data, a block number (BLK#) of the write destination block, and an intra-block PBA (offset) indicating the write destination position in response to a write request. The host 2 may be notified as follows. In other words, the controller notifies the host 2 of either the intra-block physical address or the combination of the logical address, block number, and intra-block physical address. In the host 2, the LUT 411 is updated so that the physical address (block number, intra-block physical address (intra-block offset)) indicating the physical storage location where the write data is written is mapped to the logical address of this write data. be done.

データリード動作は以下の手順で実行される。
(1)’ホスト2がフラッシュストレージデバイス3からデータをリードすることが必要な時、ホスト2は、LUT411を参照して、リードすべきデータの論理アドレスに対応する物理アドレス(ブロック番号、ブロック内物理アドレス(ブロック内オフセット))をLUT411から取得する。
Data read operation is executed in the following steps.
(1)' When the host 2 needs to read data from the flash storage device 3, the host 2 refers to the LUT 411 and reads the physical address (block number, within the block) that corresponds to the logical address of the data to be read. The physical address (intra-block offset) is obtained from the LUT 411.

(2)’ホスト2は、取得されたブロック番号およびブロック内物理アドレス(ブロック内オフセット)を指定するリード要求をフラッシュストレージデバイス3に送出する。フラッシュストレージデバイス3のコントローラ4がこのリード要求をホスト2から受信した時、コントローラ4は、ブロック番号およびブロック内物理アドレスに基づいて、リード対象のブロックおよびリード対象の物理記憶位置を特定し、このリード対象のブロック内のリード対象の物理記憶位置からデータをリードする。 (2)' The host 2 sends a read request to the flash storage device 3 specifying the obtained block number and intra-block physical address (intra-block offset). When the controller 4 of the flash storage device 3 receives this read request from the host 2, the controller 4 identifies the block to be read and the physical storage location to be read based on the block number and the physical address within the block, and Read data from the physical storage location to be read within the block to be read.

図8は、フラッシュストレージデバイス3に適用されるライトコマンドを示す。
ライトコマンドは、フラッシュストレージデバイス3にデータの書き込みを要求するコマンドである。このライトコマンドは、コマンドID、ブロック番号BLK#、論理アドレス、長さ、等を含んでもよい。
FIG. 8 shows a write command applied to the flash storage device 3.
The write command is a command that requests the flash storage device 3 to write data. This write command may include a command ID, block number BLK#, logical address, length, etc.

コマンドIDはこのコマンドがライトコマンドであることを示すID(コマンドコード)であり、ライトコマンドにはライトコマンド用のコマンドIDが含まれる。
ブロック番号BLK#は、データが書き込まれるべきブロックを一意に識別可能な識別子(ブロックアドレス)である。
The command ID is an ID (command code) indicating that this command is a write command, and the write command includes a command ID for a write command.
The block number BLK# is an identifier (block address) that can uniquely identify the block into which data is to be written.

論理アドレスは、書き込まれるべきライトデータを識別するための識別子である。この論理アドレスは、上述したように、LBAであってもよいし、キー・バリュー・ストアのキーであってもよいし、キーのハッシュ値であってもよい。論理アドレスがLBAである場合には、このライトコマンドに含まれる論理アドレス(開始LBA)は、ライトデータが書き込まれるべき論理位置(最初の論理位置)を示す。 The logical address is an identifier for identifying write data to be written. This logical address may be an LBA, a key of a key-value store, or a hash value of a key, as described above. If the logical address is an LBA, the logical address (starting LBA) included in this write command indicates the logical position (first logical position) where write data is to be written.

長さは、書き込まれるべきライトデータの長さを示す。この長さ(データ長)は、粒度(Grain)の数によって指定されてもよいし、LBAの数によって指定されてもよいし、あるいはそのサイズがバイトによって指定されてもよい。
ホスト2からライトコマンドを受信した時、コントローラ4は、ライトコマンドによって指定されたブロック番号を有するブロック内の書き込み先位置を決定する。この書き込み先位置は、ページ書き込み順序の制約およびバッドページ等を考慮して決定される。そして、コントローラ4は、ホスト2からのデータを、ライトコマンドによって指定されたブロック番号を有するこのブロック内のこの書き込み先位置に書き込む。
The length indicates the length of write data to be written. This length (data length) may be specified by the number of grains, the number of LBAs, or the size may be specified by bytes.
When receiving a write command from the host 2, the controller 4 determines the write destination position within the block having the block number specified by the write command. This write destination position is determined in consideration of page write order constraints, bad pages, and the like. The controller 4 then writes the data from the host 2 to this write destination location within this block having the block number specified by the write command.

図9は、図8のライトコマンドに対するレスポンスを示す。
このレスポンスは、ブロック内物理アドレス、長さを含む。ブロック内物理アドレスは、データが書き込まれたブロック内の位置(物理記憶位置)を示す。ブロック内物理アドレスは、上述したように、ブロック内オフセットによって指定可能である。長さは、書き込まれたデータの長さを示す。この長さ(データ長)は、粒度(Grain)の数によって指定されてもよいし、LBAの数によって指定されてもよいし、あるいはそのサイズがバイトによって指定されてもよい。
FIG. 9 shows a response to the write command in FIG. 8.
This response includes the physical address within the block and the length. The intra-block physical address indicates the position (physical storage position) within the block where data is written. As described above, the intra-block physical address can be specified by the intra-block offset. Length indicates the length of written data. This length (data length) may be specified by the number of grains, the number of LBAs, or the size may be specified by bytes.

あるいは、このレスポンスは、ブロック内物理アドレスおよび長さだけでなく、論理アドレスおよびブロック番号をさらに含んでいてもよい。論理アドレスは、図8のライトコマンドに含まれていた論理アドレスである。ブロック番号は、図8のライトコマンドに含まれていた論理アドレスである。 Alternatively, this response may further include not only the physical address and length within the block, but also the logical address and block number. The logical address is the logical address included in the write command in FIG. The block number is the logical address included in the write command in FIG.

図10は、フラッシュストレージデバイス3に適用されるTrimコマンドを示す。
このTrimコマンドは、無効にすべきデータが格納されている物理記憶位置を示すブロック番号およびブロック内物理アドレス(ブロック内オフセット)を含むコマンドである。つまり、このTrimコマンドは、LBAのような論理アドレスではなく、物理アドレスを指定可能である。このTrimコマンドは、コマンドID、物理アドレス、長さを含む。
FIG. 10 shows the Trim command applied to the flash storage device 3.
This Trim command is a command that includes a block number indicating a physical storage location where data to be invalidated is stored and a physical address within the block (offset within the block). In other words, this Trim command can specify a physical address instead of a logical address such as LBA. This Trim command includes a command ID, physical address, and length.

コマンドIDはこのコマンドがTrimコマンドであることを示すID(コマンドコード)であり、TrimコマンドにはTrimコマンド用のコマンドIDが含まれる。
物理アドレスは、無効化すべきデータが格納されている最初の物理記憶位置を示す。本実施形態では、この物理アドレスは、ブロック番号とオフセット(ブロック内オフセット)との組み合わせによって指定される。
The command ID is an ID (command code) indicating that this command is a Trim command, and the Trim command includes a command ID for the Trim command.
The physical address indicates the first physical storage location where the data to be invalidated is stored. In this embodiment, this physical address is specified by a combination of a block number and an offset (intra-block offset).

長さは、無効化すべきデータの長さを示す。この長さ(データ長)は、粒度(Grain)の数によって指定されてもよいし、バイトによって指定されてもよい。
コントローラ4は、複数のブロックの各々に含まれるデータそれぞれの有効/無効を示すフラグ(ビットマップフラグ)をブロック管理テーブル32を使用して管理する。無効にすべきデータが格納されている物理記憶位置を示すブロック番号およびオフセット(ブロック内オフセット)を含むTrimコマンドをホスト2から受信した場合、コントローラ4は、ブロック管理テーブル32を更新して、Trimコマンドに含まれるブロック番号およびブロック内オフセットに対応する物理記憶位置のデータに対応するフラグ(ビットマップフラグ)を無効を示す値に変更する。
Length indicates the length of data to be invalidated. This length (data length) may be specified by the number of grains or bytes.
The controller 4 uses the block management table 32 to manage flags (bitmap flags) indicating validity/invalidity of data included in each of a plurality of blocks. When the controller 4 receives a Trim command from the host 2 that includes a block number and an offset (intra-block offset) indicating the physical storage location where data to be invalidated is stored, the controller 4 updates the block management table 32 and performs the Trim command. The flag (bitmap flag) corresponding to the data at the physical storage location corresponding to the block number and intra-block offset included in the command is changed to a value indicating invalidity.

図11は、ブロック内物理アドレスを規定するブロック内オフセットを示す。
ブロック番号はある一つのブロックBLKを指定する。各ブロックBLKは、図11に示されているように、複数のページ(ここでは、ページ0~ページn)を含む。
ページサイズ(各ページのユーザデータ格納領域)が16Kバイトであり、粒度(Grain)が4KBのサイズであるケースにおいては、このブロックBLKは、4×(n+1)個の領域に論理的に分割される。
FIG. 11 shows intra-block offsets that define intra-block physical addresses.
The block number specifies one block BLK. Each block BLK includes a plurality of pages (here, page 0 to page n), as shown in FIG.
In the case where the page size (user data storage area of each page) is 16 KB and the grain size is 4 KB, this block BLK is logically divided into 4×(n+1) areas. Ru.

オフセット+0はページ0の最初の4KB領域を示し、オフセット+1はページ0の2番目の4KB領域を示し、オフセット+2はページ0の3番目の4KB領域を示し、オフセット+3はページ0の4番目の4KB領域を示す。
オフセット+4はページ1の最初の4KB領域を示し、オフセット+5はページ1の2番目の4KB領域を示し、オフセット+6はページ1の3番目の4KB領域を示し、オフセット+7はページ1の4番目の4KB領域を示す。
Offset +0 indicates the first 4KB area of page 0, offset +1 indicates the second 4KB area of page 0, offset +2 indicates the third 4KB area of page 0, and offset +3 indicates the fourth 4KB area of page 0. Indicates a 4KB area.
Offset +4 indicates the first 4KB region of page 1, offset +5 indicates the second 4KB region of page 1, offset +6 indicates the third 4KB region of page 1, and offset +7 indicates the fourth 4KB region of page 1. Indicates a 4KB area.

図12は、ライトコマンドに応じて実行される書き込み動作を示す。
いま、ブロックBLK#1が書き込み先ブロックとして割り当てられている場合を想定する。コントローラ4は、ページ0、ページ1、ページ2、…ページnという順序で、データをページ単位でブロックBLK#1に書き込む。
FIG. 12 shows a write operation performed in response to a write command.
Now, assume that block BLK#1 is assigned as a write destination block. The controller 4 writes data to the block BLK#1 in page units in the order of page 0, page 1, page 2, . . . page n.

図12においては、ブロックBLK#1のページ0に16Kバイト分のデータがすでに書き込まれている状態で、ブロック番号(=BLK#1)、論理アドレス(LBAx)および長さ(=4)を指定するライトコマンドがホスト2から受信された場合が想定されている。コントローラ4は、ブロックBLK#1のページ1を書き込み先位置として決定し、ホスト2から受信される16Kバイト分のライトデータをブロックBLK#1のページ1に書き込む。そして、コントローラ4は、このライトコマンドに対するレスポンスとして、オフセット(ブロック内オフセット)、長さをホスト2に返す。このケースにおいては、オフセット(ブロック内オフセット)は+5であり、長さは4である。あるいは、コントローラ4は、このライトコマンドに対するレスポンスとして、論理アドレス、ブロック番号、オフセット(ブロック内オフセット)、長さをホスト2に返してもよい。このケースにおいては、論理アドレスはLBAxであり、ブロック番号はBLK#1であり、オフセット(ブロック内オフセット)は+5であり、長さは4である。 In FIG. 12, the block number (=BLK#1), logical address (LBAx), and length (=4) are specified with 16K bytes of data already written to page 0 of block BLK#1. A case is assumed in which a write command to do this is received from the host 2. Controller 4 determines page 1 of block BLK#1 as the write destination position, and writes 16 Kbytes of write data received from host 2 to page 1 of block BLK#1. The controller 4 then returns the offset (intra-block offset) and length to the host 2 as a response to this write command. In this case, the offset (intra-block offset) is +5 and the length is 4. Alternatively, the controller 4 may return the logical address, block number, offset (internal block offset), and length to the host 2 as a response to this write command. In this case, the logical address is LBAx, the block number is BLK#1, the offset (intra-block offset) is +5, and the length is 4.

図13は、不良ページ(バッドページ)をスキップする書き込み動作を示す。
図13においては、ブロックBLK#1のページ0、ページ1にデータがすでに書き込まれている状態で、ブロック番号(=BLK#1)、論理アドレス(LBAx+1)および長さ(=4)を指定するライトコマンドがホスト2から受信された場合が想定されている。もしブロックBLK#1のページ2が不良ページであるならば、コントローラ4は、ブロックBLK#1のページ3を書き込み先位置として決定し、ホスト2から受信される16Kバイト分のライトデータをブロックBLK#1のページ3に書き込む。そして、コントローラ4は、このライトコマンドに対するレスポンスとして、オフセット(ブロック内オフセット)、長さをホスト2に返す。このケースにおいては、オフセット(ブロック内オフセット)は+12であり、長さは4である。あるいは、コントローラ4は、このライトコマンドに対するレスポンスとして、論理アドレス、ブロック番号、オフセット(ブロック内オフセット)、長さをホスト2に返してもよい。このケースにおいては、論理アドレスはLBAx+1であり、ブロック番号はBLK#1であり、オフセット(ブロック内オフセット)は+12であり、長さは4である。
FIG. 13 shows a write operation that skips bad pages.
In FIG. 13, the block number (=BLK#1), logical address (LBAx+1), and length (=4) are specified in a state where data has already been written to pages 0 and 1 of block BLK#1. A case is assumed in which a write command is received from the host 2. If page 2 of block BLK#1 is a bad page, controller 4 determines page 3 of block BLK#1 as the write destination position, and transfers the 16K bytes of write data received from host 2 to block BLK Write on page 3 of #1. The controller 4 then returns the offset (intra-block offset) and length to the host 2 as a response to this write command. In this case, the offset (intra-block offset) is +12 and the length is 4. Alternatively, the controller 4 may return the logical address, block number, offset (internal block offset), and length to the host 2 as a response to this write command. In this case, the logical address is LBAx+1, the block number is BLK#1, the offset (intra-block offset) is +12, and the length is 4.

図14は、不良ページをスキップする書き込み動作の別の例を示す。
図14においては、不良ページを挟む2つのページに跨がってデータが書き込まれる場合が想定されている。いま、ブロックBLK#2のページ0、ページ1にデータがすでに書き込まれており、且つ内部バッファ(共有キャッシュ)31に未書き込みの8Kバイト分のライトデータが残っている場合を想定する。この状態で、ブロック番号(=BLK#2)、論理アドレス(LBAy)および長さ(=6)を指定するライトコマンドが受信されたならば、コントローラ4は、未書き込みの8Kバイトライトデータと、ホスト2から新たに受信される24Kバイトライトデータ内の最初の8Kバイトライトデータとを使用して、ページサイズに対応する16Kバイトライトデータを準備する。そして、コントローラ4は、この準備した16KバイトライトデータをブロックBLK#2のページ2に書き込む。
FIG. 14 shows another example of a write operation that skips bad pages.
In FIG. 14, it is assumed that data is written across two pages sandwiching a defective page. Now, assume that data has already been written to pages 0 and 1 of block BLK#2, and 8 Kbytes of unwritten write data remains in the internal buffer (shared cache) 31. In this state, if a write command specifying the block number (=BLK#2), logical address (LBAy), and length (=6) is received, the controller 4 writes the unwritten 8K byte write data, Using the first 8 Kbyte write data of the 24 Kbyte write data newly received from the host 2, 16 Kbyte write data corresponding to the page size is prepared. Then, the controller 4 writes the prepared 16 Kbyte write data to page 2 of block BLK#2.

もしブロックBLK#2の次のページ3が不良ページであるならば、コントローラ4は、ブロックBLK#2のページ4を次の書き込み先位置として決定し、ホスト2から受信された24Kバイトライトデータ内の残りの16Kバイトライトデータを、ブロックBLK#2のページ4に書き込む。 If the next page 3 of block BLK#2 is a bad page, the controller 4 determines page 4 of the block BLK#2 as the next write destination location, and stores the 24K byte write data received from the host 2. The remaining 16K bytes of write data are written to page 4 of block BLK#2.

そして、コントローラ4は、このライトコマンドに対するレスポンスとして、2つのオフセット(ブロック内オフセット)と、2つの長さをホスト2に返す。このケースにおいては、このレスポンスは、オフセット(=+10)、長さ(=2)、オフセット(=+16)、長さ(=4)を含んでもよい。あるいは、コントローラ4は、このライトコマンドに対するレスポンスとして、LBAy、ブロック番号(=BLK#2)、オフセット(=+10)、長さ(=2)、ブロック番号(=BLK#2)、オフセット(=+16)、長さ(=4)をホスト2に返してもよい。 Then, the controller 4 returns two offsets (intra-block offsets) and two lengths to the host 2 as a response to this write command. In this case, the response may include offset (=+10), length (=2), offset (=+16), length (=4). Alternatively, the controller 4 sends LBAy, block number (=BLK#2), offset (=+10), length (=2), block number (=BLK#2), offset (=+16) as a response to this write command. ) and the length (=4) may be returned to the host 2.

図15、図16は、論理アドレスとデータのペアをブロック内のページに書き込む動作を示す。
各ブロックにおいて、各ページは、ユーザデータを格納するためのユーザデータ領域と管理データを格納するための冗長領域とを含んでもよい。ページサイズは16KB+アルファである。
15 and 16 illustrate the operation of writing logical address and data pairs to pages within a block.
In each block, each page may include a user data area for storing user data and a redundant area for storing management data. The page size is 16KB+alpha.

コントローラ4は、4KBユーザデータとこの4KBユーザデータに対応する論理アドレス(例えばLBA)との双方を書き込み先ブロックBLKに書き込む。この場合、図15に示すように、各々がLBAと4KBユーザデータとを含む4つのデータセットが同じページに書き込まれてもよい。ブロック内オフセットは、セット境界を示してもよい。 The controller 4 writes both the 4KB user data and the logical address (for example, LBA) corresponding to the 4KB user data to the write destination block BLK. In this case, four data sets each including an LBA and 4KB user data may be written to the same page, as shown in FIG. 15. Intra-block offsets may indicate set boundaries.

あるいは、図16に示されているように、4つの4KBユーザデータがページ内のユーザデータ領域に書き込まれ、これら4つの4KBユーザデータに対応する4つのLBAがこのページ内の冗長領域に書き込まれてもよい。
図17は、スーパーブロックが使用されるケースにおけるブロック番号とオフセット(ブロック内オフセット)との関係を示す。以下では、ブロック内オフセットは単にオフセットとしても参照される。
Alternatively, as shown in Figure 16, four 4KB user data are written to the user data area within a page, and four LBAs corresponding to these four 4KB user data are written to a redundant area within this page. It's okay.
FIG. 17 shows the relationship between block numbers and offsets (intra-block offsets) in the case where superblocks are used. In the following, intra-block offsets are also simply referred to as offsets.

ここでは、図示を簡単化するために、ある一つのスーパーブロックSB#1が4つのブロックBLK#11、BLK#21、BLK#31、BLK#41から構成されている場合が想定されている。コントローラ4は、ブロックBLK#11のページ0、ブロックBLK#21のページ0、ブロックBLK#31のページ0、ブロックBLK#41のページ0、ブロックBLK#11のページ1、ブロックBLK#21のページ1、ブロックBLK#31のページ1、ブロックBLK#41のページ1、…という順序でデータを書き込む。 Here, in order to simplify the illustration, it is assumed that one super block SB#1 is composed of four blocks BLK#11, BLK#21, BLK#31, and BLK#41. The controller 4 controls page 0 of block BLK#11, page 0 of block BLK#21, page 0 of block BLK#31, page 0 of block BLK#41, page 1 of block BLK#11, and page of block BLK#21. 1, page 1 of block BLK#31, page 1 of block BLK#41, and so on.

オフセット+0はブロックBLK#11のページ0の最初の4KB領域を示し、オフセット+1はブロックBLK#11のページ0の2番目の4KB領域を示し、オフセット+2はブロックBLK#11のページ0の3番目の4KB領域を示し、オフセット+3はブロックBLK#11のページ0の4番目の4KB領域を示す。 Offset +0 indicates the first 4KB area of page 0 of block BLK#11, offset +1 indicates the second 4KB area of page 0 of block BLK#11, and offset +2 indicates the third 4KB area of page 0 of block BLK#11. The offset +3 indicates the fourth 4KB area of page 0 of block BLK#11.

オフセット+4はブロックBLK#21のページ0の最初の4KB領域を示し、オフセット+5はブロックBLK#21のページ0の2番目の4KB領域を示し、オフセット+6はブロックBLK#21のページ0の3番目の4KB領域を示し、オフセット+7はブロックBLK#21のページ0の4番目の4KB領域を示す。 Offset +4 indicates the first 4KB area of page 0 of block BLK#21, offset +5 indicates the second 4KB area of page 0 of block BLK#21, and offset +6 indicates the third 4KB area of page 0 of block BLK#21. The offset +7 indicates the fourth 4KB area of page 0 of block BLK#21.

同様に、オフセット+12はブロックBLK#41のページ0の最初の4KB領域を示し、オフセット+13はブロックBLK#41のページ0の2番目の4KB領域を示し、オフセット+14はブロックBLK#41のページ0の3番目の4KB領域を示し、オフセット+15はブロックBLK#41のページ0の4番目の4KB領域を示す。 Similarly, offset +12 indicates the first 4KB area of page 0 of block BLK#41, offset +13 indicates the second 4KB area of page 0 of block BLK#41, and offset +14 indicates page 0 of block BLK#41. The offset +15 indicates the fourth 4KB area of page 0 of block BLK#41.

オフセット+16はブロックBLK#11のページ1の最初の4KB領域を示し、オフセット+17はブロックBLK#11のページ1の2番目の4KB領域を示し、オフセット+18はブロックBLK#11のページ1の3番目の4KB領域を示し、オフセット+19はブロックBLK#11のページ1の4番目の4KB領域を示す。 Offset +16 indicates the first 4KB area of page 1 of block BLK#11, offset +17 indicates the second 4KB area of page 1 of block BLK#11, and offset +18 indicates the third 4KB area of page 1 of block BLK#11. The offset +19 indicates the fourth 4KB area of page 1 of block BLK#11.

オフセット+20はブロックBLK#21のページ1の最初の4KB領域を示し、オフセット+21はブロックBLK#21のページ1の2番目の4KB領域を示し、オフセット+22はブロックBLK#21のページ1の3番目の4KB領域を示し、オフセット+23はブロックBLK#21のページ1の4番目の4KB領域を示す。 Offset +20 indicates the first 4KB area of page 1 of block BLK#21, offset +21 indicates the second 4KB area of page 1 of block BLK#21, and offset +22 indicates the third 4KB area of page 1 of block BLK#21. The offset +23 indicates the fourth 4KB area of page 1 of block BLK#21.

同様に、オフセット+28はブロックBLK#41のページ1の最初の4KB領域を示し、オフセット+29はブロックBLK#41のページ1の2番目の4KB領域を示し、オフセット+30はブロックBLK#41のページ1の3番目の4KB領域を示し、オフセット+31はブロックBLK#41のページ1の4番目の4KB領域を示す。 Similarly, offset +28 indicates the first 4KB area of page 1 of block BLK#41, offset +29 indicates the second 4KB area of page 1 of block BLK#41, and offset +30 indicates page 1 of block BLK#41. The offset +31 indicates the fourth 4KB area of page 1 of block BLK#41.

図18は、フラッシュストレージデバイス3に適用される最大ブロック番号ゲットコマンドを示す。
最大ブロック番号ゲットコマンドは、フラッシュストレージデバイス3から最大ブロック番号を取得するためのコマンドである。ホスト2は、フラッシュストレージデバイス3に最大ブロック番号ゲットコマンドに送信することにより、フラッシュストレージデバイス3に含まれるブロックの数を示す最大ブロック番号を認識することができる。最大ブロック番号ゲットコマンドは、最大ブロック番号ゲットコマンド用のコマンドIDを含み、パラメータは含まない。
FIG. 18 shows a maximum block number get command applied to the flash storage device 3.
The maximum block number get command is a command for acquiring the maximum block number from the flash storage device 3. The host 2 can recognize the maximum block number indicating the number of blocks included in the flash storage device 3 by sending a maximum block number get command to the flash storage device 3. The maximum block number get command includes a command ID for the maximum block number get command, but does not include any parameters.

図19は、最大ブロック番号ゲットコマンドに対するレスポンスを示す。
最大ブロック番号ゲットコマンドをホスト2から受信した時、フラッシュストレージデバイス3は、図19に示すレスポンスをホスト2に返す。このレスポンスは、最大ブロック番号(つまり、フラッシュストレージデバイス3に含まれる利用可能なブロックの総数)を示すパラメータを含む。
FIG. 19 shows a response to the maximum block number get command.
When receiving the maximum block number get command from the host 2, the flash storage device 3 returns the response shown in FIG. 19 to the host 2. This response includes a parameter indicating the maximum block number (ie, the total number of available blocks contained in the flash storage device 3).

図20は、フラッシュストレージデバイス3に適用されるブロックサイズゲットコマンドを示す。
ブロックサイズゲットコマンドは、フラッシュストレージデバイス3からブロックサイズを取得するためのコマンドである。ホスト2は、フラッシュストレージデバイス3にブロックサイズゲットコマンドに送信することにより、フラッシュストレージデバイス3に含まれるNAND型フラッシュメモリ5のブロックサイズを認識することができる。
FIG. 20 shows a block size get command applied to the flash storage device 3.
The block size get command is a command for obtaining the block size from the flash storage device 3. The host 2 can recognize the block size of the NAND flash memory 5 included in the flash storage device 3 by sending a block size get command to the flash storage device 3 .

なお、別の実施形態では、ブロックサイズゲットコマンドは、ブロック番号を指定するパラメータを含んでいてもよい。あるブロック番号を指定するブロックサイズゲットコマンドをホスト2から受信した場合、フラッシュストレージデバイス3は、このブロック番号を有するブロックのブロックサイズをホスト2に返す。これにより、たとえNAND型フラッシュメモリ5に含まれるブロックそれぞれのブロックサイズが不均一である場合であっても、ホスト2は、個々のブロックそれぞれのブロックサイズを認識することができる。 Note that in another embodiment, the block size get command may include a parameter specifying a block number. When receiving a block size get command specifying a certain block number from the host 2, the flash storage device 3 returns the block size of the block having this block number to the host 2. Thereby, even if the block sizes of the blocks included in the NAND flash memory 5 are non-uniform, the host 2 can recognize the block size of each block.

図21は、ブロックサイズゲットコマンドに対するレスポンスを示す。
ブロックサイズゲットコマンドをホスト2から受信した時、フラッシュストレージデバイス3は、ブロックサイズ(NAND型フラッシュメモリ5に含まれるブロックそれぞれの共通のブロックサイズ)をホスト2に返す。この場合、もしブロック番号がブロックサイズゲットコマンドによって指定されていたならば、フラッシュストレージデバイス3は、上述したように、このブロック番号を有するブロックのブロックサイズをホスト2に返す。
FIG. 21 shows a response to the block size get command.
When receiving the block size get command from the host 2, the flash storage device 3 returns the block size (the common block size of the blocks included in the NAND flash memory 5) to the host 2. In this case, if the block number was specified by the block size get command, the flash storage device 3 returns the block size of the block having this block number to the host 2, as described above.

図22は、フラッシュストレージデバイス3に適用されるブロックアロケートコマンドを示す。
ブロックアロケートコマンドは、フラッシュストレージデバイス3にブロック(フリーブロック)の割り当てを要求するコマンド(ブロック割り当て要求)である。ホスト2は、ブロックアロケートコマンドをフラッシュストレージデバイス3に送信することによって、フリーブロックを割り当てるようにフラッシュストレージデバイス3に要求し、これによってブロック番号(割り当てられたフリーブロックのブロック番号)を取得することができる。
FIG. 22 shows a block allocate command applied to flash storage device 3.
The block allocation command is a command (block allocation request) that requests the flash storage device 3 to allocate a block (free block). The host 2 requests the flash storage device 3 to allocate a free block by sending a block allocate command to the flash storage device 3, thereby obtaining a block number (the block number of the allocated free block). I can do it.

フラッシュストレージデバイス3がフリーブロック群をフリーブロックリストによって管理し、ホスト2はフリーブロック群を管理しないケースにおいては、ホスト2は、フリーブロックを割り当てるようにフラッシュストレージデバイス3に要求し、これによってブロック番号を取得する。一方、ホスト2がフリーブロック群を管理するケースにおいては、ホスト2は、フリーブロック群の一つを自身で選択することができるので、ブロックアロケートコマンドをフラッシュストレージデバイス3に送信する必要は無い。 In the case where the flash storage device 3 manages the free blocks by a free block list and the host 2 does not manage the free blocks, the host 2 requests the flash storage device 3 to allocate free blocks, thereby Get the number. On the other hand, in the case where the host 2 manages free block groups, the host 2 can select one of the free block groups by itself, so there is no need to send a block allocate command to the flash storage device 3.

図23は、ブロックアロケートコマンドに対するレスポンスを示す。
ブロックアロケートコマンドをホスト2から受信した時、フラッシュストレージデバイス3は、フリーブロックリストから、ホスト2に割り当てるべきフリーブロックを選択し、選択したフリーブロックのブロック番号を含むレスポンスをホスト2に返す。
FIG. 23 shows the response to the block allocate command.
When receiving the block allocate command from the host 2, the flash storage device 3 selects a free block to be allocated to the host 2 from the free block list, and returns a response including the block number of the selected free block to the host 2.

図24は、ホスト2とフラッシュストレージデバイス3とによって実行されるブロック情報取得処理を示す。
ホスト2がフラッシュストレージデバイス3の使用を開始する時、ホスト2は、まず、最大ブロック番号ゲットコマンドをフラッシュストレージデバイス3に送信する。フラッシュストレージデバイス3のコントローラは、最大ブロック番号をホスト2に返す。最大ブロック番号は、利用可能なブロックの総数を示す。なお、上述のスーパーブロックが使用されるケースにおいては、最大ブロック番号は、利用可能なスーパーブロックの総数を示してもよい。
FIG. 24 shows block information acquisition processing executed by the host 2 and flash storage device 3.
When the host 2 starts using the flash storage device 3, the host 2 first sends a maximum block number get command to the flash storage device 3. The controller of the flash storage device 3 returns the maximum block number to the host 2. The maximum block number indicates the total number of available blocks. Note that in the case where the above-mentioned superblocks are used, the maximum block number may indicate the total number of available superblocks.

次いで、ホスト2は、ブロックサイズゲットコマンドをフラッシュストレージデバイス3に送信して、ブロックサイズを取得する。この場合、ホスト2は、ブロック番号1を指定するブロックサイズゲットコマンド、ブロック番号2を指定するブロックサイズゲットコマンド、ブロック番号3を指定するブロックサイズゲットコマンド、…をフラッシュストレージデバイス3にそれぞれ送信して、全てのブロックそれぞれのブロックサイズを個別に取得してもよい。 Next, the host 2 sends a block size get command to the flash storage device 3 to obtain the block size. In this case, the host 2 sends a block size get command specifying block number 1, a block size get command specifying block number 2, a block size get command specifying block number 3, etc. to the flash storage device 3. The block size of each block may be obtained individually.

このブロック情報取得処理により、ホスト2は、利用可能ブロック数、個々のブロックのブロックサイズを認識することができる。
図25は、ホスト2とフラッシュストレージデバイス3とによって実行される書き込み処理のシーケンスを示す。
ホスト2は、まず、書き込みのために使用すべきブロック(フリーブロック)を自身で選択するか、またはブロックアロケートコマンドをフラッシュストレージデバイス3に送信することによってフリーブロックを割り当てるようにフラッシュストレージデバイス3に要求する。そして、ホスト2は、自身で選択したブロックのブロック番号BLK#(またはフラッシュストレージデバイス3によって割り当てられたフリーブロックのブロック番号BLK#)と、論理アドレス(LBA)と、長さとを含むライトコマンドをフラッシュストレージデバイス3に送信する(ステップS20)。
Through this block information acquisition process, the host 2 can recognize the number of available blocks and the block size of each block.
FIG. 25 shows the sequence of write processing executed by the host 2 and flash storage device 3.
The host 2 first selects a block (free block) to be used for writing by itself or instructs the flash storage device 3 to allocate a free block by sending a block allocate command to the flash storage device 3. request. Then, the host 2 sends a write command that includes the block number BLK# of the block it selected (or the block number BLK# of a free block allocated by the flash storage device 3), the logical address (LBA), and the length. The data is transmitted to the flash storage device 3 (step S20).

フラッシュストレージデバイス3のコントローラ4がこのライトコマンドを受信した時、コントローラ4は、ホスト2からのライトデータを書き込むべき、このブロック番号BLK#を有するブロック(書き込み先ブロックBLK#)内の書き込み先位置を決定し、この書き込み先ブロックBLK#の書き込み先位置にライトデータを書き込む(ステップS11)。ステップS11では、コントローラ4は、論理アドレス(ここではLBA)とライトデータの双方を書き込み先ブロックに書き込んでもよい。 When the controller 4 of the flash storage device 3 receives this write command, the controller 4 determines the write destination position in the block with this block number BLK# (write destination block BLK#) into which the write data from the host 2 is to be written. is determined, and write data is written to the write destination position of this write destination block BLK# (step S11). In step S11, the controller 4 may write both the logical address (LBA here) and the write data to the write destination block.

コントローラ4は、書き込み先ブロックBLK#に対応するブロック管理テーブル32を更新して、書き込まれたデータに対応するビットマップフラグ(つまり、このデータが書き込まれたオフセット(ブロック内オフセット)に対応するビットマップフラグ)を0から1に変更する(ステップS12)。 The controller 4 updates the block management table 32 corresponding to the write destination block BLK#, and updates the bitmap flag corresponding to the written data (that is, the bit corresponding to the offset (intra-block offset) at which this data was written). map flag) from 0 to 1 (step S12).

例えば、図26に示されているように、開始LBAがLBAxである16Kバイト更新データがブロックBLK#1のオフセット+4~+7に対応する物理記憶位置に書き込まれた場合を想定する。この場合、図27に示されているように、ブロックBLK#1用のブロック管理テーブルにおいては、オフセット+4~+7に対応するビットマップフラグそれぞれが0から1に変更される。 For example, as shown in FIG. 26, assume that 16 Kbyte update data whose starting LBA is LBAx is written to physical storage locations corresponding to offsets +4 to +7 of block BLK#1. In this case, as shown in FIG. 27, in the block management table for block BLK#1, each of the bitmap flags corresponding to offsets +4 to +7 is changed from 0 to 1.

そして、図25に示すように、コントローラ4は、このライトコマンドに対するレスポンスをホスト2に返す(ステップS13)。このレスポンスは、このデータが書き込まれたオフセット(ブロック内オフセット)を少なくとも含む。
ホスト2がこのレスポンスを受信した時、ホスト2は、ホスト2によって管理されているLUT411を更新して、書き込まれたライトデータに対応する論理アドレスそれぞれに物理アドレスをマッピングする。図28に示されているように、LUT411は、複数の論理アドレス(例えばLBA)それぞれに対応する複数のエントリを含む。ある論理アドレス(例えばあるLBA)に対応するエントリには、このLBAに対応するデータが格納されているNAND型フラッシュメモリ5内の位置(物理記憶位置)を示す物理アドレスPBA、つまりブロック番号、オフセット(ブロック内オフセット)が格納される。図26に示されているように、開始LBAがLBAxである16Kバイト更新データがブロックBLK#1のオフセット+4~+7に対応する物理記憶位置に書き込まれたならば、図28に示されているように、LUT411が更新されて、LBAxに対応するエントリにBLK#1、オフセット+4が格納され、LBAx+1に対応するエントリにBLK#1、オフセット+5が格納され、LBAx+2に対応するエントリにBLK#1、オフセット+6が格納され、LBAx+3に対応するエントリにBLK#1、オフセット+7が格納される。
Then, as shown in FIG. 25, the controller 4 returns a response to this write command to the host 2 (step S13). This response includes at least the offset (intra-block offset) at which this data was written.
When the host 2 receives this response, the host 2 updates the LUT 411 managed by the host 2 and maps a physical address to each logical address corresponding to the written write data. As shown in FIG. 28, LUT 411 includes multiple entries corresponding to multiple logical addresses (for example, LBA). An entry corresponding to a certain logical address (for example, a certain LBA) contains a physical address PBA indicating the position (physical storage position) in the NAND flash memory 5 where the data corresponding to this LBA is stored, that is, the block number and offset. (intra-block offset) is stored. As shown in FIG. 26, if the 16K byte update data whose starting LBA is LBAx is written to the physical storage locations corresponding to offsets +4 to +7 of block BLK#1, as shown in FIG. As shown in FIG. , offset +6 are stored, and BLK#1 and offset +7 are stored in the entry corresponding to LBAx+3.

図25に示すように、この後、ホスト2は、上述の更新データの書き込みによって不要になった以前のデータを無効化するためのTrimコマンドをフラッシュストレージデバイス3に送信する。図26に示されているように、以前のデータがブロックBLK#0のオフセット+0、オフセット+1、オフセット+2、オフセット+3に対応する位置に格納されている場合には、図29に示すように、ブロック番号(=BLK#0)、オフセット(=+0)、長さ(=4)を指定するTrimコマンドがホスト2からフラッシュストレージデバイス3に送信される。フラッシュストレージデバイス3のコントローラ4は、このTrimコマンドに応じて、ブロック管理テーブル32を更新する(図25、ステップS14)。ステップS15においては、図29に示すように、ブロックBLK#0用のブロック管理テーブルにおいて、オフセット+0~+3に対応するビットマップフラグそれぞれが1から0に変更される。 As shown in FIG. 25, the host 2 then sends a Trim command to the flash storage device 3 to invalidate the previous data that has become unnecessary due to the writing of the update data described above. As shown in FIG. 26, if the previous data is stored in the positions corresponding to offset +0, offset +1, offset +2, and offset +3 of block BLK#0, as shown in FIG. A Trim command specifying the block number (=BLK#0), offset (=+0), and length (=4) is sent from the host 2 to the flash storage device 3. The controller 4 of the flash storage device 3 updates the block management table 32 in response to this Trim command (FIG. 25, step S14). In step S15, as shown in FIG. 29, in the block management table for block BLK#0, each of the bitmap flags corresponding to offsets +0 to +3 is changed from 1 to 0.

図30は、フラッシュストレージデバイス3に適用されるリードコマンドを示す。
リードコマンドは、フラッシュストレージデバイス3にデータの読み出しを要求するコマンドである。このリードコマンドは、コマンドID、物理アドレスPBA、長さ、転送先ポインタを含む。
FIG. 30 shows a read command applied to the flash storage device 3.
The read command is a command that requests the flash storage device 3 to read data. This read command includes a command ID, physical address PBA, length, and transfer destination pointer.

コマンドIDはこのコマンドがリードコマンドであることを示すID(コマンドコード)であり、リードコマンドにはリードコマンド用のコマンドIDが含まれる。
物理アドレスPBAは、データが読み出されるべき最初の物理記憶位置を示す。物理アドレスPBAは、ブロック番号、オフセット(ブロック内オフセット)によって指定される。
The command ID is an ID (command code) indicating that this command is a read command, and the read command includes a command ID for the read command.
Physical address PBA indicates the first physical storage location from which data is to be read. The physical address PBA is specified by a block number and an offset (intra-block offset).

長さは、リードすべきデータの長さを示す。このデータ長は、Grainの数によって指定可能である。
転送先ポインタは、読み出されたデータが転送されるべきホスト2内のメモリ上の位置を示す。
一つのリードコマンドは、物理アドレスPBA(ブロック番号、オフセット)と長さの組を複数指定することができる。
Length indicates the length of data to be read. This data length can be specified by the number of grains.
The transfer destination pointer indicates the location in the memory within the host 2 to which the read data is to be transferred.
One read command can specify multiple pairs of physical address PBA (block number, offset) and length.

図31は、リード動作を示す。
ここでは、ブロック番号(=BLK#2)、オフセット(=+5)、長さ(=3)を指定するリードコマンドがホスト2から受信された場合が想定されている。フラッシュストレージデバイス3のコントローラ4は、ブロック番号(=BLK#2)、オフセット(=+5)、長さ(=3)に基づいて、BLK#2からデータd1~d3をリードする。この場合、コントローラ4は、BLK#2のページ1から1ページサイズ分のデータをリードし、このリードデータからデータd1~データd3を抽出する。次いで、コントローラ4は、データd1~データd3を、転送先ポインタによって指定されるホストメモリ上に転送する。
FIG. 31 shows a read operation.
Here, it is assumed that a read command specifying a block number (=BLK#2), an offset (=+5), and a length (=3) is received from the host 2. The controller 4 of the flash storage device 3 reads data d1 to d3 from BLK#2 based on the block number (=BLK#2), offset (=+5), and length (=3). In this case, the controller 4 reads one page size worth of data from page 1 of BLK#2, and extracts data d1 to data d3 from this read data. Next, the controller 4 transfers the data d1 to data d3 onto the host memory specified by the transfer destination pointer.

図32は、ホスト2からのリードコマンドに応じて、異なる物理記憶位置にそれぞれ格納されているデータ部をリードする動作を示す。
ここでは、ブロック番号(=BLK#2)、オフセット(=+10)、長さ(=2)、ブロック番号(=BLK#2)、オフセット(=+16)、長さ(=4)を指定するリードコマンドがホスト2から受信された場合が想定されている。フラッシュストレージデバイス3のコントローラ4は、ブロック番号(=BLK#2)、オフセット(=+10)、長さ(=2)に基づいて、BLK#2のページ2から1ページサイズ分のデータをリードし、このリードデータからデータd1~データd2を抽出する。次いで、コントローラ4は、ブロック番号(=BLK#2)、オフセット(=+16)、長さ(=4)に基づいて、BLK#2のページ4から1ページサイズ分のデータ(データd3~データd6)をリードする。そして、コントローラ4は、データd1~データd2とデータd3~データd6とを結合することによって得られる長さ(=6)のリードデータを、リードコマンド内の転送先ポインタによって指定されるホストメモリ上に転送する。
FIG. 32 shows the operation of reading data portions stored in different physical storage locations in response to a read command from the host 2.
Here, the read that specifies the block number (=BLK#2), offset (=+10), length (=2), block number (=BLK#2), offset (=+16), and length (=4) is used. It is assumed that the command is received from host 2. The controller 4 of the flash storage device 3 reads one page size worth of data from page 2 of BLK#2 based on the block number (=BLK#2), offset (=+10), and length (=2). , extracts data d1 to data d2 from this read data. Next, the controller 4 extracts one page size worth of data (data d3 to data d6) from page 4 of BLK#2 based on the block number (=BLK#2), offset (=+16), and length (=4). ) to lead. Then, the controller 4 transfers the read data of length (=6) obtained by combining data d1 to data d2 and data d3 to data d6 to the host memory specified by the transfer destination pointer in the read command. Transfer to.

これにより、たとえブロック内に不良ページが存在する場合であっても、リードエラーを引き起こすことなく、別個の物理記憶位置からデータ部をリードすることができる。また、たとえデータが2つのブロックに跨がって書き込まれている場合であっても、このデータを一つのリードコマンドの発行によってリードすることができる。 This allows data portions to be read from separate physical storage locations without causing read errors even if there are bad pages within the block. Furthermore, even if data is written across two blocks, this data can be read by issuing one read command.

図33は、ホスト2とフラッシュストレージデバイス3とによって実行されるリード処理のシーケンスを示す。
ホスト2は、ホスト2によって管理されているLUT411を参照して、ユーザアプリケーションからのリード要求に含まれる論理アドレスをブロック番号、オフセットに変換する。そして、ホスト2は、このブロック番号、オフセット、長さを指定するリードコマンドをフラッシュストレージデバイス3に送信する。
FIG. 33 shows the sequence of read processing executed by the host 2 and flash storage device 3.
The host 2 refers to the LUT 411 managed by the host 2 and converts the logical address included in the read request from the user application into a block number and offset. Then, the host 2 sends a read command specifying this block number, offset, and length to the flash storage device 3.

フラッシュストレージデバイス3のコントローラ4がリードコマンドをホスト2から受信した時、コントローラ4は、このリードコマンドによって指定されたブロック番号に対応するブロックをリード対象のブロックとして決定するとともに、このリードコマンドによって指定されたオフセットに基づいてリード対象のページを決定する(ステップS31)。ステップS31では、コントローラ4は、まず、リードコマンドによって指定されたオフセットを、ページサイズを表す粒度の数(ここでは、4)で除算してもよい。そして、コントローラ4は、この除算によって得られる商および余りを、リード対象のページ番号およびリード対象のページ内オフセット位置としてそれぞれ決定してもよい。 When the controller 4 of the flash storage device 3 receives a read command from the host 2, the controller 4 determines the block corresponding to the block number specified by this read command as the block to be read, and the block specified by this read command. The page to be read is determined based on the offset (step S31). In step S31, the controller 4 may first divide the offset specified by the read command by the number of granularity (4 in this case) representing the page size. Then, the controller 4 may determine the quotient and remainder obtained by this division as the page number of the read target and the intra-page offset position of the read target, respectively.

コントローラ4は、ブロック番号、オフセット、長さによって規定されるデータをNAND型フラッシュメモリ5からリードし(ステップS32)、このリードデータをホスト2に送信する。
図34は、フラッシュストレージデバイス3に適用されるGC制御コマンドを示す。
The controller 4 reads data defined by the block number, offset, and length from the NAND flash memory 5 (step S32), and transmits this read data to the host 2.
FIG. 34 shows GC control commands applied to the flash storage device 3.

GC制御コマンドは、GCソースブロック番号およびGCデスティネーションブロック番号をフラッシュストレージデバイス3に通知するために使用される。ホスト2は、各ブロックの有効データ量/無効データ量を管理しており、有効データ量がより少ない幾つかのブロックをGCソースブロックとして選択することができる。また、ホスト2は、フリーブロックリストを管理しており、幾つかのフリーブロックをGCデスティネーションブロックとして選択することができる。このGC制御コマンドは、コマンドID、GCソースブロック番号、GCデスティネーションブロック番号、等を含んでもよい。 The GC control command is used to notify the flash storage device 3 of the GC source block number and the GC destination block number. The host 2 manages the valid data amount/invalid data amount of each block, and can select some blocks with smaller valid data amounts as GC source blocks. The host 2 also manages a free block list and can select some free blocks as GC destination blocks. This GC control command may include a command ID, a GC source block number, a GC destination block number, and the like.

コマンドIDはこのコマンドがGC制御コマンドであることを示すID(コマンドコード)であり、GC制御コマンドにはGC制御コマンド用のコマンドIDが含まれる。
GCソースブロック番号は、GCソースブロックを示すブロック番号である。ホスト2は、どのブロックをGCソースブロックとすべきかを指定することができる。ホスト2は、複数のGCソースブロック番号を一つのGC制御コマンドに設定してもよい。
The command ID is an ID (command code) indicating that this command is a GC control command, and the GC control command includes a command ID for the GC control command.
The GC source block number is a block number indicating a GC source block. The host 2 can specify which block should be the GC source block. The host 2 may set multiple GC source block numbers in one GC control command.

GCデスティネーションブロック番号は、GCデスティネーションブロックを示すブロック番号である。ホスト2は、どのブロックをGCデスティネーションブロックとすべきかを指定することができる。ホスト2は、複数のGCデスティネーションブロック番号を一つのGC制御コマンドに設定してもよい。 The GC destination block number is a block number indicating the GC destination block. The host 2 can specify which block should be the GC destination block. The host 2 may set multiple GC destination block numbers in one GC control command.

図35は、GC用コールバックコマンドを示す。
GC用コールバックコマンドは、GCによってコピーされた有効データの論理アドレスとこの有効データのコピー先位置を示すブロック番号およびオフセットとをホスト2に通知するために使用される。
GC用コールバックコマンドは、コマンドID、論理アドレス、長さ、デスティネーション物理アドレスを含んでよい。
FIG. 35 shows a GC callback command.
The GC callback command is used to notify the host 2 of the logical address of valid data copied by the GC, and the block number and offset indicating the copy destination position of this valid data.
The GC callback command may include a command ID, logical address, length, and destination physical address.

コマンドIDはこのコマンドがGC用コールバックコマンドであることを示すID(コマンドコード)であり、GC用コールバックコマンドにはGC用コールバックコマンド用のコマンドIDが含まれる。
論理アドレスは、GCによってGCソースブロックからGCデスティネーションブロックにコピーされた有効データの論理アドレスを示す。
The command ID is an ID (command code) indicating that this command is a GC callback command, and the GC callback command includes a command ID for the GC callback command.
The logical address indicates the logical address of valid data copied from the GC source block to the GC destination block by the GC.

長さは、このコピーされたデータの長さを示す。このデータ長は、粒度(Grain)の数によって指定されてもよい。
デスティネーション物理アドレスは、有効データがコピーされたGCデスティネーションブロック内の位置を示す。デスティネーション物理アドレスは、ブロック番号、オフセット(ブロック内オフセット)によって指定される。
Length indicates the length of this copied data. This data length may be specified by the number of grains.
The destination physical address indicates the location within the GC destination block where valid data has been copied. The destination physical address is specified by a block number and an offset (intra-block offset).

図36は、ガベージコレクション(GC)動作の手順を示す。
例えば、ホスト2は、ホスト2によって管理されているフリーブロックリストに含まれている残りフリーブロックの数が閾値以下に低下した場合、GCソースブロックおよびGCデスティネーションブロックを選択し、選択されたGCソースブロックおよび選択されたGCデスティネーションブロックを指定するGC制御コマンドをフラッシュストレージデバイス3に送信する(ステップS41)。あるいは、ライト処理部412がフリーブロック群を管理する構成においては、残りフリーブロックの数が閾値以下に低下した際にライト処理部412がホスト2にその旨通知を行ない、通知を受信したホスト2がブロック選択およびGC制御コマンドの送信を行なってもよい。
FIG. 36 shows the procedure of garbage collection (GC) operation.
For example, when the number of remaining free blocks included in the free block list managed by host 2 falls below a threshold, host 2 selects a GC source block and a GC destination block, and selects a GC source block and a GC destination block. A GC control command specifying the source block and the selected GC destination block is transmitted to the flash storage device 3 (step S41). Alternatively, in a configuration in which the write processing unit 412 manages free block groups, when the number of remaining free blocks falls below a threshold, the write processing unit 412 notifies the host 2 to that effect, and the host 2 that receives the notification may perform block selection and transmit GC control commands.

このGC制御コマンドを受信すると、フラッシュストレージデバイス3のコントローラ4は、GCソースブロック内の有効データを書き込むべきGCデスティネーションブロック内の位置(コピー先位置)を決定する動作と、GCソースブロック内の有効データをGCデスティネーションブロック内のコピー先位置にコピーする動作とを含むデータコピー動作を実行する(ステップS51)。ステップS51では、コントローラ4は、GCソースブロック(コピー元ブロック)内の有効データのみならず、この有効データとこの有効データに対応する論理アドレスの双方を、GCソースブロック(コピー元ブロック)からGCデスティネーションブロック(コピー先ブロック)にコピーする。これにより、GCデスティネーションブロック(コピー先ブロック)内にデータと論理アドレスとのペアを保持することができる。 Upon receiving this GC control command, the controller 4 of the flash storage device 3 determines the position (copy destination position) in the GC destination block where valid data in the GC source block should be written, and A data copy operation including an operation of copying valid data to a copy destination position in the GC destination block is executed (step S51). In step S51, the controller 4 transfers not only the valid data in the GC source block (copy source block) but also both this valid data and the logical address corresponding to this valid data from the GC source block (copy source block). Copy to the destination block (copy destination block). Thereby, a pair of data and a logical address can be held in the GC destination block (copy destination block).

また、ステップS51では、GCソースブロック内の全ての有効データのコピーが完了するまでデータコピー動作が繰り返し実行される。複数のGCソースブロックがGC制御コマンドによって指定された場合には、全てのGCソースブロック内の全ての有効データのコピーが完了するまでデータコピー動作が繰り返し実行される。 Furthermore, in step S51, the data copy operation is repeatedly executed until all valid data in the GC source block has been copied. If multiple GC source blocks are specified by the GC control command, the data copy operation is repeatedly performed until all valid data in all GC source blocks has been copied.

そして、コントローラ4は、コピーされた有効データ毎に、その有効データの論理アドレス(LBA)と、その有効データのコピー先位置を示すデスティネーション物理アドレス等を、GC用コールバックコマンドを使用してホスト2に通知する(ステップS52)。ある有効データに対応するデスティネーション物理アドレスは、この有効データがコピーされたコピー先ブロック(GCデスティネーションブロック)のブロック番号と、この有効データがコピーされたコピー先ブロック内の物理記憶位置を示すブロック内物理アドレス(ブロック内オフセット)とによって表される。 Then, for each copied valid data, the controller 4 uses a GC callback command to send the logical address (LBA) of the valid data, the destination physical address indicating the copy destination position of the valid data, etc. The host 2 is notified (step S52). The destination physical address corresponding to certain valid data indicates the block number of the copy destination block (GC destination block) to which this valid data has been copied and the physical storage location within the copy destination block to which this valid data has been copied. It is represented by an intra-block physical address (intra-block offset).

ホスト2がこのGC用コールバックコマンドを受信した時、ホスト2は、ホスト2によって管理されているLUT411を更新して、コピーされた各有効データに対応する論理アドレスにデスティネーション物理アドレス(ブロック番号、ブロック内オフセット)をマッピングする(ステップS42)。 When host 2 receives this GC callback command, host 2 updates the LUT 411 managed by host 2 and assigns a destination physical address (block number) to the logical address corresponding to each copied valid data. , intra-block offset) (step S42).

図37は、GCのために実行されるデータコピー動作の例を示す。
図37では、GCソースブロック(ここではブロックBLK#50)のオフセット+4に対応する位置に格納されている有効データ(LBA=10)が、GCデスティネーションブロック(ここではブロックBLK#100)のオフセット+0に対応する位置にコピーされ、GCソースブロック(ここではブロックBLK#50)のオフセット+10に対応する位置に格納されている有効データ(LBA=20)が、GCデスティネーションブロック(ここではブロックBLK#100)のオフセット+1に対応する位置にコピーされた場合が想定されている。この場合、コントローラ4は、{LBA10、BLK#100、オフセット(=+0)、LBA20、BLK#100、オフセット(=+1)}をホストに通知する(GC用コールバック処理)。
FIG. 37 shows an example of a data copy operation performed for GC.
In FIG. 37, valid data (LBA=10) stored at a position corresponding to offset +4 of the GC source block (here, block BLK#50) is offset from the GC destination block (here, block BLK#100). The valid data (LBA=20) copied to the position corresponding to +0 and stored at the position corresponding to offset +10 of the GC source block (block BLK#50 here) is copied to the position corresponding to offset +10 of the GC destination block (block BLK#50 here). #100) is assumed to be copied to a position corresponding to offset +1. In this case, the controller 4 notifies the host of {LBA10, BLK#100, offset (=+0), LBA20, BLK#100, offset (=+1)} (GC callback process).

図38は、図37のデータコピー動作の結果に基づいて更新されるホスト2のLUT411の内容を示す。
このLUT411においては、LBA10に対応するブロック番号およびオフセットは、BLK#50、オフセット(=+4)から、BLK#100、オフセット(=+0)に更新される。同様に、LBA20に対応するブロック番号およびオフセットは、BLK#50、オフセット(=+10)から、BLK#100、オフセット(=+1)に更新される。
FIG. 38 shows the contents of the LUT 411 of host 2 that is updated based on the result of the data copy operation of FIG. 37.
In this LUT 411, the block number and offset corresponding to LBA10 are updated from BLK#50, offset (=+4) to BLK#100, offset (=+0). Similarly, the block number and offset corresponding to LBA20 are updated from BLK#50, offset (=+10) to BLK#100, offset (=+1).

LUT411が更新された後、ホスト2は、BLK#50およびオフセット(=+4)を指定するTrimコマンドをフラッシュストレージデバイス3に送信して、BLK#50のオフセット(=+4)に対応する位置に格納されているデータを無効化してもよい。さらに、ホスト2は、BLK#50およびオフセット(=+10)を指定するTrimコマンドをフラッシュストレージデバイス3に送信して、BLK#50のオフセット(=+10)に対応する位置に格納されているデータを無効化してもよい。あるいは、ホスト2からTrimコマンドを送信せず、GC処理の一環としてコントローラ4がブロック管理テーブル32を更新してこれらのデータを無効化してもよい。 After the LUT 411 is updated, the host 2 sends a Trim command specifying BLK#50 and offset (=+4) to the flash storage device 3, and stores it in the position corresponding to the offset (=+4) of BLK#50. You may invalidate the data that has been set. Furthermore, the host 2 sends a Trim command that specifies BLK#50 and an offset (=+10) to the flash storage device 3 to remove the data stored in the location corresponding to the offset (=+10) of BLK#50. May be disabled. Alternatively, the controller 4 may update the block management table 32 and invalidate these data as part of the GC processing without transmitting the Trim command from the host 2.

以上説明したように、本実施形態によれば、第1の論理アドレスと第1のブロック番号とを指定するライト要求をホスト2から受信した場合、フラッシュストレージデバイス3のコントローラ4は、ホスト2からのデータを書き込むべき、第1のブロック番号を有するブロック(書き込み先ブロック)内の位置(書き込み先位置)を決定し、ホスト2からのデータを書き込み先ブロックの書き込み先位置に書き込み、第1の位置を示す第1のブロック内物理アドレス、または第1の論理アドレスと第1のブロック番号と第1のブロック内物理アドレスとの組のいずれかを、ホスト2に通知する。 As explained above, according to this embodiment, when a write request specifying a first logical address and a first block number is received from the host 2, the controller 4 of the flash storage device 3 receives the write request from the host 2. The position (destination position) in the block having the first block number (destination block) to which the data of 2 is to be written is determined, the data from the host 2 is written to the destination position of the destination block, and the The host 2 is notified of either the first in-block physical address indicating the location or the set of the first logical address, first block number, and first in-block physical address.

したがって、ホスト2がブロック番号をハンドリングし、フラッシュストレージデバイス3がページ書き込み順序制約/バッドページ等を考慮して、ホスト2によって指定されるブロック番号を有するブロック内の書き込み先位置(ブロック内オフセット)を決定するという構成を実現できる。ホスト2がブロック番号をハンドリングすることにより、上位階層(ホスト2)のアプリケーションレベルアドレス変換テーブルと従来型SSDのLUTレベルアドレス変換テーブルとのマージを実現できる。また、フラッシュストレージデバイス3は、NAND型フラッシュメモリ5の特徴/制約を考慮してNAND型フラッシュメモリ5を制御することができる。さらに、ホスト2はブロック境界を認識することができるので、ブロック境界/ブロックサイズを考慮してユーザデータを各ブロックに書き込むことができる。これにより、ホスト2が同一ブロック内のデータをデータ更新等によって一斉に無効化する等の制御を行うことが可能となるので、GCが実行される頻度を下げることが可能となる。この結果、ライトアンプリフィケーションが低下され、フラッシュストレージデバイス3の性能の向上、フラッシュストレージデバイス3の寿命の最大化を実現できる。 Therefore, the host 2 handles the block number, and the flash storage device 3 takes into account page write order constraints/bad pages, etc., and determines the write destination position (intra-block offset) within the block having the block number specified by the host 2. It is possible to realize a configuration in which the By the host 2 handling the block number, it is possible to realize the merging of the application level address translation table of the upper layer (host 2) and the LUT level address translation table of the conventional SSD. Further, the flash storage device 3 can control the NAND flash memory 5 in consideration of the characteristics/constraints of the NAND flash memory 5. Furthermore, since the host 2 can recognize block boundaries, it can write user data into each block taking the block boundaries/block size into consideration. This makes it possible for the host 2 to perform control such as invalidating data in the same block all at once by updating data, etc., thereby making it possible to reduce the frequency at which GC is executed. As a result, write amplification is reduced, the performance of the flash storage device 3 can be improved, and the life of the flash storage device 3 can be maximized.

したがって、ホスト2とフラッシュストレージデバイス3との間の適切な役割分担を実現でき、これによってホスト2とフラッシュストレージデバイス3とを含むシステム全体のI/O性能の向上を図ることができる。
また、ガベージコレクションのためのコピー元ブロック番号およびコピー先ブロック番号を指定する制御コマンドをホスト2から受信した場合、フラッシュストレージデバイス3のコントローラ4は、複数のブロックから、コピー元ブロック番号を有する第2のブロックとコピー先ブロック番号を有する第3のブロックとを選択し、第2のブロックに格納されている有効データを書き込むべき第3のブロック内のコピー先位置を決定し、有効データを第3のブロックのコピー先位置にコピーする。そして、コントローラは、有効データの論理アドレスと、コピー先ブロック番号と、第3のブロック内のコピー先位置を示す第2のブロック内物理アドレスとを、ホスト2に通知する。これにより、GCにおいても、ホスト2がブロック番号(コピー元ブロック番号、コピー先ブロック番号)のみをハンドリングし、フラッシュストレージデバイス3がコピー先ブロック内のコピー先位置を決定する、という構成を実現できる。
Therefore, appropriate division of roles between the host 2 and the flash storage device 3 can be realized, and thereby the I/O performance of the entire system including the host 2 and the flash storage device 3 can be improved.
Further, when receiving a control command from the host 2 that specifies a copy source block number and a copy destination block number for garbage collection, the controller 4 of the flash storage device 3 selects the first block number having the copy source block number from among the plurality of blocks. 2 and a third block having the copy destination block number, determine the copy destination position in the third block to which the valid data stored in the second block is to be written, and write the valid data to the third block. Copy to the copy destination position of block 3. Then, the controller notifies the host 2 of the logical address of the valid data, the copy destination block number, and the physical address within the second block indicating the copy destination position within the third block. As a result, even in GC, it is possible to realize a configuration in which the host 2 only handles block numbers (copy source block number, copy destination block number), and the flash storage device 3 determines the copy destination position within the copy destination block. .

なお、フラッシュストレージデバイス3は、ストレージアレイ内に設けられる複数のフラッシュストレージデバイス3の一つとして利用されてもよい。ストレージアレイは、サーバ計算機のような情報処理装置にケーブルまたはネットワークを介して接続されてもよい。ストレージアレイは、このストレージアレイ内の複数のフラッシュストレージデバイス3を制御するコントローラを含む。フラッシュストレージデバイス3がストレージアレイに適用された場合には、このストレージアレイのコントローラが、フラッシュストレージデバイス3のホスト2として機能してもよい。 Note that the flash storage device 3 may be used as one of a plurality of flash storage devices 3 provided within a storage array. The storage array may be connected to an information processing device such as a server computer via a cable or a network. The storage array includes a controller that controls multiple flash storage devices 3 within the storage array. If the flash storage device 3 is applied to a storage array, the controller of this storage array may function as the host 2 of the flash storage device 3.

また、本実施形態では、不揮発性メモリとしてNAND型フラッシュメモリを例示した。しかし、本実施形態の機能は、例えば、MRAM(Magnetoresistive
Random Access Memory)、PRAM(Phase change
Random Access Memory)、ReRAM(Resistive Random Access Memory)、又は、FeRAM(Ferroelectric Random Access Memory)のような他の様々な不揮発性メモリにも適用できる。
Further, in this embodiment, a NAND flash memory is exemplified as a nonvolatile memory. However, the functions of this embodiment are, for example, MRAM (Magnetoresistive
Random Access Memory), PRAM (Phase change
It is also applicable to various other non-volatile memories such as Random Access Memory (Random Access Memory), ReRAM (Resistive Random Access Memory), or FeRAM (Ferroelectric Random Access Memory).

図39は、ホスト2とフラッシュストレージデバイス3とのシステムアーキテクチャを示す。具体的には、図39は、ホスト2に含まれるライトデータバッファ51およびフラッシュトランスレーション部52と、フラッシュストレージデバイス3に含まれるライト動作制御部21、リード動作制御部22および(GC動作制御部23を含む)最適化処理部53との関係を示す。 FIG. 39 shows the system architecture of the host 2 and flash storage device 3. Specifically, FIG. 39 shows the write data buffer 51 and flash translation unit 52 included in the host 2, and the write operation control unit 21, read operation control unit 22, and (GC operation control unit) included in the flash storage device 3. 23) shows the relationship with the optimization processing unit 53 (including 23).

ホスト2は、ライトデータをホストメモリ上のライトデータバッファ51に格納し、そしてライトコマンドをフラッシュストレージデバイス3に発行する。このライトコマンドは、このライトデータが存在するライトデータバッファ51上の位置を示すデータポインタと、このライトデータを識別するタグ(例えばLBA)と、このライトデータの長さと、ライトデータが書き込まれるべきブロックを示す識別子(ブロックアドレス、またはストリームID)とを含んでいてもよい。 The host 2 stores write data in a write data buffer 51 on the host memory, and issues a write command to the flash storage device 3. This write command includes a data pointer indicating the position on the write data buffer 51 where this write data exists, a tag (for example, LBA) that identifies this write data, the length of this write data, and the location where the write data should be written. It may also include an identifier indicating the block (block address or stream ID).

フラッシュストレージデバイス3は、以下のタイプ#1-ストレージデバイス、タイプ#2-ストレージデバイス、タイプ#3-ストレージデバイスのうちの任意のストレージデバイスとして実現されうる。
タイプ#1-ストレージデバイスは、ホスト2が、データが書き込まれるべきブロックとこのデータが書き込まれるべきページアドレスの双方を指定するタイプのストレージデバイスである。タイプ#1-ストレージデバイスに適用されるライトコマンドは、ブロックアドレス、ページアドレス、データポインタ、長さを含む。ブロックアドレスは、ホスト2から受信されるライトデータが書き込まれるべきブロックを指定する。ページアドレスは、このライトデータが書き込まれるべきこのブロック内のページを指定する。データポインタは、このライトデータが存在するホスト2内のメモリ上の位置を示す。長さは、このライトデータの長さを示す。
The flash storage device 3 may be implemented as any of the following storage devices: type #1-storage device, type #2-storage device, type #3-storage device.
Type #1 - Storage Device is a type of storage device in which the host 2 specifies both the block where data is to be written and the page address where this data is to be written. Type #1 - Write commands applied to storage devices include block address, page address, data pointer, length. The block address specifies the block into which write data received from the host 2 is to be written. The page address specifies the page within this block to which this write data is to be written. The data pointer indicates the location in the memory within the host 2 where this write data exists. The length indicates the length of this write data.

タイプ#2-ストレージデバイスは、ホスト2がデータが書き込まれるべきブロックを指定し、ストレージデバイスがこのデータが書き込まれるべきこのブロック内の位置(ページ)を指定するタイプのストレージデバイスである。タイプ#2-ストレージデバイスに適用されるライトコマンドは、書き込まれるべきライトデータを識別するためのタグ(例えば、LBA、キー)、ブロックアドレス、データポインタ、長さを含む。さらに、ライトコマンドは、QoSドメインIDを含んでもよい。QoSドメインIDは、NAND型フラッシュメモリを論理的に分割することによって得られる複数の領域の一つを指定する。複数の領域の各々は、複数のブロックを含む。タイプ#2-ストレージデバイスは、不良ページ、ページ書き込み順序の制約を考慮して、データが書き込まれるべきページを決定することができる。 Type #2 - Storage device is a type of storage device where the host 2 specifies the block where data is to be written and the storage device specifies the location (page) within this block where this data is to be written. Type #2 - A write command applied to a storage device includes a tag (eg, LBA, key), block address, data pointer, length to identify the write data to be written. Furthermore, the write command may include a QoS domain ID. The QoS domain ID specifies one of multiple areas obtained by logically dividing the NAND flash memory. Each of the multiple regions includes multiple blocks. Type #2 - The storage device can consider bad pages, page write order constraints, and decide which page the data should be written to.

つまり、フラッシュストレージデバイス3がタイプ#2-ストレージデバイスとして実現されているケースにおいては、フラッシュストレージデバイス3は、ブロックをホスト2にハンドリングさせつつ、ページ書き込み順序制約、バッドページ、ページサイズ等を隠蔽することができる。この結果、ホスト2は、ブロック境界を認識でき、且つページ書き込み順序制約、バッドページ、ページサイズについては意識することなく、どのユーザデータがどのブロックに存在するかを管理することができる。 In other words, in the case where the flash storage device 3 is implemented as a type #2 storage device, the flash storage device 3 allows the host 2 to handle blocks while hiding page write order constraints, bad pages, page sizes, etc. can do. As a result, the host 2 can recognize block boundaries and manage which user data resides in which block without being aware of page write order constraints, bad pages, and page sizes.

タイプ#3-ストレージデバイスは、ホスト2がデータを識別するタグ(例えばLBA)を指定し、ストレージデバイスがこのデータが書き込まれるべきブロックおよびページの双方を決定するタイプのストレージデバイスである。タイプ#3-ストレージデバイスに適用されるライトコマンドは、書き込まれるべきライトデータを識別するためのタグ(例えば、LBA、キー)、ストリームID、データポインタ、長さを含む。ストリームIDは、このライトデータに関連付けられたストリームの識別子である。フラッシュストレージデバイス3がタイプ#3-ストレージデバイスとして実現されているケースにおいては、フラッシュストレージデバイス3は、ストリームIDそれぞれとブロックアドレスそれぞれとの間のマッピングを管理する管理テーブルを参照して、このライトデータが書き込まれるべきブロックを決定する。さらに、フラッシュストレージデバイス3は、論理物理アドレス変換テーブルと称されるアドレス変換テーブルを使用して、タグ(LBA)それぞれとNAND型フラッシュメモリの物理アドレスそれぞれとの間のマッピングを管理する。 Type #3 - Storage Device is a type of storage device in which the host 2 specifies a tag (eg, LBA) that identifies the data, and the storage device determines both the block and page to which this data is written. Type #3 - A write command applied to a storage device includes a tag (eg, LBA, key), stream ID, data pointer, length to identify the write data to be written. The stream ID is an identifier of a stream associated with this write data. In the case where the flash storage device 3 is realized as a type #3-storage device, the flash storage device 3 performs this write processing by referring to a management table that manages the mapping between each stream ID and each block address. Determine the block to which data should be written. Furthermore, the flash storage device 3 uses an address translation table called a logical-physical address translation table to manage the mapping between each tag (LBA) and each physical address of the NAND flash memory.

フラッシュストレージデバイス3がタイプ#1-ストレージデバイスとして実現されている場合、フラッシュストレージデバイス3においては、ライト動作制御部21の制御の下、このブロックの識別子によって指定される書き込み先ブロックの書き込み動作の進行に合わせて、ライトデータバッファ51から内部バッファ(共有キャッシュ)31へのデータ転送がDMACによって実行される。このデータ転送は、NAND型フラッシュメモリ5のデータ書き込み単位と同じデータサイズの単位で実行される。ライト動作制御部21の制御の下、書き込むべきライトデータが、内部バッファ(共有キャッシュ)31から、この書き込み先ブロックを含むNAND型フラッシュメモリチップ15に転送され、そして、ライト動作制御部21からこのNAND型フラッシュメモリチップ15に書き込み指示用のNANDコマンドが送出される。 When the flash storage device 3 is realized as a type #1 storage device, the flash storage device 3 performs a write operation of the write destination block specified by the identifier of this block under the control of the write operation control unit 21. As the process progresses, data transfer from the write data buffer 51 to the internal buffer (shared cache) 31 is executed by the DMAC. This data transfer is performed in units of the same data size as the data writing unit of the NAND flash memory 5. Under the control of the write operation control section 21, the write data to be written is transferred from the internal buffer (shared cache) 31 to the NAND flash memory chip 15 that includes this write destination block, and then from the write operation control section 21 to this write destination block. A NAND command for writing instructions is sent to the NAND flash memory chip 15.

フラッシュストレージデバイス3がタイプ#2-ストレージデバイスとして実現されている場合には、ライト動作制御部21は、ホスト2から受信されるブロック割り当て要求に応答して、フリーブロックの一つを書き込み先ブロックとしてホスト2に割り当てる処理も実行する。ブロック割り当て要求は、QoSドメインIDを含んでいてもよい。ライト制御部21は、このQoSドメインIDに属するフリーブロックの一つを書き込み先ブロックとして決定し、この書き込み先ブロックのブロックアドレスをホスト2に通知する。これにより、ホスト2は、このブロックアドレスと、データポインタと、タグ(例えばLBA)と、長さとを指定するライトコマンドを発行することができる。このライトデータがこの書き込み先ブロックに書き込まれた後、ライト動作制御部21は、このライトデータが書き込まれた書き込み先ブロックを示すブロックアドレスと、このライトデータが書き込まれたこの書き込み先ブロック内のページを示すページアドレスと、このライトデータのタグ(例えばLBA)とをホスト2に通知する。ホスト2のフラッシュトランスレーション部52は、タグ(例えばLBA)それぞれとNAND型フラッシュメモリ5の物理アドレス(ブロックアドレス、ページアドレス、等)それぞれとの間のマッピングを管理するアドレス変換テーブルであるLUT411を含む。ブロックアドレス、ページアドレス、およびタグ(例えばLBA)がフラッシュストレージデバイス3から通知された場合、フラッシュトランスレーション部52は、LUT411を更新し、通知されたタグ(例えばLBA)に、通知された物理アドレス(ブロックアドレス、ページアドレス)をマッピングする。フラッシュトランスレーション部52は、LUT411を参照することによって、リード要求に含まれるタグ(例えばLBA)を物理アドレス(ブロックアドレス、ページアドレス)に変換することができ、これによって物理アドレスを含むリードコマンドをフラッシュストレージデバイス3に発行することができる。 If the flash storage device 3 is implemented as a type #2 storage device, the write operation control unit 21 assigns one of the free blocks to the write destination block in response to a block allocation request received from the host 2. It also executes the process of allocating it to host 2 as a host. The block allocation request may include a QoS domain ID. The write control unit 21 determines one of the free blocks belonging to this QoS domain ID as a write destination block, and notifies the host 2 of the block address of this write destination block. This allows the host 2 to issue a write command that specifies this block address, data pointer, tag (for example, LBA), and length. After this write data is written to this write destination block, the write operation control unit 21 sends the block address indicating the write destination block to which this write data has been written, and the block address in this write destination block to which this write data has been written. The page address indicating the page and the tag (for example, LBA) of this write data are notified to the host 2. The flash translation unit 52 of the host 2 runs an LUT 411 that is an address translation table that manages mapping between each tag (for example, LBA) and each physical address (block address, page address, etc.) of the NAND flash memory 5. include. When the block address, page address, and tag (for example, LBA) are notified from the flash storage device 3, the flash translation unit 52 updates the LUT 411 and assigns the notified physical address to the notified tag (for example, LBA). (block address, page address). The flash translation unit 52 can convert the tag (for example, LBA) included in the read request into a physical address (block address, page address) by referring to the LUT 411, and thereby converts the read command including the physical address. It can be issued to the flash storage device 3.

フラッシュストレージデバイス3がタイプ#1-ストレージデバイスまたはタイプ#2-ストレージデバイスとして実現されている場合、リード動作制御部22は、リードコマンドに含まれる物理アドレスに基づき、NAND型フラッシュメモリチップ15に読み出し指示用のNANDコマンドを送出する。フラッシュストレージデバイス3がタイプ#3-ストレージデバイスとして実現されている場合には、リード動作制御部22は、アドレス変換テーブルを参照して、リードコマンドに含まれるタグ(LBA)に対応する物理アドレスを取得し、取得した物理アドレスに基づき、NAND型フラッシュメモリチップ15に読み出し指示用のNANDコマンドを送出する。 When the flash storage device 3 is implemented as a type #1 storage device or a type #2 storage device, the read operation control unit 22 performs read operations on the NAND flash memory chip 15 based on the physical address included in the read command. Sends an instruction NAND command. If the flash storage device 3 is implemented as a type #3 storage device, the read operation control unit 22 refers to the address conversion table and determines the physical address corresponding to the tag (LBA) included in the read command. Based on the obtained physical address, a NAND command for instructing the NAND flash memory chip 15 to read is sent.

リード動作制御部22の制御の下、NAND型フラッシュメモリチップ15から読み出されたデータは、内部バッファ(共有キャッシュ)31に転送される。そして、リード動作制御部22の制御の下、内部バッファ(共有キャッシュ)31からホスト2へのデータ転送がDMACによって実行される。また、リード動作制御部22は、読み出すべきリードデータがホスト2のライトデータバッファ51内に存在する場合、ライトデータバッファ51からリードデータを取得することができる。あるいは、ホスト2に対して、リードデータをライトデータバッファ51から取得することを指示してもよい。なお、ライトデータバッファ51上のライトデータが格納される領域は、ライト動作制御部21によるNAND型フラッシュメモリ5への書き込みが完了した場合にライト動作制御部21からホスト2へ送信される解放可能通知により、ホスト2側において解放される。たとえば、ライト動作制御部21によるNAND型フラッシュメモリ5への書き込みが失敗し、ライトデータが別の場所(異なるページやブロック)に書き込まれる場合、その書き込みに必要なデータについて、まだ解放されていない、ホスト2のライトデータバッファ51の領域からフラッシュストレージデバイス3の内部バッファ(共有キャッシュ)31へのデータ転送が再実行される。データの再書き込みは、エラーが検出された範囲で実行されてもよいし、ライトコマンドの範囲すべてで実行されてもよい。解放可能通知は、ライトコマンド単位でホスト2に通知されてもよいし、ホスト2のデータ使用単位でホスト2に通知されてもよい。 Under the control of the read operation control unit 22, data read from the NAND flash memory chip 15 is transferred to the internal buffer (shared cache) 31. Then, under the control of the read operation control unit 22, data transfer from the internal buffer (shared cache) 31 to the host 2 is executed by the DMAC. Furthermore, if the read data to be read exists in the write data buffer 51 of the host 2, the read operation control unit 22 can acquire the read data from the write data buffer 51. Alternatively, the host 2 may be instructed to obtain read data from the write data buffer 51. Note that the area where write data on the write data buffer 51 is stored can be released by being sent from the write operation control unit 21 to the host 2 when the write operation control unit 21 completes writing to the NAND flash memory 5. Upon notification, it is released on the host 2 side. For example, if writing to the NAND flash memory 5 by the write operation control unit 21 fails and the write data is written to a different location (a different page or block), the data required for the write has not yet been released. , data transfer from the write data buffer 51 area of the host 2 to the internal buffer (shared cache) 31 of the flash storage device 3 is re-executed. Data rewriting may be performed within the range where the error was detected, or may be performed within the entire range of the write command. The release possibility notification may be notified to the host 2 in units of write commands, or may be notified to the host 2 in units of data usage by the host 2.

(GC動作制御部23を含む)最適化処理部53は、たとえば、ホスト2から受信されるブロック解放要求に応答して、割り当て済みのブロックをフリーブロックに戻す処理などを実行する。ホスト2は、ブロック解放要求を、ブロックリユースコマンドとしてフラッシュストレージデバイス3に送信する。ブロックリユースコマンドで指定され得る割り当て済みのブロックは、フラッシュストレージデバイス3がタイプ#1-ストレージデバイスとして実現され、かつ、ホスト2がフリーブロック群を管理しない場合、または、フラッシュストレージデバイス3がタイプ#2-ストレージデバイスとして実現されている場合において、ブロックアロケートコマンドとしてホスト2から受信したブロック割り当て要求に応答して、フリーブロックの中から割り当てたブロックである。また、最適化処理部53は、たとえば、ホスト2から受信されるGC制御コマンドに応答して、あるブロックのデータを別のブロックにコピーする処理などを実行する。 The optimization processing unit 53 (including the GC operation control unit 23) executes, for example, a process of returning an allocated block to a free block in response to a block release request received from the host 2. The host 2 sends a block release request to the flash storage device 3 as a block reuse command. The allocated blocks that can be specified in the block reuse command are only available if the flash storage device 3 is implemented as a type #1 storage device and the host 2 does not manage free block groups, or if the flash storage device 3 is of type #1-storage device and the host 2 does not manage free blocks 2-When implemented as a storage device, this is a block allocated from free blocks in response to a block allocation request received from the host 2 as a block allocation command. Further, the optimization processing unit 53 executes processing such as copying data of a certain block to another block in response to a GC control command received from the host 2, for example.

また、フラッシュストレージデバイス3がホスト2から受信する各種コマンドには、優先度が含まれ得る。つまり、フラッシュストレージデバイス3は、先にホスト2から受信したコマンドに優先して、後からホスト2から受信したコマンドを実行し得る。コマンドの実行順の制御は、たとえば、ホスト2から受信される各種コマンドが一時的に格納されるI/Oコマンドキューからコマンドを取り出す際にコマンド間の優先度を比較することによって実現できる。I/Oコマンドキューは、QoSドメイン毎に設けられるものであってもよいし、後述する仮想ストレージデバイス(VD:Virtual Device)毎に設けられるものであってもよいし、各フラッシュストレージデバイス3に1つずつ設けられるものであってもよい。 Further, various commands that the flash storage device 3 receives from the host 2 may include priorities. In other words, the flash storage device 3 can execute commands received from the host 2 later, giving priority to commands received from the host 2 first. Control of the command execution order can be realized, for example, by comparing the priorities of commands when taking out commands from an I/O command queue in which various commands received from the host 2 are temporarily stored. The I/O command queue may be provided for each QoS domain, for each virtual storage device (VD) described later, or for each flash storage device 3. They may be provided one at a time.

NAND型フラッシュメモリ5が複数のNAND型フラッシュメモリチップ15を含むフラッシュストレージデバイス3においては、1以上の仮想ストレージデバイスを定義することができる。図40は、フラッシュストレージデバイス3上における仮想ストレージデバイスの定義例を示す。 In the flash storage device 3 in which the NAND flash memory 5 includes a plurality of NAND flash memory chips 15, one or more virtual storage devices can be defined. FIG. 40 shows an example of defining a virtual storage device on the flash storage device 3.

図40中、(A)は、仮想ストレージデバイス間でNANDインタフェース13に接続されるチャンネルが共有される、複数の仮想ストレージデバイスの定義例を示す。(B)は、仮想ストレージデバイス間でNANDインタフェース13に接続されるチャンネルが共有されない、複数の仮想ストレージデバイスの定義例を示す。(C)は、NAND型フラッシュメモリ5が含む複数のNAND型フラッシュメモリチップ15すべてを用いた、1つの仮想ストレージデバイスの定義例を示す。(D)は、NAND型フラッシュメモリ5が含む複数のNAND型フラッシュメモリチップ15それぞれを個別に用いた、NAND型フラッシュメモリチップ15と同数、つまり最大数の仮想ストレージデバイスの定義例を示す。 In FIG. 40, (A) shows an example of the definition of a plurality of virtual storage devices in which a channel connected to the NAND interface 13 is shared among the virtual storage devices. (B) shows an example of the definition of a plurality of virtual storage devices in which the channels connected to the NAND interface 13 are not shared among the virtual storage devices. (C) shows an example of the definition of one virtual storage device using all of the plurality of NAND flash memory chips 15 included in the NAND flash memory 5. (D) shows an example of defining the same number of virtual storage devices as the NAND flash memory chips 15, that is, the maximum number, using each of the plurality of NAND flash memory chips 15 included in the NAND flash memory 5.

このように、フラッシュストレージデバイス3上には、様々な形態で、1以上の仮想ストレージデバイスを定義することができる。仮想ストレージデバイスを定義すると、たとえばNAND型フラッシュメモリチップ15の消耗度を監視するためのウェアー監視などを、この仮想ストレージデバイス毎に実行することができる。 In this way, one or more virtual storage devices can be defined on the flash storage device 3 in various forms. When a virtual storage device is defined, for example, wear monitoring for monitoring the degree of wear of the NAND flash memory chip 15 can be performed for each virtual storage device.

また、1以上の仮想ストレージデバイスを定義し得るフラッシュストレージデバイス3においては、仮想ストレージデバイス毎にQoSドメインを管理することができる。図41は、仮想ストレージデバイス毎にQoSドメインが管理される例を示す。
フラッシュストレージデバイス3のブロックは、同一の仮想ストレージデバイス上に定義されるQoSドメイン間で共有される。ブロックを取り扱う単位は、複数のブロックで構成されるスーパーブロックの単位であってもよい。つまり、スーパーブロックが、QoSドメイン間で共有されてもよい。たとえばエンドユーザ毎にQoSドメインが割り当てられている場合において、QoSドメインを示すQoSドメインIDを含むブロックアロケートコマンドがホスト2から受信されると、仮想ストレージデバイス内で共有されるフリーブロック群の中の1つのフリーブロックが、QoSドメインIDで示されるQoSドメインに割り当てられる。
Furthermore, in the flash storage device 3 in which one or more virtual storage devices can be defined, a QoS domain can be managed for each virtual storage device. FIG. 41 shows an example in which QoS domains are managed for each virtual storage device.
Blocks of flash storage device 3 are shared between QoS domains defined on the same virtual storage device. The unit for handling blocks may be a superblock unit composed of a plurality of blocks. That is, superblocks may be shared between QoS domains. For example, when a QoS domain is assigned to each end user, when a block allocate command including a QoS domain ID indicating a QoS domain is received from the host 2, allocate blocks among the free blocks shared within the virtual storage device. One free block is assigned to the QoS domain indicated by the QoS domain ID.

一方、QoSドメインIDとブロックアドレスとを含むブロックリユースコマンドがホスト2から受信されると、QoSドメインIDで示されるQoSドメインに割り当てられているブロックの中のブロックアドレスで示されるブロックが、フリーブロックとしてフリーブロック群に戻される。QoSドメインに割り当てられているブロックをフリーブロックとしてフリーブロック群に戻すことは、ブロックを解放するとも称される。解放されたブロックは、その後、たとえばホスト2からのブロックアロケートコマンドなどによって、その仮想ストレージデバイス内のいずれのQoSドメインにも割り当てられ得る。 On the other hand, when a block reuse command including a QoS domain ID and a block address is received from the host 2, the block indicated by the block address among the blocks assigned to the QoS domain indicated by the QoS domain ID becomes a free block. It is returned to the free block group as a free block group. Returning a block assigned to a QoS domain to the free block group as a free block is also referred to as releasing the block. The freed block may then be allocated to any QoS domain within that virtual storage device, such as by a block allocate command from host 2, for example.

ところで、あるQoSドメイン内のあるブロックを対象とするブロックリユースコマンドがホスト2から受信された際、フラッシュストレージデバイス3内において、そのブロックを対象とするリードコマンドが実行中または未実行の状態であった場合、そのリードコマンドよりも先にブロックリユースコマンドが実行されてしまうと、たとえば値が不定のデータがホスト2に返却されるなどのおそれがある。前述したように、フラッシュストレージデバイス3がホスト2から受信する各種コマンドには、優先度が含まれ得るので、フラッシュストレージデバイス3においては、先にホスト2から受信したリードコマンドに優先して、後からホスト2から受信したブロックリユースコマンドが実行され得る。また、リードコマンドのほか、たとえば、GC制御コマンドに応答して、そのブロック内のデータを他のブロックにコピーする場合にも、同様の事態が発生し得る。つまり、そのブロックを対象とするデータの読み出し処理を実行中または未実行の状態にある場合、この実行中または未実行のデータの読み出し処理において意図しないデータが読み出されてしまうおそれがある。 By the way, when a block reuse command targeting a certain block in a certain QoS domain is received from the host 2, it is determined whether a read command targeting that block is being executed or not yet executed in the flash storage device 3. In this case, if the block reuse command is executed before the read command, there is a risk that, for example, data with an undefined value may be returned to the host 2. As mentioned above, various commands that the flash storage device 3 receives from the host 2 may include priorities, so the flash storage device 3 gives priority to read commands received from the host 2 first, and The block reuse command received from the host 2 can be executed. Further, in addition to a read command, a similar situation may occur when, for example, data in a block is copied to another block in response to a GC control command. In other words, if a data read process for that block is being executed or not yet executed, there is a risk that unintended data may be read in the currently executed or unexecuted data read process.

このような事態をホスト2側の制御によって防止するためには、ホスト2において、たとえば仕掛り中のデータの読み出し処理の有無をブロック毎に管理することなどが必要となる。そこで、このフラッシュストレージデバイス3は、このような事態を防止するための仕組みを備えて、ホスト2の負担を軽減するようにしてもよい。 In order to prevent such a situation through control on the host 2 side, it is necessary for the host 2 to manage, for example, whether there is a data read process in progress for each block. Therefore, the flash storage device 3 may be provided with a mechanism to prevent such a situation to reduce the burden on the host 2.

フラッシュストレージデバイス3は、ホスト2からブロックリユースコマンドが受信された場合において、そのブロックリユースコマンドで指定されるブロックを対象とするデータの読み出し処理が実行中または未実行の状態であるならば、ホスト2に対してエラーを通知し、あるいは、実行中または未実行の処理が終了するまでブロックリユースコマンドの実行を保留し、実行中または未実行の処理が終了したら、ブロックリユースコマンドを実行する。 When the flash storage device 3 receives a block reuse command from the host 2, if the data read process for the block specified by the block reuse command is being executed or has not yet been executed, the flash storage device 3 receives the block reuse command from the host 2. 2, or suspends the execution of the block reuse command until the currently executed or unexecuted process is completed, and then executes the block reuse command when the currently executed or unexecuted process is completed.

この仕組みをフラッシュストレージデバイス3が備えることで、ホスト2は、たとえば解放しようとするブロックを対象とする仕掛り中のデータの読み出し処理の有無などを気にせずに、ブロックリユースコマンドをフラッシュストレージデバイス3に送信することができるようになる。つまり、ホスト2の負担を軽減することが実現される。 By providing this mechanism in the flash storage device 3, the host 2 can send a block reuse command to the flash storage device without worrying about, for example, whether or not there is a pending data read process for the block to be released. You will be able to send it to 3. In other words, the burden on the host 2 can be reduced.

この仕組みは、たとえば、最適化処理部53が、ブロックリユースコマンドの受信時またはブロックリユースコマンドの実行時、そのブロックリユースコマンドで指定されるブロックを対象とするリードコマンドやGC制御コマンドがI/Oコマンドキュー42に格納されていないかを検索することによって実現できる。図41においては、I/Oコマンドキュー42がQoSドメイン毎に設けられる例が示されており、この場合は、最適化処理部53は、ブロックリユースコマンドに含まれるQoSドメインIDで示されるQoSドメインに対して設けられるI/Oコマンドキュー42について、ブロックリユースコマンドに含まれるブロックアドレスで示されるブロックを対象とするリードコマンドまたはGC制御コマンドが存在していないかどうかを調べる。I/Oコマンドキュー42が仮想ストレージデバイス毎または各フラッシュストレージデバイスに1つずつ設けられる場合には、最適化処理部53は、そのI/Oコマンドキュー42について、ブロックリユースコマンドに含まれるQoSドメインIDで示されるQoSドメインの中のブロックリユースコマンドに含まれるブロックアドレスで示されるブロックを対象とするリードコマンドまたはGC制御コマンドが存在していないかどうかを調べる。存在する場合、最適化処理部53は、ホスト2に対してエラーを通知し、あるいは、I/Oコマンドキュー42に存在する、ブロックリユースコマンドで指定されるブロックを対象とするリードコマンドまたはGC制御コマンドが終了するまでブロックリユースコマンドの実行を保留し、それらが終了したら、ブロックリユースコマンドを実行する。 In this mechanism, for example, when the optimization processing unit 53 receives a block reuse command or executes a block reuse command, a read command or a GC control command targeting a block specified by the block reuse command is This can be realized by searching the command queue 42 to see if it is stored. FIG. 41 shows an example in which the I/O command queue 42 is provided for each QoS domain, and in this case, the optimization processing unit 53 The I/O command queue 42 provided for the block reuse command is checked to see if there is a read command or a GC control command that targets the block indicated by the block address included in the block reuse command. When one I/O command queue 42 is provided for each virtual storage device or each flash storage device, the optimization processing unit 53 determines the QoS domain included in the block reuse command for the I/O command queue 42. It is checked whether there is a read command or a GC control command that targets the block indicated by the block address included in the block reuse command in the QoS domain indicated by the ID. If the optimization processing unit 53 exists, the optimization processing unit 53 notifies the host 2 of the error, or executes a read command or GC control for the block specified by the block reuse command that exists in the I/O command queue 42. Holds execution of block reuse commands until the commands are finished, and then executes block reuse commands.

あるいは、この仕組みは、たとえば、フリーブロック群から選ばれてQoSドメインに割り当てられたブロックそれぞれについて、そのブロックを対象として実行中のリードコマンドの数、および、そのブロックをコピー元として実行中のGC制御コマンドの数を示すカウンタをメタデータなどとして設けることによって実現できる。たとえば、リード動作制御部21や(GC動作制御部23を含む)最適化処理部53は、あるブロックを対象とするデータの読み出し処理を実行する場合、そのブロックのカウンタの値を1つ加算する。また、リード動作制御部21や最適化処理部53は、データの読み出し処理を終了した場合、そのブロックのカウンタの値を1つ減算する。最適化処理部53は、ブロックリユースコマンドの受信時またはブロックリユースコマンドの実行時、そのブロックリユースコマンドで指定されるブロックのカウンタの値が0でない場合、ホスト2に対してエラーを通知し、あるいは、カウンタの値が0になるまでブロックリユースコマンドの実行を保留し、カウンタの値が0になったら、ブロックリユースコマンドを実行する。 Alternatively, for example, for each block selected from a group of free blocks and assigned to a QoS domain, this mechanism can calculate the number of read commands being executed for that block, and the number of GCs being executed with that block as a copy source. This can be realized by providing a counter indicating the number of control commands as metadata or the like. For example, when the read operation control unit 21 or the optimization processing unit 53 (including the GC operation control unit 23) executes data read processing for a certain block, it adds one to the counter value of that block. . Furthermore, when the read operation control unit 21 and the optimization processing unit 53 complete the data read process, they subtract one from the counter value of the block. When receiving a block reuse command or executing a block reuse command, the optimization processing unit 53 notifies the host 2 of an error if the counter value of the block specified by the block reuse command is not 0, or , the execution of the block reuse command is suspended until the counter value reaches 0, and when the counter value becomes 0, the block reuse command is executed.

図42は、ブロックリユースコマンド受信時におけるフラッシュストレージデバイス3の動作手順(第1ケース)を示すフローチャートである。なお、ここでは、ブロックリユースコマンド受信時を想定するが、以下に説明する動作は、ブロックリユースコマンド実行時に行われるものであってもよい。 FIG. 42 is a flowchart showing the operation procedure (first case) of the flash storage device 3 when receiving a block reuse command. Note that although here it is assumed that the block reuse command is received, the operations described below may be performed when the block reuse command is executed.

最適化処理部23は、ブロックリユースコマンドがホスト2から受信された場合(ステップA1)、そのブロックリユースコマンドで指定されるブロックを対象とする実行中または実行待ちの読み出し処理が存在するか否かを判定する(ステップA2)。存在しない場合(ステップA2:NO)、最適化処理部23は、指定されたブロックをフリーブロック化(解放)し、リユース完了を示すレスポンスをホスト2に返す(ステップA3)。 When a block reuse command is received from the host 2 (step A1), the optimization processing unit 23 determines whether there is a read process being executed or waiting to be executed for the block specified by the block reuse command. (Step A2). If it does not exist (step A2: NO), the optimization processing unit 23 makes the specified block a free block (releases it) and returns a response indicating completion of reuse to the host 2 (step A3).

一方、存在する場合(ステップA2:YES)、最適化処理部23は、エラーをホスト2に通知する(ステップA4)。
図43は、ブロックリユースコマンド受信時におけるフラッシュストレージデバイス3の動作手順(第2ケース)を示すフローチャートである。ここでも、ブロックリユースコマンド受信時を想定するが、以下に説明する動作は、ブロックリユースコマンド実行時に行われるものであってもよい。
On the other hand, if the error exists (step A2: YES), the optimization processing unit 23 notifies the host 2 of the error (step A4).
FIG. 43 is a flowchart showing the operation procedure (second case) of the flash storage device 3 when receiving a block reuse command. Again, it is assumed that the block reuse command is received, but the operations described below may also be performed when the block reuse command is executed.

最適化処理部23は、ブロックリユースコマンドがホスト2から受信された場合(ステップA11)、そのブロックリユースコマンドで指定されるブロックを対象とする実行中または実行待ちの読み出し処理が存在するか否かを判定する(ステップA12)。 When a block reuse command is received from the host 2 (step A11), the optimization processing unit 23 determines whether there is a read process being executed or waiting to be executed for the block specified by the block reuse command. is determined (step A12).

存在しない場合(ステップA12:NO)、最適化処理部23は、即時的に、指定されたブロックをフリーブロック化(解放)し、リユース完了を示すレスポンスをホスト2に返す(ステップA14)。一方、存在する場合(ステップA12:YES)、続いて、最適化処理部23は、該当する読み出し処理がすべて完了したか否かの判定を行い(ステップA13)、すべて完了したら(ステップA13:YES)、指定されたブロックをフリーブロック化(解放)し、リユース完了を示すレスポンスをホスト2に返す(ステップA14)。 If it does not exist (step A12: NO), the optimization processing unit 23 immediately makes the specified block a free block (releases it) and returns a response indicating completion of reuse to the host 2 (step A14). On the other hand, if it exists (step A12: YES), then the optimization processing unit 23 determines whether all the corresponding read processing has been completed (step A13), and if all the corresponding read processing is completed (step A13: YES) ), the specified block is made into a free block (released), and a response indicating completion of reuse is returned to the host 2 (step A14).

なお、以上では、ブロックリユースコマンドがホスト2から受信された際、そのブロックリユースコマンドで指定されるブロックを対象とする実行中または実行待ちのリードコマンドやGC制御コマンドを受信済みである場合におけるブロックリユースコマンドの取り扱いを説明した。このフラッシュストレージデバイス3は、さらに、ブロックリユースコマンドがホスト2から受信された後、そのブロックリユースコマンドで指定されるブロックを対象とするリードコマンドやGC制御コマンドがホスト2から受信された場合、エラーをホスト2に返却するようにしてもよい。 In addition, in the above, when a block reuse command is received from the host 2, a block is specified when a read command or GC control command that is currently being executed or is waiting for execution has been received for the block specified by the block reuse command. Explained the handling of reuse commands. Furthermore, after a block reuse command is received from the host 2, if a read command or GC control command is received from the host 2 that targets the block specified by the block reuse command, the flash storage device 3 will generate an error message. may be returned to the host 2.

また、図41を参照して説明したように、フラッシュストレージデバイス3のブロックは、たとえば仮想ストレージデバイス毎に管理されるQoSドメイン間で共有される。つまり、たとえば仮想ストレージデバイス毎にフリーブロック群が管理され、そのフリーブロック群の中から各QoSドメインへフリーブロックが割り当てられていく。 Further, as described with reference to FIG. 41, the blocks of the flash storage device 3 are shared, for example, between QoS domains managed for each virtual storage device. That is, for example, a free block group is managed for each virtual storage device, and free blocks are allocated to each QoS domain from the free block group.

ブロックにデータを書き込むケースは、大きく分けて、ホスト2から受信されるライトコマンドに応じて、ホスト2のライトデータバッファ51に格納されているデータを書き込むケースと、ホスト2から受信されるGC制御コマンドに応じて、フラッシュストレージデバイス3の別のブロックに格納されているデータを書き込むケースとが存在する。ホスト2のライトデータバッファ51に格納されているデータは新しく、フラッシュストレージデバイス3の別のブロックに格納されているデータは古い。したがって、これらのデータを同一のブロックに混在させると、ライトアンプリフィケーションが悪化するおそれがある。そこで、このフラッシュストレージデバイス3は、データが書き込まれるべきブロックおよびページの双方をストレージデバイスが決定するタイプ#3-ストレージデバイスとして実現されている場合、QoSドメイン毎に、ホスト2からのデータを書き込むためのブロックと、フラッシュストレージデバイス3内のデータをコピーするためのブロックとに分離する仕組みを備えてもよい。ブロックがスーパーブロックの単位で取り扱われる場合には、スーパーブロックを、ホスト2からのデータを書き込むためのスーパーブロックと、フラッシュストレージデバイス3内のデータをコピーするためのスーパーブロックとに分離する。つまり、QoSドメイン毎に、空きページを含むブロックとして、ホスト2からのデータを書き込むためのブロックと、フラッシュストレージデバイス3内のデータをコピーするためのブロックとを各々確保する。 Cases in which data is written to a block can be roughly divided into two cases, one is a case in which data stored in the write data buffer 51 of the host 2 is written in response to a write command received from the host 2, and the other is a case in which data is written in a GC control received from the host 2. There are cases where data stored in another block of the flash storage device 3 is written in response to a command. The data stored in the write data buffer 51 of the host 2 is new, and the data stored in another block of the flash storage device 3 is old. Therefore, if these data are mixed in the same block, write amplification may worsen. Therefore, if this flash storage device 3 is implemented as a type #3 storage device in which the storage device determines both the block and page to which data is written, data from the host 2 is written for each QoS domain. A mechanism may be provided to separate blocks into blocks for copying data in the flash storage device 3 and blocks for copying data in the flash storage device 3. When blocks are handled in units of superblocks, the superblocks are separated into superblocks for writing data from the host 2 and superblocks for copying data in the flash storage device 3. That is, for each QoS domain, a block for writing data from the host 2 and a block for copying data in the flash storage device 3 are secured as blocks containing free pages.

このブロックの分離は、たとえば、フリーブロック群から選ばれてQoSドメインに割り当てられるブロックそれぞれについて、その用途を示す属性情報をメタデータなどとして保持することによって実現できる。QoSドメインが利用を開始された時、ホスト2からのデータを書き込むためのブロックと、フラッシュストレージデバイス3内のデータをコピーするためのブロックとのいずれも確保されていない。なお、ブロックが確保されているとは、空きページを含むブロックが割り当てられていることである。 This separation of blocks can be realized, for example, by holding attribute information indicating the use of each block selected from the free block group and assigned to the QoS domain as metadata. When the QoS domain starts being used, neither a block for writing data from the host 2 nor a block for copying data in the flash storage device 3 is reserved. Note that "a block is secured" means that a block including a free page is allocated.

たとえば、ライト動作制御部21は、あるQoSドメインに関してホスト2からのデータの書き込みを実行する場合、そのQoSドメインにおいて属性情報がホスト2からのデータを書き込むためのブロックであることを示すブロックが確保されていなければ、フリーブロック群の中の1つのフリーブロックをそのQoSドメイン用に取得して、取得したブロックにデータを書き込む。この取得時、ライト動作制御部21は、そのブロックがホスト2からのデータを書き込むためのブロックであることを示す属性情報をメタデータとして記録する。一方、属性情報がホスト2からのデータを書き込むためのブロックであることを示す、ホスト2からのデータを書き込むためのブロックが確保されているならば、ライト動作制御部21は、そのブロック中の最後に書き込みが行われたページに続くページからデータの書き込みを実行する。データの書き込み途中で、そのブロックの最後のページまでデータが書き込まれると、ブロック未確保の状態に戻るので、ライト動作制御部21は、フリーブロック群の中の1つのフリーブロックをそのQoSドメイン用に取得して、取得したブロックに続きのデータを書き込む。この取得時にも、ライト動作制御部21は、そのブロックがホスト2からのデータを書き込むためのブロックであることを示す属性情報をメタデータとして記録する。 For example, when writing data from the host 2 in a certain QoS domain, the write operation control unit 21 secures a block whose attribute information indicates that the block is for writing data from the host 2 in that QoS domain. If not, one free block among the free blocks is acquired for that QoS domain and data is written to the acquired block. At the time of this acquisition, the write operation control unit 21 records attribute information indicating that the block is a block for writing data from the host 2 as metadata. On the other hand, if a block for writing data from the host 2 whose attribute information indicates that it is a block for writing data from the host 2 is secured, the write operation control unit 21 controls the block in which the data from the host 2 is written. Data is written from the page following the last written page. When data is written to the last page of the block during data writing, the block returns to an unallocated state, so the write operation control unit 21 assigns one free block from the free block group to the QoS domain. and write the following data to the acquired block. At the time of this acquisition, the write operation control unit 21 also records attribute information indicating that the block is a block for writing data from the host 2 as metadata.

また、たとえば、(GC動作制御部23を含む)最適化処理部53は、あるQoSドメインに関してデータのコピーを実行する場合、そのQoSドメインにおいて属性情報がフラッシュストレージデバイス3内のデータをコピーするためのブロックが確保されていなければ、フリーブロック群の中の1つのフリーブロックをそのQoSドメイン用に取得して、取得したブロックにデータを書き込む(コピーする)。この取得時、最適化処理部53は、そのブロックがフラッシュストレージデバイス3内のデータをコピーするためのブロックであることを示す属性情報をメタデータとして記録する。一方、属性情報がフラッシュストレージデバイス3内のデータをコピーするためのブロックであることを示す、フラッシュストレージデバイス3内のデータをコピーするためのブロックが確保されているならば、最適化処理部53は、そのブロック中の最後に書き込みが行われたページに続くページからデータの書き込みを実行する。データの書き込み途中で、そのブロックの最後のページまでデータが書き込まれると、ブロック未確保の状態に戻るので、最適化処理部53は、フリーブロック群の中の1つのフリーブロックをそのQoSドメイン用に取得して、取得したブロックにデータを書き込む。この取得時にも、最適化処理部53は、そのブロックがフラッシュストレージデバイス3内のデータをコピーするためのブロックであることを示す属性情報をメタデータとして記録する。 Furthermore, for example, when the optimization processing unit 53 (including the GC operation control unit 23) executes data copying for a certain QoS domain, the optimization processing unit 53 (including the GC operation control unit 23) may copy data in the flash storage device 3 based on the attribute information in that QoS domain. If the block is not reserved, one free block from the free block group is acquired for that QoS domain, and data is written (copied) to the acquired block. At the time of this acquisition, the optimization processing unit 53 records attribute information indicating that the block is a block for copying data in the flash storage device 3 as metadata. On the other hand, if a block for copying data in the flash storage device 3 whose attribute information indicates that it is a block for copying data in the flash storage device 3 is secured, the optimization processing unit 53 writes data from the page following the last written page in the block. When data is written to the last page of the block during data writing, the block returns to an unallocated state, so the optimization processing unit 53 allocates one free block from the free block group for that QoS domain. and write data to the retrieved block. At the time of this acquisition, the optimization processing unit 53 records attribute information indicating that the block is a block for copying data in the flash storage device 3 as metadata.

このように、このフラッシュストレージデバイス3は、ホスト2からの新しいデータを書き込むためのブロックと、フラッシュストレージデバイス3内の古いデータをコピーするためのブロックとを分離することによって、ライトアンプリフィケーションの悪化を防ぐことができる。 In this way, this flash storage device 3 provides write amplification by separating blocks for writing new data from the host 2 and blocks for copying old data in the flash storage device 3. Deterioration can be prevented.

また、図39を参照して説明したように、リード動作制御部22は、読み出すべきリードデータがホスト2のライトデータバッファ51内に存在する場合、ライトデータバッファ51からリードデータを取得することができる。一方、ライトデータバッファ51上のライトデータが格納される領域は、ライト動作制御部21からホスト2へ解放可能通知が送信されると、ホスト2側において解放される。そこで、このフラッシュストレージデバイス3は、ライトデータバッファ51内に存在するライトデータ中のデータが対象となるリードコマンドがホスト2から受信された場合、そのリードコマンドが終了するまで、そのデータが格納される領域についての解放可能通知をホスト2へ送信しないようにする仕組みを備えてもよい。 Further, as described with reference to FIG. 39, if the read data to be read exists in the write data buffer 51 of the host 2, the read operation control unit 22 can acquire the read data from the write data buffer 51. can. On the other hand, the area where write data is stored on the write data buffer 51 is released on the host 2 side when the write operation control unit 21 sends a notification that it can be released to the host 2 . Therefore, when the flash storage device 3 receives a read command from the host 2 that targets data in the write data existing in the write data buffer 51, the data is stored until the read command is completed. A mechanism may be provided to prevent the host 2 from transmitting a releasable notification regarding the area.

この仕組みは、たとえば、ホスト2のライトデータバッファ51に格納されるライトデータに対し、ホスト2から受信されるライトコマンド単位またはホスト2のデータ使用単位で、データの書き込み処理数および読み出し処理数の残数を示すカウンタをメタデータなどとして設けることによって実現できる。カウンタは、たとえば、解放可能通知がホスト2に通知される単位と一致させて設けられる。解放可能通知がライトコマンド単位でホスト2に通知される場合において、カウンタがホスト2のデータ使用単位で設けられてもよい。 For example, this mechanism calculates the number of data write operations and read operations for write data stored in the write data buffer 51 of the host 2 in units of write commands received from the host 2 or units of data usage by the host 2. This can be realized by providing a counter indicating the remaining number as metadata. The counter is provided, for example, in accordance with the unit in which the releasable notification is notified to the host 2. In the case where the host 2 is notified of releasability in units of write commands, a counter may be provided in units of data usage by the host 2.

カウンタがホスト2のデータ使用単位で設けられるものと想定すると、ライト動作制御部21は、各カウンタの初期値として、NAND型フラッシュメモリ5へのデータの書き込みに必要なデータの転送回数+1をセットする。+1は、エラーが検出された場合の再書き込み処理のために加算しておくものである。 Assuming that a counter is provided for each data usage unit of the host 2, the write operation control unit 21 sets the number of data transfers necessary for writing data to the NAND flash memory 5+1 as the initial value of each counter. do. +1 is added for rewriting processing when an error is detected.

ライト動作制御部21は、NAND型フラッシュメモリ5へデータを転送する都度、対応するカウンタの値を1ずつ減算する。あるデータ使用単位についてデータの転送が終了したとすると、その時点で、一般的には、カウンタの値は1となる。ライト動作制御部21は、転送したデータすべてがNAND型フラッシュメモリ5に書き込まれ、エラーが検出された場合の再書き込み処理が不要となったことが確定すると、対応するカウンタの値をさらに1減算する。この時点で、一般的には、カウンタの値は0となる。仮に、解放可能通知がホスト2のデータ使用単位でホスト2に通知されるものと想定すると、ライト動作制御部21は、カウンタの値が0になったことを検知した場合、対応する領域についての解放可能通知をホスト2へ通知する。なお、エラーが検出された場合、ライト動作制御部21は、再書き込み処理に必要なデータの転送回数をカウンタに再加算する。NAND型フラッシュメモリ5にデータを転送し終えた後にエラーが検出されても、カウンタの値が0になっていないことから、解放可能通知はホスト2へ通知されておらず、再書き込み処理に必要なデータはホスト2のライトデータバッファ51に存在する。したがって、ホスト2のライトデータバッファ51からフラッシュストレージデバイス3の内部バッファ(共有キャッシュ)31へのデータ転送を再実行することができる。 The write operation control unit 21 decrements the value of the corresponding counter by 1 each time data is transferred to the NAND flash memory 5. Assuming that data transfer for a certain data usage unit is completed, the value of the counter generally becomes 1 at that point. When it is determined that all the transferred data has been written to the NAND flash memory 5 and rewriting processing is no longer necessary when an error is detected, the write operation control unit 21 further subtracts 1 from the value of the corresponding counter. do. At this point, the value of the counter is generally zero. Assuming that a releasable notification is sent to the host 2 in units of data usage by the host 2, when the write operation control unit 21 detects that the counter value has become 0, it will A releasable notification is sent to the host 2. Note that if an error is detected, the write operation control unit 21 re-adds the number of data transfers necessary for rewriting processing to the counter. Even if an error is detected after the data has been transferred to the NAND flash memory 5, the counter value is not 0, so the release possibility notification is not notified to the host 2, which is necessary for the rewrite process. The data exists in the write data buffer 51 of the host 2. Therefore, data transfer from the write data buffer 51 of the host 2 to the internal buffer (shared cache) 31 of the flash storage device 3 can be re-executed.

リード動作制御部21も、ホスト2のライトデータバッファ51に存在するライトデータ中のデータが対象となるリードコマンドがホスト2から受信された場合、そのデータに対応するカウンタの値を1加算する。そして、その読み出し処理が終了したら、リード動作制御部21は、対応するカウンタの値を1減算する。 When the read operation control unit 21 also receives a read command from the host 2 that targets data in the write data existing in the write data buffer 51 of the host 2, it increments the value of the counter corresponding to the data by 1. Then, when the read processing is completed, the read operation control unit 21 subtracts 1 from the value of the corresponding counter.

ライトデータバッファ51上に存在するライトデータ中の読み出し処理の対象となるデータについては、NAND型フラッシュメモリ5への書き込みが終了しても、対応するカウンタの値は0にはならず、解放可能通知がホスト2へ通知されない。つまり、カウンタの値を1加算することで、リード動作制御部21は、ライトデータバッファ51上の目的の領域を解放禁止状態とする。したがって、ホスト2のライトデータバッファ51に存在するライトデータ中のデータが対象となるリードコマンドがホスト2から受信されている状況下において、そのデータを含むライトデータバッファ51上の領域がホスト2側において解放されてしまうことがない。 Regarding the data to be read out in the write data existing on the write data buffer 51, even if writing to the NAND flash memory 5 is completed, the value of the corresponding counter does not become 0 and can be released. Notification is not sent to host 2. That is, by adding 1 to the value of the counter, the read operation control unit 21 sets the target area on the write data buffer 51 in a release prohibited state. Therefore, in a situation where a read command that targets data in the write data existing in the write data buffer 51 of the host 2 is received from the host 2, the area on the write data buffer 51 containing the data is on the host 2 side. It will never be released.

なお、ホスト2のライトデータバッファ51に存在するライトデータ中のデータが対象となるリードコマンドがホスト2から受信された場合、リード動作制御部21は、そのデータを必ずしもライトデータバッファ51から読み出さなくてもよく、ライトデータのNAND型フラッシュメモリ5への書き込みが終了し、読み出し可能な状態になっているならば、NAND型フラッシュメモリ5から読み出してもよい。この場合、ライトデータバッファ51上のライトデータは、たとえば、予備のデータなどとして活用し得る。 Note that when a read command that targets data in the write data existing in the write data buffer 51 of the host 2 is received from the host 2, the read operation control unit 21 does not necessarily read the data from the write data buffer 51. Alternatively, if writing of the write data to the NAND flash memory 5 is completed and the write data is in a readable state, the write data may be read from the NAND flash memory 5. In this case, the write data on the write data buffer 51 can be used as, for example, spare data.

解放可能通知がライトコマンド単位でホスト2に通知され、カウンタがホスト2のデータ使用単位で設けられる場合、ライト動作制御部21は、ライトコマンドで書き込まれるべきライトデータに対応する複数のカウンタすべての値が0になった時点で、解放可能通知をホスト2に通知する。 When a releasable notification is notified to the host 2 for each write command and a counter is provided for each data usage unit of the host 2, the write operation control unit 21 updates all the counters corresponding to the write data to be written by the write command. When the value becomes 0, a releasable notification is sent to the host 2.

また、リード動作制御部22が、ライトデータバッファ51からリードデータを取得することができる点に着目し、このフラッシュストレージデバイス3は、タイプ#2-ストレージデバイスとして実現されている場合、ホスト2からのライトデータを書き込み予定のページアドレスを、NAND型フラッシュメモリ5への書き込みの終了を待機することなく、ホスト2に通知する仕組みを備えてもよい。この仕組みをフラッシュストレージデバイス3が備える場合、ホスト2は、たとえば、ライトコマンドで書き込んだデータがフラッシュストレージデバイス3において読み出し可能な状態となるまで待たされることなどがなく、ライトコマンドで書き込んだデータ中のデータを対象とするリードコマンドを速やかに発行することが可能となる。 Also, focusing on the fact that the read operation control unit 22 can acquire read data from the write data buffer 51, when this flash storage device 3 is realized as a type #2 storage device, it is possible to obtain read data from the host 2. The host 2 may be provided with a mechanism for notifying the host 2 of the page address at which the write data is scheduled to be written without waiting for the completion of writing to the NAND flash memory 5. When the flash storage device 3 is equipped with this mechanism, the host 2 does not have to wait until the data written by the write command becomes readable in the flash storage device 3, and the host 2 does not have to wait until the data written by the write command becomes readable. It becomes possible to promptly issue a read command that targets the data.

この仕組みは、たとえば、ライト動作制御部21が、ライトコマンドの受信時にホスト2から通知されるライトデータバッファ51上のライトデータに関する情報を、たとえばメタデータなどとして設ける書き込み先ブロック毎のライトバッファリストに登録し、ホスト2のデータ使用単位毎に、ライトデータを書き込み予定のページアドレスをホスト2に通知することによって実現できる。ライトバッファリストに登録されたライトデータのサイズが、書き込み先ブロックの残り書き込み領域のサイズより大きくても構わない。この場合、ライト動作制御部21は、まず、その書き込み先ブロックに書き込み可能な分について書き込み予定のページアドレスをホスト2に通知し、その書き込み先ブロックへの書き込みが終了して、新たな書き込み先ブロックが確保された後、残りの分について書き込み予定のページアドレスをホスト2に通知する。ライトデータはすべてライトデータバッファ51上に存在し、書き込み先ブロックの確保は極めて短時間で済むので、ライトデータの書き込みがブロックを跨ぐ場合であっても実用上の問題はない。 In this mechanism, for example, the write operation control unit 21 creates a write buffer list for each write destination block, which provides information regarding the write data on the write data buffer 51 notified from the host 2 as metadata when receiving a write command. This can be achieved by notifying the host 2 of the page address to which write data is to be written for each unit of data usage by the host 2. The size of the write data registered in the write buffer list may be larger than the size of the remaining write area of the write destination block. In this case, the write operation control unit 21 first notifies the host 2 of the page address to be written for the amount that can be written to the write destination block, and after writing to the write destination block is completed, a new write destination is assigned. After the blocks are secured, the host 2 is notified of the page addresses to be written for the remaining blocks. All write data exists on the write data buffer 51, and it takes only a very short time to secure a write destination block, so there is no practical problem even if write data is written across blocks.

NAND型フラッシュメモリ5への書き込み時にエラーが検出された場合、ライト動作制御部21は、新たに決定される書き込み予定のページアドレスをホスト2に改めて通知する。なお、ページアドレスのホスト2への通知は、前述したように、書き込み予定のページアドレスが決定した時点で行ってもよいし、ホスト2のデータ使用単位で書き込みが終了する毎に行ってもよい。前者の場合、エラーが検出された場合にホスト2への通知が複数回発生し得るが、ホスト2への通知が速い。後者の場合、ホスト2への通知が前者の場合よりも遅くはなるが、NAND型フラッシュメモリ5への書き込み時にエラーが検出された場合であっても、その回数に関係なく、1度の通知で済むことになる。 If an error is detected during writing to the NAND flash memory 5, the write operation control unit 21 notifies the host 2 of the newly determined page address to be written. Note that the notification of the page address to the host 2 may be carried out at the time when the page address to be written is determined, as described above, or may be carried out every time writing is completed in units of data usage by the host 2. . In the former case, the notification to the host 2 may occur multiple times when an error is detected, but the notification to the host 2 is quick. In the latter case, the notification to the host 2 will be slower than in the former case, but even if an error is detected when writing to the NAND flash memory 5, the notification will be sent once regardless of the number of times. That would be enough.

次に、ホスト2のライトデータバッファ51を用いるライトコマンド処理を含む、このフラッシュストレージデバイス3によって実行される各種I/Oコマンド処理について詳細に説明する。
図44は、フラッシュストレージデバイス3によって実行されるI/Oコマンド処理を示す。
Next, various I/O command processing executed by this flash storage device 3, including write command processing using the write data buffer 51 of the host 2, will be explained in detail.
FIG. 44 shows I/O command processing executed by the flash storage device 3.

上述したように、本実施形態では、フラッシュストレージデバイス3はタイプ#1-ストレージデバイス、タイプ#2-ストレージデバイス、タイプ#3-ストレージデバイスのいずれであってもよいが、図44では、フラッシュストレージデバイス3がタイプ#1-ストレージデバイスである場合を例示する。 As described above, in this embodiment, the flash storage device 3 may be any type #1 storage device, type #2 storage device, or type #3 storage device, but in FIG. The case where device 3 is a type #1 storage device is illustrated.

ホスト2によって発行される各ライトコマンドは、ブロックアドレス、ページアドレス、データポインタ、長さを含む。発行された各ライトコマンドはI/Oコマンドキュー42に入れられる。ホスト2によって発行される各リードコマンドも、ブロックアドレス、ページアドレス、データポインタ、長さを含む。発行された各リードコマンドもI/Oコマンドキュー42に入れられる。 Each write command issued by the host 2 includes a block address, page address, data pointer, and length. Each issued write command is placed in the I/O command queue 42. Each read command issued by the host 2 also includes a block address, page address, data pointer, and length. Each issued read command is also placed in the I/O command queue 42.

ホスト2がライトデータの書き込みをフラッシュストレージデバイス3に要求することを望む場合、ホスト2は、まず、このライトデータをホストメモリ上のライトデータバッファ51に格納し、そして、ライトコマンドをフラッシュストレージデバイス3に発行する。このライトコマンドは、このライトデータが書き込まれるべき書き込み先ブロックを示すブロックアドレスと、このライトデータが書き込まれるべきこの書き込み先ブロック内のページを示すページアドレスと、このライトデータが存在するライトデータバッファ51内の位置を示すデータポインタと、このライトデータの長さとを含む。 When the host 2 wishes to request the flash storage device 3 to write write data, the host 2 first stores this write data in the write data buffer 51 on the host memory, and then sends the write command to the flash storage device 3. Issued on 3rd. This write command includes the block address indicating the write destination block to which this write data is to be written, the page address indicating the page within this write destination block to which this write data is to be written, and the write data buffer where this write data exists. 51 and the length of this write data.

フラッシュストレージデバイス3は、プログラム/リードシーケンサ41を含む。このプログラム/リードシーケンサ41は、上述のライト制御部21およびリード制御部22によって実現される。プログラム/リードシーケンサ41は、I/Oコマンドキュー42に入れられたコマンドそれぞれを任意の順序で実行することができる。 Flash storage device 3 includes a program/read sequencer 41 . This program/read sequencer 41 is realized by the write control section 21 and read control section 22 described above. The program/read sequencer 41 can execute each command placed in the I/O command queue 42 in any order.

プログラム/リードシーケンサ41が、ある同じ書き込み先ブロックを指定する1以上のライトコマンドをI/Oコマンドキュー42から取得した後、プログラム/リードシーケンサ41は、この書き込み先ブロックの書き込み動作の進行に合わせて、この書き込み先ブロックに書き込むべき次のライトデータ(例えば、1ページサイズ分のライトデータ)を内部バッファ(共有キャッシュ)31またはライトデータバッファ51から取得するための転送要求を内部バッファ(共有キャッシュ)31に送出する。この転送要求は、データポインタと長さとを含んでいてもよい。この転送要求に含まれるデータポインタは、1つのライトコマンドに関連付けられたライトデータを分割、または同じ書き込み先ブロックを指定する2以上のライトコマンドに関連付けられた2以上のライトデータを結合する処理によって算出される。つまり、プログラム/リードシーケンサ41は、同じ書き込み先ブロックを示す識別子を有する一つ以上のライトコマンドに関連付けられたライトデータの集合を、その先頭からNAND型フラッシュメモリ5のデータ書き込み単位と同じサイズを有する境界で区切り、各境界に対応するホストメモリ内の位置を特定する。これによって、プログラム/リードシーケンサ41は、書き込み単位と同じサイズの単位でライトデータをホスト2から取得することができる。 After the program/read sequencer 41 obtains one or more write commands specifying the same write destination block from the I/O command queue 42, the program/read sequencer 41 adjusts the write commands in accordance with the progress of the write operation of this write destination block. Then, a transfer request is sent to the internal buffer (shared cache) 31 or the write data buffer 51 to obtain the next write data (for example, write data for one page size) to be written to this write destination block. )31. This transfer request may include a data pointer and length. The data pointer included in this transfer request is created by dividing the write data associated with one write command or by combining two or more write data associated with two or more write commands that specify the same write destination block. Calculated. In other words, the program/read sequencer 41 processes a set of write data associated with one or more write commands having identifiers indicating the same write destination block, starting from the beginning with the same size as the data write unit of the NAND flash memory 5. and identify the location in host memory that corresponds to each boundary. This allows the program/read sequencer 41 to obtain write data from the host 2 in units of the same size as write units.

この転送要求に含まれるデータポインタは、この1ページサイズ分のライトデータが存在するライトデータバッファ51上の位置を示す。この1ページサイズ分のライトデータは、この書き込み先ブロックを指定する複数のライトコマンドに関連付けられた複数の小さなサイズのライトデータの集合であってもよいし、この書き込み先ブロックを指定する一つのライトコマンドに関連付けられた大きなサイズのライトデータの一部分であってもよい。 The data pointer included in this transfer request indicates the position on the write data buffer 51 where this one page size worth of write data exists. This write data for one page size may be a collection of multiple small-sized write data associated with multiple write commands that specify this write destination block, or a single page size write data that specifies this write destination block. It may be a portion of large-sized write data associated with a write command.

さらに、プログラム/リードシーケンサ41は、この1ページサイズ分のライトデータが書き込まれるべき書き込み先ブロックのブロックアドレスと、この1ページサイズ分のライトデータが書き込まれるべきページのページアドレスとを内部バッファ(共有キャッシュ)31に送出する。 Furthermore, the program/read sequencer 41 stores the block address of the write destination block into which this one page size worth of write data is to be written and the page address of the page into which this one page size worth of write data is to be written into an internal buffer ( (shared cache) 31.

フラッシュストレージデバイス3のコントローラ4は内部バッファ(共有キャッシュ)31を制御するキャッシュコントローラを含んでいてもよい。この場合、このキャッシュコントローラは内部バッファ(共有キャッシュ)31をあたかも制御ロジックであるかのように動作させることができる。内部バッファ(共有キャッシュ)31と複数の書き込み先ブロック#0、#1、#2、…、#nとの間には、複数のフラッシュコマンドキュー43が存在する。これらフラッシュコマンドキュー43は、複数のNAND型フラッシュメモリチップにそれぞれ対応づけられている。 The controller 4 of the flash storage device 3 may include a cache controller that controls an internal buffer (shared cache) 31. In this case, this cache controller can operate the internal buffer (shared cache) 31 as if it were control logic. A plurality of flush command queues 43 exist between the internal buffer (shared cache) 31 and the plurality of write destination blocks #0, #1, #2, . . . , #n. These flash command queues 43 are respectively associated with a plurality of NAND flash memory chips.

内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、転送要求によって指定されたこの1ページサイズ分のライトデータが内部バッファ(共有キャッシュ)31に存在するか否かを判定する。
この転送要求によって指定されたこの1ページサイズ分のライトデータが内部バッファ(共有キャッシュ)31に存在するならば、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、この1ページサイズ分のライトデータを、このライトデータが書き込まれるべき書き込み先ブロックを含むNAND型フラッシュメモリチップに転送する。さらに、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、このライトデータが書き込まれるべき書き込み先ブロックを含むNAND型フラッシュメモリチップに、この書き込み先ブロックのブロックアドレス、このライトデータが書き込まれるべきページアドレス、書き込み指示用のNANDコマンド(フラッシュライトコマンド)を、フラッシュコマンドキュー43を介して送出する。フラッシュコマンドキュー43は、NAND型フラッシュメモリチップ毎に設けられている。このため、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、このライトデータが書き込まれるべき書き込み先ブロックを含むNAND型フラッシュメモリチップに対応するフラッシュコマンドキュー43に、この書き込み先ブロックのブロックアドレス、このライトデータが書き込まれるべきページアドレス、書き込み指示用のNANDコマンド(フラッシュライトコマンド)を入れる。
The internal buffer (shared cache) 31, that is, the cache controller, determines whether the write data for one page size specified by the transfer request exists in the internal buffer (shared cache) 31.
If the write data for this one page size specified by this transfer request exists in the internal buffer (shared cache) 31, the internal buffer (shared cache) 31, that is, the cache controller, transfers the write data for this one page size. is transferred to the NAND flash memory chip that includes the write destination block to which this write data is to be written. Furthermore, the internal buffer (shared cache) 31, that is, the cache controller, sends the block address of the write destination block to the NAND flash memory chip containing the write destination block to which this write data is to be written, and the page to which this write data is to be written. A NAND command (flash write command) for address and write instruction is sent via the flash command queue 43. A flash command queue 43 is provided for each NAND flash memory chip. Therefore, the internal buffer (shared cache) 31, that is, the cache controller, stores the block address of the write destination block, Enter the page address to which this write data is to be written and a NAND command (flash write command) for write instruction.

なお、内部バッファ(共有キャッシュ)31からNAND型フラッシュメモリチップへのこの1ページサイズ分のライトデータの転送が、このライトデータをNAND型フラッシュメモリチップに書き込むために必要な最終回のデータ転送であるならば、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、このライトデータを内部バッファ(共有キャッシュ)31から破棄し、このライトデータが格納されていた領域を空き領域として確保する。NAND型フラッシュメモリチップにデータを一回転送することを伴う書き込み動作(例えば、フル・シーケンス書き込み動作、等)によってライトデータを書き込み先ブロックに書き込むケースにおいては、NAND型フラッシュメモリチップへの初回のデータ転送が最終回のデータ転送となる。一方、NAND型フラッシュメモリチップにデータを複数回転送することを伴う書き込み動作(例えば、フォギー・ファイン書き込み動作)によってライトデータを書き込み先ブロックに書き込むケースにおいては、最後のファイン書き込みのために必要なNAND型フラッシュメモリチップへのデータ転送が最終回のデータ転送となる。 Note that this one page size write data transfer from the internal buffer (shared cache) 31 to the NAND flash memory chip is the final data transfer necessary to write this write data to the NAND flash memory chip. If there is, the internal buffer (shared cache) 31, that is, the cache controller discards this write data from the internal buffer (shared cache) 31, and reserves the area where this write data was stored as a free area. In the case where write data is written to the write destination block by a write operation that involves transferring data once to the NAND flash memory chip (for example, a full sequence write operation, etc.), the first transfer to the NAND flash memory chip This data transfer is the final data transfer. On the other hand, in the case where write data is written to a write destination block by a write operation that involves transferring data multiple times to a NAND flash memory chip (for example, a foggy fine write operation), the The data transfer to the NAND flash memory chip is the final data transfer.

次に、転送要求によって指定されたこの1ページサイズ分のライトデータが内部バッファ(共有キャッシュ)31に存在しない場合について説明する。
この転送要求によって指定されたこの1ページサイズ分のライトデータが内部バッファ(共有キャッシュ)31に存在しないならば、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、この転送要求(データポインタ、長さ)をDMAC15に送出する。この転送要求(データポインタ、長さ)に基づいて、DMAC15は、この1ページサイズ分のライトデータをホストメモリ上のライトデータバッファ51から内部バッファ(共有キャッシュ)31に転送する。このデータ転送が終了すると、DMAC15は、転送完了(Done)と、このデータポインタ、この長さとを、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラに通知する。
Next, a case will be described in which the write data for one page size specified by the transfer request does not exist in the internal buffer (shared cache) 31.
If the write data for one page size specified by this transfer request does not exist in the internal buffer (shared cache) 31, the internal buffer (shared cache) 31, that is, the cache controller S) is sent to the DMAC 15. Based on this transfer request (data pointer, length), the DMAC 15 transfers this one page size worth of write data from the write data buffer 51 on the host memory to the internal buffer (shared cache) 31. When this data transfer is completed, the DMAC 15 notifies the internal buffer (shared cache) 31, that is, the cache controller, of the completion of the transfer (Done), this data pointer, and this length.

内部バッファ(共有キャッシュ)31に空き領域が存在するならば、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、DMA転送によってライトデータバッファ51から取得されたライトデータを、この空き領域に格納する。
内部バッファ(共有キャッシュ)31に空き領域が存在しないならば、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、内部バッファ(共有キャッシュ)31内の最も古いライトデータを内部バッファ(共有キャッシュ)31から破棄し、最も古いライトデータが格納されていた領域を空き領域として確保する。そして、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、DMA転送によってライトデータバッファ51から取得されたライトデータを、この空き領域に格納する。
If a free space exists in the internal buffer (shared cache) 31, the internal buffer (shared cache) 31, that is, the cache controller stores the write data obtained from the write data buffer 51 by DMA transfer in this free space. .
If there is no free space in the internal buffer (shared cache) 31, the internal buffer (shared cache) 31, that is, the cache controller, transfers the oldest write data in the internal buffer (shared cache) 31 to the internal buffer (shared cache) 31. , and reserve the area where the oldest write data was stored as free space. Then, the internal buffer (shared cache) 31, that is, the cache controller, stores the write data acquired from the write data buffer 51 by DMA transfer in this free area.

フォギー・ファイン書き込み動作のような多段階の書き込み動作が使用されるケースにおいては、キャッシュコントローラは、フォギー書き込み動作のような第1段階の書き込み動作が終了している内部バッファ(共有キャッシュ)31内のライトデータのうちで、最も古いライトデータを破棄する。 In the case where a multi-stage write operation is used, such as a foggy fine write operation, the cache controller stores data in the internal buffer (shared cache) 31 where the first stage write operation, such as a foggy write operation, has finished. The oldest write data among the write data is discarded.

データ書き込み量の少ない書き込み先ブロックへのデータ書き込み動作の進行速度に比べ、データ書き込み量の多い書き込み先ブロックへのデータ書き込み動作の進行速度は速くなる傾向がある。このため、データ書き込み量の多い書き込み先ブロックに書き込まれるべきライトデータは頻繁にライトデータバッファ51から内部バッファ(共有キャッシュ)31に転送される。この結果、この最も古いライトデータは、ホスト2から書き込まれるデータ量が比較的少ない書き込み先ブロックへのライトデータである可能性が高い。したがって、フォギー書き込み動作のような第1段階の書き込み動作が終了している内部バッファ(共有キャッシュ)31内のライトデータのうちで最も古いライトデータを破棄するという方法を使用することにより、ホスト2とフラッシュストレージデバイス3との間のデータトラフィックを効率よく低減することが可能となる。 The progress speed of a data write operation to a write destination block with a large amount of data written tends to be faster than the progress speed of a data write operation to a write destination block with a small amount of data written. Therefore, write data to be written to a write destination block with a large amount of data written is frequently transferred from the write data buffer 51 to the internal buffer (shared cache) 31. As a result, there is a high possibility that this oldest write data is write data to a write destination block in which the amount of data written from the host 2 is relatively small. Therefore, the host 2 It becomes possible to efficiently reduce data traffic between the flash storage device 3 and the flash storage device 3.

なお、フォギー書き込み動作のような第1段階の書き込み動作が終了している内部バッファ(共有キャッシュ)31内のライトデータの中から破棄すべきライトデータを選択するためのアルゴリズムは、最も古いデータを選択するファースト・イン・ファースト・アウトに限定されず、LRU、ランダムのような他のアルゴリズムを使用してもよい。 Note that the algorithm for selecting write data to be discarded from among the write data in the internal buffer (shared cache) 31 for which the first stage write operation such as foggy write operation has been completed, selects the oldest data. The selection is not limited to first-in-first-out, and other algorithms such as LRU, random, etc. may be used.

プログラム/リードシーケンサ41は、各NAND型フラッシュメモリチップからステータス、つまり、書き込み完了(Done)、書き込み失敗(Error)、ブロックアドレス、ページアドレス、を受信する。そして、これらステータスに基づいて、プログラム/リードシーケンサ41は、ライトコマンド毎に、このライトコマンドに関連付けられたライトデータ全体に対する書き込み動作(NAND型フラッシュメモリチップに同じデータを1回または複数回転送する書き込み動作)の全てが終了したか否かを判定する。あるライトコマンドに関連付けられたライトデータ全体に対する書き込み動作の全てが終了したならば、プログラム/リードシーケンサ41は、このライトコマンドのコマンド完了を示すレスポンス(Done)をホスト2に送信する。このコマンド完了を示すレスポンス(Done)は、このライトコマンドを一意に識別するコマンドIDを含む。 The program/read sequencer 41 receives statuses, ie, write completion (Done), write failure (Error), block address, and page address, from each NAND flash memory chip. Based on these statuses, the program/read sequencer 41 performs a write operation for the entire write data associated with this write command (transfers the same data to the NAND flash memory chip once or multiple times) for each write command. It is determined whether all write operations) have been completed. When all write operations for the entire write data associated with a certain write command are completed, the program/read sequencer 41 transmits a response (Done) indicating completion of this write command to the host 2. The response (Done) indicating completion of this command includes a command ID that uniquely identifies this write command.

次に、リードコマンドの処理について説明する。
リードコマンドは、リードすべきデータが格納されているブロックを示すブロックアドレスと、このデータが格納されているページを示すページアドレスと、このデータが転送されるべきホストメモリ上のリードデータバッファ53内の位置を示すデータポインタと、このデータの長さとを含む。
Next, processing of a read command will be explained.
The read command includes a block address indicating the block in which the data to be read is stored, a page address indicating the page in which this data is stored, and an address in the read data buffer 53 on the host memory to which this data is to be transferred. , and the length of this data.

プログラム/リードシーケンサ41は、リードコマンドによって指定されたブロックアドレスおよびページアドレスを内部バッファ(共有キャッシュ)31に送出し、リードコマンドによって指定されたデータの読み出しを内部バッファ(共有キャッシュ)31に要求する。 The program/read sequencer 41 sends the block address and page address specified by the read command to the internal buffer (shared cache) 31, and requests the internal buffer (shared cache) 31 to read the data specified by the read command. .

内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、NAND型フラッシュメモリチップに、このブロックアドレスと、このページアドレスと、リード指示用のNANDコマンド(フラッシュリードコマンド)を、フラッシュコマンドキュー43を介して送出する。NAND型フラッシュメモリチップから読み出されたデータは、DMAC15によってリードデータバッファ53に転送される。 The internal buffer (shared cache) 31, that is, the cache controller, sends this block address, this page address, and a NAND command for read instruction (flash read command) to the NAND flash memory chip via the flash command queue 43. Send. Data read from the NAND flash memory chip is transferred to the read data buffer 53 by the DMAC 15.

なお、リードコマンドによって指定されたデータが、書き込み動作が終了していないデータ、または書き込み動作の全てが終了しているがNAND型フラッシュメモリ5からまだ読み出し可能となっていないデータである場合、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、内部バッファ(共有キャッシュ)31にこのデータが存在するか否かを判定してもよい。内部バッファ(共有キャッシュ)31にこのデータが存在するならば、このデータが内部バッファ(共有キャッシュ)31から読み出され、そしてDMAC15によってリードデータバッファ53に転送される。 Note that if the data specified by the read command is data for which the write operation has not yet been completed, or data for which all write operations have been completed but is not yet readable from the NAND flash memory 5, the internal The buffer (shared cache) 31, ie, the cache controller, may determine whether this data exists in the internal buffer (shared cache) 31. If this data exists in the internal buffer (shared cache) 31, this data is read from the internal buffer (shared cache) 31 and transferred to the read data buffer 53 by the DMAC 15.

一方、内部バッファ(共有キャッシュ)31にこのデータが存在しないならば、このデータは、まず、DMAC15によってライトデータバッファ51から内部バッファ(共有キャッシュ)31に転送される。そして、このデータが内部バッファ(共有キャッシュ)31から読み出され、そしてDMAC15によってリードデータバッファ53に転送される。 On the other hand, if this data does not exist in the internal buffer (shared cache) 31, this data is first transferred from the write data buffer 51 to the internal buffer (shared cache) 31 by the DMAC 15. Then, this data is read from the internal buffer (shared cache) 31 and transferred to the read data buffer 53 by the DMAC 15.

図45は、フラッシュストレージデバイス3によって実行される複数段階の書き込み動作を示す。
ここでは、4つのワード線を往復する場合のフォギー・ファイン書き込み動作を例示する。また、ここでは、NAND型フラッシュメモリ5が、メモリセル当たりに4ビットのデータを格納するQLC-フラッシュである場合を想定する。NAND型フラッシュメモリ5内の一つの特定の書き込み先ブロック(ここでは、書き込み先ブロックBLK#1)に対するフォギー・ファイン書き込み動作は以下のように実行される。
FIG. 45 illustrates a multi-step write operation performed by flash storage device 3.
Here, a foggy fine write operation when reciprocating through four word lines will be exemplified. Further, here, it is assumed that the NAND flash memory 5 is a QLC-flash that stores 4 bits of data per memory cell. A foggy fine write operation to one specific write destination block (here, write destination block BLK#1) in the NAND flash memory 5 is executed as follows.

(1)まず、4ページ(P0~P3)分のライトデータがページ単位でNAND型フラッシュメモリ5に転送され、この書き込み先ブロックBLK#1内のワード線WL0に接続された複数のメモリセルに、これら4ページ(P0~P3)分のライトデータを書き込むためのフォギー書き込み動作が実行される。 (1) First, write data for four pages (P0 to P3) is transferred page by page to the NAND flash memory 5, and is transferred to multiple memory cells connected to the word line WL0 in the write destination block BLK#1. , a foggy write operation is performed to write write data for these four pages (P0 to P3).

(2)次いで、次の4ページ(P4~P7)分のライトデータがこのNAND型フラッシュメモリ5にページ単位で転送され、この書き込み先ブロックBLK#1内のワード線WL1に接続された複数のメモリセルに、これら4ページ(P4~P7)分のライトデータを書き込むためのフォギー書き込み動作が実行される。 (2) Next, the write data for the next four pages (P4 to P7) is transferred page by page to this NAND flash memory 5, and multiple A foggy write operation is performed to write write data for these four pages (P4 to P7) into the memory cells.

(3)次いで、次の4ページ(P8~P11)分のライトデータがこのNAND型フラッシュメモリ5にページ単位で転送され、この書き込み先ブロックBLK#1内のワード線WL2に接続された複数のメモリセルに、これら4ページ(P8~P11)分のライトデータを書き込むためのフォギー書き込み動作が実行される。 (3) Next, the write data for the next four pages (P8 to P11) is transferred to this NAND flash memory 5 in page units, and the A foggy write operation is performed to write write data for these four pages (P8 to P11) into the memory cells.

(4)次いで、次の4ページ(P12~P15)分のライトデータがこのNAND型フラッシュメモリ5にページ単位で転送され、この書き込み先ブロックBLK#1内のワード線WL3に接続された複数のメモリセルに、これら4ページ(P12~P15)分のライトデータを書き込むためのフォギー書き込み動作が実行される。 (4) Next, the write data for the next four pages (P12 to P15) is transferred page by page to this NAND flash memory 5, and the A foggy write operation is performed to write write data for these four pages (P12 to P15) into the memory cells.

(5)ワード線WL3に接続された複数のメモリセルに対するフォギー書き込み動作が終了すると、書き込み対象のワード線はワード線WL0に戻り、ワード線WL0に接続された複数のメモリセルに対するファイン書き込み動作の実行が可能となる。そして、ワード線WL0に対するフォギー書き込み動作で使用された4ページ(P0~P3)分のライトデータと同じ4ページ(P0~P3)分のライトデータがページ単位でNAND型フラッシュメモリ5に再び転送され、この書き込み先ブロックBLK#1内のワード線WL0に接続された複数のメモリセルに、これら4ページ(P0~P3)分のライトデータを書き込むためのファイン書き込み動作が実行される。これにより、ページP0~P3に対するフォギー・ファイン書き込み動作が終了する。 (5) When the foggy write operation to the plurality of memory cells connected to the word line WL3 is completed, the word line to be written returns to the word line WL0, and the fine write operation to the plurality of memory cells connected to the word line WL0 is started. Execution becomes possible. Then, the write data for four pages (P0 to P3), which is the same as the write data for four pages (P0 to P3) used in the foggy write operation to word line WL0, is transferred again to the NAND flash memory 5 in page units. A fine write operation is executed to write write data for these four pages (P0 to P3) to a plurality of memory cells connected to the word line WL0 in this write destination block BLK#1. This completes the foggy fine write operation for pages P0 to P3.

(6)次いで、次の4ページ(P16~P19)分のライトデータがこのNAND型フラッシュメモリ5にページ単位で転送され、この書き込み先ブロックBLK#1内のワード線WL4に接続された複数のメモリセルに、これら4ページ(P16~P19)分のライトデータを書き込むためのフォギー書き込み動作が実行される。 (6) Next, the write data for the next four pages (P16 to P19) is transferred page by page to this NAND flash memory 5, and multiple A foggy write operation is performed to write write data for these four pages (P16 to P19) into the memory cells.

(7)ワード線WL4に接続された複数のメモリセルに対するフォギー書き込み動作が終了すると、書き込み対象のワード線はワード線WL1に戻り、ワード線WL1に接続された複数のメモリセルに対するファイン書き込み動作の実行が可能となる。そして、ワード線WL1に対するフォギー書き込み動作で使用された4ページ(P4~P7)分のライトデータと同じ4ページ(P4~P7)分のライトデータがページ単位でNAND型フラッシュメモリ5に再び転送され、この書き込み先ブロックBLK#1内のワード線WL1に接続された複数のメモリセルに、これら4ページ(P4~P7)分のライトデータを書き込むためのファイン書き込み動作が実行される。これにより、ページP4~P7に対するフォギー・ファイン書き込み動作が終了する。 (7) When the foggy write operation to the plurality of memory cells connected to the word line WL4 is completed, the word line to be written returns to the word line WL1, and the fine write operation to the plurality of memory cells connected to the word line WL1 is started. Execution becomes possible. Then, the write data for four pages (P4 to P7), which is the same as the write data for four pages (P4 to P7) used in the foggy write operation to the word line WL1, is transferred again to the NAND flash memory 5 in page units. , a fine write operation is performed to write write data for these four pages (P4 to P7) to a plurality of memory cells connected to the word line WL1 in this write destination block BLK#1. This completes the foggy fine write operation for pages P4 to P7.

(8)次いで、次の4ページ(P20~P23)分のライトデータがこのNAND型フラッシュメモリ5にページ単位で転送され、この書き込み先ブロックBLK#1内のワード線WL5に接続された複数のメモリセルに、これら4ページ(P20~P23)分のライトデータを書き込むためのフォギー書き込み動作が実行される。 (8) Next, the write data for the next four pages (P20 to P23) is transferred page by page to this NAND flash memory 5, and the plurality of write data connected to the word line WL5 in this write destination block BLK#1 are A foggy write operation is performed to write write data for these four pages (P20 to P23) into the memory cells.

(9)ワード線WL5に接続された複数のメモリセルに対するフォギー書き込み動作が終了すると、書き込み対象のワード線はワード線WL2に戻り、ワード線WL2に接続された複数のメモリセルに対するファイン書き込み動作の実行が可能となる。そして、ワード線WL2に対するフォギー書き込み動作で使用された4ページ(P8~P11)分のライトデータと同じ4ページ(P8~P11)分のライトデータがページ単位でNAND型フラッシュメモリ5に再び転送され、この書き込み先ブロックBLK#1内のワード線WL2に接続された複数のメモリセルに、これら4ページ(P8~P11)分のライトデータを書き込むためのファイン書き込み動作が実行される。これにより、ページP8~P11に対するフォギー・ファイン書き込み動作が終了する。 (9) When the foggy write operation to the plurality of memory cells connected to the word line WL5 is completed, the word line to be written returns to the word line WL2, and the fine write operation to the plurality of memory cells connected to the word line WL2 is started. Execution becomes possible. Then, the write data for four pages (P8 to P11), which is the same as the write data for four pages (P8 to P11) used in the foggy write operation to the word line WL2, is transferred again to the NAND flash memory 5 in page units. , a fine write operation is performed to write write data for these four pages (P8 to P11) to a plurality of memory cells connected to the word line WL2 in this write destination block BLK#1. This completes the foggy fine write operation for pages P8 to P11.

図46は、書き込み先ブロックBLK#1へのデータの書き込み順序を示す。
ここでは、図7と同様に、4つのワード線を往復する場合のフォギー・ファイン書き込み動作が実行される場合を想定する。
図46の左部に示されるデータd0、データd1、データd2、データd3、データd4、データd5、データd6、データd7、…、データd252、データd253、データd254、データd255は、書き込み先ブロックBLK#1を指定する複数のライトコマンドそれぞれに対応する複数のライトデータを示している。ここでは、図示の簡単化のために、全てのライトデータが同じサイズを有している場合が想定されている。
FIG. 46 shows the order of writing data to write destination block BLK#1.
Here, as in FIG. 7, it is assumed that a foggy fine write operation is performed when reciprocating between four word lines.
Data d0, data d1, data d2, data d3, data d4, data d5, data d6, data d7, ..., data d252, data d253, data d254, data d255 shown on the left side of FIG. 46 are write destination blocks. A plurality of write data corresponding to each of a plurality of write commands specifying BLK#1 are shown. Here, in order to simplify the illustration, it is assumed that all write data have the same size.

図46の右部は、書き込み先ブロックBLK#1へのデータの書き込み順序を示している。書き込み動作は、ワード線WL0に接続された複数のメモリセルへのデータd0の書き込み(フォギー書き込み)、ワード線WL1に接続された複数のメモリセルへのデータd1の書き込み(フォギー書き込み)、ワード線WL2に接続された複数のメモリセルへのデータd2の書き込み(フォギー書き込み)、ワード線WL3に接続された複数のメモリセルへのデータd3の書き込み(フォギー書き込み)、ワード線WL0に接続された複数のメモリセルへのデータd0の書き込み(ファイン書き込み)、ワード線WL4に接続された複数のメモリセルへのデータd4の書き込み(フォギー書き込み)、ワード線WL1に接続された複数のメモリセルへのデータd1の書き込み(ファイン書き込み)、ワード線WL5に接続された複数のメモリセルへのデータd5の書き込み(フォギー書き込み)、ワード線WL2に接続された複数のメモリセルへのデータd2の書き込み(ファイン書き込み)、…という順序で実行される。 The right part of FIG. 46 shows the order in which data is written to the write destination block BLK#1. Write operations include writing data d0 to multiple memory cells connected to word line WL0 (foggy write), writing data d1 to multiple memory cells connected to word line WL1 (foggy writing), and writing data d1 to multiple memory cells connected to word line WL1 (foggy write). Writing data d2 to multiple memory cells connected to WL2 (foggy write), writing data d3 to multiple memory cells connected to word line WL3 (foggy writing), multiple memory cells connected to word line WL0 Writing data d0 to the memory cells of (fine write), writing data d4 to multiple memory cells connected to word line WL4 (foggy writing), writing data to multiple memory cells connected to word line WL1 Write data d1 (fine write), write data d5 to multiple memory cells connected to word line WL5 (foggy write), write data d2 to multiple memory cells connected to word line WL2 (fine write) ), ... are executed in this order.

図47は、NAND型フラッシュメモリ5のデータ書き込み単位と同じサイズの単位でライトデータをホスト2からフラッシュストレージデバイス3に転送する動作を示す。
図47の左部に示されるデータd1、データd2、データd3、データd4、データd5、データd6、データd7、データd8、データd9、データd10、…は、書き込み先ブロックBLK#1を指定する10個のライトコマンドにそれぞれ対応する10個のライトデータを示している。ライトデータの長さ(サイズ)は、個々のライトコマンド毎に異なる。図47では、データd1、データd2、データd3、データd4の各々が4Kバイトのサイズを有し、データd5が8Kバイトのサイズを有し、データd6が40Kバイトのサイズを有し、データd7が16Kバイトのサイズを有し、データd8、データd9の各々が8Kバイトのサイズを有し、データd10が1Mバイトのサイズを有する場合が想定されている。
FIG. 47 shows the operation of transferring write data from the host 2 to the flash storage device 3 in units of the same size as the data write unit of the NAND flash memory 5.
Data d1, data d2, data d3, data d4, data d5, data d6, data d7, data d8, data d9, data d10, etc. shown on the left side of FIG. 47 specify write destination block BLK#1. Ten pieces of write data corresponding to ten write commands are shown. The length (size) of write data differs for each write command. In FIG. 47, each of data d1, data d2, data d3, and data d4 has a size of 4K bytes, data d5 has a size of 8K bytes, data d6 has a size of 40K bytes, and data d7 has a size of 4K bytes. It is assumed that data d8 and data d9 each have a size of 8 Kbytes, and data d10 has a size of 1 Mbyte.

ホスト2から受信される各ライトコマンドはデータポインタ、長さ、ブロック識別子(例えばブロックアドレス)を含むので、フラッシュストレージデバイス3のコントローラ4は、ホスト2から受信されるライトコマンドを、複数の書き込み先ブロックにそれぞれ対応する複数のグループに分類することができる。上述のデータd1、データd2、データd3、データd4、データd5、データd6、データd7、データd8、データd9、データd10、…は、書き込み先ブロックBLK#1に対応するグループに分類された10個のライトコマンドにそれぞれ対応している。これら10個のライトコマンドは、書き込み先ブロックBLK#1を示すブロック識別子(例えばブロックアドレス)を含むライトコマンドである。 Since each write command received from the host 2 includes a data pointer, a length, and a block identifier (e.g. block address), the controller 4 of the flash storage device 3 can send the write command received from the host 2 to multiple write destinations. It can be classified into multiple groups, each corresponding to a block. The above data d1, data d2, data d3, data d4, data d5, data d6, data d7, data d8, data d9, data d10, ... are classified into 10 groups corresponding to the write destination block BLK#1. It corresponds to each write command. These ten write commands include a block identifier (for example, a block address) indicating the write destination block BLK#1.

フラッシュストレージデバイス3のコントローラ4は、書き込み先ブロックBLK#1を指定するこれらライトコマンド内のデータポインタおよび長さに基づいて、データd1、データd2、データd3、データd4、データd5、データd6、データd7、データd8、データd9、データd10がそれぞれ存在するライトデータバッファ51上の位置、およびデータd1、データd2、データd3、データd4、データd5、データd6、データd7、データd8、データd9、データd10それぞれの長さを管理する。そして、コントローラ4は、一つのライトコマンドに関連付けられた大きなサイズのライトデータを複数のライトデータ(複数のデータ部)に分割、または2以上のライトコマンドにそれぞれ関連付けられた小さなサイズの2以上のライトデータを互いに結合することによって得られる、NAND型フラッシュメモリ5のデータ書き込み単位と同じサイズを有するライトデータを、ホスト2から取得する。 The controller 4 of the flash storage device 3 writes data d1, data d2, data d3, data d4, data d5, data d6, based on the data pointer and length in these write commands that specify the write destination block BLK#1. The positions on the write data buffer 51 where data d7, data d8, data d9, and data d10 exist, and data d1, data d2, data d3, data d4, data d5, data d6, data d7, data d8, and data d9. , data d10. Then, the controller 4 divides the large-sized write data associated with one write command into multiple write data (multiple data parts), or divides the large-sized write data associated with one write command into two or more small-sized write data respectively associated with two or more write commands. Write data having the same size as the data write unit of the NAND flash memory 5, which is obtained by combining the write data with each other, is obtained from the host 2.

図47では、コントローラ4は、最初に、各々が4Kバイトのサイズを有するデータd1、データd2、データd3、データd4を互いに結合することによって得られる16Kバイトライトデータをホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、4回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。最初のDMA転送では、データd1の先頭位置を指定する転送元アドレスと、データ長=4KBがDMAC15にセットされてもよい。データd1の先頭位置を指定する転送元アドレスは、データd1に対応するライトコマンド内のデータポインタによって表される。2回目のDMA転送では、データd2の先頭位置を指定する転送元アドレスと、データ長=4KBがDMAC15にセットされてもよい。データd2の先頭位置を指定する転送元アドレスは、データd2に対応するライトコマンド内のデータポインタによって表される。3回目のDMA転送では、データd3の先頭位置を指定する転送元アドレスと、データ長=4KBがDMAC15にセットされてもよい。データd3の先頭位置を指定する転送元アドレスは、データd3に対応するライトコマンド内のデータポインタによって表される。4回目のDMA転送では、データd4の先頭位置を指定する転送元アドレスと、データ長=4KBがDMAC15にセットされてもよい。データd4の先頭位置を指定する転送元アドレスは、データd4に対応するライトコマンド内のデータポインタによって表される。 In FIG. 47, the controller 4 first transfers 16 Kbyte write data obtained by combining data d1, data d2, data d3, and data d4 each having a size of 4 Kbytes to the write data buffer 51 of the host 2. Get from. In this case, the controller 4 may transfer the 16 Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by, for example, but not limited to, four DMA transfers. In the first DMA transfer, a transfer source address specifying the starting position of the data d1 and a data length of 4 KB may be set in the DMAC 15. A transfer source address that specifies the starting position of data d1 is represented by a data pointer in the write command corresponding to data d1. In the second DMA transfer, a transfer source address specifying the start position of data d2 and a data length of 4 KB may be set in the DMAC 15. The transfer source address that specifies the starting position of the data d2 is represented by the data pointer in the write command corresponding to the data d2. In the third DMA transfer, a transfer source address specifying the starting position of data d3 and a data length of 4 KB may be set in the DMAC 15. The transfer source address specifying the start position of data d3 is represented by the data pointer in the write command corresponding to data d3. In the fourth DMA transfer, a transfer source address specifying the starting position of data d4 and a data length of 4 KB may be set in the DMAC 15. The transfer source address specifying the start position of the data d4 is represented by the data pointer in the write command corresponding to the data d4.

そして、コントローラ4は、DMA転送によって取得されるこの16Kバイトライトデータ(d1、d2、d3、d4)を、書き込み先ブロックBLK#1のページP0に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP1に変更し、8Kバイトのサイズを有するデータd3と、データd6内の先頭の8Kバイトデータd6-1とを互いに結合することによって得られる16Kバイトライトデータをホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、2回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。最初のDMA転送では、データd5の先頭位置を指定する転送元アドレスと、データ長=8KBがDMAC15にセットされてもよい。データd5の先頭位置を指定する転送元アドレスは、データd5に対応するライトコマンド内のデータポインタによって表される。2回目のDMA転送では、データd6-1の先頭位置を指定する転送元アドレスと、データ長=8KBがDMAC15にセットされてもよい。データd6-1の先頭位置を指定する転送元アドレスは、データd6に対応するライトコマンド内のデータポインタによって表される。
Then, the controller 4 transfers this 16K byte write data (d1, d2, d3, d4) acquired by DMA transfer to the NAND flash memory 5 as data to be written to page P0 of write destination block BLK#1. do.
Controller 4 changes the next write destination page of write destination block BLK#1 to page P1, and combines data d3 having a size of 8 Kbytes and first 8 Kbyte data d6-1 in data d6 with each other. The 16 Kbyte write data obtained by this is acquired from the write data buffer 51 of the host 2. In this case, the controller 4 may transfer the 16 Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by, for example, two DMA transfers, although the present invention is not limited thereto. In the first DMA transfer, a transfer source address specifying the starting position of data d5 and a data length of 8 KB may be set in the DMAC 15. The transfer source address that specifies the starting position of the data d5 is represented by the data pointer in the write command corresponding to the data d5. In the second DMA transfer, a transfer source address specifying the start position of data d6-1 and a data length of 8 KB may be set in the DMAC 15. The transfer source address specifying the starting position of data d6-1 is represented by the data pointer in the write command corresponding to data d6.

そして、コントローラ4は、この16Kバイトライトデータ(d5、d6-1)を、書き込み先ブロックBLK#1のページP1に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP2に変更し、データd6の残りの32Kバイトデータのうちの最初の16Kバイトデータd6-2をホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、1回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。このDMA転送では、データd6-2の先頭位置を指定する転送元アドレスと、データ長=16KBがDMAC15にセットされてもよい。データd6-2の先頭位置を指定する転送元アドレスは、データd6に対応するライトコマンド内のデータポインタの値に8KB分のオフセットを加算することによって求めることができる。
Then, the controller 4 transfers this 16 Kbyte write data (d5, d6-1) to the NAND flash memory 5 as data to be written to page P1 of write destination block BLK#1.
The controller 4 changes the next write destination page of the write destination block BLK#1 to page P2, and transfers the first 16 Kbyte data d6-2 of the remaining 32 Kbyte data of the data d6 to the write data buffer 51 of the host 2. Get from. In this case, the controller 4 may transfer the 16 Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by one DMA transfer, for example, although the controller 4 is not limited thereto. In this DMA transfer, a transfer source address specifying the starting position of data d6-2 and a data length of 16 KB may be set in the DMAC 15. The transfer source address specifying the start position of data d6-2 can be obtained by adding an 8 KB offset to the value of the data pointer in the write command corresponding to data d6.

そして、コントローラ4は、この16Kバイトライトデータ(d6-2)を、書き込み先ブロックBLK#1のページP2に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP3に変更し、データd6の残りの16Kバイトデータd6-3をホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、1回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。このDMA転送では、データd6-3の先頭位置を指定する転送元アドレスと、データ長=16KBがDMAC15にセットされてもよい。データd6-3の先頭位置を指定する転送元アドレスは、データd6に対応するライトコマンド内のデータポインタの値に24KB分のオフセットを加算することによって求めることができる。
Then, the controller 4 transfers this 16 Kbyte write data (d6-2) to the NAND flash memory 5 as data to be written to page P2 of write destination block BLK#1.
The controller 4 changes the next write destination page of the write destination block BLK#1 to page P3, and acquires the remaining 16 Kbyte data d6-3 of the data d6 from the write data buffer 51 of the host 2. In this case, the controller 4 may transfer the 16 Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by one DMA transfer, for example, although the controller 4 is not limited thereto. In this DMA transfer, a transfer source address specifying the starting position of data d6-3 and a data length of 16 KB may be set in the DMAC 15. The transfer source address specifying the starting position of data d6-3 can be obtained by adding an offset of 24 KB to the value of the data pointer in the write command corresponding to data d6.

そして、コントローラ4は、この16Kバイトライトデータ(d6-3)を、書き込み先ブロックBLK#1のページP3に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
そして、コントローラ4は、フォギー書き込み動作によって4ページ分のデータ(P0~P3)を書き込み先ブロックBLK#1のワード線WL0に接続された複数のメモリセルに書き込む。
Then, the controller 4 transfers this 16 Kbyte write data (d6-3) to the NAND flash memory 5 as data to be written to page P3 of write destination block BLK#1.
Then, the controller 4 writes four pages of data (P0 to P3) into the plurality of memory cells connected to the word line WL0 of the write destination block BLK#1 by a foggy write operation.

コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP4に変更し、16Kバイトのサイズを有するデータd7をホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、1回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。このDMA転送では、データd7の先頭位置を指定する転送元アドレスと、データ長=16KBがDMAC15にセットされてもよい。データ7の先頭位置を指定する転送元アドレスは、データd7に対応するライトコマンド内のデータポインタによって表される。 The controller 4 changes the next write destination page of the write destination block BLK#1 to page P4, and acquires data d7 having a size of 16 Kbytes from the write data buffer 51 of the host 2. In this case, the controller 4 may transfer the 16 Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by one DMA transfer, for example, although the controller 4 is not limited thereto. In this DMA transfer, a transfer source address specifying the starting position of data d7 and a data length of 16 KB may be set in the DMAC 15. The transfer source address specifying the starting position of data 7 is represented by the data pointer in the write command corresponding to data d7.

そして、コントローラ4は、この16Kバイトライトデータ(d7)を、書き込み先ブロックBLK#1のページP4に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP5に変更し、8Kバイトのサイズを有するデータd8と、8Kバイトのサイズを有するデータd9とを互いに結合することによって得られる16Kバイトライトデータをホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、2回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。最初のDMA転送では、データd8の先頭位置を指定する転送元アドレスと、データ長=8KBがDMAC15にセットされてもよい。データd8の先頭位置を指定する転送元アドレスは、データd8に対応するライトコマンド内のデータポインタによって表される。2回目のDMA転送では、データd9の先頭位置を指定する転送元アドレスと、データ長=8KBがDMAC15にセットされてもよい。データd9の先頭位置を指定する転送元アドレスは、データd9に対応するライトコマンド内のデータポインタによって表される。
Then, the controller 4 transfers this 16 Kbyte write data (d7) to the NAND flash memory 5 as data to be written to page P4 of write destination block BLK#1.
The controller 4 changes the next write destination page of the write destination block BLK#1 to page P5, and combines data d8 having a size of 8 Kbytes and data d9 having a size of 8 Kbytes with each other. 16 Kbyte write data is acquired from the write data buffer 51 of the host 2. In this case, the controller 4 may transfer the 16 Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by, for example, two DMA transfers, although the present invention is not limited thereto. In the first DMA transfer, a transfer source address specifying the starting position of data d8 and a data length of 8 KB may be set in the DMAC 15. The transfer source address that specifies the starting position of the data d8 is represented by the data pointer in the write command corresponding to the data d8. In the second DMA transfer, a transfer source address specifying the starting position of data d9 and a data length of 8 KB may be set in the DMAC 15. The transfer source address specifying the starting position of data d9 is represented by the data pointer in the write command corresponding to data d9.

そして、コントローラ4は、この16Kバイトライトデータ(d8、d9)を、書き込み先ブロックBLK#1のページP5に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP6に変更し、データd10内の先頭の16Kバイトデータd10-1をホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、1回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。このDMA転送では、データd10-1の先頭位置を指定する転送元アドレスと、データ長=16KBがDMAC15にセットされてもよい。データd10-1の先頭位置を指定する転送元アドレスは、データd10に対応するライトコマンド内のデータポインタによって表される。
Then, the controller 4 transfers this 16 Kbyte write data (d8, d9) to the NAND flash memory 5 as data to be written to page P5 of write destination block BLK#1.
The controller 4 changes the next write destination page of the write destination block BLK#1 to page P6, and acquires the first 16K byte data d10-1 in the data d10 from the write data buffer 51 of the host 2. In this case, the controller 4 may transfer the 16 Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by one DMA transfer, for example, although the controller 4 is not limited thereto. In this DMA transfer, a transfer source address specifying the starting position of data d10-1 and a data length of 16 KB may be set in the DMAC 15. The transfer source address specifying the starting position of data d10-1 is represented by the data pointer in the write command corresponding to data d10.

そして、コントローラ4は、この16Kバイトライトデータ(d10-1)を、書き込み先ブロックBLK#1のページP6に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP7に変更し、データd10内の次の16Kバイトデータd10-2をホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、1回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。このDMA転送では、データd10-2の先頭位置を指定する転送元アドレスと、データ長=16KBがDMAC15にセットされてもよい。データd10-2の先頭位置を指定する転送元アドレスは、データd10に対応するライトコマンド内のデータポインタの値に16KB分のオフセットを加算することによって求めることができる。
Then, the controller 4 transfers this 16 Kbyte write data (d10-1) to the NAND flash memory 5 as data to be written to page P6 of write destination block BLK#1.
The controller 4 changes the next write destination page of the write destination block BLK#1 to page P7, and acquires the next 16 Kbyte data d10-2 in the data d10 from the write data buffer 51 of the host 2. In this case, the controller 4 may transfer the 16 Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by one DMA transfer, for example, although the controller 4 is not limited thereto. In this DMA transfer, a transfer source address specifying the starting position of data d10-2 and a data length of 16 KB may be set in the DMAC 15. The transfer source address specifying the starting position of data d10-2 can be obtained by adding an offset of 16 KB to the value of the data pointer in the write command corresponding to data d10.

そして、コントローラ4は、この16Kバイトライトデータ(d10-2)を、書き込み先ブロックBLK#1のページP7に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
そして、コントローラ4は、フォギー書き込み動作によって4ページ分のデータ(P4~P7)を書き込み先ブロックBLK#1のワード線WL1に接続された複数のメモリセルに書き込む。
Then, the controller 4 transfers this 16 Kbyte write data (d10-2) to the NAND flash memory 5 as data to be written to page P7 of write destination block BLK#1.
Then, the controller 4 writes four pages of data (P4 to P7) into the plurality of memory cells connected to the word line WL1 of the write destination block BLK#1 by a foggy write operation.

このように、コントローラ4は、書き込み先ブロックBLK#1の書き込み動作の進行に合わせて、書き込み先ブロックBLK#1の書き込み先ページに転送すべき16Kバイトデータをホスト2から取得する。
そして、ワード線WL3に接続された複数のメモリセルに対するフォギー書き込み動作が終了すると、ワード線WL0に接続された複数のメモリセルに対するファイン書き込み動作の実行が可能となる。コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP1に変更し、上述と同様の手順で、ライトデータ(P0~P3)をページ単位でNAND型フラッシュメモリ5に再び転送し、そしてファイン書き込み動作によってこれら4ページ分のライトデータ(P0~P3)を書き込み先ブロックBLK#1のワード線WL0に接続された複数のメモリセルに書き込む。
In this way, the controller 4 acquires 16 Kbyte data to be transferred to the write destination page of the write destination block BLK#1 from the host 2 in accordance with the progress of the write operation of the write destination block BLK#1.
Then, when the foggy write operation for the plurality of memory cells connected to the word line WL3 is completed, it becomes possible to execute the fine write operation for the plurality of memory cells connected to the word line WL0. The controller 4 changes the next write destination page of the write destination block BLK#1 to page P1, and transfers the write data (P0 to P3) page by page again to the NAND flash memory 5 using the same procedure as described above. Then, by a fine write operation, these four pages worth of write data (P0 to P3) are written to a plurality of memory cells connected to the word line WL0 of the write destination block BLK#1.

これにより、最初の6つのライトコマンド、つまりデータd1に対応するライトコマンド、データd2に対応するライトコマンド、データd3に対応するライトコマンド、データd4に対応するライトコマンド、データd5に対応するライトコマンド、データd6に対応するライトコマンドの各々に関しては、各ライトコマンドに関連付けせけたライトデータ全体に対するフォギー・ファイン書き込み動作の全てが終了し、且つデータd1~d6の各々はNAND型フラッシュメモリ5から読み出し可能となる。このため、コントローラ4は、最初の6つのライトコマンドにそれぞれに対応する6つのコマンド完了レスポンスをホスト2に返す。 As a result, the first six write commands, that is, the write command corresponding to data d1, the write command corresponding to data d2, the write command corresponding to data d3, the write command corresponding to data d4, and the write command corresponding to data d5, are executed. , for each of the write commands corresponding to data d6, all foggy fine write operations for the entire write data associated with each write command are completed, and each of data d1 to d6 is read from the NAND flash memory 5. It becomes possible. Therefore, the controller 4 returns six command completion responses corresponding to the first six write commands to the host 2.

なお、図47では、書き込み先ブロックBLK#1を指定するライトコマンドそれぞれに関連づけられたライトデータを、書き込み先ブロックBLK#1の書き込み動作の進行に合わせて16Kバイトの単位でホスト2からフラッシュストレージデバイス3に転送する動作を説明したが、他の各書き込み先ブロックBLK#に関しても、図9で説明した動作と同様の動作が実行される。 In addition, in FIG. 47, write data associated with each write command that specifies write destination block BLK#1 is transferred from the host 2 to the flash storage in units of 16 Kbytes as the write operation of write destination block BLK#1 progresses. Although the operation of transferring data to device 3 has been described, the same operation as that described with reference to FIG. 9 is performed for each of the other write destination blocks BLK#.

図48のフローチャートは、フラッシュストレージデバイス3によって実行されるデータ書き込み処理の手順を示す。ここでは、フラッシュストレージデバイス3が、タイプ#2-ストレージデバイスとして実現されており、かつ、ホスト2からのライトデータを書き込み予定のページアドレスを、NAND型フラッシュメモリ5への書き込みの終了を待機することなく、ホスト2に通知する仕組みを備えていることを想定する。 The flowchart in FIG. 48 shows the procedure of data write processing executed by the flash storage device 3. Here, the flash storage device 3 is realized as a type #2 storage device, and waits for the page address to which write data from the host 2 is scheduled to be written to the NAND flash memory 5 to finish. It is assumed that a mechanism is provided to notify the host 2 without any notification.

フラッシュストレージデバイス3のコントローラ4は、データポインタ、長さ、ブロック識別子(例えばブロックアドレス)を各々が含むライトコマンドそれぞれをホスト2から受信する(ステップB1)。
次いで、コントローラ4は、特定の書き込み先ブロックを指定する一つのライトコマンドに対応する大きなサイズのライトデータを2以上のデータ部に分割、またはこの特定の書き込み先ブロックを指定する2以上のライトコマンドに対応する2以上のライトデータを結合し、これによってNAND型フラッシュメモリ5の書き込み単位(データ転送サイズ)と同じサイズの単位でデータをホスト2からフラッシュストレージデバイス3に転送する(ステップB2)。ステップB2では、図47で説明したように、例えば、小さなサイズを有する幾つかのライトデータ部を互いに結合することによって得られる一つの16Kバイトデータ、あるいは大きなサイズを有するライトデータを分割することによって得られる幾つかの16Kバイトデータの一つが、ホスト2からフラッシュストレージデバイス3に転送される。フラッシュストレージデバイス3が内部バッファ31を含む構成であるケースにおいては、ホスト2からフラッシュストレージデバイス3に転送される各16バイトライトデータは内部バッファ31に格納される。また、ステップB2では、小さなサイズを有する幾つかのライトデータ部を互いに結合するために、コントローラ4は、ある書き込み先ブロックを指定する識別子を有する先行するライトコマンドに関連付けられたライトデータのサイズが書き込み単位(例えば16Kバイト)よりも小さい場合、この書き込み先ブロックを指定する識別子を有する後続のライトコマンドの受信を待つ。
The controller 4 of the flash storage device 3 receives each write command from the host 2, each including a data pointer, length, and block identifier (eg, block address) (step B1).
Next, the controller 4 divides the large size write data corresponding to one write command specifying a specific write destination block into two or more data parts, or divides the large size write data corresponding to one write command specifying a specific write destination block, or divides the large size write data corresponding to one write command specifying this specific write destination block into two or more write commands specifying this specific write destination block. Two or more pieces of write data corresponding to are combined, and thereby data is transferred from the host 2 to the flash storage device 3 in units of the same size as the write unit (data transfer size) of the NAND flash memory 5 (step B2). In step B2, as explained in FIG. 47, for example, one 16K byte data is obtained by combining several write data portions having a small size, or by dividing write data having a large size. One of several 16K bytes of data obtained is transferred from the host 2 to the flash storage device 3. In the case where the flash storage device 3 includes an internal buffer 31, each 16-byte write data transferred from the host 2 to the flash storage device 3 is stored in the internal buffer 31. Further, in step B2, in order to combine several write data portions having small sizes, the controller 4 determines that the size of the write data associated with the preceding write command having an identifier specifying a certain write destination block is If it is smaller than the write unit (for example, 16 Kbytes), it waits for reception of a subsequent write command having an identifier specifying this write destination block.

コントローラ4は、ホスト2から転送された16Kバイトデータについて、この16Kバイトデータを特定の書き込み先ブロックに書き込む前に、この16Kバイトデータの書き込み先に割り当てた特定の書き込み先ブロック内のアドレスをホスト2に通知する(ステップB3)。それから、コントローラ4は、ホスト2から転送された16KバイトデータをNAND型フラッシュメモリ5に転送し、この16Kバイトデータを、この特定の書き込み先ブロック内の書き込み先に割り当てたアドレスに書き込む(ステップB4)。コントローラ4は、この書き込みが成功したか否かを判定し(ステップB5)、エラーの場合(ステップB5:NO)、ステップB3から処理を繰り返す。つまり、同一のデータについてのホスト2へのアドレスの通知は複数回発生し得る。成功の場合は(ステップB5:YES)、ステップB6へと進む。 Regarding the 16 Kbyte data transferred from the host 2, before writing the 16 Kbyte data to a specific write destination block, the controller 4 sends the address in the specific write destination block assigned to the write destination of the 16 Kbyte data to the host. 2 (step B3). Then, the controller 4 transfers the 16K byte data transferred from the host 2 to the NAND flash memory 5, and writes this 16K byte data to the address assigned to the write destination in this specific write destination block (step B4 ). The controller 4 determines whether or not this writing was successful (step B5), and in the case of an error (step B5: NO), repeats the process from step B3. In other words, notification of the address to the host 2 regarding the same data may occur multiple times. If successful (step B5: YES), proceed to step B6.

そして、コントローラ4は、この特定の書き込み先ブロックを指定する一つのライトコマンドに関連付けられたライトデータ全体に対する書き込み動作(NAND型フラッシュメモリ5に同じデータを1回または複数回転送することを伴う書き込み動作)の全てが終了したか否かを判定する(ステップB6)。 Then, the controller 4 performs a write operation (a write operation that involves transferring the same data one or more times to the NAND flash memory 5) for the entire write data associated with one write command that specifies this specific write destination block. (step B6).

この特定の書き込み先ブロックを指定する一つのライトコマンドに関連付けられたライトデータ全体に対する書き込み動作の全てが終了したならば、コントローラ4は、このライトコマンドのコマンド完了を示すレスポンスをホスト2に返す(ステップB7)。ライトデータが格納されるライトデータバッファ51上の領域に関する解放可能通知のホスト2への送信タイミングについては後述する。 When all write operations for the entire write data associated with one write command specifying this specific write destination block are completed, the controller 4 returns a response indicating completion of this write command to the host 2 ( Step B7). The timing of transmitting the releasable notification to the host 2 regarding the area on the write data buffer 51 where write data is stored will be described later.

図49のフローチャートは、フラッシュストレージデバイス3によって実行されるデータ書き込み処理の別の手順を示す。ここでも、フラッシュストレージデバイス3が、タイプ#2-ストレージデバイスとして実現されており、かつ、ホスト2からのライトデータを書き込み予定のページアドレスを、NAND型フラッシュメモリ5への書き込みの終了を待機することなく、ホスト2に通知する仕組みを備えていることを想定する。 The flowchart in FIG. 49 shows another procedure of the data write process executed by the flash storage device 3. Here, too, the flash storage device 3 is realized as a type #2 storage device, and waits for the page address to which write data from the host 2 is scheduled to be written to the NAND flash memory 5 to finish. It is assumed that a mechanism is provided to notify the host 2 without any notification.

フラッシュストレージデバイス3のコントローラ4は、データポインタ、長さ、ブロック識別子(例えばブロックアドレス)を各々が含むライトコマンドそれぞれをホスト2から受信する(ステップB11)。
次いで、コントローラ4は、特定の書き込み先ブロックを指定する一つのライトコマンドに対応する大きなサイズのライトデータを2以上のデータ部に分割、またはこの特定の書き込み先ブロックを指定する2以上のライトコマンドに対応する2以上のライトデータを結合し、これによってNAND型フラッシュメモリ5の書き込み単位(データ転送サイズ)と同じサイズの単位でデータをホスト2からフラッシュストレージデバイス3に転送する(ステップB12)。ステップB12では、図47で説明したように、例えば、小さなサイズを有する幾つかのライトデータ部を互いに結合することによって得られる一つの16Kバイトデータ、あるいは大きなサイズを有するライトデータを分割することによって得られる幾つかの16Kバイトデータの一つが、ホスト2からフラッシュストレージデバイス3に転送される。フラッシュストレージデバイス3が内部バッファ31を含む構成であるケースにおいては、ホスト2からフラッシュストレージデバイス3に転送される各16バイトライトデータは内部バッファ31に格納される。また、ステップB2では、小さなサイズを有する幾つかのライトデータ部を互いに結合するために、コントローラ4は、ある書き込み先ブロックを指定する識別子を有する先行するライトコマンドに関連付けられたライトデータのサイズが書き込み単位(例えば16Kバイト)よりも小さい場合、この書き込み先ブロックを指定する識別子を有する後続のライトコマンドの受信を待つ。
The controller 4 of the flash storage device 3 receives each write command from the host 2, each including a data pointer, a length, and a block identifier (for example, a block address) (step B11).
Next, the controller 4 divides the large size write data corresponding to one write command specifying a specific write destination block into two or more data parts, or divides the large size write data corresponding to one write command specifying a specific write destination block, or divides the large size write data corresponding to one write command specifying this specific write destination block into two or more write commands specifying this specific write destination block. Two or more pieces of write data corresponding to are combined, and thereby data is transferred from the host 2 to the flash storage device 3 in units of the same size as the write unit (data transfer size) of the NAND flash memory 5 (step B12). In step B12, as explained in FIG. 47, for example, one 16K byte data is obtained by combining several write data portions having a small size, or by dividing write data having a large size. One of several 16K bytes of data obtained is transferred from the host 2 to the flash storage device 3. In the case where the flash storage device 3 includes an internal buffer 31, each 16-byte write data transferred from the host 2 to the flash storage device 3 is stored in the internal buffer 31. Further, in step B2, in order to combine several write data portions having small sizes, the controller 4 determines that the size of the write data associated with the preceding write command having an identifier specifying a certain write destination block is If it is smaller than the write unit (for example, 16 Kbytes), it waits for reception of a subsequent write command having an identifier specifying this write destination block.

コントローラ4は、ホスト2から転送された16KバイトデータをNAND型フラッシュメモリ5に転送し、この16Kバイトデータを、この特定の書き込み先ブロックに書き込む(ステップB13)。
コントローラ4は、この書き込みが成功したか否かを判定し(ステップB14)、エラーの場合(ステップB14:NO)、ステップB13から処理を繰り返す。成功の場合は(ステップB14:YES)、ステップB15へと進む。
The controller 4 transfers the 16 Kbyte data transferred from the host 2 to the NAND flash memory 5, and writes this 16 Kbyte data to this specific writing destination block (step B13).
The controller 4 determines whether or not this writing was successful (step B14), and in the case of an error (step B14: NO), repeats the process from step B13. If successful (step B14: YES), the process advances to step B15.

コントローラ4は、ホスト2から転送された16Kバイトデータの書き込み先に割り当てた特定の書き込み先ブロック内のアドレスをホスト2に通知する(ステップB15)。
そして、コントローラ4は、この特定の書き込み先ブロックを指定する一つのライトコマンドに関連付けられたライトデータ全体に対する書き込み動作(NAND型フラッシュメモリ5に同じデータを1回または複数回転送することを伴う書き込み動作)の全てが終了したか否かを判定する(ステップB16)。
The controller 4 notifies the host 2 of the address in the specific write destination block assigned to the write destination of the 16 Kbyte data transferred from the host 2 (step B15).
Then, the controller 4 performs a write operation for the entire write data associated with one write command that specifies this specific write destination block (a write operation that involves transferring the same data to the NAND flash memory 5 once or multiple times). (step B16).

この特定の書き込み先ブロックを指定する一つのライトコマンドに関連付けられたライトデータ全体に対する書き込み動作の全てが終了したならば、コントローラ4は、このライトコマンドのコマンド完了を示すレスポンスをホスト2に返す(ステップB17)。ライトデータが格納されるライトデータバッファ51上の領域に関する解放可能通知のホスト2への送信タイミングについては後述する。 When all write operations for the entire write data associated with one write command specifying this specific write destination block are completed, the controller 4 returns a response indicating completion of this write command to the host 2 ( Step B17). The timing of transmitting the releasable notification to the host 2 regarding the area on the write data buffer 51 where write data is stored will be described later.

図50のフローチャートは、フラッシュストレージデバイス3によって実行されるホスト2への解放可能通知の送信処理の手順を示す。
コントローラ4は、第1に、特定の書き込み先ブロックを指定する一つのライトコマンドに関連付けられたライトデータ全体に対する書き込み動作の全てが終了したか否かを判定する(ステップC1)。また、コントローラ4は、第2に、このライトデータを対象とするリードコマンドが存在するか否かを判定する(ステップC2)。なお、ステップC1の処理とステップC2の処理とは、並列的に実行される。そして、コントローラ4は、特定の書き込み先ブロックを指定する一つのライトコマンドに関連付けられたライトデータ全体に対する書き込み動作の全てが終了し(ステップC1:YES)、かつ、このライトデータを対象とするリードコマンドが存在しない場合に(ステップC2:NO)、このライトデータが格納されるライトデータバッファ51上の領域に関する解放可能通知をホスト2に送信する(ステップC3)。
The flowchart in FIG. 50 shows the procedure of the process of transmitting a releasable notification to the host 2, which is executed by the flash storage device 3.
The controller 4 first determines whether all write operations for the entire write data associated with one write command specifying a specific write destination block have been completed (step C1). Second, the controller 4 determines whether or not there is a read command that targets this write data (step C2). Note that the processing in step C1 and the processing in step C2 are executed in parallel. Then, the controller 4 determines that all write operations for the entire write data associated with one write command specifying a specific write destination block have been completed (step C1: YES), and that the read operation for this write data is completed. If the command does not exist (step C2: NO), a releasable notification regarding the area on the write data buffer 51 in which this write data is stored is sent to the host 2 (step C3).

図51のフローチャートは、ホスト2によって実行されるライトデータ破棄処理の手順を示す。
ホスト2は、ライトコマンドのコマンド完了を示すレスポンスをフラッシュストレージデバイス3から受信したか否かを判定する(ステップD1)。あるライトコマンドのコマンド完了を示すレスポンスをフラッシュストレージデバイス3から受信した場合(ステップD1:YES)、ホスト2は、さらに、このライトコマンドに関連付けられたライトデータに関する解放可能通知をフラッシュストレージデバイス3から受信したか否かを判定する(ステップD2)。このライトデータに関する解放可能通知をフラッシュストレージデバイス3から受信した場合(ステップD2:YES)、ホスト2は、このライトコマンドに関連付けられたライトデータをライトデータバッファ51から破棄する(ステップD3)。
The flowchart in FIG. 51 shows the procedure of write data discard processing executed by the host 2.
The host 2 determines whether a response indicating completion of the write command has been received from the flash storage device 3 (step D1). When receiving a response from the flash storage device 3 indicating command completion for a certain write command (step D1: YES), the host 2 further receives a releasable notification regarding the write data associated with this write command from the flash storage device 3. It is determined whether or not it has been received (step D2). If a releasable notification regarding this write data is received from the flash storage device 3 (step D2: YES), the host 2 discards the write data associated with this write command from the write data buffer 51 (step D3).

図52は、ある書き込み先ブロックを指定する最後のライトコマンドが受信されてから閾期間、この書き込み先ブロックを指定する次のライトコマンドが受信されない場合に、フラッシュストレージデバイス3によって実行されるダミーデータ書き込み処理を示す。 FIG. 52 shows dummy data executed by the flash storage device 3 when the next write command that specifies a certain write destination block is not received for a threshold period after the last write command that specifies this write destination block is received. Shows write processing.

図52の左部に示されるデータd1、データd2、データd3、データd4は、書き込み先ブロックBLK#1を指定する4個のライトコマンドそれぞれに対応する4個のライトデータを示している。図52では、データd1、データd2、データd3、データd4の各々が4Kバイトのサイズを有する場合が想定されている。 Data d1, data d2, data d3, and data d4 shown on the left side of FIG. 52 indicate four pieces of write data corresponding to each of four write commands specifying write destination block BLK#1. In FIG. 52, it is assumed that each of data d1, data d2, data d3, and data d4 has a size of 4 Kbytes.

(1)コントローラ4は、データd1、データd2、データd3、データd4を互いに結合することによって得られる16Kバイトライトデータをホスト2のライトデータバッファ51から取得する。そして、コントローラ4は、この16Kバイトライトデータを、書き込み先ブロックBLK#1のページP0に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。書き込み先ブロックBLK#1を指定する最後のライトコマンド、つまりデータd4の書き込みを要求したライトコマンド、が受信されてから閾期間、書き込み先ブロックBLK#1を指定する後続のライトコマンドが受信されない場合、コントローラ4は、最後のライトコマンドのコマンド完了を示すレスポンスを所定時間内にホスト2に返すことを可能にするために、書き込み先ブロックBLK#1内の1以上のページにダミーデータを書き込み、次のライトデータが書き込まれるべき書き込み先ブロックBLK#1内の書き込み先ページの位置を進める。例えば、コントローラ4は、ページP1~P3に対応する3ページ分のダミーデータをページ単位でNAND型フラッシュメモリ5に転送し、フォギー書き込み動作によって4ページ分のデータ(P0~P3)を書き込み先ブロックBLK#1のワード線WL0に接続された複数のメモリセルに書き込む。 (1) The controller 4 acquires 16 Kbyte write data obtained by combining data d1, data d2, data d3, and data d4 from the write data buffer 51 of the host 2. Then, the controller 4 transfers this 16 Kbyte write data to the NAND flash memory 5 as data to be written to page P0 of write destination block BLK#1. If a subsequent write command that specifies write destination block BLK#1 is not received for a threshold period after the last write command that specifies write destination block BLK#1, that is, the write command that requested writing of data d4, is received. , the controller 4 writes dummy data to one or more pages in the write destination block BLK#1 in order to make it possible to return a response indicating completion of the last write command to the host 2 within a predetermined time. The position of the write destination page in the write destination block BLK#1 to which the next write data is to be written is advanced. For example, the controller 4 transfers three pages worth of dummy data corresponding to pages P1 to P3 to the NAND flash memory 5 page by page, and transfers four pages worth of data (P0 to P3) to the write destination block by a foggy write operation. Write to a plurality of memory cells connected to word line WL0 of BLK#1.

(2)次いで、コントローラ4は、ページP4~P7に対応する4ページ分のダミーデータをページ単位でNAND型フラッシュメモリ5に転送し、フォギー書き込み動作によって4ページ分のデータ(P4~P7)を書き込み先ブロックBLK#1のワード線WL1に接続された複数のメモリセルに書き込む。 (2) Next, the controller 4 transfers four pages worth of dummy data corresponding to pages P4 to P7 to the NAND flash memory 5 in page units, and writes the four pages worth of data (P4 to P7) by a foggy write operation. Write to a plurality of memory cells connected to word line WL1 of write destination block BLK#1.

(3)次いで、コントローラ4は、ページP8~P11に対応する4ページ分のダミーデータをページ単位でNAND型フラッシュメモリ5に転送し、フォギー書き込み動作によって4ページ分のデータ(P8~P11)を書き込み先ブロックBLK#1のワード線WL2に接続された複数のメモリセルに書き込む。 (3) Next, the controller 4 transfers four pages worth of dummy data corresponding to pages P8 to P11 to the NAND flash memory 5 in page units, and writes the four pages worth of data (P8 to P11) by a foggy write operation. Write to a plurality of memory cells connected to word line WL2 of write destination block BLK#1.

(4)次いで、コントローラ4は、ページP12~P15に対応する4ページ分のダミーデータをページ単位でNAND型フラッシュメモリ5に転送し、フォギー書き込み動作によって4ページ分のデータ(P12~P15)を書き込み先ブロックBLK#1のワード線WL3に接続された複数のメモリセルに書き込む。 (4) Next, the controller 4 transfers four pages worth of dummy data corresponding to pages P12 to P15 to the NAND flash memory 5 in page units, and writes the four pages worth of data (P12 to P15) by a foggy write operation. Write to a plurality of memory cells connected to word line WL3 of write destination block BLK#1.

(5)次いで、コントローラ4は、データd1、データd2、データd3、データd4を互いに結合することによって得られる16Kバイトライトデータをライトデータバッファ51または内部バッファ31からNAND型フラッシュメモリ5に転送し、さらに、WL0のフォギー書き込み動作で使用した3ページ分のダミーデータ(P0~P3)と同じ3ページ分のダミーデータ(P0~P3)をページ単位でNAND型フラッシュメモリ5に転送する。そして、コントローラ4は、ファイン書き込み動作によって4ページ分のデータ(P0~P3)を書き込み先ブロックBLK#1のワード線WL0に接続された複数のメモリセルに書き込む。これにより、データd1、データd2、データd3、データd4の複数段階の書き込み動作が全て完了し、データd1、データd2、データd3、データd4がNAND型フラッシュメモリ5読み出し可能となる。コントローラ4は、データd1の書き込みを要求した最初のライトコマンドのコマンド完了を示すレスポンスと、データd2の書き込みを要求した2番目のライトコマンドのコマンド完了を示すレスポンスと、データd3の書き込みを要求した3番目のライトコマンドのコマンド完了を示すレスポンスと、データd4の書き込みを要求した4番目のライトコマンドのコマンド完了を示すレスポンスとをホスト2に返す。 (5) Next, the controller 4 transfers the 16K byte write data obtained by combining the data d1, data d2, data d3, and data d4 from the write data buffer 51 or the internal buffer 31 to the NAND flash memory 5. , Furthermore, the same three pages of dummy data (P0 to P3) used in the foggy write operation of WL0 are transferred to the NAND flash memory 5 in page units. Then, the controller 4 writes four pages worth of data (P0 to P3) into the plurality of memory cells connected to the word line WL0 of the write destination block BLK#1 by a fine write operation. As a result, the multiple stages of write operations for data d1, data d2, data d3, and data d4 are all completed, and data d1, data d2, data d3, and data d4 can be read from the NAND flash memory 5. The controller 4 sends a response indicating completion of the first write command that requested writing of data d1, a response indicating completion of the second write command requesting writing of data d2, and a response requesting writing of data d3. A response indicating completion of the third write command and a response indicating completion of the fourth write command that requested writing of data d4 are returned to the host 2.

本実施形態では、NAND型フラッシュメモリ5のデータ書き込み単位と同じデータサイズの単位でライトデータがホスト2からフラッシュストレージデバイス3に転送され、あるライトコマンドのライトデータ全体の書き込み動作の全てが終了した時点で、またはこのライトデータ全体の書き込み動作の全てが終了し且つこのライトデータ全体が読み出し可能となった時点で、このライトコマンドのコマンド完了を示すレスポンスがホスト2に返される。このため、例えば、小さなライトデータをある書き込み先ブロックに書き込むことを要求するライトコマンドがホスト2からフラッシュストレージデバイス3に発行された後にしばらくの間、この書き込み先ブロックを指定する後続のライトコマンドがホスト2から発行されない場合には、このライトコマンドのタイムアウトエラーが起こる可能性がある。本実施形態では、コントローラ4は、あるブロック識別子を有する最後のライトコマンドがホスト2から受信されてから閾期間このブロック識別子を有する次のライトコマンドが受信されない場合、ダミーデータを、このブロック識別子に対応する書き込み先ブロック内の次の1以上の未書き込みページに書き込む。したがって、必要に応じて、この書き込み先ブロックの書き込み動作を進行させることができるので、ライトコマンドのタイムアウトエラーが起こることを防止することができる。 In this embodiment, write data is transferred from the host 2 to the flash storage device 3 in units of the same data size as the data write unit of the NAND flash memory 5, and all write operations for the entire write data of a certain write command are completed. At this point, or when all write operations for the entire write data are completed and the entire write data becomes readable, a response indicating completion of the write command is returned to the host 2. For this reason, for example, after a write command is issued from the host 2 to the flash storage device 3 requesting to write small write data to a certain write destination block, subsequent write commands specifying this write destination block will not be executed for a while. If the host 2 does not issue the write command, a timeout error may occur for this write command. In this embodiment, if the next write command with this block identifier is not received for a threshold period after the last write command with this block identifier is received from the host 2, the controller 4 assigns dummy data to this block identifier. Write to the next one or more unwritten pages in the corresponding write destination block. Therefore, it is possible to proceed with the write operation of this write destination block as necessary, so that it is possible to prevent a write command timeout error from occurring.

図53のフローチャートは、フラッシュストレージデバイス3によって実行されるダミーデータ書き込み処理の手順を示す。ここでは、フォギー・ファイン書き込み動作のような複数段階の書き込み動作によってデータが書き込み先ブロックに書き込まれる場合を想定する。 The flowchart in FIG. 53 shows the procedure of dummy data write processing executed by the flash storage device 3. Here, it is assumed that data is written to a write destination block by a multi-step write operation such as a foggy fine write operation.

フラッシュストレージデバイス3のコントローラ4は、ある書き込み先ブロックを指定する最後のライトコマンドに関連付けられたライトデータをフォギー書き込み動作のような第1段階の書き込み動作によってこの書き込み先ブロックに書き込む。この最後のライトコマンドの受信から閾期間(Th)、この書き込み先ブロックを指定する次のライトコマンドが受信されない場合(ステップS31のYES)、コントローラ4は、最後のライトコマンドに関連付けられたライトデータが書き込まれた書き込み先ブロック内のページに後続する1以上のページにダミーデータを書き込み、これによって、次のライトデータが書き込まれるべきこの書き込み先ブロック内の書き込み先ページの位置を進める(ステップS32)。この書き込み先ブロックへのダミーデータの書き込みによって書き込み先ページの位置が進み、これによって最後のライトコマンドに関連付けられたライトデータのファイン書き込み動作(第2段階の書き込み動作)が実行可能となると、コントローラ4は、最後のライトコマンドに関連付けられたライトデータをライトデータバッファ51または内部バッファ(共有キャッシュ)31からNAND型フラッシュメモリ5に再び転送し、このライトデータのファイン書き込み動作を実行する(ステップS33)。 The controller 4 of the flash storage device 3 writes the write data associated with the last write command specifying a certain write destination block to this write destination block by a first stage write operation such as a foggy write operation. If the next write command that specifies this write destination block is not received within a threshold period (Th) from reception of this last write command (YES in step S31), the controller 4 writes the write data associated with the last write command. writes dummy data to one or more pages following the page in the write destination block to which the next write data is written, thereby advancing the position of the write destination page in this write destination block into which the next write data is to be written (step S32 ). By writing dummy data to the write destination block, the position of the write destination page advances, and when the fine write operation (second stage write operation) of the write data associated with the last write command can be executed, the controller 4 transfers the write data associated with the last write command from the write data buffer 51 or the internal buffer (shared cache) 31 to the NAND flash memory 5 again, and executes a fine write operation of this write data (step S33). ).

最後のライトコマンドに関連付けられたライトデータのファイン書き込み動作が終了すると、つまりこのライトデータ全体の複数段階の書き込み動作の全てが終了すると、コントローラ4は、この最後のライトコマンドのコマンド完了を示すレスポンスをホスト2に返す(ステップS34)。 When the fine write operation of the write data associated with the last write command is completed, that is, when all the multiple stages of write operation of the entire write data are completed, the controller 4 sends a response indicating the command completion of this last write command. is returned to the host 2 (step S34).

このように、複数段階の書き込み動作によってライトデータを書き込み先ブロックに書き込むケースにおいては、コントローラ4は、最後のライトコマンドに関連付けられたライトデータの第2段階の書き込み動作が実行可能になるように、ダミーデータをこの書き込み先ブロック内の1以上のページに書き込み、次のライトデータが書き込まれるべきこの書き込み先ブロック内の書き込み先ページの位置を進める。 In this way, in a case where write data is written to a write destination block by a multiple-step write operation, the controller 4 performs a write operation such that the second-step write operation of the write data associated with the last write command can be executed. , writes dummy data to one or more pages within this destination block, and advances the position of the destination page within this destination block into which the next write data is to be written.

図54は、内部バッファ(共有キャッシュ)31を使用してコントローラ4によって実行されるデータ転送動作を示す。
内部バッファ(共有キャッシュ)31は、複数の書き込み先ブロックBLK#1、BLK#2、…、BLK#nによって共有される。フラッシュストレージデバイス3のコントローラ4は、書き込み先ブロックBLK#1、BLK#2、…、BLK#nの各々について以下の処理を実行する。
FIG. 54 shows data transfer operations performed by controller 4 using internal buffer (shared cache) 31.
The internal buffer (shared cache) 31 is shared by a plurality of write destination blocks BLK#1, BLK#2, . . . , BLK#n. The controller 4 of the flash storage device 3 executes the following process for each write destination block BLK#1, BLK#2, . . . , BLK#n.

以下では、書き込み先ブロックBLK#1を例示して説明する。
コントローラ4が、書き込み先ブロックBLK#1を指定する1以上のライトコマンドを受信した後、コントローラ4は、書き込み先ブロックBLK#1を指定する一つのライトコマンドに関連付けられたライトデータを複数のライトデータに分割、または書き込み先ブロックBLK#1を指定する2以上のライトコマンドにそれぞれ関連付けられたライトデータを互いに結合することによって得られる、NAND型フラッシュメモリ5の書き込み単位と同じサイズを有するライトデータを、ライトデータバッファ51から取得する。そして、コントローラ4は、ライトデータバッファ51から取得される、各々がNAND型フラッシュメモリ5の書き込み単位と同じサイズを有する複数のライトデータを内部バッファ(共有キャッシュ)31に格納する。
In the following, the write destination block BLK#1 will be explained as an example.
After the controller 4 receives one or more write commands specifying the write destination block BLK#1, the controller 4 writes multiple write data associated with one write command specifying the write destination block BLK#1. Write data having the same size as the write unit of the NAND flash memory 5, obtained by dividing into data or combining write data respectively associated with two or more write commands specifying the write destination block BLK#1 is obtained from the write data buffer 51. Then, the controller 4 stores a plurality of write data obtained from the write data buffer 51, each of which has the same size as the write unit of the NAND flash memory 5, in the internal buffer (shared cache) 31.

ライトデータバッファ51は、必ずしも、ホストメモリ上の連続する一つの領域から構成される必要は無く、図54に示されているように、複数のライトデータバッファ51-1、51-2、…、51-nによって実現されてもよい。
コントローラ4は、書き込み先ブロックBLK#1に次に書き込むべきライトデータ(第1のライトデータ)を内部バッファ(共有キャッシュ)31から取得し、第1のライトデータをNAND型フラッシュメモリ5に転送し、フォギー書き込み動作のような第1段階の書き込み動作によってこのライトデータを書き込み先ブロックBLK#1に書き込む。
The write data buffer 51 does not necessarily need to be composed of one continuous area on the host memory, and as shown in FIG. 51-n.
The controller 4 acquires the write data (first write data) to be written next to the write destination block BLK#1 from the internal buffer (shared cache) 31, and transfers the first write data to the NAND flash memory 5. , this write data is written to the write destination block BLK#1 by a first stage write operation such as a foggy write operation.

内部バッファ(共有キャッシュ)31にホスト2からのライトデータを効率よく蓄積できるようにするため、ホスト2から取得されるライトデータを格納するための空き領域が内部バッファ(共有キャッシュ)31に無い場合には、コントローラ4は、フォギー書き込み動作のような第1段階の書き込み動作が終了している内部バッファ(共有キャッシュ)31内のライトデータ(フォギーステートのライトデータ)を破棄して、空き領域を内部バッファ(共有キャッシュ)31に確保する。 In order to efficiently accumulate write data from the host 2 in the internal buffer (shared cache) 31, if there is no free space in the internal buffer (shared cache) 31 to store the write data acquired from the host 2. In this case, the controller 4 discards the write data (write data in the foggy state) in the internal buffer (shared cache) 31 for which the first stage write operation such as the foggy write operation has been completed, and frees up the free space. Reserved in the internal buffer (shared cache) 31.

例えば、内部バッファ(共有キャッシュ)31に空き領域がない状態でホスト2から任意の書き込み先ブロックを指定する新たなライトコマンドを受信した場合に、コントローラ4は、フォギー書き込み動作のような第1段階の書き込み動作が終了している内部バッファ(共有キャッシュ)31内のライトデータ(フォギーステートのライトデータ)を破棄して、新たなライトコマンドに対応するライトデータを格納可能な空き領域を内部バッファ(共有キャッシュ)31に確保してもよい。 For example, when receiving a new write command from the host 2 that specifies an arbitrary write destination block when there is no free space in the internal buffer (shared cache) 31, the controller 4 performs a first-stage write operation such as a foggy write operation. The write data (foggy state write data) in the internal buffer (shared cache) 31 for which the write operation has been completed is discarded, and the internal buffer ( (shared cache) 31.

例えば、内部バッファ(共有キャッシュ)31全体が多数のフォギーステートのライトデータで満たされている状態でホスト2から新たなライトコマンドを受信した場合には、コントローラ4は、これらフォギーステートのライトデータの中から破棄すべき特定のライトデータを選択してもよく、この選択したライトデータを破棄してもよい。これにより、制限された容量を有する内部バッファ(共有キャッシュ)31を、複数の書き込み先ブロック間で効率よく共有することができる。 For example, if a new write command is received from the host 2 while the entire internal buffer (shared cache) 31 is filled with write data in a large number of foggy states, the controller 4 Specific write data to be discarded may be selected from among them, and the selected write data may be discarded. Thereby, the internal buffer (shared cache) 31 having a limited capacity can be efficiently shared among multiple write destination blocks.

コントローラ4は、第1のライトデータのファイン書き込み動作のような第2段階の書き込み動作を実行すべき時点において第1のライトデータが内部バッファ(共有キャッシュ)31に存在しない場合には、第1のライトデータを取得するための要求(転送要求:DMA転送要求)をホスト2に送信することによってホスト2のライトデータバッファ51から再び取得する。この取得された第1のライトデータは内部バッファ(共有キャッシュ)31に格納されてもよい。そして、コントローラ4は、取得された第1のライトデータをNAND型フラッシュメモリ5に転送し、ファイン書き込み動作のような第2段階の書き込み動作によってこの第1のライトデータを書き込み先ブロックBLK#1に書き込む。 If the first write data does not exist in the internal buffer (shared cache) 31 at the time when a second stage write operation such as a fine write operation of the first write data is to be executed, the controller 4 writes the first write data. The write data is acquired again from the write data buffer 51 of the host 2 by transmitting a request (transfer request: DMA transfer request) to the host 2 to acquire the write data. This acquired first write data may be stored in the internal buffer (shared cache) 31. Then, the controller 4 transfers the acquired first write data to the NAND flash memory 5, and transfers this first write data to the write destination block BLK#1 by a second stage write operation such as a fine write operation. write to.

第1のライトデータのファイン書き込み動作のような第2段階の書き込み動作を実行すべき時点において第1のライトデータが内部バッファ(共有キャッシュ)31に存在している場合には、コントローラ4は、この内部バッファ(共有キャッシュ)31から第1のライトデータを取得し、取得された第1のライトデータをNAND型フラッシュメモリ5に転送し、ファイン書き込み動作のような第2段階の書き込み動作によってこの第1のライトデータを書き込み先ブロックBLK#1に書き込む。 If the first write data exists in the internal buffer (shared cache) 31 at the time when a second stage write operation such as a fine write operation of the first write data is to be executed, the controller 4 The first write data is acquired from this internal buffer (shared cache) 31, the acquired first write data is transferred to the NAND flash memory 5, and the second stage write operation such as a fine write operation is performed. Write the first write data to the write destination block BLK#1.

NAND型フラッシュメモリ5への第1のライトデータの最終回のデータ転送(ここでは、ファイン書き込み動作のためのデータ転送)を行った後、コントローラ4は、この第1のライトデータを内部バッファ(共有キャッシュ)31から破棄することによって内部バッファ(共有キャッシュ)31に空き領域を確保する。あるいは、コントローラ4はこの第1のライトデータのファイン書き込み動作が終了した場合に、この第1のライトデータを内部バッファ(共有キャッシュ)31から破棄してもよい。 After performing the final data transfer of the first write data to the NAND flash memory 5 (here, data transfer for a fine write operation), the controller 4 transfers the first write data to the internal buffer ( By discarding the data from the internal buffer (shared cache) 31, a free space is secured in the internal buffer (shared cache) 31. Alternatively, the controller 4 may discard the first write data from the internal buffer (shared cache) 31 when the fine write operation of the first write data is completed.

さらに、コントローラ4は、あるライトコマンドに関連付けられたライトデータ全体のファイン書き込み動作が終了した場合、あるいはこのライトデータ全体のファイン書き込み動作が終了し且つこのライトデータ全体がNAND型フラッシュメモリ5から読み出し可能となった場合に、このライトコマンドのコマンド完了を示すレスポンスをホスト2に返す。 Further, the controller 4 reads out the entire write data from the NAND flash memory 5 when the fine write operation of the entire write data associated with a certain write command is completed, or when the fine write operation of the entire write data is completed and the entire write data is read out from the NAND flash memory 5. If it becomes possible, a response indicating completion of this write command is returned to the host 2.

内部バッファ(共有キャッシュ)31はある限られた容量を有しているが、書き込み先ブロックの数がある一定数以下であるならば、第2段階の書き込み動作を実行すべき時点において第1のライトデータが内部バッファ(共有キャッシュ)31に存在する確率(ヒット率)は比較的高い。したがって、同じライトデータをホスト2からフラッシュストレージデバイス3に複数回転送すること無く、フォギー・ファイン書き込み動作のような複数段階の書き込み動作を実行することができる。これにより、ホスト2とフラッシュストレージデバイス3との間のデータトラフィックを削減できるので、データ書き込みの度に同じライトデータをホスト2からフラッシュストレージデバイス3に複数回転送する場合に比し、フラッシュストレージデバイス3のI/O性能を向上することができる。 The internal buffer (shared cache) 31 has a limited capacity, but if the number of write destination blocks is less than a certain number, the first block is used at the time when the second stage write operation is to be performed. The probability (hit rate) that write data exists in the internal buffer (shared cache) 31 is relatively high. Therefore, a multi-stage write operation such as a foggy fine write operation can be performed without transferring the same write data from the host 2 to the flash storage device 3 multiple times. As a result, data traffic between the host 2 and the flash storage device 3 can be reduced, so the flash storage device 3 I/O performance can be improved.

書き込み先ブロックの数は、ホスト2を利用するクライアントの数と同数であってよい。この場合、あるクライアントに対応するデータはこのクライアントに対応する書き込み先ブロックに書き込まれ、他のクライアントに対応するデータは別の書き込み先ブロックに書き込まれる。したがって、ホスト2を利用するクライアントの数が増えるにつれて、内部バッファ(共有キャッシュ)31のヒット率は低下する。しかし、第1のライトデータが内部バッファ(共有キャッシュ)31に存在しない場合(ミス)には、コントローラ4はこの第1のライトデータをホスト2から取得する。したがって、クライアントの数が増加しても、フォギー・ファイン書き込み動作のような複数段階の書き込み動作を正常に実行することができる。 The number of write destination blocks may be the same as the number of clients using the host 2. In this case, data corresponding to one client is written to a write destination block corresponding to this client, and data corresponding to another client is written to another write destination block. Therefore, as the number of clients using the host 2 increases, the hit rate of the internal buffer (shared cache) 31 decreases. However, if the first write data does not exist in the internal buffer (shared cache) 31 (miss), the controller 4 acquires this first write data from the host 2. Therefore, even if the number of clients increases, multi-step write operations such as foggy fine write operations can be successfully performed.

よって、フラッシュストレージデバイス3は、フラッシュストレージデバイス3を共有するクライアントの数の増加(つまり、同時に利用可能な書き込み先ブロックの数の増加)に柔軟に対応でき且つホスト2とフラッシュストレージデバイス3との間のデータトラフィックを削減することができる。 Therefore, the flash storage device 3 can flexibly respond to an increase in the number of clients sharing the flash storage device 3 (that is, an increase in the number of write destination blocks that can be used simultaneously), and can also handle the It is possible to reduce data traffic between

ここでは、書き込み先ブロックBLK#1にデータを書き込むための書き込み処理について説明したが、他の全ての書き込み先ブロックの各々に対しても同様の書き込み処理が実行される。
図55のフローチャートは、内部バッファ(共有キャッシュ)31を使用してコントローラ4によって実行されるデータ書き込み処理の手順を示す。
Although the write process for writing data to the write destination block BLK#1 has been described here, the same write process is executed for each of all other write destination blocks.
The flowchart in FIG. 55 shows the procedure of data write processing executed by the controller 4 using the internal buffer (shared cache) 31.

コントローラ4は、データポインタと、ライトデータの長さと、複数の書き込み先ブロックのいずれか一つを指定する識別子(例えばブロックアドレス)とを各々が含む1つ以上のライトコマンドをホスト2から受信する(ステップS101)。同じ書き込み先ブロックを示す識別子を有する一つ以上のライトコマンドを受信した後、コントローラ4は、これらライトコマンド内の一つのライトコマンドに関連付けられたライトデータを複数のライトデータに分割、または同じ書き込み先ブロックを示す識別子を有する2以上のライトコマンドにそれぞれ関連付けられたライトデータを互いに結合することによって得られる、NAND型フラッシュメモリ5の書き込み単位と同じサイズを有するライトデータを、ライトデータバッファ51から内部バッファ(共有キャッシュ)31に転送する(ステップS102)。 The controller 4 receives from the host 2 one or more write commands, each of which includes a data pointer, the length of the write data, and an identifier (for example, a block address) that specifies one of a plurality of write destination blocks. (Step S101). After receiving one or more write commands having identifiers indicating the same write destination block, the controller 4 divides the write data associated with one write command among these write commands into multiple write data, or divides the write data associated with one of these write commands into multiple pieces of write data, or writes the same write data. Write data having the same size as the write unit of the NAND flash memory 5, which is obtained by combining write data respectively associated with two or more write commands having identifiers indicating the destination block, is transferred from the write data buffer 51. The data is transferred to the internal buffer (shared cache) 31 (step S102).

コントローラ4は、この書き込み先ブロックに次に書き込むべきライトデータを内部バッファ(共有キャッシュ)31から取得し、このライトデータをNAND型フラッシュメモリ5に転送し、フォギー書き込み動作によってこの第1のライトデータをこの書き込み先ブロックに書き込む(ステップS103、S104)。NAND型フラッシュメモリ5がQLC-フラッシュとして実現されている場合には、ステップS103では、4ページ分のライトデータがページ単位でNAND型フラッシュメモリ5に転送され、ステップS104では、4ページ分のライトデータがフォギー書き込み動作によってこの書き込み先ブロック内の書き込み対象の一つのワード線に接続された複数のメモリセルに書き込まれる。 The controller 4 obtains the write data to be written next to this write destination block from the internal buffer (shared cache) 31, transfers this write data to the NAND flash memory 5, and writes this first write data by a foggy write operation. is written into this write destination block (steps S103, S104). If the NAND flash memory 5 is implemented as a QLC-flash, in step S103 the write data for four pages is transferred to the NAND flash memory 5 page by page, and in step S104 the write data for four pages is transferred to the NAND flash memory 5 in page units. Data is written by a foggy write operation to a plurality of memory cells connected to one word line to be written in this write destination block.

なお、ライトデータバッファ51から内部バッファ(共有キャッシュ)31へのライトデータの転送は、各書き込み先ブロックの書き込み動作の進行に合わせて実行される。例えば、ある書き込み先ブロックのあるページに書き込むべきライトデータをNAND型フラッシュメモリチップに転送する動作が終了した場合に、この書き込み先ブロックの次のページに書き込むべきライトデータがライトデータバッファ51から内部バッファ(共有キャッシュ)31へ転送されてもよい。あるいは、ある書き込み先ブロックのあるページに書き込むべきライトデータをこの書き込み先ブロックを含むNAND型フラッシュメモリチップに転送する動作が終了し、且つこのライトデータをこの書き込み先ブロックに書き込む動作が終了した場合に、この書き込み先ブロックの次のページに書き込むべきライトデータがライトデータバッファ51から内部バッファ(共有キャッシュ)31へ転送されてもよい。 Note that the transfer of write data from the write data buffer 51 to the internal buffer (shared cache) 31 is executed in accordance with the progress of the write operation of each write destination block. For example, when the operation of transferring write data to be written to a certain page of a certain write destination block to a NAND flash memory chip is completed, the write data to be written to the next page of this write destination block is transferred from the write data buffer 51 to the internal memory. It may be transferred to the buffer (shared cache) 31. Alternatively, when the operation of transferring write data to be written to a certain page of a certain write destination block to the NAND flash memory chip that includes this write destination block is completed, and the operation of writing this write data to this write destination block is completed. Additionally, write data to be written to the next page of this write destination block may be transferred from the write data buffer 51 to the internal buffer (shared cache) 31.

フォギー書き込み動作が行われたこのライトデータのファイン書き込み動作を開始すべき時点において、コントローラ4は、このライトデータが、内部バッファ(共有キャッシュ)31に存在するか否かを判定する。
このライトデータが内部バッファ(共有キャッシュ)31に存在するならば(ステップS106のYES)、コントローラ4は、このライトデータを内部バッファ(共有キャッシュ)31から取得し、このライトデータをNAND型フラッシュメモリ5に転送し、ファイン書き込み動作によってこのライトデータをこの書き込み先ブロックに書き込む(ステップS107、S108、S109)。これにより、このライトデータはNAND型フラッシュメモリ5から読み出し可能となる。
At the time when a fine write operation should be started for the write data that has been subjected to the foggy write operation, the controller 4 determines whether this write data exists in the internal buffer (shared cache) 31 or not.
If this write data exists in the internal buffer (shared cache) 31 (YES in step S106), the controller 4 acquires this write data from the internal buffer (shared cache) 31 and transfers this write data to the NAND flash memory. 5, and this write data is written to this write destination block by a fine write operation (steps S107, S108, S109). Thereby, this write data can be read from the NAND flash memory 5.

コントローラ4は、ライトコマンド毎に、そのライトデータ全体のフォギー・ファイン書き込み動作が終了し且つそのライトデータ全体がNAND型フラッシュメモリ5から読み出し可能となったか否かを判定する。そして、コントローラ4は、フォギー・ファイン書き込み動作が終了し且つNAND型フラッシュメモリ5から読み出し可能となったライトデータに対応するライトコマンドのコマンド完了を示すレスポンスをホスト2に返す(ステップS110)。もしステップS109の処理によってあるライトコマンドに関連付けられたライトデータ全体のファイン書き込み動作が終了したならば、ステップS110では、このライトコマンドのコマンド完了を示すレスポンスがホスト2に返されてもよい。 For each write command, the controller 4 determines whether the foggy fine write operation of the entire write data has been completed and whether the entire write data can be read from the NAND flash memory 5. Then, the controller 4 returns a response to the host 2 indicating completion of the write command corresponding to the write data that has completed the foggy/fine write operation and is now readable from the NAND flash memory 5 (step S110). If the fine write operation of the entire write data associated with a certain write command is completed by the process in step S109, a response indicating completion of this write command may be returned to the host 2 in step S110.

図56のフローチャートは、コントローラ4によって実行されるデータ読み出し処理の手順を示す。ここでは、フラッシュストレージデバイス3が、ホスト2のライトデータバッファ51内に存在するライトデータ中のデータが対象となるリードコマンドがホスト2から受信された場合、そのリードコマンドが終了するまで、そのデータが格納される領域についての解放可能通知をホスト2へ送信しないようにする仕組みを備えていることを想定する。 The flowchart in FIG. 56 shows the procedure of data read processing executed by the controller 4. Here, when the flash storage device 3 receives a read command from the host 2 that targets data in the write data existing in the write data buffer 51 of the host 2, the flash storage device 3 receives the data from the host 2 until the read command is completed. It is assumed that a mechanism is provided to prevent the host 2 from sending a releasable notification regarding the area where the storage area is stored.

上述したように、コントローラ4は、ホスト2から受信されるリードコマンドによって指定されたデータが、その書き込み動作(NAND型フラッシュメモリ5に同じデータを1回または複数回転送する書き込み動作)の全てが終了していないデータ、またはその書き込み動作の全てが終了しているがNAND型フラッシュメモリ5からまだ読み出し可能となっていないデータである場合、このデータが内部バッファ(共有キャッシュ)31に存在するか否かを判定する。このデータが内部バッファ(共有キャッシュ)31に存在しない場合、コントローラ4は、このデータをライトデータバッファ51から取得し、このデータを内部バッファ(共有キャッシュ)31に格納し、このデータを内部バッファ(共有キャッシュ)31からホスト2に返す。 As described above, the controller 4 performs all write operations (write operations in which the same data is transferred one or more times to the NAND flash memory 5) of the data specified by the read command received from the host 2. If the data is unfinished data, or data for which all write operations have been completed but is not yet readable from the NAND flash memory 5, check whether this data exists in the internal buffer (shared cache) 31. Determine whether or not. If this data does not exist in the internal buffer (shared cache) 31, the controller 4 obtains this data from the write data buffer 51, stores this data in the internal buffer (shared cache) 31, and stores this data in the internal buffer ( shared cache) 31 to the host 2.

具体的には、以下のデータ読み出し処理が実行される。
コントローラ4がホスト2からリードコマンドを受信した場合(ステップE1:YES)、コントローラ4は、このリードコマンドによって指定されたデータが、その書き込み動作の全てが終了し、且つNAND型フラッシュメモリ5から読み出し可能なデータであるか否かを判定する(ステップE2)。
Specifically, the following data read processing is executed.
When the controller 4 receives a read command from the host 2 (step E1: YES), the controller 4 reads out the data specified by this read command from the NAND flash memory 5 after all of its write operations have been completed. It is determined whether the data is possible (step E2).

このデータがNAND型フラッシュメモリ5から読み出し可能であるならば(ステップE2:YES)、コントローラ4は、このデータをNAND型フラッシュメモリ5から読み出し、読み出されたデータをホスト2に返す(ステップE3)。ステップE3では、コントローラ4は、この読み出されたデータを、リードコマンドに含まれるデータポインタによって指定されるリードデータバッファ53内の位置に転送する。 If this data can be read from the NAND flash memory 5 (step E2: YES), the controller 4 reads this data from the NAND flash memory 5 and returns the read data to the host 2 (step E3). ). In step E3, the controller 4 transfers this read data to the position in the read data buffer 53 specified by the data pointer included in the read command.

このデータがNAND型フラッシュメモリ5から読み出し可能でないならば(ステップE2:NO)、コントローラ4は、まず、ライトデータバッファ51上のデータが破棄されないように、解放可能通知のホスト2への送信が禁止される状態に設定する(ステップE5)。そして、コントローラ4は、このデータが内部バッファ(共有キャッシュ)31に存在するか否かを判定する(ステップE5)。 If this data is not readable from the NAND flash memory 5 (step E2: NO), the controller 4 first sends a releasable notification to the host 2 so that the data on the write data buffer 51 is not discarded. It is set to a prohibited state (step E5). The controller 4 then determines whether this data exists in the internal buffer (shared cache) 31 (step E5).

このデータが内部バッファ(共有キャッシュ)31に存在するならば(ステップE5:YES)、コントローラ4は、このデータを内部バッファ(共有キャッシュ)31から読み出し、この読み出したデータをホスト2に返す(ステップE6)。
ステップE6では、コントローラ4は、この読み出されたデータを、リードコマンドに含まれるデータポインタによって指定されるリードデータバッファ53内の位置に転送する。
If this data exists in the internal buffer (shared cache) 31 (step E5: YES), the controller 4 reads this data from the internal buffer (shared cache) 31 and returns the read data to the host 2 (step E5: YES). E6).
In step E6, the controller 4 transfers this read data to the position in the read data buffer 53 specified by the data pointer included in the read command.

このデータが内部バッファ(共有キャッシュ)31に存在しないならば(ステップE5:NO)、コントローラ4は、このデータをライトデータバッファ51から取得し、内部バッファ(共有キャッシュ)31に格納する(ステップE7)。ステップE7では、DMAC15によってこのデータがライトデータバッファ51から内部バッファ(共有キャッシュ)31の空き領域に転送される。内部バッファ(共有キャッシュ)31の空き領域が無い場合には、内部バッファ(共有キャッシュ)31の空き領域を確保する処理が実行される。そして、コントローラ4は、このデータを内部バッファ(共有キャッシュ)31から読み出し、この読み出したデータをホスト2に返す(ステップE6)。ステップE6では、コントローラ4は、この読み出されたデータを、リードコマンドに含まれるデータポインタによって指定されるリードデータバッファ53内の位置に転送する。そして、コントローラ4は、ステップE4で設定した、解放可能通知のホスト2への送信が禁止される状態を解除する(ステップE8)。 If this data does not exist in the internal buffer (shared cache) 31 (step E5: NO), the controller 4 acquires this data from the write data buffer 51 and stores it in the internal buffer (shared cache) 31 (step E7). ). In step E7, the DMAC 15 transfers this data from the write data buffer 51 to the free area of the internal buffer (shared cache) 31. If there is no free space in the internal buffer (shared cache) 31, a process for securing a free space in the internal buffer (shared cache) 31 is executed. Then, the controller 4 reads this data from the internal buffer (shared cache) 31 and returns this read data to the host 2 (step E6). In step E6, the controller 4 transfers the read data to the position in the read data buffer 53 specified by the data pointer included in the read command. Then, the controller 4 cancels the state set in step E4 in which transmission of the releasable notification to the host 2 is prohibited (step E8).

図57は、フラッシュストレージデバイス3に適用されるブロックリユースコマンドを示す。
ブロックリユースコマンドは、たとえば無効データや不要データのみが格納されているなどの理由で不要となった割り当て済みのブロックをフリーブロックに戻すことをフラッシュストレージデバイス3に対して要求するコマンド(ブロック解放要求)である。ブロックリユースコマンドは、QoSドメインを指定するQoSドメインIDと、フリーブロック化(解放)するブロックを指定するブロックアドレスとを含む。
FIG. 57 shows a block reuse command applied to the flash storage device 3.
The block reuse command is a command (block release request) that requests the flash storage device 3 to return an allocated block that is no longer needed because it stores only invalid or unnecessary data to a free block. ). The block reuse command includes a QoS domain ID that specifies a QoS domain, and a block address that specifies a block to be made into a free block (released).

また、図58は、フラッシュストレージデバイス3に適用されるライトコマンドの別の例を示す。具体的には、図8に示したライトコマンドが、フラッシュストレージデバイス3がタイプ#1-ストレージデバイスとして実現されている場合において適用されるものであるのに対して、図58に示すライトコマンドは、フラッシュストレージデバイス3がタイプ#2-ストレージデバイスとして実現されている場合において適用されるものである。図58中に施されているハッチングは、図8との相違点を示している。 Further, FIG. 58 shows another example of a write command applied to the flash storage device 3. Specifically, the write command shown in FIG. 8 is applied when the flash storage device 3 is realized as a type #1 storage device, whereas the write command shown in FIG. , is applied when the flash storage device 3 is realized as a type #2-storage device. Hatching in FIG. 58 indicates differences from FIG. 8.

ライトコマンドは、フラッシュストレージデバイス3にデータの書き込みを要求するコマンドである。このライトコマンドは、コマンドID、QoSドメインID、論理アドレス、長さ、等を含んでもよい。
コマンドIDはこのコマンドがライトコマンドであることを示すID(コマンドコード)であり、ライトコマンドにはライトコマンド用のコマンドIDが含まれる。
The write command is a command that requests the flash storage device 3 to write data. This write command may include a command ID, QoS domain ID, logical address, length, etc.
The command ID is an ID (command code) indicating that this command is a write command, and the write command includes a command ID for a write command.

QoSドメインIDは、データが書き込まれるべきQoSドメインを一意に識別可能な識別子である。あるエンドユーザからのライト要求に応じてホスト2から送信されるライトコマンドは、このエンドユーザに対応するQoSドメインを指定するQoSドメインIDを含んでもよい。ネームスペースIDがQoSドメインIDとして扱われてもよい。 The QoS domain ID is an identifier that can uniquely identify the QoS domain in which data is to be written. A write command sent from the host 2 in response to a write request from a certain end user may include a QoS domain ID that specifies a QoS domain corresponding to this end user. A namespace ID may be treated as a QoS domain ID.

論理アドレスは、書き込まれるべきライトデータを識別するための識別子である。この論理アドレスは、上述したように、LBAであってもよいし、キー・バリュー・ストアのキーであってもよい。論理アドレスがLBAである場合には、このライトコマンドに含まれる論理アドレス(開始LBA)は、ライトデータが書き込まれるべき論理位置(最初の論理位置)を示す。 The logical address is an identifier for identifying write data to be written. This logical address may be an LBA or a key of a key-value store, as described above. If the logical address is an LBA, the logical address (starting LBA) included in this write command indicates the logical position (first logical position) where write data is to be written.

長さは、書き込まれるべきライトデータの長さを示す。この長さ(データ長)は、粒度(Grain)の数によって指定されてもよいし、LBAの数によって指定されてもよいし、あるいはそのサイズがバイトによって指定されてもよい。
上述したように、コントローラ4は、NAND型フラッシュメモリ5内の多数のブロックの各々が一つのグループのみに属するようにNAND型フラッシュメモリ5内の多数のブロックを複数のグループ(複数のQoSドメイン)に分類することができる。そして、コントローラ4は、グループ(QoSドメイン)毎に、フリーブロックリスト(フリーブロックプール)とアクティブブロックリスト(アクティブブロックプール)とを管理することができる。
The length indicates the length of write data to be written. This length (data length) may be specified by the number of grains, the number of LBAs, or the size may be specified by bytes.
As described above, the controller 4 groups a large number of blocks in the NAND flash memory 5 into a plurality of groups (multiple QoS domains) so that each of the large number of blocks in the NAND flash memory 5 belongs to only one group. It can be classified into The controller 4 can manage a free block list (free block pool) and an active block list (active block pool) for each group (QoS domain).

各ブロックの状態は、有効データを格納しているアクティブブロックと、有効データを格納していないフリーブロックとに大別される。アクティブブロックである各ブロックは、アクティブブロックリストによって管理される。一方、フリーブロックである各ブロックは、フリーブロックリストによって管理される。 The state of each block is roughly divided into active blocks that store valid data and free blocks that do not store valid data. Each block that is an active block is managed by an active block list. On the other hand, each block that is a free block is managed by a free block list.

ホスト2からライトコマンドを受信した時、コントローラ4は、ホスト2からのデータが書き込まれるべきブロック(書き込み先ブロック)およびこの書き込み先ブロック内の位置(書き込み先位置)を決定する。コントローラ4は、QoSドメインIDに対応するQoSドメインに属するフリーブロック群の一つを書き込み先ブロックとして決定してもよい。書き込み先位置は、ページ書き込み順序の制約およびバッドページ等を考慮して決定される。そして、コントローラ4は、ホスト2からのデータを、書き込み先ブロック内の書き込み先位置に書き込む。 When receiving a write command from the host 2, the controller 4 determines the block (write destination block) into which data from the host 2 is to be written and the position within this write destination block (write destination position). The controller 4 may determine one of the free block groups belonging to the QoS domain corresponding to the QoS domain ID as the write destination block. The write destination position is determined in consideration of page write order constraints, bad pages, and the like. Then, the controller 4 writes the data from the host 2 to the write destination position in the write destination block.

なお、この書き込み先ブロック全体がユーザデータで満たされたならば、コントローラ4は、この書き込み先ブロックをアクティブブロックリスト(アクティブブロックプール)に移動する。そして、コントローラ4は、このQoSドメインに対応するフリーブロックリストからフリーブロックを再び選択し、この選択したフリーブロックを新たな書き込み先ブロックとして割り当てる。 Note that once this write destination block is entirely filled with user data, the controller 4 moves this write destination block to the active block list (active block pool). Then, the controller 4 again selects a free block from the free block list corresponding to this QoS domain, and assigns this selected free block as a new writing destination block.

もしフリーブロックリストによって管理されている残りフリーブロックの数が所定のポリシーによって定められる閾値以下に低下した場合あるいはホスト2からガベージコレクションを実施する指示があった場合、コントローラ4は、このQoSドメインのガベージコレクションを開始してもよい。 If the number of remaining free blocks managed by the free block list falls below a threshold determined by a predetermined policy, or if there is an instruction from the host 2 to perform garbage collection, the controller 4 Garbage collection may begin.

このQoSドメインのガベージコレクションでは、コントローラ4は、このQoSドメインに対応するアクティブブロック群からコピー元ブロック(GCソースブロック)とコピー先ブロック(GCデスティネーションブロック)を選択する。どのブロックをGC候補(コピー元ブロック)として選択するかは、ホスト2によって指定される上述のポリシーに従って決定されてもよいし、ホスト2から指定されても良い。ポリシーも基づく場合には例えば、有効データ量が最も少ないブロックがGC候補(コピー元ブロック)として選択されてもよい。 In garbage collection of this QoS domain, the controller 4 selects a copy source block (GC source block) and a copy destination block (GC destination block) from the active block group corresponding to this QoS domain. Which block to select as a GC candidate (copy source block) may be determined according to the above-mentioned policy specified by the host 2, or may be specified by the host 2. When a policy is also based, for example, a block with the smallest amount of effective data may be selected as a GC candidate (copy source block).

図59は、図58のライトコマンドに対するレスポンスを示す。なお、図59中に施されているハッチングも、図9との相違点を示している。
このレスポンスは、論理アドレス、物理アドレス、長さを含む。
論理アドレスは、図7のライトコマンドに含まれていた論理アドレスである。
FIG. 59 shows a response to the write command of FIG. 58. Note that hatching in FIG. 59 also indicates differences from FIG. 9.
This response includes a logical address, physical address, and length.
The logical address is the logical address included in the write command in FIG.

物理アドレスは、図7のライトコマンドに応じてデータが書き込まれたNAND型フラッシュメモリ5内の物理記憶位置を示す。本実施形態では、この物理アドレスは、ブロック番号とページ番号との組み合わせではなく、上述したように、ブロック番号とオフセット(ブロック内オフセット)との組み合わせによって指定される。ブロック番号は、フラッシュストレージデバイス3内の全てのブロックの任意の一つを一意に識別可能な識別子である。全てのブロックに異なるブロック番号が付与されている場合には、これらブロック番号を直接使用してもよい。あるいは、ブロック番号は、ダイ番号と、ダイ内ブロック番号との組み合わせによって表現されてもよい。長さは、書き込まれるべきライトデータの長さを示す。この長さ(データ長)は、粒度(Grain)の数によって指定されてもよいし、LBAの数によって指定されてもよいし、あるいはそのサイズがバイトによって指定されてもよい。 The physical address indicates a physical storage location within the NAND flash memory 5 where data is written in response to the write command shown in FIG. In this embodiment, this physical address is specified not by a combination of a block number and a page number, but by a combination of a block number and an offset (intra-block offset), as described above. The block number is an identifier that can uniquely identify any one of all blocks within the flash storage device 3. If all blocks are assigned different block numbers, these block numbers may be used directly. Alternatively, the block number may be expressed by a combination of a die number and an intra-die block number. The length indicates the length of write data to be written. This length (data length) may be specified by the number of grains, the number of LBAs, or the size may be specified by bytes.

図60は、ホスト2とフラッシュストレージデバイス3とによって実行される書き込み動作処理のシーケンスの別の例を示す。具体的には、図25に示したシーケンスが、フラッシュストレージデバイス3がタイプ#1-ストレージデバイスとして実現されている場合におけるものであるのに対して、図60に示すシーケンスは、フラッシュストレージデバイス3がタイプ#2-ストレージデバイスとして実現されている場合におけるものである。 FIG. 60 shows another example of the write operation processing sequence executed by the host 2 and the flash storage device 3. Specifically, the sequence shown in FIG. 25 is for the case where the flash storage device 3 is implemented as a type #1 storage device, whereas the sequence shown in FIG. is implemented as a type #2 storage device.

ホスト2は、QoSドメインID、LBA、長さを含むライトコマンドをフラッシュストレージデバイス3に送信する。フラッシュストレージデバイス3のコントローラ4がこのライトコマンドを受信した時、コントローラ4は、ホスト2からのライトデータを書き込むべき書き込み先ブロックおよびこの書き込み先ブロック内の位置を決定する。より詳しくは、コントローラ4は、フリーブロックリストから一つのフリーブロックを選択し、選択したフリーブロックを書き込み先ブロックとして割り当てる(ステップS11)。つまり、この選択されたフリーブロックおよびこの選択されたフリーブロック内の利用可能な最初のページが、ホスト2からのライトデータを書き込むべき書き込み先ブロックおよびこの書き込み先ブロック内の位置として決定される。もし書き込み先ブロックがすでに割り当てられている場合には、このステップ12における書き込み先ブロック割り当て処理を実行する必要は無い。すでに割り当てられている書き込み先ブロック内の利用可能な次のページが、ホスト2からのライトデータを書き込むべき書き込み先ブロック内の位置として決定される。 The host 2 sends a write command including the QoS domain ID, LBA, and length to the flash storage device 3. When the controller 4 of the flash storage device 3 receives this write command, the controller 4 determines the write destination block to which the write data from the host 2 is to be written and the position within this write destination block. More specifically, the controller 4 selects one free block from the free block list and assigns the selected free block as a write destination block (step S11). That is, the selected free block and the first available page within the selected free block are determined as the write destination block and the position within this write destination block into which the write data from the host 2 is to be written. If the write destination block has already been allocated, there is no need to execute the write destination block allocation process in step 12. The next available page within the already allocated write destination block is determined as the location within the write destination block to which the write data from the host 2 is to be written.

コントローラ4は、複数のQoSドメインに対応する複数のフリーブロックリストを管理してもよい。あるQoSドメインに対応するフリーブロックリストにおいては、このQoSドメインに対して予約されたブロック群のみが登録されてもよい。この場合、ステップS12では、コントローラ4は、ライトコマンドのQoSドメインIDによって指定されるQoSドメインに対応するフリーブロックリストを選択し、この選択したフリーブロックリストから一つのフリーブロックを選択し、この選択したフリーブロックを書き込み先ブロックとして割り当ててもよい。これにより、異なるQoSドメインに対応するデータが同じブロックに混在されてしまうことを防止することができる。 The controller 4 may manage multiple free block lists corresponding to multiple QoS domains. In a free block list corresponding to a certain QoS domain, only blocks reserved for this QoS domain may be registered. In this case, in step S12, the controller 4 selects a free block list corresponding to the QoS domain specified by the QoS domain ID of the write command, selects one free block from this selected free block list, and selects one free block from the selected free block list. The free block that has been created may be assigned as the write destination block. This can prevent data corresponding to different QoS domains from being mixed in the same block.

コントローラ4は、ホスト2から受信されるライトデータを書き込み先ブロックに書き込む(ステップS12)。ステップS12では、コントローラ4は、論理アドレス(ここではLBA)とライトデータの双方を書き込み先ブロックに書き込む。
コントローラ4は、ブロック管理テーブル32を更新して、書き込まれたデータに対応するビットマップフラグ(つまり、このデータが書き込まれた物理記憶位置の物理アドレスに対応するビットマップフラグ)を0から1に変更する(ステップS13)。例えば、図26に示されているように、開始LBAがLBAxである16Kバイト更新データがブロックBLK#1のオフセット+4~+7に対応する物理記憶位置に書き込まれた場合を想定する。この場合、図27に示されているように、ブロックBLK#1用のブロック管理テーブルにおいては、オフセット+4~+7に対応するビットマップフラグそれぞれが0から1に変更される。
The controller 4 writes the write data received from the host 2 to the write destination block (step S12). In step S12, the controller 4 writes both the logical address (here, LBA) and write data to the write destination block.
The controller 4 updates the block management table 32 and changes the bitmap flag corresponding to the written data (that is, the bitmap flag corresponding to the physical address of the physical storage location where this data is written) from 0 to 1. change (step S13). For example, as shown in FIG. 26, assume that 16 Kbyte update data whose starting LBA is LBAx is written to physical storage locations corresponding to offsets +4 to +7 of block BLK#1. In this case, as shown in FIG. 27, in the block management table for block BLK#1, each of the bitmap flags corresponding to offsets +4 to +7 is changed from 0 to 1.

コントローラ4は、このライトコマンドに対するレスポンスをホスト2に返す(ステップS14)。例えば、図26に示されているように、開始LBAがLBAxである16Kバイト更新データがブロックBLK#1のオフセット+4~+7に対応する物理記憶位置に書き込まれたならば、LBAx、ブロック番号(=BLK1)、オフセット(=+4)、長さ(=4)を含むレスポンスがコントローラ4からホスト2に送信される。 The controller 4 returns a response to this write command to the host 2 (step S14). For example, as shown in FIG. 26, if 16K byte update data whose starting LBA is LBAx is written to physical storage locations corresponding to offsets +4 to +7 of block BLK#1, then LBAx, block number ( =BLK1), an offset (=+4), and a length (=4) are sent from the controller 4 to the host 2.

ホスト2がこのレスポンスを受信した時、ホスト2は、ホスト2によって管理されているLUTを更新して、書き込まれたライトデータに対応する論理アドレスそれぞれに物理アドレスをマッピングする。図28に示されているように、LUTは、複数の論理アドレス(例えばLBA)それぞれに対応する複数のエントリを含む。ある論理アドレス(例えばあるLBA)に対応するエントリには、このLBAに対応するデータが格納されているNAND型フラッシュメモリ5内の位置(物理記憶位置)を示す物理アドレスPBA、つまりブロック番号、オフセット(ブロック内オフセット)が格納される。図26に示されているように、開始LBAがLBAxである16Kバイト更新データがブロックBLK#1のオフセット+4~+7に対応する物理記憶位置に書き込まれたならば、図28に示されているように、LUTが更新されて、LBAxに対応するエントリにBLK#1、オフセット+4が格納され、LBAx+1に対応するエントリにBLK#1、オフセット+5が格納され、LBAx+2に対応するエントリにBLK#1、オフセット+6が格納され、LBAx+3に対応するエントリにBLK#1、オフセット+7が格納される。 When the host 2 receives this response, the host 2 updates the LUT managed by the host 2 and maps a physical address to each logical address corresponding to the written write data. As shown in FIG. 28, the LUT includes multiple entries corresponding to multiple logical addresses (eg, LBAs). An entry corresponding to a certain logical address (for example, a certain LBA) contains a physical address PBA indicating the position (physical storage position) in the NAND flash memory 5 where the data corresponding to this LBA is stored, that is, the block number and offset. (intra-block offset) is stored. As shown in FIG. 26, if the 16K byte update data whose starting LBA is LBAx is written to the physical storage locations corresponding to offsets +4 to +7 of block BLK#1, as shown in FIG. The LUT is updated, BLK#1, offset +4 is stored in the entry corresponding to LBAx, BLK#1, offset +5 is stored in the entry corresponding to LBAx+1, and BLK#1 is stored in the entry corresponding to LBAx+2. , offset +6 are stored, and BLK#1 and offset +7 are stored in the entry corresponding to LBAx+3.

この後、ホスト2は、上述の更新データの書き込みによって不要になった以前のデータを無効化するためのTrimコマンドをフラッシュストレージデバイス3に送信する(ステップS21)。図26に示されているように、以前のデータがブロックBLK#0のオフセット+0、オフセット+1、オフセット+2、オフセット+3に対応する位置に格納されている場合には、図29に示すように、ブロック番号(=BLK#0)、オフセット(=+0)、長さ(=4)を指定するTrimコマンドがホスト2からフラッシュストレージデバイス3に送信される。フラッシュストレージデバイス3のコントローラ4は、このTrimコマンドに応じて、ブロック管理テーブル32を更新する(ステップS15)。ステップS15においては、図29に示すように、ブロックBLK#0用のブロック管理テーブルにおいて、オフセット+0~+3に対応するビットマップフラグそれぞれが1から0に変更される。 Thereafter, the host 2 sends a Trim command to the flash storage device 3 to invalidate previous data that is no longer needed due to writing of the update data described above (step S21). As shown in FIG. 26, if the previous data is stored in the positions corresponding to offset +0, offset +1, offset +2, and offset +3 of block BLK#0, as shown in FIG. A Trim command specifying the block number (=BLK#0), offset (=+0), and length (=4) is sent from the host 2 to the flash storage device 3. The controller 4 of the flash storage device 3 updates the block management table 32 in response to this Trim command (step S15). In step S15, as shown in FIG. 29, in the block management table for block BLK#0, each of the bitmap flags corresponding to offsets +0 to +3 is changed from 1 to 0.

図61は、フラッシュストレージデバイス3に適用されるGC制御コマンドの別の例を示す。具体的には、図34に示したGC制御コマンドが、フラッシュストレージデバイス3がタイプ#1-ストレージデバイスとして実現されている場合において適用されるものであるのに対して、図61に示すGC制御コマンドは、フラッシュストレージデバイス3がタイプ#2-ストレージデバイスとして実現されている場合において適用されるものである。図61中に施されているハッチングは、図34との相違点を示している。 FIG. 61 shows another example of the GC control command applied to the flash storage device 3. Specifically, while the GC control command shown in FIG. 34 is applied when the flash storage device 3 is realized as a type #1 storage device, the GC control command shown in FIG. The command applies in the case where the flash storage device 3 is implemented as a type #2-storage device. Hatching in FIG. 61 indicates differences from FIG. 34.

GC制御コマンドは、コマンドID、ポリシー、ソースQoSドメインID、デスティネーションQoSドメインID、等を含んでもよい。
コマンドIDはこのコマンドがGC制御コマンドであることを示すID(コマンドコード)であり、GC制御コマンドにはGC制御コマンド用のコマンドIDが含まれる。
The GC control command may include a command ID, policy, source QoS domain ID, destination QoS domain ID, etc.
The command ID is an ID (command code) indicating that this command is a GC control command, and the GC control command includes a command ID for the GC control command.

ポリシーは、GC候補ブロック(GCソースブロック)を選択するための条件(GCポリシー)を指定するパラメータである。フラッシュストレージデバイス3のコントローラ4は、複数のGCポリシーをサポートしている。
コントローラ4によってサポートされているGCポリシーには、有効データ量が少ないブロックを優先的にGC候補ブロック(GCソースブロック)として選択するというポリシー(Greedy)が含まれてもよい。
The policy is a parameter that specifies conditions (GC policy) for selecting a GC candidate block (GC source block). The controller 4 of the flash storage device 3 supports multiple GC policies.
The GC policy supported by the controller 4 may include a policy (Greedy) that preferentially selects a block with a small amount of effective data as a GC candidate block (GC source block).

また、コントローラ4によってサポートされているGCポリシーには、低い更新頻度を有するデータ(コールドデータ)が集められているブロックを、高い更新頻度を有するデータ(ホットデータ)が集められているブロックよりも優先的にGC候補ブロック(GCソースブロック)として選択するというポリシーが含まれていてもよい。 In addition, the GC policy supported by the controller 4 includes a block where data with a low update frequency (cold data) is collected than a block where data with a high update frequency (hot data) is collected. A policy of preferentially selecting the block as a GC candidate block (GC source block) may be included.

さらに、GCポリシーは、GC開始条件を指定してもよい。GC開始条件は、例えば、残りフリーブロックの個数を示してもよい。
コントローラ4は、有効データを含むブロック群をアクティブブロックリストによって管理しており、GCを実行する場合には、GC制御コマンドによって指定されたGCポリシーに基づいて、アクティブブロックリストによって管理されているブロック群から一つ以上のGC候補ブロック(GCソースブロック)を選択する。
Additionally, the GC policy may specify GC initiation conditions. The GC start condition may indicate, for example, the number of remaining free blocks.
The controller 4 manages blocks containing valid data using an active block list, and when executing GC, blocks managed by the active block list are managed based on a GC policy specified by a GC control command. Select one or more GC candidate blocks (GC source blocks) from the group.

QoSドメインIDは、GCを実行すべきQoSドメインを指定するパラメータである。コントローラ4は、QoSドメインIDによって指定されるQoSドメインに属するブロック群、つまりこのQoSドメインに対応するアクティブブロックリストから、一つ以上のGC候補ブロック(GCソースブロック)を選択する。また、コントローラ4は、QoSドメインIDによって指定されるQoSドメインに属するフリーブロック群内の一つ以上のフリーブロックをGCデスティネーションブロックとして選択する。 The QoS domain ID is a parameter that specifies the QoS domain in which GC should be performed. The controller 4 selects one or more GC candidate blocks (GC source blocks) from a group of blocks belonging to the QoS domain specified by the QoS domain ID, that is, from the active block list corresponding to this QoS domain. Further, the controller 4 selects one or more free blocks within the free block group belonging to the QoS domain specified by the QoS domain ID as the GC destination block.

コントローラ4は、QoSドメインに対応する残りフリーブロックの数がポリシーによって指定される閾値以下になった場合に、GCを開始してもよい。もしGCの強制実行を指定するポリシーを含むGC制御コマンドを受信したならば、コントローラ4は、ホスト2からこのGC制御コマンドを受信した時にGCを即座に開始してもよい。 The controller 4 may start GC when the number of remaining free blocks corresponding to a QoS domain becomes less than or equal to a threshold specified by a policy. If the controller 4 receives a GC control command that includes a policy specifying forced execution of GC, the controller 4 may immediately start GC upon receiving this GC control command from the host 2 .

図62は、ガベージコレクション(GC)動作の手順の別の例を示す。具体的には、図36に示した手順が、フラッシュストレージデバイス3がタイプ#1-ストレージデバイスとして実現されている場合におけるものであるのに対して、図62に示す手順は、フラッシュストレージデバイス3がタイプ#2-ストレージデバイスとして実現されている場合におけるものである。図62中に施されているハッチングは、図36との相違点を示している。 FIG. 62 shows another example of a garbage collection (GC) operation procedure. Specifically, whereas the procedure shown in FIG. 36 is for the case where the flash storage device 3 is implemented as a type #1 storage device, the procedure shown in FIG. is implemented as a type #2 storage device. Hatching in FIG. 62 indicates differences from FIG. 36.

フラッシュストレージデバイス3のコントローラ4は、ホスト2によって指定されたポリシーに基づいて、QoSドメインIDによって指定されるQoSドメインに属するブロック群から、有効データと無効データとが混在する一つ以上のGCソースブロック(コピー元ブロック)を選択する(ステップS41)。次いで、コントローラ4は、QoSドメインIDによって指定されるQoSドメインに属するフリーブロック群から一つ以上のフリーブロックを選択し、選択したフリーブロックをGCデスティネーションブロック(コピー先ブロック)として割り当てる(ステップS42)。 Based on the policy specified by the host 2, the controller 4 of the flash storage device 3 selects one or more GC sources containing a mixture of valid data and invalid data from a group of blocks belonging to the QoS domain specified by the QoS domain ID. A block (copy source block) is selected (step S41). Next, the controller 4 selects one or more free blocks from the free block group belonging to the QoS domain specified by the QoS domain ID, and assigns the selected free block as a GC destination block (copy destination block) (step S42 ).

コントローラ4は、GCソースブロック(コピー元ブロック)内の全ての有効データをGCデスティネーションブロック(コピー先ブロック)にコピーする(ステップS44)。ステップS44では、コントローラ4は、GCソースブロック(コピー元ブロック)内の有効データのみならず、この有効データとこの有効データに対応する論理アドレスの双方を、GCソースブロック(コピー元ブロック)からGCデスティネーションブロック(コピー先ブロック)にコピーする。これにより、GCデスティネーションブロック(コピー先ブロック)内にデータと論理アドレスとのペアを保持することができる。 The controller 4 copies all valid data in the GC source block (copy source block) to the GC destination block (copy destination block) (step S44). In step S44, the controller 4 transfers not only the valid data in the GC source block (copy source block) but also both this valid data and the logical address corresponding to this valid data from the GC source block (copy source block). Copy to the destination block (copy destination block). Thereby, a pair of data and a logical address can be held in the GC destination block (copy destination block).

そして、コントローラ4は、コピーされた有効データの論理アドレスと、この有効データがコピーされたGCデスティネーションブロック(コピー先ブロック)内の位置を示すデスティネーション物理アドレス(ブロック番号、オフセット(ブロック内オフセット))を、GC用コールバックコマンドを使用してホスト2に通知する(ステップS44)。なお、ステップS44では、コントローラ4は、コピーされた有効データの論理アドレスとデスティネーション物理アドレスとみならず、ソース物理アドレスもホスト2に通知してもよい。 The controller 4 then uses the logical address of the copied valid data and the destination physical address (block number, offset (internal offset )) is notified to the host 2 using the GC callback command (step S44). Note that in step S44, the controller 4 may notify the host 2 not only of the logical address and destination physical address of the copied valid data but also of the source physical address.

ホスト2がこのGC用コールバックコマンドを受信した時、ホスト2は、ホスト2によって管理されているLUTを更新して、コピーされた有効データに対応する論理アドレスそれぞれにデスティネーション物理アドレスをマッピングする(ステップS51)。 When the host 2 receives this GC callback command, the host 2 updates the LUT managed by the host 2 and maps the destination physical address to each logical address corresponding to the copied valid data. (Step S51).

図63および図64のフローチャートは、フラッシュストレージデバイス3が、ホスト2からのデータを書き込むためのブロックと、フラッシュストレージデバイス3内のデータをコピーするためのブロックとに分離する仕組みを備えている場合における、フリーブロックの割り当ての手順を示す。 The flowcharts in FIGS. 63 and 64 show a case where the flash storage device 3 is equipped with a mechanism to separate blocks into blocks for writing data from the host 2 and blocks for copying data in the flash storage device 3. The following shows the procedure for allocating free blocks.

図63に示す手順は、図60に示す書き込み動作処理のシーケンス中のステップS11(書き込み先ブロックの割り当て)におけるフリーブロックの割り当ての手順である。
フラッシュストレージデバイス3のコントローラ4は、ホスト2からのライトデータを書き込むためのブロック(書き込み先ブロック)が割り当てられているか否かを判定する(ステップF1)。仮に、空きページを含むブロックが割り当てられていても、そのブロックが、フラッシュストレージデバイス3内のデータをコピーするためのブロックであったならば、コントローラ4は、ホスト2からのライトデータを書き込むためのブロックは割り当てられていないと判定する。この判定は、たとえば、ブロックのメタデータなどとして保持される、そのブロックの用途を示す属性情報に基づいて実行される。
The procedure shown in FIG. 63 is the free block allocation procedure in step S11 (write destination block allocation) in the write operation process sequence shown in FIG. 60.
The controller 4 of the flash storage device 3 determines whether a block (write destination block) for writing write data from the host 2 is allocated (step F1). Even if a block containing a free page is allocated, if that block is a block for copying data in the flash storage device 3, the controller 4 will not be able to write the write data from the host 2. It is determined that the block is not allocated. This determination is performed based on, for example, attribute information that is held as block metadata and indicates the use of the block.

ホスト2からのライトデータを書き込むためのブロックは割り当てられていないと判定した場合(ステップF1:NO)、コントローラ4は、たとえば同一の仮想ストレージデバイス内のQoSドメイン間で共有されるフリーブロック群の中の1つのフリーブロックを、ホスト2からのライトデータを書き込むためのブロックとして割り当てる(ステップF2)。このとき、コントローラ4は、このブロックのメタデータなどとして、ホスト2からのライトデータを書き込むためのブロックであることを示す属性情報を記録する。 If it is determined that a block for writing write data from the host 2 is not allocated (step F1: NO), the controller 4 assigns a free block group shared between QoS domains within the same virtual storage device, for example. One of the free blocks is allocated as a block for writing write data from the host 2 (step F2). At this time, the controller 4 records attribute information indicating that the block is a block for writing write data from the host 2 as metadata of this block.

一方、図64に示す手順は、図62に示すガベージコレクション(GC)動作の手順中のステップS42(GCデスティネーションブロックの割り当て)におけるフリーブロックの割り当ての手順である。
フラッシュストレージデバイス3のコントローラ4は、GCソースブロック(コピー元ブロック)内の有効データをコピーするためのブロック(GCデスティネーションブロック)、つまり、フラッシュストレージデバイス3内のデータをコピーするためのブロックが割り当てられているか否かを判定する(ステップF11)。仮に、空きページを含むブロックが割り当てられていても、そのブロックが、ホスト2からのライトデータを書き込むためのブロックであったならば、コントローラ4は、フラッシュストレージデバイス3内のデータをコピーするためのブロックは割り当てられていないと判定する。
On the other hand, the procedure shown in FIG. 64 is the free block allocation procedure in step S42 (GC destination block allocation) in the garbage collection (GC) operation procedure shown in FIG. 62.
The controller 4 of the flash storage device 3 creates a block (GC destination block) for copying valid data in a GC source block (copy source block), that is, a block for copying data in the flash storage device 3. It is determined whether it has been assigned (step F11). Even if a block containing a free page is allocated, if that block is for writing write data from the host 2, the controller 4 will copy the data in the flash storage device 3. It is determined that the block is not allocated.

フラッシュストレージデバイス3内のデータをコピーするためのブロックは割り当てられていないと判定した場合(ステップF11:NO)、コントローラ4は、たとえば同一の仮想ストレージデバイス内のQoSドメイン間で共有されるフリーブロック群の中の1つのフリーブロックを、フラッシュストレージデバイス3内のデータをコピーするためのブロックとして割り当てる(ステップF12)。このとき、コントローラ4は、このブロックのメタデータなどとして、フラッシュストレージデバイス3内のデータをコピーするためのブロックであることを示す属性情報を記録する。 If it is determined that a block for copying data in the flash storage device 3 is not allocated (step F11: NO), the controller 4 assigns a free block shared between QoS domains in the same virtual storage device, for example. One free block in the group is allocated as a block for copying data in the flash storage device 3 (step F12). At this time, the controller 4 records attribute information indicating that the block is a block for copying data in the flash storage device 3 as metadata of this block.

以上のように、本実施形態のフラッシュストレージデバイス3によれば、I/O性能の改善を図ることができる。
本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。
As described above, according to the flash storage device 3 of this embodiment, it is possible to improve I/O performance.
Although several embodiments of the 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, substitutions, and changes can be made without departing from the gist of the invention. These embodiments and their modifications are included within the scope and gist of the invention, as well as within the scope of the invention described in the claims and its equivalents.

2…ホスト、3…フラッシュストレージデバイス、4…コントローラ、5…NAND型フラッシュメモリ、21…ライト動作制御部、22…リード動作制御部、23…GC動作制御部。 2... Host, 3... Flash storage device, 4... Controller, 5... NAND flash memory, 21... Write operation control section, 22... Read operation control section, 23... GC operation control section.

Claims (10)

ホストに接続可能なメモリシステムであって、
複数のブロックを含む不揮発性メモリと、
前記不揮発性メモリに電気的に接続され、前記不揮発性メモリを制御するコントローラとを具備し、
前記コントローラは、
書き込むべきライトデータが存在する前記ホストのメモリ上の位置を指定する書き込み命令を前記ホストから受信した場合、前記ライトデータを前記ホストのメモリから取得して前記不揮発性メモリに書き込み、
前記ホストのメモリ上の前記ライトデータが対象となる読み出し命令を前記ホストから受信した場合、前記ホストのメモリ上の前記ライトデータが破棄されないように前記書き込み命令に関する前記ホストに対する通知を制御する、
ように構成されているメモリシステム。
A memory system connectable to a host,
non-volatile memory containing multiple blocks;
a controller electrically connected to the nonvolatile memory and controlling the nonvolatile memory;
The controller includes:
When receiving a write command from the host that specifies a location in the host's memory where write data to be written exists, acquiring the write data from the host's memory and writing it to the nonvolatile memory;
When a read command that targets the write data on the memory of the host is received from the host, controlling notification to the host regarding the write command so that the write data on the memory of the host is not discarded;
A memory system that is configured as follows.
前記コントローラは、前記ホストのメモリ上の前記ライトデータが対象となる読み出し命令が終了した後、前記ホストのメモリ上の前記ライトデータの破棄を許可する通知を前記ホストに送信するように構成されている請求項1に記載のメモリシステム。 The controller is configured to send a notification to the host to permit the discarding of the write data on the host's memory after a read command that targets the write data on the host's memory is completed. The memory system according to claim 1. 前記コントローラは、前記ホストから受信した読み出し命令の対象となる読み出し可能なデータが前記ホストのメモリ上と前記不揮発性メモリとの双方に存在する場合、前記ホストのメモリ上からデータを読み出すように構成されている請求項1または2に記載のメモリシステム。 The controller is configured to read data from the host's memory when readable data targeted by a read command received from the host exists in both the host's memory and the nonvolatile memory. 3. The memory system according to claim 1, wherein: 前記コントローラは、前記ホストから受信した読み出し命令の対象となる読み出し可能なデータが前記ホストのメモリ上と前記不揮発性メモリとの双方に存在する場合、前記不揮発性メモリからデータを読み出すように構成されている請求項1または2に記載のメモリシステム。 The controller is configured to read data from the non-volatile memory when readable data targeted by a read command received from the host exists both in the memory of the host and in the non-volatile memory. The memory system according to claim 1 or 2. 前記コントローラは、
前記ホストのメモリ上の前記ライトデータに対し、前記ホストのデータ使用単位で、データの書き込み処理数の残数を示すカウンタを管理し、
各カウンタの初期値として、前記不揮発性メモリへのデータの書き込みに必要なデータの転送回数に1を加算して得られる値を設定して、前記不揮発性メモリへデータを転送する都度、対応するカウンタの値を1ずつ減算し、
転送したデータが前記不揮発性メモリに書き込まれ、エラーが検出された場合の再書き込み処理が不要になったことが確定した場合、対応するカウンタの値をさらに1減算し、
前記カウンタの値が0になった場合、前記ホストのメモリ上の前記ライトデータの破棄を許可する通知を前記ホストに送信する、
ように構成されている請求項1または2に記載のメモリシステム。
The controller includes:
managing a counter indicating the remaining number of data write processes for the write data on the memory of the host in units of data usage by the host;
As the initial value of each counter, a value obtained by adding 1 to the number of data transfers required to write data to the nonvolatile memory is set, and a corresponding value is set each time data is transferred to the nonvolatile memory. Decrease the value of the counter by 1,
When it is determined that the transferred data has been written to the non-volatile memory and rewriting processing is no longer necessary when an error is detected, the value of the corresponding counter is further subtracted by 1;
If the value of the counter becomes 0, transmitting a notification to the host to permit the destruction of the write data on the memory of the host;
The memory system according to claim 1 or 2, configured as follows.
前記コントローラは、前記ホストのメモリ上の前記ライトデータが対象となる読み出し命令を前記ホストから受信した場合、そのデータに対応するカウンタの値を1加算し、その読み出し処理が終了した場合、対応するカウンタの値を1減算するように構成されている請求項5に記載のメモリシステム。 When the controller receives a read command from the host that targets the write data on the memory of the host, the controller adds 1 to the value of a counter corresponding to the data, and when the read process is completed, the controller performs the corresponding command. 6. The memory system according to claim 5, wherein the memory system is configured to decrement the value of the counter by one. ホストに接続可能なメモリシステムであって、
各々が複数のページを含む複数のブロックを含む不揮発性メモリと、
前記不揮発性メモリに電気的に接続され、前記不揮発性メモリを制御するコントローラとを具備し、
前記コントローラは、前記ホストからのデータを書き込むページと前記メモリシステム内のデータをコピーするページとが1つのブロック内に混在しないように前記複数のブロックを管理するように構成されているメモリシステム。
A memory system connectable to a host,
a non-volatile memory including a plurality of blocks each including a plurality of pages;
a controller electrically connected to the nonvolatile memory and controlling the nonvolatile memory;
The controller is configured to manage the plurality of blocks so that pages for writing data from the host and pages for copying data in the memory system do not coexist in one block.
前記コントローラは、
前記複数のブロック内のフリーブロック群を管理し、
前記ホストからのデータを書き込むために前記フリーブロック群から割り当てたブロックと、前記メモリシステム内のデータをコピーするために前記フリーブロック群から割り当てたブロックとを各々保持する、
ように構成されている請求項7に記載のメモリシステム。
The controller includes:
managing a group of free blocks within the plurality of blocks;
holding blocks allocated from the free block group for writing data from the host and blocks allocated from the free block group for copying data in the memory system, respectively;
The memory system according to claim 7, configured as follows.
前記コントローラは、前記不揮発性メモリを論理的に分割することによって得られる複数の領域毎に管理し、前記フリーブロック群の中の1つのフリーブロックを取得して前記取得したフリーブロックを前記複数の領域のいずれかに割り当てる際、そのブロックが前記ホストからのデータを書き込むためのブロックであることを示す属性情報、または、そのブロックが前記メモリシステム内のデータをコピーするためのブロックであることを示す属性情報を記録するように構成されている請求項8に記載のメモリシステム。 The controller manages each of a plurality of areas obtained by logically dividing the nonvolatile memory, acquires one free block from the free block group, and divides the acquired free block into the plurality of areas. When allocating to any of the areas, attribute information indicating that the block is a block for writing data from the host, or attribute information indicating that the block is a block for copying data in the memory system. 9. The memory system according to claim 8, wherein the memory system is configured to record attribute information indicating the attribute. 前記コントローラは、前記複数の領域のそれぞれにおいて、前記ホストからのデータを書き込む場合、前記属性情報が前記ホストからのデータを書き込むためのブロックであることを示すブロックに書き込み、前記メモリシステム内のデータをコピーする場合、前記属性情報が前記メモリシステム内のデータをコピーするためのブロックであることを示すブロックにコピーするように構成されている請求項9に記載のメモリシステム。 When writing data from the host in each of the plurality of areas, the controller writes to a block in which the attribute information indicates that the block is for writing data from the host, and writes the data in the memory system. 10. The memory system according to claim 9, wherein when copying the data, the attribute information is configured to copy to a block indicating that the block is a block for copying data in the memory system.
JP2023131082A 2018-09-19 2023-08-10 Memory system and control method Pending JP2023138818A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023131082A JP2023138818A (en) 2018-09-19 2023-08-10 Memory system and control method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2018175148A JP7091203B2 (en) 2018-09-19 2018-09-19 Memory system and control method
JP2022093633A JP7337228B2 (en) 2018-09-19 2022-06-09 Memory system and control method
JP2023131082A JP2023138818A (en) 2018-09-19 2023-08-10 Memory system and control method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2022093633A Division JP7337228B2 (en) 2018-09-19 2022-06-09 Memory system and control method

Publications (1)

Publication Number Publication Date
JP2023138818A true JP2023138818A (en) 2023-10-02

Family

ID=87797931

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2022093633A Active JP7337228B2 (en) 2018-09-19 2022-06-09 Memory system and control method
JP2023131082A Pending JP2023138818A (en) 2018-09-19 2023-08-10 Memory system and control method

Family Applications Before (1)

Application Number Title Priority Date Filing Date
JP2022093633A Active JP7337228B2 (en) 2018-09-19 2022-06-09 Memory system and control method

Country Status (1)

Country Link
JP (2) JP7337228B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5687639B2 (en) 2012-02-08 2015-03-18 株式会社東芝 Controller, data storage device and program
US9378135B2 (en) 2013-01-08 2016-06-28 Violin Memory Inc. Method and system for data storage
JP6523193B2 (en) 2016-03-08 2019-05-29 東芝メモリ株式会社 Storage system, information processing system and control method
JP6765322B2 (en) 2017-02-28 2020-10-07 キオクシア株式会社 Memory system and control method

Also Published As

Publication number Publication date
JP2022111330A (en) 2022-07-29
JP7337228B2 (en) 2023-09-01

Similar Documents

Publication Publication Date Title
JP7091203B2 (en) Memory system and control method
JP6785205B2 (en) Memory system and control method
JP6982468B2 (en) Memory system and control method
US20230259452A1 (en) Computing system and method for controlling storage device
US20220414002A1 (en) Memory system and method for controlling nonvolatile memory
TWI689817B (en) Memory system and control method
JP6785204B2 (en) Memory system and control method
JP7013546B2 (en) Memory system
JP7337228B2 (en) Memory system and control method
JP7366222B2 (en) Memory system and control method
JP7102482B2 (en) Memory system and control method
JP7167295B2 (en) Memory system and control method
JP7204020B2 (en) Control method
JP2023021450A (en) memory system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230810

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240326

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240402