+

JP2012078941A - Information processor and cache control method - Google Patents

Information processor and cache control method Download PDF

Info

Publication number
JP2012078941A
JP2012078941A JP2010221593A JP2010221593A JP2012078941A JP 2012078941 A JP2012078941 A JP 2012078941A JP 2010221593 A JP2010221593 A JP 2010221593A JP 2010221593 A JP2010221593 A JP 2010221593A JP 2012078941 A JP2012078941 A JP 2012078941A
Authority
JP
Japan
Prior art keywords
cache
storage device
external storage
stored
write
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.)
Withdrawn
Application number
JP2010221593A
Other languages
Japanese (ja)
Inventor
Mikio Omori
幹雄 大森
Takehiko Kurashige
剛彦 蔵重
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2010221593A priority Critical patent/JP2012078941A/en
Publication of JP2012078941A publication Critical patent/JP2012078941A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Power Sources (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an information processor capable of writing dirty data onto an external storage even when abnormal termination due to a power failure or the like occurs, and to provide a cache control method.SOLUTION: According to one embodiment of the present invention, an information processor accessible to a first external storage includes a host system, a second external storage, a volatile memory, first cache control means, termination processing means, and initialization means. The second external storage serves as a secondary cache for the first external storage. The volatile memory serves as a primary cache for the first external storage, and is supplied with power by battery at the time of a power failure. The first cache control means stores write data to be written onto the first external storage in a cache area in the volatile memory. When the information processor is terminated abnormally and then started up, the initialization means writes dirty data stored in the cache area in the volatile memory onto the first external storage.

Description

本発明の実施形態は、外部記憶装置へのアクセス要求に応じたキャッシュ動作を制御する情報処理装置及び該装置に適用されるキャッシュ制御方法に関する。   Embodiments described herein relate generally to an information processing apparatus that controls a cache operation according to an access request to an external storage device and a cache control method applied to the apparatus.

半導体メモリを用いたディスクキャッシュ処理では、ホストシステムによって主メモリからハードディスクへのデータのライトが要求されたとき、例えば、ハードディスクにデータを書き込む前に、半導体メモリ(キャッシュメモリとも云う)にデータを一時記憶して、一時記憶されたデータを所定のタイミングでハードディスクに書き込むライトバック処理が実行される。ライトバック処理では、データがキャッシュメモリに一時記憶されたことに応答して、ホストシステムにデータの書き込み完了を通知する。そのため、ホストシステムに対するハードディスクの見かけ上のアクセス速度を向上させることができる。   In disk cache processing using a semiconductor memory, when the host system requests writing of data from the main memory to the hard disk, for example, the data is temporarily stored in the semiconductor memory (also called a cache memory) before the data is written to the hard disk. A write-back process for storing and temporarily storing the data stored in the hard disk at a predetermined timing is executed. In the write back process, in response to the temporary storage of data in the cache memory, the host system is notified of the completion of the data writing. Therefore, the apparent access speed of the hard disk to the host system can be improved.

しかし、ライトバック処理では、稼働中に停電等が起きたとき、キャッシュメモリに一時記憶されたデータが失われてしまうという問題がある。そのため、揮発性のキャッシュメモリを使用するライトバック処理では、外部電源を用いて供給される電力に異常が検出されたとき、バックアップのためのバッテリによって電力が供給されている間に、キャッシュメモリに格納されているデータを不揮発性メモリに退避する技術が利用されている。   However, the write-back process has a problem that data temporarily stored in the cache memory is lost when a power failure or the like occurs during operation. Therefore, in the write-back processing using a volatile cache memory, when an abnormality is detected in the power supplied using the external power supply, the cache memory is stored while the power is supplied by the backup battery. A technique for saving stored data in a nonvolatile memory is used.

特開2008−192028号公報JP 2008-192028 A

上述のライトバック処理では、ホストシステムにバックアップのためのバッテリが接続されている必要がある。しかし、ホストシステムに接続される無停電電源装置等を設けることはコストが高い。   In the above write-back process, a backup battery needs to be connected to the host system. However, providing an uninterruptible power supply connected to the host system is expensive.

ところで、ホストシステムに接続されるRAIDコントローラ等には、バッテリによってバックアップされる揮発性メモリが設けられることがある。RAIDコントローラ内のプロセッサは、この揮発性メモリを作業メモリとして用いることができる。そして、このRAIDコントローラでは、停電等によって外部電源から電力が供給されないとき、バッテリを用いて揮発性メモリに電力を供給することによって揮発性メモリに格納されたデータを保持する。そのため、バッテリによってバックアップ可能な時間内に外部電源による電力供給が回復した際には、例えば、揮発性メモリに格納されたデータを外部記憶装置に書き込むことができる。   Incidentally, a RAID controller or the like connected to the host system may be provided with a volatile memory that is backed up by a battery. A processor in the RAID controller can use this volatile memory as a working memory. In the RAID controller, when power is not supplied from an external power source due to a power failure or the like, data stored in the volatile memory is held by supplying power to the volatile memory using a battery. Therefore, when the power supply from the external power source is recovered within the time that can be backed up by the battery, for example, data stored in the volatile memory can be written to the external storage device.

しかし、このRAIDコントローラ内に設けられた揮発性メモリ(バッテリによってバックアップされる揮発性メモリ)は、RAIDコントローラの作業メモリとして用いられ、ホストシステムのキャッシュとして用いることはできなかった。   However, a volatile memory provided in the RAID controller (a volatile memory backed up by a battery) is used as a working memory of the RAID controller and cannot be used as a cache of the host system.

本発明は、停電等の異常終了が発生した際にも、キャッシュされたダーティデータを外部記憶装置に書き込むことができる情報処理装置及びキャッシュ制御方法を提供することを目的とする。   An object of the present invention is to provide an information processing apparatus and a cache control method capable of writing cached dirty data to an external storage device even when an abnormal end such as a power failure occurs.

実施形態によれば、第1外部記憶装置をアクセス可能な情報処理装置は、ホストシステム、第2外部記憶装置、揮発性メモリ、第1キャッシュ制御手段、終了処理手段、及び初期化手段を具備する。第2外部記憶装置は、前記第1外部記憶装置に対する二次キャッシュとして機能し、前記第1外部記憶装置から読み出されるリードデータ及び前記第1外部記憶装置に書き込むべきライトデータを一時的に格納する。揮発性メモリは、前記第1外部記憶装置に対する一次キャッシュとして機能し、停電時にバッテリを用いて電力が供給される。第1キャッシュ制御手段は、前記ホストシステムからのライト要求に応答して前記第1外部記憶装置に書き込むべきライトデータを前記揮発性メモリ内のキャッシュ領域に格納し、前記揮発性メモリに格納されたキャッシュ管理情報を更新する。終了処理手段は、前記情報処理装置が正常終了されるとき、前記揮発性メモリに格納されたキャッシュ管理情報に基づいて、前記揮発性メモリ内のキャッシュ領域に格納されたダーティデータを前記第1外部記憶装置又は前記第2外部記憶装置に書き込む。初期化手段は、前記情報処理装置が停電によって異常終了した後に起動されたとき、前記揮発性メモリに格納されたキャッシュ管理情報に基づいて、前記揮発性メモリ内のキャッシュ領域に格納されたダーティデータを前記第1外部記憶装置又は前記第2外部記憶装置に書き込む。   According to the embodiment, the information processing apparatus that can access the first external storage device includes a host system, a second external storage device, a volatile memory, a first cache control unit, a termination processing unit, and an initialization unit. . The second external storage device functions as a secondary cache for the first external storage device, and temporarily stores read data read from the first external storage device and write data to be written to the first external storage device . The volatile memory functions as a primary cache for the first external storage device, and power is supplied using a battery during a power failure. The first cache control means stores write data to be written to the first external storage device in response to a write request from the host system in a cache area in the volatile memory, and is stored in the volatile memory. Update cache management information. When the information processing apparatus is normally terminated, an end processing unit is configured to transfer the dirty data stored in the cache area in the volatile memory based on the cache management information stored in the volatile memory. Write to the storage device or the second external storage device. When the information processing apparatus is started after the information processing apparatus is abnormally terminated due to a power failure, the dirty data stored in the cache area in the volatile memory is based on the cache management information stored in the volatile memory. Are written into the first external storage device or the second external storage device.

第1実施形態に係る情報処理装置の構成を示すブロック図。1 is a block diagram showing a configuration of an information processing apparatus according to a first embodiment. 同実施形態の情報処理装置に設けられたメインメモリにRAIDコントローラ内に設けられたメモリが投影される例を示す図。4 is an exemplary view showing an example in which a memory provided in a RAID controller is projected onto a main memory provided in the information processing apparatus of the embodiment. 同実施形態の情報処理装置のソフトウェア構成を示す概念図。The conceptual diagram which shows the software structure of the information processing apparatus of the embodiment. 同実施形態の情報処理装置によって実行されるキャッシュドライバプログラムの構成を示すブロック図。2 is an exemplary block diagram showing the configuration of a cache driver program executed by the information processing apparatus of the embodiment. FIG. 同実施形態の情報処理装置によって用いられるアドレステーブルの一構成例を示す図。2 is an exemplary diagram showing a configuration example of an address table used by the information processing apparatus of the embodiment. FIG. 同実施形態の情報処理装置によって実行される初期化処理の手順の例を示すフローチャート。6 is an exemplary flowchart illustrating an example of a procedure of an initialization process which is executed by the information processing apparatus of the embodiment. 同実施形態の情報処理装置によって実行されるリード処理の手順の例を示すフローチャート。6 is an exemplary flowchart illustrating an example of the procedure of a read process which is executed by the information processing apparatus of the embodiment. 同実施形態の情報処理装置によって実行されるライト処理の手順の例を示すフローチャート。6 is an exemplary flowchart illustrating an example of a procedure of a write process which is executed by the information processing apparatus of the embodiment. 第2実施形態に係る情報処理装置の構成を示すブロック図。The block diagram which shows the structure of the information processing apparatus which concerns on 2nd Embodiment. 同実施形態の情報処理装置によって実行される初期化処理の手順の例を示すフローチャート。6 is an exemplary flowchart illustrating an example of a procedure of an initialization process which is executed by the information processing apparatus of the embodiment.

以下、第1の実施の形態を、図1乃至図8に基づいて説明する。
まず、図1を参照して、第1の実施形態に係る情報処理装置の構成を説明する。この情報処理装置は、例えば、サーバコンピュータ、パーソナルコンピュータのようなコンピュータ1として実現し得る。
Hereinafter, a first embodiment will be described with reference to FIGS. 1 to 8.
First, the configuration of the information processing apparatus according to the first embodiment will be described with reference to FIG. This information processing apparatus can be realized as a computer 1 such as a server computer or a personal computer, for example.

コンピュータ1は、ホストシステム10、RAIDコントローラ20、及び外部記憶装置30を備える。ホストシステム10は、RAIDコントローラ20に接続され、RAIDコントローラ20を介して外部記憶装置30にアクセスする。RAIDコントローラ20は外部記憶装置30に接続される。RAIDコントローラ20は、RAID技術に基づいて、外部記憶装置30からのデータの読み出し及び外部記憶装置30へのデータの書き込み等を行う。外部記憶装置30は不揮発性の記憶装置を含む。外部記憶装置30は、例えば、SSD31と3台のHDD32,33,34を含む。   The computer 1 includes a host system 10, a RAID controller 20, and an external storage device 30. The host system 10 is connected to the RAID controller 20 and accesses the external storage device 30 via the RAID controller 20. The RAID controller 20 is connected to the external storage device 30. The RAID controller 20 reads data from the external storage device 30 and writes data to the external storage device 30 based on the RAID technology. The external storage device 30 includes a nonvolatile storage device. The external storage device 30 includes, for example, an SSD 31 and three HDDs 32, 33, and 34.

ホストシステム10は、プロセッサ11、PCH(Platform Controller Hub)12及びメインメモリ13を備える。プロセッサ11は、ホストシステム10内の各部の動作を制御する。プロセッサ11は、例えば、外部記憶装置30からメインメモリ13上にロードされたオペレーティングシステム(OS)、キャッシュドライバプログラム54、サービス43、各種のアプリケーションプログラム等を実行する。また、プロセッサ11は、ホストシステム10に接続されたRAIDコントローラ20にコマンドを出力することができる。このコマンドは、例えば、外部記憶装置30からデータを読み出すためのリードコマンド、外部記憶装置30にデータを書き込むためのライトコマンドである。   The host system 10 includes a processor 11, a PCH (Platform Controller Hub) 12, and a main memory 13. The processor 11 controls the operation of each unit in the host system 10. The processor 11 executes, for example, an operating system (OS), a cache driver program 54, a service 43, various application programs, and the like loaded from the external storage device 30 onto the main memory 13. Further, the processor 11 can output a command to the RAID controller 20 connected to the host system 10. This command is, for example, a read command for reading data from the external storage device 30 and a write command for writing data to the external storage device 30.

PCH12は、PCI(Peripheral Component Interconnect)バス上の各デバイスを制御する。また、PCH12は、USBポートに取り外し自在に接続されるUSBデバイスを制御するUSBコントローラを内蔵している。   The PCH 12 controls each device on a PCI (Peripheral Component Interconnect) bus. The PCH 12 has a built-in USB controller that controls a USB device that is detachably connected to the USB port.

RAIDコントローラ20は、プロセッサ21、メモリ22、バッテリ23、バッテリ回路24、PCI Expressコネクタ26、SASコネクタ27、DMAコントローラ28を備える。   The RAID controller 20 includes a processor 21, a memory 22, a battery 23, a battery circuit 24, a PCI Express connector 26, a SAS connector 27, and a DMA controller 28.

プロセッサ21は、RAIDコントローラ20内の各部の動作を制御する。プロセッサ21は、プロセッサ11(ホストシステム10)によって出力されたコマンドをPCI Expressバス、PCI Expressコネクタ26を介して受け取る。そして、プロセッサ21は、受け取ったコマンドに応じた処理を実行する。   The processor 21 controls the operation of each unit in the RAID controller 20. The processor 21 receives a command output by the processor 11 (host system 10) via the PCI Express bus and the PCI Express connector 26. Then, the processor 21 executes processing according to the received command.

プロセッサ21は、バッテリ23によってバックアップされるメモリ22に接続される。メモリ22は、プロセッサ21による処理に用いられるワーク領域やディスクキャッシュに用いられるキャッシュ領域を含む揮発性メモリである。メモリ22には、バッテリ23を用いて停電時にも電力を供給することができる。そのため、メモリ22は、ライトバックモードによるキャッシュ動作に利用することができる。   The processor 21 is connected to a memory 22 that is backed up by a battery 23. The memory 22 is a volatile memory including a work area used for processing by the processor 21 and a cache area used for a disk cache. Electric power can be supplied to the memory 22 even during a power failure using the battery 23. Therefore, the memory 22 can be used for a cache operation in the write back mode.

すなわち、メモリ22は、プロセッサ11(ホストシステム10)による要求に応じて外部記憶装置30からリードされるリードデータ及び外部記憶装置30にライトされるライトデータが、一時的に格納されるキャッシュメモリとして用いられる。つまり、メモリ22は、外部記憶装置30(HDD32,33,34)に対する一次キャッシュとして機能する。ホストシステム10には、RAIDコントローラ20内のメモリ22を使用するためのインタフェースが提供される。ホストシステム10のキャッシュメモリ(一次キャッシュ)として機能するために、メモリ22は、キャッシュ管理情報221が格納される領域と一時的なキャッシュ領域222とを含む。つまり、キャッシュ管理情報221が格納される領域と一時的なキャッシュ領域222とは、ホストシステム10のメインメモリ13ではなく、RAIDコントローラ20のメモリ22内に配置される。メモリ22は、上述のようにバッテリ23によってバックアップされるため、停電時にもキャッシュ管理情報221及び一時的なキャッシュ領域222に格納されたデータを保持することができる。ホストシステム10のプロセッサ11は、キャッシュ管理情報221が格納される領域と一時的なキャッシュ領域222とを論理的にメインメモリ13の一部として使用することができるように、メモリ22をメインメモリ13に投影してもよい。   That is, the memory 22 is a cache memory in which read data read from the external storage device 30 and write data written to the external storage device 30 are temporarily stored in response to a request from the processor 11 (host system 10). Used. That is, the memory 22 functions as a primary cache for the external storage device 30 (HDD 32, 33, 34). The host system 10 is provided with an interface for using the memory 22 in the RAID controller 20. In order to function as a cache memory (primary cache) of the host system 10, the memory 22 includes an area for storing the cache management information 221 and a temporary cache area 222. That is, the area where the cache management information 221 is stored and the temporary cache area 222 are arranged not in the main memory 13 of the host system 10 but in the memory 22 of the RAID controller 20. Since the memory 22 is backed up by the battery 23 as described above, the cache management information 221 and the data stored in the temporary cache area 222 can be retained even during a power failure. The processor 11 of the host system 10 uses the memory 22 as the main memory 13 so that the area in which the cache management information 221 is stored and the temporary cache area 222 can be logically used as a part of the main memory 13. May be projected onto the screen.

ライトバックモードによるキャッシュ動作では、例えば、ホストシステム10によって発行される、データを外部記憶装置30に書き込むためのライト要求に応じて、このライト要求によって指定されたデータがメモリ22内のキャッシュ領域222に書き込まれる。そして、ホストシステム10に、データのライトが完了したことが通知される。また、キャッシュ領域222に書き込まれたデータは、所定のタイミングで外部記憶装置30に書き込まれる。ライトバックモードでは、データ(ライトデータ)がキャッシュ領域222に格納されたことに応答して、ホストシステム10にデータの書き込み完了が通知されるため、ホストシステム10に対して外部記憶装置30の見かけ上の書込み速度を向上させることができる。   In the cache operation in the write back mode, for example, in response to a write request issued by the host system 10 to write data to the external storage device 30, the data designated by the write request is transferred to the cache area 222 in the memory 22. Is written to. Then, the host system 10 is notified that the data writing has been completed. The data written in the cache area 222 is written into the external storage device 30 at a predetermined timing. In the write-back mode, in response to the data (write data) being stored in the cache area 222, the host system 10 is notified of the completion of the data writing, so the external storage device 30 appears to the host system 10. The above writing speed can be improved.

いままでシステムでライトバックモードを使った場合では、RAIDカード(RAIDコントローラ20)を用いないため、ホストシステム10内のメモリ13に外部記憶装置30に書き込むべき一次データ(ダーティデータと云う)が存在する。このため、停電等によって不意の電源断が発生した際には、そのダーティデータを外部記憶装置30に書き込むことができない。すなわち、揮発性メモリ13内に格納されたデータが揮発するために、外部記憶装置30に書き込むべきダーティデータが失われてしまう。また、データが格納された揮発性メモリ13のアドレス(領域)とデータが格納されるべき外部記憶装置30上のアドレス(領域)との対応を示す情報を含むキャッシュ管理情報も失われてしまう。   In the case where the write back mode has been used in the system so far, since the RAID card (RAID controller 20) is not used, primary data (referred to as dirty data) to be written to the external storage device 30 exists in the memory 13 in the host system 10. To do. For this reason, when an unexpected power failure occurs due to a power failure or the like, the dirty data cannot be written to the external storage device 30. That is, since the data stored in the volatile memory 13 is volatilized, dirty data to be written to the external storage device 30 is lost. In addition, cache management information including information indicating the correspondence between the address (area) of the volatile memory 13 in which data is stored and the address (area) in the external storage device 30 in which the data is stored is also lost.

このため、本実施形態では、RAIDカード内のメモリ22が、バッテリ23によってバックアップされていることに着目し、ホストシステム10のプロセッサ11がライト要求を受けたときのデータの一次キャッシュの保存先として、RAIDカード内のメモリ22を用いることにより、停電時にもメモリ22に格納されたデータを保持することができる。そのため、コンピュータ1が停電から復帰したとき、メモリ22に保持されたデータを用いて、ダーティデータを外部記憶装置30に書き込むことができる。   For this reason, in this embodiment, paying attention to the fact that the memory 22 in the RAID card is backed up by the battery 23, as the storage destination of the primary cache of data when the processor 11 of the host system 10 receives a write request. By using the memory 22 in the RAID card, the data stored in the memory 22 can be retained even during a power failure. Therefore, when the computer 1 recovers from a power failure, dirty data can be written to the external storage device 30 using the data held in the memory 22.

図2は、メインメモリ13にRAIDコントローラ20内に設けられたメモリ22が投影される例を示す。RAIDコントローラ20内に設けられたメモリ22は、RAIDコントローラ20(プロセッサ21)によって使用されるワーク領域と、ホストシステム10(プロセッサ11)によって使用されるキャッシュ管理情報221が格納される領域及び一時的なキャッシュ領域222とを含む。ワーク領域と、ホストシステム10によって使用されるキャッシュ管理情報221が格納される領域及び一時的なキャッシュ領域222とは、排他的に使用される。ホストシステム10によって使用されるキャッシュ管理情報221が格納される領域及び一時的なキャッシュ領域222は、例えばBIOSの設定等によってメインメモリ13上に投影することができる。これにより、ホストシステム10は、RAIDコントローラ20内のメモリ22をあたかもメインメモリ13の一部であるかのように使用することができる。   FIG. 2 shows an example in which the memory 22 provided in the RAID controller 20 is projected onto the main memory 13. The memory 22 provided in the RAID controller 20 includes a work area used by the RAID controller 20 (processor 21), an area for storing cache management information 221 used by the host system 10 (processor 11), and a temporary area. Cache area 222. The work area, the area for storing the cache management information 221 used by the host system 10 and the temporary cache area 222 are used exclusively. The area for storing the cache management information 221 used by the host system 10 and the temporary cache area 222 can be projected onto the main memory 13 by, for example, BIOS settings. Thereby, the host system 10 can use the memory 22 in the RAID controller 20 as if it is a part of the main memory 13.

また、RAIDコントローラ20内のバッテリ23は、メモリ22及びバッテリ回路24をバックアップする。つまり、メモリ22及びバッテリ回路24には、停電時にバッテリ23を用いて電力が供給される。バッテリ23には、例えばニッケル水素電池やリチウム二次電池等が用いられる。バッテリ23によるバックアップ時間は、例えば72時間である。   The battery 23 in the RAID controller 20 backs up the memory 22 and the battery circuit 24. That is, power is supplied to the memory 22 and the battery circuit 24 using the battery 23 at the time of a power failure. For the battery 23, for example, a nickel metal hydride battery or a lithium secondary battery is used. The backup time by the battery 23 is, for example, 72 hours.

バッテリ回路24は、停電が検出されたとき等の所定のタイミングでメモリ22に電力を供給する。具体的には、バッテリ回路24は、BBU(Battery Backup Unit)オプション25に基づいて、メモリ22への電力供給を制御する。BBUオプション25は、例えば、メモリ22に電力を供給するタイミングを規定するパラメータを含む。   The battery circuit 24 supplies power to the memory 22 at a predetermined timing such as when a power failure is detected. Specifically, the battery circuit 24 controls power supply to the memory 22 based on a BBU (Battery Backup Unit) option 25. The BBU option 25 includes, for example, a parameter that defines the timing for supplying power to the memory 22.

バッテリ回路24は、例えば、RAIDコントローラ20内に設けられたハードウェアによるフラグ(図示せず)を用いて、停電時におけるメモリ22への電力供給を制御する。このフラグは、メモリ22にデータが存在するときセットされ、コンピュータ1が正常終了するとき(例えば、シャットダウン処理が正常に完了したとき)リセットされる。停電が発生した際には、コンピュータ1が異常終了し、フラグがセットされたままになる。バッテリ回路24は、停電の発生が検出され、且つこのフラグがセットされているとき、バッテリ23を用いてメモリ22に電力を供給する。メモリ22を制御するメモリコントローラは、停電が検出されたことに応答して、例えば、メモリ22に対するリフレッシュ動作を行うセルフリフレッシュモードに設定される。メモリコントローラによるリフレッシュ動作によって、メモリ22内のデータを保持することができる。   The battery circuit 24 controls power supply to the memory 22 at the time of a power failure, for example, using a hardware flag (not shown) provided in the RAID controller 20. This flag is set when data exists in the memory 22 and is reset when the computer 1 is normally terminated (for example, when the shutdown process is normally completed). When a power failure occurs, the computer 1 ends abnormally and the flag remains set. The battery circuit 24 supplies power to the memory 22 using the battery 23 when the occurrence of a power failure is detected and this flag is set. In response to the detection of a power failure, the memory controller that controls the memory 22 is set to, for example, a self-refresh mode that performs a refresh operation on the memory 22. Data in the memory 22 can be held by a refresh operation by the memory controller.

外部記憶装置30は、上述のように、例えばSSD31と3台のHDD32,33,34とを含む。SSD31は、HDD32,33,34に対する二次キャッシュとして機能し、HDD32,33,34から読み出されるリードデータ及びHDD32,33,34に書き込むべきライトデータを一時的に格納する。SSD31は、キャッシュ領域31Aとキャッシュ管理情報31Bが格納される領域とを含む。つまり、SSD31の一部がキャッシュデバイスとして利用される。   As described above, the external storage device 30 includes, for example, the SSD 31 and the three HDDs 32, 33, and 34. The SSD 31 functions as a secondary cache for the HDDs 32, 33, 34 and temporarily stores read data read from the HDDs 32, 33, 34 and write data to be written to the HDDs 32, 33, 34. The SSD 31 includes a cache area 31A and an area for storing cache management information 31B. That is, a part of the SSD 31 is used as a cache device.

HDD32,33,34は、それぞれキャッシュ対応領域32A,33A,34Aを含む。つまり、HDD32,33,34はキャッシュ対象のデバイスであり、HDD32,33,34から読み出されるリードデータ及びHDD32,33,34に書き込むべきライトデータは、SSD31に設けられたキャッシュ領域31A(二次キャッシュ)やRAIDコントローラ20内のメモリ22に設けられた一時的なキャッシュ領域222(一次キャッシュ)に一時的に格納される。   The HDDs 32, 33, and 34 include cache corresponding areas 32A, 33A, and 34A, respectively. That is, the HDDs 32, 33, and 34 are cache target devices, and read data read from the HDDs 32, 33, and 34 and write data to be written to the HDDs 32, 33, and 34 are cache areas 31A (secondary caches) provided in the SSD 31. ) And a temporary cache area 222 (primary cache) provided in the memory 22 in the RAID controller 20.

SSD31は、一般に、SDRAM等の半導体メモリよりも大容量であり、HDD32,33,34よりも高速にアクセスすることができる。そのため、SSD31を、HDD32,33,34に対する二次キャッシュとして用いることにより、半導体メモリよりもキャッシュミスが少なく、HDD32,33,34よりも高速にアクセス可能なキャッシュ制御を実現することができる。   The SSD 31 generally has a larger capacity than a semiconductor memory such as an SDRAM, and can be accessed at a higher speed than the HDDs 32, 33, and 34. Therefore, by using the SSD 31 as a secondary cache for the HDDs 32, 33, and 34, cache control with fewer cache misses than the semiconductor memory and accessible at a higher speed than the HDDs 32, 33, and 34 can be realized.

ホストシステム10のプロセッサ11が、RAIDコントローラ20内のメモリ22を一次キャッシュとして使用し、SSD31を二次キャッシュとして使用するためのキャッシュ制御は、例えば、ソフトウェアによって行われる。図3は、コンピュータ1のソフトウェア構成の例を示す。コンピュータ1は、ユーザ空間40及びカーネル空間50に属する階層化されたソフトウェア群を用いて、下位層(物理層)に属するハードウェア60の動作を制御する。図3に示すように、ユーザ空間40は、例えば、アプリケーションプログラム41、GUI42、サービス43、キャッシュAPI44等を含む。カーネル空間50は、例えば、OS51、ファイルシステム52、ディスククラスドライバ53、キャッシュドライバ(フィルタ)54、ストレージドライバ55、iSCSI56、TCP/IP57を含む。   Cache control for the processor 11 of the host system 10 to use the memory 22 in the RAID controller 20 as a primary cache and the SSD 31 as a secondary cache is performed by software, for example. FIG. 3 shows an example of the software configuration of the computer 1. The computer 1 controls the operation of the hardware 60 belonging to the lower layer (physical layer) using a layered software group belonging to the user space 40 and the kernel space 50. As shown in FIG. 3, the user space 40 includes, for example, an application program 41, a GUI 42, a service 43, a cache API 44, and the like. The kernel space 50 includes, for example, an OS 51, a file system 52, a disk class driver 53, a cache driver (filter) 54, a storage driver 55, an iSCSI 56, and a TCP / IP 57.

キャッシュドライバ54は、図3の階層に示すように、OS51によって発行される、データをHDD32,33,34に書き込むためのライトコマンド、及びデータをHDD32,33,34から読み出すためのリードコマンドを、それらコマンドがRAIDコントローラ20(すなわち、ハードウェア60)に出力されるよりも前に受信する。そして、キャッシュドライバ54は、メモリ22(一次キャッシュ)及びSSD31(二次キャッシュ)を用いて、受信したコマンドに応じた処理を実行する。なお、図3に示すように、コンピュータ1内に設けられるHDD32,33,34ではなく、ネットワーク65を介して接続されたHDD(iSCSIターゲット)66をキャッシュ対象のデバイスとしてもよい。   As shown in the hierarchy of FIG. 3, the cache driver 54 issues a write command issued by the OS 51 for writing data to the HDDs 32, 33, 34 and a read command for reading data from the HDDs 32, 33, 34. These commands are received before being output to the RAID controller 20 (ie, hardware 60). Then, the cache driver 54 uses the memory 22 (primary cache) and the SSD 31 (secondary cache) to execute processing according to the received command. As shown in FIG. 3, instead of the HDDs 32, 33, and 34 provided in the computer 1, an HDD (iSCSI target) 66 connected via the network 65 may be used as a cache target device.

図4は、キャッシュドライバプログラム54の構成の例を示す。キャッシュドライバ54は、メモリ22をホストシステム10の一次キャッシュとして使用し、SSD31をホストシステム10の二次キャッシュとして使用するための制御を行う。キャッシュドライバ54は、初期化部71、キャッシュ制御部72及び終了処理部73を備える。   FIG. 4 shows an example of the configuration of the cache driver program 54. The cache driver 54 performs control for using the memory 22 as a primary cache of the host system 10 and using the SSD 31 as a secondary cache of the host system 10. The cache driver 54 includes an initialization unit 71, a cache control unit 72, and an end processing unit 73.

初期化部71は、コンピュータ1(ホストシステム10)が起動されたことに応答して、キャッシュ管理情報221が格納される領域と一時的なキャッシュ領域222とに対応する部分に対して初期化処理を施す。通常、メモリ22は、コンピュータ1の電源がオンになったとき、RAIDコントローラ20によって、初期化のためのクリア処理が施される。しかし、コンピュータ1が停電等によって異常終了した後に起動された際には、メモリ22に、キャッシュ管理情報221と一時的なキャッシュ領域222内のデータとが保持されている可能性がある。これらデータが消去されないように、RAIDコントローラ20は、例えば、RAIDコントローラ20のワーク領域部分に対してはデータをクリアするためのクリア処理を行い、キャッシュ管理情報221が格納される領域と一時的なキャッシュ領域222とに対応する部分に対してはパリティビットを用いた整合性のチェックを行うスクラビング処理を実行するように設定される。初期化部71は、RAIDコントローラ20によって上述の処理(クリア処理及びスクラビング処理)が施されたメモリ22に対して初期化処理を施す。   In response to the activation of the computer 1 (host system 10), the initialization unit 71 initializes a portion corresponding to the area where the cache management information 221 is stored and the temporary cache area 222. Apply. Normally, when the computer 1 is turned on, the memory 22 is cleared by the RAID controller 20 for initialization. However, when the computer 1 is started after abnormal termination due to a power failure or the like, the memory 22 may hold the cache management information 221 and the data in the temporary cache area 222. In order to prevent these data from being erased, for example, the RAID controller 20 performs a clear process for clearing data on the work area portion of the RAID controller 20 to temporarily store the cache management information 221 and the area where the cache management information 221 is stored. A part corresponding to the cache area 222 is set to execute a scrubbing process for checking consistency using a parity bit. The initialization unit 71 performs initialization processing on the memory 22 that has been subjected to the above-described processing (clear processing and scrubbing processing) by the RAID controller 20.

初期化部71は、停電判定部711、第1初期化部712及び第2初期化部713を備える。
停電判定部711は、コンピュータ1が前回終了したとき、正常終了したか異常終了したかを判定する。メモリ22に格納されたキャッシュ管理情報221のヘッダ情報は、コンピュータ1が正常終了するとき(例えば、シャットダウン処理が正常に完了したとき)、クリアされる。このヘッダ情報の有無をフラグとして利用して、停電判定部711は、例えば、メモリ22内の所定の位置にキャッシュ管理情報221のヘッダ情報が存在しないとき、コンピュータ1が前回正常終了したものと判定する。また、停電判定部711は、例えば、メモリ22内の所定の位置にキャッシュ管理情報221のヘッダ情報が存在するとき、コンピュータ1が前回異常終了したものと判定する。
The initialization unit 71 includes a power failure determination unit 711, a first initialization unit 712, and a second initialization unit 713.
The power failure determination unit 711 determines whether the computer 1 ended normally or abnormally when the computer 1 ended last time. The header information of the cache management information 221 stored in the memory 22 is cleared when the computer 1 is normally terminated (for example, when the shutdown process is normally completed). Using the presence / absence of the header information as a flag, the power failure determination unit 711 determines that the computer 1 ended normally last time, for example, when the header information of the cache management information 221 does not exist at a predetermined position in the memory 22. To do. For example, when the header information of the cache management information 221 exists at a predetermined position in the memory 22, the power failure determination unit 711 determines that the computer 1 ended abnormally last time.

なお、停電判定部711による正常終了又は異常終了の判定のためのフラグ(異常終了フラグ)を設けてもよい。その場合、例えば、コンピュータ1が正常終了した後に起動されたとき、コンピュータ1が異常終了したことを示す異常終了フラグがセットされ、コンピュータ1が正常終了されるとき、その異常終了フラグがリセットされる。したがって、次回の起動時に異常終了フラグがセットされたままであるとき、停電判定部711は、コンピュータ1が前回異常終了したものと判定する。   In addition, you may provide the flag (abnormal end flag) for the determination of the normal end or abnormal end by the power failure determination part 711. FIG. In that case, for example, when the computer 1 is started after the normal termination, an abnormal termination flag indicating that the computer 1 terminated abnormally is set, and when the computer 1 is terminated normally, the abnormal termination flag is reset. . Therefore, when the abnormal end flag remains set at the next startup, the power failure determination unit 711 determines that the computer 1 has ended abnormally last time.

停電判定部711は、コンピュータ1が前回正常終了したと判定したとき、第1初期化部712に処理の開始を要求する。第1初期化部712は、停電判定部711による要求に応答して、メモリ22を初期化する処理を開始する。具体的には、第1初期化部712は、メモリ22内にキャッシュ管理情報221を構築することにより、例えばアドレステーブル221A及びコマンドテーブル221B等を作成する。第1初期化部712は、作成されたアドレステーブル221Aに、SSD31に格納されたキャッシュ管理情報31Bをロードする。   The power failure determination unit 711 requests the first initialization unit 712 to start processing when it is determined that the computer 1 ended normally last time. The first initialization unit 712 starts a process for initializing the memory 22 in response to the request from the power failure determination unit 711. Specifically, the first initialization unit 712 creates, for example, an address table 221A and a command table 221B by building cache management information 221 in the memory 22. The first initialization unit 712 loads the cache management information 31B stored in the SSD 31 into the created address table 221A.

図5は、アドレステーブル221Aの一構成例を示す。キャッシュ管理情報221は、一時的なキャッシュ領域222又はキャッシュ領域31Aに格納されるデータに対応するエントリを含む。一時的なキャッシュ領域222又はキャッシュ領域31Aに格納されるデータは、例えば、HDD32,33,34からのリードデータ又はHDD32,33,34へのライトデータに対応するデータである。各エントリは、例えば、キャッシュ領域情報、HDD内の領域情報、及びHDD書き込みフラグを含む。あるデータに対応するエントリにおいて、キャッシュ領域情報は、そのデータが格納されているメモリ22上の領域(例えば、アドレスで示される範囲)を示す。HDD内の領域情報は、そのデータが格納されている(又は格納されるべき)HDD32,33,34上の領域を示す。HDD書き込みフラグ(ダーティフラグ)は、そのデータがHDD32,33,34に書き込まれたか否かを示す。例えば、そのデータがHDD32,33,34に既に書き込まれている場合、HDD書き込みフラグには、書き込み済みであることを示す値が設定される(すなわち、ダーティフラグがセットされない)。また、例えば、そのデータがHDD32,33,34にまだ書き込まれていない場合、HDD書き込みフラグには、未書き込みであることを示す値が設定される(すなわち、ダーティフラグがセットされる)。換言すると、HDD書き込みフラグは、そのデータがダーティデータ(HDD32,33,34にまだ書き込まれていないデータ)であるかどうかを示す。なお、一時的なキャッシュ領域222に格納されたデータに対応するエントリと、キャッシュ領域31Aに格納されたデータに対応するエントリとは別のテーブル(ディレクトリ)内に記載されてもよい。すなわち、キャッシュ管理情報221は、例えば、一時的なキャッシュ領域222に格納されたデータに対応するエントリを含むディレクトリ(一次キャッシュのディレクトリとも云う)と、キャッシュ領域31Aに格納されたデータに対応するエントリを含むディレクトリ(二次キャッシュのディレクトリとも云う)を含む。   FIG. 5 shows a configuration example of the address table 221A. The cache management information 221 includes an entry corresponding to data stored in the temporary cache area 222 or the cache area 31A. The data stored in the temporary cache area 222 or the cache area 31A is, for example, data corresponding to read data from the HDDs 32, 33, 34 or write data to the HDDs 32, 33, 34. Each entry includes, for example, cache area information, area information in the HDD, and an HDD write flag. In an entry corresponding to certain data, the cache area information indicates an area on the memory 22 where the data is stored (for example, a range indicated by an address). The area information in the HDD indicates an area on the HDD 32, 33, 34 in which the data is stored (or should be stored). The HDD write flag (dirty flag) indicates whether or not the data has been written to the HDDs 32, 33 and 34. For example, when the data has already been written in the HDDs 32, 33, 34, a value indicating that the data has been written is set in the HDD write flag (that is, the dirty flag is not set). For example, when the data has not been written to the HDDs 32, 33, 34, the HDD write flag is set to a value indicating that the data has not been written (that is, the dirty flag is set). In other words, the HDD write flag indicates whether or not the data is dirty data (data that has not yet been written to the HDDs 32, 33, and 34). The entry corresponding to the data stored in the temporary cache area 222 and the entry corresponding to the data stored in the cache area 31A may be described in different tables (directories). That is, the cache management information 221 includes, for example, a directory including an entry corresponding to data stored in the temporary cache area 222 (also referred to as a primary cache directory) and an entry corresponding to data stored in the cache area 31A. Directory (also referred to as a secondary cache directory).

停電判定部711は、コンピュータ1が前回異常終了したと判定したとき、第2初期化部713に処理の開始を要求する。第2初期化部713は、停電判定部711による要求に応答して、メモリ22に格納されたキャッシュ管理情報221(アドレステーブル221A)に基づいて、一時的なキャッシュ領域222に格納されているダーティデータをHDD32,33,34又はSSD31に書き込む。具体的には、第2初期化部713は、アドレステーブル221Aに含まれる複数のエントリから、HDD書込みフラグがセットされていない(すなわち、対応するデータがダーティデータである)エントリを検出する。そして、第2初期化部713は、検出したエントリに含まれるキャッシュ領域情報に基づいて、一時的なキャッシュ領域222からデータ(ダーティデータ)を読み出し、該エントリに含まれるHDD内の領域情報に基づいて、HDD32,33,34に読み出したデータを書き込む。なお、第2初期化部713は、読み出したダーティデータをキャッシュ領域31A(SSD31)内の対応する領域や空き領域に書き込んでもよい。第2初期化部713は、該エントリのHDD書込みフラグに、データがHDD32,33,34に書込み済みであることを示す値を設定する。   When the power failure determination unit 711 determines that the computer 1 ended abnormally last time, the power failure determination unit 711 requests the second initialization unit 713 to start processing. The second initialization unit 713 responds to the request from the power failure determination unit 711 and based on the cache management information 221 (address table 221A) stored in the memory 22, the dirty stored in the temporary cache area 222. Data is written to the HDD 32, 33, 34 or SSD 31. Specifically, the second initialization unit 713 detects an entry for which the HDD write flag is not set (that is, corresponding data is dirty data) from a plurality of entries included in the address table 221A. Then, the second initialization unit 713 reads data (dirty data) from the temporary cache area 222 based on the cache area information included in the detected entry, and based on the area information in the HDD included in the entry. Thus, the read data is written in the HDDs 32, 33, 34. The second initialization unit 713 may write the read dirty data in a corresponding area or a free area in the cache area 31A (SSD 31). The second initialization unit 713 sets a value indicating that data has been written to the HDDs 32, 33, and 34 in the HDD write flag of the entry.

なお、第2初期化部713は、コマンドテーブル221Bに基づいて、一時的なキャッシュ領域222に格納されているダーティデータをHDD32,33,34又はSSD31に書き込んでもよい。コマンドテーブル221Bは、例えば、複数のコマンドに対応する複数のエントリを含む。あるコマンドに対応するエントリは、例えば、そのコマンドの種類と完了フラグを含む。コマンドの種類は、リードコマンド、ライトコマンド等の種類を示す。また、その読み出し先又は書込み先が示されてもよい。完了フラグは、そのコマンドの実行が完了したか否かを示す。   Note that the second initialization unit 713 may write the dirty data stored in the temporary cache area 222 to the HDDs 32, 33, 34 or the SSD 31 based on the command table 221B. The command table 221B includes, for example, a plurality of entries corresponding to a plurality of commands. An entry corresponding to a certain command includes, for example, the type of the command and a completion flag. The command type indicates a read command, a write command, or the like. Further, the read destination or the write destination may be indicated. The completion flag indicates whether or not the execution of the command is completed.

コマンドテーブル221Bを用いる際には、第2初期化部713は、完了フラグに基づいて、コマンドテーブル221B内に実行が完了していない(すなわち、実行中の)コマンドがあるか否かを判定する。実行が完了していないコマンドがあるとき、第2初期化部713は、そのコマンドがライトコマンドであるか否かを判定する。そして、そのコマンドがライトコマンドであるとき、第2初期化部713は、該コマンドに対応する、一時的なキャッシュ領域222に格納されたデータをHDD32,33,34(又はSSD31)に書き込む。そして、第2初期化部713は、そのコマンドに対応するエントリに含まれる完了フラグに、実行が完了したことを示す値を設定する。また、第2初期化部713は、コマンドの実行によってHDD32,33,34に書き込まれたデータに対応する、アドレステーブル221A内のエントリに含まれるHDD書込みフラグに、ダーティデータでないことを示す値を設定する。コマンドがリードコマンドであるとき、第2初期化部713は、当該コマンドに対応するエントリをコマンドテーブル221Bからクリアする。実行が完了していない全てのコマンドに対して、上述の処理を施すことにより、停電が発生した際にも、一次キャッシュ(メモリ22)に格納されたダーティデータを失わずに、HDD32,33,34に書き込むことができる。   When using the command table 221B, the second initialization unit 713 determines whether there is a command that has not been executed (ie, is being executed) in the command table 221B based on the completion flag. . When there is a command that has not been executed, the second initialization unit 713 determines whether or not the command is a write command. When the command is a write command, the second initialization unit 713 writes the data stored in the temporary cache area 222 corresponding to the command to the HDDs 32, 33, and 34 (or the SSD 31). Then, the second initialization unit 713 sets a value indicating that the execution has been completed in the completion flag included in the entry corresponding to the command. The second initialization unit 713 also sets a value indicating that the data is not dirty data to the HDD write flag included in the entry in the address table 221A corresponding to the data written to the HDDs 32, 33, and 34 by execution of the command. Set. When the command is a read command, the second initialization unit 713 clears the entry corresponding to the command from the command table 221B. By performing the above-described processing for all commands that have not been executed, the HDD 32, 33, and HDD 32, 33, without losing dirty data stored in the primary cache (memory 22) even when a power failure occurs. 34 can be written.

上述の初期化処理が完了した後、キャッシュ制御部72による処理が開始される。
キャッシュ制御部72は、第1初期化部712又は第2初期化部713によって初期化されたメモリ22を用いて、キャッシュ動作を制御する。キャッシュ制御部72は、リード制御部722、キャッシュリード部722A、SSDリード部722B、HDDリード部722C、ライト制御部723、キャッシュライト部723A、SSDライト部723B、HDDライト部723C、リード完了通知部724、及びライト完了通知部725を備える。
After the initialization process described above is completed, the process by the cache control unit 72 is started.
The cache control unit 72 controls the cache operation using the memory 22 initialized by the first initialization unit 712 or the second initialization unit 713. The cache control unit 72 includes a read control unit 722, a cache read unit 722A, an SSD read unit 722B, an HDD read unit 722C, a write control unit 723, a cache write unit 723A, an SSD write unit 723B, an HDD write unit 723C, and a read completion notification unit. 724 and a write completion notification unit 725.

コマンド受信部721は、OS51(ホストシステム10)によって発行された、HDD32,33,34(キャッシュ対応領域32A,33A,34A)からデータを読み出すためのリードコマンド、及びHDD32,33,34にデータを書き込むためのライトコマンドを受信する。コマンド受信部721は、受信したリードコマンドをリード制御部722に出力する。また、コマンド受信部721は、受信したライトコマンドをライト制御部723に出力する。   The command receiving unit 721 issues a read command issued by the OS 51 (host system 10) to read data from the HDDs 32, 33, and 34 (cache corresponding areas 32A, 33A, and 34A), and data to the HDDs 32, 33, and 34. Receives a write command for writing. The command receiving unit 721 outputs the received read command to the read control unit 722. In addition, the command receiving unit 721 outputs the received write command to the write control unit 723.

リード制御部722は、コマンド受信部721によって出力されたリードコマンドに指定されたデータを読み出す処理を制御する。具体的には、まず、リード制御部722は、キャッシュ管理情報221を用いて、リードコマンドによって指定されたデータに対応するデータが一時的なキャッシュ領域222に格納されているか否かを判定する。データが一時的なキャッシュ領域222に格納されている場合、リード制御部722は、キャッシュリード部722Aに一時的なキャッシュ領域222から当該データを読み出すことを要求する。キャッシュリード部722Aは、リード制御部722による要求に応答して、一時的なキャッシュ領域222から当該データを読み出す。読み出されたデータは、例えばメインメモリ13に格納される。そして、キャッシュリード部722Aは、リードコマンドによって指定されたデータが読み出されたことをリード完了通知部724に通知する。リード完了通知部724は、OS51(ホストシステム10)にリードコマンドの実行が完了したことを通知する。なお、リード制御部722は、キャッシュリード部722Aにデータの読み出しを要求する代わりに、メモリ22に対して、一時的なキャッシュ領域222から当該データを読み出すためのリードコマンドを発行(組み替え発行)してもよい。   The read control unit 722 controls processing for reading data specified in the read command output by the command receiving unit 721. Specifically, first, the read control unit 722 uses the cache management information 221 to determine whether data corresponding to the data specified by the read command is stored in the temporary cache area 222. When the data is stored in the temporary cache area 222, the read control unit 722 requests the cache read unit 722A to read the data from the temporary cache area 222. The cache read unit 722A reads the data from the temporary cache area 222 in response to a request from the read control unit 722. The read data is stored in the main memory 13, for example. Then, the cache read unit 722A notifies the read completion notification unit 724 that the data specified by the read command has been read. The read completion notification unit 724 notifies the OS 51 (host system 10) that the execution of the read command has been completed. Note that the read control unit 722 issues a read command for reading the data from the temporary cache area 222 to the memory 22 instead of requesting the cache read unit 722A to read the data (recombination issue). May be.

データが一時的なキャッシュ領域222に格納されていない場合、リード制御部722は、キャッシュ管理情報221を用いて、リードコマンドによって指定されたデータに対応するデータがSSD31内のキャッシュ領域31Aに格納されているか否かを判定する。リードコマンドによって指定されたデータに対応するデータがキャッシュ領域31Aに格納されている場合、リード制御部722は、SSDリード部722Bにキャッシュ領域31Aから当該データを読み出すことを要求する。SSDリード部722Bは、リード制御部722による要求に応答して、キャッシュ領域31Aから当該データを読み出す。読み出されたデータは、例えばメインメモリ13に格納される。そして、SSDリード部722Bは、リードコマンドによって指定されたデータが読み出されたことをリード完了通知部724に通知する。リード完了通知部724は、OS51(ホストシステム10)にリードコマンドの実行が完了したことを通知する。また、SSDリード部722Bは、読み出したデータを一時的なキャッシュ領域222に書き込んでもよい。その場合、SSDリード部722Bは、データが書き込まれたメモリ22内の領域を示す情報(キャッシュ領域情報)と、データが読み出された(SSD31内の領域に対応する)HDD32,33,34内の領域を示す情報(HDD内の領域情報)とを含むエントリをキャッシュ管理情報221に追加する。なお、リード制御部722は、SSDリード部722Bにデータの読み出しを要求する代わりに、SSD31に対して、SSD31内のキャッシュ領域31Aから当該データを読み出すためのリードコマンドを発行してもよい。   When the data is not stored in the temporary cache area 222, the read control unit 722 uses the cache management information 221 to store the data corresponding to the data specified by the read command in the cache area 31A in the SSD 31. It is determined whether or not. When data corresponding to the data specified by the read command is stored in the cache area 31A, the read control unit 722 requests the SSD read unit 722B to read the data from the cache area 31A. In response to the request from the read control unit 722, the SSD read unit 722B reads the data from the cache area 31A. The read data is stored in the main memory 13, for example. Then, the SSD read unit 722B notifies the read completion notification unit 724 that the data specified by the read command has been read. The read completion notification unit 724 notifies the OS 51 (host system 10) that the execution of the read command has been completed. The SSD read unit 722B may write the read data in the temporary cache area 222. In that case, the SSD read unit 722B includes information (cache area information) indicating an area in the memory 22 in which data is written, and in the HDDs 32, 33, and 34 from which data is read (corresponding to the area in the SSD 31). An entry including information indicating the area (area information in the HDD) is added to the cache management information 221. Instead of requesting the SSD read unit 722B to read data, the read control unit 722 may issue a read command for reading the data from the cache area 31A in the SSD 31 to the SSD 31.

また、データがメモリ22内の一時的なキャッシュ領域222とSSD31内のキャッシュ領域31Aのいずれにも格納されていない場合、リード制御部722は、HDDリード部722CにHDD32,33,34から当該データを読み出すことを要求する。HDDリード部722Cは、リード制御部722による要求に応答して、HDD32,33,34から当該データを読み出す。読み出されたデータは、例えばメインメモリ13に格納される。そして、HDDリード部722Cは、リードコマンドによって指定されたデータが読み出されたことをリード完了通知部724に通知する。リード完了通知部724は、OS51(ホストシステム10)にリードコマンドの実行が完了したことを通知する。また、HDDリード部722Cは、読み出したデータを一時的なキャッシュ領域222及びキャッシュ領域31Aに書き込んでもよい。その場合、HDDリード部722Cは、データが書き込まれたメモリ22内の領域を示す情報(キャッシュ領域情報)と、データが読み出されたHDD32,33,34内の領域を示す情報(HDD内の領域情報)とを含むエントリをキャッシュ管理情報221に追加する。また、HDDリード部722Cは、データが書き込まれたSSD31内の領域を示す情報(キャッシュ領域情報)と、データが読み出されたHDD32,33,34内の領域を示す情報(HDD内の領域情報)とを含むエントリをキャッシュ管理情報221に追加する。なお、リード制御部722は、HDDリード部722Cにデータのリードを要求する代わりに、HDD32,33,34に対して、HDD32,33,34から当該データを読み出すためのリードコマンドを発行してもよい。   If the data is not stored in either the temporary cache area 222 in the memory 22 or the cache area 31A in the SSD 31, the read control unit 722 sends the data from the HDDs 32, 33, and 34 to the HDD read unit 722C. Is requested to be read. The HDD read unit 722C reads the data from the HDDs 32, 33, and 34 in response to the request from the read control unit 722. The read data is stored in the main memory 13, for example. Then, the HDD read unit 722C notifies the read completion notification unit 724 that the data specified by the read command has been read. The read completion notification unit 724 notifies the OS 51 (host system 10) that the execution of the read command has been completed. Further, the HDD read unit 722C may write the read data into the temporary cache area 222 and the cache area 31A. In this case, the HDD read unit 722C has information (cache area information) indicating an area in the memory 22 in which data is written, and information (area in the HDD) indicating areas in the HDDs 32, 33, and 34 from which the data is read. An entry including (region information) is added to the cache management information 221. Also, the HDD read unit 722C has information (cache area information) indicating an area in the SSD 31 in which data is written and information (area information in the HDD) indicating areas in the HDDs 32, 33, and 34 from which the data has been read. ) Is added to the cache management information 221. The read control unit 722 may issue a read command for reading the data from the HDDs 32, 33, 34 to the HDDs 32, 33, 34 instead of requesting the HDD read unit 722 C to read the data. Good.

ライト制御部723は、コマンド受信部721によって出力されたライトコマンドに指定されたデータを書き込む処理を制御する。具体的には、まず、ライト制御部723は、キャッシュライト部723Aにライトコマンドによって指定されたデータを一時的なキャッシュ領域222に書き込むことを要求する。キャッシュライト部723Aは、ライト制御部723による要求に応答して、一時的なキャッシュ領域222に当該データを書き込む。キャッシュライト部723Aは、データが書き込まれたメモリ22内の領域を示す情報(キャッシュ領域情報)と、データが書き込まれるべきHDD32,33,34内の領域を示す情報(HDD内の領域情報)とを含むエントリをキャッシュ管理情報221に追加する。追加されるエントリでは、HDD書込みフラグに、データがHDD32,33,34にまだ書き込まれていないことを示す値が設定される。そして、キャッシュライト部723Aは、ライトコマンドによって指定されたデータが書き込まれたことをライト完了通知部725に通知する。ライト完了通知部725は、OS51(ホストシステム10)にライトコマンドの実行が完了したことを通知する。なお、ライト制御部723は、キャッシュライト部723Aにデータの書込みを要求する代わりに、メモリ22に対して、一時的なキャッシュ領域222に当該データを書き込むためのライトコマンドを発行(組み替え発行)してもよい。   The write control unit 723 controls processing for writing data designated in the write command output by the command receiving unit 721. Specifically, first, the write control unit 723 requests the cache write unit 723A to write the data specified by the write command in the temporary cache area 222. In response to the request from the write control unit 723, the cache write unit 723A writes the data in the temporary cache area 222. The cache write unit 723A includes information (cache area information) indicating an area in the memory 22 in which data is written, information (area information in the HDD) indicating areas in the HDDs 32, 33, and 34 where the data is to be written. Is added to the cache management information 221. In the entry to be added, a value indicating that data has not been written to the HDDs 32, 33, 34 is set in the HDD write flag. Then, the cache write unit 723A notifies the write completion notification unit 725 that the data designated by the write command has been written. The write completion notification unit 725 notifies the OS 51 (host system 10) that the execution of the write command has been completed. Note that the write control unit 723 issues a write command for writing the data to the temporary cache area 222 to the memory 22 instead of requesting the cache write unit 723A to write the data (recombination issue). May be.

次いで、ライト制御部723は、所定のタイミングで(例えば、一定期間毎に)、一時的なキャッシュ領域222に格納されたダーティデータを書き込むことができる領域が、キャッシュ領域31A(SSD31)内にあるかどうかを判定する。具体的には、ライト制御部723は、キャッシュ管理情報221を用いて、SSD31内のキャッシュ領域31Aに格納されたデータに対応する複数のエントリの中に、一時的なキャッシュ領域222に格納されたダーティデータに対応するエントリと、HDD32,33,34内の領域情報が一致するエントリがあるかどうかを判定する。HDD32,33,34内の領域情報が一致するエントリがあるとき、ライト制御部723は、一時的なキャッシュ領域222に格納されたダーティデータを、対応するSSD31内のキャッシュ領域31Aに書き込むことを、SSDライト部723Bに要求する。SSDライト部723Bは、対応するSSD31内のキャッシュ領域31Aに、一時的なキャッシュ領域222に格納されたダーティデータを書き込む。そして、SSDライト部723Bは、そのデータが格納されている一時的なキャッシュ領域222に対応するエントリ(第1エントリと云う)と、そのデータが書き込まれたSSD31内のキャッシュ領域31Aに対応するエントリ(第2エントリと云う)とを更新する。すなわち、SSDライト部723Bは、第1エントリのHDD書込みフラグにダーティデータでないことを示す値を設定し、第2エントリのHDD書込みフラグにダーティデータであることを示す値を設定する。   Next, the write control unit 723 has an area in the cache area 31 </ b> A (SSD 31) where the dirty data stored in the temporary cache area 222 can be written at a predetermined timing (for example, at regular intervals). Determine whether or not. Specifically, the write control unit 723 is stored in the temporary cache area 222 in the plurality of entries corresponding to the data stored in the cache area 31 </ b> A in the SSD 31 using the cache management information 221. It is determined whether there is an entry in which the entry corresponding to the dirty data matches the area information in the HDD 32, 33, 34. When there is an entry in which the area information in the HDDs 32, 33, and 34 match, the write control unit 723 writes the dirty data stored in the temporary cache area 222 to the cache area 31 A in the corresponding SSD 31. Requests to the SSD write unit 723B. The SSD write unit 723B writes the dirty data stored in the temporary cache area 222 to the cache area 31A in the corresponding SSD 31. The SSD write unit 723B then enters an entry corresponding to the temporary cache area 222 in which the data is stored (referred to as a first entry) and an entry corresponding to the cache area 31A in the SSD 31 in which the data is written. (Referred to as the second entry). That is, the SSD write unit 723B sets a value indicating that it is not dirty data in the HDD write flag of the first entry, and sets a value indicating that it is dirty data in the HDD write flag of the second entry.

また、HDD32,33,34内の領域情報が一致するエントリがないとき、ライト制御部723は、SSD31内のキャッシュ領域31Aに、一時的なキャッシュ領域222に格納されたダーティデータを書き込むことができる空き領域があるかどうかを判定する。ダーティデータを書き込むことができる空き領域があるとき、ライト制御部723は、一時的なキャッシュ領域222に格納されたダーティデータをキャッシュ領域31A内の空き領域に書き込むことを、SSDライト部723Bに要求する。そして、SSDライト部723Bは、SSD31のキャッシュ領域31A内の空き領域に、一時的なキャッシュ領域222に格納されたダーティデータを書き込む。そして、SSDライト部723Bは、そのデータが格納されている一時的なキャッシュ領域222に対応するエントリ(第1エントリ)と、そのデータが書き込まれたSSD31内のキャッシュ領域31Aに対応するエントリ(第2エントリ)とを更新する。すなわち、SSDライト部723Bは、第1エントリのHDD書込みフラグにダーティデータでないことを示す値を設定する。また、SSDライト部723Bは、このデータが書き込まれたSSD31内の領域を示す情報、このデータが書き込まれるHDD32,33,34内の領域を示す情報、及びダーティデータであることを示すHDD書込みフラグを含むエントリをキャッシュ管理情報221に追加する。なお、ライト制御部723は、SSDライト部723Bにデータの書込みを要求する代わりに、SSD31に対して、キャッシュ領域31Aに当該データを書き込むためのライトコマンドを発行(組み替え発行)してもよい。   In addition, when there is no entry in which the area information in the HDDs 32, 33, and 34 matches, the write control unit 723 can write the dirty data stored in the temporary cache area 222 to the cache area 31 </ b> A in the SSD 31. Determine if there is free space. When there is an empty area where dirty data can be written, the write control unit 723 requests the SSD write unit 723B to write the dirty data stored in the temporary cache area 222 to the empty area in the cache area 31A. To do. Then, the SSD write unit 723B writes the dirty data stored in the temporary cache area 222 to a free area in the cache area 31A of the SSD 31. The SSD write unit 723B then enters an entry (first entry) corresponding to the temporary cache area 222 in which the data is stored and an entry (first entry) corresponding to the cache area 31A in the SSD 31 in which the data is written. 2 entries). That is, the SSD write unit 723B sets a value indicating that it is not dirty data in the HDD write flag of the first entry. In addition, the SSD write unit 723B includes information indicating an area in the SSD 31 in which the data is written, information indicating areas in the HDDs 32, 33, and 34 in which the data is written, and an HDD write flag indicating that the data is dirty data. Is added to the cache management information 221. Note that the write control unit 723 may issue a write command (recombination issue) for writing the data to the cache area 31 </ b> A to the SSD 31 instead of requesting the SSD write unit 723 </ b> B to write the data.

さらに、キャッシュ領域31A内にダーティデータを書き込むことができる空き領域がないとき、ライト制御部723は、一時的なキャッシュ領域222に格納されたダーティデータを、対応するHDD32,33,34内の領域に書き込むことを、HDDライト部723Cに要求する。HDDライト部723Cは、キャッシュ管理情報221に基づいて、一時的なキャッシュ領域222に格納されたダーティデータを、対応するHDD32,33,34内の領域に書き込む。そして、HDDライト部723Cは、このデータに対応するエントリのHDD書込みフラグに、データがダーティデータでないことを示す値を設定する。なお、ライト制御部723は、HDDライト部723Cにデータの書込みを要求する代わりに、HDD32,33,34に対して、キャッシュ対応領域32A,33A,34Aに当該データを書き込むためのライトコマンドを発行(組み替え発行)してもよい。   Further, when there is no free area in the cache area 31A where dirty data can be written, the write control unit 723 uses the dirty data stored in the temporary cache area 222 as the area in the corresponding HDD 32, 33, 34. To the HDD write unit 723C. The HDD write unit 723C writes the dirty data stored in the temporary cache area 222 to the areas in the corresponding HDDs 32, 33, and 34 based on the cache management information 221. Then, the HDD write unit 723C sets a value indicating that the data is not dirty data in the HDD write flag of the entry corresponding to this data. The write control unit 723 issues a write command for writing the data to the cache corresponding areas 32A, 33A, and 34A to the HDDs 32, 33, and 34 instead of requesting the HDD write unit 723C to write the data. (Recombination issue) may be performed.

終了処理部73は、コンピュータ1がシャットダウン(正常終了)されるとき、キャッシュ管理情報221に基づいて、一時的なキャッシュ領域222に格納されているダーティデータをHDD32,33,34に書き込む。また、終了処理部73は、メモリ22に格納されたキャッシュ管理情報221を用いて、SSD31に格納されたキャッシュ管理情報31Bを更新する。そして、終了処理部73は、キャッシュ管理情報221のヘッダ情報をクリアする。上述のように、キャッシュ管理情報221のヘッダ情報がクリアされていることによって、停電判定部711は、コンピュータ1が前回正常終了されたことを検出する。なお、終了処理部73は、キャッシュ管理情報221に基づいて、SSD31のキャッシュ領域31Aに格納されているダーティデータをHDD32,33,34に書き込み、対応するキャッシュ管理情報221のエントリを更新してもよい。   The end processing unit 73 writes the dirty data stored in the temporary cache area 222 to the HDDs 32, 33, and 34 based on the cache management information 221 when the computer 1 is shut down (normally ended). Further, the end processing unit 73 updates the cache management information 31 </ b> B stored in the SSD 31 using the cache management information 221 stored in the memory 22. Then, the end processing unit 73 clears the header information of the cache management information 221. As described above, when the header information of the cache management information 221 is cleared, the power failure determination unit 711 detects that the computer 1 has been normally terminated last time. Note that the end processing unit 73 writes the dirty data stored in the cache area 31A of the SSD 31 to the HDDs 32, 33, and 34 based on the cache management information 221 and updates the corresponding cache management information 221 entry. Good.

上述の構成により、停電によって異常終了が発生した際にも、一時的なキャッシュ領域222に格納されたダーティデータをHDD32,33,34に書き込むことができる。なお、上述の処理は、キャッシュドライバプログラム54に限らず、図3に示す他の階層に対応するソフトウェア及びハードウェアによる処理と連携して行われてもよい。   With the above configuration, even when an abnormal end occurs due to a power failure, the dirty data stored in the temporary cache area 222 can be written to the HDDs 32, 33, and 34. The above-described processing is not limited to the cache driver program 54, and may be performed in cooperation with processing by software and hardware corresponding to other layers shown in FIG.

次いで、図6に示すフローチャートを参照して、キャッシュドライバ54によって実行される初期化処理の手順の例について説明する。
まず、停電判定部711は、RAIDコントローラ20内のメモリ22にキャッシュ管理情報221が格納されているか否かを判定する(ブロックB11)。具体的には、停電判定部711は、例えば、メモリ22内の所定の位置にキャッシュ管理情報221のヘッダ情報が存在するとき、メモリ22にキャッシュ管理情報221が格納されていると判定する。また、停電判定部711は、例えば、メモリ22内の所定の位置にキャッシュ管理情報221のヘッダ情報が存在しないとき、メモリ22にキャッシュ管理情報221が格納されていないと判定する。上述のように、メモリ22内の所定の位置にキャッシュ管理情報221のヘッダ情報が存在することは、コンピュータ1が前回、停電等によって異常終了したことを示す。また、メモリ22内の所定の位置にキャッシュ管理情報221のヘッダ情報が存在しないことは、コンピュータ1が前回、正常終了したことを示す。
Next, an example of the procedure of the initialization process executed by the cache driver 54 will be described with reference to the flowchart shown in FIG.
First, the power failure determination unit 711 determines whether or not the cache management information 221 is stored in the memory 22 in the RAID controller 20 (block B11). Specifically, the power failure determination unit 711 determines that the cache management information 221 is stored in the memory 22 when the header information of the cache management information 221 exists at a predetermined position in the memory 22, for example. The power failure determination unit 711 determines that the cache management information 221 is not stored in the memory 22 when the header information of the cache management information 221 does not exist at a predetermined position in the memory 22, for example. As described above, the presence of the header information of the cache management information 221 at a predetermined position in the memory 22 indicates that the computer 1 ended abnormally last time due to a power failure or the like. Further, the absence of the header information of the cache management information 221 at a predetermined position in the memory 22 indicates that the computer 1 ended normally last time.

RAIDコントローラ20内のメモリ22にキャッシュ管理情報221が格納されていない場合(すなわち、コンピュータが前回、正常終了している場合)(ブロックB11のNO)、第1初期化部712は、RAIDコントローラ20内のメモリ22にキャッシュ管理情報221を再構築する(ブロックB12)。そして、第1初期化部712は、SSD31に格納されたキャッシュ管理情報31BをRAIDコントローラ20内のメモリ22にロードする(ブロックB13)。   When the cache management information 221 is not stored in the memory 22 in the RAID controller 20 (that is, when the computer has ended normally last time) (NO in block B11), the first initialization unit 712 uses the RAID controller 20 The cache management information 221 is reconstructed in the internal memory 22 (block B12). Then, the first initialization unit 712 loads the cache management information 31B stored in the SSD 31 into the memory 22 in the RAID controller 20 (block B13).

RAIDコントローラ20内のメモリ22にキャッシュ管理情報221が格納されている場合(すなわち、コンピュータが前回、異常終了している場合)(ブロックB11のYES)、第2初期化部713は、RAIDコントローラ20内のメモリ22に格納されたキャッシュ管理情報221を使用することを決定する(ブロックB14)。そして、第2初期化部713は、キャッシュ管理情報221に基づいて、実行が完了していないコマンドが存在するか否かを判定する(ブロックB15)。   When the cache management information 221 is stored in the memory 22 in the RAID controller 20 (that is, when the computer has ended abnormally last time) (YES in block B11), the second initialization unit 713 uses the RAID controller 20 To use the cache management information 221 stored in the internal memory 22 (block B14). Then, the second initialization unit 713 determines whether there is a command that has not been executed based on the cache management information 221 (block B15).

実行が完了していないコマンドが存在する場合(ブロックB15のYES)、第2初期化部713は、そのコマンドがライトコマンドであるか否かを判定する(ブロックB16)。コマンドがライトコマンドである場合(ブロックB16のYES)、第2初期化部713はコマンドを実行し直す(ブロックB17)。そして、第2初期化部713は、ブロックB15に戻り、キャッシュ管理情報221にさらに実行が完了していないコマンドが存在するか否かを判定する。   If there is a command that has not been executed (YES in block B15), the second initialization unit 713 determines whether the command is a write command (block B16). When the command is a write command (YES in block B16), the second initialization unit 713 executes the command again (block B17). Then, the second initialization unit 713 returns to block B15 and determines whether or not there is a command that has not yet been executed in the cache management information 221.

また、コマンドがライトコマンドでない場合(例えば、リードコマンドである場合)(ブロックB16のNO)、第2初期化部713は、そのコマンドをキャッシュ管理情報221(コマンドテーブル221B)からクリアする(ブロックB18)。そして、第2初期化部713は、ブロックB15に戻り、キャッシュ管理情報221にさらに実行が完了していないコマンドが存在するか否かを判定する。   If the command is not a write command (for example, if it is a read command) (NO in block B16), the second initialization unit 713 clears the command from the cache management information 221 (command table 221B) (block B18). ). Then, the second initialization unit 713 returns to block B15 and determines whether or not there is a command that has not yet been executed in the cache management information 221.

実行が完了していないコマンドが存在していない場合(ブロックB15のNO)、第2初期化部713は処理を終了する。   When there is no command that has not been executed (NO in block B15), the second initialization unit 713 ends the process.

以上の処理により、キャッシュメモリとして使用されるRAIDコントローラ20内のメモリ22を初期化することができ、メモリ22を用いたキャッシュ動作を開始することができる。なお、コンピュータが前回、異常終了していると判定された場合、キャッシュ管理情報221のコマンドテーブル221Bではなく、アドレステーブル221Aを用いて、HDD書込みフラグにデータがHDD32,33,34に書込み済みであることを示す値が設定されていないダーティデータをHDD32,33,34に書き込む処理を行ってもよい。   Through the above processing, the memory 22 in the RAID controller 20 used as a cache memory can be initialized, and a cache operation using the memory 22 can be started. If it is determined that the computer has ended abnormally last time, the data has already been written to the HDD 32, 33, 34 in the HDD write flag using the address table 221A instead of the command table 221B of the cache management information 221. A process of writing dirty data in which a value indicating a certain value is not set to the HDDs 32, 33, 34 may be performed.

図7のフローチャートは、コンピュータ1によって実行されるリード処理の手順の例を示す。リード処理は、例えばOS51がHDD32,33,34からデータを読み出すためのリードコマンドを発行することによって開始される。   The flowchart in FIG. 7 shows an example of the read processing procedure executed by the computer 1. The read process is started, for example, when the OS 51 issues a read command for reading data from the HDDs 32, 33, 34.

まず、リード制御部722は、リードコマンドによって指定されたデータが一時的なキャッシュ領域222に格納されているか否かを判定する(ブロックB201)。具体的には、リード制御部722は、キャッシュ管理情報221を用いて、キャッシュ対応領域32A,33A,34Aに格納されたリード対象のデータが一時的なキャッシュ領域222に格納されているか否かを判定する。   First, the read control unit 722 determines whether the data specified by the read command is stored in the temporary cache area 222 (block B201). Specifically, the read control unit 722 uses the cache management information 221 to determine whether or not the read target data stored in the cache corresponding areas 32A, 33A, and 34A is stored in the temporary cache area 222. judge.

リードコマンドによって指定されたデータが一時的なキャッシュ領域222に格納されている場合(ブロックB201のYES)、リード制御部722は、一時的なキャッシュ領域222からデータを読み出すためのリードコマンドを発行する(ブロックB202)。リード制御部722は、発行したリードコマンドをキャッシュリード部722Aに出力する。キャッシュリード部722Aは、リードコマンドによって指定されたデータを一時的なキャッシュ領域222から読み出す(ブロックB203)。そして、リード完了通知部724は、ホストシステム10にリードの完了を通知する(ブロックB204)。   When the data specified by the read command is stored in the temporary cache area 222 (YES in block B201), the read control unit 722 issues a read command for reading data from the temporary cache area 222. (Block B202). The read control unit 722 outputs the issued read command to the cache read unit 722A. The cache read unit 722A reads data specified by the read command from the temporary cache area 222 (block B203). Then, the read completion notifying unit 724 notifies the host system 10 of the read completion (block B204).

リードコマンドによって指定されたデータが一時的なキャッシュ領域222に格納されていない場合(ブロックB201のNO)、リード制御部722は、リードコマンドによって指定されたデータがキャッシュ領域31Aに格納されているか否かを判定する(ブロックB205)。リードコマンドによって指定されたデータがキャッシュ領域31Aに格納されている場合(ブロックB205のYES)、リード制御部722は、キャッシュ領域31Aからデータを読み出すためのリードコマンドを発行する(ブロックB206)。リード制御部722は、発行したリードコマンドをSSDリード部722Bに出力する。SSDリード部722Bは、リードコマンドによって指定されたデータをキャッシュ領域31Aから読み出す(ブロックB207)。そして、リード完了通知部724は、ホストシステム10にリードの完了を通知する(ブロックB208)。また、SSDリード部722Bは、読み出したデータを一時的なキャッシュ領域222に格納する(ブロックB209)。そして、SSDリード部722Bは、対応するエントリをキャッシュ管理情報221に追加する(ブロックB210)。SSDリード部722Bは、例えばデータが格納されたメモリ22(一時的なキャッシュ領域222)内の領域を示す情報、データが格納されるHDD32,33,34(キャッシュ対応領域32A,33A,34A)内の領域を示す情報、データがダーティデータでないことを示すフラグ(HDD書込みフラグ)を含むエントリを追加する。   When the data specified by the read command is not stored in the temporary cache area 222 (NO in block B201), the read control unit 722 determines whether the data specified by the read command is stored in the cache area 31A. Is determined (block B205). When the data specified by the read command is stored in the cache area 31A (YES in block B205), the read control unit 722 issues a read command for reading data from the cache area 31A (block B206). The read control unit 722 outputs the issued read command to the SSD read unit 722B. The SSD read unit 722B reads data specified by the read command from the cache area 31A (block B207). Then, the read completion notification unit 724 notifies the host system 10 of the completion of reading (block B208). Further, the SSD read unit 722B stores the read data in the temporary cache area 222 (block B209). Then, the SSD read unit 722B adds the corresponding entry to the cache management information 221 (block B210). The SSD read unit 722B includes, for example, information indicating an area in the memory 22 (temporary cache area 222) in which data is stored, and HDDs 32, 33, and 34 (cache corresponding areas 32A, 33A, and 34A) in which data is stored. And an entry including a flag indicating that the data is not dirty data (HDD write flag).

リードコマンドによって指定されたデータがキャッシュ領域31Aに格納されていない場合(ブロックB205のNO)、HDDリード部722Cは、リードコマンドによって指定されたデータをHDD32,33,34から読み出す(ブロックB211)。そして、リード完了通知部724は、ホストシステム10にリードの完了を通知する(ブロックB212)。HDDリード部722Cは、読み出したデータを一時的なキャッシュ領域222に格納する(ブロックB213)。また、HDDリード部722Cは、読み出したデータをキャッシュ領域31Aに格納する(ブロックB214)。そして、HDDリード部722Cは、対応するエントリをキャッシュ管理情報221に追加する(ブロックB215)。HDDリード部722Cは、例えばデータが格納されたメモリ22(一時的なキャッシュ領域222)内の領域を示す情報、データが格納されるHDD32,33,34(キャッシュ対応領域32A,33A,34A)内の領域を示す情報、データがダーティデータでないことを示すフラグ(HDD書込みフラグ)を含むエントリと、データが格納されたSSD31(キャッシュ領域31A)内の領域を示す情報、データが格納されるHDD32,33,34(キャッシュ対応領域32A,33A,34A)内の領域を示す情報、データがダーティデータでないことを示すフラグ(HDD書込みフラグ)を含むエントリとを追加する。   When the data specified by the read command is not stored in the cache area 31A (NO in block B205), the HDD read unit 722C reads the data specified by the read command from the HDDs 32, 33, and 34 (block B211). Then, the read completion notification unit 724 notifies the host system 10 of the completion of reading (block B212). The HDD read unit 722C stores the read data in the temporary cache area 222 (block B213). The HDD read unit 722C stores the read data in the cache area 31A (block B214). Then, the HDD read unit 722C adds the corresponding entry to the cache management information 221 (block B215). The HDD read unit 722C includes, for example, information indicating an area in the memory 22 (temporary cache area 222) in which data is stored, and in the HDDs 32, 33, and 34 (cache corresponding areas 32A, 33A, and 34A) in which data is stored. , An entry including a flag (HDD write flag) indicating that the data is not dirty data, information indicating an area in the SSD 31 (cache area 31A) in which the data is stored, an HDD 32 in which the data is stored, 33, 34 (cache corresponding areas 32A, 33A, 34A) information indicating an area and an entry including a flag (HDD write flag) indicating that the data is not dirty data are added.

以上の処理により、OS51によって発行された、HDD32,33,34からデータを読み出すためのリードコマンドに応じて、対応するデータを一時的なキャッシュ領域222、キャッシュ領域222又はHDD32,33,34から読み出すことができる。   With the above processing, corresponding data is read from the temporary cache area 222, cache area 222, or HDD 32, 33, 34 in accordance with the read command issued by the OS 51 for reading data from the HDD 32, 33, 34. be able to.

次いで、図8のフローチャートは、コンピュータ1によって実行されるライト処理の手順の例を示す。ライト処理は、例えばOS51がHDD32,33,34にデータを書き込むためのライトコマンドを発行することによって開始される。   Next, the flowchart of FIG. 8 shows an example of the procedure of the write process executed by the computer 1. The write process is started, for example, when the OS 51 issues a write command for writing data to the HDDs 32, 33, 34.

まず、キャッシュライト部723Aは、ライトコマンドによって指定されたデータ(ライトデータとも云う)をRAIDコントローラ20内のメモリ22に設けられた一時的なキャッシュ領域222に格納する(ブロックB301)。キャッシュライト部723Aは、対応するエントリをキャッシュ管理情報221に追加する。キャッシュライト部723Aは、例えば、データが格納されたメモリ22(一時的なキャッシュ領域222)内の領域を示す情報、データが格納されるべきHDD32,33,34(キャッシュ対応領域32A,33A,34A)内の領域を示す情報、データがダーティデータであることを示すフラグ(HDD書込みフラグ)を含むエントリを追加する。そして、ライト完了通知部725は、ホストシステム10にライトの完了を通知する(ブロックB302)。   First, the cache write unit 723A stores data specified by a write command (also referred to as write data) in a temporary cache area 222 provided in the memory 22 in the RAID controller 20 (block B301). The cache write unit 723A adds the corresponding entry to the cache management information 221. The cache write unit 723A includes, for example, information indicating an area in the memory 22 (temporary cache area 222) in which data is stored and HDDs 32, 33, and 34 (cache corresponding areas 32A, 33A, and 34A) in which the data is stored. ) And an entry including a flag (HDD write flag) indicating that the data is dirty data. Then, the write completion notifying unit 725 notifies the host system 10 of the completion of writing (block B302).

次いで、ライト制御部723は、SSD31内に設けられたキャッシュ領域31Aに、ライトデータが書き込まれるべきHDD32,33,34内の領域(ライト対象領域)に対応する領域があるか否かを判定する(ブロックB303)。キャッシュ領域31Aに、HDD32,33,34内のライト対象領域に対応する領域がない場合(ブロックB303のNO)、ライト制御部723は、キャッシュ領域31にライトデータを書き込むことができる空き領域があるか否かを判定する(ブロックB309)。   Next, the write control unit 723 determines whether or not the cache area 31A provided in the SSD 31 has an area corresponding to an area (write target area) in the HDD 32, 33, or 34 where write data is to be written. (Block B303). When there is no area corresponding to the write target area in the HDD 32, 33, 34 in the cache area 31 </ b> A (NO in block B <b> 303), the write control unit 723 has a free area in which write data can be written in the cache area 31. Whether or not (block B309).

キャッシュ領域31Aに、HDD32,33,34内のライト対象領域に対応する領域がある場合(ブロックB303のYES)、又はキャッシュ領域31にライトデータを書き込むことができる空き領域がある場合(ブロックB309のYES)、ライト制御部723は、一時的なキャッシュ領域222に格納されたライトデータをキャッシュ領域31Aに書き込むためのライトコマンドを発行する(ブロックB304)。ライト制御部723は、発行したライトコマンドをSSDライト部723Bに出力する。そして、SSDライト部723Bは、一時的なキャッシュ領域222に格納されたライトデータをキャッシュ領域31Aに書き込む(ブロックB305)。そして、SSDライト部723Bは、キャッシュ管理情報221内のエントリを更新(追加)する。例えば、SSDライト部723Bは、対応するエントリをキャッシュ管理情報221に追加する。SSDライト部723Bは、例えば、データが格納されたSSD31(キャッシュ領域31A)内の領域を示す情報、データが格納されるHDD32,33,34(キャッシュ対応領域32A,33A,34A)内の領域を示す情報、データがダーティデータであることを示すフラグ(HDD書込みフラグ)を含むエントリを追加する。   When there is an area corresponding to the write target area in the HDD 32, 33, 34 in the cache area 31A (YES in block B303), or there is an empty area in which write data can be written in the cache area 31 (in block B309) YES), the write control unit 723 issues a write command for writing the write data stored in the temporary cache area 222 to the cache area 31A (block B304). The write control unit 723 outputs the issued write command to the SSD write unit 723B. Then, the SSD write unit 723B writes the write data stored in the temporary cache area 222 to the cache area 31A (block B305). Then, the SSD write unit 723B updates (adds) an entry in the cache management information 221. For example, the SSD write unit 723B adds the corresponding entry to the cache management information 221. The SSD write unit 723B includes, for example, information indicating an area in the SSD 31 (cache area 31A) in which data is stored, and areas in the HDDs 32, 33, and 34 (cache corresponding areas 32A, 33A, and 34A) in which data is stored. An entry including information indicating that the data is dirty data (HDD write flag) is added.

次いで、ライト制御部723は、ライトデータがキャッシュ領域31Aに格納されてから一定時間が経過したか否かを判定する(ブロックB306)。一定時間が経過していない場合(ブロックB306のNO)、ライト制御部723は、再度、ブロックB306の処理を実行し、一定時間が経過したか否かを判定する。   Next, the write control unit 723 determines whether or not a predetermined time has elapsed since the write data was stored in the cache area 31A (block B306). If the certain time has not elapsed (NO in block B306), the write control unit 723 executes the process in block B306 again and determines whether the certain time has elapsed.

一定時間が経過した場合(ブロックB306のYES)、ライト制御部723は、キャッシュ領域31Aに格納されたライトデータを、HDD32,33,34内のライト対象領域に書き込むためのライトコマンドを発行する(ブロックB307)。そして、HDDライト部723Cは、キャッシュ領域31Aに格納されたライトデータを、HDD32,33,34内のライト対象領域に書き込む(ブロックB308)。HDDライト部723Cは、キャッシュ管理情報221内の対応するエントリを更新する。HDDライト部723Cは、例えば、対応するエントリに含まれるHDD書込みフラグに、ダーティデータでないことを示す値を設定する。   When the predetermined time has elapsed (YES in block B306), the write control unit 723 issues a write command for writing the write data stored in the cache area 31A to the write target areas in the HDDs 32, 33, and 34 ( Block B307). Then, the HDD write unit 723C writes the write data stored in the cache area 31A to the write target areas in the HDDs 32, 33, and 34 (block B308). The HDD write unit 723C updates the corresponding entry in the cache management information 221. For example, the HDD write unit 723C sets a value indicating that it is not dirty data in the HDD write flag included in the corresponding entry.

キャッシュ領域31内にライトデータを書き込むことができる空き領域がない場合(ブロックB309のNO)、ライト制御部723は、一時的なキャッシュ領域222に格納されたライトデータを、HDD32,33,34内のライト対象領域に書き込むためのライトコマンドを発行する(ブロックB310)。そして、HDDライト部723Cは、一時的なキャッシュ領域222に格納されたライトデータを、HDD32,33,34内のライト対象領域に書き込む(ブロックB311)。HDDライト部723Cは、キャッシュ管理情報221内の対応するエントリを更新する。HDDライト部723Cは、例えば、対応するエントリに含まれるHDD書込みフラグに、ダーティデータでないことを示す値を設定する。   If there is no free area in the cache area 31 where write data can be written (NO in block B309), the write control unit 723 stores the write data stored in the temporary cache area 222 in the HDDs 32, 33, and 34. A write command for writing to the write target area is issued (block B310). The HDD write unit 723C writes the write data stored in the temporary cache area 222 to the write target areas in the HDDs 32, 33, and 34 (block B311). The HDD write unit 723C updates the corresponding entry in the cache management information 221. For example, the HDD write unit 723C sets a value indicating that it is not dirty data in the HDD write flag included in the corresponding entry.

以上の処理により、データをHDD32,33,34に書き込むためのライトコマンドに応じて、一時的なキャッシュ領域222及びキャッシュ領域31Aを用いた、ライトバックモードによるキャッシュ動作を実現することができる。   With the above processing, it is possible to realize a cache operation in the write-back mode using the temporary cache area 222 and the cache area 31A in accordance with a write command for writing data to the HDDs 32, 33, and 34.

なお、RAIDコントローラ20内のメモリ22へのアクセスには、DMAコントローラ28を用いてもよい。これにより、ホストシステム10のプロセッサ11及びRAIDコントローラ20のプロセッサ21による処理量を低減することができる。例えば、メインメモリ13とRAIDコントローラ20内のメモリ22との間のデータ転送は、プロセッサ11によって実行されるが、このデータ転送をRAIDコントローラ20内のDMAコントローラ28を用いて実行することによって、プロセッサ11にかかる負荷を分散することができる。   Note that the DMA controller 28 may be used for accessing the memory 22 in the RAID controller 20. Thereby, the processing amount by the processor 11 of the host system 10 and the processor 21 of the RAID controller 20 can be reduced. For example, the data transfer between the main memory 13 and the memory 22 in the RAID controller 20 is executed by the processor 11. By executing this data transfer using the DMA controller 28 in the RAID controller 20, the processor 11 can be distributed.

次いで、第2の実施の形態を、図9及び図10に基づいて説明する。図9は、第2の実施形態に係る情報処理装置(コンピュータ1)の構成を示す。   Next, a second embodiment will be described based on FIG. 9 and FIG. FIG. 9 shows the configuration of an information processing apparatus (computer 1) according to the second embodiment.

第2の実施形態では、RAIDコントローラ20内のメモリ22ではなく、不揮発性メモリ(SSD)29がキャッシュメモリ(一次キャッシュ)として利用される。不揮発性メモリ(SSD)29は、キャッシュ管理情報291が格納される領域と一時的なキャッシュ領域292とを含む。キャッシュドライバ54は、第1の実施形態と同様にして、不揮発性メモリ29をキャッシュメモリとして利用する。   In the second embodiment, not the memory 22 in the RAID controller 20 but a non-volatile memory (SSD) 29 is used as a cache memory (primary cache). The nonvolatile memory (SSD) 29 includes an area for storing the cache management information 291 and a temporary cache area 292. The cache driver 54 uses the nonvolatile memory 29 as a cache memory in the same manner as in the first embodiment.

一般に、不揮発性メモリ29はメインメモリ13よりも低速であることが想定される。そのため、不揮発性メモリ29に格納されたキャッシュ管理情報291を読み出すことによって、コンピュータ1(ホストシステム10)の処理速度が低下する可能性がある。これは、不揮発性メモリ29がメインメモリ13よりも低速であるために、キャッシュ管理情報291のリードに多大な時間が必要になるためである。そこで、キャッシュ管理情報291をメインメモリ13にも格納し、キャッシュ管理情報291に対する更新がある際には、メインメモリ13に格納されたキャッシュ管理情報291と、不揮発性メモリ29に格納されたキャッシュ管理情報291の両方に対して更新を施す。キャッシュ動作では、キャッシュ管理情報291をサーチする読み込みが多いことが想定されるため、キャッシュ管理情報291の更新のみが行われる不揮発性メモリ29へのアクセス回数を減らすことができる。   In general, it is assumed that the nonvolatile memory 29 is slower than the main memory 13. Therefore, reading the cache management information 291 stored in the non-volatile memory 29 may reduce the processing speed of the computer 1 (host system 10). This is because the nonvolatile memory 29 is slower than the main memory 13, and thus it takes a lot of time to read the cache management information 291. Therefore, the cache management information 291 is also stored in the main memory 13, and when the cache management information 291 is updated, the cache management information 291 stored in the main memory 13 and the cache management information stored in the nonvolatile memory 29 are stored. Both information 291 is updated. In the cache operation, it is assumed that the cache management information 291 is frequently read, so that the number of accesses to the nonvolatile memory 29 in which only the cache management information 291 is updated can be reduced.

図10は、キャッシュドライバ54によって実行される初期化処理の手順の例を示す。なお、キャッシュドライバ54の構成は図4に示す構成と同様である。   FIG. 10 shows an example of the procedure of the initialization process executed by the cache driver 54. The configuration of the cache driver 54 is the same as that shown in FIG.

まず、停電判定部711は、SSD(不揮発性メモリ)29にキャッシュ管理情報291が格納されているか否かを判定する(ブロックB41)。具体的には、停電判定部711は、例えば、SSD29内の所定の位置にキャッシュ管理情報291のヘッダ情報が存在するとき、SSD29にキャッシュ管理情報291が格納されていると判定する。また、停電判定部711は、例えば、SSD29内の所定の位置にキャッシュ管理情報291のヘッダ情報が存在しないとき、SSD29にキャッシュ管理情報291が格納されていないと判定する。SSD29内の所定の位置にキャッシュ管理情報291のヘッダ情報が存在することは、コンピュータ1が前回、停電等によって異常終了したことを示す。また、SSD29内の所定の位置にキャッシュ管理情報291のヘッダ情報が存在しないことは、コンピュータ1が前回、正常終了したことを示す。   First, the power failure determination unit 711 determines whether or not the cache management information 291 is stored in the SSD (nonvolatile memory) 29 (block B41). Specifically, the power failure determination unit 711 determines that the cache management information 291 is stored in the SSD 29 when, for example, the header information of the cache management information 291 exists at a predetermined position in the SSD 29. The power failure determination unit 711 determines that the cache management information 291 is not stored in the SSD 29 when the header information of the cache management information 291 does not exist at a predetermined position in the SSD 29, for example. The presence of the header information of the cache management information 291 at a predetermined position in the SSD 29 indicates that the computer 1 ended abnormally last time due to a power failure or the like. Further, the absence of the header information of the cache management information 291 at a predetermined position in the SSD 29 indicates that the computer 1 ended normally last time.

SSD29にキャッシュ管理情報291が格納されていない場合(すなわち、コンピュータが前回、正常終了している場合)(ブロックB41のNO)、第1初期化部712は、メインメモリ13にキャッシュ管理情報291を再構築する(ブロックB42)。そして、第1初期化部712は、SSD31に格納されたキャッシュ管理情報31Bをメインメモリ13にロードする(ブロックB43)。   When the cache management information 291 is not stored in the SSD 29 (that is, when the computer has been normally terminated last time) (NO in block B41), the first initialization unit 712 stores the cache management information 291 in the main memory 13. Reconstruction is performed (block B42). Then, the first initialization unit 712 loads the cache management information 31B stored in the SSD 31 into the main memory 13 (block B43).

SSD29にキャッシュ管理情報291が格納されている場合(すなわち、コンピュータが前回、異常終了している場合)(ブロックB41のYES)、第2初期化部713は、SSD29に格納されたキャッシュ管理情報291をメインメモリ13上のキャッシュ管理情報が格納される領域に転送する(ブロックB44)。そして、第2初期化部713は、キャッシュ管理情報291に基づいて、実行が完了していないコマンドが存在するか否かを判定する(ブロックB45)。   When the cache management information 291 is stored in the SSD 29 (that is, when the computer has ended abnormally last time) (YES in block B41), the second initialization unit 713 stores the cache management information 291 stored in the SSD 29. Is transferred to the area in the main memory 13 where the cache management information is stored (block B44). Then, the second initialization unit 713 determines whether there is a command that has not been executed based on the cache management information 291 (block B45).

実行が完了していないコマンドが存在する場合(ブロックB45のYES)、第2初期化部713は、そのコマンドがライトコマンドであるか否かを判定する(ブロックB46)。コマンドがライトコマンドである場合(ブロックB46のYES)、第2初期化部713はコマンドを実行し直す(ブロックB47)。そして、第2初期化部713は、ブロックB45に戻り、キャッシュ管理情報291にさらに実行が完了していないコマンドが存在するか否かを判定する。   If there is a command that has not been executed (YES in block B45), the second initialization unit 713 determines whether the command is a write command (block B46). When the command is a write command (YES in block B46), the second initialization unit 713 executes the command again (block B47). Then, the second initialization unit 713 returns to block B45 and determines whether or not there is a command that has not yet been executed in the cache management information 291.

また、コマンドがライトコマンドでない場合(例えば、リードコマンドである場合)(ブロックB46のNO)、第2初期化部713は、そのコマンドをキャッシュ管理情報291(コマンドテーブル)からクリアする(ブロックB48)。そして、第2初期化部713は、ブロックB45に戻り、キャッシュ管理情報291にさらに実行が完了していないコマンドが存在するか否かを判定する。   If the command is not a write command (for example, a read command) (NO in block B46), the second initialization unit 713 clears the command from the cache management information 291 (command table) (block B48). . Then, the second initialization unit 713 returns to block B45 and determines whether or not there is a command that has not yet been executed in the cache management information 291.

実行が完了していないコマンドが存在していない場合(ブロックB45のNO)、第2初期化部713は処理を終了する。   If there is no command that has not been executed (NO in block B45), the second initialization unit 713 ends the process.

以上の処理により、キャッシュメモリとして使用されるメインメモリ13とSSD29とを初期化することができ、メインメモリ13とSSD29とを用いたキャッシュ動作を開始することができる。   Through the above processing, the main memory 13 and the SSD 29 used as the cache memory can be initialized, and the cache operation using the main memory 13 and the SSD 29 can be started.

以上説明したように、第1及び第2の実施形態によれば、停電等の異常終了が発生した際にも、キャッシュされたダーティデータを外部記憶装置に書き込むことができる。ホストシステム10は、停電時にバッテリ23によって電力が供給されるメモリ22をHDD32,33,34対する一次キャッシュとして用いる。そして、停電時にバッテリ23によって電力が供給されるメモリ22に、キャッシュ管理情報221が格納される領域及び一時的なキャッシュ領域222を設ける。また、ホストシステム10は、起動時に、前回コンピュータ1が正常終了したか異常終了したかを判定する機能を有する。これにより、コンピュータ1が異常終了したと判定された際には、停電時にバッテリ23によって電力が供給されるメモリ22に格納されたダーティデータをHDD32,33,34に書き込むことができる。つまり、停電等の異常終了が発生した際にも、ダーティデータを失うことなく、HDD32,33,34に反映させることができる。なお、停電時にバッテリ23によって電力が供給されるメモリ22の代わりに、不揮発性メモリ29を用いてもよい。   As described above, according to the first and second embodiments, cached dirty data can be written to the external storage device even when an abnormal end such as a power failure occurs. The host system 10 uses the memory 22 supplied with power by the battery 23 at the time of a power failure as a primary cache for the HDDs 32, 33, 34. Then, an area for storing the cache management information 221 and a temporary cache area 222 are provided in the memory 22 to which power is supplied by the battery 23 in the event of a power failure. In addition, the host system 10 has a function of determining whether the computer 1 ended normally or abnormally at the time of startup. Thereby, when it is determined that the computer 1 has ended abnormally, dirty data stored in the memory 22 to which power is supplied by the battery 23 in the event of a power failure can be written to the HDDs 32, 33, 34. That is, even when an abnormal end such as a power failure occurs, it can be reflected in the HDDs 32, 33, and 34 without losing dirty data. Note that a nonvolatile memory 29 may be used instead of the memory 22 to which power is supplied by the battery 23 at the time of a power failure.

なお、本実施形態の初期化処理、リード処理、ライト処理、及び終了処理の手順は全てソフトウェアによって実行することができる。このため、初期化処理、リード処理、ライト処理、及び終了処理の手順を実行するプログラムを格納したコンピュータ読み取り可能な記憶媒体を通じてこのプログラムを通常のコンピュータにインストールして実行するだけで、本実施形態と同様の効果を容易に実現することができる。   Note that the procedures of the initialization process, read process, write process, and end process of this embodiment can all be executed by software. For this reason, the present embodiment is merely installed and executed on a normal computer through a computer-readable storage medium storing a program for executing a procedure for initialization processing, read processing, write processing, and termination processing. The same effect as can be easily realized.

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

10…ホストシステム、20…RAIDコントローラ、30…外部記憶装置、11…プロセッサ、12…PCH、13…メインメモリ、21…プロセッサ、22…メモリ、23…バッテリ、24…バッテリ回路、25…BBUオプション、26…PCI Expressコネクタ、27…SASコネクタ、28…DMAコントローラ、221…キャッシュ管理情報、222…一時的なキャッシュ領域、31…SSD、32、33、34…HDD、31A…キャッシュ領域、31B…キャッシュ管理情報、32A、33A、34A…キャッシュ対応領域、43…サービス、54…キャッシュドライバプログラム。   DESCRIPTION OF SYMBOLS 10 ... Host system, 20 ... RAID controller, 30 ... External storage device, 11 ... Processor, 12 ... PCH, 13 ... Main memory, 21 ... Processor, 22 ... Memory, 23 ... Battery, 24 ... Battery circuit, 25 ... BBU option , 26 ... PCI Express connector, 27 ... SAS connector, 28 ... DMA controller, 221 ... cache management information, 222 ... temporary cache area, 31 ... SSD, 32, 33, 34 ... HDD, 31A ... cache area, 31B ... Cache management information, 32A, 33A, 34A ... cache corresponding area, 43 ... service, 54 ... cache driver program.

Claims (11)

第1外部記憶装置をアクセス可能な情報処理装置であって、
ホストシステムと、
前記第1外部記憶装置に対する二次キャッシュとして機能し、前記第1外部記憶装置から読み出されるリードデータ及び前記第1外部記憶装置に書き込むべきライトデータを一時的に格納する第2外部記憶装置と、
前記第1外部記憶装置に対する一次キャッシュとして機能し、停電時にバッテリを用いて電力が供給される揮発性メモリと、
前記ホストシステムからのライト要求に応答して前記第1外部記憶装置に書き込むべきライトデータを前記揮発性メモリ内のキャッシュ領域に格納し、前記揮発性メモリに格納されたキャッシュ管理情報を更新する第1キャッシュ制御手段と、
前記情報処理装置が正常終了されるとき、前記揮発性メモリに格納されたキャッシュ管理情報に基づいて、前記揮発性メモリ内のキャッシュ領域に格納されたダーティデータを前記第1外部記憶装置又は前記第2外部記憶装置に書き込む終了処理手段と、
前記情報処理装置が停電によって異常終了した後に起動されたとき、前記揮発性メモリに格納されたキャッシュ管理情報に基づいて、前記揮発性メモリ内のキャッシュ領域に格納されたダーティデータを前記第1外部記憶装置又は前記第2外部記憶装置に書き込む初期化手段とを具備する情報処理装置。
An information processing apparatus capable of accessing the first external storage device,
A host system;
A second external storage device that functions as a secondary cache for the first external storage device and temporarily stores read data read from the first external storage device and write data to be written to the first external storage device;
A volatile memory that functions as a primary cache for the first external storage device and that is powered by a battery in the event of a power failure;
Write data to be written to the first external storage device in response to a write request from the host system is stored in a cache area in the volatile memory, and cache management information stored in the volatile memory is updated. 1 cache control means;
When the information processing apparatus is normally terminated, based on the cache management information stored in the volatile memory, the dirty data stored in the cache area in the volatile memory is transferred to the first external storage device or the first 2 termination processing means for writing to the external storage device;
When the information processing apparatus is started after abnormal termination due to a power failure, the dirty data stored in the cache area in the volatile memory is transferred to the first external memory based on the cache management information stored in the volatile memory. An information processing apparatus comprising: a storage device or an initialization unit that writes to the second external storage device.
前記情報処理装置が正常終了した後に起動されたとき、前記情報処理装置が異常終了したことを示す異常終了フラグをセットし、前記情報処理装置が正常終了されるとき前記異常終了フラグをリセットするフラグ制御手段と、
前記初期化手段は、前記異常終了フラグがセットされている場合、前記揮発性メモリに格納されたキャッシュ管理情報に基づいて、前記揮発性メモリ内のキャッシュ領域に格納されたダーティデータを前記第1外部記憶装置又は前記第2外部記憶装置に書き込む請求項1記載の情報処理装置。
A flag that sets an abnormal end flag indicating that the information processing apparatus has ended abnormally when activated after the information processing apparatus has ended normally, and resets the abnormal end flag when the information processing apparatus ends normally Control means;
When the abnormal end flag is set, the initialization means stores the dirty data stored in the cache area in the volatile memory based on the cache management information stored in the volatile memory. The information processing apparatus according to claim 1, wherein the information processing apparatus writes in an external storage device or the second external storage device.
前記第1キャッシュ制御手段は、前記ライトデータが書き込まれるべき前記第1外部記憶装置上のアドレスと前記ライトデータが格納された前記揮発性メモリ上のアドレスとの対応を示すアドレス情報を前記揮発性メモリに格納されたキャッシュ管理情報に追加する請求項1記載の情報処理装置。   The first cache control means outputs address information indicating a correspondence between an address on the first external storage device to which the write data is to be written and an address on the volatile memory in which the write data is stored. The information processing apparatus according to claim 1, wherein the information processing apparatus is added to cache management information stored in a memory. 前記揮発性メモリに格納されたキャッシュ管理情報に基づいて、前記揮発性メモリ内のキャッシュ領域に格納されたライトデータを前記第1外部記憶装置に書き込み、前記揮発性メモリに格納されたキャッシュ管理情報に、当該ライトデータが書込済みであることを示す書込フラグをセットする第2キャッシュ制御手段をさらに具備する請求項3記載の情報処理装置。   Based on the cache management information stored in the volatile memory, the write data stored in the cache area in the volatile memory is written to the first external storage device, and the cache management information stored in the volatile memory is stored. 4. The information processing apparatus according to claim 3, further comprising second cache control means for setting a write flag indicating that the write data has been written. 前記終了処理手段は、前記揮発性メモリに格納されたキャッシュ管理情報に基づいて、前記揮発性メモリ内のキャッシュ領域に格納されたライトデータのうち、前記書込フラグがセットされていないライトデータを前記第1外部記憶装置又は前記第2外部記憶装置に書き込む請求項4記載の情報処理装置。   The termination processing means, based on the cache management information stored in the volatile memory, writes the write data in which the write flag is not set among the write data stored in the cache area in the volatile memory. The information processing apparatus according to claim 4, wherein the information is written in the first external storage device or the second external storage device. 前記ライトデータを前記第2外部記憶装置内のキャッシュ領域に格納し、前記揮発性メモリに格納されたキャッシュ管理情報を更新する第3キャッシュ制御手段をさらに具備する請求項1記載の情報処理装置。   2. The information processing apparatus according to claim 1, further comprising third cache control means for storing the write data in a cache area in the second external storage device and updating cache management information stored in the volatile memory. 前記第3キャッシュ制御手段は、前記ライトデータが書き込まれるべき前記第1外部記憶装置上のアドレスと前記ライトデータが格納された前記第2外部記憶装置上のアドレスとの対応を示すアドレス情報を前記揮発性メモリに格納されたキャッシュ管理情報に追加する請求項6記載の情報処理装置。   The third cache control means includes address information indicating a correspondence between an address on the first external storage device to which the write data is to be written and an address on the second external storage device in which the write data is stored. The information processing apparatus according to claim 6, wherein the information processing apparatus is added to cache management information stored in a volatile memory. 前記揮発性メモリに格納されたキャッシュ管理情報に基づいて、前記第2外部記憶装置内のキャッシュ領域に格納されたライトデータを前記第1外部記憶装置に書き込み、前記揮発性メモリに格納されたキャッシュ管理情報に、当該ライトデータが書込済みであることを示す書込フラグをセットする第4キャッシュ制御手段をさらに具備する請求項7記載の情報処理装置。   Based on the cache management information stored in the volatile memory, the write data stored in the cache area in the second external storage device is written to the first external storage device, and the cache stored in the volatile memory is stored. 8. The information processing apparatus according to claim 7, further comprising fourth cache control means for setting a write flag indicating that the write data has been written in the management information. 前記終了処理手段は、前記揮発性メモリに格納されたキャッシュ管理情報に基づいて、前記第2外部記憶装置内のキャッシュ領域に格納されたライトデータのうち、前記書込フラグがセットされていないライトデータを前記第1外部記憶装置に書き込む請求項8記載の情報処理装置。   The termination processing means is a write for which the write flag is not set among the write data stored in the cache area in the second external storage device based on the cache management information stored in the volatile memory. The information processing apparatus according to claim 8, wherein data is written to the first external storage device. 第1外部記憶装置をアクセス可能な情報処理装置であって、
ホストシステムと、
前記第1外部記憶装置に対する二次キャッシュとして機能し、前記第1外部記憶装置から読み出されるリードデータ及び前記第1外部記憶装置に書き込むべきライトデータを一時的に格納する第2外部記憶装置と、
前記第1外部記憶装置に対する一次キャッシュとして機能する不揮発性メモリと、
前記ホストシステムからのライト要求に応答して前記第1外部記憶装置に書き込むべきライトデータを前記不揮発性メモリ内のキャッシュ領域に格納し、前記不揮発性メモリに格納されたキャッシュ管理情報を更新する第1キャッシュ制御手段と、
前記情報処理装置が正常終了されるとき、前記不揮発性メモリに格納されたキャッシュ管理情報に基づいて、前記不揮発性メモリ内のキャッシュ領域に格納されたダーティデータを前記第1外部記憶装置又は前記第2外部記憶装置に書き込む終了処理手段と、
前記情報処理装置が停電によって異常終了した後に起動されたとき、前記不揮発性メモリに格納されたキャッシュ管理情報に基づいて、前記不揮発性メモリ内のキャッシュ領域に格納されたダーティデータを前記第1外部記憶装置又は前記第2外部記憶装置に書き込む初期化手段とを具備する情報処理装置。
An information processing apparatus capable of accessing the first external storage device,
A host system;
A second external storage device that functions as a secondary cache for the first external storage device and temporarily stores read data read from the first external storage device and write data to be written to the first external storage device;
A non-volatile memory that functions as a primary cache for the first external storage device;
Write data to be written to the first external storage device in response to a write request from the host system is stored in a cache area in the nonvolatile memory, and cache management information stored in the nonvolatile memory is updated. 1 cache control means;
When the information processing apparatus is normally terminated, based on the cache management information stored in the nonvolatile memory, dirty data stored in the cache area in the nonvolatile memory is transferred to the first external storage device or the first 2 termination processing means for writing to the external storage device;
When the information processing apparatus is started after abnormal termination due to a power failure, the dirty data stored in the cache area in the nonvolatile memory is transferred to the first external memory based on the cache management information stored in the nonvolatile memory. An information processing apparatus comprising: a storage device or an initialization unit that writes to the second external storage device.
第1外部記憶装置をアクセス可能な情報処理装置であって、ホストシステムと、前記第1外部記憶装置に対する二次キャッシュとして機能し、前記第1外部記憶装置から読み出されるリードデータ及び前記第1外部記憶装置に書き込むべきライトデータを一時的に格納する第2外部記憶装置と、前記第1外部記憶装置に対する一次キャッシュとして機能し、停電時にバッテリを用いて電力が供給される揮発性メモリとを具備する情報処理装置のキャッシュ動作を制御するキャッシュ制御方法であって、
前記ホストシステムからのライト要求に応答して前記第1外部記憶装置に書き込むべきライトデータを前記揮発性メモリ内のキャッシュ領域に格納し、前記揮発性メモリに格納されたキャッシュ管理情報を更新し、
前記情報処理装置が正常終了されるとき、前記揮発性メモリに格納されたキャッシュ管理情報に基づいて、前記揮発性メモリ内のキャッシュ領域に格納されたダーティデータを前記第1外部記憶装置又は前記第2外部記憶装置に書き込み、
前記情報処理装置が停電によって異常終了した後に起動されたとき、前記揮発性メモリに格納されたキャッシュ管理情報に基づいて、前記揮発性メモリ内のキャッシュ領域に格納されたダーティデータを前記第1外部記憶装置又は前記第2外部記憶装置に書き込むキャッシュ制御方法。
An information processing apparatus capable of accessing a first external storage device, which functions as a secondary cache for a host system and the first external storage device, and read data read from the first external storage device and the first external storage device A second external storage device that temporarily stores write data to be written to the storage device; and a volatile memory that functions as a primary cache for the first external storage device and that is supplied with power using a battery in the event of a power failure A cache control method for controlling a cache operation of an information processing apparatus,
Storing write data to be written to the first external storage device in response to a write request from the host system in a cache area in the volatile memory, and updating cache management information stored in the volatile memory;
When the information processing apparatus is normally terminated, based on the cache management information stored in the volatile memory, the dirty data stored in the cache area in the volatile memory is transferred to the first external storage device or the first 2 Write to external storage device,
When the information processing apparatus is started after abnormal termination due to a power failure, the dirty data stored in the cache area in the volatile memory is transferred to the first external memory based on the cache management information stored in the volatile memory. A cache control method for writing into a storage device or the second external storage device.
JP2010221593A 2010-09-30 2010-09-30 Information processor and cache control method Withdrawn JP2012078941A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010221593A JP2012078941A (en) 2010-09-30 2010-09-30 Information processor and cache control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010221593A JP2012078941A (en) 2010-09-30 2010-09-30 Information processor and cache control method

Publications (1)

Publication Number Publication Date
JP2012078941A true JP2012078941A (en) 2012-04-19

Family

ID=46239152

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010221593A Withdrawn JP2012078941A (en) 2010-09-30 2010-09-30 Information processor and cache control method

Country Status (1)

Country Link
JP (1) JP2012078941A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014067377A (en) * 2012-09-27 2014-04-17 Nec Corp Cache control device, disk array device, array controller, and cache control method
JP2014120179A (en) * 2012-12-18 2014-06-30 Hgst Netherlands B V Salvaging event trace information in power loss interruption scenarios
JP2014170325A (en) * 2013-03-01 2014-09-18 Nec Corp Storage device and method and program
JP2015036916A (en) * 2013-08-14 2015-02-23 キヤノン株式会社 Information processing apparatus and control method of the same, and program
US9063845B2 (en) 2012-08-29 2015-06-23 Buffalo Memory Co., Ltd. Solid-state drive device
WO2016006108A1 (en) * 2014-07-11 2016-01-14 株式会社日立製作所 Storage and control method therefor
US9727247B2 (en) 2013-03-15 2017-08-08 Nec Corporation Storage device and method, and storage medium
US9836108B2 (en) 2014-09-10 2017-12-05 Toshiba Memory Corporation Memory system and controller

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9632714B2 (en) 2012-08-29 2017-04-25 Buffalo Memory Co., Ltd. Solid-state drive device
US9063845B2 (en) 2012-08-29 2015-06-23 Buffalo Memory Co., Ltd. Solid-state drive device
JP2014067377A (en) * 2012-09-27 2014-04-17 Nec Corp Cache control device, disk array device, array controller, and cache control method
JP2014120179A (en) * 2012-12-18 2014-06-30 Hgst Netherlands B V Salvaging event trace information in power loss interruption scenarios
US9690642B2 (en) 2012-12-18 2017-06-27 Western Digital Technologies, Inc. Salvaging event trace information in power loss interruption scenarios
JP2014170325A (en) * 2013-03-01 2014-09-18 Nec Corp Storage device and method and program
US9727247B2 (en) 2013-03-15 2017-08-08 Nec Corporation Storage device and method, and storage medium
JP2015036916A (en) * 2013-08-14 2015-02-23 キヤノン株式会社 Information processing apparatus and control method of the same, and program
WO2016006108A1 (en) * 2014-07-11 2016-01-14 株式会社日立製作所 Storage and control method therefor
US9836359B2 (en) 2014-07-11 2017-12-05 Hitachi, Ltd. Storage and control method of the same
US9836108B2 (en) 2014-09-10 2017-12-05 Toshiba Memory Corporation Memory system and controller
US10268251B2 (en) 2014-09-10 2019-04-23 Toshiba Memory Corporation Memory system and controller
US10768679B2 (en) 2014-09-10 2020-09-08 Toshiba Memory Corporation Memory system and controller
US11435799B2 (en) 2014-09-10 2022-09-06 Kioxia Corporation Memory system and controller
US11693463B2 (en) 2014-09-10 2023-07-04 Kioxia Corporation Memory system and controller
US11947400B2 (en) 2014-09-10 2024-04-02 Kioxia Corporation Memory system and controller

Similar Documents

Publication Publication Date Title
JP2012078941A (en) Information processor and cache control method
CN107636601B (en) Processor and platform assisted NVDIMM solution using standard DRAM and integrated storage
US20150089287A1 (en) Event-triggered storage of data to non-volatile memory
US8214610B2 (en) Managing backup device metadata in a high availability disk subsystem
US9256384B2 (en) Method and system for reducing write latency in a data storage system by using a command-push model
US10248322B2 (en) Memory system
TWI556104B (en) Techniques to perform power fail-safe caching without atomic metadata
US8516298B2 (en) Data protection method for damaged memory cells
KR102329762B1 (en) Electronic system with memory data protection mechanism and method of operation thereof
US9201601B2 (en) Reducing required battery capacity for data backup in a storage system with multiple controllers
US8612681B2 (en) Storage system, storage apparatus and method of controlling storage system
WO2011033600A1 (en) Virtual memory management device
US20230251931A1 (en) System and device for data recovery for ephemeral storage
US9292204B2 (en) System and method of rebuilding READ cache for a rebooted node of a multiple-node storage cluster
US8195874B2 (en) Storage apparatus and method for shredding storage medium
JP2016511474A (en) Deduplication and host-based QoS in tiered storage
US20130212317A1 (en) Storage and Host Devices for Overlapping Storage Areas for a Hibernation File and Cached Data
US20160196085A1 (en) Storage control apparatus and storage apparatus
US20160139995A1 (en) Information processing apparatus, memory dump method, and storage medium
JP2019133703A (en) Storage system
JP5893028B2 (en) System and method for efficient sequential logging on a storage device that supports caching
US20160259571A1 (en) Storage subsystem
US10162573B2 (en) Storage management system, storage management method, storage medium and information processing system
US20190073147A1 (en) Control device, method and non-transitory computer-readable storage medium
WO2019041903A1 (en) Nonvolatile memory based computing device and use method therefor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20131203

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载