JP2008293472A - Computer device and its cache recovery method - Google Patents

Computer device and its cache recovery method Download PDF

Info

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
Application number
JP2008014645A
Other languages
Japanese (ja)
Other versions
JP5104340B2 (en
Inventor
Masao Yamamoto
昌生 山本
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2008014645A priority Critical patent/JP5104340B2/en
Publication of JP2008293472A publication Critical patent/JP2008293472A/en
Application granted granted Critical
Publication of JP5104340B2 publication Critical patent/JP5104340B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To prevent a cache error in environment where a plurality of virtual computers are operated. <P>SOLUTION: This computer device 1 has a high-speed cache 2; a storage section 3 for storing data 3a transferred to the high-speed cache 2; a history information storage section 5 for storing history information 4 with an address 4b related to an identifier 4a uniquely identifying the virtual computer; a determining section 6 for determining the presence of the identifier 4a included in the history information 4 coinciding with the identifier of the virtual computer after switching, referring to the history information storage section 5; and a transfer instructing section 7 for specifying data 3a stored in the storage section 3 based on the address 4b related to the coincident identifier 4a and transferring the specified data 3a to the high-speed cache 2. <P>COPYRIGHT: (C)2009,JPO&INPIT

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参照)。
特開平7−105091号公報 特開昭61−034643号公報
Also, a method is known in which a plurality of caches are prepared and banked, and each bank is individually assigned to a virtual machine to maintain the original effect of the cache (see, for example, Patent Document 2).
JP-A-7-105091 JP 61-034643 A

しかし、従来の技術には以下のような問題があった。
例えば、特許文献1では、キャッシュの無効化命令以外には、性能低下を防ぐ効果がないという問題があった。
However, the conventional techniques have the following problems.
For example, in Patent Document 1, there is a problem that there is no effect of preventing performance degradation other than a cache invalidation instruction.

また、特許文献2では、キャッシュは非常に高価なため、複数バンク用意するためにキャッシュ全体の容量を大きくすると、コストが増大し現実的ではなくなる。逆に全体の容量をそのままにすると、今度は各仮想計算機に割り当てるキャッシュ容量が小さくなり、その分、容量性のキャッシュミスが増えて、結局キャッシュの効果が得にくいという根本的な問題があった。さらに、予め用意するバンク数は固定的になるので、対応可能な仮想計算機の個数に制限があるという問題もあった。   Also, in Patent Document 2, since the cache is very expensive, if the capacity of the entire cache is increased in order to prepare a plurality of banks, the cost increases, which is not practical. On the other hand, if the entire capacity is left as it is, the cache capacity allocated to each virtual machine will be reduced, and there will be an increase in capacity cache misses. . Furthermore, since the number of banks prepared in advance is fixed, there is a problem that the number of virtual machines that can be handled is limited.

本発明はこのような点に鑑みてなされたものであり、複数の仮想計算機が動作している環境でのキャッシュミスを防止することができる計算機装置およびそのキャッシュリカバリ方法を提供することを目的とする。   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 computer apparatus 1 as shown in FIG. 1 is provided to solve the above problem.
The computer apparatus 1 according to the present invention is an apparatus that switches and operates a plurality of virtual machines.
The computer apparatus 1 includes a high-speed cache 2, a storage unit 3 that stores data 3a to be transferred to the high-speed cache 2, and history information that stores history information 4 in which an address 4b is associated with an identifier 4a that uniquely identifies the virtual computer. When there is a switch between the storage unit 5 and the operating virtual machine, the determination unit 6 refers to the history information storage unit 5 and determines whether or not there is an identifier 4a included in the history information 4 that matches the identifier of the virtual machine after the switch. And a transfer instructing unit 7 for specifying the data 3a stored in the storage unit 3 based on the address 4b associated with the matched identifier 4a and transferring the specified data 3a to the high-speed cache 2.

このような計算機装置1によれば、動作する仮想計算機の切替えがあると、判断部6により、履歴情報格納部5が参照されて切替え後の仮想計算機の識別子に一致する履歴情報4に含まれる識別子4aの有無が判断される。そして、転送指示部7により、一致した識別子に関連づけられたアドレス4bに基づいて、データ3aの転送要求が出力され、記憶部3が記憶しているデータ3aの特定および特定されたデータ3aの高速キャッシュ2への転送が実行される。   According to such a computer apparatus 1, when there is a switching of operating virtual machines, the history information storage unit 5 is referred to by the determination unit 6 and is included in the history information 4 that matches the identifier of the virtual computer after the switching. The presence or absence of the identifier 4a is determined. Then, the transfer instruction unit 7 outputs a transfer request for the data 3a based on the address 4b associated with the matched identifier, and specifies the data 3a stored in the storage unit 3 and the high speed of the specified data 3a. Transfer to the cache 2 is executed.

本発明によれば、履歴情報格納部を参照して切替え後の仮想計算機が必要とするデータを予め高速キャッシュに転送させることができるため、キャッシュが本来の効果、すなわち参照の局所性や、特に時間的局所性を発揮することができる。   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 computer apparatus 1 is assumed. In this case, it is assumed that each virtual machine is operating while switching one by one.

計算機装置1は、高速キャッシュ2と、記憶部3と、履歴情報格納部5と、判断部6と、転送指示部7とを有している。
高速キャッシュ2は、例えばCPU内部のキャッシュメモリ等である。
The computer apparatus 1 includes a high-speed cache 2, a storage unit 3, a history information storage unit 5, a determination unit 6, and a transfer instruction unit 7.
The high speed cache 2 is, for example, a cache memory inside the CPU.

記憶部3は、高速キャッシュ2に転送するデータ3aを記憶する。このデータ3aは、例えば以前、高速キャッシュ2に記憶されていたデータである。
履歴情報格納部5は、仮想計算機を一意に識別する識別子4aにアドレス4bが関連づけられた履歴情報4を格納する。アドレス4bは、識別子4aによって特定される仮想計算機が動作時に必要とするデータのアドレスであり、例えばキャッシュにフェッチ(取り込み)されるメモリデータのアドレスが取り出され、アドレス4bとして識別子4aに関連づけられている。この履歴情報4は、1つまたは複数格納される。
The storage unit 3 stores data 3 a to be transferred to the high speed cache 2. This data 3a is, for example, data previously stored in the high-speed cache 2.
The history information storage unit 5 stores history information 4 in which an address 4b is associated with an identifier 4a that uniquely identifies a virtual machine. The address 4b is an address of data required by the virtual machine specified by the identifier 4a during operation. For example, an address of memory data fetched (captured) into the cache is taken out and associated with the identifier 4a as the address 4b. Yes. One or a plurality of the history information 4 is stored.

判断部6は、動作する仮想計算機の切替えがあると、履歴情報格納部5を参照して切替え後の仮想計算機の識別子に一致する履歴情報4に含まれる識別子4aの有無を判断する。   When the operating virtual machine is switched, the determination unit 6 refers to the history information storage unit 5 to determine whether or not there is an identifier 4a included in the history information 4 that matches the identifier of the virtual computer after the switching.

転送指示部7は、一致した識別子4aに関連づけられたアドレス4bに基づいて、記憶部3が記憶しているデータ3aを特定させ、特定したデータ3aを高速キャッシュ2に転送させる。例えば、転送指示部7が、高速キャッシュ2の図示しないキャッシュコントローラにアドレス4bに対応するデータの転送要求を出力することにより、このキャッシュコントローラが、アドレス4bに一致するメモリ上のアドレスに対応するデータ3aを特定し、記憶部3から高速キャッシュ2にデータ3aを取り込む。   The transfer instruction unit 7 specifies the data 3a stored in the storage unit 3 based on the address 4b associated with the matched identifier 4a, and transfers the specified data 3a to the high-speed cache 2. For example, when the transfer instructing unit 7 outputs a data transfer request corresponding to the address 4b to a cache controller (not shown) of the high-speed cache 2, the cache controller receives data corresponding to the address on the memory that matches the address 4b. 3a is specified, and the data 3a is taken into the high speed cache 2 from the storage unit 3.

このような計算機装置1によれば、動作する仮想計算機の切替えがあると、判断部6により、履歴情報格納部5が参照されて切替え後の仮想計算機の識別子に一致する履歴情報4に含まれる識別子4aの有無が判断される。そして、転送指示部7により、一致した識別子4aに関連づけられたアドレス4bに基づいて、データ3aの転送要求が出力され、記憶部3が記憶しているデータ3aの特定および特定されたデータ3aの高速キャッシュ2への転送が実行される。   According to such a computer apparatus 1, when there is a switching of operating virtual machines, the history information storage unit 5 is referred to by the determination unit 6 and is included in the history information 4 that matches the identifier of the virtual computer after the switching. The presence or absence of the identifier 4a is determined. Then, the transfer instruction unit 7 outputs a transfer request for the data 3a based on the address 4b associated with the matched identifier 4a, and specifies the data 3a stored in the storage unit 3 and the specified data 3a. Transfer to the high speed cache 2 is executed.

以下、本発明の実施の形態を説明する。
図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 CPU 101. A random access memory (RAM) 102, a hard disk drive (HDD) 103, a graphics processing device 104, an input interface 105, a communication interface 106, and a recovery controller 15 are connected to the CPU 101 via a bus 107. .

RAM102には、CPU101に実行させるOS(Operating System)のプログラムやアプリケーションプログラムの少なくとも一部が一時的に格納される。また、RAM102には、CPU101による処理に必要な各種データが格納される。HDD103には、OSやアプリケーションプログラムが格納される。また、HDD103内には、プログラムファイルが格納される。   The RAM 102 temporarily stores at least part of an OS (Operating System) program and application programs to be executed by the CPU 101. The RAM 102 stores various data necessary for processing by the CPU 101. The HDD 103 stores an OS and application programs. A program file is stored in the HDD 103.

グラフィック処理装置104には、モニタ31が接続されている。グラフィック処理装置104は、CPU101からの命令に従って、画像をモニタ31の画面に表示させる。入力インタフェース105には、キーボード32とマウス33とが接続されている。入力インタフェース105は、キーボード32やマウス33から送られてくる信号を、バス107を介してCPU101に送信する。   A monitor 31 is connected to the graphic processing device 104. The graphic processing device 104 displays an image on the screen of the monitor 31 in accordance with a command from the CPU 101. A keyboard 32 and a mouse 33 are connected to the input interface 105. The input interface 105 transmits a signal sent from the keyboard 32 and the mouse 33 to the CPU 101 via the bus 107.

通信インタフェース106は、ネットワーク30に接続されている。通信インタフェース106は、ネットワーク30を介して、他のコンピュータとの間でデータの送受信を行うことができる。   The communication interface 106 is connected to the network 30. The communication interface 106 can send and receive data to and from other computers via the network 30.

リカバリコントローラ15については後述する。
以上のようなハードウェア構成によって、本実施の形態の処理機能を実現することができる。このようなハードウェア構成の計算機装置10においてキャッシュリカバリを行うために、計算機装置10内には、以下のような機能が設けられる。
The recovery controller 15 will be described later.
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 cache 11, a memory 12, a cache history table 13, a VM-ID register 14, a recovery controller 15, and an AND circuit 16.

キャッシュ11は、CPU101の演算部とメモリ12との速度緩衝用として、例えばCPU101の内部に設けられており、CPU101が使用する頻度の高いデータを一時的に記憶する。キャッシュ11のデータの入出力は、図示しないキャッシュコントローラによって行われる。   The cache 11 is provided, for example, inside the CPU 101 for buffering the speed between the arithmetic unit of the CPU 101 and the memory 12, and temporarily stores data frequently used by the CPU 101. Data input / output of the cache 11 is performed by a cache controller (not shown).

メモリ12は、例えばキャッシュ11よりも低速のRAM102(主記憶部)や、下位のキャッシュ層等によって構成されている。主記憶部にはキャッシュ11にフェッチ(取込)するデータが格納されている。   The memory 12 is composed of, for example, a RAM 102 (main storage unit) that is slower than the cache 11 and a lower cache layer. The main memory stores data to be fetched (captured) into the cache 11.

図4は、キャッシュに格納されているデータを示す図である。このキャッシュ11には、メモリ12からキャッシュ11にフェッチ(取込)するデータ(Data)が格納されている。また、フェッチしたその各データ(Data)は、データの要否を決定するバリッドビット(valid bit)およびアドレス(address)も有しており、それらの各要素の一組をキャッシュデータまたはキャッシュエントリと呼ぶ。   FIG. 4 is a diagram illustrating data stored in the cache. The cache 11 stores data (Data) to be fetched from the memory 12 into the cache 11. Each fetched data (Data) also has a valid bit (address bit) and an address (address) for determining the necessity of the data, and a set of each of these elements is set as cache data or a cache entry. Call.

再び図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 RAM 102, the high-speed memory in the CPU 101, and a register, and has a plurality of history entries 21, 21,.

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-ID register 14 is configured by a part of the register in the CPU 101, for example, and stores the VM-ID of the currently operating virtual machine.
The recovery controller 15 performs a recovery operation (described later) for recovering cache data to the cache 11 when a VM switching signal generated by the CPU 101 is triggered by switching of virtual machines. In other cases, a recording operation (described later) is performed in which valid entries, VM-IDs, and cache data addresses are associated with the history entries 21, 21,.

AND回路16は、VM−IDレジスタ14と履歴エントリ21に格納されている履歴データのVM−IDとの一致を判断するために設けられている。
次に、履歴エントリ21、21、・・・に格納される履歴データの記録方法(フェッチアドレス記録方法)について説明する。
The AND circuit 16 is provided to determine whether the VM-ID register 14 matches the VM-ID of the history data stored in the history entry 21.
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 recovery controller 15 observes fetching of cache data from the memory 12 to the cache 11 (step S1).

そして、キャッシュデータのフェッチが発生すると、リカバリコントローラ15は、そのフェッチされるデータのアドレス(データが格納されていた主記憶部の場所=アドレス)と、その時動作している仮想計算機のVM−IDとを同時に読み込む(ステップS2)。   When the cache data is fetched, the recovery controller 15 sends the address of the fetched data (the location of the main storage where the data is stored = address) and the VM-ID of the virtual machine that is operating at that time. Are simultaneously read (step S2).

そして、読み込んだアドレスおよび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 recovery controller 15 repeats steps S1 to S3. Thereby, the history data is stored in the history entries 21, 21,.

次に、計算機装置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 CPU 101 stores a new VM-ID in the VM-ID register 14 and generates a VM switching signal. At this time, the operation by the new virtual machine has not started.

VM切替信号をトリガーとしてリカバリコントローラ15がリカバリ動作を開始する(ステップS11)。
リカバリコントローラ15は、キャッシュ履歴テーブル13上の各履歴エントリ21、21、・・・を逐次チェックしていく(ステップS12)。
The recovery controller 15 starts the recovery operation using the VM switching signal as a trigger (step S11).
The recovery controller 15 sequentially checks each history entry 21, 21,... On the cache history table 13 (step S12).

具体的には、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 circuit 16 inputs the valid bit and ID tag (= VM-ID) in the history entries 21, 21,... A comparison is made with the VM-ID of the virtual machine that is about to operate, which is input from the ID register 14, and the result is output to the recovery controller 15. The AND circuit 16 outputs “1” if these VM-IDs match and the valid bit is “1”, and outputs “0” otherwise (step S13).

リカバリコントローラ15は、AND回路16から「1」が出力されると、一致したと判断し、チェックしている(一致したVM−IDが格納されている)履歴エントリ21に格納されているアドレスを参照する(ステップS14)。   When “1” is output from the AND circuit 16, the recovery controller 15 determines that the addresses match, and checks the address stored in the history entry 21 that is checked (stores the matching VM-ID). Reference is made (step S14).

そして、リカバリコントローラ15は、参照したアドレスをフェッチアドレスとしてキャッシュコントローラへフェッチ要求を出す(ステップS15)。
参照したアドレスのデータがメモリ12からフェッチされ(ステップS16)、再度キャッシュ11に格納されることによりキャッシュデータの復元が完了する。
Then, the recovery controller 15 issues a fetch request to the cache controller using the referenced address as a fetch address (step S15).
The data at the referenced address is fetched from the memory 12 (step S16) and stored in the cache 11 again, thereby completing the restoration of the cache data.

以上でリカバリ動作を終了する。
次に、変形例として履歴エントリを拡張した例を示す。
<変形例>
図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 cache 11 is an instruction cache or a data cache, or a multi-level cache configuration such as a secondary cache or a tertiary cache.

履歴エントリ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 recovery controller 15 refers to the history entry 21a type flag during the recovery operation, and fetches it to the instruction cache when the history is the instruction address (I), and fetches it to the data cache when the history is the data address (D). Make a request to

また、例えばリカバリ動作時に参照した履歴エントリ21aが2次キャッシュの履歴の場合、リカバリコントローラ15は、階層フラグを参照し、2次キャッシュに対してフェッチする様にキャッシュコントローラに要求を出す。   For example, if the history entry 21a referred to during the recovery operation is a secondary cache history, the recovery controller 15 refers to the hierarchy flag and issues a request to the cache controller to fetch the secondary cache.

以上述べたように、本実施の形態の計算機装置10によれば、仮想計算機の切替え時に、リカバリコントローラ15が、これから動作する仮想計算機にとって有効なキャッシュデータを、キャッシュ履歴テーブル13を参照することにより判断し、該当するキャッシュデータを、そのキャッシュデータが必要になる前にメモリから読み出して(リカバリ動作とは別動作で進行する仮想計算機の切替え動作とオーバーラップさせる様に)キャッシュ11にフェッチさせるようにした。これにより、特定の仮想計算機に対応する(前回仮想計算機が使用していた)キャッシュデータを、その仮想計算機の動作時に復元することができる。   As described above, according to the computer apparatus 10 of this embodiment, when the virtual computer is switched, the recovery controller 15 refers to the cache history table 13 for the cache data effective for the virtual computer to be operated from now on. Judgment is made so that the corresponding cache data is read from the memory before the cache data is needed (so as to overlap with the switching operation of the virtual machine that proceeds in an operation different from the recovery operation) and fetched to the cache 11. I made it. As a result, cache data corresponding to a specific virtual machine (used by the virtual machine last time) can be restored when the virtual machine operates.

その結果、仮想計算機の切替え後のキャッシュミスを防止することができ、キャッシュが本来の効果(参照の局所性や特に時間的局所性)を発揮できるようになるため、動作中の複数の仮想計算機の全てを含めた(仮想計算機環境全体の)性能向上が期待できる。   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 cache 11 need not be changed, an existing cache can be used.
Further, since the recovery controller 15 has a hardware configuration, the processing speed is high, and processing can be performed in parallel with switching of virtual machines. Also, no software support is required.

また、キャッシュデータを単なる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 circuit 16 is provided outside the recovery controller 15. However, the present invention is not limited to this, and the AND circuit 16 may be provided in the recovery controller 15, for example.

次に、第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 bank 21b has an ID (VM # 0, VM # 1,...) That is equal to (or corresponds to) the VM-ID of the virtual machine. Each bank 21b stores a valid bit and an address, respectively. Is done.

次に、第2の実施の形態の計算機装置10aのリカバリ動作について説明する。
VM切替入力信号をトリガーとしてリカバリコントローラ15がリカバリ動作を開始する(ステップS21)。
Next, the recovery operation of the computer apparatus 10a according to the second embodiment will be described.
The recovery controller 15 starts the recovery operation using the VM switching input signal as a trigger (step S21).

リカバリコントローラ15は、VM−IDレジスタ14に格納されているVM−IDをチェックする(ステップS22)。
リカバリコントローラ15は、チェックしたVM−IDに一致するVM−IDを有するキャッシュ履歴テーブル13a上のbank21bを検索する(ステップS23)。
The recovery controller 15 checks the VM-ID stored in the VM-ID register 14 (step S22).
The recovery controller 15 searches for the bank 21b on the cache history table 13a having the VM-ID that matches the checked VM-ID (step S23).

検索の結果、該当した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 bank 21b (in FIG. 8, the bank 21b of VM # 1) (step S24). The address stored in the determined entry is referred to (step S25).

そして、参照したアドレスをフェッチアドレスとしてキャッシュコントローラへフェッチ要求を出す(ステップ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 cache 11, thereby completing the restoration of the cache data.

以上で第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 cache 11 is provided with a cache entry 11a as a data storage area.

キャッシュエントリ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 recovery controller 15 observes data ejection (Eject) and data invalidation (Invalidate) from the cache 11 (step S1a).
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 cache 11 and in the same cache entry 11a. The recorded VM-ID is read (step S2a).

そして、読み込んだアドレスと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 access monitoring unit 41 and AND circuits 42 to 44.

アクセス監視部41は、CPU101からキャッシュ11へのアクセスを監視する。そして、アクセスがあれば、そのアドレスをAND回路43に出力する。
AND回路42は、AND回路16とは別個に設けられ、VM−IDレジスタ14に格納されている現在動作している仮想計算機のVM−IDと履歴エントリ21に格納されている履歴データのVM−IDとの一致を判断する。
The access monitoring unit 41 monitors access from the CPU 101 to the cache 11. If there is an access, the address is output to the AND circuit 43.
The AND circuit 42 is provided separately from the AND circuit 16, and the VM-ID of the currently operating virtual machine stored in the VM-ID register 14 and the VM-ID of the history data stored in the history entry 21. A match with the ID is determined.

このAND回路42は、これらのVM−IDが一致したときは「1」を出力し、それ以外は「0」を出力する。
AND回路43は、アクセス監視部41が監視しているアドレスと履歴エントリ21内のアドレスとの一致を判断するために設けられている。
The AND circuit 42 outputs “1” when these VM-IDs match, and outputs “0” otherwise.
The AND circuit 43 is provided to determine whether the address monitored by the access monitoring unit 41 matches the address in the history entry 21.

このAND回路43は、これらのアドレスが一致したときは「1」を出力し、それ以外は「0」を出力する。
AND回路44は、AND回路42の出力とAND回路43の出力がともに「1」のときのみAビットをONする。
The AND circuit 43 outputs “1” when these addresses match, and outputs “0” otherwise.
The AND circuit 44 turns on the A bit only when both the output of the AND circuit 42 and the output of the AND circuit 43 are “1”.

図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 program execution unit 101a, a timer 101b, AND circuits 45 and 47, an OR circuit 46, and an A bit clear execution unit 48.

プログラム実行部101aおよびタイマ101bは、それぞれCPU101の一機能であり、定期的にAビットのクリア信号を出力する。
また、クリア信号を出力するタイミングは、特に限定されないが、例えば、仮想計算機の割当て時間等に応じて設定するのが好ましく、一例としては、仮想計算機の割当て時間が5ms〜15msの場合、100μm毎や1ms毎等が挙げられる。また、タイマ101bにおいては、新たなクリア信号を出力するのではなく、上記タイミングの信号が存在すれば既存の信号をそのまま用いるようにしてもよい。
Each of the program execution unit 101a and the timer 101b is a function of the CPU 101, and periodically outputs an A-bit clear signal.
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 timer 101b does not output a new clear signal, but may use an existing signal as it is if a signal of the above timing exists.

AND回路45は、前述したAND回路42と同様の機能を有している。なお、AND回路42がAND回路45を兼ねていてもよい。その場合、AND回路42の出力をAND回路47にも出力するよう構成する。   The AND circuit 45 has the same function as the AND circuit 42 described above. The AND circuit 42 may also serve as the AND circuit 45. In that case, the output of the AND circuit 42 is also output to the AND circuit 47.

OR回路46は、プログラム実行部101aまたはタイマ101bのいずれか一方からクリア信号が出力されると「1」を出力する。
AND回路47は、AND回路45の出力とOR回路46の出力がともに「1」のときは「1」を出力する。
The OR circuit 46 outputs “1” when a clear signal is output from either the program execution unit 101a or the timer 101b.
The AND circuit 47 outputs “1” when both the output of the AND circuit 45 and the output of the OR circuit 46 are “1”.

Aビットクリア実行部48は、AND回路47の出力が「1」のときAビットをOFFする。
このように、リカバリ動作とは別に、履歴データの使用頻度に従ってAビットはONまたはOFFする。
The A bit clear execution unit 48 turns off the A bit when the output of the AND circuit 47 is “1”.
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 recovery controller 15 of the computer apparatus 10c according to the fourth embodiment sequentially checks the history entries 21, 21,... On the cache history table 13 (step S12).

具体的には、AND回路16が、リカバリコントローラ15の指示によって逐次入力される履歴エントリ21、21、・・・内のAビットおよびIDタグ(=VM−ID)と、VM切替信号入力時にVM−IDレジスタ14から入力されるこれから動作しようとしている仮想計算機のVM−IDとを比較し、その結果をリカバリコントローラ15に出力する(ステップS13a)。   Specifically, the AND circuit 16 receives the A bit and ID tag (= VM-ID) in the history entries 21, 21,... Sequentially input according to the instruction of the recovery controller 15, and the VM when the VM switching signal is input. A comparison is made with the VM-ID of the virtual machine which is going to operate from the ID register 14 and the result is output to the recovery controller 15 (step S13a).

これにより、リカバリコントローラ15は、AND回路16から「1」が出力された履歴データ、すなわち、VM−IDが一致し、AビットがONになっている履歴データのアドレスのみを参照し、参照したアドレスをフェッチアドレスとしてキャッシュコントローラへフェッチ要求を出す(ステップS15)。   As a result, the recovery controller 15 refers to and refers only to the history data in which “1” is output from the AND circuit 16, that is, the address of the history data in which the VM-ID matches and the A bit is ON. A fetch request is issued to the cache controller using the address as a fetch address (step S15).

この第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 CPU 101 to the cache 11, the reference bit of the history data of the corresponding history entry 21 is turned on, and if there is an update (write) request from the CPU 101 to the cache 11, Turn on the update bit of the history data of the corresponding history entry. Also, as in the fourth embodiment, unused reference bits and update bits are periodically turned off.

さらに第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 target setting unit 51, an effective rank setting unit 52, and an effective rank control unit 53.
The priority target setting unit 51 is set to prioritize the reference request or the update request.

有効ランク設定部52には、リカバリ動作時に、リカバリ対象とする履歴データの優先度を示すランクが設定されている。
図17は、ランクを示す図である。
The effective rank setting unit 52 is set with a rank indicating the priority of history data to be recovered during the recovery operation.
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, rank 1 has the highest priority, and rank 4 has the lowest priority.

図16に戻って説明する。
有効ランク制御部53は、優先対象設定部51および有効ランク設定部52により設定された設定基準に基づいて、履歴データに含まれる参照ビットおよび変更ビットが設定基準を満たしているか否かを判断する。例えば、優先対象設定部51には参照要求が優先されることが設定され、有効ランク設定部52にランク2が設定されているときは、図17に示すランクテーブル52aが参照され、参照ビットおよび更新ビットがともに「1」の履歴データ、または参照ビットが「1」、更新ビットが「0」の履歴データのみ設定基準を満たしていると判断する。そして、有効ランク制御部53は、設定基準を満たしているときは、「1」を出力し、満たしていないときは「0」を出力する。
Returning to FIG.
The effective rank control unit 53 determines whether the reference bit and the change bit included in the history data satisfy the setting criterion based on the setting criterion set by the priority target setting unit 51 and the effective rank setting unit 52. . For example, when priority is set to the priority target setting unit 51 and rank 2 is set to the effective rank setting unit 52, the rank table 52a shown in FIG. It is determined that only history data whose update bits are both “1”, or history data whose reference bits are “1” and update bits are “0” satisfies the setting criteria. The effective rank control unit 53 outputs “1” when the setting criterion is satisfied, and outputs “0” when the setting criterion is not satisfied.

次に、計算機装置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 recovery controller 15 sequentially checks each history entry 21, 21,... On the cache history table 13 (step S12).

具体的には、AND回路16が、リカバリコントローラ15の指示によって逐次入力される履歴エントリ21、21、・・・内のIDタグ(=VM−ID)と、VM切替信号入力時にVM−IDレジスタ14から入力されるこれから動作しようとしている仮想計算機のVM−IDとを比較する。また、有効ランク制御部53の出力をチェックする。そして、その結果をリカバリコントローラ15に出力する(ステップS13b)。   Specifically, the AND circuit 16 receives the ID tag (= VM-ID) in the history entries 21, 21,... That are sequentially input according to the instruction of the recovery controller 15, and the VM-ID register when the VM switching signal is input. 14 is compared with the VM-ID of the virtual machine to be operated. Further, the output of the effective rank control unit 53 is checked. Then, the result is output to the recovery controller 15 (step S13b).

これにより、リカバリコントローラ15は、AND回路16から「1」が出力された履歴データ、すなわち、VM−IDが一致し、上記設定基準を満たした履歴データのアドレスのみを参照し、参照したアドレスをフェッチアドレスとしてキャッシュコントローラへフェッチ要求を出す(ステップS15)。   As a result, the recovery controller 15 refers only to the history data in which “1” is output from the AND circuit 16, that is, the history data that matches the VM-ID and satisfies the setting criteria, and refers to the referenced address. A fetch request is issued to the cache controller as a fetch address (step S15).

この第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 circuit 44, the counter is incremented.

また、計算機装置10eは、有効閾値設定部61と、カウンタ比較部62とを有している。
有効閾値設定部61には、カウンタ比較部62が比較するカウンタの閾値(例えば10回以上等)が設定されている。
The computer apparatus 10 e includes an effective threshold value setting unit 61 and a counter comparison unit 62.
In the effective threshold value setting unit 61, a threshold value of a counter to be compared by the counter comparison unit 62 (for example, 10 times or more) is set.

カウンタ比較部62は、有効閾値設定部61により設定されたカウンタの閾値と履歴エントリ21に格納されている履歴データのカウンタのカウンタ値とを比較する。そして、カウンタの閾値の条件を満たしているか否かを判断し、満たしているときは、「1」を出力し、満たしていないときは「0」を出力する。   The counter comparison unit 62 compares the counter threshold set by the effective threshold setting unit 61 with the counter value of the history data counter stored in the history entry 21. Then, it is determined whether or not the condition of the counter threshold is satisfied. If it is satisfied, “1” is output, and if it is not satisfied, “0” is output.

次に、計算機装置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 recovery controller 15 sequentially checks each history entry 21, 21,... On the cache history table 13 (step S12).

具体的には、AND回路16が、リカバリコントローラ15の指示によって逐次入力される履歴エントリ21、21、・・・内のIDタグ(=VM−ID)と、VM切替信号入力時にVM−IDレジスタ14から入力されるこれから動作しようとしている仮想計算機のVM−IDとを比較する。また、カウンタ比較部62の出力をチェックする。そして、その結果をリカバリコントローラ15に出力する(ステップS13c)。   Specifically, the AND circuit 16 receives the ID tag (= VM-ID) in the history entries 21, 21,... That are sequentially input according to the instruction of the recovery controller 15, and the VM-ID register when the VM switching signal is input. 14 is compared with the VM-ID of the virtual machine to be operated. Also, the output of the counter comparison unit 62 is checked. Then, the result is output to the recovery controller 15 (step S13c).

これにより、リカバリコントローラ15は、AND回路16から「1」が出力された履歴データ、すなわち、VM−IDが一致し、上記カウンタの閾値の条件を満たした履歴データのアドレスのみを参照し、参照したアドレスをフェッチアドレスとしてキャッシュコントローラへフェッチ要求を出す(ステップS15)。   As a result, the recovery controller 15 refers to only the history data for which “1” is output from the AND circuit 16, that is, the address of the history data that matches the VM-ID and satisfies the threshold condition of the counter. A fetch request is issued to the cache controller using the address thus obtained as a fetch address (step S15).

この第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回のカウンタ増分に重み付けを行い、更新に比べ参照を優先させたり、参照のみを有効としたりするよう制御してもよい。
<Modification 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>
また、本実施の形態では、単調増加のカウンタを用いたが、本発明はこれに限らず、例えば、エイジング方式のカウンタ(エイジングカウンタ)を利用することもできる。
<Modification 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 counter comparison unit 62 outputs “1” when the counter value is equal to or larger than the value set in the effective threshold setting unit 61.

このようなエイジングカウンタを設けることにより、定期的なクリア動作を省略することができる。
次に、第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 FIFO control unit 71 that performs first in first out (FIFO) control for each bank 21b. .

以下、第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-ID register 14 is VM # 1.
First, if the corresponding history data does not exist in the bank 21b of the VM # 1 at the time of cache access, the FIFO control unit 71 enqueues the cache history as history data on the entrance en1 side (upper side in FIG. 20) of the bank 21b. To do.

一方、キャッシュアクセス時に、該当する履歴データがキャッシュ履歴テーブル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 bank 21b becomes full, the FIFO control unit 71 discards the history data closest to the queue exit ex1 side (the lower side in FIG. 20).

また、FIFO制御部71は、リカバリ動作時にリカバリ対象とする履歴データを、bank21bの入口en1側から所定個数分、指定する。
そしてリカバリ時には、リカバリコントローラ15が、FIFO制御部71が指定した個数分の履歴データを用いてリカバリを行う。すなわち、本実施の形態の計算機装置(リカバリコントローラ15)は、LIFO(Last In First Out)制御を行う。
Further, the FIFO control unit 71 designates a predetermined number of history data to be recovered during the recovery operation from the entrance en1 side of the bank 21b.
At the time of recovery, the recovery controller 15 performs recovery using the history data for the number specified by the FIFO control unit 71. That is, the computer apparatus (recovery controller 15) of the present embodiment performs LIFO (Last In First Out) control.

この第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 CPU 101 and the cache 11 is monitored. In addition, since it is not necessary to turn on / off bits, recovery and cache resource use can be made more efficient without greatly expanding the configuration of the computer apparatus. Further, by changing the number of history data to be recovered, processing according to the performance of the computer device can be executed.

なお、本実施の形態では、FIFO制御部71が、リカバリ対象とする履歴データの個数を指定したが、リカバリコントローラ15がリカバリ対象とする履歴データの個数を指定するようにしてもよい。   In the present embodiment, the FIFO control unit 71 specifies the number of history data to be recovered, but the recovery controller 15 may specify the number of history data to be recovered.

次に、第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 unit 81, an invalidation signal monitoring unit 82, an OR circuit 83, and a history data deleting unit 84.
The write-back monitoring unit 81 writes back data from the cache 11 to the memory 12 (even if data is written from the CPU 101 to the memory 12, only the data on the cache 11 is updated, and unless the condition is satisfied, the memory 12 When the write back is detected, the address of the cache data is output to the OR circuit 83.

無効化信号監視部82は、キャッシュ11への無効化命令を監視し、無効化命令を検出すると、OR回路83に、その無効化命令のキャッシュデータのアドレスを出力する。
OR回路83は、ライトバック監視部81または無効化信号監視部82のいずれか一方からアドレスが出力されると、そのアドレスを出力する。
The invalidation signal monitoring unit 82 monitors an invalidation instruction to the cache 11 and outputs an address of cache data of the invalidation instruction to the OR circuit 83 when detecting the invalidation instruction.
When an address is output from either the write-back monitoring unit 81 or the invalidation signal monitoring unit 82, the OR circuit 83 outputs the address.

AND回路43aは、OR回路83が出力するアドレスと履歴エントリ21内のアドレスとの一致を判断するために設けられている。
このAND回路43aは、これらのアドレスが一致したときは「1」を出力し、それ以外は「0」を出力する。
The AND circuit 43 a is provided to determine whether the address output from the OR circuit 83 matches the address in the history entry 21.
The AND circuit 43a outputs “1” when these addresses match, and outputs “0” otherwise.

履歴データ削除部84は、AND回路44から「1」が出力されると、該当するVM−IDを備える履歴データをキャッシュ履歴テーブル13から削除する。
この第8の実施の形態の計算機装置によれば、第4の実施の形態の計算機装置10cと同様の効果が得られる。
When “1” is output from the AND circuit 44, the history data deleting unit 84 deletes history data having the corresponding VM-ID from the cache history table 13.
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 cache 11b instead of the cache 11, and history data stored in the cache history table 13 is set according to LRU information (described later) of the cache 11b. Has a bit.

また、計算機装置10fは、このUビットをセットするためのLRU情報反映部15aをリカバリコントローラ15とは別個に有している。なお、図22では、リカバリコントローラ15等の図示を省略している。   Further, the computer apparatus 10 f has an LRU information reflecting unit 15 a for setting the U bit separately from the recovery controller 15. In FIG. 22, the recovery controller 15 and the like are not shown.

図23は、第9の実施の形態のキャッシュを示す図である。
キャッシュ11bは、キャッシュアドレス/データ格納部111と、LRU情報格納部112とを有している。
FIG. 23 is a diagram illustrating a cache according to the ninth embodiment.
The cache 11 b includes a cache address / data storage unit 111 and an LRU information storage unit 112.

キャッシュアドレス/データ格納部111は、複数のキャッシュライン(図23では、Way#0〜Way#3)を備える格納領域を示すSET#n(n=1、2、・・・、k)を有している。   The cache address / data storage unit 111 has SET # n (n = 1, 2,..., K) indicating a storage area including a plurality of cache lines (Way # 0 to Way # 3 in FIG. 23). is doing.

LRU情報格納部112には、SET#n内のキャッシュラインWay#0〜Way#3の優先順を示す数値を備えるLRU情報が格納されている。「1」が最も新しく(最近使用され)、「4」が最も古い(使われてから最も時間が経過している)。   The LRU information storage unit 112 stores LRU information including numerical values indicating the priority order of the cache lines Way # 0 to Way # 3 in the SET # n. “1” is the newest (most recently used), and “4” is the oldest (the most time has elapsed since it was used).

キャッシュアドレス/データ格納部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 / data storage unit 111 and the information in the LRU information storage unit 112 are associated with each other.
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 line Way # 2 in SET # n is the next replacement target (replacement target) in SET # n.

次に、第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 information reflecting unit 15a starts the operation with a switch signal to another VM among VM switching as a trigger (step S31). Specifically, in order to find out its own history data from the cache history table 13, all the records that match the VM-ID of the current virtual machine (not the new virtual machine) stored in the VM-ID register 14. The VM-ID of the history entry 21 is checked (steps S32 and S33), and the address of the matching history entry 21 is referred to (step S34).

そして、そのアドレスを有するキャッシュアドレス/データ格納部111をキャッシュ11bから検索する(ステップS35)。
次に、LRU情報反映部15aが、見つかったキャッシュアドレス/データ格納部111に対応するLRU情報格納部112からLRU情報を取り出す(ステップS36)。
Then, the cache 11b having the address is searched from the cache 11b (step S35).
Next, the LRU information reflecting unit 15a extracts the LRU information from the LRU information storage unit 112 corresponding to the found cache address / data storage unit 111 (step S36).

そして、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 information reflecting unit 15a reflects the extracted LRU information in the U bit of the history entry 21 of the address referred in step S34 (step S37). For example, if the LRU information is “4”, the U bit is OFF (0), and if the LRU information is “1” to “3”, the U bit is set to ON (1). Alternatively, the U bit of the history entry that matches at the end of step S33 may be set to ON (1) and set to OFF (0) only when the extracted LRU information is “4”. .

これにより、リカバリ動作時には、リカバリコントローラ15は、キャッシュ履歴テーブル13に格納されている履歴データのうち、UビットがONにセットされているデータのみ復元するよう制御する。なお、この制御方法は、前述した第4の実施の形態のAビットを用いた方法と同様であるため、その説明を省略する。   As a result, during the recovery operation, the recovery controller 15 controls to restore only the data in which the U bit is set to ON among the history data stored in the cache history table 13. Since this control method is the same as the method using the A bit in the fourth embodiment described above, the description thereof is omitted.

この第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 cache 11b (4 way set associative), means for holding numerical values of 1 to 4 indicating four levels of priority is provided in the history data, and the priority order used in the recovery operation is determined. At that time, a means for specifying the effective recovery number and priority is also provided. For example, if the priority is specified up to 2, control is performed so that history data having priorities 3 and 4 is not targeted for recovery.

以上、本発明の計算機装置およびそのキャッシュリカバリ方法を、図示の実施の形態に基づいて説明したが、本発明はこれに限定されるものではなく、各部の構成は、同様の機能を有する任意の構成のものに置換することができる。また、本発明に、他の任意の構成物や工程が付加されていてもよい。   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 appendix 1, wherein the determination unit refers to the history information storage area specified by the identifier of the virtual machine after switching.

(付記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 appendix 1 or 2, wherein the determination unit refers to the history information storage area specified by the identifier of the virtual computer after switching.

(付記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 appendix 1 or 2, further comprising:

(付記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 claim 1 or 2, wherein the determination unit determines the presence or absence of the identifier included in the history information in which the access frequency indicated by the access frequency information satisfies a predetermined condition at the time of the determination. Computer equipment.

(付記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 appendix 5, wherein the access frequency of the access frequency information is increased.

(付記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 claim 5, wherein the presence or absence of the identifier included in the history information in which the bit is valid is determined.

(付記8) 前記付加部は、前記履歴情報の格納時に前記アクセス頻度情報を付加することを特徴とする付記5記載の計算機装置。
(付記9) 所定時間アクセスがない前記アクセス頻度情報のアクセス履歴を消去する履歴消去実行部をさらに有することを特徴とする付記5記載の計算機装置。
(Supplementary note 8) The computer apparatus according to supplementary note 5, wherein the adding unit adds the access frequency information when the history information is stored.
(Supplementary note 9) The computer apparatus according to supplementary note 5, further comprising a history deletion execution unit that deletes an access history of the access frequency information that has not been accessed for a predetermined time.

(付記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 appendix 5 or 9, wherein the presence / absence of the identifier included in the history information having the counter value is determined.

(付記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 appendix 1 or 2, wherein the determination unit refers to the history information storage area specified by the identifier of the virtual computer after switching.

(付記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 12 characterized by the above-mentioned.
(Additional remark 14) The computer apparatus of Additional remark 12 characterized by the predetermined number of the said history information made into the judgment object of the said judgment part being designated from the entrance side of the said history information storage area.

(付記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 appendix 1 or 2, 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.

(付記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 appendix 15, wherein the computer apparatus is deleted from the history information storage unit.

(付記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 claim 1 or 2, wherein the determination unit determines the presence or absence of the identifier included in the history information in which the access frequency indicated by the access frequency information satisfies a predetermined condition at the time of the determination. Computer equipment.

(付記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.

本発明の概要を示す図である。It is a figure which shows the outline | summary of this invention. 計算機装置のハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of a computer apparatus. 計算機装置の機能を示すブロック図である。It is a block diagram which shows the function of a computer apparatus. キャッシュに格納されているデータを示す図である。It is a figure which shows the data stored in the cache. 履歴データの記録方法を説明する図である。It is a figure explaining the recording method of history data. リカバリ動作を説明する図である。It is a figure explaining recovery operation. 履歴エントリを拡張した例を示す図である。It is a figure which shows the example which expanded the log | history entry. 第2の実施の形態の計算機装置を示す図である。It is a figure which shows the computer apparatus of 2nd Embodiment. 第3の実施の形態の計算機装置のキャッシュの内部構造を示す図である。It is a figure which shows the internal structure of the cache of the computer apparatus of 3rd Embodiment. 第3の実施の形態の履歴データの記録方法を説明する図である。It is a figure explaining the recording method of the historical data of 3rd Embodiment. 第4の実施の形態の履歴データを示す図である。It is a figure which shows the historical data of 4th Embodiment. AビットをONする方法を示す図である。It is a figure which shows the method of turning ON A bit. AビットをOFFする方法を示す図である。It is a figure which shows the method of turning off A bit. 第4の実施の形態の計算機装置のリカバリ動作を説明する図である。It is a figure explaining the recovery operation | movement of the computer apparatus of 4th Embodiment. 第5の実施の形態の履歴データを示す図である。It is a figure which shows the historical data of 5th Embodiment. 第5の実施の形態の計算機装置を示す図である。It is a figure which shows the computer apparatus of 5th Embodiment. ランクを示す図である。It is a figure which shows a rank. 第6の実施の形態の計算機装置を示す図である。It is a figure which shows the computer apparatus of 6th Embodiment. エイジングカウンタの推移を示す図である。It is a figure which shows transition of an aging counter. 第7の実施の形態の計算機装置を示す図である。It is a figure which shows the computer apparatus of 7th Embodiment. 第8の実施の形態の計算機装置を示す図である。It is a figure which shows the computer apparatus of 8th Embodiment. 第9の実施の形態の計算機装置を示す図である。It is a figure which shows the computer apparatus of 9th Embodiment. 第9の実施の形態のキャッシュを示す図である。It is a figure which shows the cache of 9th Embodiment. 第9の実施の形態の計算機装置のUビットの制御方法を示す図である。It is a figure which shows the control method of the U bit of the computer apparatus of 9th Embodiment.

符号の説明Explanation of symbols

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, 10f Computer device 2 High-speed cache 3 Storage unit 3a Data 4 History information 4a Identifier 4b Address 5 History information storage unit 6 Judgment unit 7 Transfer instruction unit 11, 11b Cache 11a Cache Entry 12 Memory 13, 13a Cache history table 14 VM-ID register 15 Recovery controller 15a LRU information reflection unit 16, 42, 43, 43a, 44, 45, 47 AND circuit 21, 21a History entry 21b bank
41 access monitoring unit 46, 83 OR circuit 48 bit clear execution unit 51 priority target setting unit 52 effective rank setting unit 52a rank table 53 effective rank control unit 61 effective threshold setting unit 62 counter comparison unit 71 FIFO control unit 81 write back monitoring unit 82 Invalidation signal monitoring unit 84 History data deletion unit 101a Program execution unit 101b Timer 111 Cache address / data storage unit 112 LRU information storage unit 211 Area

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.
所定時間アクセスがない前記アクセス頻度情報のアクセス履歴を消去する履歴消去実行部をさらに有することを特徴とする請求項4記載の計算機装置。   5. The computer apparatus according to claim 4, further comprising a history erasure execution unit that erases an access history of the access frequency information that has not been accessed for a predetermined time. 前記アクセス頻度情報は、カウンタで構成されており、前記アクセス頻度増加部は、アクセスのあったデータに対応する前記履歴情報の前記カウンタをインクリメントし、前記判断部は、所定値以上のカウンタ値を備える前記履歴情報に含まれる前記識別子の有無を判断することを特徴とする請求項4または5記載の計算機装置。   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 sets a counter value equal to or greater than a predetermined value. 6. The computer apparatus according to claim 4, wherein the presence / absence of the identifier included in the history information is determined. 前記履歴情報格納部は、1つの前記識別子に複数の前記履歴情報が関連づけられた履歴情報格納領域を複数有しており、
前記履歴情報格納領域へ前記履歴情報を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.
JP2008014645A 2007-04-24 2008-01-25 Computer apparatus and cache recovery method thereof Expired - Fee Related JP5104340B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (7)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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