JP5849268B1 - Read transfer control method and auxiliary storage device controller - Google Patents
Read transfer control method and auxiliary storage device controller Download PDFInfo
- Publication number
- JP5849268B1 JP5849268B1 JP2014139023A JP2014139023A JP5849268B1 JP 5849268 B1 JP5849268 B1 JP 5849268B1 JP 2014139023 A JP2014139023 A JP 2014139023A JP 2014139023 A JP2014139023 A JP 2014139023A JP 5849268 B1 JP5849268 B1 JP 5849268B1
- Authority
- JP
- Japan
- Prior art keywords
- read
- data
- auxiliary storage
- storage device
- read request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
【課題】 補助記憶デバイスに格納されたデータの特性に応じて効率的に予測先読み処理を行う。【解決手段】 補助記憶デバイスたるNAND型フラッシュメモリ22からの初回の読出しの際に(ステップS101における否定判定)、読み出す一塊データのデータサイズを把握して、Nエントリテーブル214の一エントリに登録しておく(S103)。2回目以降の読出しの際には(ステップS101における肯定判定)、そのサイズに応じた予測先読み処理を行う(S102)。また、読出し頻度の高い一塊データほど、Nエントリテーブル214にエントリは維持され(S103)、よって、サイズに応じた効率的な予測先読み処理が実現できる。【選択図】 図3PROBLEM TO BE SOLVED: To efficiently perform predictive prefetch processing in accordance with characteristics of data stored in an auxiliary storage device. When first reading from a NAND flash memory 22 as an auxiliary storage device (negative determination in step S101), the data size of a block of data to be read is grasped and registered in one entry of an N entry table 214. (S103). In the second and subsequent readings (affirmative determination in step S101), prediction prefetching processing according to the size is performed (S102). In addition, the more frequently read data is, the more entries are maintained in the N entry table 214 (S103), so that efficient predictive prefetching processing according to the size can be realized. [Selection] Figure 3
Description
本発明は、読出し転送制御方法及び補助記憶デバイスコントローラに関し、特に、ホスト機器からの次の読出し要求に係る読み出すべきデータを予測して予め補助記憶デバイスから読み出しておく先読み処理を行うような読出し転送制御方法及び補助記憶デバイスコントローラに関する。 The present invention relates to a read transfer control method and an auxiliary storage device controller, and more particularly, read transfer that performs prefetch processing for predicting data to be read related to a next read request from a host device and reading the data from an auxiliary storage device in advance. The present invention relates to a control method and an auxiliary storage device controller.
パーソナルコンピュータ等の汎用機器やゲーム機等の専用機器は、大容量データを取り扱う場合も多いが、その際には、かかるデータを、通常、補助(外部)記憶装置に格納しておき、必要なときに必要なデータを読み出して処理を行うということが一般的である。また、そのとき両者間のインターフェースの統一等の観点から、間にコントローラを介することが一般的であるが、そのときの論理ブロック図を図7(a)に示す。ここで、ホスト機器100は、上述のパーソナルコンピュータ等の汎用機器やゲーム機等の専用機器であり、補助記憶デバイス300は、ハードディスクや、最近ではNAND型フラッシュメモリに代表されるSSD(Solid State Device)である。なお、物理的には、コントローラ200と補助記憶デバイス300が一体で構成されていることが一般的である。また、コントローラ200と補助記憶デバイス300とが、ホスト機器100の機能を構成する装置内に内蔵される場合も多い。ホスト機器100とコントローラ200との間のインターフェースとしては、具体的に、ST−506、SCSI(Small Computer System Interface)、IDE(Integrated Drive Electronics)、ATA(Advanced Technology Attachment)、SATA(Serial ATA)、eSATA(External SATA)等がある。
General-purpose devices such as personal computers and dedicated devices such as game machines often handle large volumes of data, but in such cases, such data is usually stored in an auxiliary (external) storage device and necessary. It is common to read and process data that is sometimes required. At that time, from the viewpoint of unification of the interface between the two, it is common to use a controller in between. A logical block diagram at that time is shown in FIG. Here, the
ここで、ホスト機器100が、補助記憶デバイス300に対してデータの転送を要求してから、当該データを受け取るまでには、補助記憶デバイス300の読出し処理に起因したレイテンシが発生してしまう。図7(b)は、このレイテンシを説明するための図である。ホスト機器100が、補助記憶デバイス300側に、リクエスト[Read A0](アドレスA0からのデータを読み出して送れという要求)を発すると、それを受け取ったコントローラ200は、そのリクエストに基づき補助記憶デバイス300に対して読出しの指示を行う。コントローラ200は、補助記憶デバイス300から、リクエスト[Read A0]に対応するデータD0を受け取ると、それをホスト機器100に転送する。ホスト機器100がデータD0を受け取ってから、次に発するリクエスト[Read A1]についても同様である。このようなレイテンシは、例えばNAND型フラッシュメモリであれば、数十から数百μsである。
Here, the latency due to the reading process of the
つまり、ホスト機器100は、補助記憶デバイス300に対して読出し要求を行ってから、要求に係るデータを受け取るまでに必ず所定時間が掛かってしまうのであるが、このレイテンシの影響は、ホスト機器100における処理速度と、補助記憶デバイス300の読み出し速度のアンバランスが大きくなるほど、ホスト機器100の処理能力(パフォーマンス)の低下として現れてくる。例えば、動画処理システム、すなわち、補助記憶デバイス300に格納された動画データを読み出してきて、ホスト機器100が表示等の画像処理を行うシステムにあっては、画像処理、例えばデコード、が中断してしまい、動画が頻繁に停止したり、解像度が落ちてしまうような状況となる。
In other words, the
上述のような課題を鑑み、コントローラ200が、ホスト機器100からのある読出し要求に基づくデータの転送を行った後、ホスト機器100から次に読出し要求を受け取る前に、次に読出し要求されるであろうデータを予測して、予め補助記憶デバイス300から読み出して確保しておく、という技術が開発された。かかる技術によれば、その予測が当たっていれば、ホスト機器100から次の読出し要求を受け取ってその後通常通り補助記憶デバイス300に読出しの指示をするのではなく、当該次の読出し要求を受け取った時点で、予め読み出して確保しておいたデータをホスト機器100に転送できることとなるので、その分、要求されたデータを早くホスト機器100に返せることになり、ホスト機器100の処理能力に対する影響をその分抑えることができる。この時間的関係を図8に示す。太線が予測当たった場合であり、破線が予測を行わない場合である。
In view of the problems as described above, after the
特許文献1はかかる予測の技術を開示している。すなわち、特許文献1内のHDC(51)が、コントローラ200に対応しており、ディスクキャッシュ(54)に先読みしたデータが格納される(段落[0026]〜[0027])。また、特許文献1においては、2段構えの構成となっており、インテリジェントな予測は、HDCカード(21)内のHDC(31)が行っており、HDCカード(21)内にもディスクキャッシュ(34)が設けられている(段落[0029]〜[0032])。
また、特許文献2は、かかる予測技術に特定の特徴を与えたものである。すなわち、当該文献においては、ホスト機器100に対応するホストコンピュータ(6)からも先読みを指示できるようにして柔軟に予測先読みを行う、というものである。具体的には、ホストコンピュータ(6)が、アドレス又はファイル名を含む先読みコマンドを発する(段落[0030]、[0043]〜[0046]、図4及び図5)。
ところで、予測先読み技術において、ホスト機器100にとっては、補助記憶デバイス300から連続して読み出す一塊りのデータの大きさに応じて、効率的に予測先読み処理が行われることが好ましい場合がある。特に、扱うデータが画像データである場合、補助記憶デバイス300には、種々の大きさの複数の画像データが、各々塊りとして格納されている。また、ホスト機器100にとっては、補助記憶デバイス300から読み出される頻度に応じて、効率的に予測先読み処理が行われることが好ましい場合がある。特に動画処理においては、頻繁に表示される画像(例えば、毎フレーム必ず表示されるデータ)とごくまれにしか表示されない画像とがあり、それらを考慮した効率的な予測先読み処理が望まれる。しかしながら、上述の従来の予測先読み技術においては、かかる特定の処理要求を叶える技術は存在しない。
By the way, in the prediction prefetching technique, it may be preferable for the
本発明は上述のような事情から為されたものであり、本発明の目的は、補助記憶デバイスに格納されたデータの特性に応じて効率的に予測先読み処理を行うことができる読出し転送制御方法及び補助記憶デバイスコントローラを提供することにある。 The present invention has been made for the above-described circumstances, and an object of the present invention is to provide a read transfer control method capable of efficiently performing a predictive prefetch process according to the characteristics of data stored in an auxiliary storage device. And providing an auxiliary storage device controller.
上記目的を達成するため、本発明の読出し転送制御方法は、ホスト機器からの読出し要求に応じて、補助記憶デバイスに格納されたサイズの異なる複数の一塊データから所望の一塊データを連続的に複数回に分けて読み出して前記ホスト機器に転送する際に、前記ホスト機器から次の読出し要求を受け取るまでの間に次の読出し要求に係るデータを予測して前記補助記憶デバイスから先読みしておくように処理するコントローラにおける読出し転送制御方法であって、前記コントローラは、前記補助記憶デバイスから読み出す前記一塊データの大きさに応じて、予測先読み処理を行うに際し、前記一塊データの初回の読出しの際に、そのサイズを算定しておき、2回目以降の読出しの際に、そのサイズに応じて前記予測先読み処理を打ち切ることを要旨とする。 In order to achieve the above object, according to a read transfer control method of the present invention, in response to a read request from a host device, a plurality of pieces of desired chunk data are continuously obtained from a plurality of chunk data having different sizes stored in an auxiliary storage device. When reading in batches and transferring to the host device, the data related to the next read request is predicted and pre-read from the auxiliary storage device until the next read request is received from the host device. a read transfer control method in a controller to process, the controller, in response to said magnitude of said lump data to be read from the auxiliary storage device, in performing the predictive prefetching process, during the initial reading of the lump data , advance calculated its size, when the second and subsequent reading, aborting the predicted prefetch process according to their size The gist of the door.
具体的には、例えば、前記コントローラは、前記読出し要求に含まれる読出し要求アドレス及び読出し要求サイズに基づき、その読出し要求アドレスにその読出し要求サイズに加えて得られた値を、次回の読出し要求に係る読出し要求アドレスと予測し、その予測アドレスが、前記補助記憶デバイスから読み出す前記一塊データの先頭アドレスに前記サイズを加えて得られた値を越えたときに、前記予測先読みを打ち切る。 Specifically, for example, based on the read request address and the read request size included in the read request, the controller sets a value obtained by adding the read request size to the read request address to the next read request. The predicted read-ahead address is predicted, and when the predicted address exceeds the value obtained by adding the size to the head address of the lump data read from the auxiliary storage device, the predicted look-ahead is aborted.
また、上記目的を達成するため、本発明の補助記憶デバイスコントローラは、ホスト機器からの読出し要求に応じて、補助記憶デバイスに格納されたサイズの異なる複数の一塊データから所望の一塊データを連続的に複数回に分けて読み出して前記ホスト機器に転送する際に、前記ホスト機器から次の読出し要求を受け取るまでの間に次の読出し要求に係るデータを予測して前記補助記憶デバイスから先読みしておくように処理する補助記憶デバイスコントローラであって、前記補助記憶デバイスから読み出す前記一塊データの大きさに応じて、予測先読み処理を行うに際し、前記一塊データの初回の読出しの際に、そのサイズを算定しておき、2回目以降の読出しの際に、そのサイズに応じて前記予測先読み処理を打ち切ることを要旨とする。
In order to achieve the above object, the auxiliary storage device controller of the present invention continuously obtains desired block data from a plurality of block data of different sizes stored in the auxiliary storage device in response to a read request from the host device. When the data is read out in a plurality of times and transferred to the host device, the data related to the next read request is predicted before the next read request is received from the host device, and prefetched from the auxiliary storage device. An auxiliary storage device controller that performs processing in accordance with the size of the lump data read from the auxiliary storage device , the size of calculated; then, during the second and subsequent reading, to the gist of truncating the predicted prefetch process according to their size .
そのとき、各エントリには前記一塊データについて読出し回数の情報が含まれており、前記コントローラは、前記複数のエントリの空きがなくなった場合には、前記読出し回数の少ない一塊データに係るエントリを無効とし、新たに読み出される一塊データに割り当てることが好適である。 At this time, each entry includes information on the number of readings for the lump data, and the controller invalidates the entry related to the lump data with a small number of readings when the plurality of entries are not available. It is preferable to assign to the newly read data block.
また、典型的には、前記一塊データは画像データであり、前記補助記憶デバイスはNAND型フラッシュメモリである。また、典型的には、前記コントローラと前記ホスト機器との間のインターフェースは、SATAである。 Typically, the lump data is image data, and the auxiliary storage device is a NAND flash memory. Also, typically, the interface between the controller and the host device is SATA.
また、上記目的を達成するため、本発明の補助記憶デバイスコントローラは、ホスト機器からの読出し要求に応じて、補助記憶デバイスに格納された複数の一塊データから所望の一塊データを連続的に複数回に分けて読み出して前記ホスト機器に転送する際に、前記ホスト機器から次の読出し要求を受け取るまでの空いた時間に次の読出し要求に係るデータを予測して前記補助記憶デバイスから先読みしておくように処理する補助記憶デバイスコントローラであって、前記補助記憶デバイスから読み出す前記一塊データの大きさと、その読出し頻度に応じて、予測先読み処理を行うことを要旨とする。 In order to achieve the above object, the auxiliary storage device controller of the present invention continuously obtains a desired lump data from a plurality of lump data stored in the auxiliary storage device a plurality of times in response to a read request from the host device. When the data is read separately and transferred to the host device, the data related to the next read request is predicted in advance until the next read request is received from the host device and pre-read from the auxiliary storage device. The gist of the present invention is that the auxiliary storage device controller performs processing in accordance with the size of the block data read from the auxiliary storage device and the read frequency according to the read frequency.
本発明の読出し転送制御方法及び補助記憶デバイスコントローラによれば、補助記憶デバイスから読み出す前記一塊データの大きさと、その読出し頻度に応じて、予測先読み処理を行うことにより、かかるデータの特性に応じて効率的に予測先読み処理を行うことができる。 According to the read transfer control method and the auxiliary storage device controller of the present invention, by performing the predictive prefetching process according to the size of the lump data read from the auxiliary storage device and the read frequency, according to the characteristics of the data. Predictive prefetching processing can be performed efficiently.
以下、図面を参照して、本発明の実施の形態について詳細に説明する。
図1は、本発明の読出し転送制御方法の一実施形態が適用される処理システムの構成を示すブロック図である。同図に示すように、同処理システムは、パーソナルコンピュータ等の汎用機器やゲーム機等の専用機器の本体たるホスト機器1と、そのホスト機器1と所定のインターフェースで接続される補助記憶装置2とで構成されている。所定のインターフェースとしては、ST−506、SCSI、IDE、ATA、SATA、eSATA等があるが、最近では、SATA及びeSATAが主流になってきている。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram showing a configuration of a processing system to which an embodiment of a read transfer control method of the present invention is applied. As shown in the figure, the processing system includes a
補助記憶装置2は、少なくとも、補助記憶デバイスの一例である複数のNAND型フラッシュメモリ22と、そのNAND型フラッシュメモリ22に対するデータの読出し/書込みの制御を行うコントローラ21と、NAND型フラッシュメモリ22から先読みしたデータを確保しておくための読出しバッファメモリ23と、を備えている。なお、補助記憶デバイスとして、NAND型フラッシュメモリ22には限定されてないが、ホスト機器1の処理速度と補助記憶デバイスの読出し速度との関係で、ホスト機器1からの読出し要求があった場合に、ホスト機器1の処理能力を低下させてしまうほどのレイテンシが生じてしまうことが前提である。ここで、NAND型フラッシュメモリ22の容量は、全体として、例えば64Gビットである。また、読出しバッファメモリ23の容量は、8kバイト〜32kバイトが好適である。なお、NAND型フラッシュメモリ22には、論理的に一塊の領域に格納されたデータ(以下、「一塊データ」と称す)であって、一度に、又は連続的に複数回で読み出されるべきデータが複数個格納されている。ここでは、これらの複数の一塊データは、それぞれサイズは異なるものであり、また、読出し頻度も異なるものである。かかる一塊データとしては、画像データがある。
The
コントローラ21は、少なくとも、ホストインターフェース211、制御部212、読出し処理用パラメータ格納部213、及びNエントリテーブル214を有している。ホストインターフェース211は、前述の所定のインターフェースの規格手順に基づいて、ホスト機器1とのやりとりを行うためのインターフェースである。
The
Nエントリテーブル214は、NAND型フラッシュメモリ22に格納された複数の一塊データのうち、ホスト機器1からの読出し要求により「読み出されたことのある一塊データ(以下、「読出しデータ」と称す)」に係る情報を記憶するN個のエントリで構成されたテーブルである。1エントリは、図2(a)に示すように、読出しデータの開始アドレス214a、読出しデータのサイズ214b、読出しデータの読出し回数214c、及び当エントリの有効/無効フラグ124dで構成されている。ここで、読出しデータの開始アドレス214aは、対応する読出しデータのNAND型フラッシュメモリ22上での先頭記憶アドレスに対応するものである。読出しデータのサイズ214bは、最終的に、対応する読出しデータのサイズに対応するものである。読出しデータの読出し回数214cは、文字通り、対応する読出しデータが読み出されるごとにカウントアップされる情報である。当エントリの有効/無効フラグ214dは、そのエントリがその段階で有効か無効かを示す情報である。なお、このNエントリテーブル214は、ハードウェアとしては、Nの個数に応じてSRAMで構成されたり、レジスタで構成されたりする。
The N entry table 214 is “a group of data that has been read (hereinafter referred to as“ read data ”) in response to a read request from the
読出し処理用パラメータ格納部213は、コントローラ21がホスト機器1からの読出し要求に応じて行う処理の過程で、必要な情報を一時確保しておくためのパラメータバッファである。読出し要求アドレス格納部213a及び読出し要求サイズ格納部213bは、ホスト機器1からの読出し要求コマンドに含まれる要求ごとの読出し要求アドレス及び読出し要求サイズをそれぞれ一時的に格納するための領域である。また、予測アドレス格納部213cは、ホスト機器1からのある読出し要求に応じたデータ転送の後に、コントローラ21が予測した、次のホスト機器1からの読出し要求に係る読出し要求アドレスが格納される領域である。また、前回アドレス格納部213dは、NAND型フラッシュメモリ22に格納された一塊データの初回読出し時における、読出し要求ごとの前回の要求に係る読出し要求アドレスが格納される領域である。また、エントリインデックス格納部213eは、初回読出し中の読出しデータに対応したエントリの番号が格納される領域である。
The read processing
制御部212は、ホストインターフェース211を介してホスト機器1から受け取った読出し要求に基づいて、読出し処理用パラメータ格納部213及びNエントリテーブル214に対して書換え操作を行いつつ、後述の予測先読み処理を含む読出し転送処理を実行する。なお、コントローラ21には、上述の構成以外に、各種の構成、例えばNAND型フラッシュメモリ22との間のインターフェース回路等、を備えているが省略している。
Based on the read request received from the
次に、本発明の読出し転送制御方法の一実施形態におけるコントローラ21の制御部212が実行する予測先読み処理を含む読出し転送処理について説明する。
まず、本発明における予測先読み処理のポリシーは、以下の如くである。
(イ)各一塊データのサイズに応じた予測先読み処理を行う。具体的には、初回の読出しの際にデータサイズを把握し、2回目以降の読出しの際には、そのサイズに応じた先読みを行う。
(ロ)各一塊データの読出し頻度に応じて、予測先読み処理を行う。具体的には、読出し頻度の高い一塊データほど、(イ)のポリシーに基づく処理を優先的に行う。
Next, the read transfer process including the predictive prefetch process executed by the
First, the policy of the predictive prefetch process in the present invention is as follows.
(A) Predictive look-ahead processing corresponding to the size of each block data is performed. Specifically, the data size is ascertained at the first reading, and prefetching according to the size is performed at the second and subsequent readings.
(B) Predictive look-ahead processing is performed according to the read frequency of each block of data. Specifically, the processing based on the policy (a) is preferentially performed for the lump data that is read frequently.
図3は、上述のポリシーに基づいて制御部212が実行する予測先読み処理を含む読出し転送処理の概要手順を示すフローチャートである。すなわち、ホスト機器1から、任意の一塊データに対するデータ読出しの要求があった場合、制御部212は、そのデータ読出しが、Nエントリテーブル214のいずれかのエントリに登録されている2回目以降のデータ読出しか否かを判定する(ステップS101)。なお、一度読み出された一塊データであっても、読出し頻度の低いデータについては後述のようにエントリから削除されてしまうので、一度読み出されたからといって必ずエントリとして登録が残っているとは限らない。
FIG. 3 is a flowchart showing an outline procedure of a read transfer process including a predictive prefetch process executed by the
当該データ読出しが、Nエントリテーブル214のいずれかのエントリに登録されている2回目以降のデータ読出しの場合(ステップS101において肯定判定)、当該データ読出しに係る複数の読出し要求のうち、1つ目の要求については、NAND型フラッシュメモリ22からデータを読み出してホスト機器1に転送し、以降、予測して読出しバッファメモリ23に先読みしておく。そして、2つ目以降の要求については、予測が当たっていれば、読出しバッファメモリ23に格納しておいたデータを転送する(ステップS102)。但し、当該一塊データのサイズに応じて先読みは終了する。一方、当該データ読出しが、Nエントリテーブル214のいずれかのエントリに登録されている2回目以降のデータ読出しではない場合(ステップS101において否定判定)、いずれかのエントリ(空きがあればそれを利用し、なければ、読出し頻度の低い一塊データに係るエントリを削除)に登録し、当該複数の要求に基づき、順に、NAND型フラッシュメモリ22からデータを読み出してホスト機器1に転送しつつ、当該一塊データのサイズを算定して、エントリに登録しておく。かかる処理により、複数の一塊データのそれぞれのサイズと読出し頻度が有意に異なる場合、効率的な予測先読み処理が可能となる。
When the data read is the second or subsequent data read registered in any entry of the N entry table 214 (Yes in step S101), the first of the multiple read requests related to the data read For this request, data is read from the
図4及び図5は、制御部212が実行する予測先読み処理を含む読出し転送処理手順の詳細を示すフローチャートである。以下、図1及び図2を参照しつつ、図4及び図5に示された処理手順を順に説明する。なお、概して、図5に示された処理が、一塊のデータの初回読出し時における処理であり、図4に示された処理が、2回目以降の読出し時における処理である。
4 and 5 are flowcharts showing details of the read transfer processing procedure including the prediction prefetch processing executed by the
そこで、まず、コントローラ21の制御部212は、常時ホスト機器1からの読出し要求を監視しており(ステップS1)、読出し要求を受けると、当該読出し要求に含まれる読出し要求アドレス及び読出し要求サイズを、それぞれ、読出し要求アドレス格納部213a及び読出し要求サイズ格納部213bに一旦確保しておく(ステップS2)。次に、読出し要求アドレス格納部213aに格納した当該読出し要求アドレスと一致する、読出しデータの開始アドレス214aを有し、かつ有効なエントリ(有効/無効フラグ214dによる)があるか否かを判定する(ステップS3)。
Therefore, first, the
ステップS3における判定が肯定判定の場合、当該読出し要求は、当該エントリ(アドレスが一致したエントリ)に係る一塊データの2回目以降のデータ読出しの1つ目の読出し要求である、ということである。従って、その場合、当該読出し要求アドレス及び読出し要求サイズ(読出し要求アドレス格納部213a及び読出し要求サイズ格納部213bに確保したアドレス及びサイズ)に基づいて、NAND型フラッシュメモリ22からデータを読み出してホスト機器1に転送する(ステップS4)。加えて、当該エントリ内の読出しデータの読出し回数214cをインクリメント(+1)して(ステップS5)、読出し回数を増やす。そして、ステップS6に進む。一方、ステップS3における判定が否定判定の場合、当該読出し要求アドレスが、予測アドレス格納部213cに格納された予測アドレスと一致するか否かを判定する(ステップS9)。
If the determination in step S3 is affirmative, the read request is the first read request for the second or subsequent data read of the lump data relating to the entry (entry with the matching address). Therefore, in this case, based on the read request address and the read request size (addresses and sizes secured in the read request
ステップS9における判定が否定判定の場合、ある一塊データの1回目のデータ読出しであると判断できるので、ステップS11に移行する。このステップS11以降の処理については、後述する。一方、ステップS9における判定が肯定判定の場合、当該読出し要求は、当該エントリに係る一塊データの2回目以降のデータ読出しの2つ目以降の読出し要求である、ということである。従って、その場合、予測して読み出しておいたデータが読出しバッファメモリ23に格納されているはずなので、そのデータをホスト機器1に転送する(ステップS10)。そして、ステップS6に進む。
If the determination in step S9 is negative, it can be determined that this is the first data read of a block of data, and the process proceeds to step S11. The processing after step S11 will be described later. On the other hand, if the determination in step S9 is affirmative, the read request is a second or subsequent read request for the second or subsequent data read of the lump data related to the entry. Therefore, in this case, since the data that has been predicted and read should be stored in the read
ステップS6においては、当該読出し要求アドレスに対して当該読出し要求サイズを加算して、次回の予測アドレスとして予測アドレス格納部213cに格納しておく。 In step S6, the read request size is added to the read request address and stored in the predicted address storage unit 213c as the next predicted address.
次に、ステップS6で得られた予測アドレスが、当該エントリ内の、読出しデータの開始アドレス214aに読出しデータのサイズ214bを足したものよりも小さいか否かを判定する(ステップS7)。この判定において、小さければ(肯定判定)、当該一塊データの末端に達していないということなので、予測先読みは引き続き有効と判断され、従って、当該予測アドレスに基づいて、NAND型フラッシュメモリ22からデータを読み出して読出しバッファメモリ23に確保しておく(ステップS8)。一方、小さくなければ(否定判定)、当該一塊データの末端を越えているということなので、その時点で予測先読みは有効ではなくなっているので、そのまま次の読出し要求を待つ。
Next, it is determined whether or not the predicted address obtained in step S6 is smaller than the read data start
一方、ステップS9において、ある一塊データの1回目のデータ読出しであると判断されてステップS11に移行した場合、当該読出し要求アドレスが、前回アドレス格納部213dに格納された前回アドレスに、当該読出し要求サイズを足したものに一致しているか否かを判定する(ステップS11)。 On the other hand, when it is determined in step S9 that the data is read for the first time for a certain block of data and the process proceeds to step S11, the read request address is set to the previous address stored in the previous address storage unit 213d. It is determined whether or not it matches the size (step S11).
ステップS11における判定が否定判定の場合、当該読出し要求は、任意の一塊データの初回のデータ読出しの1つ目の読出し要求である、ということである。従って、その場合、そのデータ読出しに新たにNエントリテーブル214に一エントリとして登録するのであるが、まず、Nエントリテーブル214に空きエントリがあるか否かを判定する(ステップS16)。これは、有効/無効フラグ214dが無効となっているエントリがあるかを検索すればよい。空きエントリがなければ(ステップS16において否定判定)、読出しデータの読出し回数214cが最も小さいエントリを検索する(ステップS17)。そして、ステップS18において、空きがあった場合はそのエントリに、また、空きがなかった場合は、ステップS17で検索したエントリに、当該読出し要求に係る情報を格納する。すなわち、当該読出し要求に係る読出し要求アドレス及び読出し要求サイズを、それぞれ、読出しデータの開始アドレス214a及び読出しデータのサイズ214bとして格納する。また読出しデータの読出し回数214cに“1”を格納する。また、有効/無効フラグ214dを有効とする。そして、ステップS13に進む。
If the determination in step S11 is negative, the read request is the first read request for the first data read of arbitrary chunk data. Therefore, in that case, a new entry is registered in the N entry table 214 for reading the data. First, it is determined whether or not there is an empty entry in the N entry table 214 (step S16). This can be done by searching for an entry for which the valid /
一方、ステップS11における判定が肯定判定の場合、当該読出し要求は、任意の一塊データの初回のデータ読出しの2つ目以降の読出し要求である、ということである。従って、その場合、エントリインデックス格納部213eに格納されたエントリ番号のエントリ内の読出しデータのサイズ214bに当該読出し要求サイズを加算する(ステップS12)。この処理が、当該一塊データのサイズの算定を進める部分である。そして、ステップS13に進む。
On the other hand, if the determination in step S11 is affirmative, the read request is a second or subsequent read request for the first data read of arbitrary chunk data. Therefore, in this case, the read request size is added to the read
ステップS13においては、当該読出し要求アドレス及び読出し要求サイズに基づいて、NAND型フラッシュメモリ22からデータを読み出してホスト機器1に転送する。そして、次に、当該読出し要求アドレスを、前回アドレス格納部213dに格納し(ステップS14)、次に、当該エントリの番号をエントリインデックス格納部213eに格納し(ステップS15)、次の読出し要求を待つ。
In step S13, based on the read request address and the read request size, data is read from the
次に、上述の読出し転送処理による処理の具体例について説明する。図6(a)に示すようにNAND型フラッシュメモリ22に格納された一塊データたる画像データAを読み出す場合を例に説明する。この画像データAは、NAND型フラッシュメモリ22におけるアドレス10000から1200バイトで記憶されている(物理的には通常セクタ管理される)。なお、これらのアドレス及びサイズの値は説明の便宜のための数値である。そこで、例えば、ホスト機器1から400バイトごとの読出し要求が来るものとする。図6(b)は、初回読出しの際の、各読出し要求に応じた、エントリ及び前回アドレスの遷移を示す図である。また、図6(c)は、2回目以降の読出しの際の、各読出し要求に応じた、読出し回数の変化、並びに予測アドレスバッファメモリの内容の遷移を示す図である。
Next, a specific example of processing by the above read transfer processing will be described. An example will be described in which image data A, which is a single block of data stored in the
以上のように、本発明の一実施形態によれば、NAND型フラッシュメモリ22から連続して読み出す一塊データの大きさに応じて、また、NAND型フラッシュメモリ22から読み出される頻度に応じて、効率的に予測先読み処理を行うことができる。
As described above, according to an embodiment of the present invention, the efficiency depends on the size of the batch data continuously read from the
本発明の読出し転送制御方法は、例えば、補助記憶デバイスに格納された画像データを読み出す際に採用できる。 The read transfer control method of the present invention can be employed, for example, when reading image data stored in an auxiliary storage device.
1 ホスト機器
2 補助記憶装置
21 コントローラ
211 ホストインターフェース
212 制御部
213 読出し処理用パラメータ格納部
214 Nエントリテーブル
22 NAND型フラッシュメモリ
23 読出しバッファメモリ
100 ホスト機器
200 コントローラ
300 補助記憶デバイス
1
Claims (8)
前記コントローラは、前記補助記憶デバイスから読み出す前記一塊データの大きさに応じて、予測先読み処理を行うに際し、前記一塊データの初回の読出しの際に、そのサイズを算定しておき、2回目以降の読出しの際に、そのサイズに応じて前記予測先読み処理を打ち切ることを特徴とする読出し転送制御方法。 In response to a read request from a host device, when reading desired chunk data from a plurality of chunk data of different sizes stored in an auxiliary storage device in a plurality of times and transferring them to the host device, A read transfer control method in a controller for processing to predict data related to a next read request and pre-read from the auxiliary storage device until a next read request is received from a host device,
Said controller, in response to said magnitude of said lump data read out from the auxiliary storage device, in performing the predictive prefetching process, during the initial reading of the lump data, advance calculated the size, the second and subsequent A read transfer control method characterized in that the read- ahead prediction process is terminated according to the size at the time of reading.
前記補助記憶デバイスから読み出す前記一塊データの大きさに応じて、予測先読み処理を行うに際し、前記一塊データの初回の読出しの際に、そのサイズを算定しておき、2回目以降の読出しの際に、そのサイズに応じて前記予測先読み処理を打ち切ることを特徴とする補助記憶デバイスコントローラ。 In response to a read request from a host device, when reading desired chunk data from a plurality of chunk data of different sizes stored in an auxiliary storage device in a plurality of times and transferring them to the host device, an auxiliary storage device controller for processing from the host device as previously prefetched in anticipation of data according to the following read request until it receives the next read request from the auxiliary storage device,
Depending on the size of the lump data to be read from the auxiliary storage device, the size of the lump data is calculated at the time of the first reading of the lump data when performing the predictive prefetching process. The auxiliary storage device controller is characterized in that the prediction prefetching process is terminated according to the size .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014139023A JP5849268B1 (en) | 2014-07-04 | 2014-07-04 | Read transfer control method and auxiliary storage device controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014139023A JP5849268B1 (en) | 2014-07-04 | 2014-07-04 | Read transfer control method and auxiliary storage device controller |
Publications (2)
Publication Number | Publication Date |
---|---|
JP5849268B1 true JP5849268B1 (en) | 2016-01-27 |
JP2016018273A JP2016018273A (en) | 2016-02-01 |
Family
ID=55176175
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014139023A Active JP5849268B1 (en) | 2014-07-04 | 2014-07-04 | Read transfer control method and auxiliary storage device controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5849268B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109889656B (en) * | 2018-12-29 | 2021-04-20 | 深圳Tcl新技术有限公司 | Data reading method, device, equipment and storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001134488A (en) * | 1999-11-08 | 2001-05-18 | Hitachi Ltd | Method for controlling cache for disk memory |
JP2013077294A (en) * | 2011-09-16 | 2013-04-25 | Ricoh Co Ltd | Printer and method for controlling the same |
JP6007667B2 (en) * | 2012-08-17 | 2016-10-12 | 富士通株式会社 | Information processing apparatus, information processing method, and information processing program |
-
2014
- 2014-07-04 JP JP2014139023A patent/JP5849268B1/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2016018273A (en) | 2016-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI438628B (en) | Data storage system and data storage medium | |
US7203815B2 (en) | Multi-level page cache for enhanced file system performance via read ahead | |
US20130212319A1 (en) | Memory system and method of controlling memory system | |
US9507705B2 (en) | Write cache sorting | |
US8825946B2 (en) | Memory system and data writing method | |
US20140013025A1 (en) | Hybrid memory with associative cache | |
JP2007011523A (en) | Data look-ahead method and computer system | |
TWI710905B (en) | Data storage device and method for loading logical-to-physical mapping table | |
US11537328B2 (en) | Method and apparatus for executing host commands | |
US20190384529A1 (en) | Enhanced read-ahead capability for storage devices | |
US20210103445A1 (en) | Method and apparatus for preprocessing data transfer commands | |
JP2020191055A (en) | Recovery processing method and device from instantaneous interruption, and computer readable storage medium | |
US9778858B1 (en) | Apparatus and method for scatter gather list handling for an out of order system | |
US8788712B2 (en) | Compression block input/output reduction | |
CN114281719A (en) | System and method for extending command orchestration through address mapping | |
JP5849268B1 (en) | Read transfer control method and auxiliary storage device controller | |
US9632950B2 (en) | Storage control device controlling access to a storage device and access controlling method of a storage device | |
US8356141B2 (en) | Identifying replacement memory pages from three page record lists | |
KR102692838B1 (en) | Enhanced read-ahead capability for storage devices | |
CN110908595A (en) | Storage device and information processing system | |
US20220358051A1 (en) | Non-volatile storage controller with partial logical-to-physical (l2p) address translation table | |
US11449428B2 (en) | Enhanced read-ahead capability for storage devices | |
JP6521694B2 (en) | Storage control system and storage control device | |
CN111045961B (en) | Data processing method and memory controller using the same | |
TWI592943B (en) | Data management method for data storage device and memory controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20151006 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20151020 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5849268 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |