JP6110417B2 - Cache memory control device and control method - Google Patents
Cache memory control device and control method Download PDFInfo
- Publication number
- JP6110417B2 JP6110417B2 JP2015013215A JP2015013215A JP6110417B2 JP 6110417 B2 JP6110417 B2 JP 6110417B2 JP 2015013215 A JP2015013215 A JP 2015013215A JP 2015013215 A JP2015013215 A JP 2015013215A JP 6110417 B2 JP6110417 B2 JP 6110417B2
- Authority
- JP
- Japan
- Prior art keywords
- inter
- information
- core communication
- core
- communication area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
本発明は、CPU(Central Processing Unit)とメインメモリとの間に配備されるキャッシュメモリを制御するキャッシュメモリ制御装置および制御方法に関する。特に、本発明は、CPUが備える複数のプロセッサコア(以降、コアと称す)間で共有しているキャッシュメモリを用いたコア間通信を制御するキャッシュメモリ制御装置および制御方法に関する。 The present invention relates to a cache memory control device and a control method for controlling a cache memory provided between a CPU (Central Processing Unit) and a main memory. In particular, the present invention relates to a cache memory control device and a control method for controlling inter-core communication using a cache memory shared among a plurality of processor cores (hereinafter referred to as cores) provided in a CPU.
キャッシュメモリを用いたデータ処理が知られている。キャッシュメモリは、CPU等の演算装置とメインメモリとの間に設けられ、メインメモリ内の一部のデータを格納し、演算装置との間でデータをやり取りする。これにより、演算装置がメインメモリにアクセスする時間を短縮する。 Data processing using a cache memory is known. The cache memory is provided between an arithmetic device such as a CPU and the main memory, stores part of the data in the main memory, and exchanges data with the arithmetic device. This shortens the time for the arithmetic unit to access the main memory.
このようなキャッシュメモリを用いたシステムが特許文献1や特許文献2に開示されている。
特許文献1は、演算装置がキャッシュメモリに一時データを書き込むときに生じる無駄なメモリアクセスを回避可能なキャッシュメモリシステムを開示する。
特許文献1が開示するキャッシュメモリシステムは、複数のコアを含むCPUとメインメモリの間に存在するライトバック型キャッシュメモリを対象とする。そして、本来は必要ではないにも関わらず、キャッシュメモリとメインメモリとの内容の一貫性を保つために行われるメモリアクセスを軽減する仕組みを持つ。
The cache memory system disclosed in
キャッシュメモリシステムの概要について、特許文献1の記載を参照して以下に説明する。
The outline of the cache memory system will be described below with reference to the description in
図13は、特許文献1に記載されたキャッシュメモリシステムの構成を一例として示すブロック図である。図13を参照すると、このキャッシュメモリシステムは、複数のプロセッサコア4_0、4_1〜4_N−1を含むCPU1とメインメモリ3との間にキャッシュメモリ2が配備される構成となっている。
FIG. 13 is a block diagram illustrating an example of the configuration of the cache memory system described in
図14は、特許文献1に記載されたキャッシュメモリシステムにおけるキャッシュメモリ2の構成を示すブロック図である。
FIG. 14 is a block diagram showing a configuration of the
図14を参照すると、キャッシュメモリ2は、アドレスレジスタ7、アドレスアレイ11、データアレイ12、比較器16およびキャッシュ制御ユニット19を有する構成となっている。
Referring to FIG. 14, the
アドレスレジスタ7は、CPU1が要求したアクセス先のメモリアドレスを格納する。アドレスレジスタ7に格納されるメモリアドレスは、上位mビット8、中位のnビット9、下位kビット10によって表される。
The address register 7 stores the memory address of the access destination requested by the
アドレスアレイ11は、アドレスエントリを持つメモリであり、上位mビット13と状態他14を要素とする配列である。アドレスアレイ11は、データアレイ12のデータエントリにブロック単位で格納されているブロックデータ15の索引として使用される。
The address array 11 is a memory having an address entry, and is an array having the upper m bits 13 and the
なお、アドレスレジスタ7に格納されたメモリアドレスの上位mビット8をアドレス内タグ情報、中位のnビット9をインデックス情報、下位kビット10をバイトオフセット情報と称する。また、アドレスアレイ11の上位mビット13をキャッシュ内タグ情報と称する。
The
データアレイ12は、複数のワードからなる複数のブロックデータ15を要素とする配列である。 The data array 12 is an array having a plurality of block data 15 composed of a plurality of words as elements.
図15は、アドレスアレイ11に格納されている状態他14の状態ビットの内容を示す図である。 FIG. 15 is a diagram showing the contents of 14 status bits stored in the address array 11.
状態他14は、データアレイ12に格納されているブロックデータ15の状態を示すブロック状態記憶部20とワード状態記憶部21で構成される。図15は、CPU1にコアを4つ備え、データアレイ12に格納されている1つのブロックデータ15が8ワード(32バイト)である場合を例にして示している。
The
ワード状態記憶部21は、ブロックデータ15を構成する各ワードについて、CPU1からのデータが書き込まれたワードを特定するためのワード状態情報を記憶するワード状態W(i)を有する。ここでは、8ワードの各ワードに対応するワード状態W(1)〜W(8)を有する。また、各ワード状態W(i)は、CPU1が具備する各コアに対応するビットを有している。ここでは、ワード状態W(i)は4つのコアに対応させて4ビットで構成される。
The word state storage unit 21 has a word state W (i) for storing word state information for specifying a word in which data from the
ワード状態W(i)は、その内容に応じて当該ワードの下記の状態を示す。なお、以降の説明においては、ワード状態W(i)を、単にW(i)と称する。 The word state W (i) indicates the following state of the word according to the contents. In the following description, the word state W (i) is simply referred to as W (i).
W(i)≠0000のときは、i番目のワードにいずれかのコアからデータが書き込まれたことを示し、ブロックデータのi番目のワードには有効なデータが格納されていることになる。 When W (i) ≠ 0000, it indicates that data has been written from any of the cores to the i-th word, and valid data is stored in the i-th word of the block data.
W(i)=0000のときは、i番目のワードにはいずれのコアからもデータが書き込まれていないことを示す。 When W (i) = 0000, it indicates that no data is written in any i-th word from any core.
また、コアからデータが書き込まれたW(i)において、書込みを行ったコアに対応する位置のビット値を0に、それ以外のコアに対応する位置のビット値を1に設定する。W(i)の4ビットのうちの0の位置が書込みを行ったコアを示す。 Also, in W (i) where data is written from the core, the bit value at the position corresponding to the core where the writing was performed is set to 0, and the bit value at the position corresponding to the other core is set to 1. The 0 position in the 4 bits of W (i) indicates the core that performed the writing.
ブロック状態記憶部20は、そのブロック内の、CPU1から書き込まれていないワードに、メインメモリ3から読み出されたデータが記憶されているか否かを示すBV(Block Validity)を記憶する。
The block state storage unit 20 stores BV (Block Validity) indicating whether or not the data read from the
BV=1は、ブロック全体が有効であることを示す。この場合、W(i)=0000でも、i番目のワードにはメインメモリ3から読み出されたデータが格納されて、当該ワードには有効なデータが格納されていることを示す。
BV = 1 indicates that the entire block is valid. In this case, even if W (i) = 0000, the data read from the
BV=0の場合は、W(i)≠0000のワードだけが有効で、W(i)=0000のワードは無効であることを示す。 When BV = 0, it indicates that only the word of W (i) ≠ 0000 is valid and the word of W (i) = 0000 is invalid.
キャッシュメモリシステムの基本的な動作について、図14と図15を参照して説明する。 The basic operation of the cache memory system will be described with reference to FIGS.
CPU1から記憶装置へのアクセス要求が発行されると、キャッシュメモリ2のアドレスレジスタ7にアクセス先のメモリアドレスが格納される。
When an access request to the storage device is issued from the
アドレスレジスタ7の中位のnビット9をインデックスアドレスとしてアドレスアレイ11を検索し、該当するエントリを取得する。該当するエントリには上位mビット13(キャッシュ内タグ情報)と上述した状態他14が格納されている。
The address array 11 is searched using the middle n bits 9 of the
アドレスアレイ11から取得したエントリの上位mビット13(キャッシュ内タグ情報)とアドレスレジスタ7に格納されている上位mビット8(アドレス内タグ情報)が比較器16に提供される。
The upper m bits 13 (in-cache tag information) of the entry acquired from the address array 11 and the upper m bits 8 (in-address tag information) stored in the
比較器16による上位mビット13(キャッシュ内タグ情報)と上位mビット8(アドレス内タグ情報)の比較結果が一致する場合には、当該エントリに対応するデータアレイ12に目的のデータが格納されている(キャッシュヒット)。一方、比較結果が不一致の場合には、目的とするデータはキャッシュメモリ2に存在せず(キャッシュミス)、メインメモリ3にアクセスすることになる。
If the comparison result of the upper m bits 13 (in-cache tag information) and the upper m bits 8 (in-address tag information) by the
キャッシュ制御ユニット19は、比較器16による比較結果、状態他14、コア番号17、命令18等を入力して、命令種別や状態他14の内容に応じて以下のようなキャッシュメモリ2の制御を行う。また、キャッシュ制御ユニット19は、アドレスレジスタ7の下位kビット10を、ブロックデータ15の中のワード位置を特定するバイトオフセット情報として受け取る。
The
命令18には、ストア命令(store)、ロード命令(load)およびロードアンドインバリデート命令(load and invalidate)がある。なお、ストア命令は書込み命令(write)、ロード命令は読出し命令(read)とも称する。 The instruction 18 includes a store instruction (store), a load instruction (load), and a load and invalidate instruction (load and invalidate). The store instruction is also called a write instruction (write), and the load instruction is also called a read instruction (read).
ストア命令(store)の場合の動作は次のようになる。 The operation in the case of a store instruction (store) is as follows.
キャッシュヒットの場合、キャッシュ制御ユニット19は、バイトオフセット情報に基づいて、当該エントリに対応するブロックデータ15の中の書込みの対象となるワードを特定し、書込み用データを該ワードに書き込む。つづいて、データが書き込まれたワードに対応するW(i)に、データを書き込んだコアを示す情報を設定する。例えば、コア0が1ワード目にデータを書き込んだ場合には、W(1)=0111にセットする。
In the case of a cache hit, the
キャッシュミスの場合、キャッシュ制御ユニット19は、新しいブロックを書き込み用ブロックとしてデータアレイ12に割り当てる。このとき、キャッシュ制御ユニット19は、割り当てられたブロックのW(i)とBVに設定された情報に基づいて、割り当てられたブロックに有効なデータが残っていないかどうかを判定する。
In the case of a cache miss, the
割り当てられたブロックのすべてのワード状態がW(i)=0000ならば、そのブロックには、どのコアからもデータが書き込まれていなかったことになる。この場合は、メインメモリ3にライトバックすることなく、そのまま、その割り当てられたブロックを使う。
If all the word states of the allocated block are W (i) = 0000, it means that no data has been written to the block from any core. In this case, the allocated block is used as it is without writing back to the
割り当てられたブロックのすべてのワード状態がW(i)≠0000、または、BV=1の場合には、そのブロック全体が書き換えられた、または、ブロック全体が有効であることになる。この場合には、そのブロックのデータをメインメモリ3にライトバックする。
If all the word states of the allocated block are W (i) ≠ 0000 or BV = 1, the entire block is rewritten or the entire block is valid. In this case, the data of the block is written back to the
割り当てられたブロックの一部のワード状態がW(i)≠0000で、かつ、BV=0の場合には、W(i)≠0000であるワードだけが書き換えられたことになる。この場合、W(i)≠0000のワードのデータだけを、メインメモリ3にライトバックする。
When the word state of a part of the allocated block is W (i) ≠ 0000 and BV = 0, only the word where W (i) ≠ 0000 is rewritten. In this case, only the data of the word of W (i) ≠ 0000 is written back to the
つづいて、新しく割り当てたブロックに対応しているアドレスアレイ11のエントリの上位mビット13に、アドレスレジスタの上位mビット8を設定する。そして、状態他14をゼロクリアして初期化する。
Subsequently, the
次に、キャッシュ制御ユニット19はバイトオフセット情報に基づいて書込みの対象となるワードを特定し、書き込むべきデータを書き込む。その後、データが書き込まれたワードに対応するW(i)に、データを書き込んだコアを示す情報を設定する。例えば、コア0が1ワード目にデータを書き込んだ場合には、W(1)=0111にセットする。
Next, the
ロード命令(load)の場合の動作は次のようになる。 The operation in the case of a load instruction (load) is as follows.
キャッシュヒットの場合で、ロード命令に示されたメモリアドレスに対応するワード状態がW(i)≠0000またはBV=1のとき、キャッシュ制御ユニット19は、そのメモリアドレスから特定されるデータアレイ12内のワードからデータを読み出す。
In the case of a cache hit, when the word state corresponding to the memory address indicated by the load instruction is W (i) ≠ 0000 or BV = 1, the
また、キャッシュヒットの場合で、ロード命令に示されたメモリアドレスに対応するワード状態がW(i)=0000かつBV=0のとき、キャッシュ制御ユニット19は、メインメモリ3からデータを読み出す。その後、データアレイ12のそのエントリのブロックデータ中のW(i)=0000のワードだけに、読み出したデータを書き込む。そしてBV=1に設定する。続いて、キャッシュ制御ユニット19は、データアレイ12から、アクセスされたワードを読み出す。
In the case of a cache hit, when the word state corresponding to the memory address indicated by the load instruction is W (i) = 0000 and BV = 0, the
キャッシュミスの場合、キャッシュ制御ユニット19は、新しいブロックを割り当てる。割り当てられたブロックに有効なデータが入っていた場合、つまりW(i)≠0000あるいはBV=1であった場合には、対象のブロックのデータをメインメモリ3へライトバックする。
In the case of a cache miss, the
つづいて、新しく割り当てたブロックに対応しているアドレスアレイ11のエントリの上位mビット13に、アドレスレジスタの上位mビット8を設定する。そして、状態他14をゼロクリアして初期化する。
Subsequently, the upper m
次に、キャッシュ制御ユニット19は、ロード命令に示されたメモリアドレスに対応するブロック内のデータをメインメモリ3から読み出す。
Next, the
キャッシュ制御ユニット19は、データアレイ12のそのブロック内でデータが書き込まれていないW(i)=0000のワードに、メインメモリ3から読み出したブロックのデータを書き込む。なお、ワード状態記憶部21は初期化されているので、ブロック内のデータ全体が書き込まれることになる。
The
続いて、キャッシュ制御ユニット19は、そのブロック内のCPU1から書き込まれていないワードに、メインメモリ3から読み出されたデータが記憶されていることを示すBV=1を設定する。そして、キャッシュ制御ユニット19は、データアレイ12から、アクセスされたワードを読み出す。
Subsequently, the
ロードアンドインバリデート命令(load and invalidate)の場合の動作は次のようになる。 The operation in the case of a load and invalidate instruction (load and invalidate) is as follows.
キャッシュヒットの場合で、ロードアンドインバリデート命令に示されたメモリアドレスに対応するワード状態がW(i)≠0000またはBV=1のとき、キャッシュ制御ユニット19は、そのメモリアドレスから特定されるデータアレイ12内のワードからデータを読み出す。
In the case of a cache hit, when the word state corresponding to the memory address indicated in the load and invalidate instruction is W (i) ≠ 0000 or BV = 1, the
読み出されたワードに対応するW(i)のうち、ロードアンドインバリデート命令を実行したコアに対応するビットが1の場合、ロードアンドインバリデート命令を実行したコアに対応するビットを0にする。また、BV=0に設定する。 Of the W (i) corresponding to the read word, if the bit corresponding to the core that executed the load and invalidate instruction is 1, the bit corresponding to the core that executed the load and invalidate instruction is set to 0. . Also, BV = 0 is set.
キャッシュヒットの場合で、ロードアンドインバリデート命令に示されたメモリアドレスに対応するワード状態がW(i)=0000かつBV=0のとき、キャッシュ制御ユニット19は、メインメモリ3からデータを読み出す。その後、データアレイ12のそのエントリのブロックデータ中のW(i)=0000のワードだけに、読み出したデータを書き込む。そしてBV=1に設定する。この動作はロード命令の場合の動作と同じである。
In the case of a cache hit, when the word state corresponding to the memory address indicated in the load and invalidate instruction is W (i) = 0000 and BV = 0, the
キャッシュミスの場合の動作は、ロード命令の場合の動作と同じである。 The operation for a cache miss is the same as that for a load instruction.
上述した動作を利用した、キャッシュメモリ2を使ったコア0、コア1、コア2、コア3によるコア間の通信例が特許文献1に記載されている。
まず、コア0はメッセージをキャッシュメモリ2に書き込むために、ストア命令を発行する。ストア命令が完了したとき、キャッシュメモリ2の該当ワードに対応するワード状態がW(i)=0111に設定される。
First, the core 0 issues a store instruction to write a message to the
コア1はコア0からのメッセージを受け取るため、ロードアンドインバリデート命令を発行する。ロードアンドインバリデート命令が完了したとき、キャッシュメモリ2の該当ワードに対応するワード状態がW(i)=0011に設定される。
Since
コア2はコア0からのメッセージを受け取るため、ロードアンドインバリデート命令を発行する。ロードアンドインバリデート命令が完了したとき、キャッシュメモリ2の該当ワードに対応するワード状態がW(i)=0001に設定される。
Since
コア3はコア0からのメッセージを受け取るため、ロードアンドインバリデート命令を発行する。ロードアンドインバリデート命令が完了したとき、キャッシュメモリ2の該当ワードに対応するワード状態がW(i)=0000に設定される。
Since
以上により、コア0から、コア1、コア2、コア3に対してキャッシュのみを用いた通信が実現されたことになる。
As described above, communication using only the cache is realized from the core 0 to the
しかし、特許文献1に記載されたこのようなコア間通信には次のような課題がある。
However, such inter-core communication described in
独立した複数のアプリケーションがそれぞれコアを割り当ててプログラムを実行している場合、各アプリケーションは、どのアプリケーションがキャッシュメモリを使用したコア間通信を実施しているのかということを知り得ない。そのため、あるコアのアプリケーションがキャッシュメモリを利用したコア間通信を行っている最中に、別のコアがそのコア間通信で利用しているキャッシュメモリ部分に対して書き込みを行ってしまうということが起こり得る。そのような場合、キャッシュメモリに蓄えられた通信データはメインメモリに書き戻されてしまう可能性がある。キャッシュメモリに比べてアクセス速度が遅いメインメモリへアクセスが発生してしまうと、コア間の通信速度が低下する。 When a plurality of independent applications allocate a core and execute a program, each application cannot know which application is performing inter-core communication using a cache memory. Therefore, while an application of a certain core is performing inter-core communication using the cache memory, another core may write to the cache memory portion used for the inter-core communication. Can happen. In such a case, the communication data stored in the cache memory may be written back to the main memory. If access to the main memory, which has a slower access speed than the cache memory, occurs, the communication speed between the cores decreases.
特許文献2は、コア間通信で用いているキャッシュライン(特許文献1のブロックデータに相当)に対してアクセスを禁止する排他制御装置を導入する事でこのようなコア間通信速度の低下を解決する技術を開示する。
コア間通信速度の低下を解決しようとする特許文献2に記載の排他制御装置は、マルチコアプロセッサの構成や運用方法の如何によっては対応しきれない場合があるという課題がある。
The exclusive control device described in
特許文献2に記載の排他制御装置は、論理アドレスを物理ページ番号に変換し、プロセスID(Identification)と物理ページ番号を結び付けたものをキャッシュ禁止テーブルで管理することで排他制御を行っている。この場合、各コア上で独立して動作しているユーザプロセスは、マルチコアプロセッサ上で唯一のプロセスIDが与えられ、論理アドレスと物理メモリアドレスが1対1で対応付けられる必要がある。また、キャッシュ禁止テーブルを全コアで共有するためには、物理ページサイズも統一されている必要がある。
The exclusive control device described in
近年、マルチコアプロセッサは、複数のOSをコア毎に実装する形態や、完全な物理メモリアドレスベースで動作するOSレスのアプリケーションとOSを1プロセッサ上で動作させる形態で運用される事がある。このような運用においては、プロセッサ上で唯一となるプロセスIDを割り当てる事は難しい上、論理アドレス空間の認識が統一されていない状況も考えられる。このような運用方法においては、各コア上で動作しているプロセスの間で物理ページサイズが異なるという状況が発生する可能性がある。 In recent years, a multi-core processor may be operated in a form in which a plurality of OSs are mounted for each core, or in a form in which an OS-less application that operates based on a complete physical memory address base and an OS are operated on one processor. In such an operation, it is difficult to assign a unique process ID on the processor, and there may be a situation where the recognition of the logical address space is not unified. In such an operation method, there is a possibility that the physical page size is different between processes operating on each core.
以上のような理由により、特許文献2に記載の排他制御装置は、マルチコアプロセッサの構成や運用方法の如何によってはコア間通信速度の低下を解決しようとする目的を達成できない場合がある。
For the reasons described above, the exclusive control device described in
本発明は、物理メモリアドレスを基にコア間通信で使われているキャッシュラインとワード状態を管理することで排他制御を行い、コア間通信速度の低下を解決するキャッシュメモリ制御装置および制御方法を提供することを目的とする。 The present invention provides a cache memory control device and a control method for performing exclusive control by managing cache lines and word states used in inter-core communication based on physical memory addresses and solving a decrease in inter-core communication speed. The purpose is to provide.
上記の目的を実現するために、本発明の一形態であるキャッシュメモリ制御装置は、マルチコアプロセッサのコア間通信で使われているキャッシュメモリ領域を一意に特定する要素に分解した物理メモリアドレスと該キャッシュメモリ領域のコア間通信での使用状態を示すワード状態記憶情報とからなるコア間通信領域情報を登録するコア間通信領域情報登録部と、キャッシュメモリへのアクセス前に、メモリアクセス先を特定する物理メモリアドレスを入力して、入力した該物理メモリアドレスを前記要素に分解して分解要素情報を生成する分解要素情報生成手段と、前記分解要素情報を前記コア間通信領域情報と比較し、前記キャッシュメモリへのアクセスを許可した場合に、前記コア間通信で使われているキャッシュメモリ領域が参照され、かつ、キャッシュミスが確定する条件の比較結果を得た場合に、前記キャッシュメモリへのアクセスを不許可と判定して通知するアクセス排他制御手段と、を含むことを特徴とする。 In order to achieve the above object, a cache memory control device according to one aspect of the present invention includes a physical memory address that is decomposed into elements that uniquely specify a cache memory area used in inter-core communication of a multi-core processor, and the physical memory address. Inter-core communication area information registration unit for registering inter-core communication area information consisting of word state storage information indicating the use state of inter-core communication in the cache memory area, and specifying the memory access destination before accessing the cache memory A decomposed element information generating means for generating decomposed element information by decomposing the input physical memory address into the elements, and comparing the decomposed element information with the inter-core communication area information; When access to the cache memory is permitted, the cache memory area used in the inter-core communication is referred to It is, and, upon obtaining a comparison result of the condition that a cache miss is determined, characterized in that it comprises a, an access exclusive control unit for notifying the access to the cache memory is determined not permitted.
また、本発明の他の形態であるキャッシュメモリ制御方法は、マルチコアプロセッサのコア間通信で使われているキャッシュメモリ領域を一意に特定する要素に分解した物理メモリアドレスと該キャッシュメモリ領域のコア間通信での使用状態を示すワード状態記憶情報とからなるコア間通信領域情報を登録し、キャッシュメモリへのアクセス前に、メモリアクセス先を特定する物理メモリアドレスを入力して、入力した該物理メモリアドレスを前記要素に分解して分解要素情報を生成し、前記分解要素情報を前記コア間通信領域情報と比較し、前記キャッシュメモリへのアクセスを許可した場合に、前記コア間通信で使われているキャッシュメモリ領域が参照され、かつ、キャッシュミスが確定する条件の比較結果を得た場合に、前記キャッシュメモリへのアクセスを不許可と判定して通知することを特徴とする。 In addition, a cache memory control method according to another aspect of the present invention provides a physical memory address that is decomposed into elements that uniquely specify a cache memory area used in inter-core communication of a multi-core processor and a core between the cache memory areas. The inter-core communication area information consisting of word state storage information indicating the use state in communication is registered, the physical memory address for specifying the memory access destination is input before accessing the cache memory, and the input physical memory When the address is decomposed into the elements to generate decomposed element information, the decomposed element information is compared with the inter-core communication area information, and access to the cache memory is permitted, the inter-core communication is used. The cache memory area is referred to, and the cache memory area is referred to when a comparison result of conditions for determining a cache miss is obtained. Access to Shumemori and notifies determines disallowed.
本発明は、物理メモリアドレスを基にコア間通信で使われているキャッシュラインとワード状態を管理することで排他制御を行い、コア間通信速度の低下を解決することができる。 According to the present invention, exclusive control is performed by managing cache lines and word states used in inter-core communication based on physical memory addresses, and it is possible to solve a decrease in inter-core communication speed.
(概要)
本発明のキャッシュメモリ制御装置および制御方法を実施するための形態は、特許文献1が開示するキャッシュメモリシステムをダイレクトマップ方式で運用することを前提とする。したがって、図13乃至図15を参照して背景技術に説明したキャッシュメモリシステムの構成および一般的な動作は、本発明の実施形態にも適用されるものとする。
(Overview)
The form for implementing the cache memory control device and the control method of the present invention is based on the assumption that the cache memory system disclosed in
本発明の実施形態は、物理メモリアドレスを基にコア間通信で使われているキャッシュラインとワード状態を管理し、キャッシュメモリへのアクセス前に排他制御を行い、キャッシュメモリシステムにおけるコア間通信の速度低下を防ぐものである。 Embodiments of the present invention manage cache lines and word states used in inter-core communication based on physical memory addresses, perform exclusive control before accessing cache memory, and perform inter-core communication in a cache memory system. This is to prevent a decrease in speed.
キャッシュメモリシステムにおけるコア間通信の速度低下は、他プロセスによってコア間通信で使用されているキャッシュラインが置き換えられる事によって発生するライトバック処理に起因する。そして、ライトバック処理を抑止するための排他制御は、コア間通信で使用しているキャッシュエントリを特定し、その部分へのアクセスを限定する事で実現することができる。 The decrease in the speed of inter-core communication in the cache memory system results from a write-back process that occurs when a cache line used in inter-core communication is replaced by another process. The exclusive control for suppressing the write-back process can be realized by specifying a cache entry used in inter-core communication and limiting access to that portion.
本発明の実施形態では、キャッシュメモリシステムにおけるキャッシュラインの置き換え条件に着目した排他制御を行う。具体的には、以下のような技術的な特徴を考慮した排他制御を行う。
(1)コア間通信で使用されているキャッシュラインが他プロセスによって置き換えられる事象は、キャッシュミス時に行われるキャッシュの割り当て処理による。
(2)メモリアクセスによりキャッシュラインの置き換えが発生しない事を保証できる場合にのみ該メモリアクセスを許可する。一方、キャッシュラインの置き換えが発生しない事を保証できない場合には、該メモリアクセスを抑止する事でキャッシュラインが置き換えられる事象を防ぐことができる。
(3)キャッシュミス時に発生するキャッシュ割り当てについては様々な割り当て方式があるが、ダイレクトマップ方式のキャッシュ運用ではキャッシュミス時に置き換えられるキャッシュエントリは物理メモリアドレスから一意に決定される。そのため、アクセス先メモリアドレスを精査することによってキャッシュの置き換えが発生する可能性の有無を検証することができる。
(4)コア間通信で使用中であるかどうかは、コア間通信で使用するキャッシュラインとワード位置を特定し、そのキャッシュラインで使用中のワード状態記憶部のワード状態W(i)を監視する事で判定することができる。コア間通信で使用中のW(i)は必ず1以上の値を持ち、コア間通信が完了した場合にはW(i)は0となる。
In the embodiment of the present invention, exclusive control focusing on cache line replacement conditions in a cache memory system is performed. Specifically, exclusive control is performed in consideration of the following technical features.
(1) The event that a cache line used in inter-core communication is replaced by another process is due to a cache allocation process performed at the time of a cache miss.
(2) The memory access is permitted only when it can be ensured that the cache line is not replaced by the memory access. On the other hand, when it is not possible to guarantee that the replacement of the cache line does not occur, the event that the cache line is replaced can be prevented by suppressing the memory access.
(3) There are various allocation methods for cache allocation that occurs at the time of a cache miss, but in the direct-mapped cache operation, the cache entry that is replaced at the time of a cache miss is uniquely determined from the physical memory address. Therefore, it is possible to verify the possibility of cache replacement by examining the access destination memory address.
(4) To determine whether or not the communication is in use between cores, the cache line and the word position used in the communication between cores are specified, and the word state W (i) of the word state storage unit being used in the cache line is monitored. It can be judged by doing. W (i) in use in inter-core communication always has a value of 1 or more, and W (i) becomes 0 when inter-core communication is completed.
以下に本発明を実施するための形態について図面を参照して説明する。 EMBODIMENT OF THE INVENTION Below, the form for implementing this invention is demonstrated with reference to drawings.
尚、実施の形態は例示であり、開示の装置及びシステムは、以下の実施の形態の構成には限定されない。
(第1の実施形態)
図1は、本発明のキャッシュメモリ制御装置の第1の実施形態の構成を示すブロック図である。
The embodiments are examples, and the disclosed apparatus and system are not limited to the configurations of the following embodiments.
(First embodiment)
FIG. 1 is a block diagram showing the configuration of the first embodiment of the cache memory control device of the present invention.
第1の実施形態のキャッシュメモリ制御装置100は、コア間通信領域情報登録部110、分解要素情報生成手段120およびアクセス排他制御手段130を含んで構成される。
The cache
コア間通信領域情報登録部110は、マルチコアプロセッサのコア間通信で使われているキャッシュメモリ領域を示す物理メモリアドレスとワード状態記憶情報とからなるコア間通信領域情報を登録する。該物理メモリアドレスは、マルチコアプロセッサのコア間通信で使われているキャッシュメモリ領域を一意に特定する要素に分解されて登録されている。また、ワード状態記憶情報は、該キャッシュメモリ領域のコア間通信での使用状態を示す情報である。
The inter-core communication area
分解要素情報生成手段120は、キャッシュメモリ(不図示)へのアクセス前に、メモリアクセス先を特定する物理メモリアドレスを入力して、入力した該物理メモリアドレスを前記の要素に分解して分解要素情報を生成する。 The disassembly element information generation means 120 inputs a physical memory address specifying a memory access destination before accessing a cache memory (not shown), disassembles the input physical memory address into the above elements, and disassembles the element. Generate information.
アクセス排他制御手段130は、生成した分解要素情報を登録されているコア間通信領域情報と比較する。そして、キャッシュメモリへのアクセスを許可した場合に、コア間通信で使われているキャッシュメモリ領域が参照され、かつ、キャッシュミスが確定する条件の比較結果を得た場合に、キャッシュメモリへのアクセスを不許可と判定して通知する。
The access
図2は、本発明のキャッシュメモリ制御方法の第1の実施形態の動作を示すフロー図である。 FIG. 2 is a flowchart showing the operation of the first embodiment of the cache memory control method of the present invention.
まず、マルチコアプロセッサのコア間通信で使われているキャッシュメモリ領域を特定する物理メモリアドレスとワード状態記憶情報とからなるコア間通信領域情報を登録する(S101)。該物理メモリアドレスは、マルチコアプロセッサのコア間通信で使われているキャッシュメモリ領域を一意に特定する要素に分解されて登録されている。また、ワード状態記憶情報は、該キャッシュメモリ領域のコア間通信での使用状態を示す情報である。 First, inter-core communication area information including a physical memory address for specifying a cache memory area used for inter-core communication of a multi-core processor and word state storage information is registered (S101). The physical memory address is decomposed and registered into elements that uniquely specify a cache memory area used for inter-core communication of the multi-core processor. The word state storage information is information indicating the use state of the cache memory area in the inter-core communication.
キャッシュメモリへのアクセス前に、メモリアクセス先を特定する物理メモリアドレスを入力して、入力した該物理メモリアドレスを前記の要素に分解して分解要素情報を生成する(S102)。 Before accessing the cache memory, a physical memory address for specifying a memory access destination is input, and the input physical memory address is decomposed into the above elements to generate decomposed element information (S102).
分解要素情報をコア間通信領域情報と比較する(S103)。 The disassembly element information is compared with the inter-core communication area information (S103).
キャッシュメモリへのアクセスを許可した場合に、コア間通信で使われているキャッシュメモリ領域が参照され、かつ、キャッシュミスが確定する条件の比較結果を得た場合に、キャッシュメモリへのアクセスを不許可と判定して通知する(S104)。 When access to the cache memory is permitted, the cache memory area used for inter-core communication is referenced, and access to the cache memory is disabled when the comparison result of the condition for determining the cache miss is obtained. It determines with permission and notifies (S104).
このように、本実施形態では、キャッシュメモリにおけるコア間通信が行われる領域が、コア間通信領域情報として登録され、管理されている。このコア間通信領域情報は、コア間通信で使われているキャッシュメモリ領域を一意に特定する要素に分解した物理メモリアドレスと該キャッシュメモリ領域のコア間通信での使用状態を示す情報であるワード状態記憶情報より成る。 As described above, in the present embodiment, an area where inter-core communication is performed in the cache memory is registered and managed as inter-core communication area information. This inter-core communication area information is a word that is a physical memory address that is decomposed into elements that uniquely identify a cache memory area used in inter-core communication and information indicating the use state of the cache memory area in inter-core communication. Consists of state storage information.
そこで、キャッシュメモリへのアクセスが行なわれる前に、該アクセスによるメモリアクセス先を特定する物理メモリアドレスを入力し、該物理メモリアドレスをデコードして分解要素情報を生成する。分解要素情報は、コア間通信領域情報が含む物理メモリアドレスと同じ要素の情報を含むものである。そのため、分解要素情報をコア間通信領域情報と比較することで、該アクセスによるコア間通信で使われているキャッシュメモリ領域への影響を評価することができる。 Therefore, before the cache memory is accessed, a physical memory address for specifying a memory access destination by the access is input, and the physical memory address is decoded to generate decomposition element information. The disassembly element information includes information of the same element as the physical memory address included in the inter-core communication area information. Therefore, by comparing the disassembly element information with the inter-core communication area information, it is possible to evaluate the influence on the cache memory area used for the inter-core communication by the access.
従って、該アクセスを許可した場合に、コア間通信で使われているキャッシュメモリ領域が参照され、かつ、キャッシュミスが確定する条件の比較結果を得た場合に、該アクセスを不許可と判定して通知する。 Therefore, when the access is permitted, the cache memory area used in the inter-core communication is referred to, and when the comparison result of the condition for determining the cache miss is obtained, it is determined that the access is not permitted. To notify.
以上のように構成した本実施形態は、物理メモリアドレスを基にコア間通信で使われているキャッシュラインとワード状態を管理することで排他制御を行い、キャッシュラインが置き換えられる事象を伴うメモリアクセスを事前に抑止することができる。
(第2の実施形態)
図3乃至図9を参照して第2の実施形態を説明する。
In this embodiment configured as described above, exclusive control is performed by managing the cache line and the word state used in inter-core communication based on the physical memory address, and the memory access accompanied by the event that the cache line is replaced Can be deterred in advance.
(Second Embodiment)
The second embodiment will be described with reference to FIGS.
図3は、本発明のキャッシュメモリ制御装置の第2の実施形態の構成を示すブロック図である。 FIG. 3 is a block diagram showing the configuration of the second embodiment of the cache memory control apparatus of the present invention.
第2の実施形態のキャッシュメモリ制御装置200は、図13を参照して説明したキャッシュメモリシステムのCPU1とキャッシュメモリ2との間に位置して機能する。
The cache
つまり、CPU1の各コアのアプリケーションがメモリアクセスする際には必ずキャッシュメモリ制御装置200にアクセスして、メモリアクセスの可/不可を判定してもらう。そして、該アプリケーションは、メモリアクセス可と通知された場合だけ、キャッシュメモリ2にアクセスして通常のメモリアクセスを行う。一方、メモリアクセス不可と通知された場合、該アプリケーションは、メモリアクセスのリトライを行うとか、アクセスが競合しない別の領域へアクセスする等の代替処理を実行する。
That is, whenever the application of each core of the
なお、キャッシュメモリ制御装置200は、ハードウェア(HW)として実装してもよいし、ソフトウェア(SW)として実装してもよい。キャッシュメモリ制御装置200をHWで実装する場合には、CPU1とキャッシュメモリ2との間に位置して機能する限りにおいて、CPU1、キャッシュメモリ2のいずれの内部要素として構成してもかまわない。また、ライブラリなどのSWとして実装する場合には、CPU1が実行するプログラムとして構成する。
Note that the cache
キャッシュメモリ制御装置200は、図3に示すように、コア間通信領域管理部210とアクセス排他制御部220を含む構成となっている。
As shown in FIG. 3, the cache
コア間通信領域管理部210は、コア間通信領域情報登録部211、アドレス分解情報生成部212および比較判定部213を含む構成となっている。
The inter-core communication area management unit 210 includes an inter-core communication area
コア間通信領域情報登録部211は、第1の実施形態におけるコア間通信領域情報登録部110に相当する。コア間通信領域情報登録部211には、キャッシュメモリ2におけるコア間通信で使われているキャッシュメモリ領域に関するコア間通信領域情報が現在実行されているコア間通信ごとにリストとして登録されている。
The inter-core communication area
コア間通信領域情報は、コア間通信で使われているキャッシュメモリ領域を特定する物理メモリアドレスと該キャッシュメモリ領域のコア間通信での使用状態を示すワード状態記憶情報より成る。この物理メモリアドレスは、キャッシュメモリ領域を一意に特定する要素に分解されて登録されている。具体的には、タグ、インデックスおよびバイトオフセットの各要素に分解されている。コア間通信領域情報の詳細については図4を参照して後述する。 The inter-core communication area information includes a physical memory address that identifies a cache memory area used in inter-core communication and word state storage information that indicates a use state of the cache memory area in inter-core communication. This physical memory address is divided and registered into elements that uniquely specify the cache memory area. Specifically, it is decomposed into each element of a tag, an index, and a byte offset. Details of the inter-core communication area information will be described later with reference to FIG.
コア間通信領域情報は、コア間通信の開始時に各コアのアプリケーションから入力されるコア間通信領域情報登録要求に基づいて生成され、コア間通信中に更新され、コア間通信の終了で削除される。このコア間通信領域情報の生成、更新、削除は、アクセス排他制御部220からの指示により、コア間通信領域管理部210が実行する。
The inter-core communication area information is generated based on the inter-core communication area information registration request input from the application of each core at the start of the inter-core communication, updated during the inter-core communication, and deleted at the end of the inter-core communication. The The generation, update, and deletion of the inter-core communication area information is executed by the inter-core communication area management unit 210 according to an instruction from the access
アドレス分解情報生成部212は、各コアのアプリケーションから入力したアクセス先の物理メモリアドレスをデコードしてアドレス分解情報を生成する。アドレス分解情報生成部212は第1の実施形態における分解要素情報生成手段120に相当し、アドレス分解情報は第1の実施形態における分解要素情報に相当する。
The address resolution
そして、比較判定部213は、アドレス分解情報生成部212が生成したアドレス分解情報とコア間通信領域情報のインデックスをそれぞれ比較して1次比較の制御を行う。1次比較とは、アプリケーションのメモリアクセス先がキャッシュメモリ2にエントリされているか否かを判定するために、コア間通信領域情報登録部211に登録されているコア間通信領域情報のエントリを検索することである。このとき使用される検索キーがインデックスである。
Then, the comparison /
なお、各コアのアプリケーションからはメモリアクセス命令の種別を示す命令情報よびコアを特定するためのコア情報も入力されて後述する処理で使用される。また、コア間通信の開始時にはコア間通信領域情報登録要求がアプリケーションから入力される。 It should be noted that instruction information indicating the type of memory access instruction and core information for specifying the core are also input from the application of each core and used in the processing described later. Further, at the start of inter-core communication, an inter-core communication area information registration request is input from the application.
実際のアクセス排他制御は、後述するようにアクセス排他制御部220で実行されるので、物理メモリアドレス以外の入力情報(命令情報、コア情報、コア間通信領域情報登録要求)をアクセス排他制御部220に直接通知するように構成してもよい。ここでは、アプリケーションから入力するすべての情報はコア間通信領域管理部210で受信し、コア間通信領域管理部210から必要な情報をアクセス排他制御部220に通知するように構成されているものとする。
Since the actual access exclusive control is executed by the access
コア間通信領域管理部210は、アドレス分解情報とコア間通信領域情報との1次比較の比較判定結果と、アプリケーションから入力した命令情報、コア情報等をアクセス排他制御部220に渡す。
The inter-core communication area management unit 210 passes the comparison determination result of the primary comparison between the address resolution information and the inter-core communication area information, instruction information input from the application, core information, and the like to the access
アクセス排他制御部220は、比較判定制御部221を含み、1次比較の比較判定結果や後述する2次比較、3次比較の制御を実行して、アプリケーションが行なおうとしているメモリアクセスの可否の判定結果をアプリケーションに通知する。
The access
また、比較判定制御部221の制御の結果、コア間通信領域情報の登録(生成)、更新または削除が必要な場合には、コア間通信領域管理部210にその旨が通知さる。コア間通信領域管理部210は、その通知を受けて、コア間通信領域情報登録部211の内容の変更を行なう。
If the comparison /
なお、比較判定部213および比較判定制御部221が第1の実施形態におけるアクセス排他制御手段130に相当する。
The
ここで、本実施形態におけるメモリアクセス排他制御の原理について説明する。 Here, the principle of exclusive memory access control in this embodiment will be described.
本実施形態におけるメモリアクセス排他制御は2つの事象を検証することで実現される。1つ目は、アプリケーションがアクセス対象とするキャッシュメモリ領域(キャッシュラインとワード)がコア間通信で使用中であるかどうかを検証する。そして2つ目は、コア間通信で使用しているキャッシュラインがそのコア間通信と関係の無いメモリアクセスによって置き換えられないか否かを検証する。 The memory access exclusion control in this embodiment is realized by verifying two events. First, it is verified whether or not the cache memory area (cache line and word) to be accessed by the application is being used for inter-core communication. Second, it is verified whether or not the cache line used in the inter-core communication is not replaced by a memory access unrelated to the inter-core communication.
キャッシュラインとワードがコア間通信で使用中であるか否かを検証するために以下の3種類の情報に着目する。 In order to verify whether or not the cache line and the word are being used for inter-core communication, attention is paid to the following three types of information.
情報1:コア間通信で使用しているキャッシュラインおよびワード位置、情報2:コア間通信で使用しているワードの状態を示すワード状態W(i)の値、そして、情報3:キャッシュミス時に置き換えられるキャッシュラインおよびワード位置。 Information 1: Cache line and word position used in communication between cores, Information 2: Value of word state W (i) indicating the state of word used in communication between cores, and Information 3: At cache miss The cache line and word position to be replaced.
上記の情報1と情報2については、コア間通信の開始時にコア間通信で使うキャッシュラインの情報を記録する事で、使用中である事を周知できる。また、キャッシュライン上のワード状態を参照する事で、コア間通信の終了を判定することができる。
As for the
つまり、上記の情報1と情報2の条件を満たすために、コア間通信中であることを判定するための記録情報であるコア間通信領域情報を具備する。前述のように、このコア間通信領域情報はコア間通信領域管理部210に配備される。つまり、コア間通信領域管理部210には、キャッシュメモリ2においてコア間通信で使用されているキャッシュメモリ領域の情報が管理されている。
That is, in order to satisfy the conditions of the
図4は、コア間通信で使われているキャッシュメモリ領域を管理するコア間通信領域情報のフォーマットを示す図である。 FIG. 4 is a diagram showing a format of inter-core communication area information for managing a cache memory area used for inter-core communication.
コア間通信領域情報は、コア間通信で使用しているキャッシュラインおよびワード位置を特定する情報、およびコア間通信で使用しているワードの使用状態を示すワード状態記憶情報を含むフォーマットとなっている。なお、ワード状態記憶情報は前述したワード状態W(i)の値を記憶するフィールドである。 The inter-core communication area information has a format including information for specifying a cache line and a word position used in inter-core communication, and word state storage information indicating a use state of a word used in inter-core communication. Yes. The word state storage information is a field for storing the value of the word state W (i) described above.
コア間通信で使用しているキャッシュラインおよびワード位置を特定する情報として、物理メモリアドレスが、タグ、インデックス、バイトオフセットの各要素に分解されている。つまり、物理メモリアドレスはタグ、インデックス、バイトオフセットの要素に分解され各要素の情報から、キャッシュメモリ2上のキャッシュラインおよびワード位置が一意に特定される。例えば、インデックスは図14におけるアドレスアレイ11のエントリを検索する情報に相当し、タグは比較器16に入力される上位mビット13(キャッシュ内タグ情報)に相当して、キャッシュヒットまたはキャッシュミスの比較判断が可能である。また、バイトオフセットはキャッシュラインの中のワードを特定する情報である。
As information for specifying a cache line and a word position used in inter-core communication, a physical memory address is decomposed into elements of a tag, an index, and a byte offset. That is, the physical memory address is decomposed into elements of a tag, an index, and a byte offset, and the cache line and word position on the
ワード状態記憶情報のワード状態W(i)は、物理メモリアドレスで特定されるキャッシュラインのワードがコア間通信で使用されている場合、そのワードの使用状態をワード状態W(i)の値で示すものである。ワード状態W(i)の値は、コア間通信における送信時には送信コアに対応するビットが0、受信コアに対応するビットが1に設定され、受信時には受信コアに対応するビットが0に設定される。したがって、全受信コアによる受信が完了すると、ワード状態W(i)の値は全ビットが0となる。 The word state W (i) of the word state storage information indicates the use state of the word by the value of the word state W (i) when the word of the cache line specified by the physical memory address is used for inter-core communication. It is shown. As for the value of the word state W (i), the bit corresponding to the transmission core is set to 0 at the time of transmission in inter-core communication, the bit corresponding to the reception core is set to 1, and the bit corresponding to the reception core is set to 0 at the time of reception. The Accordingly, when the reception by all the receiving cores is completed, the value of the word state W (i) becomes 0 in all bits.
一方、上記の情報3は、各コアで動作しているアプリケーションのアクセス先となる物理メモリアドレスをデコードする事で取得することができる。
On the other hand, the
アプリケーションから入力する物理メモリアドレスは、コア間通信領域情報の物理メモリアドレスと同様に、タグ、インデックス、バイトオフセットの要素に分解されたアドレス分解情報となる。アドレス分解情報のこれらの要素から、キャッシュメモリ2におけるキャッシュラインおよびワード位置が一意に決定される。
Similar to the physical memory address of the inter-core communication area information, the physical memory address input from the application is address decomposition information that is decomposed into elements of a tag, an index, and a byte offset. From these elements of the address resolution information, the cache line and word position in the
また、コア間通信で使用しているキャッシュラインがコア間通信と関係の無いメモリアクセスによって置き換えられないか否かの検証は、コア間通信領域情報とアプリケーションから入力するアクセス先となる物理メモリアドレスを比較することで行われる。 In addition, whether or not the cache line used for inter-core communication is replaced by memory access unrelated to inter-core communication is determined by checking the inter-core communication area information and the physical memory address that is the access destination input from the application It is done by comparing.
つまり、コア間通信領域情報と入力した物理メモリアドレスのアドレス分解情報とを比較する事で、キャッシュメモリにアクセスした場合のキャッシュヒット/キャッシュミスを事前に判定することができる。 That is, by comparing the inter-core communication area information with the address resolution information of the input physical memory address, it is possible to determine in advance a cache hit / cache miss when the cache memory is accessed.
図5は、キャッシュラインの置き換え有無の判定例を示す図である。 FIG. 5 is a diagram illustrating an example of determining whether or not a cache line is replaced.
つまり、コア間通信領域情報と入力した物理メモリアドレスのそれぞれのタグ、インデックス、バイトオフセットを比較した結果と、その際にキャッシュラインの置き換えが有るか無いかの判定を、ケース1乃至ケース8の例について示したものである。各要素について、一致している場合を「○」、不一致であった場合を「×」として示している。 That is, the result of comparing the inter-core communication area information and each tag, index, and byte offset of the input physical memory address and the determination of whether or not there is a cache line replacement at that time are as follows. An example is shown. For each element, a match is indicated as “◯”, and a mismatch is indicated as “x”.
図5を参照すると、ケース1、ケース2、ケース5およびケース6では、インデックスが一致していない。このことは、アプリケーションから入力した物理メモリアドレスは、コア間通信で使用しているキャッシュラインとは異なるキャッシュラインを参照する事を意味する。そのため、これらのケースの場合は、コア間通信で使用されているキャッシュラインは置き換えられないと判定できる。
Referring to FIG. 5, the indexes of
ケース7とケース8の場合は、インデックスおよびタグが一致する。そのため、アプリケーションから入力した物理メモリアドレスがコア間通信で使用しているキャッシュラインに対応することで、キャッシュヒットが確定する。よって、コア間通信で使用されているキャッシュライン上のデータブロックに対してストア命令(store)や読出し命令(read)などの処理が行われ、キャッシュラインの置き換えは発生しないと判定できる。
In
ケース3とケース4の場合は、インデックスが一致し、タグが不一致である。そのため、キャッシュミスが確定する。しかも、インデックスが一致しているため、キャッシュメモリ2に対するこのメモリアクセスを許容するとコア間通信で使用しているキャッシュラインが置き換えられると判定できる。
In
以上のように、コア間通信領域情報と入力した物理メモリアドレスのそれぞれのタグ、インデックス、バイトオフセットを比較する。そして、その比較結果に基づいて、キャッシュミスが発生した場合にコア間通信で使用されているキャッシュラインおよびワードが上書きされるか否かが判定される。図5を参照して説明した例では、インデックスが一致し、タグが一致しないケース3とケース4の場合を除いては、コア間通信で使用されているキャッシュラインおよびワードが置き換えられない事が保障される。
As described above, each tag, index, and byte offset of the inter-core communication area information and the input physical memory address are compared. Based on the comparison result, it is determined whether or not the cache line and the word used in the inter-core communication are overwritten when a cache miss occurs. In the example described with reference to FIG. 5, the cache lines and words used in inter-core communication may not be replaced except in
図3に戻って、本実施形態のキャッシュメモリ制御装置100についての説明を続ける。
Returning to FIG. 3, the description of the cache
コア間通信領域管理部210は、各コアのアプリケーションからメモリアクセス先の物理メモリアドレスとその他の処理関連情報の入力を受ける。 The inter-core communication area management unit 210 receives an input of a physical memory address of a memory access destination and other processing related information from an application of each core.
物理メモリアドレスはアプリケーションが論理アドレスベースで動作していた場合には、ハードウェアや各コア上で動作しているOS(Operating System)のシステムコールなどにより実現する。例えばOSのシステムコールを用いた場合では、OS上で動作するプロセスの論理アドレスからvirt_to_phys関数などを用いて、物理メモリアドレスを得ることができる。物理メモリアドレスベースで動作するアプリケーションの場合は、論理アドレスから物理メモリアドレスを計算する必要はない。 The physical memory address is realized by an OS (Operating System) system call running on hardware or each core when the application is operating on a logical address basis. For example, when an OS system call is used, a physical memory address can be obtained from a logical address of a process operating on the OS using a virt_to_phys function or the like. For applications that operate on a physical memory address basis, it is not necessary to calculate the physical memory address from the logical address.
その他の処理関連情報としては、前述したように、メモリアクセス命令の種別を示す命令情報よびコアを特定するためのコア情報、さらにコア間通信の開始時にはコア間通信領域情報登録要求がある。 As other processing-related information, as described above, there are command information indicating the type of memory access command, core information for specifying a core, and an inter-core communication area information registration request at the start of inter-core communication.
前述のように、コア間通信領域管理部210は、キャッシュメモリ2におけるコア間通信領域を管理する情報としてコア間通信領域情報をコア間通信領域情報登録部211にリストとして登録して管理している。そして、図4を参照して説明したように、コア間通信領域情報は、物理メモリアドレスから生成したタグ、インデックス、バイトオフセットの情報およびコア間通信で使用しているワードの状態を示すワード状態記憶情報のワード状態W(i)の値を含む。
As described above, the inter-core communication area management unit 210 registers and manages the inter-core communication area information as a list in the inter-core communication area
コア間通信領域管理部210は、アドレス分解情報生成部212によりアプリケーションから入力した物理メモリアドレスをデコードして、タグ、インデックス、バイトオフセットの各要素に分解したアドレス分解情報を取得する。
The inter-core communication area management unit 210 decodes the physical memory address input from the application by the address resolution
コア間通信領域管理部210は、比較判定部213によりコア間通信領域情報登録部211のリストの各エントリについて、インデックスを比較する1次比較の判定を行う。つまり、比較判定部213は、コア間通信領域情報登録部211のリストに、入力した物理メモリアドレスをデコードして得られたインデックスと一致するエントリが有るか否かを検索する。
In the inter-core communication area management unit 210, the
比較判定部213は1次比較結果をアクセス排他制御部220に通知する。
The
インデックスが一致するエントリが存在した場合、1次比較結果として、一致エントリが存在した旨と、そのエントリの登録情報、入力した物理メモリアドレスのアドレス分解情報およびその他の処理関連情報が通知される。なお、エントリの登録情報はコア間通信領域情報であり、コア間通信により使用されているキャッシュメモリ領域に関する情報である。 When there is an entry with matching index, the fact that there is a matching entry, registration information of the entry, address resolution information of the input physical memory address, and other processing related information are notified as a primary comparison result. Note that the registration information of the entry is inter-core communication area information, and is information related to the cache memory area used for inter-core communication.
また、インデックスが一致するエントリが存在しなかった場合、1次比較結果として、一致エントリが存在しない旨と、入力した物理メモリアドレスのアドレス分解情報およびその他の処理関連情報が通知される。なお、コア間通信がまったく行われておらず、コア間通信領域情報登録部211に登録エントリが存在しない場合にも、同様の1次比較結果がアクセス排他制御部220に通知される。
If there is no entry with the matching index, the primary comparison result is notified that there is no matching entry, and the address resolution information of the input physical memory address and other processing related information. Note that the same primary comparison result is also notified to the access
アクセス排他制御部220は、コア間通信領域管理部210から通知された1次比較結果の諸情報に基づいて、アクセス可否の判定およびコア間通信領域情報のリスト追加、更新、削除を判定するアクセス排他制御を実行する。アクセス排他制御部220では、比較判定制御部221がこれらのアクセス排他制御を実行する。
The access
まず、入力した物理メモリアドレスをデコードして得られたインデックスと一致するエントリがコア間通信領域情報登録部211のリストに存在しなかった旨の情報をコア間通信領域管理部210から受け取った場合の処理を説明する。
First, when information indicating that an entry matching the index obtained by decoding the input physical memory address does not exist in the list of the inter-core communication area
このことは、アプリケーションがアクセス対象としているキャッシュラインは、現在コア間通信で使用しているキャッシュラインとは異なることを意味している。そのため、比較判定制御部221はコア間通信用の領域がキャッシュから追い出される事は無いと判定し、アクセス可能と判定する。これは、図5を参照して説明したケース1、ケース2、ケース5およびケース6に相当する。
This means that the cache line to be accessed by the application is different from the cache line currently used for inter-core communication. Therefore, the comparison
このとき、アクセス排他制御部220がコア間通信領域情報登録要求を受け取っていた場合、比較判定制御部221は、新たなコア間通信の発生と判断してコア間通信領域情報のリストの追加を行う。なお、この場合のアクセス命令はストア命令(store)である。
At this time, if the access
比較判定制御部221は、物理メモリアドレスのアドレス分解情報のタグ、インデックス、バイトオフセットをコア間通信領域情報のリストに追加するようにコア間通信領域管理部210に指示する。また、登録したエントリのワード状態記憶部情報のワード状態W(i)の値を、コア情報に基づいて、登録要求したコアに対応するビットを0、その他のコアに対応するビットを1に設定する旨を指示する。
The comparison
コア間通信領域管理部210では、比較判定部213がこれらの指示を受け取り、指示された内容のコア間通信領域情報をコア間通信領域情報登録部211に新たなエントリとして追加する。
In the inter-core communication area management unit 210, the comparison /
次に、入力した物理メモリアドレスをデコードして得られたインデックスと一致するエントリがコア間通信領域情報登録部211のリストに存在した旨の情報をコア間通信領域管理部210から受け取った場合の処理を説明する。
Next, when information indicating that an entry matching the index obtained by decoding the input physical memory address exists in the list of the inter-core communication area
この場合、比較判定制御部221は、1次比較結果を受けて2次比較の制御を実行する。
In this case, the comparison
比較判定制御部221は、2次比較の制御として、入力した物理メモリアドレスのアドレス分解情報のタグとエントリの登録情報に含まれるタグとを比較し、両者のタグの一致/不一致を判定する。
As a comparison of the secondary comparison, the comparison
2次比較の結果、両者のタグが一致した場合はキャッシュヒットが確定する。そのため、アプリケーションがその領域にアクセスしたとしても、コア間通信用の領域がキャッシュから追い出される事は無いと判定し、アクセス排他制御部120はアクセス可能と判定する。これは、図5を参照して説明したケース7とケース8に相当する。
As a result of the secondary comparison, if both tags match, a cache hit is determined. Therefore, even if the application accesses the area, it is determined that the area for inter-core communication is not evicted from the cache, and the access
このとき、コア間通信領域管理部210から受け取った命令情報がロードアンドインバリデート命令(load and invalidate)であった場合、比較判定制御部221は、バイトオフセットを比較する3次比較の制御を更に実行する。この3次比較により、アクセスするワード位置までの一致/不一致が判定される。
At this time, when the instruction information received from the inter-core communication area management unit 210 is a load and invalidate instruction (load and invalidate), the comparison
3次比較の結果、バイトオフセットが一致した場合は、該メモリアクセスがアプリケーションによるコア間通信の受信処理と判定できる。そのため、比較判定制御部221はエントリの登録情報に含まれるワード状態記憶部の情報更新をコア間通信領域管理部210に指示する。このとき、エントリの登録情報に含まれるワード状態記憶部情報のワード状態W(i)の値は、コア情報に基づいて該コアに対応するビットが0に設定される。なお、更新後のワード状態W(i)の値がオール0となる場合は、該エントリをリストから削除するようにコア間通信領域管理部210に指示する。
If the byte offsets match as a result of the third comparison, it is possible to determine that the memory access is a reception process for inter-core communication by the application. Therefore, the comparison
コア間通信領域管理部210では、比較判定部213がこれらの指示を受け取り、コア間通信領域情報登録部211の該当エントリの登録情報の更新または削除を行う。
In the inter-core communication area management unit 210, the
なお、3次比較の結果、バイトオフセットが一致しなかった場合には何もしない。 If the byte offset does not match as a result of the third comparison, nothing is done.
また、2次比較の結果、アプリケーションがアクセスしようとしているアドレスのタグとコア間通信領域情報のリストのエントリ内のタグとが一致しない場合はキャッシュミスが確定する。この場合、メモリアクセスを行うと、キャッシュミスによるキャッシュラインの置き換えが発生する。そのため、この事象はコア間通信の速度低下を招くので、比較判定制御部221はアクセス不可と判定する。これは、図5を参照して説明したケース3とケース4に相当する。
As a result of the secondary comparison, if the tag of the address that the application is trying to access does not match the tag in the entry in the inter-core communication area information list, a cache miss is determined. In this case, when a memory access is performed, replacement of a cache line due to a cache miss occurs. For this reason, since this event causes a decrease in the speed of inter-core communication, the comparison
アクセス排他制御部220は、上述したアクセス可または不可の判定をアプリケーションに通知する。この通知はアクセス排他制御部220から直接アプリケーションに通知されてもよいし、コア間通信領域管理部210を介して通知されてもよい。
The access
上述した機能を有するコア間通信領域管理部210の動作およびアクセス排他制御部220の動作をそれぞれ図6および図7に示す。
The operation of the inter-core communication area management unit 210 having the above-described function and the operation of the access
図6は、本実施形態のキャッシュメモリ制御装置200のコア間通信領域管理部210の動作を示すフロー図である。また、図7は、本実施形態のキャッシュメモリ制御装置200のアクセス排他制御部220の動作を示すフロー図である。
FIG. 6 is a flowchart showing the operation of the inter-core communication area management unit 210 of the cache
図6を参照すると、コア間通信領域管理部210は、アプリケーションからメモリアクセス先の物理メモリアドレスとその他の処理関連情報の入力を受け、該物理メモリアドレスのデコードを行う(S201)。物理メモリアドレスのデコードにより、タグ、インデックス、バイトオフセットの各要素に分解したアドレス分解情報が得られる。その他の処理関連情報には、前述したように、命令情報よびコア情報、さらにコア間通信の開始時にはコア間通信領域情報登録要求がある。 Referring to FIG. 6, the inter-core communication area management unit 210 receives the physical memory address of the memory access destination and other processing related information from the application, and decodes the physical memory address (S201). By decoding the physical memory address, address decomposition information decomposed into each element of tag, index, and byte offset can be obtained. As described above, the other processing related information includes command information and core information, and an inter-core communication area information registration request at the start of inter-core communication.
コア間通信領域管理部210は、コア間通信領域情報登録部211にリストとして登録して管理しているコア間通信領域情報のエントリを1つ取得する(S202)。ここで取得するエントリは、1次比較がまだ行われていない未検査のエントリである。 The inter-core communication area management unit 210 acquires one entry of the inter-core communication area information registered and managed as a list in the inter-core communication area information registration unit 211 (S202). The entry acquired here is an untested entry that has not yet been subjected to the primary comparison.
このとき、コア間通信がまったく行われておらず、取得すべきエントリがコア間通信領域情報登録部211に登録されていない場合は、ステップS203の判断において、取得エントリ無しとしてステップS205の処理に進む。
At this time, if the inter-core communication is not performed at all and the entry to be acquired is not registered in the inter-core communication area
コア間通信領域管理部210は、コア間通信領域情報登録部211に登録エントリが存在しない場合の処理として、エントリ無し判定を1次比較結果としてアクセス排他制御部220に通知する(S205)。また、このときは、入力した物理メモリアドレスのアドレス分解情報およびその他の処理関連情報もアクセス排他制御部220に通知される(S206)。
The inter-core communication area management unit 210 notifies the access
一方、コア間通信領域情報登録部211から未検査のエントリが1つ取得できた場合(S203、有)、該エントリの登録情報に含まれるインデックスが、アドレス分解情報に含まれるインデックスと一致するか否かが判定される(S204)。 On the other hand, if one uninspected entry can be acquired from the inter-core communication area information registration unit 211 (Yes in S203), does the index included in the registration information of the entry match the index included in the address resolution information? It is determined whether or not (S204).
ステップS204の判定において、インデックスが不一致であった場合は、ステップS202の処理に戻り、コア間通信領域情報登録部211から別の未検査エントリを1つ取得して、ステップS203、S204の処理を繰り返す。
If the index does not match in the determination in step S204, the process returns to step S202, and another uninspected entry is acquired from the inter-core communication area
ステップS202、S203、S204の処理を繰り返した結果、コア間通信領域情報登録部211から取得できる未検査エントリがなくなった場合(S203、無)には、ステップS205の処理に進む。 As a result of repeating the processes of steps S202, S203, and S204, when there are no unexamined entries that can be acquired from the inter-core communication area information registration unit 211 (S203, none), the process proceeds to step S205.
コア間通信領域管理部210は、コア間通信領域情報登録部211にインデックスが一致するエントリが存在しないと判定した場合の処理として、エントリ無し判定を1次比較結果としてアクセス排他制御部220に通知する(S205)。また、このときは、入力した物理メモリアドレスのアドレス分解情報およびその他の処理関連情報もアクセス排他制御部220に通知される(S206)。
The inter-core communication area management unit 210 notifies the access
ステップS204の判定でインデックスが一致するエントリがあった場合、コア間通信領域管理部210は、エントリあり判定を1次比較結果としてアクセス排他制御部220に通知する(S207)。また、このときは、インデックスが一致するエントリの登録情報、入力した物理メモリアドレスのアドレス分解情報およびその他の処理関連情報もアクセス排他制御部220に通知される(S208)。
If there is an entry with the matching index in the determination in step S204, the inter-core communication area management unit 210 notifies the access
以上が、本実施形態のコア間通信領域管理部210の動作である。 The above is the operation of the inter-core communication area management unit 210 of the present embodiment.
次に、アクセス排他制御部220の動作を説明する。
Next, the operation of the access
図7を参照すると、アクセス排他制御部220は、まずコア間通信領域管理部210から通知された1次比較結果であるエントリ有無判定に基づく処理を行う。
Referring to FIG. 7, the access
インデックスが一致するエントリがコア間通信領域情報登録部211に登録されていないということは、アプリケーションがアクセスしようとしているキャッシュメモリ領域が、現在コア間通信で使用されていないことを意味する。そのため、ステップS211の判定がエントリ無しの場合は、ステップS212の処理が実行され、アクセスが可能と判定される。判定結果はアプリケーションに通知される。
That the entry with the matching index is not registered in the inter-core communication area
続いて、アクセス排他制御部220がコア間通信領域情報登録要求を受け取っているか否かが判定される(S213)。
Subsequently, it is determined whether or not the access
コア間通信領域情報登録要求を受け取っている場合(S213、有)、新たなコア間通信が発生したことになるので、該コア間通信が使用するキャッシュメモリ領域の管理情報としてコア間通信領域情報のリストへの追加を要する。そこで、アクセス排他制御部220は、コア間通信領域情報登録部211へのエントリの追加登録をコア間通信領域管理部210に指示する(S214)。
When the inter-core communication area information registration request has been received (S213, yes), a new inter-core communication has occurred, so the inter-core communication area information is used as management information for the cache memory area used by the inter-core communication. Needs to be added to the list. Therefore, the access
具体的には、物理メモリアドレスのアドレス分解情報のタグ、インデックス、バイトオフセットを新たなエントリとしてリストに追加するように指示する。そして、該エントリのワード状態記憶部情報フィールドのワード状態W(i)の値を、コア情報に基づいて、登録要求したコアに対応するビットを0、その他のコアに対応するビットを1に設定する旨を指示する。処理フローは図示しないが、コア間通信領域管理部210は、これらの指示を受け取り、指示された内容のコア間通信領域情報をコア間通信領域情報登録部211に新たなエントリとして追加する。
Specifically, an instruction is given to add the tag, index, and byte offset of the address resolution information of the physical memory address as a new entry to the list. Then, based on the core information, the bit corresponding to the core that requested registration is set to 0, and the bits corresponding to other cores are set to 1 based on the core information. Instruct to do so. Although the processing flow is not shown, the inter-core communication area management unit 210 receives these instructions and adds the inter-core communication area information having the instructed contents to the inter-core communication area
なお、ステップS213でコア間通信領域情報登録要求を受け取っていることを確認した場合、命令情報としてストア命令(store)を受け取っていることを確認するような処理を加えてもよい。コア間通信領域情報登録要求を受け取っていながら命令情報がストア命令(store)でない場合にはイリーガル処理が行われる。 When it is confirmed in step S213 that an inter-core communication area information registration request has been received, a process for confirming that a store instruction (store) has been received as instruction information may be added. If the instruction information is not a store instruction (store) while receiving the inter-core communication area information registration request, illegal processing is performed.
次に、インデックスが一致するエントリがコア間通信領域情報登録部211に登録されている場合(S211、有)、アドレス分解情報のタグとエントリの登録情報に含まれるタグとを比較し、両者のタグの一致/不一致を判定する(S215)。ステップS215の処理を2次比較と称する。 Next, when an entry with the matching index is registered in the inter-core communication area information registration unit 211 (Yes in S211), the address resolution information tag is compared with the tag included in the entry registration information. Tag match / mismatch is determined (S215). The process of step S215 is referred to as secondary comparison.
2次比較の結果で両者のタグが一致した場合(S215、一致)はキャッシュヒットが確定する。また、2次比較の結果でアドレス分解情報のタグとエントリの登録情報に含まれるタグとが一致しない場合(S215、不一致)はキャッシュミスが確定する。 If both tags match as a result of the secondary comparison (S215, match), a cache hit is determined. Also, if the result of the secondary comparison does not match the address resolution information tag and the tag included in the entry registration information (S215, mismatch), a cache miss is determined.
ステップS215でタグが不一致のキャッシュミスが確定する場合は、メモリアクセスを行うと、キャッシュミスによるキャッシュラインの置き換えが発生する。そのため、この事象はコア間通信の速度低下を招くので、アクセス不可能と判定され(S216)、その旨がアプリケーションに通知される。 If a cache miss with a mismatched tag is determined in step S215, a cache line replacement due to a cache miss occurs when a memory access is performed. For this reason, since this event causes a decrease in the speed of inter-core communication, it is determined that access is impossible (S216), and that is notified to the application.
ステップS215で一致のキャッシュヒットが確定する場合は、アプリケーションがその領域にアクセスしたとしても、コア間通信用の領域がキャッシュから追い出される事は無いと判定される。そのため、ステップS217においてアクセス可能と判定される。判定結果はアプリケーションに通知される。 If a matching cache hit is confirmed in step S215, it is determined that the inter-core communication area is not evicted from the cache even if the application accesses the area. Therefore, it is determined that access is possible in step S217. The determination result is notified to the application.
キャッシュヒットしてアクセス可能と判定されると、アクセス命令種別がロードアンドインバリデート命令(load and invalidate)であるかどうかが判定される(S218)。そして、ロードアンドインバリデート命令(load and invalidate)である場合は、コア間通信の受信処理であると判断して(S218、Yes)、バイトオフセットを比較する3次比較の制御を更に実行する(S219)。この3次比較により、アクセスするワード位置までの一致/不一致が判定される。 If it is determined that access is possible due to a cache hit, it is determined whether the access instruction type is a load and invalidate instruction (load and invalidate) (S218). If the instruction is a load and invalidate instruction (load and invalidate), it is determined that the process is a reception process for inter-core communication (S218, Yes), and a third-order comparison control for comparing byte offsets is further executed ( S219). By this tertiary comparison, match / mismatch up to the word position to be accessed is determined.
3次比較の結果、バイトオフセットが一致した場合は、該メモリアクセスがアプリケーションによる当該キャッシュメモリ領域を使用したコア間通信の受信処理と判定できる。そのため、アクセス排他制御部220は、エントリの登録情報に含まれるワード状態記憶部の情報更新をコア間通信領域管理部210に指示する。
As a result of the third comparison, if the byte offsets match, it can be determined that the memory access is a reception process of communication between the cores using the cache memory area by the application. Therefore, the access
具体的には、エントリの登録情報に含まれるワード状態記憶部情報フィールドのワード状態W(i)の値において、コア情報に基づくコアに対応するビットが0に設定される。なお、更新後のワード状態W(i)の値がオール0となる場合は、該エントリをリストから削除するようにコア間通信領域管理部210に指示する。 Specifically, the bit corresponding to the core based on the core information is set to 0 in the value of the word state W (i) of the word state storage unit information field included in the registration information of the entry. When the value of the updated word state W (i) is all 0, the inter-core communication area management unit 210 is instructed to delete the entry from the list.
なお、アクセス命令種別がロードアンドインバリデート命令(load and invalidate)でなかった場合や、3次比較においてバイトオフセットが一致しなかった場合には何もせず、アクセス可能がアプリケーションに通知される。 If the access instruction type is not a load and invalidate instruction (load and invalidate), or if the byte offset does not match in the third comparison, nothing is done and the application is notified that access is possible.
以上が、本実施形態のアクセス排他制御部220の動作である。
The above is the operation of the exclusive
次に、上述したキャッシュメモリ制御装置を用いた、4コアを持つマルチコアプロセッサによるコア間通信の動作例を説明する。 Next, an operation example of inter-core communication by a multi-core processor having four cores using the cache memory control device described above will be described.
まず、コア0からコア1、2、3へデータを送信する際の動作について説明する。
First, an operation when data is transmitted from the core 0 to the
図8は、第2の実施形態のキャッシュメモリ制御装置200を用いたコア間通信の送信処理の動作例を示すフロー図である。
FIG. 8 is a flowchart illustrating an operation example of transmission processing of inter-core communication using the cache
コア0上で動作しているアプリケーションがコア間通信メッセージを送付しようとする際には、物理メモリアドレス、コアID(Identification)、ストア命令(store)およびコア間通信領域情報登録要求をキャッシュメモリ制御装置200に渡す。(S221)。
When an application running on core 0 tries to send an inter-core communication message, it controls the physical memory address, core ID (Identification), store instruction (store), and inter-core communication area information registration request. Pass to
キャッシュメモリ制御装置200では、アプリケーションから渡されたアクセス先の物理メモリアドレスをコア間通信領域管理部210がデコードし、タグ、インデックス、バイトオフセットの情報に分解してアドレス分解情報を取得する(S222)。
In the cache
次に、コア間通信領域管理部210はコア間通信領域情報登録部211のリストからインデックスが一致するエントリを検索し、その結果、インデックスが一致するエントリが登録されていないことを検出する(S223)。
Next, the inter-core communication area management unit 210 searches the list of the inter-core communication area
検索の結果、インデックスが一致するエントリが登録されていないことを検出すると、コア間通信領域管理部210は、アクセス排他制御部220にその旨を通知する。その際に、アプリケーションから受信しているストア命令(store)およびコア間通信領域情報登録要求も渡される。
As a result of the search, when it is detected that the entry with the matching index is not registered, the inter-core communication area management unit 210 notifies the access
アクセス排他制御部220は、上記情報に基づいてアクセス可能の判定を行い、更に、ストア命令(store)およびコア間通信領域情報登録要求を受けていることから、コア間通信によるキャッシュメモリ領域の新たな使用と判断する(S224)。
The access
そこで、アクセス排他制御部220は、コア間通信領域情報登録部211への新たなエントリの登録をコア間通信領域管理部210に対して指示する。コア間通信領域管理部210は、アプリケーションから入力した物理メモリアドレスをデコードして得られたタグ、インデックス、バイトオフセットのアドレス分解情報をコア間通信領域情報登録部211のリストに新たなエントリとして登録する(S225)。さらに、該エントリのワード状態記憶部情報フィールドのワード状態W(i)の値を、コア0に対応するビットを0、その他のコア1、2、3に対応するビットを1に設定する。
Therefore, the access
アクセス排他制御部220は、アクセス可能の判定をコア0のアプリケーションに通知する(S226)。
The access
以上のように、キャッシュメモリ制御装置200からアクセス許可の通知を受けたコア0のアプリケーションは、キャッシュメモリ制御装置200に入力したものと同じ情報を用いてキャッシュメモリ2にアクセスする。そのため、キャッシュメモリ2におけるコア間通信で使用するメモリ領域とキャッシュメモリ制御装置200のコア間通信領域情報登録部211に登録されたエントリとが整合して管理される。
As described above, the application of the core 0 that has received the notification of access permission from the cache
次に、コア0から送られたコア間通信データをコア1、2、3が受信する際の動作について説明する。
Next, the operation when the
図9は、第2の実施形態のキャッシュメモリ制御装置200を用いたコア間通信の受信処理の動作例を示すフロー図である。
FIG. 9 is a flowchart illustrating an operation example of reception processing of inter-core communication using the cache
コア1、2、3上で動作しているアプリケーションがコア間通信メッセージを受信しようとする際には、物理メモリアドレス、コアID、ロードアンドインバリデート命令(load and invalidate)をキャッシュメモリ制御装置200に渡す(S231)。
When an application operating on the
キャッシュメモリ制御装置200では、アプリケーションから渡されたアクセス先の物理メモリアドレスをコア間通信領域管理部210がデコードし、タグ、インデックス、バイトオフセットの情報に分解してアドレス分解情報を取得する(S232)。
In the cache
次に、コア間通信領域管理部210はコア間通信領域情報登録部211のリストからインデックスが一致するエントリを検索し、その結果、インデックスが一致するエントリが登録されていることを検出する(S233)。
Next, the inter-core communication area management unit 210 searches for an entry with the matching index from the list of the inter-core communication area
検索の結果、インデックスが一致するエントリが登録されていることを検出すると、コア間通信領域管理部210は、アクセス排他制御部220にその旨を通知する。その際に、エントリの登録情報、アプリケーションから受信している物理メモリアドレスのアドレス分解情報、コアID、ロードアンドインバリデート命令(load and invalidate)も渡される。
As a result of the search, when it is detected that an entry with the matching index is registered, the inter-core communication area management unit 210 notifies the access
アクセス排他制御部220は、アドレス分解情報のタグとエントリの登録情報に含まれるタグとを比較して両者のタグが一致して、キャッシュヒットすることを検出する(S234)。
The access
続いて、アクセス排他制御部220は、メモリアクセスが読出しであるロードアンドインバリデート命令(load and invalidate)であり、コア間通信の受信処理であることを確認する(S235)。
Subsequently, the access
コア間通信の受信処理であることを確認したアクセス排他制御部220は、アドレス分解情報のバイトオフセットとエントリの登録情報に含まれるバイトオフセットとを比較して両者が一致することを確認する(S236)。
The access
以上の動作で該メモリアクセスがアプリケーションによる当該キャッシュメモリ領域を使用したコア間通信の受信処理と判定できるので、アクセス排他制御部220は、エントリの登録情報に含まれるワード状態記憶部の情報更新を行う(S237)。
With the above operation, since the memory access can be determined as a reception process of communication between cores using the cache memory area by the application, the access
具体的には、エントリの登録情報に含まれるワード状態記憶部情報フィールドのワード状態W(i)の値において、当該受信処理を行うコアに対応するビットを0に設定する。 Specifically, the bit corresponding to the core that performs the reception process is set to 0 in the value of the word state W (i) of the word state storage unit information field included in the registration information of the entry.
上記の更新の結果、更新後のワード状態W(i)の値がオール0となる場合(S238、Yes)は、該エントリをリストから削除する(S239)。 As a result of the above update, when the value of the updated word state W (i) is all 0 (S238, Yes), the entry is deleted from the list (S239).
上記のステップS237、S239の更新は、アクセス排他制御部220がコア間通信領域管理部210に指示することで実行される。
The update of steps S237 and S239 described above is executed when the access
そして、アクセス排他制御部220は、当該受信処理を行うコアのアプリケーションにアクセス可能の判定を通知する(S240)。
Then, the access
以上のように、キャッシュメモリ制御装置200からアクセス許可の通知を受けた受信処理を行うコアのアプリケーションは、キャッシュメモリ制御装置200に入力したものと同じ情報を用いてキャッシュメモリ2にアクセスする。そのため、キャッシュメモリ2におけるコア間通信で使用するメモリ領域とキャッシュメモリ制御装置200のコア間通信領域情報登録部211に登録されたエントリとが整合して管理される。
As described above, the core application that performs the reception process in response to the access permission notification from the cache
このように、本実施形態では、キャッシュメモリにおけるコア間通信が行われる領域が、コア間通信領域情報登録部に登録されて管理されている。コア間通信領域情報登録部の各エントリは、コア間通信で使われているキャッシュメモリ領域を一意に特定する要素に分解した物理メモリアドレスと該キャッシュメモリ領域のコア間通信での使用状態を示す情報であるワード状態記憶情報より成る。 As described above, in the present embodiment, an area where inter-core communication in the cache memory is performed is registered and managed in the inter-core communication area information registration unit. Each entry in the inter-core communication area information registration unit indicates a physical memory address that is decomposed into elements that uniquely identify a cache memory area used in inter-core communication and a use state of the cache memory area in inter-core communication. It consists of word state storage information which is information.
そこで、キャッシュメモリへのアクセスが行なわれる前に、該アクセスによるメモリアクセス先を特定する物理メモリアドレスを入力し、該物理メモリアドレスをデコードしてアドレス分解情報を生成する。アドレス分解情報は、コア間通信領域情報登録部の各エントリが含む物理メモリアドレスと同じ要素に分解された情報を含むものである。そのため、アドレス分解情報をコア間通信領域情報登録部の各エントリと比較することで、該アクセスによるコア間通信で使われているキャッシュメモリ領域への影響を評価することができる。 Therefore, before the cache memory is accessed, a physical memory address for specifying a memory access destination by the access is input, and the physical memory address is decoded to generate address resolution information. The address decomposition information includes information decomposed into the same elements as the physical memory address included in each entry of the inter-core communication area information registration unit. Therefore, by comparing the address resolution information with each entry in the inter-core communication area information registration unit, it is possible to evaluate the influence of the access on the cache memory area used in the inter-core communication.
従って、該アクセスを許可した場合に、コア間通信で使われているキャッシュメモリ領域が参照され、かつ、キャッシュミスが確定する条件の比較結果を得た場合に、該アクセスを不許可と判定して通知する。また、キャッシュヒットが確定する条件の比較結果を得た場合や該当するエントリが存在しない場合には、該アクセスによるコア間通信で使われているキャッシュメモリ領域への影響はないと判断する。 Therefore, when the access is permitted, the cache memory area used in the inter-core communication is referred to, and when the comparison result of the condition for determining the cache miss is obtained, it is determined that the access is not permitted. To notify. Further, when the comparison result of the condition for determining the cache hit is obtained or when the corresponding entry does not exist, it is determined that the access does not affect the cache memory area used in the inter-core communication.
以上のように構成した本実施形態は、物理メモリアドレスを基にコア間通信で使われているキャッシュラインとワード状態を管理することで排他制御を行い、キャッシュラインが置き換えられる事象を伴うメモリアクセスを事前に抑止することができる。
(第2の実施形態の変形例)
次に、図10乃至図12を参照して第2の実施形態の変形例のキャッシュメモリ制御装置を説明する。
In this embodiment configured as described above, exclusive control is performed by managing the cache line and the word state used in inter-core communication based on the physical memory address, and the memory access accompanied by the event that the cache line is replaced Can be deterred in advance.
(Modification of the second embodiment)
Next, a cache memory control apparatus according to a modification of the second embodiment will be described with reference to FIGS.
第2の実施形態のキャッシュメモリ制御装置200においては、コア間通信領域情報登録部211がコア間通信領域管理部210に含まれ、その更新は、アクセス排他制御部220からの指示に基づいて行われた。
In the cache
図10は、第2の実施形態の変形例のキャッシュメモリ制御装置300の構成を示すブロック図である。
FIG. 10 is a block diagram illustrating a configuration of a cache
第2の実施形態の変形例のキャッシュメモリ制御装置300においては、コア間通信領域情報登録部211に相当するコア間通信領域情報登録部330が、独立した構成として設置されている。従って、コア間通信領域情報登録部330の更新は、コア間通信領域管理部310からもアクセス排他制御部320からも行えるように構成されている。
In the cache
第2の実施形態の変形例のキャッシュメモリ制御装置300においては、コア間通信領域管理部310は、アクセス排他制御部320からの指示を受けることなくコア間通信領域情報登録部330の更新を行うことができる。また、アクセス排他制御部320は、コア間通信領域管理部310に指示することなく直接コア間通信領域情報登録部330の更新を行うことができる。
In the cache
図11は、第2の実施形態の変形例のキャッシュメモリ制御装置300のコア間通信領域管理部310の動作を示すフロー図である。図11を参照してコア間通信領域管理部310の動作を説明する。なお、図6を参照して説明した第2の実施形態のコア間通信領域管理部210の動作における処理フローと相違する点についてのみ説明するものとする。
FIG. 11 is a flowchart illustrating the operation of the inter-core communication
図11のステップS301乃至S303、およびステップS307乃至S309の処理は、図6のステップS201乃至S204、およびステップS207、S208の処理と同じである。 The processes in steps S301 to S303 and steps S307 to S309 in FIG. 11 are the same as the processes in steps S201 to S204 and steps S207 and S208 in FIG.
相違する処理は、図6のステップS205、S206が無く、図11のステップS304乃至S306の処理を行うことにある。 The different processing is that there are no steps S205 and S206 in FIG. 6 and steps S304 to S306 in FIG. 11 are performed.
第2の実施形態では、アドレス分解情報のインデックスと一致するインデックスを有するエントリがコア間通信領域情報登録部211に登録されていない場合(S203、無)に、以降の処理をアクセス排他制御部220に依頼している。
In the second embodiment, when an entry having an index that matches the index of the address resolution information is not registered in the inter-core communication area information registration unit 211 (No in S203), the subsequent processing is performed by the access
一方、第2の実施形態の変形例では、インデックスが一致するエントリがコア間通信領域情報登録部330に登録されていない場合(S303、無)には、コア間通信領域管理部310がアクセス排他の判定制御を行う。
On the other hand, in the modified example of the second embodiment, when the entry having the same index is not registered in the inter-core communication area information registration unit 330 (S303, none), the inter-core communication
つまり、インデックスが一致するエントリがコア間通信領域情報登録部330に登録されていないということは、アプリケーションがアクセスしようとしているキャッシュメモリ領域が、現在コア間通信で使用されていないことを意味する。そのため、コア間通信領域管理部310がアクセス可能と判定してアプリケーションにその旨を通知する(S304)。そして、更に、コア間通信領域情報登録要求を受け取っているか否かが判定される(S305)。
That is, that the entry with the matching index is not registered in the inter-core communication area
コア間通信領域情報登録要求を受け取っている場合(S305、有)、新たなコア間通信が発生したことになるので、該コア間通信が使用するキャッシュメモリ領域の管理情報としてエントリの追加登録を行う(S306)。 When an inter-core communication area information registration request has been received (S305, yes), a new inter-core communication has occurred, so an additional entry is registered as management information for the cache memory area used by the inter-core communication. It performs (S306).
従って、インデックスが一致するエントリがコア間通信領域情報登録部330に登録されていないことが判明した場合には、アクセス排他制御部320に依頼することなく、コア間通信領域管理部310がアクセス排他の判定制御を行う。
Therefore, when it is found that the entry with the matching index is not registered in the inter-core communication area
図11におけるステップS304乃至S306は、図7を参照して説明した第2の実施形態のアクセス排他制御部220の処理のステップS212乃至S214に相当する。
Steps S304 to S306 in FIG. 11 correspond to steps S212 to S214 of the processing of the exclusive
図12は、第2の実施形態の変形例のキャッシュメモリ制御装置300のアクセス排他制御部320の動作を示すフロー図である。
FIG. 12 is a flowchart illustrating the operation of the access
前述したように、インデックスが一致するエントリがコア間通信領域情報登録部330に登録されていない場合には、コア間通信領域管理部310がアクセス排他の判定制御を行う。
As described above, when the entry with the matching index is not registered in the inter-core communication area
そのため、第2の実施形態の変形例のキャッシュメモリ制御装置300のアクセス排他制御部320においては、インデックスが一致するエントリがコア間通信領域情報登録部330に登録されていない場合の処理が不要になる。つまり、図12に示すように、第2の実施形態の変形例では、図7を参照して説明したステップS211乃至S214の処理が不要になる。
Therefore, in the exclusive
一方、ステップS315のエントリ内容の更新は、コア間通信領域管理部310に指示することなくアクセス排他制御部320が行う。
On the other hand, the access
具体的には、エントリの登録情報に含まれるワード状態記憶部情報フィールドのワード状態W(i)の値において、受信処理を行うコアに対応するビットを0に設定する。そして、その更新の結果、更新後のワード状態W(i)の値がオール0となる場合は、該エントリをコア間通信領域情報登録部330のリストから削除する。
Specifically, in the value of the word state W (i) of the word state storage unit information field included in the registration information of the entry, the bit corresponding to the core that performs the reception process is set to 0. If the updated word state W (i) is all 0 as a result of the update, the entry is deleted from the list of the inter-core communication area
このように構成した第2の実施形態の変形例のキャッシュメモリ制御装置300は、構成要素であるコア間通信領域管理部310とアクセス排他制御部320との間の転送情報を削減して、処理動作を速めることができる。
The cache
以上のように各実施形態のキャッシュメモリ制御装置および制御方法は、アクセス先キャッシュラインと、コア間通信で使用されているキャッシュラインおよびワード状態に着目してライトバック処理を抑止するアクセス排他制御を行う。つまり、各実施形態のキャッシュメモリ制御装置および制御方法は、プロセスIDや論理アドレス、物理ページサイズなどを使用せず、マルチコアプロセッサの構成や運用方法に依存することなくアクセス排他制御が可能となる。したがって、マルチコアプロセッサの構成や運用方法に依存することなく、コア間通信で使用されているキャッシュラインが置き換えられる事によって発生するライトバック処理が抑制され、コア間通信速度が低下することを防ぐことができる。 As described above, the cache memory control device and the control method of each embodiment perform access exclusive control that suppresses write-back processing by focusing on the access destination cache line, the cache line used in inter-core communication, and the word state. Do. In other words, the cache memory control device and the control method of each embodiment can perform exclusive access control without using process IDs, logical addresses, physical page sizes, etc., and without depending on the configuration and operation method of the multi-core processor. Therefore, without depending on the configuration and operation method of the multi-core processor, the write-back processing that occurs when the cache line used for inter-core communication is replaced is suppressed, and the inter-core communication speed is prevented from decreasing. Can do.
1 CPU
2 キャッシュメモリ
3 メインメモリ
4_0、4_1、4_N−1 コア
7 アドレスレジスタ
8、13 上位mビット
9 nビット
10 下位kビット
11 アドレスアレイ
12 データアレイ
14 状態他
15 ブロックデータ
16 比較部
17 コア番号
18 命令
19 キャッシュ制御ユニット
20 ブロック状態記憶部
21 ワード状態記憶部
22 コア0用
23 コア1用
24 コア2用
25 コア3用
100、200、300 キャッシュメモリ制御装置
110、211、330 コア間通信領域情報登録部
120 分解要素情報生成手段
130 アクセス排他制御手段
210、310 コア間通信領域管理部
212、312 アドレス分解情報生成部
213、313 比較判定部
220、320 アクセス排他制御部
221、321 比較判定制御部
1 CPU
2
Claims (10)
キャッシュメモリへのアクセス前に、メモリアクセス先を特定する物理メモリアドレスを入力して、入力した該物理メモリアドレスを前記要素に分解して分解要素情報を生成する分解要素情報生成手段と、
前記分解要素情報を前記コア間通信領域情報と比較し、前記キャッシュメモリへのアクセスを許可した場合に、前記コア間通信で使われているキャッシュメモリ領域が参照され、かつ、キャッシュミスが確定する条件の比較結果を得た場合に、前記キャッシュメモリへのアクセスを不許可と判定して通知するアクセス排他制御手段と
を備えることを特徴とするキャッシュメモリ制御装置。 Between cores consisting of a physical memory address that is decomposed into elements that uniquely identify a cache memory area used in inter-core communication of a multi-core processor and word state storage information that indicates the use state of the cache memory area in inter-core communication An inter-core communication area information registration unit for registering communication area information;
Decomposition element information generating means for inputting a physical memory address for specifying a memory access destination before accessing the cache memory and decomposing the input physical memory address into the elements to generate decomposition element information;
When the decomposition element information is compared with the inter-core communication area information and access to the cache memory is permitted, the cache memory area used in the inter-core communication is referred to and a cache miss is determined. A cache memory control device comprising: an access exclusive control unit that determines that access to the cache memory is not permitted when a comparison result of conditions is obtained and notifies the result.
前記ワード状態記憶情報は、コア間通信を行っている各コアの前記キャッシュメモリ領域の各コアの送信アクセス状況および受信アクセス状況を、コア毎に示す情報を含む
ことを特徴とする請求項1に記載のキャッシュメモリ制御装置。 The physical memory address is decomposed into elements of a tag, an index, and a byte offset, and the index corresponds to information used for searching an entry of an address array that registers a cache line registered in the cache memory. Corresponding to information used for cache hit or cache miss comparison determination together with the index, the byte offset corresponds to information identifying a word in the cache line that hit the cache,
The word state storage information includes information indicating, for each core, transmission access status and reception access status of each core in the cache memory area of each core performing inter-core communication. The cache memory control device described.
1次比較として、前記分解要素情報生成手段が生成した前記分解要素情報の前記インデックスと一致するインデックスを有する前記コア間通信領域情報の、前記コア間通信領域情報登録部における有無を判定し、一致するインデックスを有する前記コア間通信領域情報が存在しない場合に、前記キャッシュメモリへのアクセスを許可し、
前記物理メモリアドレスの入力とともに前記コア間通信領域情報の登録を要求するコア間通信領域情報登録要求が入力されている場合には、前記コア間通信領域情報登録部に、前記分解要素情報生成手段が生成した前記分解要素情報を有する新たなコア間通信領域情報を登録する
ことを特徴とする請求項2に記載のキャッシュメモリ制御装置。 The access exclusive control means includes:
As a primary comparison, the presence / absence of the inter-core communication area information having an index that matches the index of the decomposition element information generated by the decomposition element information generation unit is determined and matched. Permit access to the cache memory when there is no inter-core communication area information having an index to
When an inter-core communication area information registration request for requesting registration of the inter-core communication area information is input together with the input of the physical memory address, the disassembly element information generating means is provided in the inter-core communication area information registration unit. 3. The cache memory control device according to claim 2, wherein new inter-core communication area information having the disassembled element information generated by is registered.
該2次比較においてタグが一致しない場合には前記キャッシュメモリへのアクセスを不許可とし、該2次比較においてタグが一致する場合には前記キャッシュメモリへのアクセスを許可する
ことを特徴とする請求項3に記載のキャッシュメモリ制御装置。 When the inter-core communication area information having a matching index exists as a result of the primary comparison, the access exclusive control means performs a secondary comparison on the inter-core communication area information having a matching index. Determining whether or not the tag of the decomposition element information generated by the decomposition element information generation means matches,
The access to the cache memory is not permitted if the tag does not match in the secondary comparison, and the access to the cache memory is permitted if the tag matches in the secondary comparison. Item 4. The cache memory control device according to Item 3.
該3次比較においてバイトオフセットが一致する場合には、該コア間通信領域情報に含まれる前記ワード状態記憶情報を更新する
ことを特徴とする請求項4に記載のキャッシュメモリ制御装置。 The access exclusive control means is a case where the inter-core communication area information with the matching tag exists as a result of the secondary comparison, and the access instruction type input together with the input of the physical memory address indicates reception processing. As a third comparison, for the inter-core communication area information having a matching tag and index, determine whether or not the byte offset of the decomposition element information generated by the decomposition element information generation means,
5. The cache memory control device according to claim 4, wherein when the byte offsets match in the tertiary comparison, the word state storage information included in the inter-core communication area information is updated.
前記受信処理を行うすべてのコアに対応する情報が0になった場合には、当該コア間通信領域情報を前記コア間通信領域情報登録部から削除する
ことを特徴とする請求項5に記載のキャッシュメモリ制御装置。 The access exclusive control means updates the information corresponding to the core that performs the reception processing of the word state storage information to be set to 0 indicating that the reception access has been executed,
6. The inter-core communication area information is deleted from the inter-core communication area information registration unit when information corresponding to all the cores that perform the reception process becomes 0. 6. Cache memory controller.
キャッシュメモリへのアクセス前に、メモリアクセス先を特定する物理メモリアドレスを入力して、入力した該物理メモリアドレスを前記要素に分解して分解要素情報を生成し、
前記分解要素情報を前記コア間通信領域情報と比較し、前記キャッシュメモリへのアクセスを許可した場合に、前記コア間通信で使われているキャッシュメモリ領域が参照され、かつ、キャッシュミスが確定する条件の比較結果を得た場合に、前記キャッシュメモリへのアクセスを不許可と判定して通知する
ことを特徴とするキャッシュメモリ制御方法。 Between cores consisting of a physical memory address that is decomposed into elements that uniquely identify a cache memory area used in inter-core communication of a multi-core processor and word state storage information that indicates the use state of the cache memory area in inter-core communication Register communication area information in the inter-core communication area information registration unit,
Before accessing the cache memory, input a physical memory address for specifying a memory access destination, decompose the input physical memory address into the elements, and generate decomposed element information.
When the decomposition element information is compared with the inter-core communication area information and access to the cache memory is permitted, the cache memory area used in the inter-core communication is referred to and a cache miss is determined. A cache memory control method comprising: notifying that access to the cache memory is not permitted when a comparison result of conditions is obtained.
前記ワード状態記憶情報は、コア間通信を行っている各コアの前記キャッシュメモリ領域の各コアの送信アクセス状況および受信アクセス状況を、コア毎に示す情報を含み、
前記分解要素情報の前記インデックスと一致するインデックスを有する前記コア間通信領域情報の、前記コア間通信領域情報登録部における有無を1次比較として判定し、
該1次比較の判定結果として、一致するインデックスを有する前記コア間通信領域情報が存在しない場合に前記キャッシュメモリへのアクセスを許可し、前記物理メモリアドレスの入力とともに前記コア間通信領域情報の登録を要求するコア間通信領域情報登録要求が入力されている場合には、前記コア間通信領域情報登録部に、前記分解要素情報を有する新たなコア間通信領域情報を登録する
ことを特徴とする請求項7に記載のキャッシュメモリ制御方法。 The physical memory address is decomposed into elements of a tag, an index, and a byte offset, and the index corresponds to information used for searching an entry of an address array that registers a cache line registered in the cache memory. Corresponding to information used for cache hit or cache miss comparison determination together with the index, the byte offset corresponds to information identifying a word in the cache line that hit the cache,
The word state storage information includes information indicating the transmission access status and reception access status of each core of the cache memory area of each core performing inter-core communication for each core,
The presence or absence in the inter-core communication area information registration unit of the inter-core communication area information having an index that matches the index of the decomposition element information is determined as a primary comparison,
When the inter-core communication area information having a matching index does not exist as the determination result of the primary comparison, access to the cache memory is permitted, and the inter-core communication area information is registered together with the input of the physical memory address. When the inter-core communication area information registration request for requesting is input, new inter-core communication area information having the disassembly element information is registered in the inter-core communication area information registration unit. The cache memory control method according to claim 7.
該2次比較の判定結果として、タグが一致しない場合には前記キャッシュメモリへのアクセスを不許可とし、
該2次比較の判定結果として、タグが一致する場合には前記キャッシュメモリへのアクセスを許可する
ことを特徴とする請求項8に記載のキャッシュメモリ制御方法。 If the inter-core communication area information having a matching index exists as a determination result of the primary comparison, the tag of the decomposition element information is compared with the inter-core communication area information having a matching index. Determine whether there is a match as a secondary comparison,
If the tag does not match as the determination result of the secondary comparison, access to the cache memory is disallowed,
9. The cache memory control method according to claim 8, wherein access to the cache memory is permitted when the tags match as a determination result of the secondary comparison.
該3次比較の判定結果として、バイトオフセットが一致する場合には、該コア間通信領域情報に含まれる前記ワード状態記憶情報の前記受信処理を行うコアに対応する情報を、受信アクセスを実行したことを示す0に設定する更新を行い、
前記受信処理を行うすべてのコアに対応する情報が0になった場合には、当該コア間通信領域情報を前記コア間通信領域情報登録部から削除する
ことを特徴とする請求項9に記載のキャッシュメモリ制御方法。 If the inter-core communication area information that matches the tag exists as the determination result of the secondary comparison, and the access instruction type input together with the input of the physical memory address indicates reception processing, the matching tag and For the inter-core communication area information having an index, the presence or absence of matching of the byte offset of the disassembly element information is determined as a third comparison,
As a result of the tertiary comparison, when the byte offsets match, the information corresponding to the core that performs the reception processing of the word state storage information included in the inter-core communication area information is received. Update to 0 to indicate that
The information of the inter-core communication area is deleted from the inter-core communication area information registration unit when the information corresponding to all the cores performing the reception process becomes 0. Cache memory control method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015013215A JP6110417B2 (en) | 2015-01-27 | 2015-01-27 | Cache memory control device and control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015013215A JP6110417B2 (en) | 2015-01-27 | 2015-01-27 | Cache memory control device and control method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016139239A JP2016139239A (en) | 2016-08-04 |
JP6110417B2 true JP6110417B2 (en) | 2017-04-05 |
Family
ID=56560318
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015013215A Active JP6110417B2 (en) | 2015-01-27 | 2015-01-27 | Cache memory control device and control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6110417B2 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10207767A (en) * | 1997-01-16 | 1998-08-07 | Toshiba Corp | Cache memory with lock function and microprocessor equipped with cache memory |
JPH10320285A (en) * | 1997-05-20 | 1998-12-04 | Toshiba Corp | Cache memory and information processing system |
JP2009157608A (en) * | 2007-12-26 | 2009-07-16 | Nec Corp | Cache memory system and cache memory control method |
JP2013050745A (en) * | 2009-11-26 | 2013-03-14 | Nec Corp | Exclusive control device, method, and program |
JP5499987B2 (en) * | 2010-08-13 | 2014-05-21 | 富士通株式会社 | Shared cache memory device |
-
2015
- 2015-01-27 JP JP2015013215A patent/JP6110417B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2016139239A (en) | 2016-08-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101814577B1 (en) | Method and apparatus for processing instructions using processing-in-memory | |
KR101639672B1 (en) | Unbounded transactional memory system and method for operating thereof | |
US7827374B2 (en) | Relocating page tables | |
TWI397813B (en) | Apparatus,method and system for global overflow in a virtualized transactional memory | |
US7490214B2 (en) | Relocating data from a source page to a target page by marking transaction table entries valid or invalid based on mappings to virtual pages in kernel virtual memory address space | |
US7426627B2 (en) | Selective address translation for a resource such as a hardware device | |
US8762651B2 (en) | Maintaining cache coherence in a multi-node, symmetric multiprocessing computer | |
US9063887B2 (en) | Restoring distributed shared memory data consistency within a recovery process from a cluster node failure | |
US7363435B1 (en) | System and method for coherence prediction | |
JPH04227552A (en) | Store-through-cache control system | |
US8423736B2 (en) | Maintaining cache coherence in a multi-node, symmetric multiprocessing computer | |
US20060294319A1 (en) | Managing snoop operations in a data processing apparatus | |
JP2019517689A (en) | Replacing cache entries based on the availability of entries in other caches | |
US20120124297A1 (en) | Coherence domain support for multi-tenant environment | |
EP4026005B1 (en) | Producer-to-consumer active direct cache transfers | |
JP7160792B2 (en) | Systems and methods for storing cache location information for cache entry transfers | |
EP3249539B1 (en) | Method and device for accessing data visitor directory in multi-core system | |
US8745340B2 (en) | Reduction of communication and efficient failover processing in distributed shared memory-based application | |
JP2009223759A (en) | Information processing device, memory control method, and memory control device | |
US11263137B2 (en) | Core-to-core cache stashing and target discovery | |
JP6110417B2 (en) | Cache memory control device and control method | |
GB2499187A (en) | Evicting from a cache objects which are not referenced by other objects in the cache | |
US8838909B2 (en) | Dynamic initial cache line coherency state assignment in multi-processor systems | |
JP4021810B2 (en) | Processor, processor system, and cache coherency control method | |
US8671247B2 (en) | Transfer of bus-based operations to demand-side machines |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160516 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170131 |
|
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: 20170214 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170309 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6110417 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |