JP2015228060A - Arithmetic processing unit and control method for arithmetic processing unit - Google Patents
Arithmetic processing unit and control method for arithmetic processing unit Download PDFInfo
- Publication number
- JP2015228060A JP2015228060A JP2014112574A JP2014112574A JP2015228060A JP 2015228060 A JP2015228060 A JP 2015228060A JP 2014112574 A JP2014112574 A JP 2014112574A JP 2014112574 A JP2014112574 A JP 2014112574A JP 2015228060 A JP2015228060 A JP 2015228060A
- Authority
- JP
- Japan
- Prior art keywords
- cache
- memory
- core group
- access request
- memory access
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
本発明は,演算処理装置及び演算処理装置の制御方法に関する。 The present invention relates to an arithmetic processing unit and a control method for the arithmetic processing unit.
演算処理装置(またはCPU(CPU: Central Processing Unitと称する)は,単数または複数のCPUコアと,それらのCPUコアが利用するキャッシュメモリとを有する。CPUコアは内部に一次キャッシュメモリを有し,上記のキャッシュメモリは,CPUコアが利用する二次キャッシュメモリ(以下L2キャッシュメモリと称する)である。 An arithmetic processing unit (or CPU (CPU: Central Processing Unit)) includes one or a plurality of CPU cores and a cache memory used by the CPU cores, and the CPU core includes a primary cache memory therein. The cache memory is a secondary cache memory (hereinafter referred to as L2 cache memory) used by the CPU core.
大規模な演算処理装置は,仮想化技術により,CPUコアに複数の仮想マシン(以下VM(Virtual Machine)と称する)を生成し,複数の仮想マシンがそれぞれキャッシュメモリを共有する。また,CPUコアは,複数のプロセスを処理する場合,複数のプロセスがそれぞれキャッシュメモリを共有する。あるいは,複数のCPUコアがそれぞれキャッシュメモリを共有する。このようにキャッシュメモリの共有の単位には,複数のCPUコア,複数のプロセス,複数のVMなどのメモリアクセス要求元がある。 A large-scale arithmetic processing device generates a plurality of virtual machines (hereinafter referred to as VMs (Virtual Machines)) in a CPU core by virtualization technology, and the plurality of virtual machines share a cache memory. Further, when the CPU core processes a plurality of processes, the plurality of processes share the cache memory. Alternatively, the plurality of CPU cores share the cache memory. As described above, cache memory sharing units include memory access request sources such as a plurality of CPU cores, a plurality of processes, and a plurality of VMs.
一方,キャッシュメモリは,複数のウェイ構造を有し,共通のインデックスに対して複数のキャッシュブロックを登録可能にし,キャッシュメモリの容量を増大させる。ウェイ数が大きくなれば,同じインデックスに対して利用できるキャッシュブロック数が増大し,キャッシュメモリの利用効率が向上する。 On the other hand, the cache memory has a plurality of way structures and allows a plurality of cache blocks to be registered for a common index, thereby increasing the capacity of the cache memory. As the number of ways increases, the number of cache blocks that can be used for the same index increases and the use efficiency of the cache memory improves.
近年の演算処理装置において,メモリアクセス要求を発行する複数の要求元(例えば,複数のCPUコア,複数のプロセス,複数のVM)に対応して,キャッシュメモリの最大ウェイ数を設定可能にすることで,キャッシュメモリを異なるサイズで分割して複数の要求元別に割り当てるキャッシュ分割制御が提案されている。例えば,以下の特許文献などである。 In recent arithmetic processing units, it is possible to set the maximum number of ways of a cache memory corresponding to a plurality of request sources (for example, a plurality of CPU cores, a plurality of processes, and a plurality of VMs) issuing memory access requests. Therefore, cache partition control has been proposed in which the cache memory is divided into different sizes and assigned to a plurality of request sources. For example, the following patent documents.
このキャッシュ分割制御によれば,各要求元が利用できる最大ウェイ数を設定可能にし,メモリアクセス要求,例えばロード要求に応答してデータをキャッシュメモリに登録する際にキャッシュミスした場合,現時点で要求元に割り当てられているウェイ数と予め設定している最大ウェイ数とを比較し,現在の割当済みウェイ数が最大ウェイ数に達していなければ,他の要求元に割当済みのキャッシュブロックをリプレースして現要求元のデータを格納し,達していれば,現要求元に割当済みのキャッシュブロックをリプレースしてデータを格納する。 According to this cache partitioning control, it is possible to set the maximum number of ways that each requester can use. If a cache miss occurs when registering data in the cache memory in response to a memory access request, for example, a load request, a request is made at this time. Compare the number of ways originally assigned to the preset maximum number of ways, and if the number of currently assigned ways has not reached the maximum number of ways, replace the cache block assigned to another request source. Then, the data of the current request source is stored, and if it has reached, the cache block allocated to the current request source is replaced and stored.
そして,各要求元が利用できる最大ウェイ数の設定は,例えば,CPUコアからの最大ウェイ数を設定する特殊命令により行われ,もしくはメモリアクセス要求に最大ウェイ数を付加して行われる。最大ウェイ数が設定された後に,キャッシュメモリへのデータの登録処理が発生したときに,上記のリプレース処理によりリプレースされたキャッシュブロックにデータが格納され,各要求元に割り当てるキャッシュメモリのサイズを最大ウェイ数未満に維持するよう制御される。このように,キャッシュ分割制御による分割されたキャッシュサイズを動的に変更して,複数の要求元に対して限られた容量のキャッシュメモリを効率的に利用する。 The maximum number of ways that can be used by each request source is set by, for example, a special instruction for setting the maximum number of ways from the CPU core, or by adding the maximum number of ways to the memory access request. When the registration of data to the cache memory occurs after the maximum number of ways has been set, the data is stored in the cache block replaced by the above replacement process, and the size of the cache memory allocated to each request source is maximized. Controlled to maintain less than the number of ways. In this way, the cache size divided by the cache division control is dynamically changed to efficiently use a limited amount of cache memory for a plurality of request sources.
大規模な情報処理装置では,複数の演算処理装置で構成した演算処理装置システムを搭載する。各演算処理装置は複数のCPUコアとそれらで共有されるキャッシュメモリとを有し,各演算処理装置がそれぞれが管理するメインメモリにアクセスし,それぞれが有するキャッシュメモリにデータを登録する。したがって,各演算処理装置が,それぞれの複数のメモリアクセス要求元(例えば複数のVMなど)に対して,それぞれのキャッシュメモリの最大ウェイ数を設定してキャッシュ分割制御を行う。 A large-scale information processing apparatus is equipped with an arithmetic processing unit system composed of a plurality of arithmetic processing units. Each arithmetic processing unit has a plurality of CPU cores and a cache memory shared by them, and each arithmetic processing unit accesses a main memory managed by each arithmetic processing unit, and registers data in the cache memory of each arithmetic processing unit. Therefore, each arithmetic processing unit performs cache division control by setting the maximum number of ways of each cache memory for each of a plurality of memory access request sources (for example, a plurality of VMs).
しかしながら,第1の演算処理装置は,第2の演算処理装置内のキャッシュ分割制御に必要な要求元とその最大ウェイ数を含むキャッシュ分割情報を設定することができない。これを可能にするためには,キャッシュ分割情報を設定するための特殊な命令を新たに導入して,第1の演算処理装置がその特殊な命令を実行する必要がある。その結果,特殊な命令を処理できるように演算処理装置の構成を大幅に変更する必要がある。さらに,特殊な命令を処理することにより演算処理装置間に新たなバストランザクションが発生するので,通常のメモリアクセス要求によるレイテンシが悪化する。 However, the first arithmetic processing unit cannot set the cache division information including the request source and the maximum number of ways necessary for the cache division control in the second arithmetic processing unit. In order to make this possible, it is necessary to newly introduce a special instruction for setting the cache division information and to execute the special instruction by the first arithmetic processing unit. As a result, it is necessary to drastically change the configuration of the arithmetic processing unit so that special instructions can be processed. Further, since a new bus transaction occurs between the processing units by processing special instructions, the latency due to a normal memory access request is deteriorated.
そこで,1つの実施の形態の目的は,演算処理装置間でキャッシュ分割情報の設定をすることができる演算処理装置及び演算処理装置の制御方法を提供することにある。 Therefore, an object of one embodiment is to provide an arithmetic processing device and a control method for the arithmetic processing device that can set cache division information between arithmetic processing devices.
実施の形態の第1の側面は,複数のコアと,第1のキャッシュ制御部と第1のキャッシュメモリとを含む第1のキャッシュとを有し,前記第1のキャッシュ制御部が,第1のキャッシュ分割情報に基づいて,メモリアクセス要求元に対応して前記第1のキャッシュメモリを分割するキャッシュ分割制御を行う第1のコアグループと,
複数のコアと,第2のキャッシュ制御部と第2のキャッシュメモリとを含む第2のキャッシュとを有し,前記第2のキャッシュ制御部が,第2のキャッシュ分割情報に基づいて,メモリアクセス要求元に対応して前記第2のキャッシュメモリを分割するキャッシュ分割制御を行う第2のコアグループと,
前記第1,第2のコアグループ間に設けられメモリアクセス要求が送信されるコアグループ間バスとを有し,
前記第1のコアグループのメモリアクセス要求元が,前記第2のコアグループが管理するメインメモリへのメモリアクセス要求を前記第2のキャッシュ分割情報を付加して発行した場合,前記第2のコアグループの第2のキャッシュ制御部が,前記発行されたメモリアクセス要求に応答して,前記付加された第2のキャッシュ分割情報を登録する演算処理装置である。
The first aspect of the embodiment includes a first cache including a plurality of cores, a first cache control unit, and a first cache memory, wherein the first cache control unit includes a first cache A first core group for performing cache division control for dividing the first cache memory in response to a memory access request source based on the cache division information of
A second cache including a plurality of cores, a second cache control unit, and a second cache memory, wherein the second cache control unit accesses the memory based on the second cache division information A second core group for performing cache partitioning control for partitioning the second cache memory in response to a request source;
An inter-core group bus provided between the first and second core groups to which a memory access request is transmitted;
When the memory access request source of the first core group issues a memory access request to the main memory managed by the second core group with the second cache partition information added, the second core The second cache control unit of the group is an arithmetic processing unit that registers the added second cache division information in response to the issued memory access request.
第1の側面によれば,演算処理装置間でキャッシュ分割情報の設定をすることができる。 According to the first aspect, cache division information can be set between arithmetic processing devices.
図1は,本実施の形態における演算処理装置の構成を示す図である。図1において,第1のコアグループLOCAL_CPU_0は,第1のメインメモリM_MEM_0を管理するCPUである。また,第2のコアグループHOME_CPU_1は,第2のメインメモリM_MEM_1を管理するCPUである。第1,第2のコアグループは,それぞれ異なるCPUチップの場合もあれば,単一のCPUチップ内に設けられた異なるCPUユニットの場合もある。本実施の形態では,異なるCPUチップで構成される演算処理装置の場合と,単一のCPUチップで構成される演算処理装置の場合のいずれにも適用できる。以下,異なるCPUチップの実施例と単一のCPUチップの実施例を区別することなく,2つのCPUをそれぞれを第1,第2のコアグループと称する。 FIG. 1 is a diagram showing a configuration of an arithmetic processing device according to the present embodiment. In FIG. 1, the first core group LOCAL_CPU_0 is a CPU that manages the first main memory M_MEM_0. The second core group HOME_CPU_1 is a CPU that manages the second main memory M_MEM_1. The first and second core groups may be different CPU chips, or may be different CPU units provided in a single CPU chip. In the present embodiment, the present invention can be applied to either an arithmetic processing device composed of different CPU chips or an arithmetic processing device composed of a single CPU chip. In the following, the two CPUs will be referred to as first and second core groups, respectively, without distinguishing between different CPU chip embodiments and single CPU chip embodiments.
第1のコアグループLOCAL_CPU_0は,複数,例えば4つのCPUコアCORE-00〜CORE-03と,それらのCPUコアに共通に設けられたキャッシュL2_CACHEと,IOバスIO_BUSを介して接続される外部のハードディスクHDDなどとの入出力を制御するIOデバイスIO_DEVICEと,リモートバッファR_BUFとを有する。そして,第1のコアグループLOCAL_CPU_0は,メインメモリM_MEM_0を管理し,そのメモリアクセスを制御する。CPUコアCORE-00〜CORE-03は,それぞれコアグループ内バスBUS_1を介してキャッシュL2_CACHEにメモリアクセス要求を発行し,キャッシュL2_CACHEがメモリアクセス要求を処理し,キャッシュミスした場合にメインメモリM_MEM_0へのメモリアクセスを制御する。 The first core group LOCAL_CPU_0 includes a plurality of, for example, four CPU cores CORE-00 to CORE-03, a cache L2_CACHE provided in common to those CPU cores, and an external hard disk connected via the IO bus IO_BUS. It has an IO device IO_DEVICE that controls input / output to / from an HDD, etc., and a remote buffer R_BUF. The first core group LOCAL_CPU_0 manages the main memory M_MEM_0 and controls its memory access. Each of the CPU cores CORE-00 to CORE-03 issues a memory access request to the cache L2_CACHE via the bus BUS_1 in the core group. When the cache L2_CACHE processes the memory access request and a cache miss occurs, the CPU core CORE-00 to CORE-03 Control memory access.
第2のコアグループLOCAL_CPU_1も,第1のコアグループLOCAL_CPU_0と同様の構成を有し,複数,例えば4つのCPUコアCORE-10〜CORE-13と,それらのCPUコアに共通に設けられたキャッシュL2_CACHEと,外部のハードディスクHDDなどとの入出力を制御するIOデバイスIO_DEVICEと,リモートバッファR_BUFとを有する。そして,第2のコアグループLOCAL_CPU_1は,メインメモリM_MEM_1を管理し,そのメモリアクセスを制御する。CPUコアCORE-10〜CORE-13は,それぞれコアグループ内バスBUS_1を介してキャッシュL2_CACHEにメモリアクセス要求を発行し,キャッシュL2_CACHEがメモリアクセス要求を処理し,キャッシュミスした場合にメインメモリM_MEM_1へのメモリアクセスを制御する。 The second core group LOCAL_CPU_1 also has a configuration similar to that of the first core group LOCAL_CPU_0, and a plurality of, for example, four CPU cores CORE-10 to CORE-13 and a cache L2_CACHE provided in common to those CPU cores. And an IO device IO_DEVICE for controlling input / output with an external hard disk HDD or the like, and a remote buffer R_BUF. The second core group LOCAL_CPU_1 manages the main memory M_MEM_1 and controls its memory access. Each of the CPU cores CORE-10 to CORE-13 issues a memory access request to the cache L2_CACHE via the bus BUS_1 in the core group. When the cache L2_CACHE processes the memory access request and a cache miss occurs, the CPU core CORE-10 to CORE-13 sends the memory access request to the main memory M_MEM_1. Control memory access.
第1のコアグループLOCAL_CPU_0と第2のコアグループHOME_CPU_1との間は,コアグループ間バスBUS_0で接続され,コアグループが互いに発行した相手のコアグループが管理するメインメモリへのメモリアクセス要求が,コアグループ間バスBUS_0を経由してバストランザクションにより送信される。 The first core group LOCAL_CPU_0 and the second core group HOME_CPU_1 are connected by an inter-core group bus BUS_0, and a memory access request to the main memory managed by the other core group issued by the core group is sent to the core. Sent by bus transaction via inter-group bus BUS_0.
上記の第1のコアグループLOCAL_CPU_0はメインメモリM_MEM_0を管理しそのメモリアクセスを制御するとは,具体的には次のような管理,制御である。メインメモリM_MEM_0内のデータに対するメモリアクセス要求(ロード要求またはストア要求)は,第1のコアグループLOCAL_CPU_0内のメモリアクセスコントローラ(図示せず)が実行する。また,第1のコアグループLOCAL_CPU_0は,メインメモリM_MEM_0へのロード要求が発生し,メインメモリM_MEM_0のデータが第2のコアグループHOME_CPU_1により持ち出された場合には,その事実をメインメモリ内またはキャッシュ制御部内のディレクトリに記憶する。そして,その後メインメモリM_MEM_0内のデータに対して書き込みが発生した場合,ディレクトリをチェックし,そのデータを持ち出している第2のコアグループHOME_CPU_1のキャッシュメモリ内のデータを無効化した上で,書き込みを実行する。これにより,データのコヒーレンシを保つことができる。 The above-mentioned first core group LOCAL_CPU_0 manages the main memory M_MEM_0 and controls its memory access specifically to the following management and control. A memory access request (load request or store request) for data in the main memory M_MEM_0 is executed by a memory access controller (not shown) in the first core group LOCAL_CPU_0. In addition, when the first core group LOCAL_CPU_0 generates a load request to the main memory M_MEM_0 and the data in the main memory M_MEM_0 is taken out by the second core group HOME_CPU_1, the fact is stored in the main memory or in the cache control. Store in the internal directory. After that, when writing to the data in the main memory M_MEM_0 occurs, the directory is checked, the data in the cache memory of the second core group HOME_CPU_1 that has taken out the data is invalidated, and then writing is performed. Run. As a result, data coherency can be maintained.
図1では,第1のコアグループをメモリアクセス要求発行元のCPUとしてローカルCPUと称し,第2のコアグループをメモリアクセス要求発行元からアクセスされるCPUとしてホームCPUと称する。第1のコアグループと第2のコアグループが逆の関係になる場合もある。 In FIG. 1, the first core group is referred to as a local CPU as a memory access request issuer CPU, and the second core group is referred to as a home CPU as a CPU accessed from the memory access request issuer. In some cases, the first core group and the second core group have an opposite relationship.
図2は,本実施の形態における演算処理装置の構成を示す図である。図2には,第1,第2のコアグループ内のキャッシュL2_CACHE_0, L2_CACHE_1の構成が示され,さらに,各コアに生成されている仮想マシンVMが示されている。但し,コアグループ内バスBUS_1やIOデバイスは省略されている。 FIG. 2 is a diagram illustrating a configuration of the arithmetic processing device according to the present embodiment. FIG. 2 shows the configuration of the caches L2_CACHE_0 and L2_CACHE_1 in the first and second core groups, and further shows the virtual machine VM generated in each core. However, the bus BUS_1 and IO device in the core group are omitted.
第1のコアグループLOCAL_CPU_0内のキャッシュL2_CACHE_0は,コアなどが発行したメモリアクセス要求などの各種要求を格納する要求ポート群R_PORTを有する。要求ポート群R_PORTは,メモリのデータを読み出すロード要求を格納するムーブインポートMIPと,キャッシュメモリ内のデータをメインメモリM_MEM_0に書き出す要求を格納するムーブアウトポートMOPと,メインメモリ内のデータをキャッシュメモリに予め格納するプリフェッチ要求を格納するプリフェッチポートPFPと,第2のコアグループHOME_CPU1からの要求を格納するリモート要求ポートR_RPとを有する。 The cache L2_CACHE_0 in the first core group LOCAL_CPU_0 has a request port group R_PORT that stores various requests such as a memory access request issued by a core or the like. The request port group R_PORT consists of a move import MIP that stores a load request to read data from the memory, a move out port MOP that stores a request to write the data in the cache memory to the main memory M_MEM_0, and the data in the main memory as the cache memory Includes a prefetch port PFP for storing a prefetch request stored in advance, and a remote request port R_RP for storing a request from the second core group HOME_CPU1.
キャッシュL2_CAHCE_0は,要求ポート群R_PORT内の要求を所定の優先度アルゴリズムで選択してキャッシュ制御部CC0に入力または投入する要求制御部RC0と,入力または投入された要求を処理するキャッシュ制御部CC0と,キャッシュメモリを構成するデータメモリD_RAMとタグメモリTAGとを有する。キャッシュ制御部CC0は,パイプライン構成でありキャッシュパイプラインとも称される。さらに,キャッシュL2_CACHE_0は,キャッシュミスした場合の処理を行うムーブインバッファMIBと,メインメモリM_MEM_0の読み出し及び書き込みを含むメモリアクセスを制御するメモリアクセスコントローラMACと,第2のコアグループHOME_CPU1と接続されるコアグループ間バスB_00への要求などを一時的に格納するリモートバッファR_BUFを有する。 The cache L2_CAHCE_0 includes a request control unit RC0 that selects a request in the request port group R_PORT with a predetermined priority algorithm and inputs or inputs the request to the cache control unit CC0, and a cache control unit CC0 that processes the input or input request. , A data memory D_RAM and a tag memory TAG constituting a cache memory. The cache control unit CC0 has a pipeline configuration and is also referred to as a cache pipeline. Further, the cache L2_CACHE_0 is connected to the move-in buffer MIB that performs processing when a cache miss occurs, the memory access controller MAC that controls memory access including reading and writing of the main memory M_MEM_0, and the second core group HOME_CPU1. A remote buffer R_BUF is provided for temporarily storing requests to the inter-core group bus B_00.
図2の例では,4つのコアCORE_00〜CORE_03内にそれぞれ仮想マシンVMが生成されている。メモリアクセスの要求元として,コア,プロセス,仮想マシンの例があり,キャッシュ分割制御によりメモリアクセス要求元に対応してキャッシュメモリの分割を制御することを説明した。本実施の形態では,そのメモリアクセスの要求元の一例として,仮想マシンVMを例にして以下説明する。但し,キャッシュ分割制御によるキャッシュメモリの分割領域は,一般にセクタIDによって区別して管理される。その場合,メモリアクセス要求元にセクタIDが対応付けられる。 In the example of FIG. 2, virtual machines VM are generated in four cores CORE_00 to CORE_03, respectively. As examples of memory access request sources, there are cores, processes, and virtual machines, and it has been explained that cache memory division is controlled according to memory access request sources by cache division control. In the present embodiment, a virtual machine VM will be described as an example of the memory access request source. However, the divided areas of the cache memory by the cache division control are generally distinguished and managed by sector IDs. In this case, the sector ID is associated with the memory access request source.
図2によれば,コアCORE_00内には仮想マシンVM_00が,コアCORE_01内には仮想マシンVM_01が,コアCORE_02内には仮想マシンVM_02が,コアCORE_03内には仮想マシンVM_03がそれぞれ生成されている。そして,各仮想マシンVM_00〜VM_03に対して,最大キャッシュブロック数を示す最大ウェイ数MAX_Wが,一例として2,0,4,2と設定されていることが示されている。この最大ウェイ数MAX_Wの設定は,例えばソフトウェイアにより行われる。 According to FIG. 2, a virtual machine VM_00 is created in the core CORE_00, a virtual machine VM_01 is created in the core CORE_01, a virtual machine VM_02 is created in the core CORE_02, and a virtual machine VM_03 is created in the core CORE_03. . Then, it is shown that the maximum way number MAX_W indicating the maximum number of cache blocks is set to 2, 0, 4, 2 as an example for each of the virtual machines VM_00 to VM_03. The maximum way number MAX_W is set by, for example, a software way.
キャッシュL2_CACHE_0は,キャッシュ制御部CC0の一部として,キャッシュ分割制御におけるキャッシュブロックのリプレース制御を行うリプレース制御部RPC0を有する。そして,リプレース制御部RPCOは,各仮想マシンVMに対して設定された最大ウェイ数MAX_Wを有する最大ウェイ数テーブル(最大キャッシュブロック数)を有する。図2の例では,仮想マシンVM00,VM03に対しては,最大ウェイ数MAX_Wが「2」,「2」と設定され,仮想マシンVM01,VM02に対しては,最大ウェイ数MAX_Wが初期値の「0」のままになっている。初期値「0」の場合は,最大ウェイ数は無限大としてキャッシュ分割制御が行われるものとする。 The cache L2_CACHE_0 includes a replacement control unit RPC0 that performs cache block replacement control in cache partition control as part of the cache control unit CC0. The replacement control unit RPCO has a maximum way number table (maximum number of cache blocks) having the maximum number of ways MAX_W set for each virtual machine VM. In the example of FIG. 2, the maximum way number MAX_W is set to “2” and “2” for the virtual machines VM00 and VM03, and the maximum way number MAX_W is the initial value for the virtual machines VM01 and VM02. It remains “0”. When the initial value is “0”, it is assumed that cache division control is performed with the maximum number of ways set to infinity.
図2において,第2のコアグループHOME_CPU1内の構成は,第1のコアグループLOCAL_CPU_0内の構成と同等である。但し,異なる構成は,第2のコアグループHOME_CPU1内の各コアCORE_10〜CORE_13には,それぞれ仮想マシンVM_10〜VM_13が生成され,最大ウェイ数MAX_Wはそれぞれ「0」のままになっている。また,それに対応して,リプレース制御部RPC1内の最大ウェイ数テーブル内も各仮想マシンに設定された最大ウェイ数MAX_Wもそれぞれ「0」のままになっている。 In FIG. 2, the configuration in the second core group HOME_CPU1 is equivalent to the configuration in the first core group LOCAL_CPU_0. However, in a different configuration, virtual machines VM_10 to VM_13 are generated in the respective cores CORE_10 to CORE_13 in the second core group HOME_CPU1, and the maximum number of ways MAX_W remains “0”. Correspondingly, the maximum way number MAX_W set for each virtual machine in the maximum way number table in the replacement control unit RPC1 is also kept at “0”.
そして,コアグループ間バスBUS_0は,前述のとおり,リモートバッファR_BUFとリモート要求ポートR_RPとの間に設けられるとともに,ムーブインバッファMIB間にも設けられる。 As described above, the inter-core group bus BUS_0 is provided between the remote buffer R_BUF and the remote request port R_RP, and is also provided between the move-in buffer MIB.
図3は,本実施の形態におけるキャッシュL2_CACHEのより詳細な構成を示す図である。第1,第2のコアグループのキャッシュL2_CACHEは,前述のとおり同等の構成であるので,図3では,第1のコアグループLOCAL_CPU_0内のキャッシュL2_CACHE_0を示した。 FIG. 3 is a diagram showing a more detailed configuration of the cache L2_CACHE in the present embodiment. Since the caches L2_CACHE of the first and second core groups have the same configuration as described above, FIG. 3 shows the cache L2_CACHE_0 in the first core group LOCAL_CPU_0.
図3において,キャッシュメモリを構成するタグメモリTAG_RAMとデータメモリD_RAMは,セットアソシエイティブ方式の構成であり,共通のインデックスに対して複数のキャッシュブロックのタグ値とデータを登録できる複数ウェイ構成である。具体的には,例えば32ウェイで構成されている。そして,図3のデータメモリD_RAMに示されるように,キャッシュメモリが,4つの仮想マシンVM00〜VM03に対応して4つのセクタ00〜03に分割して割り当てられている。図示されていないが,タグメモリTAG_RAMもそれに対応して4つのセクタに分割されている。したがって,この例では,キャッシュメモリの4つのセクタ00〜03が,それぞれ4つの仮想マシンVM00〜VM03に割り当てられている。
In FIG. 3, the tag memory TAG_RAM and the data memory D_RAM constituting the cache memory have a set associative configuration, and a multiple way configuration in which tag values and data of a plurality of cache blocks can be registered with respect to a common index. . Specifically, it is configured with, for example, 32 ways. As shown in the data memory D_RAM in FIG. 3, the cache memory is divided and assigned to four
図3の例では,例えば,仮想マシンVM00に対しては2つのウェイ(ウェイ番号0,1)が割り当てられ,VM01には7つのウェイ(ウェイ番号2〜8)が,VM02には2つのウェイ(ウェイ番号9,10)が,そして,VM03には21のウェイ(ウェイ番号11〜31)が割り当てられている。
In the example of FIG. 3, for example, two ways (
一方,キャッシュ制御部CC0のキャッシュ分割制御を行うリプレース制御部RPC0は,仮想マシンVMのID00〜03に対応して設定された最大ウェイ数MAX_Wを登録する最大ウェイ数テーブルMW_TBLと,リプレースすべきウェイを選択するリプレースウェイ選択部RP_Wとを有する。リプレース制御部RPCOによるリプレース制御については,後述する。
On the other hand, the replacement control unit RPC0 that performs cache division control of the cache control unit CC0 includes a maximum way number table MW_TBL for registering the maximum number of ways MAX_W set corresponding to the
キャッシュL2_CACHE_0の他に,図3には,4つのコアCORE_00〜CORE_03と要求ポート群R_PORTとを接続するコアグループ内バスBUS_1が示されている。このように,4つのコアCORE_00〜CORE_03内の仮想マシンVMは,それぞれ,メモリアクセス要求やムーブアウト要求やプリフェッチ要求を,コアグループ内バスBUS_1を介して対応する要求ポートMIP,MOP,PFPに発行する。 In addition to the cache L2_CACHE_0, FIG. 3 shows an intra-core group bus BUS_1 that connects the four cores CORE_00 to CORE_03 and the request port group R_PORT. In this way, the virtual machines VM in the four cores CORE_00 to CORE_03 issue memory access requests, move-out requests, and prefetch requests to the corresponding request ports MIP, MOP, and PFP via the bus BUS_1 in the core group, respectively. To do.
次に,キャッシュ制御部によるキャッシュ分割制御について説明する。前提として,第1のコアグループLOCAL_CPU_0内のコアCOREに生成されている仮想マシンVMは,キャッシュ分割情報を付加したメモリアクセス要求を発行して,キャッシュ制御部CC0のリプレース制御部RPC0内の最大ウェイ数テーブルMW_TLBに最大ウェイ数を設定する。例えば,コアCORE_02に生成されている仮想マシンVM_02が,メモリアクセス要求としてメインメモリM_MEM_0のアドレスに対するロード要求を発行する。このロード要求には,メインメモリM_MEM_0内のロード先のアドレスと要求元の仮想マシンVMのIDが含まれるとともに,最大ウェイ数の情報も含まれる。 Next, cache division control by the cache control unit will be described. As a premise, the virtual machine VM generated in the core CORE in the first core group LOCAL_CPU_0 issues a memory access request with the cache partition information added, and the maximum way in the replacement control unit RPC0 of the cache control unit CC0. Set the maximum number of ways in the number table MW_TLB. For example, the virtual machine VM_02 generated in the core CORE_02 issues a load request for the address of the main memory M_MEM_0 as a memory access request. This load request includes the load destination address in the main memory M_MEM_0 and the ID of the requesting virtual machine VM, and also includes information on the maximum number of ways.
コアCORE_02が発行したロード要求は,コアグループ内バスBUS_1を介してムーブインポートMIPに格納され,要求制御部RCOがムーブインポートMIP内のロード要求のエントリを選択して,キャッシュ制御部CC0に入力する。キャッシュ制御部CC0は,このロード要求のエントリに応答して,キャッシュヒット判定や,キャッシュヒットの場合のコアCORE_02へのデータ応答や,キャッシュミスヒットの場合のメインメモリM_MEM_0へのリード要求などに加えて,ロード要求に付加されている仮想マシンのIDと最大ウェイ数とを含むキャッシュ分割情報に基づいて,リプレース制御部RPC0内の最大ウェイ数テーブルMW_TBLに,その仮想マシンのIDに対応して最大ウェイ数を設定する。 The load request issued by the core CORE_02 is stored in the move import MIP via the bus BUS_1 in the core group, and the request control unit RCO selects the load request entry in the move import MIP and inputs it to the cache control unit CC0. . In response to this load request entry, the cache control unit CC0 performs a cache hit determination, a data response to the core CORE_02 in the case of a cache hit, a read request to the main memory M_MEM_0 in the case of a cache miss hit, etc. Based on the cache partition information including the virtual machine ID and the maximum number of ways added to the load request, the maximum number of ways table MW_TBL in the replacement control unit RPC0 corresponds to the maximum of the virtual machine ID. Set the number of ways.
事前に仮想マシンのIDに対応して最大ウェイ数が設定されている状態で,次に,同じ仮想マシンVM_02が例えばロード要求を発行する。そのロード要求に応答して,キャッシュ制御部CC0がキャッシュミス判定をした場合,キャッシュミス制御部CC0は,ムーブインバッファMIBにそのエントリを登録し,メモリアクセスコントローラMACを介してメインメモリM_MEM_0に読み出し要求を行い,データ応答を受信する。それに応答して,ムーブインバッファMIBに登録した前述のエントリが読み出したデータと共に,再度キャッシュ制御部CC0に入力される。 With the maximum number of ways set in advance corresponding to the virtual machine ID, the same virtual machine VM_02 issues a load request, for example. When the cache control unit CC0 makes a cache miss determination in response to the load request, the cache miss control unit CC0 registers the entry in the move-in buffer MIB and reads it into the main memory M_MEM_0 via the memory access controller MAC. Make a request and receive a data response. In response to this, the aforementioned entry registered in the move-in buffer MIB is input again to the cache control unit CC0 together with the read data.
この場合,キャッシュ制御部CC0は,メインメモリから読み出したデータとそのタグ情報を,データメモリD_RAMとキャッシュメモリを構成するタグメモリTAG_RAMに登録する。このキャッシュメモリへのデータ登録の際に,リプレース制御部RP0がどのウェイにデータとタグ情報を登録するかのリプレースウェイの選択を行う。 In this case, the cache control unit CC0 registers the data read from the main memory and its tag information in the data memory D_RAM and the tag memory TAG_RAM constituting the cache memory. At the time of data registration in the cache memory, the replacement control unit RP0 selects a replacement way to which data and tag information are registered.
図4は,データをキャッシュ登録する場合のリプレース制御部によるリプレース処理のフローチャート図である。キャッシュ制御部CC0は,前述のようにムーブインバッファMIBに登録したキャッシュ登録のエントリに応答して(S30),リプレース制御部RPC0にキャッシュ登録すべきウェイの選択処理を要求する。リプレース制御部RPC0内のリプレースウェイ選択部RP_Wは,仮想マシンVM_02に割り当てられている現在のウェイ数が最大ウェイ数テーブルMW_TBLに設定されている最大ウェイ数MAX_WAYと等しいか否か,つまり最大ウェイ数MAX_WAYに達しているか否かをチェックする(S32)。現在のウェイ数が最大ウェイ数MAX_WAYと等しい場合は(S34のYES),仮想マシンVM_02に割り当てられているウェイのうち,例えばLRUアルゴリズムにより,最も最近使われなかった,つまり使われてから最も長い時間が経過したデータとタグを格納しているウェイを選択する(S36)。一方,現在のウェイ数が最大ウェイ数MAX_WAYと等しくない場合は(S34のNO),仮想マシンVM_02以外の仮想マシンに割り当てられているウェイのうち,例えばLRUアルゴリズムにより,最も最近使われなかった,つまり使われてから最も長い時間が経過したデータとタグを格納しているウェイを選択する(S38)。 FIG. 4 is a flowchart of the replacement process performed by the replacement control unit when registering data in the cache. In response to the cache registration entry registered in the move-in buffer MIB as described above (S30), the cache control unit CC0 requests the replacement control unit RPC0 to select a way to be registered in the cache. The replacement way selection unit RP_W in the replacement control unit RPC0 determines whether the current number of ways allocated to the virtual machine VM_02 is equal to the maximum number of ways MAX_WAY set in the maximum number of ways table MW_TBL, that is, the maximum number of ways. It is checked whether or not MAX_WAY has been reached (S32). If the current number of ways is equal to the maximum number of ways MAX_WAY (YES in S34), among the ways assigned to the virtual machine VM_02, for example, the least recently used, that is, the longest since it was used The way storing the data and the tag whose time has passed is selected (S36). On the other hand, if the current number of ways is not equal to the maximum number of ways MAX_WAY (NO in S34), among the ways assigned to virtual machines other than the virtual machine VM_02, the least recently used, for example, by the LRU algorithm, In other words, the way storing the data and tag that have been used for the longest time has been selected (S38).
そして,リプレース制御部RP0は,選択したウェイをキャッシュ制御部CC0に回答する。そして,キャッシュ制御部CC0は,選択されたウェイのデータをメインメモリM_MEM_0に書き戻すとともに,選択されたウェイにキャッシュ登録対象のデータとタグ情報を登録する。 Then, the replacement control unit RP0 returns the selected way to the cache control unit CC0. Then, the cache control unit CC0 writes the data of the selected way back to the main memory M_MEM_0, and registers the cache registration target data and tag information in the selected way.
第2のコアグループHOME_CPU_1内のコアCOREに生成されている仮想マシンVMが,キャッシュ分割情報を付加したメモリアクセス要求を発行して,キャッシュ制御部CC1のリプレース制御部RPC1内の最大ウェイ数テーブルMW_TLBに最大ウェイ数を設定する処理も,上記と同様である。さらに,その設定した最大ウェイ数に基づいて,キャッシュ登録の際にリプレース制御部RPC1が登録すべきウェイを選択する処理も,上記と同様である。 The virtual machine VM generated in the core CORE in the second core group HOME_CPU_1 issues a memory access request with the cache partition information added thereto, and the maximum way number table MW_TLB in the replacement control unit RPC1 of the cache control unit CC1 The processing for setting the maximum number of ways in the same manner as described above. Further, the process of selecting a way to be registered by the replacement control unit RPC1 at the time of cache registration based on the set maximum number of ways is the same as described above.
以上のように,第1のコアグループLOCAL_CPU_0内のコアCOREに生成されている仮想マシンVMは,メインメモリM_MEM_0へのメモリアクセス要求にキャッシュ分割情報(仮想マシンIDと最大ウェイ数)を付加して発行することで,第1のコアグループLOCAL_CPU_0内のキャッシュL2_CACHE_0のリプレース制御部RPC0に最大ウェイ数を設定することができる。それにより,設定した最大ウェイ数に基づいて,キャッシュL2_CACHE_0内のキャッシュ制御部CC0のリプレース制御部RPC0がキャッシュ登録すべきウェイを選択する。これにより,第1のコアグループLOCAL_CPU_0内のキャッシュ制御部CC0が,第1のコアグループLOCAL_CPU_0内の仮想マシンVMにキャッシュメモリの分割領域を割り当てるキャッシュ分割制御を行う。 As described above, the virtual machine VM generated in the core CORE in the first core group LOCAL_CPU_0 adds cache partition information (virtual machine ID and maximum number of ways) to the memory access request to the main memory M_MEM_0. By issuing, the maximum number of ways can be set in the replacement control unit RPC0 of the cache L2_CACHE_0 in the first core group LOCAL_CPU_0. Thereby, based on the set maximum number of ways, the replacement control unit RPC0 of the cache control unit CC0 in the cache L2_CACHE_0 selects a way to be registered in the cache. As a result, the cache control unit CC0 in the first core group LOCAL_CPU_0 performs cache partition control for allocating a partition area of the cache memory to the virtual machine VM in the first core group LOCAL_CPU_0.
同様に,第2のコアグループHOME_CPU_1内のコアCOREに生成されている仮想マシンVMは,メインメモリM_MEM_1へのメモリアクセス要求にキャッシュ分割情報(仮想マシンIDと最大ウェイ数)を付加して発行することで,第2のコアグループHOME_CPU_1内のキャッシュL2_CACHE_1内のキャッシュ制御部CC1のリプレース制御部RPC1に最大ウェイ数を設定することができる。それにより,設定した最大ウェイ数に基づいて,キャッシュL2_CACHE_1のリプレース制御部RPC1がキャッシュ登録すべきウェイを選択する。これにより,第2のコアグループHOME_CPU_1内のキャッシュ制御部CC0が,第2のコアグループHOME_CPU_1内の仮想マシンVMにキャッシュメモリの分割領域を割り当てるキャッシュ分割制御を行う。 Similarly, the virtual machine VM generated in the core CORE in the second core group HOME_CPU_1 issues a cache access information (virtual machine ID and maximum number of ways) to the memory access request to the main memory M_MEM_1. Thus, the maximum number of ways can be set in the replacement control unit RPC1 of the cache control unit CC1 in the cache L2_CACHE_1 in the second core group HOME_CPU_1. Thereby, based on the set maximum number of ways, the replacement control unit RPC1 of the cache L2_CACHE_1 selects a way to be registered in the cache. As a result, the cache control unit CC0 in the second core group HOME_CPU_1 performs cache partition control for allocating a partition area of the cache memory to the virtual machine VM in the second core group HOME_CPU_1.
上記のように,第1,第2のコアグループ内の仮想マシンは,キャッシュ分割情報を付加したメモリアクセス要求を発行することで,同じコアグループ内のキャッシュのリプレース制御部RPC0,RPC1に最大ウェイ数を設定し,その後,キャッシュ制御部はキャッシュ登録の際にキャッシュ分割制御を行う。上記と同様に,メモリアクセス要求であるストア要求に最大ウェイ数を含むキャッシュ分割情報を付加して最大ウェイ数を設定することもできる。 As described above, the virtual machines in the first and second core groups issue a memory access request to which cache partition information is added, so that the maximum way is sent to the cache replacement controllers RPC0 and RPC1 in the same core group. After that, the cache control unit performs cache division control when registering the cache. Similarly to the above, it is also possible to set the maximum number of ways by adding cache division information including the maximum number of ways to a store request that is a memory access request.
一方,第1のコアグループLOCAL_CPU_0であるローカルCPU内の仮想マシンが,第2のコアグループHOME_CPU_1であるホームCPUが管理するメインメモリM_MEM_1にメモリアクセス要求を行うことがある。例えば,メモリアクセス要求がロード要求の場合で説明すると,第1のコアグループLOCAL_CPU_0内の仮想マシンがメインメモリM_MEM_1へのロード要求を発行すると,ロード要求を入力した第1のコアグループ内のキャッシュ制御部CC0が,キャッシュミス判定して,そのロード要求をリモートバッファR_BUFとコアグループ間バスBUS_0を介して,第2のコアグループHOME_CPU_1のリモート要求ポートR_RPに格納する。このロード要求に応答して,第2のコアグループHOME_CPU_1のキャッシュ制御部CC1は,キャッシュミス判定した場合に,メモリアクセスコントローラMACによりメインメモリM_MEM_1へのリード要求を実行させてデータを取得し,ムーブインバッファMIBとコアグループ間バスBUS_0を介して,第1のコアグループLOCAL_CPU_0内のムーブインバッファMIBにデータ応答する。このデータ応答されたデータは,ムーブインバッファMIBからキャッシュ制御部CC0に再投入され,キャッシュ制御部CC0がデータとタグ情報をキャッシュ登録する。 On the other hand, a virtual machine in the local CPU that is the first core group LOCAL_CPU_0 may make a memory access request to the main memory M_MEM_1 managed by the home CPU that is the second core group HOME_CPU_1. For example, when the memory access request is a load request, when a virtual machine in the first core group LOCAL_CPU_0 issues a load request to the main memory M_MEM_1, the cache control in the first core group to which the load request is input The section CC0 determines a cache miss and stores the load request in the remote request port R_RP of the second core group HOME_CPU_1 via the remote buffer R_BUF and the inter-core bus BUS_0. In response to this load request, when the cache control unit CC1 of the second core group HOME_CPU_1 determines a cache miss, the memory access controller MAC executes a read request to the main memory M_MEM_1 to acquire data and move it. Data response is made to the move-in buffer MIB in the first core group LOCAL_CPU_0 via the in-buffer MIB and the inter-core group bus BUS_0. The data returned as a response is reintroduced from the move-in buffer MIB to the cache control unit CC0, and the cache control unit CC0 registers the data and tag information in cache.
上記のロード要求において,第1のコアグループ内の仮想マシンが第2のコアグループが管理するメインメモリにロード要求する場合,第2のコアグループ内のキャッシュメモリにロード要求のデータを登録することはない。したがって,第1のコアグループ内の仮想マシンが,第2のコアグループ内のキャッシュ制御部CC1のリプレース制御部RPC1に最大ウェイ数を設定する必要性はない。 When the virtual machine in the first core group makes a load request to the main memory managed by the second core group in the above load request, the load request data is registered in the cache memory in the second core group. There is no. Therefore, there is no need for the virtual machines in the first core group to set the maximum number of ways in the replacement control unit RPC1 of the cache control unit CC1 in the second core group.
一方,メモリアクセス要求がストア命令の場合は,第1のコアグループ内のキャッシュメモリにストアデータを書き込み,その後キャッシュ制御によりそのデータのキャッシュブロックが追い出されるときに,第2のコアグループが管理するメインメモリにデータの書き戻しが行われる。この場合も,第1のコアグループ内の仮想マシンが,第2のコアグループ内のキャッシュ制御部CC1のリプレース制御部RPC1に最大ウェイ数を設定する必要性はない。 On the other hand, when the memory access request is a store instruction, the second core group manages when the cache block of the data is evicted by writing the store data to the cache memory in the first core group and then cache control. Data is written back to the main memory. In this case as well, there is no need for the virtual machines in the first core group to set the maximum number of ways in the replacement control unit RPC1 of the cache control unit CC1 in the second core group.
しかしながら,近年,仮想マシンからの要求ではなく,IOデバイスIO_DEVICEからのIOストア要求に応答して,メモリアクセスコントローラMACが外部のストレージ装置HDDなどから転送されたデータを,DMA(Direct Memory Access)処理によりメインメモリに書き込む際に,キャッシュメモリにもデータを登録することが行われるようになった。いわゆる,キャッシュインジェクション処理である。キャッシュインジェクションのメリットは,IOストア要求に後発行されるロード要求に応答して,キャッシュ制御部がキャッシュメモリ内のデータをデータ応答することができ,ロード要求のレイテンシを短くすることができることにある。 However, in recent years, in response to an IO store request from an IO device IO_DEVICE instead of a request from a virtual machine, the memory access controller MAC performs DMA (Direct Memory Access) processing on data transferred from an external storage device HDD or the like. As a result, data can be registered in the cache memory when writing to the main memory. This is so-called cache injection processing. The advantage of cache injection is that the cache control unit can respond to data in the cache memory in response to a load request issued after an IO store request, and the load request latency can be shortened. .
そして,第1のコアグループLOCAL_CPU_0内の仮想マシンが要求するDMA要求に応答して,第2のコアグループHOME_CPU_1のIOデバイスIO_DEVICEがIOストア要求を発行し,それに応答して,キャッシュ制御部CC1がメモリアクセスコントローラMACにIOストア要求を処理させる場合にも,上記のキャッシュインジェクション処理が行われる。つまり,キャッシュインジェクション処理により,第2のコアグループHOME_CPU_1内のキャッシュ制御部CC1がそのキャッシュメモリ内に,第1のコアグループLOCAL_CPU_0内の仮想マシンが起点となったIOストア要求のデータを登録する。 In response to the DMA request requested by the virtual machine in the first core group LOCAL_CPU_0, the IO device IO_DEVICE of the second core group HOME_CPU_1 issues an IO store request, and in response, the cache control unit CC1 The cache injection process is also performed when the memory access controller MAC processes an IO store request. That is, by cache injection processing, the cache control unit CC1 in the second core group HOME_CPU_1 registers the data of the IO store request originating from the virtual machine in the first core group LOCAL_CPU_0 in the cache memory.
この場合,第1コアグループ内の仮想マシンが要求したIOストア要求のデータが第2のコアグループ内のキャッシュメモリに登録される。そのため,そのキャッシュ制御部CC1は,第1のコアグループ内の仮想マシンに対する最大ウェイ数を予め設定しておく必要がある。その理由は,最大ウェイ数の初期値は無限大であるため,最大ウェイ数が設定されてない状態で,キャッシュ制御部CC1がキャッシュインジェクションにより外部からダウンロードしたデータをそのキャッシュメモリに登録すると,キャッシュメモリ内の多くのキャッシュブロックにデータが登録され,第2コアグループ内の仮想マシンのデータが追い出されるからである。その結果,本来のキャッシュ分割制御ができなくなる。 In this case, the IO store request data requested by the virtual machine in the first core group is registered in the cache memory in the second core group. Therefore, the cache control unit CC1 needs to set the maximum number of ways for the virtual machines in the first core group in advance. The reason is that the initial value of the maximum number of ways is infinite, so if the maximum number of ways is not set and the cache controller CC1 registers the data downloaded from the outside by cache injection in the cache memory, the cache This is because data is registered in many cache blocks in the memory, and the virtual machine data in the second core group is evicted. As a result, the original cache division control cannot be performed.
そこで,本実施の形態では,以下に説明するとおり,第1のコアグループ内の仮想マシンが,第2のコアグループ内のキャッシュ制御部CC1のリプレース制御部RPC1に最大ウェイ数を設定できるように改良されている。本実施の形態によれば,第1のコアグループLOCAL_CPU_0内の仮想マシンVMが,第2のコアグループHOME_CPU_1が管理するメインメモリM_MEM_1へのメモリアクセス要求をキャッシュ分割情報を付加して発行すると,そのメモリアクセス要求に応答して,第2のコアグループHOME_CPU_1内のキャッシュ制御部CC1がリプレース制御部RPC1内の最大ウェイ数テーブルに最大ウェイ数を設定する。メモリアクセス要求に付加するキャッシュ分割情報は,前述のとおり,最大ウェイ数とキャッシュメモリの分割領域のセクタ番号とを有する。このセクタ番号は,前述の例では,キャッシュメモリの割当を要求している仮想マシンVMのID番号である。但し,仮想マシンVMのID番号以外に,例えばキャッシュメモリの割当を要求するプロセスIDや,コアIDでもよい。キャッシュ分割制御がどのように行われるかに依存する。 Therefore, in the present embodiment, as described below, the virtual machines in the first core group can set the maximum number of ways in the replacement control unit RPC1 of the cache control unit CC1 in the second core group. It has been improved. According to this embodiment, when the virtual machine VM in the first core group LOCAL_CPU_0 issues a memory access request to the main memory M_MEM_1 managed by the second core group HOME_CPU_1 with the cache division information added, In response to the memory access request, the cache control unit CC1 in the second core group HOME_CPU_1 sets the maximum number of ways in the maximum number of ways table in the replacement control unit RPC1. As described above, the cache division information added to the memory access request has the maximum number of ways and the sector number of the divided area of the cache memory. In the above-described example, this sector number is the ID number of the virtual machine VM that requests cache memory allocation. However, other than the ID number of the virtual machine VM, for example, a process ID requesting allocation of cache memory or a core ID may be used. It depends on how cache partitioning control is performed.
ローカルCPUである第1のコアグループ内の仮想マシンが,リモートCPUである第2のコアグループが管理するメインメモリM_MEM_1へのメモリアクセス要求にキャッシュ分割情報を付加して発行することで,最大ウェイ数を設定可能にする。このようにメモリアクセス要求により他のコアグループ内の最大ウェイ数を設定可能にすることで,他のコアグループ内の最大ウェイ数設定のための特別の要求を定義する必要がない。また,通常のメモリアクセス要求以外に最大ウェイ数設定のための要求を利用する場合は,コアグループ間バスBUS_0のトラフィック量が増大し,通常のメモリアクセス要求のレイテンシが悪化する。したがって,本実施の形態によれば,コアグループ間バスBUS_0のトラフィック量を増やすことなく,異なるコアグループ内のキャッシュ制御部に最大ウェイ数を設定することができる。 The virtual machine in the first core group, which is the local CPU, issues a cache access information to the main memory M_MEM_1 managed by the second core group, which is the remote CPU, with cache partition information added, and issues the maximum way Make the number configurable. Thus, by making it possible to set the maximum number of ways in another core group by a memory access request, there is no need to define a special request for setting the maximum number of ways in another core group. In addition, when using a request for setting the maximum number of ways other than the normal memory access request, the traffic volume of the inter-core bus BUS_0 increases, and the latency of the normal memory access request deteriorates. Therefore, according to the present embodiment, it is possible to set the maximum number of ways in the cache control units in different core groups without increasing the traffic volume of the inter-core group bus BUS_0.
図5は,本実施の形態における最大ウェイ数を設定可能なメモリアクセス要求のフォーマットの一例を示す図である。最大ウェイ数を設定可能なメモリアクセス要求は,メインメモリのデータを読み出すロード要求と,メインメモリにデータを書き込むストア要求とが含まれる。この最大ウェイ数設定可能なメモリアクセス要求は,プリフェッチ要求やムーブアウト要求が含まれても良い。 FIG. 5 is a diagram showing an example of a format of a memory access request that can set the maximum number of ways in the present embodiment. Memory access requests for which the maximum number of ways can be set include a load request for reading data from the main memory and a store request for writing data to the main memory. The memory access request for which the maximum number of ways can be set may include a prefetch request and a moveout request.
図5のメモリアクセス要求は,64ビットのヘッダHEADERと,16組のデータブロックDATA#0-15とを有する。ロード要求やプリフェッチ要求の場合は,ヘッダHEADERだけあればよく,データブロックDATA#0-16が含まれていなくても良い。図5に示した64ビットのヘッダHEADERの例は,ビット0−6は未使用であり,ビット7−46にアドレスADDRESSを,ビット47−53にオペランドコードOP_CODEを,ビット54−57に仮想マシンのID(VM_ID)を,ビット58−63に最大ウェイ数MAX_WAYをそれぞれ含む。 The memory access request of FIG. 5 has a 64-bit header HEADER and 16 sets of data blocks DATA # 0-15. In the case of a load request or prefetch request, only the header HEADER is required, and the data block DATA # 0-16 need not be included. In the example of the 64-bit header HEADER shown in FIG. 5, bits 0-6 are unused, the address ADDRESS in bits 7-46, the operand code OP_CODE in bits 47-53, and the virtual machine in bits 54-57. ID (VM_ID), and bits 58-63 include the maximum number of ways MAX_WAY, respectively.
未使用の7ビットは,キャッシュブロックのサイズ128ビット=27に対応する。また,アドレスADDRESS内のビット7−15の情報がキャッシュメモリの検索用インデックスに利用される。また,アドレスADDRESS内のビット16の情報がメモリインタリーブビットとして利用される。つまり,このメモリインタリーブビットが「0」のデータは,第1のコアグループLOCAL_CPU_0が管理するメインメモリM_MEM_0に記憶され,メモリインタリーブビットが「1」のデータは,第2のコアグループHOME_CPU_1が管理するメインメモリM_MEM_1に記憶される。したがって,アドレスADDRESS内のビット7−15のビット数9はOS(Operation System)が管理するページ領域のサイズ29に対応する。さらに,アドレスADDRESS内のビット17−46の上位アドレスが,キャッシュメモリのタグメモリTAGに登録されるタグ情報に利用される。
The unused 7 bits correspond to the cache block size 128 bits = 2 7 . Also, the information of bits 7-15 in the address ADDRESS is used as a search index for the cache memory. Further, the information of
オペレーションコードOP_CODEにより,ロード要求とストア要求が区別される。仮想マシンのID情報は全ての要求に含まれるが,最大ウェイ数MAX_WAYは,最大ウェイ数を設定したい場合に含まれるようにすればよく,必ずしも全ての要求に含まれる必要はない。 A load request and a store request are distinguished by the operation code OP_CODE. The virtual machine ID information is included in all requests, but the maximum number of ways MAX_WAY need only be included when setting the maximum number of ways, and is not necessarily included in all requests.
図6は,本実施の形態における最大ウェイ数付きメモリアクセス要求の処理を示すシーケンス図である。一例として,ローカルCPU(メモリアクセス要求発行元CPU)である第1のコアグループLOCAL_CPU_0内のコアCORE_2の仮想マシンVM_02が,第2のコアグループHOME_CPU_1がホームCPUとして管理するメインメモリM_MEM_1へのロード要求を発行し,ムーブインポートMIPに発行する(S1)。このロード要求には,前述のとおり,仮想マシンIDと最大ウェイ数MAX_WAYが付加されている。 FIG. 6 is a sequence diagram showing processing of a memory access request with the maximum number of ways in the present embodiment. As an example, the virtual machine VM_02 of the core CORE_2 in the first core group LOCAL_CPU_0, which is a local CPU (memory access request issuing CPU), is loaded to the main memory M_MEM_1 managed as the home CPU by the second core group HOME_CPU_1. Is issued to the Move Import MIP (S1). As described above, the virtual machine ID and the maximum number of ways MAX_WAY are added to this load request.
そして,要求制御部RO0は,そのロード要求をキャッシュ制御部CC0に入力する。キャッシュ制御部CC0は,そのロード要求に応答して,キャッシュタグを検索しキャッシュミス判定し(S3),ムーブインバッファMIBにロード要求のエントリを登録し,リモートバッファR_BUFにロード要求を格納する(S5)。また,キャッシュ制御部CC0は,メモリインタリーブビットが「1」であるため,リプレース制御部RPC0内の最大ウェイ数テーブルMW_TABLEにロード要求の最大ウェイ数を設定しない(S4)。但し,キャッシュ制御部CC0は,メモリインタリーブビットにかかわらず最大ウェイ数を設定するようにしてもよい。 Then, the request control unit RO0 inputs the load request to the cache control unit CC0. In response to the load request, the cache control unit CC0 searches the cache tag to determine a cache miss (S3), registers the load request entry in the move-in buffer MIB, and stores the load request in the remote buffer R_BUF ( S5). Further, since the memory interleave bit is “1”, the cache control unit CC0 does not set the maximum number of ways of the load request in the maximum way number table MW_TABLE in the replacement control unit RPC0 (S4). However, the cache control unit CC0 may set the maximum number of ways regardless of the memory interleave bit.
リモートバッファR_BUFに格納された最大ウェイ数付きロード要求は,コアグループ間バスBUS_0を経由するバストランザクションとして,第2のコアグループHOME_CPU_1内のリモート要求ポートR_RPに伝播する(S11)。 The load request with the maximum number of ways stored in the remote buffer R_BUF is propagated to the remote request port R_RP in the second core group HOME_CPU_1 as a bus transaction via the inter-core group bus BUS_0 (S11).
第2コアグループ内の要求制御部RC1がリモート要求ポートR_RP内のロード要求をキャッシュ制御部CC1に出力する(S12)。それに応答して,キャッシュ制御部CC1は,ロード要求のメモリインタリーブビットが「1」であるため,リプレース制御部RPC1内の最大ウェイ数テーブルMW_TABLEにロード要求の最大ウェイ数を設定する(S14)。また,キャッシュ制御部CC1は,ロード要求に応答して,キャッシュメモリのタグを検索しキャッシュミス判定し(S13),ムーブインバッファMIBにエントリを登録し,メモリアクセスコントローラMACにメインメモリM_MEM_1へのリード処理を行わせ,ロード要求のデータを読み出す(S16)。 The request control unit RC1 in the second core group outputs the load request in the remote request port R_RP to the cache control unit CC1 (S12). In response to this, since the memory interleave bit of the load request is “1”, the cache control unit CC1 sets the maximum number of ways of the load request in the maximum way number table MW_TABLE in the replacement control unit RPC1 (S14). In response to the load request, the cache control unit CC1 searches the cache memory tag to determine a cache miss (S13), registers an entry in the move-in buffer MIB, and registers the main memory M_MEM_1 in the memory access controller MAC. Read processing is performed and load request data is read (S16).
メモリアクセスコントローラMACは,読み出したデータを,ムーブインバッファMIBに応答し,ムーブインバッファMIBは,その読み出しデータを登録したエントリと共に,コアグループ間バスBUS_0を経由して,第1のコアグループHOME_CPU_1内のムーブインバッファMIBのエントリにデータ応答する(S17)。このとき,第1のコアグループの仮想マシンVM_02からのロード要求であるため,前述のように,第2のコアグループHOME_CPU_1内のキャッシュ制御部CC1は,読み出しデータをキャッシュ登録することはせず,したがって,設定した最大ウェイ数に基づくキャッシュ分割制御を行うこともない。 The memory access controller MAC responds the read data to the move-in buffer MIB, and the move-in buffer MIB together with the entry in which the read data is registered passes through the inter-core bus BUS_0 to the first core group HOME_CPU_1. A data response is made to the entry of the move-in buffer MIB in (S17). At this time, since it is a load request from the virtual machine VM_02 of the first core group, as described above, the cache control unit CC1 in the second core group HOME_CPU_1 does not perform cache registration of read data. Therefore, cache division control based on the set maximum number of ways is not performed.
第1のコアグループLOCAL_CPU_1内のムーブインバッファMIBは,データ応答に応答して,登録したエントリをキャッシュ制御部CC0に入力し(S22),キャッシュ制御部CC0はキャッシュメモリのタグメモリTAG_RAMにタグ情報を登録し,データメモリD_RAMにリードデータを登録する(S23,S25)。そして,キャッシュ制御部CC0はリードデータが要求元の仮想マシンVM_02にデータ応答する(S26)。 In response to the data response, the move-in buffer MIB in the first core group LOCAL_CPU_1 inputs the registered entry to the cache control unit CC0 (S22), and the cache control unit CC0 stores the tag information in the tag memory TAG_RAM of the cache memory. And the read data is registered in the data memory D_RAM (S23, S25). Then, the cache control unit CC0 returns a data response to the request source virtual machine VM_02 (S26).
上記の通り,第1のコアグループLOCAL_CPU_0内の仮想マシンVM_02がメインメモリM_MEM_1に対するロード要求にキャッシュ分割情報を付加して発行することで,第2のコアグループHOME_CPU_1内のキャッシュ制御部CC1のリプレース制御部RPC1に仮想マシンVM_02の最大ウェイ数を設定することができる。このロード要求に応答して,第2のコアグループ内のキャッシュ制御部CC1は,キャッシュメモリにキャッシュ登録を行わず,さらに,設定した最大ウェイ数に基づくキャッシュ分割制御によるキャッシュブロックのリプレース制御も行わない。 As described above, the virtual machine VM_02 in the first core group LOCAL_CPU_0 issues a load request for the main memory M_MEM_1 with cache division information added thereto, thereby issuing a replacement control of the cache control unit CC1 in the second core group HOME_CPU_1. The maximum number of ways of the virtual machine VM_02 can be set in the unit RPC1. In response to this load request, the cache control unit CC1 in the second core group does not register the cache in the cache memory, and also performs the cache block replacement control by the cache division control based on the set maximum number of ways. Absent.
上記の例では,他のコアグループが管理するメインメモリ宛のロード要求に最大ウェイ数を付加して発行することで,他のコアグループに最大ウェイ数の設定を行っている。しかし,ロード要求に限定されず,他のコアグループが管理するメインメモリ宛のストア要求に最大ウェイ数を付加して発行することで,他のコアグループに最大ウェイ数の設定を行うようにしてもよい。 In the above example, the maximum number of ways is set in another core group by issuing a load request addressed to the main memory managed by another core group with the maximum number of ways added. However, it is not limited to load requests, and the maximum number of ways can be set for other core groups by issuing the maximum number of ways to store requests addressed to main memory managed by other core groups. Also good.
図1,2の演算処理装置または演算処理装置システムでは,コアCOREではないIOでバイスが,コアCOREとは非同期に,そのコアCOREの仮想マシンVMが近い将来使用すると予想されるデータを外部からダウンロードしメインメモリにストアすると共にキャッシュメモリに登録するキャッシュ登録付きIOストア要求を発行する。キャッシュ登録指示付きIOストア要求は,メインメモリにストアせずにキャッシュメモリにだけ入力データを登録する要求でもよい。 In the arithmetic processing unit or the arithmetic processing unit system shown in FIGS. 1 and 2, a device with an IO other than the core CORE is asynchronous with the core CORE, and the virtual machine VM of the core CORE is expected to use data from the outside in the near future. Download and store in main memory and issue IO store request with cache registration to register in cache memory. The IO store request with a cache registration instruction may be a request for registering input data only in the cache memory without storing in the main memory.
図7は,キャッシュ登録指示付きIOストア要求のフォーマットを示す図である。図5のロード,ストア要求のヘッダHEADERと同様に,IOストア要求のフォーマットは,ビット0−6は不使用,ビット7−26にアドレスADDRESSが,ビット47−53にオペレーションコードが,ビット54−57にIOストア要求元の仮想マシンVMのID(VM_ID)が割り当てられる。ビット58−63は未使用である。 FIG. 7 is a diagram showing a format of an IO store request with a cache registration instruction. Similar to the header HEADER of the load / store request in FIG. 5, the format of the IO store request is that bits 0-6 are not used, the address ADDRESS is in bits 7-26, the operation code is in bits 47-53, and the bit 54- 57 is assigned the ID (VM_ID) of the virtual machine VM of the IO store request source. Bits 58-63 are unused.
図6で説明した第1のコアグループ内の仮想マシンVM_02がロード要求により第2のコアグループ内のキャッシュ制御部CC1のリプレース制御部RPC1に最大ウェイ数を設定した後に,同じ仮想マシンVM_02によるDMA要求に応答して,IOデバイスが仮想マシンVM_02と非同期でキャッシュ登録指示付きIOストア要求を発行する場合の処理を説明する。このIOストア要求には,図7のとおり,IOストア先のメインメモリのアドレスが含まれる。以下の例は,第2のコアグループHOME_CPU_1が管理するメインメモリM_MEM_1が,IOストア先のメインメモリとして指定される。 The virtual machine VM_02 in the first core group described in FIG. 6 sets the maximum number of ways in the replacement control unit RPC1 of the cache control unit CC1 in the second core group by a load request, and then performs DMA by the same virtual machine VM_02. The process when the IO device issues an IO store request with a cache registration instruction asynchronously with the virtual machine VM_02 in response to the request will be described. This IO store request includes the address of the main memory of the IO store destination as shown in FIG. In the following example, the main memory M_MEM_1 managed by the second core group HOME_CPU_1 is designated as the main memory of the IO store destination.
第1のコアグループ内の仮想マシンVM_02が発行するDMA要求に応答して,第2コアグループ内のIOデバイスが,キャッシュ登録指示付きIOストア要求を発行する。このIOストア要求は,第2のコアグループ内のムーブインポートMIBからキャッシュ制御部CC1に入力され,それに応答して,キャッシュ制御部CC1はメモリアクセスコントローラMACにIOデバイスが入力するデータをメインメモリM_MEM_1に書き込む処理を行わせる。そして,メモリアクセスコントローラMACは,それと共に,キャッシュ制御部CC1にそのデータをキャッシュ登録させ,実質的に入力データがキャッシュメモリにプリフェッチ済みにされた状態にする。メモリアクセスコントローラMACは,メインメモリM_MEM_1にデータを書き込むことなく,キャッシュ制御部CC1にキャッシュ登録させるようにしてもよい。 In response to the DMA request issued by the virtual machine VM_02 in the first core group, the IO device in the second core group issues an IO store request with a cache registration instruction. This IO store request is input from the move import MIB in the second core group to the cache control unit CC1, and in response to this, the cache control unit CC1 sends the data input by the IO device to the memory access controller MAC in the main memory M_MEM_1. Process to write to. At the same time, the memory access controller MAC causes the cache control unit CC1 to register the data in the cache so that the input data is substantially prefetched into the cache memory. The memory access controller MAC may cause the cache control unit CC1 to perform cache registration without writing data to the main memory M_MEM_1.
このキャッシュ制御部CC1によるIOデバイスが入力するデータのキャッシュ登録において,キャッシュ制御部CC1は,先に設定済みの仮想マシンVM_02の最大ウェイ数に基づいて,キャッシュメモリのキャッシュブロック,つまりウェイのリプレース制御を行う。リプレース制御は,図4で説明したとおりである。キャッシュ制御部CC1のリプレース制御部RPC1には仮想マシンVM_02の最大ウェイ数が設定済みであるので,キャッシュ登録指示付きIOストア要求によるキャッシュ登録処理でのリプレース制御は適切に行われ,大容量の入力データにより既にキャッシュ登録されている第2コアグループ内の仮想マシンのデータの大部分がキャッシュメモリから追い出されることはない。 In the cache registration of data input by the IO device by the cache control unit CC1, the cache control unit CC1 controls the replacement of the cache block of the cache memory, that is, the way, based on the previously set maximum number of ways of the virtual machine VM_02. I do. The replacement control is as described with reference to FIG. Since the maximum number of ways of the virtual machine VM_02 has already been set in the replacement control unit RPC1 of the cache control unit CC1, the replacement control in the cache registration processing by the IO store request with the cache registration instruction is appropriately performed, and a large capacity input Most of the data of the virtual machines in the second core group that has already been cached by data is not evicted from the cache memory.
そして,キャッシュ登録指示付きIOストア要求が処理された後に,第1コアグループ内の仮想マシンVM_02がそのIOストアされたデータについてロード要求を発行すると,前述と同様にロード要求は第1コアグループ内のキャッシュ制御部CC0から第2コアグループ内のキャッシュ制御部CC1に転送され,キャッシュ制御部CC1はキャッシュヒットを検出し,キャッシュメモリ内にプリフェッチされているデータを第1コアグループ内のムーブインバッファMIBに応答する。したがって,仮想マシンVM_02が発行したロード要求のレイテンシは短くなる。 Then, after the IO store request with the cache registration instruction is processed, when the virtual machine VM_02 in the first core group issues a load request for the IO stored data, the load request is in the first core group as described above. Is transferred from the cache control unit CC0 to the cache control unit CC1 in the second core group, the cache control unit CC1 detects a cache hit, and moves the prefetched data in the cache memory to the move-in buffer in the first core group. Responds to the MIB. Therefore, the latency of the load request issued by the virtual machine VM_02 is shortened.
本実施の形態では,第1のコアグループ内の仮想マシンVMが,第2のコアグループが管理するメインメモリ宛のメモリアクセス要求により,第2のコアグループ内のキャッシュ制御部CC1のリプレース制御部RPC1に最大ウェイ数を設定する。したがって,最大ウェイ数設定のための特別の要求が発行されないので,コアグループ間バスBUS_0のトラフィック量の増大を抑制することができる。また,特別の要求を処理することによるキャッシュ制御部CC1のビジー率の悪化を抑制することができる。 In the present embodiment, the virtual machine VM in the first core group receives a memory access request addressed to the main memory managed by the second core group, and the replacement control unit of the cache control unit CC1 in the second core group. Set the maximum number of ways to RPC1. Therefore, since a special request for setting the maximum number of ways is not issued, an increase in the traffic volume of the inter-core group bus BUS_0 can be suppressed. In addition, it is possible to suppress the deterioration of the busy rate of the cache control unit CC1 due to processing of special requests.
図8は,本実施の形態によるキャッシュ分割情報付きメモリアクセス要求により他のコアグループ内に最大ウェイ数を設定する例と,専用の最大ウェイ数設定要求により他のコアグループ内に最大ウェイ数を設定する比較例との比較を示す図である。本実施の形態ではキャッシュ分割情報付きロード要求によりキャッシュ分割情報が更新され,比較例では専用の最大ウェイ数設定要求によりキャッシュ分割情報が更新される。 FIG. 8 shows an example in which the maximum number of ways is set in another core group by a memory access request with cache division information according to the present embodiment and the maximum number of ways in another core group by a dedicated maximum number of ways setting request. It is a figure which shows the comparison with the comparative example to set. In the present embodiment, the cache partition information is updated by a load request with cache partition information, and in the comparative example, the cache partition information is updated by a dedicated maximum way number setting request.
例えば,10回に1回の割合でキャッシュ分割情報を更新するトランザクションが発生したと仮定して,性能比較を行う。更に,図8に示されるように,ロード要求の割合が20%,キャッシュミス率が4%(キャッシュヒット率が96%),キャッシュヒットレイテンシが20サイクル,キャッシュミスレイテンシが200サイクルと仮定する。また,プログラムの命令数が100であり,ロード要求が発行されるロード命令以外の命令は1サイクルで実行が完了すると仮定する。そして,専用の最大ウェイ数設定要求を採用した場合は,コアグループ間バスBUS_0を競合する要求が増えるので,キャッシュミスレイテンシが例えば10%悪化して,220サイクルになると仮定する。本実施の形態のように専用の最大ウェイ数設定要求を採用しない場合は,図8に示されるとおり,キャッシュミスレイテンシは200サイクルと仮定する。 For example, the performance comparison is performed on the assumption that a transaction for updating the cache partition information occurs at a rate of once every 10 times. Further, as shown in FIG. 8, it is assumed that the load request ratio is 20%, the cache miss rate is 4% (cache hit rate is 96%), the cache hit latency is 20 cycles, and the cache miss latency is 200 cycles. Further, it is assumed that the number of instructions in the program is 100 and execution of instructions other than the load instruction for which a load request is issued is completed in one cycle. Then, when the dedicated maximum way number setting request is adopted, the number of requests competing for the inter-core bus BUS_0 is increased, so that it is assumed that the cache miss latency is deteriorated by, for example, 10% and becomes 220 cycles. When the dedicated maximum way number setting request is not adopted as in the present embodiment, it is assumed that the cache miss latency is 200 cycles as shown in FIG.
上記の仮定に基づいて計算すると,本実施の形態のように通常のロード要求により最大ウェイ数を設定する例と,専用の最大ウェイ数設定要求を採用する比較例において,100のプログラム命令の実行に要するサイクル数は,図8に示されるとおりである。 When calculated based on the above assumption, execution of 100 program instructions is performed in an example in which the maximum number of ways is set by a normal load request as in the present embodiment and in a comparative example in which a dedicated maximum number of ways setting request is adopted. The number of cycles required for is as shown in FIG.
まず,本実施の形態の例の場合の100のプログラム命令の実行に要するサイクル数は,ロード命令以外の数(100-20)が1サイクル,ロード命令の数20のうちキャッシュミス率4%200サイクル,キャッシュヒット率96%が20サイクルを要するので,それらを加算すると,次のとおりである。
(100-20) ×1[cycle]+20×4%×200[cycle]+20×96%×20[cycle]=624[cycle]
一方,専用の最大ウェイ数設定要求を採用する比較例の場合の100のプログラム命令の実行に要するサイクル数は,キャッシュミスの場合に220サイクルを要するので,同じように加算すると,次の通りである。
(100-20) ×1[cycle]+20×4%×220[cycle]+20×96%×20[cycle]=640[cycle]
実際には,比較例の場合,ホームCPUである第2のコアグループ内のパイプライン制御部のビジー率もコアグループ間バスと同様に10%悪化するので,ホームCPU上で動作する仮想マシンの性能は,上記の数式以上に悪化することが予想される。
First, in the example of the present embodiment, the number of cycles required to execute 100 program instructions is one cycle other than load instructions (100-20), and a cache miss rate of 4% 200 out of 20 load instructions. Since the cycle and cache hit rate of 96% requires 20 cycles, adding these results in the following.
(100-20) × 1 [cycle] + 20 × 4% × 200 [cycle] + 20 × 96% × 20 [cycle] = 624 [cycle]
On the other hand, the number of cycles required to execute 100 program instructions in the comparative example employing a dedicated maximum way number setting request requires 220 cycles in the case of a cache miss. is there.
(100-20) × 1 [cycle] + 20 × 4% × 220 [cycle] + 20 × 96% × 20 [cycle] = 640 [cycle]
Actually, in the case of the comparative example, the busy rate of the pipeline control unit in the second core group which is the home CPU is also deteriorated by 10% similarly to the bus between core groups. Performance is expected to deteriorate beyond the above formula.
上記の通り,比較例に対して,本実施の形態は他のコアグループが管理するメインメモリへのロード要求やストア要求にキャッシュ分割情報を付加して,他のコアグループ内のキャッシュ制御部に最大ウェイ数を設定するので,全体の動作効率を高くすることができる。 As described above, compared to the comparative example, this embodiment adds cache division information to a load request or a store request to a main memory managed by another core group, and the cache control unit in the other core group Since the maximum number of ways is set, the overall operation efficiency can be increased.
以上の実施の形態をまとめると,次の付記のとおりである。 The above embodiment is summarized as follows.
(付記1)
複数のコアと,第1のキャッシュ制御部と第1のキャッシュメモリとを含む第1のキャッシュとを有し,前記第1のキャッシュ制御部が,第1のキャッシュ分割情報に基づいて,メモリアクセス要求元に対応して前記第1のキャッシュメモリを分割するキャッシュ分割制御を行う第1のコアグループと,
複数のコアと,第2のキャッシュ制御部と第2のキャッシュメモリとを含む第2のキャッシュとを有し,前記第2のキャッシュ制御部が,第2のキャッシュ分割情報に基づいて,メモリアクセス要求元に対応して前記第2のキャッシュメモリを分割するキャッシュ分割制御を行う第2のコアグループと,
前記第1,第2のコアグループ間に設けられメモリアクセス要求が送信されるコアグループ間バスとを有し,
前記第1のコアグループのメモリアクセス要求元が,前記第2のコアグループが管理するメインメモリへのメモリアクセス要求を前記第2のキャッシュ分割情報を付加して発行した場合,前記第2のコアグループの第2のキャッシュ制御部が,前記発行されたメモリアクセス要求に応答して,前記付加された第2のキャッシュ分割情報を登録する演算処理装置。
(Appendix 1)
A first cache including a plurality of cores, a first cache control unit, and a first cache memory, wherein the first cache control unit accesses the memory based on the first cache division information; A first core group performing cache partitioning control for partitioning the first cache memory corresponding to a request source;
A second cache including a plurality of cores, a second cache control unit, and a second cache memory, wherein the second cache control unit accesses the memory based on the second cache division information A second core group for performing cache partitioning control for partitioning the second cache memory in response to a request source;
An inter-core group bus provided between the first and second core groups to which a memory access request is transmitted;
When the memory access request source of the first core group issues a memory access request to the main memory managed by the second core group with the second cache partition information added, the second core An arithmetic processing unit in which a second cache control unit of the group registers the added second cache division information in response to the issued memory access request.
(付記2)
前記第2のコアグループの第2のキャッシュ制御部が,前記第2のキャッシュ分割情報を登録した後,当該登録した第2のキャッシュ分割情報に基づいて前記第2のキャッシュメモリに対し前記キャッシュ分割制御を行う付記1に記載の演算処理装置。
(Appendix 2)
After the second cache control unit of the second core group registers the second cache partition information, the cache partition is performed on the second cache memory based on the registered second cache partition information. The arithmetic processing device according to
(付記3)
前記第2のコアグループの第2のキャッシュ制御部が,前記第2のキャッシュ分割情報を登録した後,外部から入力されるデータを前記第2のキャッシュメモリに登録するキャッシュインジェクション要求に応答して,前記登録した第2のキャッシュ分割情報に基づいて前記第2のキャッシュメモリに対し前記キャッシュ分割制御を行い,前記キャッシュ分割制御で選択されたキャッシュブロック内に前記入力されるデータを登録する付記1に記載の演算処理装置。
(Appendix 3)
After the second cache control unit of the second core group registers the second cache division information, in response to a cache injection request for registering data input from the outside in the second cache memory The cache partition control is performed on the second cache memory based on the registered second cache partition information, and the input data is registered in the cache block selected by the cache partition control. The arithmetic processing unit described in 1.
(付記4)
前記第2のコアグループの第2のキャッシュ制御部が,前記第1のコアグループのメモリアクセス要求元が発行したメモリアクセス要求に応答して,前記第2のキャッシュメモリにデータを登録せずに,前記第1のコアグループ内の前記メモリアクセス要求元にデータ応答する付記1に記載の演算処理装置。
(Appendix 4)
In response to the memory access request issued by the memory access request source of the first core group, the second cache control unit of the second core group does not register data in the second cache memory. The arithmetic processing unit according to
(付記5)
前記第2のコアグループの第2のキャッシュ制御部が,前記第1のコアグループのメモリアクセス要求元が発行したメモリアクセス要求に応答して,前記第2のコアグループが管理するメインメモリへのアクセス制御を行い,前記第2のキャッシュメモリにアクセスしたデータを登録せずに,前記第1のコアグループ内の前記メモリアクセス要求元にデータ応答する付記1に記載の演算処理装置。
(Appendix 5)
In response to the memory access request issued by the memory access request source of the first core group, the second cache control unit of the second core group sends data to the main memory managed by the second core group. The arithmetic processing unit according to
(付記6)
前記データ応答に応答して,前記第1のキャッシュ制御部は前記第1のキャッシュメモリに前記データ応答のデータを登録する付記4または5に記載の演算処理装置。
(Appendix 6)
6. The arithmetic processing device according to
(付記7)
前記キャッシュ分割情報は,前記メモリアクセス要求元と,前記メモリアクセス要求元に割り当てられる最大キャッシュブロック数とを有し,
前記キャッシュ分割制御は,キャッシュメモリにデータを登録するときに,前記メモリアクセス要求元に割り当てられている現キャッシュブロック数が前記最大キャッシュブロック数に達するまで,他のメモリアクセス要求元に割り当てられているキャッシュブロックを前記メモリアクセス要求元に割り当てて前記データを登録する付記1に記載の演算処理装置。
(Appendix 7)
The cache partition information includes the memory access request source and the maximum number of cache blocks allocated to the memory access request source.
When the cache partitioning control registers data in the cache memory, it is assigned to other memory access request sources until the current cache block number assigned to the memory access request source reaches the maximum cache block number. The arithmetic processing unit according to
(付記8)
複数のコアとキャッシュメモリとを有する第2の演算処理装置とバスを介して接続される第1の演算処理装置であって,
複数のコアと,
第1のキャッシュ制御部と第1のキャッシュメモリとを含む第1のキャッシュとを有し,
前記第1のキャッシュ制御部が,第1のキャッシュ分割情報に基づいて,メモリアクセス要求元に対応して前記第1のキャッシュメモリを分割するキャッシュ分割制御を行い,
前記第2の演算処理装置のメモリアクセス要求元が,前記第1の演算処理装置が管理するメインメモリへのメモリアクセス要求を前記第1のキャッシュ分割情報を付加して発行した場合,前記第1のキャッシュ制御部が,前記発行されたメモリアクセス要求に応答して,前記付加された第1のキャッシュ分割情報を登録する演算処理装置。
(Appendix 8)
A first arithmetic processing unit connected via a bus to a second arithmetic processing unit having a plurality of cores and a cache memory,
With multiple cores,
A first cache including a first cache control unit and a first cache memory;
The first cache control unit performs cache division control to divide the first cache memory corresponding to a memory access request source based on the first cache division information;
When the memory access request source of the second processing unit issues a memory access request to the main memory managed by the first processing unit with the first cache division information added, the first processing unit The cache control unit registers the added first cache division information in response to the issued memory access request.
(付記9)
複数のコアと,第1のキャッシュ制御部と第1のキャッシュメモリとを含む第1のキャッシュとを有し,前記第1のキャッシュ制御部が,第1のキャッシュ分割情報に基づいて,メモリアクセス要求元に対応して前記第1のキャッシュメモリを分割するキャッシュ分割制御を行う第1のコアグループと,
複数のコアと,第2のキャッシュ制御部と第2のキャッシュメモリとを含む第2のキャッシュとを有し,前記第2のキャッシュ制御部が,第2のキャッシュ分割情報に基づいて,メモリアクセス要求元に対応して前記第2のキャッシュメモリを分割するキャッシュ分割制御を行う第2のコアグループと,
前記第1,第2のコアグループ間に設けられメモリアクセス要求が送信されるコアグループ間バスとを有する演算処理装置の制御方法であって,
前記第1のコアグループのメモリアクセス要求元が,前記第2のコアグループが管理するメインメモリへのメモリアクセス要求を前記第2のキャッシュ分割情報を付加して発行した場合,前記第2のコアグループの第2のキャッシュ制御部が,前記発行されたメモリアクセス要求に応答して,前記付加された第2のキャッシュ分割情報を登録する工程を有する演算処理装置の制御方法。
(Appendix 9)
A first cache including a plurality of cores, a first cache control unit, and a first cache memory, wherein the first cache control unit accesses the memory based on the first cache division information; A first core group performing cache partitioning control for partitioning the first cache memory corresponding to a request source;
A second cache including a plurality of cores, a second cache control unit, and a second cache memory, wherein the second cache control unit accesses the memory based on the second cache division information A second core group for performing cache partitioning control for partitioning the second cache memory in response to a request source;
A control method for an arithmetic processing unit having an inter-core group bus provided between the first and second core groups, to which a memory access request is transmitted,
When the memory access request source of the first core group issues a memory access request to the main memory managed by the second core group with the second cache partition information added, the second core A method for controlling an arithmetic processing unit, comprising: a step in which a second cache control unit of a group registers the added second cache partition information in response to the issued memory access request.
(付記10)
前記第2のコアグループの第2のキャッシュ制御部が,前記第2のキャッシュ分割情報を登録した後,外部から入力されるデータを前記第2のキャッシュメモリに登録するキャッシュインジェクション要求に応答して,前記登録した第2のキャッシュ分割情報に基づいて前記第2のキャッシュメモリに対し前記キャッシュ分割制御を行い,前記キャッシュ分割制御で選択されたキャッシュブロック内に前記入力されるデータを登録する工程を有する付記9に記載の演算処理装置の制御方法。
(Appendix 10)
After the second cache control unit of the second core group registers the second cache division information, in response to a cache injection request for registering data input from the outside in the second cache memory , Performing the cache partition control on the second cache memory based on the registered second cache partition information, and registering the input data in the cache block selected by the cache partition control. The control method of the arithmetic processing apparatus of Claim 9 which has.
(付記11)
前記キャッシュ分割情報は,前記メモリアクセス要求元と,前記メモリアクセス要求元に割り当てられる最大キャッシュブロック数とを有し,
前記キャッシュ分割制御は,キャッシュメモリにデータを登録するときに,前記メモリアクセス要求元に割り当てられている現キャッシュブロック数が前記最大キャッシュブロック数に達するまで,他のメモリアクセス要求元に割り当てられているキャッシュブロックを前記メモリアクセス要求元に割り当てて前記データを登録する付記9に記載の演算処理装置の制御方法。
(Appendix 11)
The cache partition information includes the memory access request source and the maximum number of cache blocks allocated to the memory access request source.
When the cache partitioning control registers data in the cache memory, it is assigned to other memory access request sources until the current cache block number assigned to the memory access request source reaches the maximum cache block number. The control method of the arithmetic processing unit according to attachment 9, wherein the cache block is allocated to the memory access request source and the data is registered.
LOCAL_CPU_0:第1のコアグループ,他の演算処理装置
HOME_CPU_1:第2のコアグループ,演算処理装置
CORE:コア
L2_CACHE:L2キャッシュ,キャッシュ
RC0,RC1:要求制御部
CC0,CC1:キャッシュ制御部
RPC0,RPC1:リプレース制御部
MW_TBL:最大キャッシュブロック数テーブル,最大ウェイ数テーブル
RP_W:リプレースウェイ選択部
D_RAM:データメモリ(キャッシュメモリ)
TAG_RAM:タグメモリ(キャッシュメモリ)
BUS_0:コアグループ間バス
BUS_1:コアグループ内バス
BUS_2:メモリアクセスバス
M_MEM_0,M_MEM_2:メインメモリ
MIB:キャッシュミス制御部,ムーブインバッファ
MAC:メモリアクセス制御部
R_BUF:リモートバッファ
R_PORT:要求ポート(メモリアクセス要求格納部)
MIP:ムーブインポート(メモリアクセス要求格納部)
MOP:ムーブアウトポート
PFP:プリフェッチポート
R_RP:リモートリクエストポート
LOCAL_CPU_0: first core group, other arithmetic processing unit HOME_CPU_1: second core group, arithmetic processing unit CORE: core L2_CACHE: L2 cache, cache RC0, RC1: request control unit CC0, CC1: cache control unit RPC0, RPC1 : Replace control unit MW_TBL: Maximum cache block number table, maximum way number table RP_W: Replace way selection unit D_RAM: Data memory (cache memory)
TAG_RAM: Tag memory (cache memory)
BUS_0: Bus between core groups BUS_1: Bus within core group BUS_2: Memory access bus M_MEM_0, M_MEM_2: Main memory MIB: Cache miss control unit, Move-in buffer MAC: Memory access control unit R_BUF: Remote buffer R_PORT: Request port (memory access) Request storage)
MIP: Move import (memory access request storage)
MOP: Move-out port PFP: Prefetch port R_RP: Remote request port
Claims (8)
複数のコアと,第2のキャッシュ制御部と第2のキャッシュメモリとを含む第2のキャッシュとを有し,前記第2のキャッシュ制御部が,第2のキャッシュ分割情報に基づいて,メモリアクセス要求元に対応して前記第2のキャッシュメモリを分割するキャッシュ分割制御を行う第2のコアグループと,
前記第1,第2のコアグループ間に設けられメモリアクセス要求が送信されるコアグループ間バスとを有し,
前記第1のコアグループのメモリアクセス要求元が,前記第2のコアグループが管理するメインメモリへのメモリアクセス要求を前記第2のキャッシュ分割情報を付加して発行した場合,前記第2のコアグループの第2のキャッシュ制御部が,前記発行されたメモリアクセス要求に応答して,前記付加された第2のキャッシュ分割情報を登録する演算処理装置。 A first cache including a plurality of cores, a first cache control unit, and a first cache memory, wherein the first cache control unit accesses the memory based on the first cache division information; A first core group performing cache partitioning control for partitioning the first cache memory corresponding to a request source;
A second cache including a plurality of cores, a second cache control unit, and a second cache memory, wherein the second cache control unit accesses the memory based on the second cache division information A second core group for performing cache partitioning control for partitioning the second cache memory in response to a request source;
An inter-core group bus provided between the first and second core groups to which a memory access request is transmitted;
When the memory access request source of the first core group issues a memory access request to the main memory managed by the second core group with the second cache partition information added, the second core An arithmetic processing unit in which a second cache control unit of the group registers the added second cache division information in response to the issued memory access request.
前記キャッシュ分割制御は,キャッシュメモリにデータを登録するときに,前記メモリアクセス要求元に割り当てられている現キャッシュブロック数が前記最大キャッシュブロック数に達するまで,他のメモリアクセス要求元に割り当てられているキャッシュブロックを前記メモリアクセス要求元に割り当てて前記データを登録する請求項1に記載の演算処理装置。 The cache partition information includes the memory access request source and the maximum number of cache blocks allocated to the memory access request source.
When the cache partitioning control registers data in the cache memory, it is assigned to other memory access request sources until the current cache block number assigned to the memory access request source reaches the maximum cache block number. The arithmetic processing unit according to claim 1, wherein the data is registered by allocating a cache block to the memory access request source.
複数のコアと,
第1のキャッシュ制御部と第1のキャッシュメモリとを含む第1のキャッシュとを有し,
前記第1のキャッシュ制御部が,第1のキャッシュ分割情報に基づいて,メモリアクセス要求元に対応して前記第1のキャッシュメモリを分割するキャッシュ分割制御を行い,
前記第2の演算処理装置のメモリアクセス要求元が,前記第1の演算処理装置が管理するメインメモリへのメモリアクセス要求を前記第1のキャッシュ分割情報を付加して発行した場合,前記第1のキャッシュ制御部が,前記発行されたメモリアクセス要求に応答して,前記付加された第1のキャッシュ分割情報を登録する演算処理装置。 A first arithmetic processing unit connected via a bus to a second arithmetic processing unit having a plurality of cores and a cache memory,
With multiple cores,
A first cache including a first cache control unit and a first cache memory;
The first cache control unit performs cache division control to divide the first cache memory corresponding to a memory access request source based on the first cache division information;
When the memory access request source of the second processing unit issues a memory access request to the main memory managed by the first processing unit with the first cache division information added, the first processing unit The cache control unit registers the added first cache division information in response to the issued memory access request.
複数のコアと,第2のキャッシュ制御部と第2のキャッシュメモリとを含む第2のキャッシュとを有し,前記第2のキャッシュ制御部が,第2のキャッシュ分割情報に基づいて,メモリアクセス要求元に対応して前記第2のキャッシュメモリを分割するキャッシュ分割制御を行う第2のコアグループと,
前記第1,第2のコアグループ間に設けられメモリアクセス要求が送信されるコアグループ間バスとを有する演算処理装置の制御方法であって,
前記第1のコアグループのメモリアクセス要求元が,前記第2のコアグループが管理するメインメモリへのメモリアクセス要求を前記第2のキャッシュ分割情報を付加して発行した場合,前記第2のコアグループの第2のキャッシュ制御部が,前記発行されたメモリアクセス要求に応答して,前記付加された第2のキャッシュ分割情報を登録する工程を有する演算処理装置の制御方法。 A first cache including a plurality of cores, a first cache control unit, and a first cache memory, wherein the first cache control unit accesses the memory based on the first cache division information; A first core group performing cache partitioning control for partitioning the first cache memory corresponding to a request source;
A second cache including a plurality of cores, a second cache control unit, and a second cache memory, wherein the second cache control unit accesses the memory based on the second cache division information A second core group for performing cache partitioning control for partitioning the second cache memory in response to a request source;
A control method for an arithmetic processing unit having an inter-core group bus provided between the first and second core groups, to which a memory access request is transmitted,
When the memory access request source of the first core group issues a memory access request to the main memory managed by the second core group with the second cache partition information added, the second core A method for controlling an arithmetic processing unit, comprising: a step in which a second cache control unit of a group registers the added second cache partition information in response to the issued memory access request.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014112574A JP6260456B2 (en) | 2014-05-30 | 2014-05-30 | Arithmetic processing device and control method of arithmetic processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014112574A JP6260456B2 (en) | 2014-05-30 | 2014-05-30 | Arithmetic processing device and control method of arithmetic processing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2015228060A true JP2015228060A (en) | 2015-12-17 |
| JP6260456B2 JP6260456B2 (en) | 2018-01-17 |
Family
ID=54885515
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2014112574A Active JP6260456B2 (en) | 2014-05-30 | 2014-05-30 | Arithmetic processing device and control method of arithmetic processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6260456B2 (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH02236749A (en) * | 1988-08-16 | 1990-09-19 | Internatl Business Mach Corp <Ibm> | Cash control |
| JPH0944401A (en) * | 1995-07-27 | 1997-02-14 | Nec Ibaraki Ltd | Cache controller |
| JP2010198129A (en) * | 2009-02-23 | 2010-09-09 | Toshiba Corp | Cache system |
| JP2011018196A (en) * | 2009-07-09 | 2011-01-27 | Fujitsu Ltd | Cache memory |
-
2014
- 2014-05-30 JP JP2014112574A patent/JP6260456B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH02236749A (en) * | 1988-08-16 | 1990-09-19 | Internatl Business Mach Corp <Ibm> | Cash control |
| JPH0944401A (en) * | 1995-07-27 | 1997-02-14 | Nec Ibaraki Ltd | Cache controller |
| JP2010198129A (en) * | 2009-02-23 | 2010-09-09 | Toshiba Corp | Cache system |
| JP2011018196A (en) * | 2009-07-09 | 2011-01-27 | Fujitsu Ltd | Cache memory |
Also Published As
| Publication number | Publication date |
|---|---|
| JP6260456B2 (en) | 2018-01-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5413001B2 (en) | Cache memory | |
| US10802987B2 (en) | Computer processor employing cache memory storing backless cache lines | |
| US8412907B1 (en) | System, method and computer program product for application-level cache-mapping awareness and reallocation | |
| JP7340326B2 (en) | Perform maintenance operations | |
| US7461209B2 (en) | Transient cache storage with discard function for disposable data | |
| US8185692B2 (en) | Unified cache structure that facilitates accessing translation table entries | |
| US20100325374A1 (en) | Dynamically configuring memory interleaving for locality and performance isolation | |
| KR20210058877A (en) | External memory-based transform index buffer | |
| CN113138851B (en) | A data management method, related device and system | |
| Bock et al. | Concurrent page migration for mobile systems with OS-managed hybrid memory | |
| JP5226010B2 (en) | Shared cache control device, shared cache control method, and integrated circuit | |
| WO2024066195A1 (en) | Cache management method and apparatus, cache apparatus, electronic apparatus, and medium | |
| US7721047B2 (en) | System, method and computer program product for application-level cache-mapping awareness and reallocation requests | |
| KR102482516B1 (en) | memory address conversion | |
| KR20230028145A (en) | Systems, methods, and apparatus for transferring data between interconnected devices | |
| US20090083496A1 (en) | Method for Improved Performance With New Buffers on NUMA Systems | |
| JP7264806B2 (en) | Systems and methods for identifying the pendency of memory access requests in cache entries | |
| JPWO2010024071A1 (en) | Cache memory, system thereof, method of use thereof, and program of use thereof | |
| US20080301324A1 (en) | Processor device and instruction processing method | |
| CN111183414A (en) | Cache method and system based on service level agreement | |
| JP2019521410A (en) | Set cache entry age based on hints from different cache levels | |
| JP6260456B2 (en) | Arithmetic processing device and control method of arithmetic processing device | |
| JP2020095345A (en) | Arithmetic processing device, memory device, and method for controlling arithmetic processing device | |
| US11003591B2 (en) | Arithmetic processor, information processing device and control method of arithmetic processor | |
| US9606917B2 (en) | Arithmetic processing apparatus and method for controlling same |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170206 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20171026 |
|
| 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: 20171114 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20171127 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6260456 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |