JP2022177671A - Information processing device and storage control method - Google Patents
Information processing device and storage control method Download PDFInfo
- Publication number
- JP2022177671A JP2022177671A JP2021084091A JP2021084091A JP2022177671A JP 2022177671 A JP2022177671 A JP 2022177671A JP 2021084091 A JP2021084091 A JP 2021084091A JP 2021084091 A JP2021084091 A JP 2021084091A JP 2022177671 A JP2022177671 A JP 2022177671A
- Authority
- JP
- Japan
- Prior art keywords
- memory
- target data
- data
- size
- compressed
- 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.)
- Pending
Links
- 230000010365 information processing Effects 0.000 title claims abstract description 25
- 238000000034 method Methods 0.000 title claims description 29
- 238000007906 compression Methods 0.000 claims description 41
- 230000006835 compression Effects 0.000 claims description 41
- 238000012937 correction Methods 0.000 claims description 8
- 238000007726 management method Methods 0.000 description 21
- 238000012545 processing Methods 0.000 description 12
- 230000006837 decompression Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000004904 shortening Methods 0.000 description 5
- 238000012546 transfer Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 2
- 230000012447 hatching Effects 0.000 description 2
- 230000020169 heat generation Effects 0.000 description 2
- 241001522296 Erithacus rubecula Species 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 230000000593 degrading effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Landscapes
- Memory System (AREA)
Abstract
Description
本発明は、情報処理装置、及び記憶制御方法に関する。 The present invention relates to an information processing device and a storage control method.
従来、キャッシュのデータブロックを圧縮して、キャッシュ自体の容量を仮想的に増やす方法が提案されている。この方法では、プロセッサから読み書きされるキャッシュのデータブロックと、プロセッサの間にデータの圧縮・解凍器を挟み、仮想的に保存できるキャッシュの大きさを大きくする(例えば、非特許文献1参照)。 Conventionally, a method of compressing data blocks in a cache and virtually increasing the capacity of the cache itself has been proposed. In this method, a data compressor/decompressor is interposed between a cache data block read/written from a processor and the processor to increase the size of the cache that can be virtually stored (for example, see Non-Patent Document 1).
また、ZFS、BTFS、NFSといったファイルシステムに圧縮機構を追加した方法がある。この方法では、ストレージのブロックのデータに対して圧縮を実施し、圧縮を実施したか否かを示すデータをファイルシステムにおける「ブロックテーブル」にデータ本体とは別に保存する(例えば、非特許文献4参照)。 There is also a method of adding a compression mechanism to file systems such as ZFS, BTFS, and NFS. In this method, compression is performed on storage block data, and data indicating whether or not compression has been performed is stored in a "block table" in the file system separately from the data body (for example, Non-Patent Document 4 reference).
プロセッサ及びキャッシュメモリを具備する集積回路(LSI)と、集積回路と接続されたメモリとを含むシステムにおいて、プロセッサの性能を上げるため、データをメモリに書き込む時間、及びメモリに記憶されたデータをキャッシュメモリに書き込む時間の短縮化が望まれている。このため、メモリへの書き込み対象のデータを圧縮し、圧縮されたデータをメモリに書き込み、メモリから読み出したデータを解凍してキャッシュメモリに書き込むことが考えられる。 In a system that includes an integrated circuit (LSI) with a processor and a cache memory, and a memory connected to the integrated circuit, the time to write data to the memory and the time to cache the data stored in the memory are used to improve the performance of the processor. Shortening the time to write to memory is desired. Therefore, it is conceivable to compress the data to be written to the memory, write the compressed data to the memory, decompress the data read from the memory, and write it to the cache memory.
しかしながら、従来技術では、メモリに書き込むデータを圧縮し、メモリから読み出し
たデータを解凍してキャッシュメモリに記憶する観点について開示及び示唆がない。また、圧縮処理によって、圧縮後のデータのサイズは必ずしも小さくならず、逆にサイズが大きくなることもある。このような圧縮後のデータのサイズが元のデータのサイズよりも大きくなった場合に起こる問題についての開示及び示唆もない。
However, the prior art does not disclose or suggest the aspect of compressing data to be written to memory and decompressing data read from memory and storing it in cache memory. Also, the size of compressed data does not necessarily decrease due to compression processing, and conversely, the size may increase. There is no disclosure or suggestion of problems that arise when the size of data after such compression becomes larger than the size of the original data.
本発明は、プロセッサ及びキャッシュメモリを有する集積回路とメモリとの間でやりとりされるデータ量の削減によりプロセッサの性能の向上を図ることが可能な情報処理装置を提供することを目的とする。 SUMMARY OF THE INVENTION It is an object of the present invention to provide an information processing apparatus capable of improving processor performance by reducing the amount of data exchanged between a memory and an integrated circuit having a processor and cache memory.
本発明の態様の一つは、情報処理装置である。この情報処理装置は、プロセッサと、プロセッサが使用するデータを記憶するキャッシュメモリと、圧縮器及び解凍器と、記憶制御装置とを含む集積回路と、集積回路に接続されたメモリとを含む。記憶制御装置は、対象データをメモリに記憶する場合に、圧縮器を用いた対象データの圧縮を行い、圧縮状態の対象データをメモリに送信し、圧縮状態の対象データがメモリから受信された場合に、解凍器を用いた圧縮状態の対象データの解凍を行い、解凍後の対象データをキャッシュメモリに書き込む。 One aspect of the present invention is an information processing device. The information processing apparatus includes a processor, a cache memory for storing data used by the processor, a compressor and decompressor, an integrated circuit including a storage controller, and a memory connected to the integrated circuit. When the target data is stored in the memory, the storage controller compresses the target data using a compressor, transmits the target data in the compressed state to the memory, and when the target data in the compressed state is received from the memory Then, the target data in the compressed state is decompressed using a decompressor, and the decompressed target data is written in the cache memory.
本発明の態様の一つは、記憶制御方法である。この記憶制御方法は、プロセッサと、前記プロセッサが使用するデータを記憶するキャッシュメモリと、圧縮器及び解凍器とともに集積回路に含まれる記憶制御装置が、対象データを集積回路に接続されたメモリに記憶する場合に、圧縮器を用いた対象データの圧縮を行い、圧縮状態の対象データをメモリに送信し、圧縮状態の対象データがメモリから受信された場合に、解凍器を用いた圧縮状態の対象データの解凍を行い、解凍後の対象データをキャッシュメモリに書き込むことを含む。 One aspect of the present invention is a storage control method. In this storage control method, a processor, a cache memory for storing data used by the processor, and a storage controller included in an integrated circuit together with a compressor and a decompressor store target data in a memory connected to the integrated circuit. compressing the target data using the compressor, transmitting the target data in the compressed state to the memory, and compressing the target data in the compressed state using the decompressor when the target data in the compressed state is received from the memory It includes decompressing the data and writing the decompressed target data to the cache memory.
記憶制御方法において、以下の構成を採用してもよい。すなわち、メモリの記憶領域が所定サイズを有するブロック単位で区画されており、記憶制御装置は、前記対象データの非圧縮状態におけるサイズが前記ブロックサイズを超えないが、圧縮状態の前記対象データのサイズが前記ブロックサイズを超える場合に、非圧縮状態の前記対象データを前記メモリへ転送する。 The following configuration may be employed in the storage control method. That is, the storage area of the memory is divided into blocks having a predetermined size, and the storage control device determines that the size of the target data in an uncompressed state does not exceed the block size, but the size of the target data in a compressed state does not exceed the block size. exceeds the block size, the uncompressed target data is transferred to the memory.
また、記憶制御方法において、以下の構成を採用してもよい。すなわち、記憶制御装置は、対象データが圧縮状態か非圧縮状態かを示す情報とともに、圧縮状態又は非圧縮状態の対象データをメモリに送信し、対象データ及び情報がメモリから受信され、情報が対象データの圧縮状態を示す場合に、解凍器を用いた対象データの解凍を行う。 Also, in the storage control method, the following configuration may be adopted. That is, the storage control device transmits target data in a compressed state or an uncompressed state together with information indicating whether the target data is in a compressed state or an uncompressed state, receives the target data and information from the memory, and sends the target data and information to the memory. When indicating the compression state of the data, the target data is decompressed using the decompressor.
本発明によれば、プロセッサ及びキャッシュメモリを有する集積回路とメモリとの間でやりとりされるデータ量の削減によりプロセッサの性能の向上を図ることができる。 According to the present invention, the performance of the processor can be improved by reducing the amount of data exchanged between the memory and the integrated circuit having the processor and cache memory.
実施形態に係る情報処理装置は、プロセッサと、プロセッサが使用するデータを記憶するキャッシュメモリと、圧縮器及び解凍器と、記憶制御装置とを含む集積回路と、集積回路に接続されたメモリとを含む。記憶制御装置は、対象データをメモリに記憶する場合に、圧縮器を用いた対象データの圧縮を行い、圧縮状態の対象データをメモリに送信し、圧縮状態の対象データがメモリから受信された場合に、解凍器を用いた圧縮状態の対象データの解凍を行い、解凍後の対象データをキャッシュメモリに書き込む。 An information processing apparatus according to an embodiment includes an integrated circuit including a processor, a cache memory for storing data used by the processor, a compressor and decompressor, and a storage controller, and a memory connected to the integrated circuit. include. When the target data is stored in the memory, the storage controller compresses the target data using a compressor, transmits the target data in the compressed state to the memory, and when the target data in the compressed state is received from the memory Then, the target data in the compressed state is decompressed using a decompressor, and the decompressed target data is written in the cache memory.
情報処理装置によれば、対象データをメモリに記憶する場合に、集積回路からメモリへ圧縮状態の対象データが送信される。また、キャッシュメモリにデータを記憶する場合に、圧縮状態の対象データが受信される。集積回路とメモリとの間の通信速度が一定の場合、対象データの圧縮によって対象データのサイズが小さくなることで、両者間のデータ伝送に要する時間が短縮される。このため、プロセッサから見たときのメモリへのデータの書き込みに要する時間を短縮することができる。また、非圧縮状態よりもサイズが小さくなった圧縮状態の対象データが集積回路にて受信され、解凍されてキャッシュメモリに記憶されることにより、プロセッサから見たときのメモリからの読み出し時間を短縮することができる。このように、メモリに対する書き込み時間及び読み出し時間の短縮によってプロセッサの性能の向上を図ることができる。 According to the information processing apparatus, when target data is stored in the memory, the target data in a compressed state is transmitted from the integrated circuit to the memory. Also, when storing data in the cache memory, compressed target data is received. When the communication speed between the integrated circuit and the memory is constant, the compression of the target data reduces the size of the target data, thereby shortening the time required for data transmission between the two. Therefore, it is possible to shorten the time required for writing data to the memory as seen from the processor. In addition, target data in a compressed state whose size is smaller than that in an uncompressed state is received by the integrated circuit, decompressed, and stored in the cache memory, thereby shortening the read time from the memory as seen from the processor. can do. In this way, the performance of the processor can be improved by shortening the write time and read time for the memory.
情報処理装置は、以下のような構成を採用することができる。すなわち、メモリの記憶領域が対象データを記憶可能な所定サイズのブロックで区画されている場合において、記憶制御装置は、非圧縮状態の対象データのサイズがブロックのサイズを超えないが、圧縮状態の対象データのサイズがブロックのサイズを超える場合に、非圧縮状態の対象データをメモリへ送信する。対象データのサイズは、圧縮によって必ずしも小さくなる訳ではなく、圧縮後のサイズが元のサイズよりも大きくなることがある。このような場合、圧縮後の対象データである圧縮状態の対象データではなく、元の対象データである非圧縮状態の対象データを送信することで、メモリへ送信されるデータ量を抑える。 The information processing apparatus can employ the following configuration. That is, when the storage area of the memory is partitioned into blocks of a predetermined size capable of storing target data, the storage control device determines that the size of the uncompressed target data does not exceed the block size, but the When the target data size exceeds the block size, the uncompressed target data is sent to the memory. The size of target data is not necessarily reduced by compression, and the size after compression may become larger than the original size. In such a case, the amount of data to be transmitted to the memory is suppressed by transmitting not the compressed target data, which is the target data after compression, but the uncompressed target data, which is the original target data.
また、情報処理装置は、以下のような構成を採用することができる。すなわち、記憶制御装置は、対象データが圧縮状態か非圧縮状態かを示す情報とともに、圧縮状態又は非圧縮状態の対象データをメモリに送信する。メモリは、情報と対象データとをブロックの何れかに記憶する。対象データ及び情報がメモリから受信され、情報が対象データの圧縮状態を示す場合に、記憶制御装置は、解凍器を用いた対象データの解凍を行う。このように、メモリへ送信される対象データが圧縮状態か非圧縮状態かを示す情報が対象データとともにメモリに記憶され、メモリからの読み出しの際に対象データと情報とが記憶制御装置に渡されることで、記憶制御装置は解凍の要否を判定することができる。解凍が不要な場合は解凍を行うことなくキャッシュメモリへの書き込みを行うことで、キャッシュメモリへの書き込み終了までの所要時間を短縮することができる。 Further, the information processing apparatus can employ the following configuration. That is, the storage control device transmits the compressed or uncompressed target data to the memory along with information indicating whether the target data is compressed or uncompressed. A memory stores information and target data in one of blocks. When target data and information are received from the memory and the information indicates the compression state of the target data, the storage controller decompresses the target data using the decompressor. In this way, information indicating whether the target data to be transmitted to the memory is in a compressed state or a non-compressed state is stored in the memory together with the target data, and the target data and information are passed to the storage control device when reading from the memory. Thus, the storage controller can determine whether or not decompression is necessary. If decompression is not required, writing to the cache memory without decompression can shorten the time required to complete writing to the cache memory.
対象データが圧縮状態か非圧縮状態かを示す情報がメモリに記憶される場合、メモリは誤り訂正符号メモリ(ECCメモリ)を使用し、誤り訂正符号メモリが有する誤り訂正符号の記憶領域に情報が保管される構成を採用するのが好ましい。これにより、対象データ
と当該情報とを関連づけた状態でメモリに記憶することができる。
When information indicating whether the target data is in a compressed state or a non-compressed state is stored in the memory, the memory uses an error correction code memory (ECC memory), and the information is stored in the error correction code storage area of the error correction code memory. Preferably, a stored configuration is employed. As a result, the target data and the information can be stored in the memory while being associated with each other.
また、情報処理装置は、以下のような構成を採用することができる。すなわち、メモリの記憶領域に、ブロックのサイズより大きいサイズを有する圧縮ブロック単位でデータを記憶するように規定される。メモリに送信された圧縮状態の対象データが、各圧縮ブロックに記憶される。このような構成を採用することで、圧縮状態の対象データのサイズが圧縮前の対象データのサイズよりも大きくなり、そのサイズがブロックのサイズを超える場合でも、圧縮状態の対象データを好適に記憶することができる。 Further, the information processing apparatus can employ the following configuration. That is, it is stipulated that data is stored in the storage area of the memory in compressed block units having a size larger than the block size. Compressed subject data sent to memory is stored in each compressed block. By adopting such a configuration, even if the size of the target data in the compressed state becomes larger than the size of the target data before compression, and the size exceeds the size of the block, the target data in the compressed state is preferably stored. can do.
以下、図面を参照して、情報処理装置及び記憶制御方法の実施形態について説明する。実施形態の構成は例示であり、本発明は実施形態の構成に限定されない。 Embodiments of an information processing apparatus and a storage control method will be described below with reference to the drawings. The configuration of the embodiment is an example, and the present invention is not limited to the configuration of the embodiment.
図1は、実施形態に係る情報処理装置1の構成例を示す。図1において、情報処理装置1は、集積回路の一例であるマイクロプロセッサLSI10(以下、集積回路10)と、集積回路10にバス2を介して接続されたメモリ(主記憶装置)15と、集積回路10にバス2を介して接続されたストレージ(補助記憶装置)21とを含む。
FIG. 1 shows a configuration example of an information processing apparatus 1 according to an embodiment. In FIG. 1, an information processing apparatus 1 includes a microprocessor LSI 10 (hereinafter, integrated circuit 10) which is an example of an integrated circuit, a memory (main storage device) 15 connected to the
集積回路10は、プロセッサ11と、キャッシュメモリ12と、記憶制御装置(Memory
Management Unit:MMU)13と、MMU13によって使用される圧縮器14A及び解凍器14Bとを含む。
The
Management Unit (MMU) 13, and
プロセッサ11は、マイクロプロセッサ(MPU)、CPU(Central Processing Unit)などである。キャッシュメモリ12は、集積回路10内に実装されている。メモリ1
5及びストレージ21は、バス2を介して集積回路10に接続されている。すなわち、メモリ15及びストレージ21は、集積回路10の外部に配置されている。
The
5 and
キャッシュメモリ12、メモリ15、及びストレージ21は、プロセッサ11によって使用されるデータを記憶する。キャッシュメモリ12は、メモリ15及びストレージ21よりも近い位置に配置された、高速及び小容量(クロック周波数がGHzオーダーで、容量が数MB)の記憶媒体であり、SRAMなどで構成される。メモリ15は、キャッシュメモリ12よりも低速だが容量が大きい(クロック周波数が100MHz程度、容量が数GB)記録媒体であり、DRAMなどを用いて構成される。ストレージ21は、メモリ15よりも速度が遅いが大容量(クロック周波数が数十MHz、容量が数TB)の記憶媒体であり、例えばハードディスク、SSD(Solid State Drive)などである。
通常、プロセッサ11が処理を行う場合には、ストレージ11から処理対象のデータが読み出され、メモリ15に記憶される。メモリ15に記憶されたデータがプロセッサ11に渡される過程において、データがキャッシュメモリ12に記憶されていなければ、キャッシュメモリ12に当該データが記憶される。プロセッサ11からメモリ15に記憶されたデータの読み出しが要求された場合、キャッシュメモリ12に要求されたデータが記憶されているかが判定され、該当のデータが記憶されている場合、メモリ15からの読み出しは行われず、キャッシュメモリ12に記憶されたデータがプロセッサ11に渡される。
Normally, when the
キャッシュメモリ12に用いるSRAMは高価であるため、現状、第1~第4次キャッシュを有するCPUが存在するが、キャッシュメモリの大容量化は難しい。このため、メモリ15への書き込み及びメモリ15からの読み出し時の所要時間を短縮することがプロセッサ11の性能向上に関して重要な要素である。
Since the SRAM used for the
プロセッサ11とメモリ15との間の入出力速度を高速化するには、以下が考えられる。
(1)メモリ15のインタフェースの高速化
(2)メモリ15のインタフェースのビット数の増加
In order to speed up the input/output speed between the
(1) Speeding up the interface of the memory 15 (2) Increasing the number of bits of the interface of the
しかし、(1)のメモリ15のインタフェースの高速化を図る方法では、プリント基板への実装の難度が高い、或いはトランジスタのスイッチングが増大し、消費電力が増大して発熱が起こる問題があった。一方、(2)のメモリ15のインタフェースのビット数を増大する方法では、集積回路10のピン数が増大するためコストが増大する。また、(1)と同様に、プリント基板への実装の難度が高い問題や、トランジスタのスイッチング増大による発熱の問題もあった。このため、本実施形態では、メモリ15への書き込み対象のデータ(対象データ)を圧縮することで、書き込みのためにメモリ15へ伝送されるデータ量、及び読み出しのためにメモリ15から集積回路10に伝送されるデータ量を削減することで、書き込み及び読み出しに係る所要時間の短縮化を図り、プロセッサ11の性能の向上を図る。
However, the method (1) for speeding up the interface of the
キャッシュメモリ12に記憶されるデータ管理等のキャッシュ制御は、例えば、MMU13によって行われる。もっとも、MMU以外にキャッシュ制御を行う主体(キャッシュコントローラ)が設けられ、キャッシュ制御はキャッシュコントローラが行う構成であってもよい。すなわち、本発明に係る「記憶制御装置」は、MMUがキャッシュ制御を行う構成であっても、MMUとキャッシュコントローラとを含む構成であってもよい。本実施形態では、MMU13が圧縮器14A及び解凍器14Bの機能を有する、又は圧縮器14A及び解凍器14Bの動作を制御する構成を採用し、対象データの圧縮及び解凍を可能としている。圧縮器14A及び解凍器14Bに適用される圧縮及び解凍方法は、データの可逆的な圧縮及び解凍が可能である限りにおいて制限はない。
Cache control such as management of data stored in the
本実施形態において、メモリ15におけるデータ管理は、ベースアドレスと呼ばれるアドレスを起点にした複数の連続するアドレスの記憶領域をまとめた物理ブロック(ブロック15aと称する)単位で行われる。メモリ15の記憶領域は、所定サイズを有するブロック15aで区画されている。メモリ15に対するデータの読み書きは、ベースアドレスを起点に、1つのブロック15aをなす連続する所定数のアドレスに対して順次アクセスして読み書きを行うことでなされる(バーストモードと呼ばれる)。キャッシュメモリ12へのデータの書き込みは、ブロック15a単位で行われる。ブロック15aのサイズは適宜定めることができる。
In this embodiment, data management in the
メモリ15に対するバーストモードでのアクセスの恩恵を得るため、キャッシュメモリ12は、ブロック15aのサイズに合致する数十から数キロバイトのブロック(記憶領域)の単位でキャッシュデータを管理する構成を有する。このブロックの単位でメモリ15とデータを交換している。
In order to obtain the benefit of burst mode access to the
図2Aに示すように、MMU13は、キャッシュメモリ12の記憶領域とメモリ15の記憶領域との関連を管理する管理テーブル16を有している。管理テーブル16は、図2Bに示すように、メモリ15のブロック15aに記憶されたデータを記憶するキャッシュメモリ12上のブロック12aの位置(アドレス)を示すキャッシュタグ(キャッシュメモリ12のブロックの識別子)と、ブロック12aに記憶されたデータをメモリ15上で記憶するブロック15aの起点アドレスであるベースアドレスとの対応関係を記憶する。
As shown in FIG. 2A, the
プロセッサ11は、メモリ15の全てのアドレスに対してアクセス可能であり、データの書き込み及び読み出し命令は、メモリ15のベースアドレスを指定することで行う。メモリ15のブロック15aに記憶されたデータがキャッシュメモリ12のブロック12aに記憶されている場合、メモリ15のベースアドレスと関連づけて、キャッシュメモリ12のブロック12aを特定するキャッシュタグが管理テーブル16に記憶される。
The
MMU13は、プロセッサ11から、メモリ15の或るベースアドレスを指定したデータの読み出し命令を受けた場合、管理テーブル16を参照する。このとき、指定されたベースアドレスに関連するキャッシュタグが管理テーブル16に記憶されていれば、MMU13は、キャッシュタグにより特定されるキャッシュメモリ12のブロック12aからデータを読み出してプロセッサ11に供給する(キャッシュヒット)。
The
MMU13は、管理テーブル16の参照において、指定されたベースアドレスと関連づけられたキャッシュタグが管理テーブル16に記憶されていない場合、キャッシュメモリ12に読み出し対象のデータが記憶されていないと判定する(キャッシュミス)。このとき、MMU13は、読み出し命令で指定されたメモリ15のベースアドレスを起点として1ブロック分の連続アドレスに対するアクセス(データ読み出し)を行い、ベースアドレスによって特定されるメモリ15のブロック15aからデータを読み出す。MMU13は、メモリ15から読み出したデータをキャッシュメモリ12の空き状態(上書き可能な状態を含む)のブロック12aに記憶し、このブロック12aのキャッシュタグをベースアドレスと関連づけて管理テーブル16に記憶する。
In referring to the management table 16, if the management table 16 does not store the cache tag associated with the designated base address, the
プロセッサ11が、キャッシュメモリ12に記憶されたデータを更新し、メモリ15への書き込み命令を発行した場合、MMU13は、管理テーブル16を参照し、書き込み命令で指定されたベースアドレスと関連づけられたキャッシュタグを特定し、このキャッシュタグで特定されるキャッシュメモリ12のブロック12aに、更新されたデータを書き込む。
When the
MMU13は、例えば、データを記憶したキャッシュメモリ12の各ブロック12aに対するアクセスを監視し、アクセスが所定時間連続して行われないブロック12aが発生した場合、該当のブロック12aに記憶されたデータを読み出す。或いは、MMU13は、プロセッサ11のデータの読み出し命令に従ってメモリ15から読み出したデータを記憶可能なキャッシュメモリ12のブロック12aがない場合に、所定のルールに従ってブロック12aの一つを選択し、選択したブロック12aに記憶されているデータを読み出す。
For example, the
ブロック12aを選択する所定のルールとして、例えば、ブロック12aのいずれかをサイクリックに(ラウンドロビンで)指すポインタの現在位置にあたるブロック12aが読み出し対象として選択される。ポインタの進め方は種々あるが、例えば何れかのブロック12aからの読み出し毎にポインタを1つ進める。或いは、各ブロック12aに最後の読み出し時を記録するタイムスタンプを設定して、タイムスタンプが最古のブロック12aが読み出し対象として選択されてもよい。所定のルールはこれらの例示に制限されない。
As a predetermined rule for selecting the
MMU13は、管理テーブル16を参照して、該当のブロック12aのキャッシュタグと関連づけられたベースアドレスを起点とするメモリ15上のブロック15aを特定し、バーストモードを用いてブロック12aから読み出したデータを特定したブロック15aに記憶する。このとき、MMU13は、管理テーブル16から該当のキャッシュタグ及びベースアドレスのペアを削除することで、当該キャッシュタグで特定されるキャッシュメモリ12のブロック12aを空き状態に設定する。
The
また、プロセッサ11が、プログラムに従った処理または計算によってキャッシュメモリ13及びメモリ15に記憶されていないデータを生成した場合、プロセッサ11は、プログラムに従ってメモリ15の書き込み先のベースアドレスを指定したデータの書き込み命令を発行する。ベースアドレスとして、空き状態(上書き可能な状態を含む)のメモリ
15上のブロック15aのベースアドレスが指定される。このようなベースアドレスは管理テーブル16から発見されないため、MMU13は、書き込み命令で指定されたベースアドレスで特定されるブロック15aに、書き込み対象のデータを書き込む。
In addition, when the
上記のように、本実施形態の情報処理装置1では、メモリ15に対し、ベースアドレスより細かい粒度でのアクセスはできない構成となっている。すなわち、メモリ15は、ベースアドレス毎に区分けされている。
As described above, the information processing apparatus 1 of the present embodiment is configured such that the
本実施形態における情報処理装置1では、メモリ15にデータを書き込む(記憶する)場合に、MMU13が、圧縮器14Aにより書き込み対象のデータの圧縮を行う。ところが、書き込み対象のデータのサイズは、圧縮によって必ずしも小さくなるとは限らず、逆にサイズが大きくなることもある。このようなサイズの増大は、データのランダム性が高い場合などに発生する。
In the information processing apparatus 1 according to the present embodiment, when writing (storing) data in the
図3Aは、圧縮器14Aによる圧縮によって書き込み対象のデータのサイズが小さくなる場合を示す。圧縮によってデータのサイズが小さくなる場合には、データ(網掛けで示す)は、書き込み先のブロック15a内に収まる。このとき、メモリ15への転送対象のデータ量が減る。
FIG. 3A shows a case where the size of data to be written is reduced by compression by the
図3Bは、圧縮器14Aによる圧縮によって書き込み対象のデータのサイズが大きくなる場合を示す。圧縮によってデータのサイズが大きくなる場合には、データ(網掛けで示す)は、書き込み先のブロック15a内に収まらず、書き込み先のブロック15aに隣接するブロック15a(隣接ブロック)にまでデータが書き込まれるおそれがあった。この場合、隣接ブロックに対するデータの上書きで、隣接ブロックのデータが破損するおそれがあった。また、圧縮によるデータ量の増大で、書き込みに対するオーバヘッド時間が長くなり、プロセッサ11の性能低下の要因となる可能性があった。
FIG. 3B shows a case where the size of data to be written increases due to compression by the
そこで、本実施形態では、図4に示すように、MMU13が、圧縮器14Aによる書き込み対象のデータの圧縮において、圧縮後のデータのサイズがブロック15aのサイズ以上となることを検出した場合に、圧縮器14Aの動作を停止し、元の(非圧縮状態の)データをメモリ15に伝送して書き込む。元のデータのサイズはブロック15aに収まるサイズであるため、メモリ15へ伝送されるデータ量は減らないが、隣接ブロックを上書きする問題を回避することができる。
Therefore, in this embodiment, as shown in FIG. 4, when the
図5は、実施形態に係るメモリ15の構成例(第1の構成例)を示す。図5に示すように、メモリ15は、4つのアドレスに対応する記憶領域がまとまって1つのブロック15aを形成しており、アドレス毎に、書き込み対象のデータが圧縮状態か非圧縮状態(元の状態)かを示す情報が設定される領域(フィールド)15bが設けられている。
FIG. 5 shows a configuration example (first configuration example) of the
本実施形態では、データが圧縮されている場合に、データの圧縮状態を示すビット(圧縮ビット)が設定される。但し、データの非圧縮状態を示すビット(非圧縮ビット)が設定されてもよい。圧縮ビットは、メモリ15へのアクセス単位(例えばワード単位)でアドレスが設定されている場合、ワード毎に付加され、ワード単位で圧縮状態か非圧縮状態かを示す。MMU13は、メモリ15のブロック15aからのデータの読み出しに際し、ワード単位での圧縮ビットを参照し、データが圧縮状態か非圧縮状態かを識別するとともに、どこまでデータが圧縮されているかを識別する。
In this embodiment, when the data is compressed, a bit (compression bit) indicating the compression state of the data is set. However, a bit (uncompressed bit) indicating the uncompressed state of data may be set. When the address is set in units of access to the memory 15 (for example, in word units), the compression bit is added to each word and indicates whether the word is in a compressed state or a non-compressed state. When reading data from the
圧縮ビットの実装方法としては、集積回路10に、圧縮ビットを伝送するためのピンを追加する。また、メモリ15に圧縮ビットを格納するための領域15bを追加する。例えば、1アドレスが32ビットのワード長で圧縮ビットが1ビットの場合、33ビットのデ
ータ幅を格納できるようにメモリ15のデータ幅を増やす。メモリ15としてECCメモリを適用し、誤り訂正符号を記憶するフィールドを領域15bとして利用し、圧縮ビットを格納することができる。
Compressed bits are implemented by adding pins to integrated
図6は、メモリ15へのデータの書き込み時におけるMMU13の動作例を示すフローチャートである。ステップS11では、MMU13は、プロセッサ11から発行されたメモリ15へのデータの書き込み命令(書き込み要求)を取得する(受け取る)。
FIG. 6 is a flow chart showing an operation example of the
ステップS12では、MMU13は、メモリ15への書き込み対象のデータ(対象データ)を取得する。対象データは、キャッシュメモリ12のブロック12aに記憶された更新データ、又はプロセッサ11から受け取る新規データ(キャッシュメモリ12及びメモリ15に記憶されていないデータ)である。
In step S<b>12 , the
ステップS13では、MMU13は、圧縮器14Aの動作をオンにして、対象データの圧縮を行う。圧縮は、ワード単位で行われる。ステップS14では、MMU14は、圧縮されたデータ(圧縮データ)のサイズがメモリ15のブロック15aのサイズを超過するか否かを判定する。圧縮データのサイズがブロック15aのサイズより小さいと判定される場合には(S14のNO)、処理がステップS15に進み、そうでない場合(圧縮データのサイズがブロック15aのサイズを超過する場合:S14のYES)には、処理がステップS17に進む。
In step S13, the
ステップS15では、MMU13は、対象データの全てについての圧縮が終了したか否かを判定する。このとき、圧縮が終了したと判定される場合には、処理がステップS16に進み、そうでないと判定される場合には、処理がステップS13に戻って次のワードのデータに対する圧縮が行われる。
In step S15, the
ステップS16では、MMU13は、書き込み先のブロック15aのベースアドレスを起点として、ブロック15aに圧縮状態の対象データを書き込む。このとき、MMU13は、バーストモードによって、ブロック15aをなすワード単位(アドレス単位)で圧縮データ及び圧縮ビットをメモリ15に転送する。圧縮データ及び圧縮ビットは、ブロック15a中の該当の記憶領域に書き込まれる。
In step S16, the
ステップS17では、MMU13は、圧縮器14Aの動作を停止する。ステップS18では、MMU13は、書き込み先のブロック15aのベースアドレスを起点として、ブロック15aに非圧縮状態の対象データを書き込む。このとき、MMU13は、バーストモードによって、ブロック15aをなすワード単位(アドレス単位)で非圧縮状態のデータ(非圧縮データ)をメモリ15に転送する。非圧縮データは、ブロック15a中の該当の記憶領域に書き込まれる。
At step S17, the
なお、ワード単位の圧縮データ及び圧縮ビットの転送は、リアルタイム処理で行われてもバッチ処理で行われてもよい。リアルタイム処理の転送が行われる場合、ステップS14でYESの判定がなされたことを機に、データの圧縮の停止により圧縮データ及び圧縮ビットの転送が停止され、非圧縮状態の対象データの転送が開始される。 It should be noted that the transfer of the compressed data in units of words and the compressed bits may be performed by real-time processing or by batch processing. When real-time processing is transferred, the transfer of compressed data and compressed bits is stopped by stopping data compression when a determination of YES is made in step S14, and the transfer of non-compressed target data is started. be done.
図7は、メモリ15からのデータの読み出し時におけるMMU13の動作例を示すフローチャートである。ステップS21では、MMU13は、プロセッサ11から発行されたメモリ15からのデータの読み出し命令(読み出し要求)を取得する(受け取る)。
FIG. 7 is a flow chart showing an operation example of the
ステップS22では、MMU13は、管理テーブル16を参照し、読み出し命令で指定されたベースアドレスのレコードを管理テーブル16から探索する。管理テーブル16か
ら指定されたベースアドレスと関連づけられたキャッシュタグが発見された場合、MMU13は、キャッシュヒットと判定し、処理をステップS27に進める。これに対し、指定されたベースアドレスのレコードが管理テーブル16から発見されない場合、MMU13はキャッシュミスと判定し、処理をステップS23に進める。
In step S22, the
ステップS23では、MMU13は、指定されたベースアドレスを起点とするメモリ15のブロック15aに記憶されたデータを取得する。ステップS24では、MMU13は、ブロック15aから圧縮ビットが読み出されているか否かを判定することによって、データが圧縮データか否か(圧縮状態か非圧縮状態か)を判定する。このとき、データが圧縮データであると判定される場合には、処理がステップS25に進み、そうでない場合には、処理がステップS26に進む。
In step S23, the
ステップS25では、MMU13は、解凍器14Bを用いて(解凍器14Bの動作を制御して)、メモリ15から読み出されたデータの解凍を行う。ステップS26では、MMU13は、キャッシュメモリ12の空き状態のブロック12aにデータを書き込む。このとき、MMU13は、管理テーブル16に、ベースアドレスと、データを書き込んだブロック12aのキャッシュタグとのペアを登録する。
In step S25, the
ステップS26では、MMU13は、キャッシュメモリ12のブロック12aに記憶したデータをプロセッサ11に供給する。これによって、読み出し命令に対応するデータがプロセッサ11に供給される。
At step S26, the
図8は、図5に示したメモリ15の構成と異なる、メモリ15の他の構成例(第2の構成例)を示す。図8において、メモリ15には、一例としてブロック15aの2倍のサイズを有するブロック15c(圧縮ブロックと称する)が規定されている。そして、圧縮器14Aによって圧縮されたデータは、圧縮によるサイズの増減とは無関係に、圧縮ブロック15cを単位に記憶される。
FIG. 8 shows another configuration example (second configuration example) of the
図9は、第2の構成例に係るメモリ15へのデータの書き込み時におけるMMU13の動作例を示すフローチャートである。図9に示すフローチャートにおけるステップS11~S13の処理は、図6におけるステップS11~S13と同じ処理である。これに対し、図9に示すフローチャートでは、図6に示すステップS14~S18の処理がない代わりに、ステップS16Aが設けられている。ステップS16Aでは、MMU13は、ベースアドレスを起点に圧縮データをメモリ15の圧縮ブロック15cに書き込む。第2の構成例では、ベースアドレスは、圧縮ブロック15cの起点となるアドレスである。
FIG. 9 is a flowchart showing an operation example of the
図10は、第2の構成例におけるメモリ15からのデータの読み出し時におけるMMU13の動作例を示すフローチャートである。第2の構成例が適用される場合、メモリ15から読み出されるデータは圧縮状態のデータである。このため、図10に示すフローチャートでは、図7のフローチャートにおけるステップS24の処理、すなわち、データが圧縮状態か非圧縮状態かの判定は行われず、ステップS23からステップS25に進んで、データが解凍される。この点を除き、図10のフローチャートの処理は、図7のフローチャートの処理と同じである。
FIG. 10 is a flowchart showing an operation example of the
実施形態に係る情報処理装置1は、プロセッサ11と、プロセッサ11が使用するデータを記憶するキャッシュメモリ12と、圧縮器14A及び解凍器14Bと、記憶制御装置(MMU)13とを含む集積回路10と、集積回路10に接続されたメモリ15とを含む。MMU13は、対象データをメモリ15に記憶する場合に、圧縮器14Aを用いた対象データの圧縮を行い、圧縮状態の対象データをメモリ15に送信する。また、MMU13は、圧縮状態の対象データがメモリ15から受信された場合に、解凍器14Bを用いた圧
縮状態の対象データの解凍を行い、解凍後の対象データをキャッシュメモリ12に書き込む。
The information processing apparatus 1 according to the embodiment is an
これによって、集積回路10とメモリ15との間を伝送されるデータ量を減らして集積回路10とメモリ15との間の伝送帯域(スループット)を増大させることができる。このスループットの増大によって、メモリ15に対する読み書きの所要時間を短縮することができ、プロセッサ11の性能向上を図ることができる。
As a result, the amount of data transmitted between the
情報処理装置1では、メモリ15の記憶領域が対象データを記憶するブロックで区画されている。MMU13は、非圧縮状態の対象データのサイズがブロック15aのサイズを超えないが、圧縮状態の対象データのサイズがブロック15aのサイズを超える場合に、非圧縮状態の対象データをメモリ15へ送信する。これによって、メモリ15へ送信するデータ量を減らすことができる。
In the information processing apparatus 1, the storage area of the
また、MMU13は、対象データが圧縮状態を示す情報(圧縮ビット)とともに、圧縮状態の対象データをメモリ15に送信する。メモリ15は、圧縮ビットと圧縮状態の対象データとをブロック15aの何れかに記憶する。対象データ及び圧縮ビットがメモリ15から受信された場合に、MMU13は、解凍器による対象データの解凍を行う。このように、メモリ15から読み出したデータの解凍の要否を圧縮ビットを用いて行うことができる。この構成に好適なメモリ15の構成として、メモリ15にECCメモリが適用され、ECCメモリが有する誤り訂正符号の記憶領域(フィールド)15bに、圧縮ビットが保管される。
The
また、実施形態では、メモリ15の第2の構成例として、メモリ15の記憶領域に、ブロック15aのサイズより大きいサイズを有する圧縮ブロック15c単位でデータを記憶するように規定することができる。そして、メモリ15に送信された圧縮状態の対象データが、圧縮ブロック15cに記憶される。このように圧縮ブロック15cを用いることで、圧縮によってデータサイズが大きくなる場合でも、圧縮状態のデータを圧縮ブロック15cに収めることができ、隣接するブロックの上書きを回避することができる。以上説明した実施形態の構成は、発明の目的を逸脱しない範囲で適宜組み合わせることができる。
Further, in the embodiment, as a second configuration example of the
1・・・情報処理装置
2・・・バス
10・・・集積回路(マイクロプロセッサLSI)
11・・・プロセッサ
12・・・キャッシュメモリ
13・・・記憶制御装置(MMU)
14A・・・圧縮器
14B・・・解凍器
15・・・メモリ
15a・・・ブロック
15b・・・圧縮ビットの記憶領域(フィールド)
15c・・・圧縮ブロック
16・・・管理テーブル
1
11
Claims (8)
前記集積回路に接続されたメモリと、を含み、
前記記憶制御装置は、対象データを前記メモリに記憶する場合に、前記圧縮器を用いた前記対象データの圧縮を行い、圧縮状態の前記対象データを前記メモリに送信し、圧縮状態の前記対象データが前記メモリから受信された場合に、前記解凍器を用いた圧縮状態の前記対象データの解凍を行い、解凍後の前記対象データを前記キャッシュメモリに書き込む、
情報処理装置。 an integrated circuit including a processor, a cache memory for storing data used by the processor, a compressor and decompressor, and a storage controller;
a memory connected to the integrated circuit;
When storing target data in the memory, the storage control device compresses the target data using the compressor, transmits the target data in a compressed state to the memory, and stores the target data in a compressed state. is received from the memory, decompressing the target data in a compressed state using the decompressor, and writing the decompressed target data to the cache memory;
Information processing equipment.
請求項1に記載の情報処理装置。 When the storage area of the memory is partitioned into blocks of a predetermined size capable of storing the target data, the storage control device determines that the size of the target data in an uncompressed state does not exceed the size of the block, 2. The information processing apparatus according to claim 1, wherein when the size of the target data in a compressed state exceeds the size of the block, the target data in a non-compressed state is transmitted to the memory.
前記メモリは、前記情報と前記対象データとを前記ブロックの何れかに記憶し、
前記対象データ及び前記情報が前記メモリから受信され、前記情報が前記対象データの圧縮状態を示す場合に、前記記憶制御装置は、前記解凍器による前記対象データの解凍を行う
請求項2に記載の情報処理装置。 The storage control device transmits information indicating whether the target data is in a compressed state or an uncompressed state and the target data in a compressed state or an uncompressed state to the memory,
the memory stores the information and the target data in any of the blocks;
3. The method according to claim 2, wherein when the target data and the information are received from the memory and the information indicates the compression state of the target data, the storage control device causes the decompressor to decompress the target data. Information processing equipment.
請求項3に記載の情報処理装置。 4. The information processing apparatus according to claim 3, wherein said memory is an error correction code memory, and said information is stored in an error correction code storage area of said error correction code memory.
前記メモリに送信された圧縮状態の前記対象データが、前記圧縮ブロックに記憶される請求項2に記載の情報処理装置。 The storage area of the memory is defined to store data in units of compressed blocks having a size larger than the size of the block,
3. The information processing apparatus according to claim 2, wherein the compressed target data transmitted to the memory is stored in the compressed block.
対象データを前記集積回路に接続されたメモリに記憶する場合に、前記圧縮器を用いた前記対象データの圧縮を行い、
圧縮状態の前記対象データを前記メモリに送信し、
圧縮状態の前記対象データが前記メモリから受信された場合に、前記解凍器を用いた圧縮状態の前記対象データの解凍を行い、
解凍後の前記対象データを前記キャッシュメモリに書き込む
ことを含む記憶制御方法。 a processor, a cache memory for storing data used by the processor, and a storage controller included on an integrated circuit with a compressor and a decompressor,
when storing target data in a memory connected to the integrated circuit, compressing the target data using the compressor;
transmitting the target data in a compressed state to the memory;
when the target data in a compressed state is received from the memory, decompressing the target data in a compressed state using the decompressor;
A storage control method comprising writing the decompressed target data into the cache memory.
前記記憶制御装置は、前記対象データの非圧縮状態におけるサイズが前記ブロックのサイズを超えないが、圧縮状態の前記対象データのサイズが前記ブロックのサイズを超える場合に、非圧縮状態の前記対象データを前記メモリへ転送する
請求項6に記載の記憶制御方法。 a storage area of the memory is partitioned into blocks having a predetermined size;
When the size of the target data in an uncompressed state does not exceed the size of the block, but the size of the target data in a compressed state exceeds the size of the block, the storage control device controls the size of the target data in an uncompressed state. 7. The storage control method according to claim 6, wherein the data is transferred to said memory.
請求項6に記載の記憶制御方法。 The storage control device transmits the target data in a compressed state or an uncompressed state together with information indicating whether the target data is in a compressed state or an uncompressed state, and receives the target data and the information from the memory. 7. The storage control method according to claim 6, wherein said target data is decompressed using said decompressor when said information indicates the compression state of said target data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021084091A JP2022177671A (en) | 2021-05-18 | 2021-05-18 | Information processing device and storage control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021084091A JP2022177671A (en) | 2021-05-18 | 2021-05-18 | Information processing device and storage control method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2022177671A true JP2022177671A (en) | 2022-12-01 |
Family
ID=84237670
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021084091A Pending JP2022177671A (en) | 2021-05-18 | 2021-05-18 | Information processing device and storage control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2022177671A (en) |
-
2021
- 2021-05-18 JP JP2021084091A patent/JP2022177671A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9996466B2 (en) | Apparatus, system and method for caching compressed data | |
US8122216B2 (en) | Systems and methods for masking latency of memory reorganization work in a compressed memory system | |
US7958289B2 (en) | Method and system for storing memory compressed data onto memory compressed disks | |
US20050015374A1 (en) | System and method for utilizing compression in database caches to facilitate access to database information | |
WO2014188528A1 (en) | Memory device, computer system, and memory device control method | |
US10678443B2 (en) | Method and system for high-density converged storage via memory bus | |
JP2010152516A (en) | Nonvolatile semiconductor memory drive, information processing apparatus, and management method of storage area in nonvolatile semiconductor memory drive | |
CN110795272B (en) | Method and system for atomic and latency guarantees facilitated on variable-size I/O | |
JP6608468B2 (en) | Storage apparatus and control method thereof | |
JP5944502B2 (en) | Computer system and control method | |
JP2007193441A (en) | Storage device using nonvolatile cache memory, and control method therefor | |
JP2018169773A (en) | Storage device, method for controlling storage device and program | |
WO2015162755A1 (en) | Storage device for compressing and storing data | |
US20070168604A1 (en) | Information recording apparatus and method for controlling the same | |
JP2007102436A (en) | Storage controller and storage control method | |
JP2022177671A (en) | Information processing device and storage control method | |
WO2014057518A1 (en) | Storage apparatus and data processing method | |
JP6254986B2 (en) | Information processing apparatus, access controller, and information processing method | |
JP6243884B2 (en) | Information processing apparatus, processor, and information processing method | |
US20210200679A1 (en) | System and method for mixed tile-aware and tile-unaware traffic through a tile-based address aperture | |
JP6760916B2 (en) | Storage controller, storage array device, data storage method, and program | |
JP6944117B2 (en) | Information processing device, transfer control method and transfer control program | |
US20050132117A1 (en) | [card reader, and bridge controller and data transmission method thereof] | |
JP7197541B2 (en) | storage device | |
JP2008193146A (en) | Decoding circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240315 |