JP2008293472A - Computer device and its cache recovery method - Google Patents
Computer device and its cache recovery method Download PDFInfo
- Publication number
- JP2008293472A JP2008293472A JP2008014645A JP2008014645A JP2008293472A JP 2008293472 A JP2008293472 A JP 2008293472A JP 2008014645 A JP2008014645 A JP 2008014645A JP 2008014645 A JP2008014645 A JP 2008014645A JP 2008293472 A JP2008293472 A JP 2008293472A
- Authority
- JP
- Japan
- Prior art keywords
- history information
- data
- unit
- cache
- identifier
- 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.)
- Granted
Links
Images
Abstract
Description
本発明は計算機装置およびそのキャッシュリカバリ方法に関し、特に、複数の仮想計算機を切替えて動作させる環境における計算機装置およびそのキャッシュリカバリ方法に関する。 The present invention relates to a computer apparatus and its cache recovery method, and more particularly to a computer apparatus and its cache recovery method in an environment in which a plurality of virtual machines are operated by switching.
従来、計算機の仮想化は、ネットワークの中心となるホスト計算機(ホストコンピュータ)での利用がほとんどであった。しかし最近では、Intel(登録商標)プロセッサやAMD(登録商標)プロセッサなど、身近なIA(インテルアーキテクチャ)プロセッサにおいても、ハードウェアによる仮想化技術が取り入れられ始め、PC(Personal Computer)レベルにおいても、仮想計算機(VM:Virtual Machine)環境が珍しくなくなりつつある。これにより、大規模エンタープライズでの利用から個人レベルでの利用まで、今後ますます仮想計算機の利用が広がることが予想される。 Conventionally, computer virtualization has been mostly used in a host computer (host computer) which is the center of a network. Recently, however, familiar IA (Intel architecture) processors such as Intel (registered trademark) processors and AMD (registered trademark) processors have begun to adopt hardware virtualization technology, and at the PC (Personal Computer) level, Virtual machine (VM) environments are becoming rare. As a result, it is expected that the use of virtual machines will increase from the use in large enterprises to the use at the individual level.
計算機には、CPU(Central Processing Unit)とメインメモリとの速度緩衝用として、従来から高速小容量のバッファ(キャッシュ)が使われている。CPUは、データ使用に関する参照の局所性や時間的局所性という特性を利用して、頻繁に使われるデータを一時的にキャッシュに置くことにより大きな性能向上を得ていた。 Conventionally, high-speed and small-capacity buffers (caches) have been used in computers for speed buffering between a CPU (Central Processing Unit) and a main memory. The CPU has obtained a large performance improvement by temporarily placing frequently used data in a cache by utilizing the characteristics of locality of reference and temporal locality regarding data use.
しかし、これまでのプロセッサのキャッシュは、一つの仮想計算機が動作する環境では高い効果を発揮できるものの、複数の仮想計算機が切替わって動作する様な環境では、仮想計算機相互のキャッシュ汚染が生じ、その効果を十分に発揮することができない。 However, the cache of the processor so far can be highly effective in an environment where one virtual machine operates, but in an environment where multiple virtual machines operate by switching, virtual machine mutual cache contamination occurs, The effect cannot be fully exhibited.
ここで、キャッシュ汚染とは、複数の仮想計算機が切替わって動作する環境において、ある仮想計算機の動作中に読み込まれた(=フェッチされた)キャッシュデータが、別の仮想計算機の動作中に追い出されたり、あるいは仮想計算機切替え時にキャッシュデータが一旦無効化されたりして、再び元の仮想計算機に切替わっても、特に切替え直後はキャッシュミスが多発してしまうことをいう。 Here, cache pollution refers to cache data read (= fetched) during the operation of a virtual machine in an environment where a plurality of virtual machines are switched and operated while another virtual machine is operating. Even if the cache data is temporarily invalidated at the time of virtual machine switching and the original virtual machine is switched again, cache misses occur frequently immediately after switching.
このキャッシュ汚染により、キャッシュが有効利用できず、キャッシュ本来の役割が果たせていないという問題があった。
これに対し、仮想計算機を識別する手段を用いることにより、他の仮想計算機への悪影響を抑止する方法が知られている(例えば、特許文献1参照)。
Due to this cache contamination, there is a problem that the cache cannot be used effectively and the original role of the cache cannot be achieved.
On the other hand, a method for suppressing adverse effects on other virtual machines by using a means for identifying a virtual machine is known (for example, see Patent Document 1).
また、キャッシュ自体を複数用意してバンク化し、各バンクを個別に仮想計算機に割当ててキャッシュ本来の効果を保つ方法が知られている(例えば、特許文献2参照)。
しかし、従来の技術には以下のような問題があった。
例えば、特許文献1では、キャッシュの無効化命令以外には、性能低下を防ぐ効果がないという問題があった。
However, the conventional techniques have the following problems.
For example, in
また、特許文献2では、キャッシュは非常に高価なため、複数バンク用意するためにキャッシュ全体の容量を大きくすると、コストが増大し現実的ではなくなる。逆に全体の容量をそのままにすると、今度は各仮想計算機に割り当てるキャッシュ容量が小さくなり、その分、容量性のキャッシュミスが増えて、結局キャッシュの効果が得にくいという根本的な問題があった。さらに、予め用意するバンク数は固定的になるので、対応可能な仮想計算機の個数に制限があるという問題もあった。
Also, in
本発明はこのような点に鑑みてなされたものであり、複数の仮想計算機が動作している環境でのキャッシュミスを防止することができる計算機装置およびそのキャッシュリカバリ方法を提供することを目的とする。 The present invention has been made in view of these points, and an object of the present invention is to provide a computer apparatus capable of preventing a cache miss in an environment in which a plurality of virtual machines are operating, and a cache recovery method thereof. To do.
本発明では上記問題を解決するために、図1に示すような計算機装置1が提供される。
本発明に係る計算機装置1は、複数の仮想計算機を切替えて動作させる装置である。
計算機装置1は、高速キャッシュ2と、高速キャッシュ2に転送するデータ3aを記憶する記憶部3と、仮想計算機を一意に識別する識別子4aにアドレス4bが関連づけられた履歴情報4を格納する履歴情報格納部5と、動作する仮想計算機の切替えがあると、履歴情報格納部5を参照して切替え後の仮想計算機の識別子に一致する履歴情報4に含まれる識別子4aの有無を判断する判断部6と、一致した識別子4aに関連づけられたアドレス4bに基づいて、記憶部3が記憶しているデータ3aを特定させ、特定したデータ3aを高速キャッシュ2に転送させる転送指示部7と、を有する。
In the present invention, a
The
The
このような計算機装置1によれば、動作する仮想計算機の切替えがあると、判断部6により、履歴情報格納部5が参照されて切替え後の仮想計算機の識別子に一致する履歴情報4に含まれる識別子4aの有無が判断される。そして、転送指示部7により、一致した識別子に関連づけられたアドレス4bに基づいて、データ3aの転送要求が出力され、記憶部3が記憶しているデータ3aの特定および特定されたデータ3aの高速キャッシュ2への転送が実行される。
According to such a
本発明によれば、履歴情報格納部を参照して切替え後の仮想計算機が必要とするデータを予め高速キャッシュに転送させることができるため、キャッシュが本来の効果、すなわち参照の局所性や、特に時間的局所性を発揮することができる。 According to the present invention, since the data required by the virtual machine after switching can be transferred to the high-speed cache in advance by referring to the history information storage unit, the cache has an original effect, that is, locality of reference, particularly Temporal locality can be exhibited.
以下、本発明の実施の形態を、図面を参照して詳細に説明する。
まず、本発明の概要について説明し、その後、実施の形態を説明する。
図1は、本発明の概要を示す図である。なお、以下の説明では、1台の計算機装置1上で複数の仮想計算機が動作している環境を前提とする。その場合、各仮想計算機は1つずつ切替わりながら動作しているものとする。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
First, an outline of the present invention will be described, and then an embodiment will be described.
FIG. 1 is a diagram showing an outline of the present invention. In the following description, it is assumed that an environment in which a plurality of virtual machines are operating on one
計算機装置1は、高速キャッシュ2と、記憶部3と、履歴情報格納部5と、判断部6と、転送指示部7とを有している。
高速キャッシュ2は、例えばCPU内部のキャッシュメモリ等である。
The
The
記憶部3は、高速キャッシュ2に転送するデータ3aを記憶する。このデータ3aは、例えば以前、高速キャッシュ2に記憶されていたデータである。
履歴情報格納部5は、仮想計算機を一意に識別する識別子4aにアドレス4bが関連づけられた履歴情報4を格納する。アドレス4bは、識別子4aによって特定される仮想計算機が動作時に必要とするデータのアドレスであり、例えばキャッシュにフェッチ(取り込み)されるメモリデータのアドレスが取り出され、アドレス4bとして識別子4aに関連づけられている。この履歴情報4は、1つまたは複数格納される。
The
The history
判断部6は、動作する仮想計算機の切替えがあると、履歴情報格納部5を参照して切替え後の仮想計算機の識別子に一致する履歴情報4に含まれる識別子4aの有無を判断する。
When the operating virtual machine is switched, the determination unit 6 refers to the history
転送指示部7は、一致した識別子4aに関連づけられたアドレス4bに基づいて、記憶部3が記憶しているデータ3aを特定させ、特定したデータ3aを高速キャッシュ2に転送させる。例えば、転送指示部7が、高速キャッシュ2の図示しないキャッシュコントローラにアドレス4bに対応するデータの転送要求を出力することにより、このキャッシュコントローラが、アドレス4bに一致するメモリ上のアドレスに対応するデータ3aを特定し、記憶部3から高速キャッシュ2にデータ3aを取り込む。
The
このような計算機装置1によれば、動作する仮想計算機の切替えがあると、判断部6により、履歴情報格納部5が参照されて切替え後の仮想計算機の識別子に一致する履歴情報4に含まれる識別子4aの有無が判断される。そして、転送指示部7により、一致した識別子4aに関連づけられたアドレス4bに基づいて、データ3aの転送要求が出力され、記憶部3が記憶しているデータ3aの特定および特定されたデータ3aの高速キャッシュ2への転送が実行される。
According to such a
以下、本発明の実施の形態を説明する。
図2は、計算機装置のハードウェア構成例を示す図である。
計算機装置10は、CPU101によって装置全体が制御されている。CPU101には、バス107を介してRAM(Random Access Memory)102、ハードディスクドライブ(HDD:Hard Disk Drive)103、グラフィック処理装置104、入力インタフェース105、通信インタフェース106、およびリカバリコントローラ15が接続されている。
Embodiments of the present invention will be described below.
FIG. 2 is a diagram illustrating a hardware configuration example of the computer apparatus.
The entire computer apparatus 10 is controlled by the
RAM102には、CPU101に実行させるOS(Operating System)のプログラムやアプリケーションプログラムの少なくとも一部が一時的に格納される。また、RAM102には、CPU101による処理に必要な各種データが格納される。HDD103には、OSやアプリケーションプログラムが格納される。また、HDD103内には、プログラムファイルが格納される。
The
グラフィック処理装置104には、モニタ31が接続されている。グラフィック処理装置104は、CPU101からの命令に従って、画像をモニタ31の画面に表示させる。入力インタフェース105には、キーボード32とマウス33とが接続されている。入力インタフェース105は、キーボード32やマウス33から送られてくる信号を、バス107を介してCPU101に送信する。
A
通信インタフェース106は、ネットワーク30に接続されている。通信インタフェース106は、ネットワーク30を介して、他のコンピュータとの間でデータの送受信を行うことができる。
The
リカバリコントローラ15については後述する。
以上のようなハードウェア構成によって、本実施の形態の処理機能を実現することができる。このようなハードウェア構成の計算機装置10においてキャッシュリカバリを行うために、計算機装置10内には、以下のような機能が設けられる。
The
With the hardware configuration as described above, the processing functions of the present embodiment can be realized. In order to perform cache recovery in the computer apparatus 10 having such a hardware configuration, the following functions are provided in the computer apparatus 10.
図3は、計算機装置の機能を示すブロック図である。
計算機装置10は、キャッシュ11と、メモリ12と、キャッシュ履歴テーブル13と、VM−IDレジスタ14と、リカバリコントローラ15と、AND回路16とを有している。
FIG. 3 is a block diagram illustrating functions of the computer apparatus.
The computer apparatus 10 includes a
キャッシュ11は、CPU101の演算部とメモリ12との速度緩衝用として、例えばCPU101の内部に設けられており、CPU101が使用する頻度の高いデータを一時的に記憶する。キャッシュ11のデータの入出力は、図示しないキャッシュコントローラによって行われる。
The
メモリ12は、例えばキャッシュ11よりも低速のRAM102(主記憶部)や、下位のキャッシュ層等によって構成されている。主記憶部にはキャッシュ11にフェッチ(取込)するデータが格納されている。
The
図4は、キャッシュに格納されているデータを示す図である。このキャッシュ11には、メモリ12からキャッシュ11にフェッチ(取込)するデータ(Data)が格納されている。また、フェッチしたその各データ(Data)は、データの要否を決定するバリッドビット(valid bit)およびアドレス(address)も有しており、それらの各要素の一組をキャッシュデータまたはキャッシュエントリと呼ぶ。
FIG. 4 is a diagram illustrating data stored in the cache. The
再び図3に戻って説明する。
キャッシュ履歴テーブル13は、例えばRAM102やCPU101内の高速メモリ、レジスタの一部分により構成されており、複数の履歴エントリ21、21、・・・を有している。
Returning to FIG. 3, the description will be continued.
The cache history table 13 includes, for example, a part of the
1つの履歴エントリ21は、データの要否を決定するバリッドビット(valid bit)、仮想計算機を識別するためのIDタグとしての役割を果たすVM−IDおよびデータアドレス(address)を格納する領域(エントリ)を構成している。以下、バリッドビット、VM−IDおよびデータアドレス(キャッシュに格納されているデータのアドレス)をまとめて「履歴データ」という。 One history entry 21 is an area (entry) that stores a valid bit that determines whether data is necessary, a VM-ID that serves as an ID tag for identifying a virtual machine, and a data address (address). ). Hereinafter, the valid bit, VM-ID, and data address (data address stored in the cache) are collectively referred to as “history data”.
VM−IDレジスタ14は、例えばCPU101内のレジスタの一部分により構成されており、現在動作している仮想計算機のVM−IDが格納される。
リカバリコントローラ15は、仮想計算機の切替えをきっかけとしてCPU101が生成するVM切替信号が入力されると、キャッシュ11へのキャッシュデータのリカバリを行うためのリカバリ動作(後述)を行う。それ以外の場合は、キャッシュ履歴テーブル13の履歴エントリ21、21、・・・にバリッドビット、VM−IDおよびキャッシュデータのアドレスを関連づけて記録する記録動作(後述)を行う。
The VM-
The
AND回路16は、VM−IDレジスタ14と履歴エントリ21に格納されている履歴データのVM−IDとの一致を判断するために設けられている。
次に、履歴エントリ21、21、・・・に格納される履歴データの記録方法(フェッチアドレス記録方法)について説明する。
The AND
Next, a recording method (fetch address recording method) of history data stored in the history entries 21, 21,.
図5は、履歴データの記録方法を説明する図である。なお、図5では同時期に行う動作については、同じステップ番号を付している。
リカバリコントローラ15は、メモリ12からキャッシュ11へのキャッシュデータのフェッチを観察する(ステップS1)。
FIG. 5 is a diagram for explaining a recording method of history data. In FIG. 5, the same step numbers are assigned to the operations performed at the same time.
The
そして、キャッシュデータのフェッチが発生すると、リカバリコントローラ15は、そのフェッチされるデータのアドレス(データが格納されていた主記憶部の場所=アドレス)と、その時動作している仮想計算機のVM−IDとを同時に読み込む(ステップS2)。
When the cache data is fetched, the
そして、読み込んだアドレスおよびVM−IDを履歴データとして履歴エントリ21に記録し、バリッドビットを1(有効)にする(ステップS3)。
リカバリコントローラ15は、ステップS1〜S3を繰り返し行う。これにより、履歴エントリ21、21、・・・にそれぞれ履歴データが格納される。
Then, the read address and VM-ID are recorded as history data in the history entry 21, and the valid bit is set to 1 (valid) (step S3).
The
次に、計算機装置10(リカバリコントローラ15)のリカバリ動作を説明する。
図6は、リカバリ動作を説明する図である。
前処理として、CPU101が、VM−IDレジスタ14に新たなVM−IDを格納するとともに、VM切替信号を生成する。この時点では、新たな仮想計算機による動作は開始されていない。
Next, the recovery operation of the computer apparatus 10 (recovery controller 15) will be described.
FIG. 6 is a diagram for explaining the recovery operation.
As preprocessing, the
VM切替信号をトリガーとしてリカバリコントローラ15がリカバリ動作を開始する(ステップS11)。
リカバリコントローラ15は、キャッシュ履歴テーブル13上の各履歴エントリ21、21、・・・を逐次チェックしていく(ステップS12)。
The
The
具体的には、AND回路16が、リカバリコントローラ15の指示によって逐次入力される履歴エントリ21、21、・・・内のバリッドビットおよびIDタグ(=VM−ID)と、VM切替信号入力時にVM−IDレジスタ14から入力されるこれから動作しようとしている仮想計算機のVM−IDとを比較し、その結果をリカバリコントローラ15に出力する。AND回路16は、これらのVM−IDが一致し、かつ、バリッドビットが「1」であれば、「1」を出力し、それ以外は「0」を出力する(ステップS13)。
More specifically, the AND
リカバリコントローラ15は、AND回路16から「1」が出力されると、一致したと判断し、チェックしている(一致したVM−IDが格納されている)履歴エントリ21に格納されているアドレスを参照する(ステップS14)。
When “1” is output from the AND
そして、リカバリコントローラ15は、参照したアドレスをフェッチアドレスとしてキャッシュコントローラへフェッチ要求を出す(ステップS15)。
参照したアドレスのデータがメモリ12からフェッチされ(ステップS16)、再度キャッシュ11に格納されることによりキャッシュデータの復元が完了する。
Then, the
The data at the referenced address is fetched from the memory 12 (step S16) and stored in the
以上でリカバリ動作を終了する。
次に、変形例として履歴エントリを拡張した例を示す。
<変形例>
図7は、履歴エントリを拡張した例を示す図である。
This completes the recovery operation.
Next, an example in which a history entry is expanded is shown as a modification.
<Modification>
FIG. 7 is a diagram illustrating an example in which the history entry is expanded.
履歴エントリ21aは、キャッシュ11の構造が命令キャッシュ、データキャッシュである場合や、2次キャッシュ、3次キャッシュなどの多階層キャッシュ構成である場合にも対応することができるよう構成されている。
The history entry 21a is configured to be able to cope with a case where the structure of the
履歴エントリ21aは、記録しているアドレスが命令アドレス(I)か、または、データアドレス(D)かを示す種別フラグを格納する領域211と、多階層キャッシュに対応するために設けられ、対象キャッシュの階層を示す階層フラグを格納する領域(Level Index)212とをさらに有している。図7では、領域211には命令アドレス(I)が格納されている。 The history entry 21a is provided to correspond to the area 211 storing the type flag indicating whether the recorded address is the instruction address (I) or the data address (D), and the multi-level cache. It further has an area (Level Index) 212 for storing a hierarchy flag indicating the hierarchy. In FIG. 7, the area 211 stores the instruction address (I).
リカバリコントローラ15は、リカバリ動作時には履歴エントリ21a種別フラグを参照し、履歴が命令アドレス(I)の場合には命令キャッシュに、データアドレス(D)の場合にはデータキャッシュにフェッチする様にキャッシュコントローラに要求を出す。
The
また、例えばリカバリ動作時に参照した履歴エントリ21aが2次キャッシュの履歴の場合、リカバリコントローラ15は、階層フラグを参照し、2次キャッシュに対してフェッチする様にキャッシュコントローラに要求を出す。
For example, if the history entry 21a referred to during the recovery operation is a secondary cache history, the
以上述べたように、本実施の形態の計算機装置10によれば、仮想計算機の切替え時に、リカバリコントローラ15が、これから動作する仮想計算機にとって有効なキャッシュデータを、キャッシュ履歴テーブル13を参照することにより判断し、該当するキャッシュデータを、そのキャッシュデータが必要になる前にメモリから読み出して(リカバリ動作とは別動作で進行する仮想計算機の切替え動作とオーバーラップさせる様に)キャッシュ11にフェッチさせるようにした。これにより、特定の仮想計算機に対応する(前回仮想計算機が使用していた)キャッシュデータを、その仮想計算機の動作時に復元することができる。
As described above, according to the computer apparatus 10 of this embodiment, when the virtual computer is switched, the
その結果、仮想計算機の切替え後のキャッシュミスを防止することができ、キャッシュが本来の効果(参照の局所性や特に時間的局所性)を発揮できるようになるため、動作中の複数の仮想計算機の全てを含めた(仮想計算機環境全体の)性能向上が期待できる。 As a result, cache misses after switching virtual machines can be prevented, and the cache can exhibit its original effects (locality of reference and especially temporal locality), so multiple virtual machines in operation It is expected to improve the performance (including the entire virtual machine environment).
また、無効化命令だけでなく、キャッシュデータ書き換え全般による他の仮想計算機からのキャッシュ汚染を防止することができる。また、特定の仮想計算機だけではなく、計算機装置10上で同時に動作している全ての仮想計算機がその恩恵を受けることができるという優位性がある。 Further, not only invalidation instructions but also cache contamination from other virtual machines due to cache data rewriting in general can be prevented. In addition, there is an advantage that not only a specific virtual machine but also all virtual machines operating simultaneously on the computer apparatus 10 can receive the benefit.
また、キャッシュ11の構造自体を変更しなくてもよいため、既存のキャッシュを用いることができる。
また、リカバリコントローラ15は、ハードウェア構成されているため、処理速度が速く、仮想計算機の切替えと並行して処理を行うことができる。また、ソフトウェアによる対応も不要である。
In addition, since the structure of the
Further, since the
また、キャッシュデータを単なるVM−IDを用いて(タグ付け方式で)管理するようにしたので、動作する仮想計算機の個数に特に制限はなく、動的に仮想計算機の動作数が増加した場合にも対応することができる。 In addition, since the cache data is managed using a simple VM-ID (using a tagging method), the number of operating virtual machines is not particularly limited, and the number of operating virtual machines increases dynamically. Can also respond.
なお、本実施の形態では、AND回路16をリカバリコントローラ15の外部に設けたが、本発明はこれに限定されず、例えばリカバリコントローラ15内にAND回路16を設けるようにしてもよい。
In the present embodiment, the AND
次に、第2の実施の形態の計算機装置について説明する。
図8は、第2の実施の形態の計算機装置を示す図である。
以下、第2の実施の形態の計算機装置10aについて、前述した第1の実施の形態との相違点を中心に説明し、同様の事項については、その説明を省略する。
Next, a computer apparatus according to the second embodiment will be described.
FIG. 8 is a diagram illustrating a computer apparatus according to the second embodiment.
Hereinafter, the computer apparatus 10a according to the second embodiment will be described with a focus on differences from the first embodiment described above, and description of similar matters will be omitted.
第2の実施の形態の計算機装置10aは、キャッシュ履歴テーブル13aの構成が異なり、それ以外は第1の実施の形態と同様である。
計算機装置10aのキャッシュ履歴テーブル13aは、テーブル内の記録場所を仮想計算機に関連づけて履歴データを管理している。具体的には、テーブル内を図7中上側から順番に各仮想計算機用にエリア分けしたbank単位で履歴データを管理している。1つのbank21bは、仮想計算機のVM−IDに等しい(または対応する)ID(VM#0、VM#1、・・・)を有しており、各bank21bには、それぞれバリッドビットおよびアドレスが格納される。
The computer apparatus 10a according to the second embodiment is the same as the first embodiment except for the configuration of the cache history table 13a.
The cache history table 13a of the computer device 10a manages history data by associating a recording location in the table with a virtual computer. Specifically, the history data is managed in units of banks in which the table is divided into areas for each virtual computer in order from the upper side in FIG. One
次に、第2の実施の形態の計算機装置10aのリカバリ動作について説明する。
VM切替入力信号をトリガーとしてリカバリコントローラ15がリカバリ動作を開始する(ステップS21)。
Next, the recovery operation of the computer apparatus 10a according to the second embodiment will be described.
The
リカバリコントローラ15は、VM−IDレジスタ14に格納されているVM−IDをチェックする(ステップS22)。
リカバリコントローラ15は、チェックしたVM−IDに一致するVM−IDを有するキャッシュ履歴テーブル13a上のbank21bを検索する(ステップS23)。
The
The
検索の結果、該当したbank21b(図8では、VM#1のbank21b)内の各エントリのバリッドビットを参照して該当したそのエントリが有効か否かを判断し(ステップS24)、有効であると判断したエントリに格納されているアドレスを参照する(ステップS25)。
As a result of the search, it is determined whether or not the corresponding entry is valid by referring to the valid bit of each entry in the corresponding
そして、参照したアドレスをフェッチアドレスとしてキャッシュコントローラへフェッチ要求を出す(ステップS26)。
参照したアドレスのデータが、メモリ12からフェッチされ(ステップS27)、再度キャッシュ11に格納されことにより、キャッシュデータの復元が完了する。
Then, a fetch request is issued to the cache controller using the referenced address as a fetch address (step S26).
The data at the referenced address is fetched from the memory 12 (step S27) and stored again in the
以上で第2の実施の形態のリカバリ動作を終了する。
この第2の実施の形態の計算機装置10aによれば、第1の実施の形態の計算機装置10と同様の効果が得られる。
This completes the recovery operation of the second embodiment.
According to the computer apparatus 10a of the second embodiment, the same effect as that of the computer apparatus 10 of the first embodiment can be obtained.
そして、第2の実施の形態の計算機装置10aによれば、キャッシュ履歴テーブル13a上に各仮想計算機用のバリッドビットおよびアドレスを格納する領域が固定的に決まるので、必要な履歴データとして、該当する固定エリアのみを参照すればよく、キャッシュ履歴テーブル13a上を全て探索する必要がなくなるため、リカバリ動作時のキャッシュ履歴テーブル13aの無駄な走査を削減することができ、その分、より高速なリカバリ処理を行うことができる。これにより、リカバリ処理のオーバーヘッドが万一あったとしても無駄な走査を削減することができる。 According to the computer apparatus 10a of the second embodiment, the area for storing the valid bits and addresses for each virtual machine is fixedly determined on the cache history table 13a. Since only the fixed area needs to be referred to and it is not necessary to search all over the cache history table 13a, it is possible to reduce unnecessary scanning of the cache history table 13a during the recovery operation, and thus, faster recovery processing. It can be performed. Thereby, even if there is an overhead of recovery processing, useless scanning can be reduced.
次に、第3の実施の形態の計算機装置について説明する。
以下、第3の実施の形態の計算機装置について、前述した第1の実施の形態との相違点を中心に説明し、同様の事項については、その説明を省略する。
Next, a computer apparatus according to the third embodiment will be described.
Hereinafter, the computer apparatus according to the third embodiment will be described with a focus on differences from the first embodiment described above, and description of similar matters will be omitted.
第3の実施の形態の計算機装置は、キャッシュデータの形態およびキャッシュデータのキャッシュ履歴テーブル13への記録方法が第1の実施の形態の計算機装置10と異なっている。 The computer apparatus of the third embodiment is different from the computer apparatus 10 of the first embodiment in the form of cache data and the method of recording the cache data in the cache history table 13.
図9は、第3の実施の形態の計算機装置のキャッシュの内部構造を示す図である。
キャッシュ11には、データ格納領域としてキャッシュエントリ11aが設けられている。
FIG. 9 is a diagram illustrating an internal structure of the cache of the computer apparatus according to the third embodiment.
The
キャッシュエントリ11aは、バリッドビット、アドレスおよびデータの格納領域に加えて、VM−IDの格納領域を有している。このVM―IDは、例えばキャッシュコントローラによって付加することができる。 The cache entry 11a has a VM-ID storage area in addition to a valid bit, address, and data storage area. This VM-ID can be added by, for example, a cache controller.
次に、第3の実施の形態の計算機装置の履歴データの記録方法(追い出しアドレス記録方法)について説明する。
図10は、第3の実施の形態の履歴データの記録方法を説明する図である。なお、図10に示す計算機装置10bは、計算機装置10と同様の部分については図示を省略しており、同時期に行う動作については、同じステップ番号を付している。
Next, a history data recording method (ejected address recording method) of the computer apparatus of the third embodiment will be described.
FIG. 10 is a diagram for explaining a history data recording method according to the third embodiment. Note that the computer apparatus 10b shown in FIG. 10 omits the same portions as those of the computer apparatus 10, and the same step numbers are assigned to the operations performed at the same time.
リカバリコントローラ15は、キャッシュ11からのデータ追出し(Eject)やデータ無効化(Invalidate)を観察する(ステップS1a)。
そして、データ追出しやデータ無効化が発生すると、キャッシュ11から追出されたり(Ejected)、無効化されたり(Invalidated)したキャッシュエントリ11a内に記録されていたアドレスと、その同じキャッシュエントリ11a内に記録されていたVM−IDを読み込む(ステップS2a)。
The
When data eviction or data invalidation occurs, the address recorded in the cache entry 11a that has been evicted (Ejected) or invalidated (invalidated) from the
そして、読み込んだアドレスとVM−IDとを履歴データとしてキャッシュ履歴テーブル13の履歴エントリ21に記録し、その履歴エントリのバリッドビットを有効(1)にする(ステップS3a)。 Then, the read address and VM-ID are recorded as history data in the history entry 21 of the cache history table 13, and the valid bit of the history entry is made valid (1) (step S3a).
このような方法によっても履歴エントリ21、21、・・・にそれぞれ履歴データが格納される。
この第3の実施の形態の計算機装置10bによれば、第1の実施の形態の計算機装置10と同様の効果が得られる。
Also by such a method, history data is stored in the history entries 21, 21,.
According to the computer apparatus 10b of the third embodiment, the same effect as that of the computer apparatus 10 of the first embodiment can be obtained.
そして、第3の実施の形態の計算機装置10bによれば、キャッシュ履歴テーブル13にはリカバリの必要があるキャッシュデータのみが記録されるため、無駄なデータの復元がなくなり、より効率的なリカバリ、すなわちキャッシュをより有効に利用できる様になるので、さらに仮想計算機環境全体の性能を向上させることができる。 And according to the computer apparatus 10b of the third embodiment, only cache data that needs to be recovered is recorded in the cache history table 13, so there is no need to restore useless data, and more efficient recovery, That is, since the cache can be used more effectively, the performance of the entire virtual machine environment can be further improved.
以下に示す第4〜第9の実施の形態では、例えば、時間的局所性等の概念を導入してバリッドビットの役割を具体化させ、より優先度の高いキャッシュデータを復元させることにより、無駄な復元を削減させる。 In the following fourth to ninth embodiments, for example, a concept such as temporal locality is introduced to make the role of valid bits concrete, and cache data having a higher priority is restored. Reduce the amount of restoration.
以下、第4の実施の形態の計算機装置について、前述した第1の実施の形態との相違点を中心に説明し、同様の事項については、その説明を省略する。
第4の実施の形態の計算機装置は、履歴エントリに格納されている履歴データの形態およびその制御方法が第1の実施の形態の計算機装置10と異なっている。
Hereinafter, the computer apparatus according to the fourth embodiment will be described focusing on the differences from the first embodiment described above, and description of similar matters will be omitted.
The computer apparatus of the fourth embodiment is different from the computer apparatus 10 of the first embodiment in the form of history data stored in the history entry and its control method.
図11は、第4の実施の形態の履歴データを示す図である。
本実施の形態の履歴エントリ21に格納されている履歴データは、VM−ID、Aビット(アクセスビット)およびデータアドレス(address)で構成されている。なお、図11では、キャッシュ履歴テーブル13等の図示を省略している。
FIG. 11 is a diagram illustrating history data according to the fourth embodiment.
The history data stored in the history entry 21 of this embodiment is composed of a VM-ID, an A bit (access bit), and a data address (address). In FIG. 11, the cache history table 13 and the like are not shown.
Aビットは、バリッドビット(リカバリ制御ビット)を具体化したものであり、履歴エントリ21に格納されている履歴データが使用された頻度を示す指標となるものである。具体的には、AビットがON(1)している履歴データは、使用頻度の比較的高いデータであり、AビットがOFF(0)している履歴データは、使用頻度の比較的低いデータである。以下、このAビットをONする方法、OFFする方法およびこの履歴データを用いたときの計算機装置の制御方法を順番に説明する。 The A bit embodies a valid bit (recovery control bit) and serves as an index indicating the frequency with which history data stored in the history entry 21 is used. Specifically, history data whose A bit is ON (1) is data having a relatively high use frequency, and history data whose A bit is OFF (0) is data having a relatively low use frequency. It is. Hereinafter, a method of turning on the A bit, a method of turning off the A bit, and a control method of the computer apparatus using the history data will be described in order.
図12は、AビットをONする方法を示す図である。
本実施の形態の計算機装置は、アクセス監視部41と、AND回路42〜44とを有している。
FIG. 12 is a diagram illustrating a method of turning on the A bit.
The computer apparatus according to the present embodiment includes an
アクセス監視部41は、CPU101からキャッシュ11へのアクセスを監視する。そして、アクセスがあれば、そのアドレスをAND回路43に出力する。
AND回路42は、AND回路16とは別個に設けられ、VM−IDレジスタ14に格納されている現在動作している仮想計算機のVM−IDと履歴エントリ21に格納されている履歴データのVM−IDとの一致を判断する。
The
The AND
このAND回路42は、これらのVM−IDが一致したときは「1」を出力し、それ以外は「0」を出力する。
AND回路43は、アクセス監視部41が監視しているアドレスと履歴エントリ21内のアドレスとの一致を判断するために設けられている。
The AND
The AND
このAND回路43は、これらのアドレスが一致したときは「1」を出力し、それ以外は「0」を出力する。
AND回路44は、AND回路42の出力とAND回路43の出力がともに「1」のときのみAビットをONする。
The AND
The AND
図13は、AビットをOFFする方法を示す図である。
本実施の形態の計算機装置は、プログラム実行部101aと、タイマ101bと、AND回路45、47と、OR回路46と、Aビットクリア実行部48とを有している。
FIG. 13 is a diagram illustrating a method of turning off the A bit.
The computer apparatus according to the present embodiment includes a
プログラム実行部101aおよびタイマ101bは、それぞれCPU101の一機能であり、定期的にAビットのクリア信号を出力する。
また、クリア信号を出力するタイミングは、特に限定されないが、例えば、仮想計算機の割当て時間等に応じて設定するのが好ましく、一例としては、仮想計算機の割当て時間が5ms〜15msの場合、100μm毎や1ms毎等が挙げられる。また、タイマ101bにおいては、新たなクリア信号を出力するのではなく、上記タイミングの信号が存在すれば既存の信号をそのまま用いるようにしてもよい。
Each of the
The timing for outputting the clear signal is not particularly limited, but is preferably set according to, for example, the allocation time of the virtual machine. For example, when the allocation time of the virtual machine is 5 ms to 15 ms, every 100 μm Or every 1 ms. Further, the
AND回路45は、前述したAND回路42と同様の機能を有している。なお、AND回路42がAND回路45を兼ねていてもよい。その場合、AND回路42の出力をAND回路47にも出力するよう構成する。
The AND
OR回路46は、プログラム実行部101aまたはタイマ101bのいずれか一方からクリア信号が出力されると「1」を出力する。
AND回路47は、AND回路45の出力とOR回路46の出力がともに「1」のときは「1」を出力する。
The OR
The AND
Aビットクリア実行部48は、AND回路47の出力が「1」のときAビットをOFFする。
このように、リカバリ動作とは別に、履歴データの使用頻度に従ってAビットはONまたはOFFする。
The A bit
Thus, apart from the recovery operation, the A bit is turned ON or OFF according to the usage frequency of the history data.
図14は、第4の実施の形態の計算機装置のリカバリ動作を説明する図である。
図6に示す第1の実施の形態の計算機装置10のリカバリ動作と異なる点について説明し、同様の点については説明を省略する。
FIG. 14 is a diagram for explaining the recovery operation of the computer apparatus according to the fourth embodiment.
Differences from the recovery operation of the computer apparatus 10 according to the first embodiment shown in FIG. 6 will be described, and description of similar points will be omitted.
第4の実施の形態の計算機装置10cのリカバリコントローラ15は、キャッシュ履歴テーブル13上の各履歴エントリ21、21、・・・を逐次チェックしていく(ステップS12)。
The
具体的には、AND回路16が、リカバリコントローラ15の指示によって逐次入力される履歴エントリ21、21、・・・内のAビットおよびIDタグ(=VM−ID)と、VM切替信号入力時にVM−IDレジスタ14から入力されるこれから動作しようとしている仮想計算機のVM−IDとを比較し、その結果をリカバリコントローラ15に出力する(ステップS13a)。
Specifically, the AND
これにより、リカバリコントローラ15は、AND回路16から「1」が出力された履歴データ、すなわち、VM−IDが一致し、AビットがONになっている履歴データのアドレスのみを参照し、参照したアドレスをフェッチアドレスとしてキャッシュコントローラへフェッチ要求を出す(ステップS15)。
As a result, the
この第4の実施の形態の計算機装置10cによれば、第1の実施の形態の計算機装置10と同様の効果が得られる。
そして、第4の実施の形態の計算機装置10cによれば、AビットをONまたはOFFする機構を設け、AビットがONになっている履歴データのみリカバリ、プリフェッチを行うようにしたので、リカバリ対象の選択基準を高精度化することができる。これにより、無駄なキャッシュリカバリを防止することができ、リソースとしてのキャッシュ使用の効率化を図ることができる。また、迅速なキャッシュリカバリを行うことができる。
According to the computer apparatus 10c of the fourth embodiment, the same effect as the computer apparatus 10 of the first embodiment can be obtained.
According to the computer apparatus 10c of the fourth embodiment, a mechanism for turning ON or OFF the A bit is provided, and recovery and prefetching are performed only for history data in which the A bit is ON. The selection criteria can be made highly accurate. As a result, useless cache recovery can be prevented, and the use of cache as a resource can be made more efficient. In addition, quick cache recovery can be performed.
次に、第5の実施の形態の計算機装置について説明する。
以下、第5の実施の形態の計算機装置について、前述した第4の実施の形態との相違点を中心に説明し、同様の事項については、その説明を省略する。
Next, a computer apparatus according to a fifth embodiment will be described.
Hereinafter, the computer apparatus according to the fifth embodiment will be described with a focus on differences from the fourth embodiment described above, and description of similar matters will be omitted.
第5の実施の形態の計算機装置は、履歴エントリに格納されている履歴データの形態およびリカバリ動作が第4の実施の形態の計算機装置10cと異なっている。
図15は、第5の実施の形態の履歴データを示す図である。
The computer apparatus according to the fifth embodiment is different from the computer apparatus 10c according to the fourth embodiment in the form of history data stored in the history entry and the recovery operation.
FIG. 15 is a diagram illustrating history data according to the fifth embodiment.
本実施の形態の履歴エントリ21に格納されている履歴データは、VM−ID、参照ビット、変更ビットおよびデータアドレス(address)で構成されている。なお、図15では、キャッシュ履歴テーブル13等の図示を省略している。 The history data stored in the history entry 21 of this embodiment is composed of a VM-ID, a reference bit, a change bit, and a data address (address). In FIG. 15, the cache history table 13 and the like are not shown.
参照ビットおよび変更ビットは、Aビットの機能をより細分化したものであり、Aビットと同様に、履歴エントリ21に格納されている履歴データが使用された頻度を示す指標となるものである。具体的には、CPU101からキャッシュ11への参照(read)要求があれば、対応する履歴エントリ21の履歴データの参照ビットをONし、CPU101からキャッシュ11への更新(write)要求があれば、対応する履歴エントリの履歴データの更新ビットをONする。また、第4の実施の形態と同様に、未使用の参照ビットおよび更新ビットを定期的にOFFする。
The reference bit and the change bit are subdivided functions of the A bit, and, like the A bit, serve as an index indicating the frequency with which the history data stored in the history entry 21 is used. Specifically, if there is a reference (read) request from the
さらに第5の実施の形態の計算機装置は、この履歴データを制御するための機能を有している。
図16は、第5の実施の形態の計算機装置を示す図である。
Furthermore, the computer apparatus of the fifth embodiment has a function for controlling the history data.
FIG. 16 illustrates a computer apparatus according to the fifth embodiment.
計算機装置10dは、優先対象設定部51と有効ランク設定部52と有効ランク制御部53とを有している。
優先対象設定部51には、参照要求と更新要求のどちらを優先するのかが設定されている。
The computer apparatus 10 d includes a priority
The priority
有効ランク設定部52には、リカバリ動作時に、リカバリ対象とする履歴データの優先度を示すランクが設定されている。
図17は、ランクを示す図である。
The effective
FIG. 17 is a diagram showing ranks.
ランクは、例えばテーブル化されて格納されており、ランクテーブル52aは、参照ビットを優先したランクを示している。参照ビットおよび更新ビットの組み合わせによりランクが定まり、ランク1が一番優先度が高く、ランク4が一番優先度が低い。
The rank is stored in a table, for example, and the rank table 52a indicates a rank that prioritizes reference bits. The rank is determined by the combination of the reference bit and the update bit,
図16に戻って説明する。
有効ランク制御部53は、優先対象設定部51および有効ランク設定部52により設定された設定基準に基づいて、履歴データに含まれる参照ビットおよび変更ビットが設定基準を満たしているか否かを判断する。例えば、優先対象設定部51には参照要求が優先されることが設定され、有効ランク設定部52にランク2が設定されているときは、図17に示すランクテーブル52aが参照され、参照ビットおよび更新ビットがともに「1」の履歴データ、または参照ビットが「1」、更新ビットが「0」の履歴データのみ設定基準を満たしていると判断する。そして、有効ランク制御部53は、設定基準を満たしているときは、「1」を出力し、満たしていないときは「0」を出力する。
Returning to FIG.
The effective
次に、計算機装置10dのリカバリ動作を説明する。第4の実施の形態のリカバリ動作と異なる点について説明し、同様の点については説明を省略する。
リカバリコントローラ15は、キャッシュ履歴テーブル13上の各履歴エントリ21、21、・・・を逐次チェックしていく(ステップS12)。
Next, the recovery operation of the computer apparatus 10d will be described. Differences from the recovery operation of the fourth embodiment will be described, and description of similar points will be omitted.
The
具体的には、AND回路16が、リカバリコントローラ15の指示によって逐次入力される履歴エントリ21、21、・・・内のIDタグ(=VM−ID)と、VM切替信号入力時にVM−IDレジスタ14から入力されるこれから動作しようとしている仮想計算機のVM−IDとを比較する。また、有効ランク制御部53の出力をチェックする。そして、その結果をリカバリコントローラ15に出力する(ステップS13b)。
Specifically, the AND
これにより、リカバリコントローラ15は、AND回路16から「1」が出力された履歴データ、すなわち、VM−IDが一致し、上記設定基準を満たした履歴データのアドレスのみを参照し、参照したアドレスをフェッチアドレスとしてキャッシュコントローラへフェッチ要求を出す(ステップS15)。
As a result, the
この第5の実施の形態の計算機装置10dによれば、第4の実施の形態の計算機装置10cと同様の効果が得られる。
そして、第5の実施の形態の計算機装置10dによれば、参照ビットおよび更新ビットという、より細かい段階的な判断基準を設けたことにより、リカバリ対象の履歴データの絞り込みができ、さらに、リカバリとキャッシュリソース使用の効率化を図ることができる。
According to the computer apparatus 10d of the fifth embodiment, the same effect as the computer apparatus 10c of the fourth embodiment can be obtained.
According to the computer apparatus 10d of the fifth embodiment, the history data to be recovered can be narrowed down by providing finer stepwise judgment criteria such as reference bits and update bits. The use of cache resources can be made more efficient.
<変形例>
図示していないが、バリッドビットの代わりに、ビットを使用せず、CPUやシステムが備える「タイム・スタンプ・カウンタ」や、「CPUサイクル数カウンタ」等、単調増加するカウンタのカウンタ値を履歴データとともに記録し、より具体的な使用時刻を特定するようにしてもよい。この場合、ビットの定期的なクリア動作を省略することができる。また、この場合、リカバリ動作時のリカバリ対象の履歴データの選出基準として有効数や具体的な時刻を用いることもできる。
<Modification>
Although not shown, instead of a valid bit, the counter value of a monotonically increasing counter such as a “time stamp counter” or “CPU cycle counter” provided in the CPU or system is used as history data without using a bit. It may be recorded together with a more specific use time. In this case, the periodic bit clear operation can be omitted. In this case, an effective number or a specific time can also be used as a criterion for selecting history data to be recovered during the recovery operation.
次に、第6の実施の形態の計算機装置について説明する。
以下、第6の実施の形態の計算機装置について、前述した第4の実施の形態との相違点を中心に説明し、同様の事項については、その説明を省略する。
Next, a computer apparatus according to the sixth embodiment will be described.
Hereinafter, the computer apparatus according to the sixth embodiment will be described focusing on the differences from the above-described fourth embodiment, and description of similar matters will be omitted.
第6の実施の形態の計算機装置は、履歴エントリに格納されている履歴データの形態およびリカバリ動作が第4の実施の形態の計算機装置10cと異なっている。
図18は、第6の実施の形態の計算機装置を示す図である。
The computer apparatus of the sixth embodiment is different from the computer apparatus 10c of the fourth embodiment in the form of history data stored in the history entry and the recovery operation.
FIG. 18 illustrates a computer apparatus according to the sixth embodiment.
本実施の形態の計算機装置10eの履歴エントリ21に格納されている履歴データは、VM−ID、カウンタおよびデータアドレス(address)で構成されている。カウンタは、その履歴データの使用頻度を表すものであり少なくとも2ビット以上で構成されている。 The history data stored in the history entry 21 of the computer apparatus 10e of this embodiment is composed of a VM-ID, a counter, and a data address (address). The counter represents the usage frequency of the history data and is composed of at least two bits.
カウンタのインクリメント方法は、図12に示したAビットをONする方法と同様である。但し、本実施の形態ではAND回路44から「1」が出力される度に、カウンタをインクリメントする。
The method of incrementing the counter is the same as the method of turning on the A bit shown in FIG. However, in this embodiment, every time “1” is output from the AND
また、計算機装置10eは、有効閾値設定部61と、カウンタ比較部62とを有している。
有効閾値設定部61には、カウンタ比較部62が比較するカウンタの閾値(例えば10回以上等)が設定されている。
The computer apparatus 10 e includes an effective threshold
In the effective threshold
カウンタ比較部62は、有効閾値設定部61により設定されたカウンタの閾値と履歴エントリ21に格納されている履歴データのカウンタのカウンタ値とを比較する。そして、カウンタの閾値の条件を満たしているか否かを判断し、満たしているときは、「1」を出力し、満たしていないときは「0」を出力する。
The
次に、計算機装置10eのリカバリ動作を説明する。第4の実施の形態のリカバリ動作と異なる点について説明し、同様の点については説明を省略する。
リカバリコントローラ15は、キャッシュ履歴テーブル13上の各履歴エントリ21、21、・・・を逐次チェックしていく(ステップS12)。
Next, the recovery operation of the computer apparatus 10e will be described. Differences from the recovery operation of the fourth embodiment will be described, and description of similar points will be omitted.
The
具体的には、AND回路16が、リカバリコントローラ15の指示によって逐次入力される履歴エントリ21、21、・・・内のIDタグ(=VM−ID)と、VM切替信号入力時にVM−IDレジスタ14から入力されるこれから動作しようとしている仮想計算機のVM−IDとを比較する。また、カウンタ比較部62の出力をチェックする。そして、その結果をリカバリコントローラ15に出力する(ステップS13c)。
Specifically, the AND
これにより、リカバリコントローラ15は、AND回路16から「1」が出力された履歴データ、すなわち、VM−IDが一致し、上記カウンタの閾値の条件を満たした履歴データのアドレスのみを参照し、参照したアドレスをフェッチアドレスとしてキャッシュコントローラへフェッチ要求を出す(ステップS15)。
As a result, the
この第6の実施の形態の計算機装置10eによれば、第4の実施の形態の計算機装置10cと同様の効果が得られる。
そして、第6の実施の形態の計算機装置10eによれば、カウンタを用いたので、より細かいリカバリ対象の履歴データの絞り込みができ、さらに、リカバリとキャッシュリソース使用の効率化を図ることができる。
According to the computer apparatus 10e of the sixth embodiment, the same effect as the computer apparatus 10c of the fourth embodiment can be obtained.
According to the computer device 10e of the sixth embodiment, since the counter is used, it is possible to narrow down the history data to be recovered more finely, and further to improve the efficiency of recovery and cache resource use.
<変形例1>
なお、本実施の形態では、キャッシュのアクセス種別によらず、アクセスの度にカウンタをインクリメントするようにしたが、本発明はこれに限らず、例えば、アクセス種別(参照、更新)により、1回のカウンタ増分に重み付けを行い、更新に比べ参照を優先させたり、参照のみを有効としたりするよう制御してもよい。
<
In the present embodiment, the counter is incremented for each access regardless of the access type of the cache. However, the present invention is not limited to this, for example, once according to the access type (reference, update). The counter increment may be weighted so that the reference is prioritized over the update or only the reference is valid.
<変形例2>
また、本実施の形態では、単調増加のカウンタを用いたが、本発明はこれに限らず、例えば、エイジング方式のカウンタ(エイジングカウンタ)を利用することもできる。
<
In this embodiment, a monotonically increasing counter is used. However, the present invention is not limited to this, and for example, an aging counter (aging counter) can be used.
図19は、エイジングカウンタの推移を示す図である。
各履歴エントリ21に格納されている全てのデータのエイジングカウンタが、クロック割り込みやメモリアクセス命令時に以下のルールで更新される。
FIG. 19 is a diagram showing the transition of the aging counter.
The aging counter of all data stored in each history entry 21 is updated according to the following rule at the time of clock interrupt or memory access instruction.
(1)キャッシュアクセスのあったデータと同じ履歴データのエイジングカウンタは右シフトしてから最も左のビットをインクリメントする。
(2)アクセスのなかった履歴データのエイジングカウンタは右シフトのみ行う。
(1) The aging counter of the same history data as the data accessed by the cache shifts to the right and then increments the leftmost bit.
(2) The aging counter of history data that has not been accessed is only shifted to the right.
これにより、最近のアクセス頻度が高い履歴データほど、カウンタ値が大きくなる。そして、カウンタ比較部62は、有効閾値設定部61に設定されている値以上のカウンタ値の場合「1」を出力する。
As a result, the history data having a higher access frequency recently has a larger counter value. Then, the
このようなエイジングカウンタを設けることにより、定期的なクリア動作を省略することができる。
次に、第7の実施の形態の計算機装置について説明する。
By providing such an aging counter, a periodic clear operation can be omitted.
Next, a computer apparatus according to a seventh embodiment will be described.
以下、第7の実施の形態の計算機装置について、前述した第2の実施の形態との相違点を中心に説明し、同様の事項については、その説明を省略する。
第7の実施の形態の計算機装置は、履歴データの格納方法および取り出し方法が第2の実施の形態の計算機装置10aと異なっている。
Hereinafter, the computer apparatus according to the seventh embodiment will be described with a focus on differences from the second embodiment described above, and description of similar matters will be omitted.
The computer apparatus of the seventh embodiment is different from the computer apparatus 10a of the second embodiment in the history data storage method and retrieval method.
図20は、第7の実施の形態の計算機装置(の一部)を示す図である。
第7の実施の形態の計算機装置は、各bank21bに対し、FIFO(First In First Out)制御を行うFIFO制御部71をさらに有している。。
FIG. 20 is a diagram illustrating (a part of) the computer apparatus according to the seventh embodiment.
The computer apparatus according to the seventh embodiment further includes a
以下、第7の実施の形態の計算機装置の動作を、VM−IDレジスタ14のVM−IDがVM#1の場合を例にとって説明する。
まず、FIFO制御部71は、キャッシュアクセス時に、該当する履歴データがVM#1のbank21b内に存在しない場合は、そのキャッシュ履歴を履歴データとしてbank21bの入口en1側(図20中、上側)にエンキューする。
Hereinafter, the operation of the computer apparatus of the seventh embodiment will be described by taking as an example the case where the VM-ID of the VM-
First, if the corresponding history data does not exist in the
一方、キャッシュアクセス時に、該当する履歴データがキャッシュ履歴テーブル13a内に存在する場合、その履歴データを抜き出して再度エンキューする。
そしてbank21bが一杯になった場合は、FIFO制御部71は、キューの出口ex1側(図20中、下側)に最も近い履歴データを廃棄する。
On the other hand, when the corresponding history data exists in the cache history table 13a at the time of cache access, the history data is extracted and enqueued again.
When the
また、FIFO制御部71は、リカバリ動作時にリカバリ対象とする履歴データを、bank21bの入口en1側から所定個数分、指定する。
そしてリカバリ時には、リカバリコントローラ15が、FIFO制御部71が指定した個数分の履歴データを用いてリカバリを行う。すなわち、本実施の形態の計算機装置(リカバリコントローラ15)は、LIFO(Last In First Out)制御を行う。
Further, the
At the time of recovery, the
この第7の実施の形態の計算機装置によれば、第2の実施の形態の計算機装置10aと同様の効果が得られる。
そして、第7の実施の形態の計算機装置によれば、履歴エントリの記録管理にFIFO制御を行い、リカバリ動作時にLIFO制御を行うようにしたので、CPU101とキャッシュ11との間のアクセスを監視したり、ビットのON/OFFを行ったりする必要がないので、計算機装置の構成を大幅に拡張することなく、リカバリとキャッシュリソース使用の効率化を図ることができる。また、リカバリ対象とする履歴データの個数を変えることで、計算機装置の性能に応じた処理を実行させることができる。
According to the computer apparatus of the seventh embodiment, the same effect as that of the computer apparatus 10a of the second embodiment can be obtained.
According to the computer apparatus of the seventh embodiment, since the FIFO control is performed for the record management of the history entry and the LIFO control is performed during the recovery operation, the access between the
なお、本実施の形態では、FIFO制御部71が、リカバリ対象とする履歴データの個数を指定したが、リカバリコントローラ15がリカバリ対象とする履歴データの個数を指定するようにしてもよい。
In the present embodiment, the
次に、第8の実施の形態の計算機装置について説明する。
以下、第8の実施の形態の計算機装置について、前述した第4の実施の形態との相違点を中心に説明し、同様の事項については、その説明を省略する。
Next, a computer apparatus according to an eighth embodiment will be described.
Hereinafter, the computer apparatus according to the eighth embodiment will be described focusing on the differences from the above-described fourth embodiment, and description of similar matters will be omitted.
第8の実施の形態の計算機装置は、履歴データの管理方法が第4の実施の形態の計算機装置10cと異なっている。
図21は、第8の実施の形態の計算機装置を示す図である。
The computer apparatus of the eighth embodiment is different from the computer apparatus 10c of the fourth embodiment in the management method of history data.
FIG. 21 is a diagram illustrating a computer apparatus according to the eighth embodiment.
第8の実施の形態の計算機装置は、ライトバック(write back)監視部81と無効化信号監視部82とOR回路83と、履歴データ削除部84とをさらに有している。
ライトバック監視部81は、キャッシュ11からのメモリ12へのライトバック(CPU101からメモリ12にデータ書込が行われても、キャッシュ11上のデータを更新するだけで、条件が整わない限りメモリ12への書き込み反映を行わない方式)を監視し、ライトバックを検出すると、OR回路83にそのキャッシュデータのアドレスを出力する。
The computer apparatus according to the eighth embodiment further includes a write back monitoring
The write-
無効化信号監視部82は、キャッシュ11への無効化命令を監視し、無効化命令を検出すると、OR回路83に、その無効化命令のキャッシュデータのアドレスを出力する。
OR回路83は、ライトバック監視部81または無効化信号監視部82のいずれか一方からアドレスが出力されると、そのアドレスを出力する。
The invalidation
When an address is output from either the write-
AND回路43aは、OR回路83が出力するアドレスと履歴エントリ21内のアドレスとの一致を判断するために設けられている。
このAND回路43aは、これらのアドレスが一致したときは「1」を出力し、それ以外は「0」を出力する。
The AND
The AND
履歴データ削除部84は、AND回路44から「1」が出力されると、該当するVM−IDを備える履歴データをキャッシュ履歴テーブル13から削除する。
この第8の実施の形態の計算機装置によれば、第4の実施の形態の計算機装置10cと同様の効果が得られる。
When “1” is output from the AND
According to the computer apparatus of the eighth embodiment, the same effect as the computer apparatus 10c of the fourth embodiment can be obtained.
そして、第8の実施の形態の計算機装置によれば、現在動作中の仮想計算機におけるキャッシュデータの無効化情報等についても、キャッシュ履歴テーブル13の履歴データに反映させることができる。これにより、第4の実施の形態〜第7の実施の形態に比べ、さらに、キャッシュリカバリの効率化を図ることができる。 According to the computer apparatus of the eighth embodiment, the cache data invalidation information and the like in the currently operating virtual machine can be reflected in the history data of the cache history table 13. Thereby, compared with the fourth to seventh embodiments, it is possible to further improve the efficiency of cache recovery.
次に、第9の実施の形態の計算機装置について説明する。
以下、第9の実施の形態の計算機装置について、前述した第4の実施の形態との相違点を中心に説明し、同様の事項については、その説明を省略する。
Next, a computer apparatus according to a ninth embodiment will be described.
Hereinafter, the computer apparatus according to the ninth embodiment will be described focusing on differences from the above-described fourth embodiment, and description of similar matters will be omitted.
第9の実施の形態の計算機装置は、履歴データの管理方法が第4の実施の形態の計算機装置10cと異なっている。具体的には、第9の実施の形態の計算機装置は、メモリデータをキャッシュへ割り当てる方式としてセットアソシアティブ(set associative)方式を使用し、さらにそのセット内のデータ置換方式としてLRU(Least Recently Used)方式を利用している。 The computer apparatus of the ninth embodiment is different from the computer apparatus 10c of the fourth embodiment in the management method of history data. Specifically, the computer apparatus according to the ninth embodiment uses a set associative method as a method for allocating memory data to a cache, and further uses a LRU (Least Recently Used) as a data replacement method within the set. The method is used.
図22は、第9の実施の形態の計算機装置(の一部)を示す図である。
第9の実施の形態の計算機装置10fは、キャッシュ11の代わりにキャッシュ11bを有し、キャッシュ履歴テーブル13に格納される履歴データは、キャッシュ11bのLRU情報(後述)に応じてセットされるUビットを有している。
FIG. 22 is a diagram illustrating (a part of) the computer apparatus according to the ninth embodiment.
The computer apparatus 10f according to the ninth embodiment includes a
また、計算機装置10fは、このUビットをセットするためのLRU情報反映部15aをリカバリコントローラ15とは別個に有している。なお、図22では、リカバリコントローラ15等の図示を省略している。
Further, the computer apparatus 10 f has an LRU
図23は、第9の実施の形態のキャッシュを示す図である。
キャッシュ11bは、キャッシュアドレス/データ格納部111と、LRU情報格納部112とを有している。
FIG. 23 is a diagram illustrating a cache according to the ninth embodiment.
The
キャッシュアドレス/データ格納部111は、複数のキャッシュライン(図23では、Way#0〜Way#3)を備える格納領域を示すSET#n(n=1、2、・・・、k)を有している。
The cache address /
LRU情報格納部112には、SET#n内のキャッシュラインWay#0〜Way#3の優先順を示す数値を備えるLRU情報が格納されている。「1」が最も新しく(最近使用され)、「4」が最も古い(使われてから最も時間が経過している)。
The LRU
キャッシュアドレス/データ格納部111の情報とLRU情報格納部112の情報の、横方向に並べられた情報同士が互いに関連づけられている。
ここで、SET#n内のキャッシュデータが書き換えられる場合、最も古いデータが廃棄され、新しくキャッシュされたデータに置き換わる。すなわち、図23では、SET#n内のキャッシュラインWay#2のキャッシュデータが、SET#nにおける次の置換対象(リプレース対象)である。
Information arranged in the horizontal direction of the information in the cache address /
Here, when the cache data in SET # n is rewritten, the oldest data is discarded and replaced with newly cached data. That is, in FIG. 23, the cache data of the cache
次に、第9の実施の形態の計算機装置のUビットの制御方法を説明する。
図24は、第9の実施の形態の計算機装置のUビットの制御方法を示す図である。
なお、この処理は、リカバリ動作前に行われる処理である。
Next, a method for controlling the U bit of the computer apparatus according to the ninth embodiment will be described.
FIG. 24 is a diagram illustrating a U bit control method of the computer apparatus according to the ninth embodiment.
This process is performed before the recovery operation.
まず、VM切替のうち他VMへの切替信号をトリガーとしてLRU情報反映部15aが、動作を開始する(ステップS31)。具体的には、キャッシュ履歴テーブル13から自己の履歴データを見つけるために、VM−IDレジスタ14に格納されている(新たな仮想計算機ではなく)現在の仮想計算機のVM−IDに一致する全ての履歴エントリ21のVM−IDをチェックし(ステップS32、S33)、一致する履歴エントリ21のアドレスを参照する(ステップS34)。
First, the LRU
そして、そのアドレスを有するキャッシュアドレス/データ格納部111をキャッシュ11bから検索する(ステップS35)。
次に、LRU情報反映部15aが、見つかったキャッシュアドレス/データ格納部111に対応するLRU情報格納部112からLRU情報を取り出す(ステップS36)。
Then, the
Next, the LRU
そして、LRU情報反映部15aが、取り出したLRU情報を、ステップS34にて参照したアドレスの履歴エントリ21のUビットに反映する(ステップS37)。これは、例えば、LRU情報が「4」であれば、UビットはOFF(0)、LRU情報が「1」〜「3」であれば、UビットはON(1)にセットするようにしてもよいし、ステップS33終了時に一致する履歴エントリのUビットをON(1)にセットしておき、取り出したLRU情報が「4」であるときのみOFF(0)にセットするようにしてもよい。
Then, the LRU
これにより、リカバリ動作時には、リカバリコントローラ15は、キャッシュ履歴テーブル13に格納されている履歴データのうち、UビットがONにセットされているデータのみ復元するよう制御する。なお、この制御方法は、前述した第4の実施の形態のAビットを用いた方法と同様であるため、その説明を省略する。
As a result, during the recovery operation, the
この第9の実施の形態の計算機装置10fによれば、第4の実施の形態の計算機装置10cと同様の効果が得られる。
そして、第9の実施の形態の計算機装置10fによれば、キャッシュに最小限の機能を追加することで、キャッシュ履歴テーブル13にbankを設定しなくてもキャッシュリカバリの効率化を図ることができ、計算機装置の構造の簡易化を図ることができる。
According to the computer apparatus 10f of the ninth embodiment, the same effect as that of the computer apparatus 10c of the fourth embodiment can be obtained.
According to the computer apparatus 10f of the ninth embodiment, by adding a minimum function to the cache, cache recovery efficiency can be improved without setting a bank in the cache history table 13. The structure of the computer device can be simplified.
<変形例>
Uビットのバリエーションとして、第5の実施の形態の計算機装置10dにて説明したランクのような概念を導入することもできる。
<Modification>
As a variation of the U bit, a concept such as the rank described in the computer apparatus 10d of the fifth embodiment can be introduced.
例えばキャッシュ11b(4way set associative)の場合には、4段階の優先度を示す1〜4の数値を保持する手段を履歴データに設け、リカバリ動作時に用いる優先順位を決める。その際、リカバリ有効数や優先度を指定できる手段も設けておき、例えば優先度2までという指定であれば、優先度3、4を備える履歴データはリカバリ対象としないよう制御する。
For example, in the case of the
以上、本発明の計算機装置およびそのキャッシュリカバリ方法を、図示の実施の形態に基づいて説明したが、本発明はこれに限定されるものではなく、各部の構成は、同様の機能を有する任意の構成のものに置換することができる。また、本発明に、他の任意の構成物や工程が付加されていてもよい。 As mentioned above, although the computer apparatus of this invention and its cache recovery method were demonstrated based on embodiment of illustration, this invention is not limited to this, The structure of each part is arbitrary which has the same function. It can be replaced with that of the configuration. Moreover, other arbitrary structures and processes may be added to the present invention.
また、本発明は、前述した各実施の形態のうちの、任意の2以上の構成(特徴)を組み合わせたものであってもよい。
以上の第1〜第9の実施の形態に関し、更に以下の付記を開示する。
Further, the present invention may be a combination of any two or more configurations (features) of the above-described embodiments.
Regarding the above first to ninth embodiments, the following additional notes are further disclosed.
(付記1) 複数の仮想計算機を切替えて動作させる計算機装置において、
高速キャッシュと、
前記高速キャッシュに転送するデータを記憶する記憶部と、
仮想計算機を一意に識別する識別子に所定のアドレスが関連づけられた履歴情報を格納する履歴情報格納部と、
動作する仮想計算機の切替えがあると、前記履歴情報格納部を参照して切替え後の仮想計算機の前記識別子に一致する前記履歴情報に含まれる前記識別子の有無を判断する判断部と、
一致した前記識別子に関連づけられた前記所定のアドレスに基づいて、前記記憶部が記憶している前記データを特定させ、特定した前記データを前記高速キャッシュに転送させる転送指示部と、
を有することを特徴とする計算機装置。
(Supplementary note 1) In a computer device that operates by switching a plurality of virtual machines,
With fast cache,
A storage unit for storing data to be transferred to the high-speed cache;
A history information storage unit for storing history information in which a predetermined address is associated with an identifier for uniquely identifying a virtual machine;
When there is a switching of the operating virtual machine, a determination unit that determines the presence or absence of the identifier included in the history information that matches the identifier of the virtual computer after switching with reference to the history information storage unit;
A transfer instruction unit for specifying the data stored in the storage unit based on the predetermined address associated with the matched identifier, and transferring the specified data to the high-speed cache;
A computer apparatus comprising:
(付記2) 実行中の前記仮想計算機の前記識別子を取得する識別子取得部と、
前記データのアドレスを、前記識別子取得部が取得した前記識別子に関連づけて前記履歴情報を生成する履歴情報生成部と、
をさらに有し、
前記履歴情報格納部は、前記識別子毎に定められた履歴情報格納領域を有しており、
前記判断部は、切替え後の前記仮想計算機の前記識別子により特定される前記履歴情報格納領域を参照することを特徴とする付記1記載の計算機装置。
(Supplementary Note 2) An identifier acquisition unit that acquires the identifier of the virtual machine being executed;
A history information generation unit that generates the history information by associating the address of the data with the identifier acquired by the identifier acquisition unit;
Further comprising
The history information storage unit has a history information storage area defined for each identifier,
The computer apparatus according to
(付記3) 前記履歴情報格納部は、1つの前記識別子に複数の前記履歴情報が関連づけられた履歴情報格納領域を複数有しており、
前記判断部は、切替え後の前記仮想計算機の前記識別子により特定される前記履歴情報格納領域を参照することを特徴とする付記1または2記載の計算機装置。
(Supplementary Note 3) The history information storage unit includes a plurality of history information storage areas in which a plurality of the history information is associated with one identifier.
The computer apparatus according to
(付記4) 前記データに前記識別子が含まれており、
前記高速キャッシュからの前記データの追い出しまたは無効化を監視する監視部と、
前記データの追い出しまたは無効化が発生すると、追い出されたまたは無効化された前記データと、前記データに含まれている前記識別子とを関連づけて、前記履歴情報を生成する履歴情報生成部と、
をさらに有することを特徴とする付記1または2記載の計算機装置。
(Appendix 4) The identifier is included in the data,
A monitoring unit that monitors the eviction or invalidation of the data from the high-speed cache;
When the data is evicted or invalidated, the history information generating unit that generates the history information by associating the evicted or invalidated data with the identifier included in the data;
The computer apparatus according to
(付記5) アクセスの頻度を示すアクセス頻度情報を前記履歴情報に付加する付加部と、
前記高速キャッシュへのアクセスを観測し、アクセスのあったデータに対応する前記履歴情報の前記アクセス頻度情報のアクセスの頻度を増加させるアクセス頻度増加部と、をさらに有し、
前記判断部は、前記判断の際、前記アクセス頻度情報により示されるアクセス頻度が予め定められた条件を満たす前記履歴情報に含まれる前記識別子の有無を判断することを特徴とする付記1または2記載の計算機装置。
(Additional remark 5) The addition part which adds the access frequency information which shows the frequency of access to the said log | history information,
An access frequency increasing unit that observes access to the high-speed cache and increases the access frequency of the access frequency information of the history information corresponding to the accessed data;
The determination unit according to
(付記6) 前記アクセス頻度増加部は、現在動作している前記仮想計算機の前記識別子に一致する前記識別子を備え、かつ、アクセスのあった前記データのアドレスに一致するアドレスを備える前記履歴情報の前記アクセス頻度情報のアクセスの頻度を増加させることを特徴とする付記5記載の計算機装置。
(Supplementary Note 6) The access frequency increasing unit includes the identifier that matches the identifier of the virtual machine that is currently operating, and includes the address that matches the address of the accessed data. The computer apparatus according to
(付記7) 前記アクセス頻度情報は、1ビットで構成されており、前記アクセス頻度増加部は、アクセスのあったデータに対応する前記履歴情報の前記アクセス頻度情報のビットを有効とし、前記判断部は、前記ビットが有効とされている前記履歴情報に含まれる前記識別子の有無を判断することを特徴とする付記5記載の計算機装置。
(Supplementary Note 7) The access frequency information is composed of 1 bit, and the access frequency increasing unit validates the bit of the access frequency information of the history information corresponding to accessed data, and the determination unit The computer apparatus according to
(付記8) 前記付加部は、前記履歴情報の格納時に前記アクセス頻度情報を付加することを特徴とする付記5記載の計算機装置。
(付記9) 所定時間アクセスがない前記アクセス頻度情報のアクセス履歴を消去する履歴消去実行部をさらに有することを特徴とする付記5記載の計算機装置。
(Supplementary note 8) The computer apparatus according to
(Supplementary note 9) The computer apparatus according to
(付記10) 前記履歴消去実行部は、前記アクセス履歴を定期的に消去することを特徴とする付記9記載の計算機装置。
(付記11) 前記アクセス頻度情報は、カウンタで構成されており、前記アクセス頻度増加部は、アクセスのあったデータに対応する前記履歴情報の前記カウンタをインクリメントし、前記判断部は、所定値以上のカウンタ値を備える前記履歴情報に含まれる前記識別子の有無を判断することを特徴とする付記5または9記載の計算機装置。
(Additional remark 10) The said log | history deletion execution part deletes the said access log | history regularly, The computer apparatus of Additional remark 9 characterized by the above-mentioned.
(Supplementary Note 11) The access frequency information includes a counter, the access frequency increase unit increments the counter of the history information corresponding to accessed data, and the determination unit has a predetermined value or more. The computer apparatus according to
(付記12) 前記履歴情報格納部は、1つの前記識別子に複数の前記履歴情報が関連づけられた履歴情報格納領域を複数有しており、
前記履歴情報格納領域へ前記履歴情報をFIFO方式により格納するFIFO制御部をさらに有し、
前記FIFO制御部は、前記高速キャッシュへのアクセスを観測し、アクセスのあったデータに対応する前記履歴情報が、前記履歴情報格納領域に格納されているか否かを判断し、格納されている場合、アクセスのあったデータに対応する前記履歴情報を取り出して前記履歴情報格納領域に再度エンキューし、
前記判断部は、切替え後の前記仮想計算機の前記識別子により特定される前記履歴情報格納領域を参照することを特徴とする付記1または2記載の計算機装置。
(Supplementary Note 12) The history information storage unit includes a plurality of history information storage areas in which a plurality of the history information is associated with one identifier.
A FIFO control unit for storing the history information in the history information storage area by a FIFO method;
The FIFO control unit observes access to the high-speed cache, determines whether the history information corresponding to the accessed data is stored in the history information storage area, and stores the history information The history information corresponding to the accessed data is taken out and re-queued in the history information storage area,
The computer apparatus according to
(付記13) 前記FIFO制御部は、前記履歴情報格納領域の出口側から出力される前記履歴情報を廃棄することを特徴とする付記12記載の計算機装置。
(付記14) 前記判断部の判断対象とする前記履歴情報の個数は、前記履歴情報格納領域の入口側から所定個指定されることを特徴とする付記12記載の計算機装置。
(Additional remark 13) The said FIFO control part discards the said historical information output from the exit side of the said historical information storage area, The computer apparatus of
(Additional remark 14) The computer apparatus of
(付記15) 前記高速キャッシュのデータを無効化する情報を監視する監視部と、
前記監視部から得られた無効化する前記データに対応する前記履歴情報を前記履歴情報格納部から削除する履歴情報削除部と、をさらに有することを特徴とする付記1または2記載の計算機装置。
(Supplementary Note 15) A monitoring unit that monitors information for invalidating data in the high-speed cache;
The computer apparatus according to
(付記16) 前記履歴情報削除部は、現在動作している前記仮想計算機の前記識別子に一致する前記識別子を備え、かつ、アクセスのあった前記データのアドレスに一致するアドレスを備える前記履歴情報を前記履歴情報格納部から削除することを特徴とする付記15記載の計算機装置。
(Supplementary Note 16) The history information deletion unit includes the identifier that matches the identifier of the virtual machine that is currently operating, and the history information that includes an address that matches the address of the accessed data. The computer apparatus according to
(付記17) 前記記憶部に記憶されている前記データを前記高速キャッシュに割り当てる方式としてセットアソシアティブ方式を使用して、前記データを前記高速キャッシュに割り当てる割り当て部と、
アクセスの頻度を示すアクセス頻度情報を前記履歴情報に付加する付加部と、
前記仮想計算機の切替えがあると、前記高速キャッシュに格納されている前記データが廃棄対象となるか否かの指標を示すLRU情報に対応する前記履歴情報の前記アクセス頻度情報のアクセスの頻度を増加させるアクセス頻度増加部と、をさらに有し、
前記判断部は、前記判断の際、前記アクセス頻度情報により示されるアクセス頻度が予め定められた条件を満たす前記履歴情報に含まれる前記識別子の有無を判断することを特徴とする付記1または2記載の計算機装置。
(Supplementary Note 17) An assigning unit that assigns the data to the high-speed cache using a set associative method as a method of assigning the data stored in the storage unit to the high-speed cache;
An adding unit for adding access frequency information indicating the frequency of access to the history information;
When the virtual machine is switched, the access frequency of the access frequency information of the history information corresponding to the LRU information indicating whether or not the data stored in the high-speed cache is to be discarded is increased. An access frequency increasing unit
The determination unit according to
(付記18) 前記アクセス頻度増加部は、現在動作している前記仮想計算機の前記識別子に一致する前記識別子を備え、かつ、アクセスのあった前記データのアドレスに一致するアドレスを備える前記履歴情報の前記アクセス頻度情報のアクセスの頻度を増加させることを特徴とする付記17記載の計算機装置。 (Supplementary Note 18) The access frequency increasing unit includes the identifier that matches the identifier of the virtual machine that is currently operating, and includes the address that matches the address of the accessed data. 18. The computer device according to appendix 17, wherein the access frequency of the access frequency information is increased.
(付記19) 前記アクセス頻度増加部は、前記データが次の廃棄対象になることを示す前記LRU情報以外の前記履歴情報の前記アクセス頻度情報のアクセスの頻度を増加させることを特徴とする付記17記載の計算機装置。 (Supplementary Note 19) The supplementary note 17 is characterized in that the access frequency increasing unit increases the access frequency of the access frequency information of the history information other than the LRU information indicating that the data is to be discarded next. The computer apparatus described.
(付記20) 前記アクセス頻度情報は、1ビットで構成されており、
前記アクセス頻度増加部は、前記データが次の廃棄対象になることを示す前記LRU情報以外の前記アクセス頻度情報のビットを有効とし、
前記判断部は、前記ビットが有効とされている前記履歴情報に含まれる前記識別子の有無を判断することを特徴とする付記17記載の計算機装置。
(Supplementary note 20) The access frequency information is composed of 1 bit,
The access frequency increasing unit validates the bits of the access frequency information other than the LRU information indicating that the data is to be discarded next,
18. The computer apparatus according to appendix 17, wherein the determination unit determines the presence or absence of the identifier included in the history information in which the bit is valid.
(付記21) 前記付加部は、前記履歴情報の格納時に前記アクセス頻度情報を付加することを特徴とする付記17記載の計算機装置。
(付記22) 前記アクセス頻度情報は、カウンタで構成されており、前記アクセス頻度増加部は、アクセスのあったデータに対応する前記履歴情報の前記カウンタをインクリメントし、前記判断部は、所定値以上のカウンタ値を備える前記履歴情報に含まれる前記識別子の有無を判断することを特徴とする付記17記載の計算機装置。
(Supplementary note 21) The computer apparatus according to supplementary note 17, wherein the addition unit adds the access frequency information when the history information is stored.
(Supplementary Note 22) The access frequency information includes a counter, the access frequency increasing unit increments the counter of the history information corresponding to accessed data, and the determination unit is greater than or equal to a predetermined value. 18. The computer device according to appendix 17, wherein the presence or absence of the identifier included in the history information having a counter value of is determined.
(付記23) 複数の仮想計算機を切替えて動作させる計算機装置のキャッシュリカバリ方法において、
動作する仮想計算機の切替えがあると、判断部が、仮想計算機を一意に識別する識別子に所定のアドレスが関連づけられた履歴情報を格納する履歴情報格納部を参照して切替え後の仮想計算機の前記識別子に一致する前記履歴情報に含まれる前記識別子の有無を判断し、
転送指示部が、一致した前記識別子に関連づけられた前記所定のアドレスに基づいて、記憶部上のそのアドレスに記憶されている前記データを前記高速キャッシュに転送させる、
ことを特徴とする計算機装置のキャッシュリカバリ方法。
(Supplementary Note 23) In a cache recovery method for a computer device that operates by switching a plurality of virtual machines,
When there is a switching of operating virtual machines, the determination unit refers to a history information storage unit that stores history information in which a predetermined address is associated with an identifier that uniquely identifies the virtual machine, and the virtual machine after switching Determining the presence or absence of the identifier included in the history information matching the identifier;
A transfer instruction unit, based on the predetermined address associated with the matched identifier, causes the data stored at the address on the storage unit to be transferred to the high-speed cache;
And a cache recovery method for a computer apparatus.
1、10、10a、10b、10c、10d、10e、10f 計算機装置
2 高速キャッシュ
3 記憶部
3a データ
4 履歴情報
4a 識別子
4b アドレス
5 履歴情報格納部
6 判断部
7 転送指示部
11、11b キャッシュ
11a キャッシュエントリ
12 メモリ
13、13a キャッシュ履歴テーブル
14 VM−IDレジスタ
15 リカバリコントローラ
15a LRU情報反映部
16、42、43、43a、44、45、47 AND回路
21、21a 履歴エントリ
21b bank
41 アクセス監視部
46、83 OR回路
48 ビットクリア実行部
51 優先対象設定部
52 有効ランク設定部
52a ランクテーブル
53 有効ランク制御部
61 有効閾値設定部
62 カウンタ比較部
71 FIFO制御部
81 ライトバック監視部
82 無効化信号監視部
84 履歴データ削除部
101a プログラム実行部
101b タイマ
111 キャッシュアドレス/データ格納部
112 LRU情報格納部
211 領域
1, 10, 10a, 10b, 10c, 10d, 10e,
41
Claims (10)
高速キャッシュと、
前記高速キャッシュに転送するデータを記憶する記憶部と、
仮想計算機を一意に識別する識別子に所定のアドレスが関連づけられた履歴情報を格納する履歴情報格納部と、
動作する仮想計算機の切替えがあると、前記履歴情報格納部を参照して切替え後の仮想計算機の前記識別子に一致する前記履歴情報に含まれる前記識別子の有無を判断する判断部と、
一致した前記識別子に関連づけられた前記所定のアドレスに基づいて、前記記憶部が記憶している前記データを特定させ、特定した前記データを前記高速キャッシュに転送させる転送指示部と、
を有することを特徴とする計算機装置。 In a computer device that operates by switching a plurality of virtual machines,
With fast cache,
A storage unit for storing data to be transferred to the high-speed cache;
A history information storage unit for storing history information in which a predetermined address is associated with an identifier for uniquely identifying a virtual machine;
When there is a switching of the operating virtual machine, a determination unit that determines the presence or absence of the identifier included in the history information that matches the identifier of the virtual computer after switching with reference to the history information storage unit;
A transfer instruction unit for specifying the data stored in the storage unit based on the predetermined address associated with the matched identifier, and transferring the specified data to the high-speed cache;
A computer apparatus comprising:
前記データのアドレスを、前記識別子取得部が取得した前記識別子に関連づけて前記履歴情報を生成する履歴情報生成部と、
をさらに有し、
前記履歴情報格納部は、前記識別子毎に定められた履歴情報格納領域を有しており、
前記判断部は、切替え後の前記仮想計算機の前記識別子により特定される前記履歴情報格納領域を参照することを特徴とする請求項1記載の計算機装置。 An identifier acquisition unit for acquiring the identifier of the virtual machine being executed;
A history information generation unit that generates the history information by associating the address of the data with the identifier acquired by the identifier acquisition unit;
Further comprising
The history information storage unit has a history information storage area defined for each identifier,
The computer apparatus according to claim 1, wherein the determination unit refers to the history information storage area specified by the identifier of the virtual computer after switching.
前記高速キャッシュからの前記データの追い出しまたは無効化を監視する監視部と、
前記データの追い出しまたは無効化が発生すると、追い出されたまたは無効化された前記データと、前記データに含まれている前記識別子とを関連づけて、前記履歴情報を生成する履歴情報生成部と、
をさらに有することを特徴とする請求項1または2記載の計算機装置。 The data includes the identifier;
A monitoring unit that monitors the eviction or invalidation of the data from the high-speed cache;
When the data is evicted or invalidated, the history information generating unit that generates the history information by associating the evicted or invalidated data with the identifier included in the data;
The computer apparatus according to claim 1, further comprising:
前記高速キャッシュへのアクセスを観測し、アクセスのあったデータに対応する前記履歴情報の前記アクセス頻度情報のアクセスの頻度を増加させるアクセス頻度増加部と、をさらに有し、
前記判断部は、前記判断の際、前記アクセス頻度情報により示されるアクセス頻度が予め定められた条件を満たす前記履歴情報に含まれる前記識別子の有無を判断することを特徴とする請求項1または2記載の計算機装置。 An adding unit for adding access frequency information indicating the frequency of access to the history information;
An access frequency increasing unit that observes access to the high-speed cache and increases the access frequency of the access frequency information of the history information corresponding to the accessed data;
3. The determination unit according to claim 1, wherein the determination unit determines whether or not the identifier is included in the history information satisfying a predetermined condition for an access frequency indicated by the access frequency information in the determination. The computer apparatus described.
前記履歴情報格納領域へ前記履歴情報をFIFO方式により格納するFIFO制御部をさらに有し、
前記FIFO制御部は、前記高速キャッシュへのアクセスを観測し、アクセスのあったデータに対応する前記履歴情報が、前記履歴情報格納領域に格納されているか否かを判断し、格納されている場合、アクセスのあったデータに対応する前記履歴情報を取り出して前記履歴情報格納領域に再度エンキューし、
前記判断部は、切替え後の前記仮想計算機の前記識別子により特定される前記履歴情報格納領域を参照することを特徴とする請求項1または2記載の計算機装置。 The history information storage unit has a plurality of history information storage areas in which a plurality of the history information is associated with one identifier.
A FIFO control unit for storing the history information in the history information storage area by a FIFO method;
The FIFO control unit observes access to the high-speed cache, determines whether the history information corresponding to the accessed data is stored in the history information storage area, and stores the history information The history information corresponding to the accessed data is taken out and re-queued in the history information storage area,
The computer device according to claim 1, wherein the determination unit refers to the history information storage area specified by the identifier of the virtual computer after switching.
前記監視部から得られた無効化する前記データに対応する前記履歴情報を前記履歴情報格納部から削除する履歴情報削除部と、をさらに有することを特徴とする請求項1または2記載の計算機装置。 A monitoring unit that monitors information for invalidating data in the high-speed cache;
The computer apparatus according to claim 1, further comprising: a history information deleting unit that deletes the history information corresponding to the data to be invalidated obtained from the monitoring unit from the history information storage unit. .
アクセスの頻度を示すアクセス頻度情報を前記履歴情報に付加する付加部と、
前記仮想計算機の切替えがあると、前記高速キャッシュに格納されている前記データが廃棄対象となるか否かの指標を示すLRU情報に対応する前記履歴情報の前記アクセス頻度情報のアクセスの頻度を増加させるアクセス頻度増加部と、をさらに有し、
前記判断部は、前記判断の際、前記アクセス頻度情報により示されるアクセス頻度が予め定められた条件を満たす前記履歴情報に含まれる前記識別子の有無を判断することを特徴とする請求項1または2記載の計算機装置。 An assigning unit for assigning the data to the high-speed cache using a set associative method as a method for assigning the data stored in the storage unit to the high-speed cache;
An adding unit for adding access frequency information indicating the frequency of access to the history information;
When the virtual machine is switched, the access frequency of the access frequency information of the history information corresponding to the LRU information indicating whether or not the data stored in the high-speed cache is to be discarded is increased. An access frequency increasing unit
3. The determination unit according to claim 1, wherein the determination unit determines whether or not the identifier is included in the history information satisfying a predetermined condition for an access frequency indicated by the access frequency information in the determination. The computer apparatus described.
動作する仮想計算機の切替えがあると、判断部が、仮想計算機を一意に識別する識別子に所定のアドレスが関連づけられた履歴情報を格納する履歴情報格納部を参照して切替え後の仮想計算機の前記識別子に一致する前記履歴情報に含まれる前記識別子の有無を判断し、
転送指示部が、一致した前記識別子に関連づけられた前記所定のアドレスに基づいて、記憶部上のそのアドレスに記憶されている前記データを前記高速キャッシュに転送させる、
ことを特徴とする計算機装置のキャッシュリカバリ方法。 In a cache recovery method for a computer device that operates by switching a plurality of virtual machines,
When there is a switching of operating virtual machines, the determination unit refers to a history information storage unit that stores history information in which a predetermined address is associated with an identifier that uniquely identifies the virtual machine, and the virtual machine after switching Determining the presence or absence of the identifier included in the history information matching the identifier;
A transfer instruction unit, based on the predetermined address associated with the matched identifier, causes the data stored at the address on the storage unit to be transferred to the high-speed cache;
And a cache recovery method for a computer apparatus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008014645A JP5104340B2 (en) | 2007-04-24 | 2008-01-25 | Computer apparatus and cache recovery method thereof |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007114666 | 2007-04-24 | ||
JP2007114666 | 2007-04-24 | ||
JP2008014645A JP5104340B2 (en) | 2007-04-24 | 2008-01-25 | Computer apparatus and cache recovery method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008293472A true JP2008293472A (en) | 2008-12-04 |
JP5104340B2 JP5104340B2 (en) | 2012-12-19 |
Family
ID=40168091
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008014645A Expired - Fee Related JP5104340B2 (en) | 2007-04-24 | 2008-01-25 | Computer apparatus and cache recovery method thereof |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5104340B2 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014109007A1 (en) * | 2013-01-09 | 2014-07-17 | 株式会社 日立製作所 | Storage hierarchical management system |
GB2546634A (en) * | 2014-06-26 | 2017-07-26 | HGST Netherlands BV | Invalidation data area for cache |
CN108351800A (en) * | 2015-10-28 | 2018-07-31 | 国际商业机器公司 | Pre-install the page table cache circuit of virtual machine |
JP2021515312A (en) * | 2018-02-23 | 2021-06-17 | マイクロソフト テクノロジー ライセンシング,エルエルシー | Trace recording by logging inflows into the lower layer cache based on entries in the upper layer cache |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6134643A (en) * | 1984-07-27 | 1986-02-18 | Fujitsu Ltd | Buffer control system |
JPH02307145A (en) * | 1989-05-22 | 1990-12-20 | Nippon Telegr & Teleph Corp <Ntt> | Virtual computer system |
JPH04219842A (en) * | 1990-12-20 | 1992-08-10 | Nec Corp | Cache control system |
JPH0793221A (en) * | 1993-09-28 | 1995-04-07 | Hitachi Ltd | Virtual machine system and control method for same |
JPH07105091A (en) * | 1993-10-01 | 1995-04-21 | Hitachi Ltd | Device and method for controlling cache |
US6587937B1 (en) * | 2000-03-31 | 2003-07-01 | Rockwell Collins, Inc. | Multiple virtual machine system with efficient cache memory design |
JP2006099335A (en) * | 2004-09-29 | 2006-04-13 | Seiko Epson Corp | Context processor |
-
2008
- 2008-01-25 JP JP2008014645A patent/JP5104340B2/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6134643A (en) * | 1984-07-27 | 1986-02-18 | Fujitsu Ltd | Buffer control system |
JPH02307145A (en) * | 1989-05-22 | 1990-12-20 | Nippon Telegr & Teleph Corp <Ntt> | Virtual computer system |
JPH04219842A (en) * | 1990-12-20 | 1992-08-10 | Nec Corp | Cache control system |
JPH0793221A (en) * | 1993-09-28 | 1995-04-07 | Hitachi Ltd | Virtual machine system and control method for same |
JPH07105091A (en) * | 1993-10-01 | 1995-04-21 | Hitachi Ltd | Device and method for controlling cache |
US6587937B1 (en) * | 2000-03-31 | 2003-07-01 | Rockwell Collins, Inc. | Multiple virtual machine system with efficient cache memory design |
JP2006099335A (en) * | 2004-09-29 | 2006-04-13 | Seiko Epson Corp | Context processor |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014109007A1 (en) * | 2013-01-09 | 2014-07-17 | 株式会社 日立製作所 | Storage hierarchical management system |
GB2546634A (en) * | 2014-06-26 | 2017-07-26 | HGST Netherlands BV | Invalidation data area for cache |
GB2546634B (en) * | 2014-06-26 | 2017-11-22 | HGST Netherlands BV | Invalidation data area for cache |
US10445242B2 (en) | 2014-06-26 | 2019-10-15 | Western Digital Technologies, Inc. | Invalidation data area for cache |
US10810128B2 (en) | 2014-06-26 | 2020-10-20 | Western Digital Technologies, Inc. | Invalidation data area for cache |
US11372771B2 (en) | 2014-06-26 | 2022-06-28 | Western Digital Technologies, Inc. | Invalidation data area for cache |
CN108351800A (en) * | 2015-10-28 | 2018-07-31 | 国际商业机器公司 | Pre-install the page table cache circuit of virtual machine |
JP2018536219A (en) * | 2015-10-28 | 2018-12-06 | インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation | Method, computer system and computer program for preloading virtual machine page table cache lines |
CN108351800B (en) * | 2015-10-28 | 2022-03-18 | 国际商业机器公司 | Page table cache line of pre-installed virtual machine |
JP2021515312A (en) * | 2018-02-23 | 2021-06-17 | マイクロソフト テクノロジー ライセンシング,エルエルシー | Trace recording by logging inflows into the lower layer cache based on entries in the upper layer cache |
JP7221979B2 (en) | 2018-02-23 | 2023-02-14 | マイクロソフト テクノロジー ライセンシング,エルエルシー | Trace recording by logging entries into the lower tier cache based on entries in the upper tier cache |
Also Published As
Publication number | Publication date |
---|---|
JP5104340B2 (en) | 2012-12-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10963387B2 (en) | Methods of cache preloading on a partition or a context switch | |
US7793049B2 (en) | Mechanism for data cache replacement based on region policies | |
US9043556B2 (en) | Optimizing a cache back invalidation policy | |
US8041897B2 (en) | Cache management within a data processing apparatus | |
JPWO2008155815A1 (en) | Information processing device | |
JP2023507078A (en) | Downgrade prefetch level | |
JPWO2005091146A1 (en) | Cache memory and control method thereof | |
US20100217937A1 (en) | Data processing apparatus and method | |
JP2004038345A (en) | Prefetch control device, information processor, and prefetch control process | |
KR19980079433A (en) | Method and system for implementing cache coherency mechanism for use in non-cache cache hierarchy | |
JP2009059077A (en) | Cache system | |
US6711651B1 (en) | Method and apparatus for history-based movement of shared-data in coherent cache memories of a multiprocessor system using push prefetching | |
JP2017072982A (en) | Information processing apparatus, cache control method, and cache control program | |
US9483400B2 (en) | Multiplexed memory for segments and pages | |
EP1980945B1 (en) | Memory access control apparatus and memory access control method | |
JP5104340B2 (en) | Computer apparatus and cache recovery method thereof | |
US7093075B2 (en) | Location-based placement algorithms for set associative cache memory | |
JP2017072981A (en) | Information processing apparatus, cache control method, and cache control program | |
JP2002032264A (en) | Cache memory device and central processing unit using the same | |
US20110320747A1 (en) | Identifying replacement memory pages from three page record lists | |
KR101976320B1 (en) | Last level cache memory and data management method thereof | |
JP5045334B2 (en) | Cash system | |
US10366013B2 (en) | Caching structure for nested preemption | |
JP4371043B2 (en) | Storage system, snapshot control method and program | |
JP2021047591A (en) | Information processing device, information processing method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100820 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120626 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120817 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20120904 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120917 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20151012 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |