JP5724981B2 - Memory access control device, memory access control system, and memory access control method - Google Patents
Memory access control device, memory access control system, and memory access control method Download PDFInfo
- Publication number
- JP5724981B2 JP5724981B2 JP2012212659A JP2012212659A JP5724981B2 JP 5724981 B2 JP5724981 B2 JP 5724981B2 JP 2012212659 A JP2012212659 A JP 2012212659A JP 2012212659 A JP2012212659 A JP 2012212659A JP 5724981 B2 JP5724981 B2 JP 5724981B2
- Authority
- JP
- Japan
- Prior art keywords
- associative
- data
- access control
- entry
- memory
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
本願発明は、キャッシュメモリにおけるスラッシングの発生による性能低下を回避するためのメモリアクセス制御装置、メモリアクセス制御システム、及び、メモリアクセス制御方法に関する。 The present invention relates to a memory access control device, a memory access control system, and a memory access control method for avoiding performance degradation due to thrashing in a cache memory.
コンピュータシステムの性能低下の要因の一つとして、プロセッサ内のキャッシュメモリの同一エントリを複数のメモリリクエスト同士で奪い合うスラッシングの発生がある。スラッシングの発生によりキャッシュミスヒットが頻発すると、下位レベルのキャッシュや主記憶装置へのアクセス頻度が増加してメモリアクセスのレイテンシが増加するため、システム性能は大きく低下する。したがって、コンピュータシステムの性能を向上させるためには、スラッシングによるキャッシュメモリの性能低下を回避することが課題である。 One of the causes of the performance degradation of the computer system is the occurrence of thrashing in which the same entry in the cache memory in the processor is competing among a plurality of memory requests. If cache miss hits frequently occur due to thrashing, the access frequency to the lower level cache and the main storage device increases, and the latency of memory access increases, so the system performance is greatly reduced. Therefore, in order to improve the performance of the computer system, it is a problem to avoid the performance degradation of the cache memory due to thrashing.
上述の課題に対応するための技術として、特許文献1には、メモリリクエストのアクセスアドレスの履歴を保持するテーブルを備えてスラッシングの発生を検出し、スラッシングによって発生したメモリリクエストによる転送データを保持するためのバッファを備えることで、主記憶装置へのアクセス頻度を軽減させたメモリシステムが公開されている。
As a technique for dealing with the above-described problem,
特許文献1のメモリシステムは、あるアクセスアドレスに関してスラッシングの発生を検出した後に、次回以降のスラッシングの発生による性能低下を回避するためのものである。したがって、あるアクセスアドレスに対する初回のスラッシングの発生を回避するための機能は有していない。したがって、特許文献1のメモリシステムでは、コンピュータシステムの性能向上を図る上で、十分であるとは言えない。
The memory system of
本願発明の目的は、上述の問題点を解決したメモリアクセス制御装置、メモリアクセス制御システム、及び、メモリアクセス制御方法を提供することである。 An object of the present invention is to provide a memory access control device, a memory access control system, and a memory access control method that solve the above-described problems.
本願発明の一実施形態のメモリアクセス制御装置は、主記憶に記憶されたデータの写しを前記主記憶のアドレスと対応付けて記憶し、入力されたアドレスと一致する前記アドレスに対応付けられた前記データを出力する、第一の連想記憶装置及び第二の連想記憶装置と、中央処理装置の命令発行部からデータ参照命令に含まれるアドレスを入力して、前記第一の連想記憶装置と前記第二の連想記憶装置に並列に出力するアクセス制御手段と、を備え、一つの前記データを記憶するエントリの数は、前記第一の連想記憶装置の方が前記第二の連想記憶装置より小さく、かつ、一つの前記データを記憶する可能性のある前記エントリの数である連想度は、前記第一の連想記憶装置の方が前記第二の連想記憶装置より大きいことを特徴とする。 A memory access control device according to an embodiment of the present invention stores a copy of data stored in a main memory in association with an address in the main memory, and stores the copy in association with the address that matches the input address. The first associative memory device and the second associative memory device that output data, and the address included in the data reference command from the command issuing unit of the central processing unit are input, and the first associative memory device and the first associative memory device Access control means for outputting in parallel to two associative memory devices, the number of entries storing one piece of the data is smaller in the first associative memory device than in the second associative memory device, In addition, the association degree, which is the number of entries that may store one piece of the data, is greater in the first associative storage device than in the second associative storage device.
本願発明の一実施形態のメモリアクセス制御方法は、主記憶に記憶されたデータの写しを前記主記憶のアドレスと対応付けて記憶し、入力されたアドレスと一致する前記アドレスに対応付けられた前記データを出力する、第一の連想記憶装置及び第二の連想記憶装置であって、一つの前記データを記憶するエントリの数は、前記第一の連想記憶装置の方が前記第二の連想記憶装置より小さく、かつ、一つの前記データを記憶する可能性のある前記エントリの数である連想度は、前記第一の連想記憶装置の方が前記第二の連想記憶装置より大きいものをメモリアクセス制御装置に設け、中央処理装置の命令発行部からデータ参照命令に含まれるアドレスを入力して、前記第一の連想記憶装置と前記第二の連想記憶装置に並列に出力する。 A memory access control method according to an embodiment of the present invention stores a copy of data stored in a main memory in association with an address in the main memory, and stores the copy in correspondence with the address that matches the input address. A first associative memory device and a second associative memory device that output data, wherein the first associative memory device has the second associative memory for the number of entries for storing the one data. Associativeness, which is smaller than the device and has the possibility of storing one piece of the data, is accessed by the memory of the first associative memory device larger than that of the second associative memory device. Provided in the control device, an address included in the data reference command is input from the command issuing unit of the central processing unit, and is output in parallel to the first associative memory device and the second associative memory device.
本願発明は、スラッシングの発生を抑止し、キャッシュメモリのヒット率を向上させることで、システム性能を向上させることができるようにする。 The present invention makes it possible to improve the system performance by suppressing the occurrence of thrashing and improving the hit rate of the cache memory.
本願発明の第1の実施の形態について図面を参照して詳細に説明する。 A first embodiment of the present invention will be described in detail with reference to the drawings.
図1は本実施形態のメモリアクセス制御システムの構成を示すブロック図である。 FIG. 1 is a block diagram showing the configuration of the memory access control system of this embodiment.
本実施形態のメモリアクセス制御システム1は、メモリアクセス制御装置10と、命令発行部20と、主記憶装置30とを包含している。
The memory
メモリアクセス制御装置10と、命令発行部20は、中央処理装置のプロセッサ(図示せず)に搭載されている。命令発行部20がデータ参照命令を発行すると、メモリアクセス制御装置10は、データ参照命令が指定するアドレスに基づき、必要であれば主記憶装置30へアクセスする。尚、システムによっては、主記憶装置30の手前に、下位レベルのキャッシュメモリを供えたものもある。
The memory
メモリアクセス制御装置10は、アクセス制御部100と、第1の連想記憶装置110と、第2の連想記憶装置120と、命令記憶部130とを包含している。
The memory
第1の連想記憶装置110と、第2の連想記憶装置120は、中央処理装置のプロセッサにおいて並列に配置されたキャッシュメモリである。尚、システムによっては、命令発行部20との間に、上位レベルのキャッシュメモリを備えたものもある。第1の連想記憶装置110は、アドレス記憶部111とデータ記憶部112を包含し、第2の連想記憶装置120は、アドレス記憶部121とデータ記憶部122を包含している。
The first
第1の連想記憶装置110と、第2の連想記憶装置120への主記憶装置30のアドレス空間のマッピングの例を図2に示す。
An example of the mapping of the address space of the
主記憶アドレス空間200は、アドレスの値によりn個の領域に分割されて、各領域に包含される主記憶データのコピーはそれぞれ、第2の連想記憶装置120における、領域ごとに決められたエントリ群内のエントリに格納される。nは、一般的には8以上の整数である。第2の連想記憶装置120へのアドレスのマッピング201で示す通り、アドレス1とアドレスn+1とアドレス2n+1等の主記憶データのコピーが、第2の連想記憶装置120におけるエントリ1−1あるいはエントリ1−2に格納される。同様に、アドレス2とアドレスn+2とアドレス2n+2等の主記憶データのコピーが、エントリ2−1あるいはエントリ2−2に格納される。
The main memory address space 200 is divided into n areas according to the address value, and the copy of the main memory data included in each area is an entry determined for each area in the second
第2の連想記憶装置120において、主記憶アドレス空間200の各領域内の何れかの主記憶データのコピーを記憶する可能性のあるエントリの数である連想度は2である。すなわち、第2の連想記憶装置120は、連想度が2のセットアソシアティブ形式で主記憶データのコピーを記憶しており、エントリの総数は2n個となる。以下、連想度が2であることを、2wayと表記する。
In the second
第1の連想記憶装置110については、第1の連想記憶装置110へのアドレスのマッピング202で示す通り、4wayのフルアソシアティブ形式で主記憶データのコピーを記憶する場合もあれば、第1の連想記憶装置110へのアドレスのマッピング203で示す通り、4wayのセットアソシアティブ形式で主記憶データのコピーを記憶する場合もある。
As for the first
4wayのフルアソシアティブ形式の場合、第1の連想記憶装置110は、全ての主記憶データのコピーを、そのアドレスの値にかかわらず、包含する4個のエントリの何れかに格納する。
In the case of the 4-way full associative format, the first
4wayのセットアソシアティブ形式の場合、第1の連想記憶装置110は、エントリ1−1乃至1−4で構成されるエントリ群と、エントリ2−1乃至2−4で構成されるエントリ群の2つのエントリ群を包含している。第1の連想記憶装置110は、主記憶データのコピーを、そのアドレス値が奇数か偶数かによって、何れかのエントリ群内のエントリに格納する。この場合、各エントリ群が包含するエントリは4個であり、第1の連想記憶装置110が包含するエントリの総数は8個となる。
In the case of the 4-way set associative format, the first
上述の説明で明らかなとおり、第1の連想記憶装置110は、連想度が第2の連想記憶装置120よりも大きく、総エントリ数が第2の連想記憶装置120よりも小さい特徴を有している。
As is apparent from the above description, the first
第1の連想記憶装置110が、4wayのフルアソシアティブ形式で主記憶データのコピーを記憶する場合の、第1の連想記憶装置110のエントリの構成例を図5に示す。第1の連想記憶装置110が包含する4個のエントリは、それぞれを識別するためのID番号と、主記憶アドレスと、データ転送ステータスの情報と、LRU(Least Recently Used)の情報と、主記憶データを対応付けて包含している。
FIG. 5 shows a configuration example of entries in the first
データ転送ステータスの情報は、データ参照命令が指定した主記憶アドレスが、第1の連想記憶装置110と第2の連想記憶装置120の両方でミスヒットし、主記憶装置30へのアクセスが発生した際の、当該アドレスの主記憶データに関するデータ転送の状態を示している。
As for data transfer status information, the main memory address specified by the data reference instruction was mis-hit in both the first
図5の例の場合、ID番号が1および2のエントリについては、主記憶データがエントリへの送済みで、エントリ内の主記憶データのコピーは有効であるが、ID番号が3のエントリについては、主記憶データのエントリへの転送が完了していなく、エントリ内の主記憶データのコピーは、まだ有効でないことを示している。
In the case of the example of FIG. 5, for the entries with
LRUの情報は、第1の連想記憶装置110のエントリへのアクセスが最後に行われてからの経過時間、すなわち、当該エントリに格納されたデータが使用されていない時間の長さの順位を示している。エントリ内の主記憶データのコピーのリプレースは、アクセス制御部100により、LRUの値が小さいものから優先して行われる。
The information of the LRU indicates the elapsed time since the last access to the entry of the first
図5において、ID番号が4のエントリは、未使用のエントリである。 In FIG. 5, an entry with an ID number of 4 is an unused entry.
尚、第2の連想記憶装置120の各エントリの構成も、図5に示すものと同様である。
The configuration of each entry in the second
命令記憶部130は、命令発行部20から発行されたデータ参照命令の命令情報を記憶する。命令情報は、命令発行部20がデータ参照命令に付与した命令のID番号や、データ参照命令が使用する第1の連想記憶装置110と第2の連想記憶装置120におけるエントリのID番号等の情報を包含している。
The
アクセス制御部100は、命令発行部20が発行したデータ参照命令の実行を制御する。アクセス制御部100は、まず、データ参照命令が指定した主記憶アドレスが登録されているかどうか、第1の連想記憶装置110と第2の連想記憶装置120の両方に並列に確認する。
The
第2の連想記憶装置120でヒットした場合、アクセス制御部100は、当該アドレスに対応する、第2の連想記憶装置120のエントリにアクセスする。
When a hit occurs in the second
第2の連想記憶装置120でミスヒットし、第1の連想記憶装置110でヒットした場合、アクセス制御部100は、当該アドレスに対応する、第1の連想記憶装置110のエントリにアクセスする。
When a miss occurs in the second
第1の連想記憶装置110と第2の連想記憶装置120の両方でミスヒットした場合、アクセス制御部100は、第1の連想記憶装置110と第2の連想記憶装置120の両方に、当該アドレスのデータを格納するためのエントリを確保する。アクセス制御部100は、確保した第1の連想記憶装置110におけるエントリのID番号の情報を付けて、主記憶装置30へアクセスリクエストを送信する。アクセス制御部100は、第2の連想記憶装置120で確保したエントリのID番号を、第1の連想記憶装置110で確保したエントリのID番号に紐づけて記憶する。
When there is a miss-hit in both the first
アクセス制御部100は、主記憶装置30からのリプライデータに付与された第1の連想記憶装置110におけるエントリのID番号と、当該ID番号に紐づけられた第2の連想記憶装置120におけるエントリのID番号で特定される、第1の連想記憶装置110と第2の連想記憶装置120におけるエントリに、リプライデータを格納する。
The
アクセス制御部100は、第2の連想記憶装置120においてリプレースが発生した場合、第1の連想記憶装置110において未使用のエントリがあるか確認し、未使用のエントリがある場合は、リプレースで第2の連想記憶装置120から追い出されたデータを、第1の連想記憶装置110における未使用のエントリに格納する。
When a replacement occurs in the second
アクセス制御部100は、主記憶装置30における何れかのアドレスのデータのコピーが、第1の連想記憶装置110と第2の連想記憶装置120の両方に存在する場合、第1の連想記憶装置110における、当該アドレスの主記憶データのコピーを格納したエントリを未使用状態に設定する。
When there is a copy of data at any address in the
本実施形態において、命令発行部30から、データ参照命令ReqA1乃至A3、ReqB1乃至B3、ReqC1乃至C3が発行されたときのアクセス制御部100の動作を、図6におけるアクセス制御部100の動作例300に示す。第1の連想記憶装置110は、第1の連想記憶装置110へのアドレスのマッピング202で示す4wayフルアソシアティブ形式で主記憶データのコピーを記憶し、第2の連想記憶装置120は、第2の連想記憶装置120へのアドレスのマッピング201で示す2wayセットソシアティブ形式で主記憶データのコピーを記憶する。また、ReqA1乃至A3、ReqB1乃至B3、ReqC1乃至C3のアクセスアドレスは、いずれも、第2の連想記憶装置120におけるエントリ1−1、あるいは、エントリ1−2にマッピングされるアドレスである。
In the present embodiment, the operation of the
アクセス制御部100は、命令発行部20からReqA1を受信すると、第1の連想記憶110のエントリ1、第2の連想記憶装置120のエントリ1−1を確保して、リクエストにエントリ番号1をIDとして付与し主記憶装置30にアクセスする。アクセス制御部100は、エントリ1−1をエントリ1と紐付けて記憶する(ステップ1)。
Upon receiving ReqA1 from the
アクセス制御部100は、命令発行部20からReqB1を受信すると、第1の連想記憶110のエントリ2、第2の連想記憶装置120のエントリ1−2を確保して、リクエストにエントリ番号2をIDとして付与し主記憶装置30にアクセスする。アクセス制御部100は、エントリ1−2をエントリ2と紐付けて記憶する(ステップ2)。
When the
アクセス制御部100は、命令発行部20からReqC1を受信すると、第1の連想記憶110のエントリ3を確保、第2の連想記憶装置120のエントリ1−1のReqAのアドレスをリプレースして、リクエストにエントリ番号3をIDとして付与し主記憶装置30にアクセスする。アクセス制御部100は、エントリ1−1をエントリ3と紐付けて記憶しエントリ1と紐づけてある1−1を消去する。(ステップ3)。
Upon receiving ReqC1 from the
アクセス制御部100は、命令発行部20からReqA2を受信すると、第1の連想記憶110のエントリ1にヒット、ステータスは転送中であるので、命令情報をエントリ1と紐付けて命令記憶部130に記憶する(ステップ4)。
When receiving the ReqA2 from the
アクセス制御部100は、命令発行部20からReqB2を受信すると、第1の連想記憶110のエントリ2にヒット、ステータスは転送中であるので、命令情報をエントリ2と紐付けて命令記憶部130に記憶する(ステップ5)。
When receiving the ReqB2 from the
アクセス制御部100は、命令発行部20からReqC2を受信すると、第1の連想記憶110のエントリ3にヒット、ステータスは転送中であるので、命令情報をエントリ3と紐付けて命令記憶部130に記憶する(ステップ6)。
When receiving the ReqC2 from the
アクセス制御部100は、主記憶装置30からReqA1のリプライを受信すると、リプライに付与されているエントリ1に紐付けられている第2の連想記憶装置120のエントリはないため、第1の連想記憶110のエントリ1のみにリプライデータを書き込む。アクセス制御部100は、エントリ1で紐付けられている、ReqA1、ReqA2を命令記憶部130から読み出し、第1の連想記憶110のエントリ1のリプライデータとともに、命令発行部20へReqA1、RaqA2のリプライデータを送信する(ステップ7)。
When the
アクセス制御部100は、主記憶装置30からReqB1のリプライを受信すると、リプライに付与されているエントリ2に紐付けられている第2の連想記憶装置120のエントリは1−2なので、第1の連想記憶110のエントリ2と連想記憶装置120のエントリ1−2にリプライデータを書き込む。アクセス制御部100は、エントリ2で紐付けられている、ReqB1、ReqB2を命令記憶部130から読み出し、第1の連想記憶110のエントリ2のリプライデータとともに、命令発行部20へReqB1、ReqB2のリプライデータを送信する。アクセス制御部100は、第1の連想記憶110と第2の連想記憶装置120に同じアドレスのエントリが存在するため、第1の連想記憶110のエントリ2を未使用に設定する(ステップ8)。
When the
アクセス制御部100は、主記憶装置30からReqC1のリプライを受信すると、リプライに付与されているエントリ3に紐付けられている第2の連想記憶装置120のエントリは1−1なので、第1の連想記憶110のエントリ3と連想記憶装置120のエントリ1−1にリプライデータを書き込む。アクセス制御部100は、エントリ3で紐付けられている、ReqC1、ReqC2を命令記憶部130から読み出し、第1の連想記憶110のエントリ3のリプライデータとともに、命令発行部20へReqC1、ReqC2のリプライデータを送信する。アクセス制御部100は、第1の連想記憶110と第2の連想記憶装置120に同じアドレスのエントリが存在するため、第1の連想記憶110のエントリ3を未使用に設定する(ステップ9)。
When the
アクセス制御部100は、命令発行部20からReqA3を受信すると、第1の連想記憶110のエントリ1にヒットし、エントリ1にアクセスし、命令発行部20へリプライデータを送信する(ステップ10)。
Upon receiving ReqA3 from the
アクセス制御部100は、命令発行部20からReqB3を受信すると、第1の連想記憶120のエントリ1−2にヒットし、エントリ1−2にアクセスし、命令発行部20へリプライデータを送信する(ステップ11)。
When receiving the ReqB3 from the
アクセス制御部100は、命令発行部20からReqC3を受信すると、第1の連想記憶120のエントリ1−1にヒットし、エントリ1−1にアクセスし、命令発行部20へリプライデータを送信する(ステップ12)。
Upon receiving ReqC3 from the
以降、ステップ10からステップ12が繰り返される。 Thereafter, step 10 to step 12 are repeated.
次に図3、図4のフローチャートを参照して、本実施形態の動作について詳細に説明する。 Next, the operation of this embodiment will be described in detail with reference to the flowcharts of FIGS.
アクセス制御部100は、命令発行部20からデータ参照命令を受信する(S101)。アクセス制御部100は、第1の連想記憶装置110と第2の連想記憶装置120を並列に参照し、受信したデータ参照命令のアクセスアドレスでヒットするエントリがあるか確認する(S102)。
The
第2の連想記憶装置120でヒットした場合(S103でYes)、あるいは、第2の連想記憶装置120でヒットせず(S103でNo)、第1の連想記憶装置110でヒットした(S104でYes)場合、アクセス制御部100は、ヒットしたエントリのデータ転送ステータスを確認する(S107)。
When the second
データ転送ステータスが“転送中”の場合(S108でYes)、アクセス制御部100は、命令記憶部130に、エントリのIDを付加してデータ参照命令の命令情報を登録し(S111)、処理はS121へ進む。データ転送ステータスが“転送中”でない場合(S108でNo)、処理はS125へ進む。
When the data transfer status is “transferring” (Yes in S108), the
第2の連想記憶装置120でヒットせず(S103でNo)、かつ、第1の連想記憶装置110でヒットしない(S104でNo)の場合、アクセス制御部100は、第1の連想記憶装置110に未使用エントリがあるか確認する(S105)。
If the second
未使用エントリが有る場合(S106でYes)、処理はS110へ進む。未使用エントリが無い場合(S106でNo)、アクセス制御部100は、第1の連想記憶装置110のLRUの情報を参照し、LRUの値が最も小さいエントリの情報をクリアし、未使用状態に設定する(S109)。
If there is an unused entry (Yes in S106), the process proceeds to S110. When there is no unused entry (No in S106), the
アクセス制御部100は、第1の連想記憶装置110の未使用エントリに、データ参照命令のアクセスアドレスを登録し、データ転送ステータスを転送中に設定する(S110)。アクセス制御部100は、第2の連想記憶装置120に未使用エントリがあるか確認
する(S112)。
The
未使用エントリが無い場合(S113でNo)、アクセス制御部100は、第2の連想記憶装置120の使用エントリの1つをリプレースする(S115)。アクセス制御部100は、第1の連想記憶装置110に未使用エントリがあるか確認する(S116)。未使用エントリが無い場合(S117でNo)、処理はS119へ進む。未使用エントリが有る場合(S117でYes)、アクセス制御部100は、リプレースにより第2の連想記憶装置120から追い出されたデータを、第1の連想記憶装置110の未使用エントリに格納し(S118)、処理はS119へ進む。
When there is no unused entry (No in S113), the
S112の確認において、未使用エントリがある場合(S113でYes)、アクセス制御部100は、第2の連想記憶装置120の未使用エントリにデータ参照命令のアクセスアドレスを登録する(S114)。アクセス制御部100は、命令記憶部130に、エントリのIDを付加してデータ参照命令の命令情報を登録する(S119)。
In the confirmation in S112, when there is an unused entry (Yes in S113), the
アクセス制御部100は、第1の連想記憶装置110における対応するエントリのIDを付与して、データ参照命令を主記憶装置30に送信し、第2の連想記憶装置120で確保したエントリのIDを、第1の連想記憶装置110で確保したエントリのIDに紐づけて記憶する(S120)。
The
アクセス制御部100は、主記憶装置30からリプライデータを受信し、リプライデータに付与された、第1の連想記憶装置110におけるエントリのIDで特定されるエントリのデータ転送ステータスを転送済みにして、当該エントリにリプライデータを書き込む(S121)。
The
第2の連想記憶装置120のエントリが確保されている場合(S122でYes)、アクセス制御部100は、第2の連想記憶装置120に、主記憶装置30からのリプライデータを書き込む(S123)。第2の連想記憶装置120のエントリが確保されていない場合(S122でNo)、処理はS124へ進む。
When the entry of the second
アクセス制御部100は、命令記憶部130から命令情報を読み出す(S124)。アクセス制御部100は第1の連想記憶装置110からデータを読み出して、命令発行部30へ送信し、当該命令情報を命令記憶部103から削除する(S125)。
The
命令記憶部103に、同じエントリのIDに関する命令情報が有る場合(S126でYes)、処理はS124へ進む。命令記憶部103に、同じエントリのIDに関する命令情報が無い場合(S126でNo)、処理はS126へ進む。 If the instruction storage unit 103 has instruction information related to the ID of the same entry (Yes in S126), the process proceeds to S124. If there is no instruction information regarding the ID of the same entry in the instruction storage unit 103 (No in S126), the process proceeds to S126.
アクセス制御部100は、第1の連想記憶装置110と、第2の連想記憶装置120の中に、同一のアドレスに関するデータが存在するか確認する(S127)。同一のアドレスに関するデータが存在しない場合(S128でNo)、全体の処理は終了する、同一のアドレスに関するデータが存在する場合(S128でYes)、アクセス制御部100は、第1の連想記憶装置110において、当該アドレスに関するデータを格納したエントリを未使用に設定し、(S129)、全体の処理は終了する。
The
本実施形態には、ハードウェアの増加をそれほど伴わずに、スラッシングの発生を抑止し、キャッシュメモリのヒット率を向上させることで、システム性能を向上させることができる効果がある。その理由は、メモリアクセス装置10が、エントリ数は小さいが連想度が大きい第1の連想記憶装置110と、エントリ数は大きいが連想度が小さい第2の連想記憶装置120を備え、アクセス制御部100が、データ参照命令の処理時に、これら2つの連想記憶装置を、スラッシングの発生の有無にかかわらず、並列に使用するからである。
This embodiment has an effect of improving the system performance by suppressing the occurrence of thrashing and improving the hit rate of the cache memory without much increase in hardware. The reason is that the
従来の一般的な中央処理装置においては、本実施形態における第2の連想記憶装置120が一次キャッシュメモリに相当する。一次キャッシュメモリとしての効果を出すためには、主記憶データを記憶するための、ある程度のエントリ数を確保する必要があるが、その場合、フルアソシアティブ方式のような連想度の高い方式は、ハードウェアが大規模になるため、採用することは困難である。
In a conventional general central processing unit, the second
そこで、ハードウェア規模を抑えられるセットアソシアティブ方式を採用することとなるが、この方式は連想度が小さいため、例えば、キャッシュ内の同じエントリ群にマッピングされる主記憶アドレスのアクセスが連続した場合、スラッシングが多発して、性能が低下することになる。 Therefore, a set associative method that can suppress the hardware scale is adopted, but since this method has a low association degree, for example, when accesses of main memory addresses mapped to the same entry group in the cache are continuous, Thrashing occurs frequently and the performance deteriorates.
上述の課題を解決するため、本実施形態のメモリアクセス装置は、従来の一次キャッシュメモリの他に、エントリ数は小さいものの、連想度が大きいフルアソシアティブ方式のキャッシュメモリを備えて、従来の一次キャッシュメモリと並列動作させている。 In order to solve the above-described problem, the memory access device according to the present embodiment includes, in addition to the conventional primary cache memory, a full associative cache memory having a large association degree although the number of entries is small. Operates in parallel with the memory.
従来の一次キャッシュメモリでは既にリプレースされて消えている主記憶データが、連想度が大きいフルアソシアティブ方式のキャッシュメモリの方には、まだ残っているケースがあるため、キャッシュヒット率が増加して、主記憶へのアクセスを減少させ、システム性能が向上する。また、上述のフルアソシアティブ方式のキャッシュメモリのエントリ数は小さいため、追加するハードウェアは小規模に抑えることが可能である。 Since the main memory data that has already been replaced and disappeared in the conventional primary cache memory still remains in the case of a fully associative cache memory with a large association, the cache hit rate increases, Reduces access to main memory and improves system performance. In addition, since the number of entries in the above-described fully associative cache memory is small, the hardware to be added can be reduced to a small scale.
また、従来から、一次キャッシュから追い出されたデータを格納するためのデータを格納するために、フルアソシアティブ方式のビクティムキャッシュを備えたシステムも存在する。しかしながら、このビクティムキャッシュは、本実施形態のように一次キャッシュと並列に実装されてはおらず、一次キャッシュと階層的な位置関係で実装されている。すなわち、一次キャッシュがミスヒットした後、ビクティムキャッシュへのアクセスが発生することになるため、一次キャッシュミスヒット時のペナルティが発生することとなり、本実施形態と比較して、システム性能を向上させる効果は小さい。 Conventionally, there is also a system provided with a full associative victim cache for storing data for storing data evicted from the primary cache. However, this victim cache is not implemented in parallel with the primary cache as in this embodiment, but is implemented in a hierarchical positional relationship with the primary cache. That is, since the victim cache is accessed after the primary cache misses, a penalty at the time of the primary cache miss occurs, which is an effect of improving the system performance compared to the present embodiment. Is small.
さらに、本実施形態では、メモリアクセス制御装置10が、命令記憶部130を備え、命令発行部20から発行されたデータ参照命令を一時的に記憶する。データ参照命令で指定された主記憶アドレスが、第1の連想記憶装置110と第2の連想記憶装置120の両方でミスヒットした場合、主記憶アクセスが発生し主記憶からのリプライデータ待ちとなる。本実施形態では、リプライデータ待ちのデータ参照命令は、命令記憶部130に記憶されているため、アクセス制御部100は、後続命令を命令発行部20から受信して処理を継続させることで、システム性能の低下を回避することが可能となる。
Further, in the present embodiment, the memory
さらにまた、本実施形態では、第2の連想記憶装置においてリプレースが発生した場合、第1の連想記憶装置110において未使用のエントリがある場合は、リプレースで第2の連想記憶装置から追い出されたデータを、アクセス制御部100が、第1の連想記憶装置110にコピーすることで、キャッシュヒット率を向上させる効果が期待できる。
Furthermore, in this embodiment, when a replacement occurs in the second associative memory device, if there is an unused entry in the first
また、アクセス制御部100は、主記憶の何れかのアドレスのデータの写しが、第1の連想記憶装置110と第2の連想記憶装置120の両方に存在する場合、第1の連想記憶装置110における、当該アドレスのデータを格納したエントリを未使用状態に設定する。これにより、両方の連想記憶装置が同じ主記憶データを重複して記憶することを回避し、エントリを有効使用することで、キャッシュヒット率を向上させる効果が期待できる。
<第2の実施形態>
次に、本願発明の第2の実施形態について図面を参照して詳細に説明する。
In addition, the
<Second Embodiment>
Next, a second embodiment of the present invention will be described in detail with reference to the drawings.
図7は本実施形態のメモリアクセス制御装置の構成を示すブロック図である。 FIG. 7 is a block diagram showing the configuration of the memory access control device of this embodiment.
本実施形態のメモリアクセス制御装置10は、アクセス制御部100と、第1の連想記憶装置110と、第2の連想記憶装置120とを包含している。
The memory
第1の連想記憶装置110と、第2の連想記憶装置120は、主記憶装置30に記憶されたデータの写しを主記憶のアドレスと対応付けて記憶し、入力されたアドレスと一致するアドレスに対応付けられたデータを出力する。
The first
そして、一つのデータを記憶するエントリの数は、第1の連想記憶装置110の方が第2の連想記憶装置120より小さく、かつ、一つのデータを記憶する可能性のあるエントリの数である連想度は、第1の連想記憶装置110の方が第2の連想記憶装置120より大きい。
The number of entries for storing one data is the number of entries in which the first
本実施形態は、第一の実施形態と同様に、ハードウェアの増加をそれほど伴わずに、スラッシングの発生を抑止し、キャッシュメモリのヒット率を向上させることで、システム性能を向上させることができる効果がある。その理由は、メモリアクセス装置10が、エントリ数は小さいが連想度が大きい第1の連想記憶装置110と、エントリ数は大きいが連想度が小さい第2の連想記憶装置120を備え、アクセス制御部100が、データ参照命令の処理時に、これら2つの連想記憶装置を、スラッシングの発生の有無にかかわらず、並列に使用するからである。
As in the first embodiment, this embodiment can improve the system performance by suppressing the occurrence of thrashing and improving the hit rate of the cache memory without much hardware increase. effective. The reason is that the
以上、実施形態を参照して本願発明を説明したが、本願発明は上記実施形態に限定されたものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。 While the present invention has been described with reference to the embodiments, the present invention is not limited to the above embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.
1 メモリアクセス制御システム
10 メモリアクセス制御装置
100 アクセス制御部
110 第1の連想記憶装置
111 アドレス記憶部
112 データ記憶部
120 第2の連想記憶装置
121 アドレス記憶部
122 データ記憶部
130 命令記憶部
20 命令発行部
30 主記憶装置
200 主記憶アドレス空間
201 第2の連想記憶装置120へのアドレスのマッピング
202 第1の連想記憶装置110へのアドレスのマッピング
203 第1の連想記憶装置110へのアドレスのマッピング
300 アクセス制御部100の動作例
DESCRIPTION OF
Claims (8)
命令記憶手段と、
アクセス制御手段と、
を備え、
前記アクセス制御手段は、中央処理装置の命令発行部からデータ参照命令に含まれるアドレスを入力して、前記第一の連想記憶装置と前記第二の連想記憶装置に並列に出力し、前記データ参照命令の命令情報を、前記データ参照命令に含まれるアドレスに関して、前記第一及び前記第二の連想記憶装置におけるヒットした、一つの前記データを記憶するエントリの識別情報に対応付けて、前記命令記憶手段に記憶したのち、前記命令記憶手段から、前記データ参照命令の命令情報を読み出して、当該命令情報が対応付けられた前記エントリにアクセスし、
前記エントリの数は、前記第一の連想記憶装置の方が前記第二の連想記憶装置より小さく、かつ、一つの前記データを記憶する可能性のある前記エントリの数である連想度は、前記第一の連想記憶装置の方が前記第二の連想記憶装置より大きいことを特徴とする、
メモリアクセス制御装置。 A first associative memory device for storing a copy of data stored in a main memory in association with an address in the main memory, and outputting the data associated with the address that matches the input address; Two associative memory devices;
Instruction storage means;
Access control means;
With
The access control means inputs an address included in the data reference command from the command issuing unit of the central processing unit, outputs the address to the first associative memory device and the second associative memory device in parallel, and refers to the data The instruction information is associated with identification information of an entry storing one piece of the data that has been hit in the first and second associative storage devices with respect to the address included in the data reference instruction. After storing in the means, the instruction information of the data reference instruction is read from the instruction storage means, and the entry associated with the instruction information is accessed,
Number of entries, the first smaller than the content addressable memory device it is of the second content addressable memory, and the associativity is the number of the entries that may store one of the data, the The first associative memory device is larger than the second associative memory device,
Memory access control device.
請求項1に記載のメモリアクセス制御装置。 The access control means, when the address included in the data reference instruction causes a miss-hit in both the first associative memory device and the second associative memory device, the data for storing the data of the address entries, while securing both of the first content addressable memory and said second content addressable memory, the memory access control apparatus according to claim 1 to access the address of the main memory.
請求項1又は2に記載のメモリアクセス制御装置。 When accessing the main memory, the access control means assigns the identification information of the secured entry to the access request, and based on the identification information of the entry given to reply data from the main memory. , the memory access control device according to claim 1 or 2 for determining the storage destination of the entry of the reply data.
前記アクセス制御手段は、何れかの前記エントリに対応するデータ転送処理が完了したことを検知して、対応する前記データ転送ステータス情報を、転送中から転送済みに変更し、当該エントリに対応付けられた前記データ参照命令の処理を行う
請求項1乃至3のいずれかに記載のメモリアクセス制御装置。 The first associative memory device and the second associative memory device further store, for each entry, data transfer status information indicating that the data is being transferred or transferred from the main memory. ,
The access control means detects that the data transfer process corresponding to any of the entries is completed, changes the corresponding data transfer status information from being transferred to transferred, and is associated with the entry. The memory access control device according to claim 1, wherein the data reference instruction is processed.
請求項1乃至4のいずれかに記載のメモリアクセス制御装置。 When the replacement occurs in the second associative memory device, and there is an unused entry in the first associative memory device, the access control means is expelled from the second associative memory device in the replacement. The memory access control device according to claim 1, wherein the stored data is stored in the unused entry.
請求項1乃至5のいずれかに記載のメモリアクセス制御装置。 In the first associative memory device, when the copy of the data of any address in the main memory exists in both the first associative memory device and the second associative memory device, the access control means The memory access control device according to claim 1, wherein the entry storing the data of the address is set to an unused state.
一つの前記データを記憶するエントリの数は、前記第一の連想記憶装置の方が前記第二の連想記憶装置より小さく、かつ、一つの前記データを記憶する可能性のある前記エントリの数である連想度は、前記第一の連想記憶装置の方が前記第二の連想記憶装置より大きいものをメモリアクセス制御装置に設け、
中央処理装置の命令発行部からデータ参照命令に含まれるアドレスを入力して、前記第一の連想記憶装置と前記第二の連想記憶装置に並列に出力し、前記データ参照命令の命令情報を、前記データ参照命令に含まれるアドレスに関して、前記第一及び前記第二の連想記憶装置におけるヒットした、前記エントリの識別情報に対応付けて、命令記憶手段に記憶したのち、前記命令記憶手段から、前記データ参照命令の命令情報を読み出して、当該命令情報が対応付けられた前記エントリにアクセスする、
メモリアクセス制御方法。 A first associative memory device for storing a copy of data stored in a main memory in association with an address in the main memory, and outputting the data associated with the address that matches the input address; A second associative memory device,
The number of entries that store one piece of data is the number of entries that the first associative storage device is smaller than the second associative storage device and that may store one piece of the data. A certain degree of association is provided in the memory access control device in which the first associative memory device is larger than the second associative memory device,
The address included in the data reference instruction is input from the instruction issuing unit of the central processing unit, and output in parallel to the first associative storage device and the second associative storage device, and the instruction information of the data reference instruction is The address included in the data reference instruction is stored in the instruction storage unit in association with the identification information of the entry that has been hit in the first and second associative storage devices, and from the instruction storage unit, Read the instruction information of the data reference instruction, and access the entry associated with the instruction information,
Memory access control method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012212659A JP5724981B2 (en) | 2012-09-26 | 2012-09-26 | Memory access control device, memory access control system, and memory access control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012212659A JP5724981B2 (en) | 2012-09-26 | 2012-09-26 | Memory access control device, memory access control system, and memory access control method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014067250A JP2014067250A (en) | 2014-04-17 |
JP5724981B2 true JP5724981B2 (en) | 2015-05-27 |
Family
ID=50743581
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012212659A Expired - Fee Related JP5724981B2 (en) | 2012-09-26 | 2012-09-26 | Memory access control device, memory access control system, and memory access control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5724981B2 (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5317718A (en) * | 1990-03-27 | 1994-05-31 | Digital Equipment Corporation | Data processing system and method with prefetch buffers |
EP0449540B1 (en) * | 1990-03-27 | 2000-05-17 | Digital Equipment Corporation | Memory system and method with prefetch buffer |
US5860095A (en) * | 1996-01-02 | 1999-01-12 | Hewlett-Packard Company | Conflict cache having cache miscounters for a computer memory system |
WO2008093399A1 (en) * | 2007-01-30 | 2008-08-07 | Fujitsu Limited | Information processing system and information processing method |
-
2012
- 2012-09-26 JP JP2012212659A patent/JP5724981B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2014067250A (en) | 2014-04-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12007907B2 (en) | Victim cache with write miss merging | |
CN108701092B (en) | Self-healing coarse grain snoop filter | |
US8176255B2 (en) | Allocating space in dedicated cache ways | |
US8593474B2 (en) | Method and system for symmetric allocation for a shared L2 mapping cache | |
WO2012077400A1 (en) | Multicore system, and core data reading method | |
JP2018005395A (en) | Arithmetic processing device, information processing device and method for controlling arithmetic processing device | |
US6792498B2 (en) | Memory system with mechanism for assisting a cache memory | |
EP3688597A1 (en) | Preemptive cache writeback with transaction support | |
US9442856B2 (en) | Data processing apparatus and method for handling performance of a cache maintenance operation | |
US8489822B2 (en) | Providing a directory cache for peripheral devices | |
US10545875B2 (en) | Tag accelerator for low latency DRAM cache | |
JP5724981B2 (en) | Memory access control device, memory access control system, and memory access control method | |
JP7071640B2 (en) | Arithmetic processing device, information processing device and control method of arithmetic processing device | |
Lee et al. | Context-aware address translation for high performance SMP cluster system | |
JP7311959B2 (en) | Data storage for multiple data types | |
JP2024011696A (en) | Arithmetic processing apparatus and arithmetic processing method | |
JP5791133B2 (en) | Replacement data memory device, central processing unit, and replacement data processing program | |
JP2012194742A (en) | Replacement data memory device, central processing unit and replacement data processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140116 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140813 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140909 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20141106 |
|
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: 20150303 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150316 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5724981 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |