JP6365718B1 - Computer system and memory copy method - Google Patents

Computer system and memory copy method Download PDF

Info

Publication number
JP6365718B1
JP6365718B1 JP2017063060A JP2017063060A JP6365718B1 JP 6365718 B1 JP6365718 B1 JP 6365718B1 JP 2017063060 A JP2017063060 A JP 2017063060A JP 2017063060 A JP2017063060 A JP 2017063060A JP 6365718 B1 JP6365718 B1 JP 6365718B1
Authority
JP
Japan
Prior art keywords
flag
data
computer system
memory
main 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.)
Active
Application number
JP2017063060A
Other languages
Japanese (ja)
Other versions
JP2018165915A (en
Inventor
洋一 三田
洋一 三田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2017063060A priority Critical patent/JP6365718B1/en
Application granted granted Critical
Publication of JP6365718B1 publication Critical patent/JP6365718B1/en
Publication of JP2018165915A publication Critical patent/JP2018165915A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

【課題】CPUの負担を抑えつつメモリのデータ転送の時間を短縮する。【解決手段】二重化されたコンピュータシステムであって、データが書き換えられたか否かを示すダーティ情報を用いて、メインメモリの記憶領域を管理する記憶領域管理部と、当該コンピュータシステム以外のコンピュータシステムにデータをコピーするコピー制御を行うときに、ダーティ情報に基いて、メインメモリの記憶領域のうちデータが書き換えられた領域のデータのみを転送するコピー用データ転送部と、コピー制御以外におけるデータの転送を行う通常用データ転送部とを備え、コピー用データ転送部は、ハードウェアにより構成され、通常用データ転送部とは異なるバスに接続されていることを特徴とする。【選択図】図11A memory data transfer time is shortened while reducing a load on a CPU. A duplicated computer system that uses a dirty information indicating whether or not data has been rewritten to use a storage area management unit that manages a storage area of a main memory, and a computer system other than the computer system. When performing copy control to copy data, based on dirty information, a data transfer unit for copying only the data in the main memory storage area where data has been rewritten, and data transfer outside copy control The data transfer unit for copying is configured by hardware and is connected to a different bus from the data transfer unit for normal use. [Selection] Figure 11

Description

本発明は、コンピュータシステム、及びコンピュータシステムのメモリコピー方法に関する。   The present invention relates to a computer system and a memory copy method for the computer system.

ハードウェア(HW)の微細化によりコンピュータシステムのメモリ容量が増大しており、フォールトトレラントシステムや仮想化システムもそれに追随してメモリ容量の増加が求められている。フォールトトレラントシステムでは2つの系を二重化に移行させる際に、仮想化システムではライブマイグレーションで他の装置にゲストシステムを移動させる際に、通常の処理を一旦停止してメモリのデータを稼働系から待機系に転送する必要がある。しかし、メモリ容量の増大に応じてメモリ内容のコピー時間が長期化しており、処理停止時間が増大するという問題がある。その対策としてメモリをある程度の大きさの「ページ」単位で管理し、二重化又はマイグレーションを開始した後でシステムの稼働により更新されたメモリ領域にダーティページという印をつけながらメモリのデータを転送し、その後はダーティページのみ転送することを繰り返すことでメモリのデータ転送の時間を短縮する方法が提案されている。   The memory capacity of a computer system is increasing due to the miniaturization of hardware (HW), and the fault-tolerant system and the virtualization system are required to increase the memory capacity accordingly. In a fault-tolerant system, when moving two systems to dual, in a virtual system, when moving a guest system to another device by live migration, temporarily stop normal processing and wait for memory data from the active system It is necessary to transfer to the system. However, as the memory capacity increases, the copy time of the memory contents becomes longer, and there is a problem that the processing stop time increases. As a countermeasure, memory is managed in units of "pages" of a certain size, and after starting duplication or migration, memory data updated by operating the system is marked as dirty pages, and the memory data is transferred. After that, a method has been proposed in which only the dirty page is transferred to shorten the data transfer time of the memory.

また、例えば、特許文献1には、マルチプロセッサシステムにおいて、I/Oデバイス間でのアクセスに関してダーティ制御を行うことが記載されている。   For example, Patent Document 1 describes performing dirty control regarding access between I / O devices in a multiprocessor system.

特表2002−518734号公報Special Table 2002-518734

しかし、ダーティ制御を行う場合、ここで使用可能なダーティページの記録及び管理のためには、システムに搭載されているメモリの全領域をカバーする必要がある。しかしながら、多くのプロセッサに内蔵されているTranslation Lookaside Buffer(TLB)に実装されているダーティページの記録及び管理の機能では容量が不足する。そのため、上記のダーティ制御を行う方法ではTLBを活用することはあるが、システムに搭載されているメモリの全領域に対しては、OS(オペレーティングシステム)やソフトウェアによって記録及び管理することにより処理に時間がかかるという課題があった。   However, when performing dirty control, it is necessary to cover the entire area of the memory mounted in the system in order to record and manage the dirty pages that can be used here. However, the dirty page recording and management function implemented in the Translation Lookaside Buffer (TLB) incorporated in many processors has insufficient capacity. For this reason, the method for performing dirty control may use TLB, but the entire area of the memory installed in the system is recorded and managed by an OS (operating system) or software for processing. There was a problem of taking time.

また、特許文献1に記載された発明では、I/Oデバイス間でのアクセスに関してダーティ制御を行うことしか行っておらず、メモリへの書き込みが最も多く行われると想定されるCPUに関してダーティ制御を行うことは何ら開示されていない。   Further, in the invention described in Patent Document 1, only dirty control is performed with respect to access between I / O devices, and dirty control is performed with respect to a CPU that is assumed to perform the most writing to the memory. There is no disclosure of what to do.

そこで、本発明は、CPUの負担を抑えつつメモリのデータ転送の時間を短縮することができるコンピュータシステム、及びメモリコピー方法を提供することを目的とする。   SUMMARY An advantage of some aspects of the invention is that it provides a computer system and a memory copy method that can reduce the data transfer time of the memory while reducing the burden on the CPU.

本発明によるコンピュータシステムは、二重化されたコンピュータシステムであって、データが書き換えられたか否かを示すダーティ情報を用いて、メインメモリの記憶領域を管理する記憶領域管理部と、当該コンピュータシステム以外のコンピュータシステムにデータをコピーするコピー制御を行うときに、ダーティ情報に基いて、メインメモリの記憶領域のうちデータが書き換えられた領域のデータのみを転送するコピー用データ転送部と、コピー制御以外におけるデータの転送を行う通常用データ転送部とを備え、当該コンピュータシステムは、マイクロコードに従って、コピー用データ転送部にダーティ情報を書き込み、コピー用データ転送部は、ハードウェアにより構成され、通常用データ転送部とは異なるバスに接続されていることを特徴とする。 A computer system according to the present invention is a duplicated computer system that uses a dirty information indicating whether or not data has been rewritten and uses a storage area management unit that manages a storage area of a main memory, and a computer system other than the computer system. When performing copy control for copying data to a computer system, a copy data transfer unit that transfers only data in the storage area of the main memory that has been rewritten based on dirty information, and other than copy control A normal data transfer unit for transferring data, and the computer system writes dirty information to the copy data transfer unit in accordance with the microcode, and the copy data transfer unit is configured by hardware, and the normal data Connected to a different bus than the transfer unit And wherein the door.

本発明によるメモリコピー方法は、二重化されたコンピュータシステムにおいて、データが書き換えられたか否かを示すダーティ情報を用いて、メインメモリの記憶領域を管理し、当該コンピュータシステム以外のコンピュータシステムにデータをコピーするコピー制御を行うときに、ダーティ情報に基いて、メインメモリの記憶領域のうちデータが書き換えられた領域のデータのみを転送し、当該コンピュータシステムが、マイクロコードに従って、コピー制御を行うときにデータの転送を行うコピー用データ転送部にダーティ情報を書き込み、コピー用データ転送部が、ハードウェアにより構成され、コピー制御以外におけるデータの転送を行う通常用データ転送部とは異なるバスに接続されていることを特徴とする。 The memory copy method according to the present invention manages the storage area of the main memory using dirty information indicating whether or not the data has been rewritten in a duplicated computer system, and copies the data to a computer system other than the computer system. When performing copy control, only the data in the storage area of the main memory where data has been rewritten is transferred based on the dirty information, and the data is transferred when the computer system performs copy control according to the microcode. writing the dirty data to the copy data transfer unit which performs the transfer, the data transfer unit for copying is configured by hardware, is connected to a different bus than the normal data transfer unit for transferring data in the non-copy control It is characterized by.

本発明によれば、CPUの負担を抑えつつメモリのデータ転送の時間を短縮することができる。   According to the present invention, it is possible to reduce the data transfer time of the memory while reducing the burden on the CPU.

本発明によるメモリコピー方法を適用したコンピュータシステム全体の構成例を示すブロック図である。It is a block diagram which shows the structural example of the whole computer system to which the memory copy method by this invention is applied. コンピュータシステムでメインメモリへの書込みに使用されるStore命令のマイクロコードを示す説明図である。It is explanatory drawing which shows the microcode of the Store instruction used for writing to the main memory in a computer system. 制御レジスタ群内の具体的なレジスタを示す説明図である。It is explanatory drawing which shows the specific register | resistor in a control register group. DMA制御部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of a DMA control part. フラグ制御部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of a flag control part. メインメモリのアドレスとフラグメモリのアクセス信号の対応表の例を示す説明図である。It is explanatory drawing which shows the example of the conversion table of the address of a main memory, and the access signal of a flag memory. コンピュータシステムがメモリコピーを行う場合の動作を示すフローチャートである。It is a flowchart which shows operation | movement in case a computer system performs memory copy. メインメモリ読出し制御部が行う動作を示すフローチャートである。It is a flowchart which shows the operation | movement which a main memory read-out control part performs. フラグ書込み制御部が行う動作を示すフローチャートである。It is a flowchart which shows the operation | movement which a flag writing control part performs. フラグ読出し制御部が行う動作を示すフローチャートである。It is a flowchart which shows the operation | movement which a flag read-out control part performs. コンピュータシステムの最小の構成例を示すブロック図である。It is a block diagram which shows the minimum structural example of a computer system.

以下、本発明の実施形態について図面を参照して説明する。本発明では、メモリコピー方法は、フォールトトレラントシステムでの二重化プロセスや、仮想化システムでのマイグレーションプロセスで、システムを稼働させたままメインメモリのデータをコピーする。この際に、コピー後に更新のあったメインメモリのページ領域(ダーティページ)を記録及び管理できる手段と、記録されたダーティページの情報を元に必要なメモリのデータのみをコピーする手段をハートウェア(HW)上に設ける。そのように構成することにより、OS(オペレーティングシステム)やソフトウェアでダーティページを記録及び管理する場合に比べて、CPUの負荷を上げずにメインメモリのデータを転送することを特徴とする。その際、一般的なプロセッサやメモリを使用できるように、ハードウェアのうちのプロセッサやメモリには特殊な機能を入れず、マイクロコード等のファームウェア(FW)及びプロセッサに繋がるデバイスの追加で対応できることを特徴とする。   Embodiments of the present invention will be described below with reference to the drawings. In the present invention, the memory copy method copies the data in the main memory while the system is operating in a duplex process in a fault tolerant system or a migration process in a virtual system. At this time, there is a means for recording and managing the page area (dirty page) of the main memory that has been updated after copying, and a means for copying only necessary memory data based on the information of the recorded dirty page. Provided on (HW). Such a configuration is characterized in that the data in the main memory is transferred without increasing the load on the CPU as compared with the case where dirty pages are recorded and managed by an OS (operating system) or software. At that time, in order to be able to use a general processor and memory, it is possible to cope with the addition of firmware (FW) such as microcode and a device connected to the processor without adding a special function to the processor or memory in the hardware. It is characterized by.

次に、本発明によるメモリコピー方法を適用したコンピュータシステムの構成について説明する。図1は、本発明によるメモリコピー方法を適用したコンピュータシステム全体の構成例を示すブロック図である。本発明によるメモリコピー方法を適用したコンピュータシステムは、ハードウェア的に同一の複数のモジュール100を含んで構成される。図1に示すように、モジュール100は、プロセッサ110と、メインメモリ120と、コピー制御部130と、フラグメモリ140,150と、チップセット160と、I/O部170とを備える。   Next, the configuration of a computer system to which the memory copy method according to the present invention is applied will be described. FIG. 1 is a block diagram showing a configuration example of an entire computer system to which a memory copy method according to the present invention is applied. A computer system to which the memory copy method according to the present invention is applied includes a plurality of modules 100 that are identical in hardware. As shown in FIG. 1, the module 100 includes a processor 110, a main memory 120, a copy control unit 130, flag memories 140 and 150, a chip set 160, and an I / O unit 170.

なお、本実施形態では、図1に示すコンピュータシステムは、例えば、フォールトトレラントシステムでの二重化プロセスや、仮想化システムでのマイグレーションプロセスを行う場合に適用される。   In the present embodiment, the computer system shown in FIG. 1 is applied, for example, when a duplex process in a fault tolerant system or a migration process in a virtual system is performed.

プロセッサ110は、ソフトウェアの命令を理解してシステム全体を制御する機能を備える。また、メインメモリ120(主記憶装置)は、プロセッサ110に接続され、ソフトウェアの命令やデータを記憶する。また、コピー制御部130は、メインメモリ120のデータを効率よく他のモジュールに転送する機能を備える。また、フラグメモリ140,150は、システム稼働中のメモリのデータを転送する際にメモリの全ページ領域のダーティフラグ(データが書き換えられたか否かを示すフラグ)を記録(記憶)する。また、チップセット160は、通常の処理でコンピュータシステムの各機能部へデータを転送する機能を備える。また、I/O部170は、コンピュータシステムのインプット及びアウトプットの機能を備える。   The processor 110 has a function of controlling the entire system by understanding software instructions. The main memory 120 (main storage device) is connected to the processor 110 and stores software instructions and data. Further, the copy control unit 130 has a function of efficiently transferring data in the main memory 120 to another module. Further, the flag memories 140 and 150 record (store) dirty flags (flags indicating whether or not data has been rewritten) in all page areas of the memory when transferring data in the memory during system operation. The chip set 160 has a function of transferring data to each functional unit of the computer system by a normal process. The I / O unit 170 has input and output functions for the computer system.

また、近年のプロセッサには他のデバイスに接続できる高速なバスが複数搭載されており、本実施形態では、図1に示すように、通常の処理を行うためのチップセット160へのアクセスのためのバスとは異なるバスにコピー制御部130が接続されている。そのように構成することによって、本実施形態では、通常の処理を妨げることなく、ダーティフラグの処理を行うことを可能としている。   Also, recent processors have a plurality of high-speed buses that can be connected to other devices. In this embodiment, as shown in FIG. 1, for accessing a chip set 160 for performing normal processing. The copy control unit 130 is connected to a bus different from this bus. With this configuration, in the present embodiment, it is possible to perform dirty flag processing without interfering with normal processing.

なお、ハードウェア的に完全に同期をとるフォールトトレラントシステムに適用する場合には、チップセット160に他のモジュールと接続して同期を行うための機能を設けるように構成してもよい。その場合には、チップセット160の中にコピー制御部130を入れ込む構成とすることも可能である。   When applied to a fault tolerant system that is completely synchronized in terms of hardware, the chipset 160 may be configured to have a function for synchronization by connecting to another module. In that case, a configuration in which the copy control unit 130 is inserted into the chip set 160 is also possible.

また、図1に示すように、プロセッサ110は、演算機能を有するCPUコア111と、プロセッサの内部バス113と、メインメモリ120へのアクセスを制御するメモリI/F114と、メモリ以外のデバイスへのアクセスを行うバスI/F115とを備える。また、プロセッサ110は、ソフトウェアからの命令をハードウェアの詳細な命令に対応させるためのマイクロコード112を用いて動作する。   As shown in FIG. 1, the processor 110 includes a CPU core 111 having an arithmetic function, an internal bus 113 of the processor, a memory I / F 114 for controlling access to the main memory 120, and a device other than the memory. And a bus I / F 115 that performs access. The processor 110 operates using microcode 112 for associating instructions from software with detailed instructions of hardware.

また、図1に示すように、コピー制御部130は、トランザクション振分部131と、制御レジスタ群132と、DMA制御部133と、フラグ制御部134と、フラグメモリI/F135,136とを備える。トランザクション振分部131は、プロセッサ110及び内部の各機能部のトランザクションを受けて適切な宛先に振り分ける機能を備える。また、制御レジスタ群132は、コピー制御部130の動作をソフトウェアから制御するための複数のレジスタである。また、DMA制御部133は、自モジュールのメモリに対するアクセスを行い、他モジュールとのデータ転送を中継する機能を備える。また、フラグ制御部134は、プロセッサ110から入力されたトランザクションを解析してダーティフラグを生成し管理する機能を備える。また、フラグメモリI/F135,136は、フラグ制御部134からの要求に従いフラグメモリ140,150の読み書きを行う機能を備える。   As shown in FIG. 1, the copy control unit 130 includes a transaction distribution unit 131, a control register group 132, a DMA control unit 133, a flag control unit 134, and flag memories I / F 135 and 136. . The transaction distribution unit 131 has a function of receiving a transaction of the processor 110 and each of the internal functional units and distributing the transaction to an appropriate destination. The control register group 132 is a plurality of registers for controlling the operation of the copy control unit 130 from software. The DMA control unit 133 has a function of accessing the memory of its own module and relaying data transfer with other modules. In addition, the flag control unit 134 has a function of generating and managing a dirty flag by analyzing a transaction input from the processor 110. Further, the flag memory I / Fs 135 and 136 have a function of reading and writing the flag memories 140 and 150 in accordance with a request from the flag control unit 134.

図2は、コンピュータシステムでメインメモリ120への書込みに使用されるStore命令のマイクロコードを示す説明図である。一般に、コンピュータシステムでは、このStore命令によりレジスタID=Rjが示すメインメモリ120のアドレスにレジスタID=Riの値を書込むという動作を行って終了としている。これに対して、本実施形態におけるコンピュータシステムでは、Store命令において、さらに、その後にフラグ制御部134のフラグ書込みアドレスにレジスタID=Rjの値を書込むという処理が続くように構成されている。このStore命令によりプロセッサ110からメインメモリ120へ書込みを行ったメインメモリ120のアドレスをコピー制御部130へ出力することが可能となる。   FIG. 2 is an explanatory diagram showing the microcode of the Store instruction used for writing to the main memory 120 in the computer system. Generally, in the computer system, the operation of writing the value of the register ID = Ri to the address of the main memory 120 indicated by the register ID = Rj by this Store instruction is completed. In contrast, the computer system according to the present embodiment is configured such that the process of writing the value of the register ID = Rj to the flag write address of the flag control unit 134 is further continued in the Store instruction. With this Store instruction, the address of the main memory 120 written from the processor 110 to the main memory 120 can be output to the copy control unit 130.

図2に示すStore命令のマイクロコードによりプロセッサ110からコピー制御部130へ出力されるメインメモリ120への書込みアドレスを、図1に示すコピー制御部130内のフラグ制御部134によりダーティフラグを生成及び管理して、DMA制御部133によりダーティページ(データが書き換えられたページ)のデータのみ他のモジュールに転送することができる。そのため、OSやソフトウェアによるダーティページの生成及び管理が不要となることで、高速なメモリコピーを実現できる。   A write address to the main memory 120 output from the processor 110 to the copy control unit 130 by the microcode of the Store instruction shown in FIG. 2 is generated, and a dirty flag is generated by the flag control unit 134 in the copy control unit 130 shown in FIG. Under management, only the data of the dirty page (the page in which the data has been rewritten) can be transferred to another module by the DMA control unit 133. Therefore, it is not necessary to generate and manage dirty pages by the OS or software, so that high-speed memory copying can be realized.

図3は、制御レジスタ群132内の具体的なレジスタを示す説明図である。図3では、制御レジスタ群132内の具体的なレジスタとして、メインメモリ120の中で他モジュールと同期する領域の最小のページアドレスの値を示す最小ページアドレスレジスタと、他モジュールと同期する領域の最大のページアドレスの値を示す最大ページアドレスレジスタとを含むことを示している。これらのレジスタは、コピー制御部130内の各機能部で共通的に使用される。   FIG. 3 is an explanatory diagram showing specific registers in the control register group 132. In FIG. 3, as specific registers in the control register group 132, a minimum page address register indicating the value of the minimum page address in an area synchronized with other modules in the main memory 120, and an area synchronized with other modules are shown. And a maximum page address register indicating the value of the maximum page address. These registers are used in common by each functional unit in the copy control unit 130.

図4は、DMA制御部133の内部構成を示すブロック図である。なお、図4において、図内の点線は主な制御信号やアドレス信号を示し、実線は主なデータ信号を示している。図4に示すように、DMA制御部133は、DMA制御デコーダ10と、DMAモードレジスタ11と、ページアドレスカウンタ12と、セレクタ13と、オフセットカウンタ14と、メインメモリ読出し制御部15と、送信バッファ16と、受信バッファ17と、メインメモリ書込み制御部18とを備える。   FIG. 4 is a block diagram showing an internal configuration of the DMA control unit 133. In FIG. 4, dotted lines in the figure indicate main control signals and address signals, and solid lines indicate main data signals. As shown in FIG. 4, the DMA control unit 133 includes a DMA control decoder 10, a DMA mode register 11, a page address counter 12, a selector 13, an offset counter 14, a main memory read control unit 15, and a transmission buffer. 16, a reception buffer 17, and a main memory write control unit 18.

DMA制御デコーダ10は、トランザクション振分部131から入力されたトランザクションを解析し、DMAモードレジスタ11への値の書込みや送信バッファ16へのメモリ読出しトランザクションの転送を行い、その他DMA制御部133の各種機能をコントロールするための動作を行う機能を備える。   The DMA control decoder 10 analyzes the transaction input from the transaction distribution unit 131, writes a value to the DMA mode register 11, transfers a memory read transaction to the transmission buffer 16, and performs various other operations of the DMA control unit 133. A function for performing an operation for controlling the function is provided.

DMAモードレジスタ11は、DMAの動作として、他モジュールと同期するメモリ領域全体をコピー(全メモリコピー)するか、ダーティページとして管理されているページのみコピー(差分メモリコピー)するかどうかを示す値を、DMAモードとして保持する。   The DMA mode register 11 indicates whether the entire memory area synchronized with other modules is copied (all memory copy) or only pages managed as dirty pages (differential memory copy) are copied as DMA operation. Are held as the DMA mode.

ページアドレスカウンタ12は、全メモリコピーの場合にコピーを行うメインメモリ120のページアドレスを記憶し、ページ全体のコピーが終了するとカウントアップする機能を備える。   The page address counter 12 stores a page address of the main memory 120 to be copied in the case of all memory copying, and has a function of counting up when copying of the entire page is completed.

セレクタ13は、DMAモードレジスタ11の値が全メモリコピーを示す場合には、ページアドレスカウンタ12から出力されるページアドレスを選択して、メインメモリ読出し制御部15に出力する機能を備える。また、セレクタ13は、DMAモードレジスタ11の値が差分メモリコピーを示す場合には、フラグ制御部134から出力されるページアドレスを選択して、メインメモリ読出し制御部15に出力する機能を備える。   The selector 13 has a function of selecting the page address output from the page address counter 12 and outputting it to the main memory read control unit 15 when the value of the DMA mode register 11 indicates all memory copies. The selector 13 has a function of selecting a page address output from the flag control unit 134 and outputting the page address to the main memory read control unit 15 when the value of the DMA mode register 11 indicates a differential memory copy.

オフセットカウンタ14は、コピーを行うメインメモリ120のページ内のアドレスを記憶し、1回のトランザクションで転送可能なデータ分だけアドレスをカウントアップする機能を備える。   The offset counter 14 has a function of storing an address in a page of the main memory 120 to be copied and counting up the address by the amount of data that can be transferred in one transaction.

メインメモリ読出し制御部15は、セレクタ13から出力されるページアドレスとオフセットカウンタ14から出力されるページ内のアドレスとを合成したメインメモリ120のアドレスに対するメモリ読出し要求トランザクションを発生させる(生成する)機能を備える。また、メインメモリ読出し制御部15は、生成したメモリ読出し要求トランザクションをトランザクション振分部131に出力すると同時に、送信バッファ16にメインメモリ120のアドレスを書込む機能を備える。   The main memory read control unit 15 generates (generates) a memory read request transaction for the address of the main memory 120 obtained by combining the page address output from the selector 13 and the address in the page output from the offset counter 14. Is provided. Further, the main memory read control unit 15 has a function of writing the generated memory read request transaction to the transaction distribution unit 131 and simultaneously writing the address of the main memory 120 into the transmission buffer 16.

送信バッファ16は、メインメモリ読出し制御部15から出力されたアドレスと、そのアドレスに対するメモリ読出しトランザクションにより返ってきたメモリのデータを対にして複数記憶し、順に他モジュールのDMA制御部133の受信バッファ17に転送する機能を備える。   The transmission buffer 16 stores a plurality of pairs of the address output from the main memory read control unit 15 and the memory data returned by the memory read transaction corresponding to the address, and sequentially receives the receive buffer of the DMA control unit 133 of the other module. 17 is provided.

受信バッファ17は、他モジュールから転送されたメモリアドレスとデータを複数記憶し、必要なタイミングで順にメインメモリ書込み制御部18にアドレスを渡し(出力し)、トランザクション振分部131にデータを渡す(出力する)機能を備える。   The reception buffer 17 stores a plurality of memory addresses and data transferred from other modules, sequentially passes (outputs) addresses to the main memory write control unit 18 in necessary timing, and passes data to the transaction distribution unit 131 ( Output).

メインメモリ書込み制御部18は、受信バッファ17からメモリアドレスを受ける(入力する)と、メインメモリ120の該当するアドレスに対するメモリ書込みトランザクションを発生させ(生成し)、必要なタイミングで受信バッファ17からトランザクション振分部131にデータを出力する制御を行う機能を備える。   When the main memory write control unit 18 receives (inputs) a memory address from the reception buffer 17, it generates (generates) a memory write transaction for the corresponding address in the main memory 120, and performs a transaction from the reception buffer 17 at a necessary timing. A function of performing control to output data to the distribution unit 131 is provided.

図5は、フラグ制御部134の内部構成を示すブロック図である。なお、図4と同様に、図5において、図内の点線は主な制御信号やアドレス信号を示し、実線は主なデータ信号を示している。図5に示すように、フラグ制御部134は、フラグ制御デコーダ20と、フラグ選択レジスタ21と、フラグ許可レジスタ22と、フラグ書込み制御部23と、フラグ書込みレジスタ24と、フラグ検出部25と、フラグカウンタ26と、フラグ読出し制御部27と、アドレスポインタ28と、フラグ読出しレジスタ29と、アドレスエンコーダ30と、セレクタ31,32,33,34とを備える。   FIG. 5 is a block diagram showing an internal configuration of the flag control unit 134. As in FIG. 4, in FIG. 5, dotted lines in the figure indicate main control signals and address signals, and solid lines indicate main data signals. As shown in FIG. 5, the flag control unit 134 includes a flag control decoder 20, a flag selection register 21, a flag permission register 22, a flag write control unit 23, a flag write register 24, a flag detection unit 25, A flag counter 26, a flag read control unit 27, an address pointer 28, a flag read register 29, an address encoder 30, and selectors 31, 32, 33, and 34 are provided.

フラグ制御デコーダ20は、トランザクション振分部131から入力されたトランザクションを解析し、フラグ選択レジスタ21、フラグ許可レジスタ22、フラグカウンタ26の値の読み書きを行う機能を備える。また、フラグ制御デコーダ20は、図2に示すStore命令によりメインメモリ120のアドレスをフラグ制御部134に書込むダーティフラグ書込みトランザクションの場合には、フラグ書込みレジスタ24やフラグ検出部25へフラグメモリ140,150のデータ幅内のダーティフラグの位置を示す値を出力したり、セレクタ31,32へフラグメモリ140,150にアクセスするためのアドレスを出力したり、フラグ書込み制御部23の機能をコントロールするための動作を行う機能を備える。   The flag control decoder 20 has a function of analyzing the transaction input from the transaction distribution unit 131 and reading / writing the values of the flag selection register 21, the flag permission register 22, and the flag counter 26. In the case of a dirty flag write transaction in which the address of the main memory 120 is written to the flag control unit 134 by the Store instruction shown in FIG. 2, the flag control decoder 20 sends the flag memory 140 to the flag write register 24 or the flag detection unit 25. , 150 outputs a value indicating the position of the dirty flag within the data width, outputs an address for accessing the flag memories 140, 150 to the selectors 31, 32, and controls the function of the flag write control unit 23. A function for performing the operation is provided.

図6は、メインメモリ120のアドレスとフラグメモリ140,150のアクセス信号の対応表の例を示す説明図である。この例では、メインメモリ120全体のアドレスとして32bitの値をもつものとする、また、4KByte単位のページ領域としてbit11−0の12bitのページ内オフセットと、bit31−12の20bitのページアドレスをもつものとする。また、ページアドレスのうちbit15−12の下位4bitはフラグメモリのデータのビット位置として使用し、bit31−16の上位16bitはフラグメモリのアドレスとして使用するものとする。この場合、フラグメモリ140,150は、それぞれアドレス16bitでデータ幅16bitとなるメモリデバイスで構成される。   FIG. 6 is an explanatory diagram showing an example of a correspondence table between the addresses of the main memory 120 and the access signals of the flag memories 140 and 150. In this example, the address of the entire main memory 120 has a 32-bit value, and the page area in units of 4 KB includes a 12-bit page offset of bit 11-0 and a 20-bit page address of bit 31-12. And Of the page address, the lower 4 bits of bit 15-12 are used as the bit position of the data in the flag memory, and the upper 16 bits of bit 31-16 are used as the address of the flag memory. In this case, each of the flag memories 140 and 150 is configured by a memory device having an address of 16 bits and a data width of 16 bits.

フラグ選択レジスタ21は、ダーティフラグの書込みやダーティフラグの読出しのアクセスを、2つあるどちらのフラグメモリ140,150に対して行うか選択するための値を保持するレジスタである。   The flag selection register 21 is a register that holds a value for selecting which of the two flag memories 140 and 150 is to be accessed for dirty flag writing and dirty flag reading.

フラグ許可レジスタ22は、ダーティフラグの書込み動作を行うか否か選択するための値を保持するレジスタである。   The flag permission register 22 is a register that holds a value for selecting whether or not to perform a dirty flag write operation.

フラグ書込み制御部23は、ダーティフラグの書込みのための動作全体を制御するためにフラグ制御部134の各種機能をコントロールする機能を備える。   The flag writing control unit 23 has a function of controlling various functions of the flag control unit 134 in order to control the entire operation for writing the dirty flag.

フラグ書込みレジスタ24は、ダーティフラグをフラグメモリ140,150のデータの該当ビットだけに書込むために、一時的にフラグメモリ140又はフラグメモリ150のデータを記憶し、フラグ制御デコーダ20から出力されたダーティフラグのデータと合成する機能を備える。例えば、ダーティであることを示す場合が”1”であり、ダーティではないことを示す場合が”0”であるものとする。この場合、データ幅が16bitのフラグメモリ140又はフラグメモリ150から読み出されたデータが2進数の”0000−1000−0000−0001”で、フラグ制御デコーダ20から出力されるダーティフラグの位置がLSBから0オリジンで”6”とした場合、フラグ書込みレジスタ24で合成される値は2進数の”0000−1000−0100−0001”となる。   The flag write register 24 temporarily stores the data in the flag memory 140 or the flag memory 150 in order to write the dirty flag only to the corresponding bits of the data in the flag memories 140 and 150, and is output from the flag control decoder 20. It has a function to combine with dirty flag data. For example, it is assumed that “1” indicates that it is dirty and “0” indicates that it is not dirty. In this case, the data read from the flag memory 140 or the flag memory 150 having a data width of 16 bits is binary “0000-1000-0000-0001”, and the position of the dirty flag output from the flag control decoder 20 is LSB. 0 to 0 and “6”, the value synthesized by the flag write register 24 is “0000-1000-0100-0001” in binary.

フラグ検出部25は、フラグ書込みレジスタ24にフラグメモリ140又はフラグメモリ150のデータが読み出された値のうち、フラグ制御デコーダ20から出力されるダーティフラグの位置のビットの値を検出する機能を備える。   The flag detection unit 25 has a function of detecting the value of the bit at the position of the dirty flag output from the flag control decoder 20 among the values read from the flag memory 140 or the flag memory 150 to the flag write register 24. Prepare.

フラグカウンタ26は、ダーティフラグ書込みトランザクションを受けた(入力した)場合にフラグ検出部25で検出した値が”0”の場合(該当するダーティフラグがまだ立っていなかった場合)、カウントアップすることで、これまで書込んだダーティフラグの数を記憶する機能を備える。   The flag counter 26 counts up when the value detected by the flag detection unit 25 is “0” when the dirty flag write transaction is received (input) (when the corresponding dirty flag has not yet been set). And a function for storing the number of dirty flags written so far.

フラグ読出し制御部27は、DMA制御部133からのリクエストに従い、ダーティフラグの読出しのための動作全体を制御するためにフラグ制御部134の各種機能をコントロールする機能を備える。   The flag read control unit 27 has a function of controlling various functions of the flag control unit 134 in order to control the entire operation for reading the dirty flag in accordance with a request from the DMA control unit 133.

アドレスポインタ28は、ダーティフラグの読出しの動作で使用するフラグメモリ140又はフラグメモリ150のアドレスを記憶する。なお、アドレスポインタ28は、例えば、レジスタ等によって実現される。   The address pointer 28 stores the address of the flag memory 140 or the flag memory 150 used in the dirty flag read operation. The address pointer 28 is realized by, for example, a register.

フラグ読出しレジスタ29は、ダーティフラグの読出しの動作でフラグメモリ140又はフラグメモリ150から読み出されたデータを一時的に記憶し、DMA制御部133に渡された(出力された)ダーティページのアドレスに該当するビットのダーティフラグをクリアする機能を備える。   The flag read register 29 temporarily stores data read from the flag memory 140 or the flag memory 150 by the dirty flag read operation, and the address of the dirty page passed (output) to the DMA control unit 133. The function of clearing the dirty flag of the bit corresponding to.

アドレスエンコーダ30は、アドレスポインタ28の値とフラグ読出しレジスタ29の値とから、次にコピーすべきメインメモリ120のダーティページのアドレスを発生させる(求める)機能を備える。   The address encoder 30 has a function of generating (determining) the address of the dirty page of the main memory 120 to be copied next from the value of the address pointer 28 and the value of the flag read register 29.

セレクタ31,32は、フラグ選択レジスタ21の値に従い、フラグメモリI/F135,136を経由したフラグメモリ140,150に対するアクセスを、フラグ書込みのための動作とするか、フラグ読出しのための動作とするかを選択する機能を備える。   According to the value of the flag selection register 21, the selectors 31 and 32 make the access to the flag memories 140 and 150 via the flag memory I / F 135 and 136 an operation for writing a flag or an operation for reading a flag. The function to select whether to do is provided.

セレクタ33は、フラグ選択レジスタ21の値に従い、フラグメモリI/F135,136を経由してフラグメモリ140,150から読み出したデータのうちどちらをフラグ書込み用のデータとして使用するかを選択する機能を備える。   The selector 33 has a function of selecting which of the data read from the flag memories 140 and 150 via the flag memory I / F 135 and 136 is used as flag writing data according to the value of the flag selection register 21. Prepare.

セレクタ34は、フラグ選択レジスタ21の値に従い、フラグメモリI/F135,136を経由してフラグメモリ140,150から読み出したデータのうちどちらをフラグ読出し用のデータとして使用するかを選択する機能を備える。   The selector 34 has a function of selecting which of the data read from the flag memories 140 and 150 via the flag memory I / F 135 and 136 is used as flag read data according to the value of the flag selection register 21. Prepare.

本実施形態では、フラグ選択レジスタ21の値が、フラグ書込み用としてフラグメモリ140を選択し、フラグ読出し用としてフラグメモリ150を選択している場合、各セレクタ31〜34は次の動作を行う。セレクタ31は、フラグ書込み制御部23の要求に従いフラグ制御デコーダ20から出力されるアドレスに対してフラグメモリI/F135にアクセスし、フラグメモリ140への書込みデータはフラグ書込みレジスタ24から出力されたものを使用する。セレクタ32は、フラグ読出し制御部27の要求に従いアドレスポインタ28から出力されるアドレスに対してフラグメモリI/F136にアクセスし、フラグメモリ150への書込みデータは”0”が使用される。セレクタ33は、フラグメモリI/F135を介してフラグメモリ140のデータを選択し、セレクタ34は、フラグメモリI/F136を介してフラグメモリ150のデータを選択する。一方、フラグ選択レジスタ21の値が、フラグ書込み用としてフラグメモリ150を選択し、フラグ読出し用としてフラグメモリ140を選択している場合、各セレクタ31〜34は、上記とは逆のデータ、アドレス、及び制御信号を選択する動作を行う。   In the present embodiment, when the value of the flag selection register 21 selects the flag memory 140 for flag writing and the flag memory 150 for flag reading, the selectors 31 to 34 perform the following operations. The selector 31 accesses the flag memory I / F 135 for the address output from the flag control decoder 20 in accordance with the request of the flag write control unit 23, and the write data to the flag memory 140 is output from the flag write register 24. Is used. The selector 32 accesses the flag memory I / F 136 for the address output from the address pointer 28 according to the request of the flag read control unit 27, and “0” is used as the write data to the flag memory 150. The selector 33 selects data in the flag memory 140 via the flag memory I / F 135, and the selector 34 selects data in the flag memory 150 via the flag memory I / F 136. On the other hand, when the value of the flag selection register 21 selects the flag memory 150 for writing the flag and the flag memory 140 for reading the flag, the selectors 31 to 34 have the data and address opposite to the above. And an operation of selecting a control signal.

次に、動作について説明する。図7は、コンピュータシステムがメモリコピーを行う場合の動作を示すフローチャートである。図7は、図1に示すコンピュータシステムをフォールトトレラントシステムや仮想化システムに適用した場合に、フォールトトレラントシステムでの二重化プロセスや、仮想化システムでのマイグレーションプロセスで、システムを稼働させた状態で、メインメモリ120のデータのコピーを行う際に、二重化又はマイグレーションを制御するドライバ等の動作を示している。   Next, the operation will be described. FIG. 7 is a flowchart showing an operation when the computer system performs memory copy. FIG. 7 shows that when the computer system shown in FIG. 1 is applied to a fault-tolerant system or a virtualization system, the system is operated by a duplication process in the fault-tolerant system or a migration process in the virtualization system. The figure shows the operation of a driver or the like that controls duplication or migration when copying data in the main memory 120.

コンピュータシステムは、メモリコピーを開始すると(ステップS0)、コピーが必要なメインメモリ120の領域を特定し、最小ページアドレスレジスタ及び最大ページアドレスレジスタに値を設定する(ステップS1)。このとき、ハードウェアで完全にメインメモリの二重化を実現するフォールトトレラントシステムでは、搭載されているメインメモリ120全体のページアドレスの最小値、及び最大値が設定される。また、仮想化システムで1つの仮想マシンのマイグレーションを行う場合には、その仮想マシンにアサインされているメモリ領域のページアドレスの最小値、及び最大値が設定される。   When the computer system starts memory copying (step S0), it identifies the area of the main memory 120 that needs to be copied, and sets values in the minimum page address register and the maximum page address register (step S1). At this time, in the fault-tolerant system that completely realizes the duplication of the main memory by hardware, the minimum value and the maximum value of the page address of the entire main memory 120 mounted are set. Further, when performing migration of one virtual machine in the virtualization system, the minimum value and the maximum value of the page address of the memory area assigned to the virtual machine are set.

その後、コンピュータシステムは、メインメモリ120のコピーにおいてハードウェアでダーティフラグを記録及び管理するためにフラグカウンタ26を”0”にリセットし、フラグ許可レジスタ22をダーティフラグの書込みを行う値を設定する(ステップS2)。なお、フラグ選択レジスタ21に関してはフローチャートに記載していないが、初期値として、例えば、フラグメモリ140をダーティフラグ書込み用として選択する設定がされ、フラグメモリ150をダーティフラグ読出し用として選択する設定がされているものとする。   Thereafter, the computer system resets the flag counter 26 to “0” in order to record and manage the dirty flag by hardware in the copy of the main memory 120, and sets a value for writing the dirty flag in the flag permission register 22. (Step S2). The flag selection register 21 is not described in the flowchart. However, as an initial value, for example, the flag memory 140 is set to be selected for dirty flag writing, and the flag memory 150 is set to be selected for dirty flag reading. It is assumed that

その後、コンピュータシステムは、DMAモードレジスタ11に他モジュールと同期するメインメモリ領域全体をコピー(全メモリコピー)することを示す値を設定して、メインメモリ読出し制御部15にDMA開始の指示を出す(ステップS3)。   Thereafter, the computer system sets a value indicating that the entire main memory area synchronized with other modules is copied (all memory copy) in the DMA mode register 11, and issues a DMA start instruction to the main memory read control unit 15. (Step S3).

ここで、全メモリコピーのDMA開始後のハードウェアの動作を図8を参照して説明する。図8は、メインメモリ読出し制御部15が行う動作を示すフローチャートである。メインメモリ読出し制御部15は、DMAを開始すると(ステップS100)、DMAモードレジスタ11の値を確認して差分メモリコピーかどうかを判断する(ステップS101)。図7に示すステップS3の状態では全メモリコピーであるため判断結果は”NO”となり、メインメモリ読出し制御部15は、最小ページアドレスレジスタの値をページアドレスカウンタ12にセットする(ステップS103)。一方、DMAモードレジスタ11の値が差分メモリコピーでない場合、セレクタ13は、ページアドレスカウンタ12の値をメインメモリ読出し制御部15に出力する。   Here, the hardware operation after the start of DMA for all memory copies will be described with reference to FIG. FIG. 8 is a flowchart showing an operation performed by the main memory read control unit 15. When starting the DMA (step S100), the main memory read control unit 15 checks the value of the DMA mode register 11 to determine whether or not it is a differential memory copy (step S101). In the state of step S3 shown in FIG. 7, since all memory copies are made, the determination result is “NO”, and the main memory read control unit 15 sets the value of the minimum page address register in the page address counter 12 (step S103). On the other hand, when the value of the DMA mode register 11 is not the differential memory copy, the selector 13 outputs the value of the page address counter 12 to the main memory read control unit 15.

その後、メインメモリ読出し制御部15は、オフセットカウンタ14を”0”にセットし(ステップS104)、他モジュールと同期するメインメモリ領域の最小のアドレスへの読出し要求のトランザクションを生成し、トランザクション振分部131に出力する(ステップS105)。   Thereafter, the main memory read control unit 15 sets the offset counter 14 to “0” (step S104), generates a read request transaction to the minimum address of the main memory area synchronized with other modules, and distributes the transaction. The data is output to the unit 131 (step S105).

また、メインメモリ読出し制御部15は、トランザクションの出力を完了するとオフセットカウンタ14の値が最大かどうかを確認する(ステップS106)。最大でなければ、メインメモリ読出し制御部15は、オフセットカウンタ14の値を1つカウントアップする(ステップS107)。また、メインメモリ読出し制御部15は、そのカウントアップした値を用いて再度他モジュールと同期するメインメモリ領域の最小のアドレスへの読出し要求のトランザクションを生成し、トランザクション振分部131に出力する(ステップS105)。   Further, the main memory read control unit 15 confirms whether or not the value of the offset counter 14 is maximum when the output of the transaction is completed (step S106). If not, the main memory read control unit 15 increments the value of the offset counter 14 by one (step S107). In addition, the main memory read control unit 15 generates a read request transaction to the minimum address of the main memory area that is synchronized with another module again using the counted up value, and outputs the transaction to the transaction distribution unit 131 ( Step S105).

メインメモリ読出し制御部15は、上記の処理のループを繰り返し、オフセットカウンタ14の値が最大になると、DMAモードレジスタ11の値を確認して差分メモリコピーかどうかを判断する(ステップS108)。図7に示すステップS3の状態は全メモリコピーであるため判断結果は”NO”となり、メインメモリ読出し制御部15は、ページアドレスカウンタ12と最大ページアドレスレジスタの値とを比較する(ステップS111)。   The main memory read control unit 15 repeats the above processing loop, and when the value of the offset counter 14 becomes maximum, the main memory read control unit 15 checks the value of the DMA mode register 11 to determine whether or not the difference memory copy is performed (step S108). Since the state of step S3 shown in FIG. 7 is all memory copies, the determination result is “NO”, and the main memory read control unit 15 compares the page address counter 12 with the value of the maximum page address register (step S111). .

ページアドレスカウンタ12の値が最大ページアドレスレジスタの値より小さい場合、メインメモリ読出し制御部15は、ページアドレスカウンタ12の値を1つカウントアップする(ステップS112)。また、メインメモリ読出し制御部15は、オフセットカウンタ14の値を”0”にセットし(ステップS104)、次のページアドレスのメインメモリ120の読出し要求トランザクションを行う。   When the value of the page address counter 12 is smaller than the value of the maximum page address register, the main memory read control unit 15 increments the value of the page address counter 12 by one (step S112). Further, the main memory read control unit 15 sets the value of the offset counter 14 to “0” (step S104), and performs a read request transaction for the main memory 120 at the next page address.

上記のように処理を実行して、ページアドレスをカウントアップしながら、ページアドレスカウンタ12の値が最大ページアドレスレジスタの値と同じになるまで順番にメインメモリ120の読出し要求トランザクションの発行(生成)が行われると、ステップS111におけるページアドレスカウンタ12と最大ページアドレスレジスタとの値の比較の結果が”YES”となる。   Issuing (generating) read request transactions in the main memory 120 in order until the value of the page address counter 12 becomes the same as the value of the maximum page address register while executing the processing as described above and counting up the page address. Is performed, the result of comparison between the values of the page address counter 12 and the maximum page address register in step S111 is “YES”.

これまでに発行したメインメモリ120の読出し要求トランザクションは、トランザクション振分部131からプロセッサ110内のバスI/F115及びプロセッサ内部バス113を経由してメモリI/F114に渡される(出力される)。メモリI/F114は、メインメモリ120の読出し要求トランザクションで要求されたアドレスの位置にある、メインメモリ120のデータを読み出す。そして、コピー制御部130内のDMA制御部133宛のメインメモリ読出しトランザクションとして送信する。   The read request transaction of the main memory 120 issued so far is transferred (output) from the transaction distribution unit 131 to the memory I / F 114 via the bus I / F 115 in the processor 110 and the processor internal bus 113. The memory I / F 114 reads data in the main memory 120 at the address position requested by the read request transaction in the main memory 120. Then, it is transmitted as a main memory read transaction addressed to the DMA control unit 133 in the copy control unit 130.

メインメモリ読出しトランザクションは、メインメモリ読出し要求トランザクションの逆の経路をたどり、DMA制御部133のDMA制御デコーダ10に渡される(出力される)。DMA制御デコーダ10は、メインメモリ読出しトランザクションを受ける(入力する)と、メインメモリ読出し制御部15がメインメモリ読出し要求トランザクション発行時にメインメモリ120のアドレスを書込んだ送信バッファ16の対応する位置にメインメモリ120のデータを書込む。   The main memory read transaction follows the reverse path of the main memory read request transaction, and is passed (output) to the DMA control decoder 10 of the DMA control unit 133. When the DMA control decoder 10 receives (inputs) the main memory read transaction, the main memory read control unit 15 writes the address of the main memory 120 when the main memory read request transaction is issued to the corresponding position in the transmission buffer 16. Write data in memory 120.

メインメモリ読出し制御部15は、発行した全てのメインメモリ読出し要求トランザクションに対するメインメモリ読出しトランザクションによるメインメモリ120のデータが送信バッファ16に書込まれるのを待ち(ステップS113)、DMAの処理を終了する(ステップS114)。   The main memory read control unit 15 waits for the data in the main memory 120 by the main memory read transaction for all issued main memory read request transactions to be written to the transmission buffer 16 (step S113), and ends the DMA processing. (Step S114).

メインメモリ120のコピー先のモジュール100にあるDMA制御部133の受信バッファ17は、コピー元の送信バッファ16からメインメモリ120のアドレス及びデータの値を受ける(受信する)と、メインメモリ書込み制御部18で該当するメインメモリ120のアドレスへの書込みトランザクションを発生させ(生成し)、受信バッファ17にある該当するメインメモリ120へのデータを含めてトランザクション振分部131に出力する。   When the reception buffer 17 of the DMA control unit 133 in the copy destination module 100 of the main memory 120 receives (receives) the address and data value of the main memory 120 from the transmission buffer 16 of the copy source, the main memory write control unit In 18, a write transaction to the address of the corresponding main memory 120 is generated (generated), and the data including the data to the corresponding main memory 120 in the reception buffer 17 is output to the transaction distribution unit 131.

メインメモリ書込みトランザクションは、コピー先のモジュール100で、プロセッサ110内のバスI/F115及びプロセッサ内部バス113を経由してメモリI/F114に送られる(出力される)。そして、メモリI/F114は、メインメモリ120の書込み要求トランザクションで要求されたアドレスの位置にデータを書込む。   The main memory write transaction is sent (output) to the memory I / F 114 by the copy destination module 100 via the bus I / F 115 in the processor 110 and the processor internal bus 113. Then, the memory I / F 114 writes data at the address position requested by the write request transaction in the main memory 120.

上記のように処理することにより、コピー元のDMA制御部133内のメインメモリ読出し制御部15で発行した全てのメインメモリ読出し要求トランザクションに対するデータがコピー先のメインメモリ120に書込まれると、最小ページアドレスレジスタと最大ページアドレスレジスタとの間にあるメインメモリ120のデータが全てコピーされる。   By processing as described above, when data for all main memory read request transactions issued by the main memory read control unit 15 in the copy source DMA control unit 133 is written to the copy destination main memory 120, the minimum All data in the main memory 120 between the page address register and the maximum page address register is copied.

メインメモリ120のコピー元のモジュール100では、このDMAによるメインメモリ120のコピー以外にも通常のコンピュータシステムとしての処理を継続している。ここで、コピー元のモジュール100でメインメモリ120への書込みが発生したときには、図2に示すStore命令が実行され、メインメモリ120への書込みとともにメインメモリ120への書込みアドレスがフラグ制御部134にダーティフラグ書込みトランザクションとして送信される。   The copy source module 100 of the main memory 120 continues processing as a normal computer system in addition to the copying of the main memory 120 by this DMA. Here, when writing to the main memory 120 occurs in the copy source module 100, the Store instruction shown in FIG. 2 is executed, and the write address to the main memory 120 is sent to the flag control unit 134 along with the writing to the main memory 120. Sent as a dirty flag write transaction.

図9は、フラグ書込み制御部23が行う動作を示すフローチャートである。図9は、フラグ書込み制御部23がダーティフラグ書込みの要求を受けた後の動作を示している。フラグ制御デコーダ20は、ダーティフラグ書込みトランザクションを受ける(入力する)とフラグ書込み制御部23にダーティフラグの書込みを要求し、フラグ書込み制御部23は、ダーティフラグの書込み処理を開始する(ステップS200)。ダーティフラグの書込み処理を開始すると、フラグ書込み制御部23は、フラグ許可レジスタ22の値をチェックし(ステップS201)、ダーティフラグの書込みが有効でなければそのまま動作を終了する(ステップS208)。   FIG. 9 is a flowchart showing an operation performed by the flag writing control unit 23. FIG. 9 shows an operation after the flag write control unit 23 receives a dirty flag write request. Upon receiving (inputting) the dirty flag write transaction, the flag control decoder 20 requests the flag write control unit 23 to write the dirty flag, and the flag write control unit 23 starts the dirty flag write process (step S200). . When the dirty flag writing process is started, the flag writing control unit 23 checks the value of the flag permission register 22 (step S201), and if the dirty flag writing is not valid, the operation ends as it is (step S208).

ダーティフラグの書込みが有効な場合には、フラグ書込み制御部23は、書込みが発生したメインメモリ120のアドレスと、最小ページアドレスレジスタ及び最大ページアドレスレジスタの値とを比較して、コピーが必要な領域のアドレス範囲内かどうかをチェックし(ステップS202)、範囲内でなければそのまま動作を終了する(ステップS208)。   When the dirty flag writing is valid, the flag writing control unit 23 compares the address of the main memory 120 where the writing has occurred with the values of the minimum page address register and the maximum page address register, and requires copying. Whether it is within the address range of the area is checked (step S202), and if it is not within the range, the operation is terminated as it is (step S208).

コピーが必要な領域のアドレス範囲内の場合には、フラグ書込み制御部23は、フラグメモリ140,150から値を読み出してフラグ書込みレジスタ24にセットする。この場合、フラグメモリ140をダーティフラグ書込み用として選択され、フラグメモリ150をダーティフラグ読出し用として選択されている場合、セレクタ31が要求を受け(入力し)、フラグメモリI/F135を経由してフラグメモリ140の値を読み出す。そして、フラグ書込み制御部23は、読み出した値をセレクタ33を経由してフラグ書込みレジスタ24にセットする(ステップS203)。   If it is within the address range of the area that needs to be copied, the flag write control unit 23 reads the value from the flag memories 140 and 150 and sets it in the flag write register 24. In this case, when the flag memory 140 is selected for dirty flag writing and the flag memory 150 is selected for dirty flag reading, the selector 31 receives (inputs) a request and passes through the flag memory I / F 135. The value of the flag memory 140 is read. Then, the flag writing control unit 23 sets the read value in the flag writing register 24 via the selector 33 (step S203).

フラグ書込みレジスタ24にフラグメモリ140,150のデータをセットすると、フラグ書込み制御部23は、ダーティフラグ書込みトランザクションで指定されたメインメモリ120のアドレスのうちフラグメモリ140,150のデータのビット位置に該当する値を参照し、フラグ書込みレジスタ24の該当するビットをチェックする(ステップS204)。そして、フラグ書込み制御部23は、該当するビットが立っていればそのまま動作を終了する(ステップS208)。   When the data of the flag memories 140 and 150 is set in the flag write register 24, the flag write control unit 23 corresponds to the bit position of the data of the flag memories 140 and 150 among the addresses of the main memory 120 designated by the dirty flag write transaction. The corresponding bit of the flag write register 24 is checked with reference to the value to be processed (step S204). Then, the flag writing control unit 23 ends the operation as it is if the corresponding bit is set (step S208).

フラグ書込みレジスタ24の該当するビットが立っていなければ、フラグ書込み制御部23は、フラグカウンタ26をカウントアップして(ステップS205)、フラグ書込みレジスタ24の該当するビットのフラグを立てる(セットする)(ステップS206)。   If the corresponding bit of the flag write register 24 is not set, the flag write control unit 23 counts up the flag counter 26 (step S205) and sets (sets) the flag of the corresponding bit of the flag write register 24. (Step S206).

その後、フラグ書込みレジスタ24の値をフラグメモリ140,150に書込むが、フラグメモリ140をダーティフラグ書込み用として選択され、フラグメモリ150をダーティフラグ読出し用として選択されている場合、セレクタ31が要求を受け(入力し)、フラグ書込み制御部23は、フラグメモリI/F135を経由してフラグメモリ140に値を書込み(ステップS207)、動作を終了する(ステップS208)。   Thereafter, the value of the flag write register 24 is written into the flag memories 140 and 150. If the flag memory 140 is selected for dirty flag writing and the flag memory 150 is selected for dirty flag reading, the selector 31 requests In response (input), the flag writing control unit 23 writes a value to the flag memory 140 via the flag memory I / F 135 (step S207), and ends the operation (step S208).

上記のように処理することにより、フラグ許可レジスタ22の値がダーティフラグ書込み有効を示す間、コピーが必要なメインメモリ120の領域へ書込んだページアドレスをフラグメモリ140,150に記録することができる。   By processing as described above, the page address written in the area of the main memory 120 that needs to be copied can be recorded in the flag memories 140 and 150 while the value of the flag permission register 22 indicates that the dirty flag writing is valid. it can.

図7のステップS3でDMAが完了すると、コンピュータシステムは、DMA中にコピーが必要なメインメモリ120の領域へ書込まれたページアドレス(ダーティページ)の数がフラグカウンタ26に記録されており、予め設定された閾値以内に差分が入っているかどうか判断する(ステップS4)。差分が閾値より大きい場合には、コンピュータシステムは、フラグカウンタ26を”0”にリセットし、フラグ選択レジスタ21の設定に関してフラグメモリ140,150のダーティフラグ書込み用とダーティフラグ読出し用との設定を逆に切り替える(ステップS5)。   When the DMA is completed in step S3 of FIG. 7, the computer system records the number of page addresses (dirty pages) written in the area of the main memory 120 that needs to be copied during the DMA in the flag counter 26. It is determined whether or not the difference is within a preset threshold value (step S4). If the difference is larger than the threshold value, the computer system resets the flag counter 26 to “0”, and sets the flag memory 140 and 150 for dirty flag writing and dirty flag reading for the setting of the flag selection register 21. On the contrary, switching is performed (step S5).

その後、コンピュータシステムは、DMAモードレジスタ11の値をダーティフラグが立っている(セットされている)ページのみコピー(差分メモリコピー)することを示す値に設定して、メインメモリ読出し制御部15にDMA開始の指示を出す(出力する)(ステップS6)。   Thereafter, the computer system sets the value of the DMA mode register 11 to a value indicating that only the page where the dirty flag is set (set) is copied (difference memory copy), and sends it to the main memory read control unit 15. A DMA start instruction is issued (output) (step S6).

差分メモリコピーのDMA開始後のハードウェアの動作を、図8に示すメインメモリ読出し制御部15のフローチャートを用いて説明する。メインメモリ読出し制御部15は、DMAを開始すると(ステップS100)、DMAモードレジスタ11の値を確認して差分メモリコピーかどうかを判断する(ステップS101)。図7に示すステップS6の状態は差分メモリコピーであるため判断結果は”YES”となり、フラグ制御部134のフラグ読出し機能のリセットによりアドレスポインタ28には最小ページアドレスレジスタのページアドレスの上位16bitが設定され、フラグ読出しレジスタ29は”0”に設定され、メインメモリ読出し制御部15は、メインメモリ120にアクセスすべきページアドレスの読出しを行う(ステップS102)。   The hardware operation after the start of the differential memory copy DMA will be described with reference to the flowchart of the main memory read control unit 15 shown in FIG. When starting the DMA (step S100), the main memory read control unit 15 checks the value of the DMA mode register 11 to determine whether or not it is a differential memory copy (step S101). Since the state of step S6 shown in FIG. 7 is a differential memory copy, the determination result is “YES”, and the upper 16 bits of the page address of the minimum page address register are stored in the address pointer 28 by resetting the flag reading function of the flag control unit 134. The flag read register 29 is set to “0”, and the main memory read control unit 15 reads a page address to be accessed to the main memory 120 (step S102).

図10は、フラグ読出し制御部27が行う動作を示すフローチャートである。フラグ制御部134のフラグ読出し制御部27は、図10に示すフローチャートの動作により、メインメモリ120にアクセスすべきページアドレスの読出しを行う。フラグ読出し制御部27は、DMA制御部133からの読み出し要求により動作を開始し(ステップS300)、フラグ読出しレジスタ29の値が”0”かどうかチェックする(ステップS301)。初期状態ではフラグ読出しレジスタ29が”0”にリセットされており、フラグ読出し制御部27は、アドレスポインタ28と最大ページアドレスレジスタとの値を比較する(ステップS302)。   FIG. 10 is a flowchart showing the operation performed by the flag read control unit 27. The flag read control unit 27 of the flag control unit 134 reads the page address to be accessed to the main memory 120 by the operation of the flowchart shown in FIG. The flag read control unit 27 starts the operation in response to a read request from the DMA control unit 133 (step S300), and checks whether the value of the flag read register 29 is “0” (step S301). In the initial state, the flag read register 29 is reset to “0”, and the flag read control unit 27 compares the values of the address pointer 28 and the maximum page address register (step S302).

初期状態ではアドレスポインタ28には最小ページアドレスレジスタ値が入っているため判断結果は”NO”となり、フラグ読出し制御部27は、フラグメモリ140,150から値を読み出してフラグ読出しレジスタ29に値をセットする(ステップS303)。   In the initial state, since the address pointer 28 contains the minimum page address register value, the determination result is “NO”, and the flag reading control unit 27 reads the value from the flag memories 140 and 150 and sets the value in the flag reading register 29. Set (step S303).

フラグ選択レジスタ21は、初期値としてフラグメモリ140がフラグ書込み用に設定され、フラグメモリ150がフラグ読出し用に設定されているのであるが、全メモリコピーが終了して差分メモリコピーが開始される時点で切替る。そのため、フラグメモリ150がフラグ書込み用に設定され、フラグメモリ140がフラグ読出し用に設定されており、フラグ読出しレジスタ29にはフラグメモリ140から読み出されたデータとして、例えば2進数の”0000−1000−0100−0001”が書き込まれる。   In the flag selection register 21, the flag memory 140 is set for flag writing and the flag memory 150 is set for flag reading as initial values. However, all memory copies are completed and differential memory copy is started. Switch at the time. Therefore, the flag memory 150 is set for flag writing, the flag memory 140 is set for flag reading, and data read from the flag memory 140 is stored in the flag reading register 29 as, for example, binary “0000−”. 1000-0100-0001 "is written.

その後、フラグ読出し制御部27は、読み出したフラグメモリ140のアドレスに”0”を書込むことで、フラグメモリ140の値をクリアし(ステップS304)、次のフラグメモリ140,150からの読出しに備えてアドレスポインタ28を1つカウントアップする(ステップS305)。   Thereafter, the flag reading control unit 27 clears the value of the flag memory 140 by writing “0” to the address of the read flag memory 140 (step S304), and the next reading from the flag memories 140 and 150 is performed. In preparation, the address pointer 28 is counted up by one (step S305).

その後、フラグ読出し制御部27は、ステップS301に戻りフラグ読出しレジスタ29の値をチェックする。ここでは、フラグ読出しレジスタ29の値が”0”ではないため、フラグ読出し制御部27は、アドレスエンコーダ30によりアドレスポインタ28が示すページアドレスの上位16bitの値と、フラグ読出しレジスタ29の中でフラグが立っている最小のビットであるbit0の位置を示すページアドレスの下位4bitの値として2進数の”0000”を合わせて、DMA制御部133に出力する(ステップS307)。   Thereafter, the flag read control unit 27 returns to step S301 and checks the value of the flag read register 29. Here, since the value of the flag read register 29 is not “0”, the flag read control unit 27 sets the value of the upper 16 bits of the page address indicated by the address pointer 28 by the address encoder 30 and the flag in the flag read register 29. Binary “0000” is added as the value of the lower 4 bits of the page address indicating the position of bit 0, which is the smallest bit in which is set, and is output to the DMA control unit 133 (step S307).

その後、フラグ読出し制御部27は、次の読出しに備えてフラグ読出しレジスタ29の中でフラグが立っている最小のビットであるbit0を”0”にクリアし、フラグ読出しレジスタ29の値を2進数の”0000−1000−0100−0000”とする(ステップS308)。   After that, the flag read control unit 27 clears bit0, which is the smallest bit set in the flag read register 29, to “0” in preparation for the next read, and sets the value of the flag read register 29 to a binary number. "0000-1000-0100-0000" (step S308).

DMAモードレジスタ11の値が差分メモリコピーの場合、セレクタ13は、上記により読み出したフラグ制御部134の値をメインメモリ読出し制御部15に出力する。その後、メインメモリ読出し制御部15は、オフセットカウンタ14を”0”にセットする(ステップS104)。また、メインメモリ読出し制御部15は、ダーティフラグがセットされていたメインメモリのページ領域の最小のアドレスへの読出し要求のトランザクションを生成し、トランザクション振分部131に出力する(ステップS105)。   When the value of the DMA mode register 11 is differential memory copy, the selector 13 outputs the value of the flag control unit 134 read out as described above to the main memory read control unit 15. Thereafter, the main memory read control unit 15 sets the offset counter 14 to “0” (step S104). Further, the main memory read control unit 15 generates a read request transaction to the minimum address of the page area of the main memory for which the dirty flag has been set, and outputs the transaction to the transaction distribution unit 131 (step S105).

トランザクションの出力を完了すると、メインメモリ読出し制御部15は、オフセットカウンタ14の値が最大かどうかを確認する(ステップS106)。最大でなければ、メインメモリ読出し制御部15は、オフセットカウンタ14の値を1つカウントアップする(ステップS107)。また、メインメモリ読出し制御部15は、そのカウントアップした値を用いて再度他モジュールと同期するメインメモリ領域の最小のアドレスへの読出し要求のトランザクションを生成し、トランザクション振分部131に出力する(ステップS105)。   When the output of the transaction is completed, the main memory read control unit 15 checks whether or not the value of the offset counter 14 is maximum (step S106). If not, the main memory read control unit 15 increments the value of the offset counter 14 by one (step S107). In addition, the main memory read control unit 15 generates a read request transaction to the minimum address of the main memory area that is synchronized with another module again using the counted up value, and outputs the transaction to the transaction distribution unit 131 ( Step S105).

メインメモリ読出し制御部15は、上記の処理のループを繰り返し、オフセットカウンタ14の値が最大になると、DMAモードレジスタ11の値を確認して差分メモリコピーかどうかを判断する(ステップS108)。図7に示すステップS6の状態は差分メモリコピーであるため判断結果は”YES”となり、メインメモリ読出し制御部15は、フラグ制御部134から次のアドレスを読み出す(ステップS109)。   The main memory read control unit 15 repeats the above processing loop, and when the value of the offset counter 14 becomes maximum, the main memory read control unit 15 checks the value of the DMA mode register 11 to determine whether or not the difference memory copy is performed (step S108). Since the state of step S6 shown in FIG. 7 is differential memory copy, the determination result is “YES”, and the main memory read control unit 15 reads the next address from the flag control unit 134 (step S109).

フラグ制御部134のフラグ読出し制御部27は、次のアドレスの読出し要求により処理を開始すると(ステップS300)、フラグ読出しレジスタ29の値を確認する(ステップS301)。ここでは、最初の読出しの後の値として2進数の”0000−1000−0100−0000”となっているため、フラグ読出し制御部27は、アドレスエンコーダ30によりアドレスポインタ28が示すページアドレスの上位16bitの値と、フラグ読出しレジスタ29の中でフラグが立っている最小のビットであるbit6の位置を示すページアドレスの下位4bitの値として2進数の”0110”を合わせて、DMA制御部133に出力する(ステップS307)。   When the flag read control unit 27 of the flag control unit 134 starts processing in response to a read request for the next address (step S300), it checks the value of the flag read register 29 (step S301). Here, since the value after the first reading is binary “0000-1000-0100-0000”, the flag read control unit 27 uses the address encoder 30 to display the upper 16 bits of the page address indicated by the address pointer 28. And the binary “0110” as the value of the lower 4 bits of the page address indicating the position of bit 6 which is the smallest bit flagged in the flag read register 29, and output to the DMA control unit 133 (Step S307).

その後、フラグ読出し制御部27は、次の読出しに備えてフラグ読出しレジスタ29の中でフラグが立っている最小のビットであるbit6を”0”にクリアし、フラグ読出しレジスタ29の値を2進数の”0000−1000−0000−0000”とする(ステップS308)。   After that, the flag read control unit 27 clears bit 6 which is the smallest bit in the flag read register 29 to “0” in preparation for the next reading, and sets the value of the flag read register 29 to a binary number. "0000-1000-0000-0000" (step S308).

ここでは、図8に示すステップS109の処理を実行した後でフラグ制御部134からコピー終了通知ではないため(ステップS110)、メインメモリ読出し制御部15は、ステップS104の処理に戻る。メインメモリ読出し制御部15は、ステップS109で読み出したページアドレスのページ全体に対して、これまでと同様にオフセットアドレスをカウントアップしながら読出し要求トランザクションを行うと、またステップS109の処理に戻りフラグ制御部134から次のアドレスの読出しを行う。   In this case, after the process of step S109 shown in FIG. 8 is executed, the flag control unit 134 does not send a copy end notification (step S110), and the main memory read control unit 15 returns to the process of step S104. When the main memory read control unit 15 performs the read request transaction for the entire page of the page address read in step S109 while counting up the offset address as before, the main memory read control unit 15 returns to the process of step S109 and controls the flag. The next address is read from the unit 134.

メインメモリ読出し制御部15は、ステップS109でアドレスを読み出すたびに、図10に示す処理でフラグ読出しレジスタ29にフラグが立っているビットが残っている間には、フラグの立っている最小のビットに合わせてアドレスを発生(ステップS307)させながらフラグをクリア(ステップS308)していく。そして、メインメモリ読出し制御部15は、フラグ読出しレジスタ29が”0”になったら(ステップS301)、次のフラグメモリの値を読み出して(ステップS303)、アドレスポインタ28をカウントアップさせ(ステップS305)、ダーティページのアドレスの発生を続けていく。   Each time the main memory read control unit 15 reads an address in step S109, while the flag flag register 29 remains in the flag read register 29 in the process shown in FIG. 10, the minimum bit flag is set. The flag is cleared (step S308) while generating an address (step S307). When the flag read register 29 becomes “0” (step S301), the main memory read control unit 15 reads the next flag memory value (step S303) and increments the address pointer 28 (step S305). ) Continue to generate dirty page addresses.

最終的にフラグ読出しレジスタ29が”0”になり(ステップS301)、アドレスポインタ28が最大ページアドレスレジスタの値と同じになったときに(ステップS302)、メインメモリ読出し制御部15は、コピー終了をDMA制御部133に通知(出力)する(ステップS306)。   When the flag read register 29 finally becomes “0” (step S301) and the address pointer 28 becomes the same as the value of the maximum page address register (step S302), the main memory read control unit 15 finishes copying. Is notified (output) to the DMA control unit 133 (step S306).

図8に示すステップS109の処理でコピー終了を受けると、DMA制御部133のメインメモリ読出し制御部15は、ステップS110の処理でそのコピー終了を検出する。そして、メインメモリ読出し制御部15は、全メモリコピーの場合と同様に、これまでに発行した全てのメインメモリの読出し要求トランザクションに対するメインメモリ読出しトランザクションにより、メインメモリ120のデータが送信バッファ16に書込まれるのを待ち(ステップS113)、DMAの処理を終了する(ステップS114)。   When the copy end is received in the process of step S109 shown in FIG. 8, the main memory read control unit 15 of the DMA control unit 133 detects the copy end in the process of step S110. The main memory read control unit 15 writes the data in the main memory 120 to the transmission buffer 16 by the main memory read transaction for all the main memory read request transactions issued so far, as in the case of all memory copy. Waiting for loading (step S113), the DMA processing is terminated (step S114).

メインメモリ120のコピー先のモジュール100の動作は全メモリコピーのときと同じ動作となり、受信バッファ17で受けたメインメモリ120のアドレスの位置に合わせてコピー先のメインメモリ120にデータを書込む。この様にして、コピー元のDMA制御部133内のメインメモリ読出し制御部15で発行した全ダーティページのメインメモリ読出し要求トランザクションに対するデータがコピー先のメインメモリ120に書込まれる。   The operation of the copy destination module 100 in the main memory 120 is the same as in the case of all memory copy, and data is written in the copy destination main memory 120 in accordance with the address position of the main memory 120 received by the reception buffer 17. In this way, the data for the main memory read request transaction of all dirty pages issued by the main memory read control unit 15 in the copy source DMA control unit 133 is written in the copy destination main memory 120.

この差分メモリコピーの間にも、コピー元のモジュール100では通常のコンピュータシステムとしての処理を継続している。そして、メインメモリ120への書込みが発生したときには、図2に示すStore命令が実行され、メインメモリ120への書込みとともにメインメモリ120への書込みアドレスがフラグ制御部134にダーティフラグ書込みトランザクションとして送信される。このタイミングでは、フラグメモリ150がフラグ書込み用に設定され、フラグメモリ140がフラグ読出し用に設定されている。そのため、差分メモリコピーのためにフラグメモリ140が使用されている間も、全メモリコピーのときと同様にその後に発生したダーティフラグ書込みトランザクションによりフラグメモリ150に記録され、ダーティページの数がフラグカウンタ26でカウントされている。   Even during this differential memory copy, the copy source module 100 continues processing as a normal computer system. When the write to the main memory 120 occurs, the Store instruction shown in FIG. 2 is executed, and the write address to the main memory 120 is transmitted to the flag control unit 134 as a dirty flag write transaction along with the write to the main memory 120. The At this timing, the flag memory 150 is set for flag writing, and the flag memory 140 is set for flag reading. Therefore, while the flag memory 140 is used for the differential memory copy, it is recorded in the flag memory 150 by a dirty flag write transaction that occurs after that, as in the case of all memory copies, and the number of dirty pages is recorded in the flag counter. It is counted by 26.

図7に示すステップS6の処理で差分メモリコピーが終わると(ステップS6)、コンピュータシステムは、フラグカウンタ26に記録されている通常の処理で発生したダーティページの数をチェックして、予め設定された閾値以内に差分が入っているかどうか判断する(ステップS7)。差分が閾値より大きい場合には、コンピュータシステムは、再度ステップS5に戻り差分メモリコピーを行う。一方、ステップS5〜S7の処理を何回か繰り返して、ステップS7で閾値以内となった場合には、コンピュータシステムは、通常のコンピュータシステムとしての処理を行う一般プロセスを停止させ(ステップS8)、ステップS5,S6と同様にステップS9,S10で差分メモリコピーを実行する。このときには、ステップS8で一般プロセスが停止されているため、これ以上メインメモリ120への書込みが行われず、DMAが完了した時点でコピー先のモジュール100に必要な全てのメインメモリ領域の値がコピーされた状態となる。   When the differential memory copy is completed in the process of step S6 shown in FIG. 7 (step S6), the computer system checks the number of dirty pages generated in the normal process recorded in the flag counter 26, and is set in advance. It is determined whether the difference is within the threshold value (step S7). If the difference is greater than the threshold value, the computer system returns to step S5 again and performs a difference memory copy. On the other hand, if the process of steps S5 to S7 is repeated several times and the value falls within the threshold value in step S7, the computer system stops the general process for performing the process as a normal computer system (step S8). Similar to steps S5 and S6, differential memory copying is executed in steps S9 and S10. At this time, since the general process is stopped in step S8, no further writing to the main memory 120 is performed, and all the values of the main memory area necessary for the copy destination module 100 are copied when the DMA is completed. It will be in the state.

その後、コンピュータシステムは、フラグ許可レジスタ22にダーティフラグの書込みを無効にする設定を行い(ステップS11)、メモリコピーの処理を終了する(ステップS12)。   Thereafter, the computer system makes a setting for invalidating the writing of the dirty flag in the flag permission register 22 (step S11), and ends the memory copy process (step S12).

以上に説明したように、本実施形態によれば、フォールトトレラントシステムでの二重化プロセスや、仮想化システムでのマイグレーションプロセスで、システムを稼働させたままメインメモリ120のデータをコピーする際に、ダーティフラグの記録及び管理を全てハードウェアで実行する。そのため、OSやソフトウェアによるメインメモリ120上でのダーティフラグの記録や管理が不要となり、DMAの起動やDMAが完了したときのダーティページの数のチェックを行う程度でメモリコピーを実施することができる。従って、CPU(プロセッサ110)の負荷を抑えることができる。   As described above, according to the present embodiment, in the duplication process in the fault tolerant system or the migration process in the virtualization system, when the data in the main memory 120 is copied while the system is operating, the dirty process is performed. All flag recording and management is performed in hardware. This eliminates the need to record and manage the dirty flag on the main memory 120 by the OS or software, and allows the memory copy to be performed to such an extent that the DMA is started or the number of dirty pages is checked when the DMA is completed. . Therefore, the load on the CPU (processor 110) can be suppressed.

また、コンピュータシステムでは、ソフトウェアでダーティページを記録及び管理する場合、1度のメインメモリ120への書込みアクセスに対して、ダーティフラグのあるメモリアドレスからデータを読出し、書込みアクセスに対応するビットにダーティフラグをセットし、ダーティフラグのあるメモリアドレスにデータを書き戻すという3つの処理が発生する。このことに対して、本実施形態では、フラグ制御部134における書込みアクセスしたアドレスを書込むという処理の追加のみで実現可能となる。例えば、メインメモリ120への書込み時間が10nsであり、読出し時間が50nsであり、演算処理時間が5nsであり、メインメモリ120以外への書込み時間が20nsであるとした場合、ソフトウェアによりダーティページを記録及び管理を行うと、通常では1度のインメモリ120への書込みで10+50+5+10=75nsかかる。これに対して、本実施形態によれば、10+20=30nsとなり、CPUの負荷は半分以下となる。   In addition, in a computer system, when recording and managing a dirty page by software, for a write access to the main memory 120 once, data is read from a memory address with a dirty flag, and the bit corresponding to the write access is dirty. Three processes occur: setting the flag and writing the data back to the memory address with the dirty flag. On the other hand, in the present embodiment, it can be realized only by adding the process of writing the address accessed for writing in the flag control unit 134. For example, when the write time to the main memory 120 is 10 ns, the read time is 50 ns, the calculation processing time is 5 ns, and the write time to other than the main memory 120 is 20 ns, the dirty page is set by software. When recording and management are performed, it usually takes 10 + 50 + 5 + 10 = 75 ns to write to the in-memory 120 once. On the other hand, according to the present embodiment, 10 + 20 = 30 ns, and the CPU load is less than half.

また、本実施形態によれば、フラグ制御部134とDMA制御部133とが連携することにより、ダーティページのみの差分メモリコピーを完全にハードウェアで実現することが可能となる。そのため、OSやソフトウェアによりCPUを使用しながらメモリコピーを行う場合に比べて、CPUにはほとんど負荷がかからずにコピーを行うことができる。   In addition, according to the present embodiment, the flag control unit 134 and the DMA control unit 133 cooperate to realize a differential memory copy of only dirty pages completely in hardware. Therefore, compared with the case of performing memory copy while using the CPU by OS or software, the CPU can be copied with almost no load.

また、コンピュータシステムでは、ソフトウェアでダーティページを記録及び管理する場合、1度のメインメモリ120のコピーの際に、ダーティページアドレス取得のためのメモリ読出し、ダーティページのデータのメモリ読出し、コピー先へのデータ書込みという処理が必要となる。これに対して、本実施形態によれば、ハードウェアで全て実行するためCPUへの負荷がかからなくなる。   Also, in the computer system, when dirty pages are recorded and managed by software, memory copy for acquiring dirty page address, memory read of dirty page data, and copy destination to one copy of the main memory 120 are performed. The process of writing data is required. On the other hand, according to the present embodiment, since all are executed by hardware, no load is applied to the CPU.

また、本実施形態によれば、プロセッサやメモリなど主要なデバイスは標準的な機能により実現でき、唯一プロセッサのマイクロコードに手を入れることでメインメモリ120への書込みの際にそのアドレスを外部バスに出力させる機能を追加することができる。   In addition, according to the present embodiment, main devices such as a processor and a memory can be realized by a standard function, and the address is assigned to the external bus when writing to the main memory 120 by only handing the microcode of the processor. You can add a function to output to.

また、本実施形態によれば、本発明によるメモリコピー方法を適用したコンピュータシステムを実現するために必要な機能は、コピー制御部130及びフラグメモリ140,150だけである。そのため、これらのデバイスをシステムに新規に追加することで実現可能となり、通常の処理で必要となる主要なハードウェアデバイスはそのまま使用することができる。   Further, according to the present embodiment, only the copy control unit 130 and the flag memories 140 and 150 are necessary for realizing a computer system to which the memory copy method according to the present invention is applied. Therefore, it becomes realizable by newly adding these devices to the system, and main hardware devices necessary for normal processing can be used as they are.

以上のことから、本実施形態によれば、CPUの負担を抑えつつメモリのデータ転送の時間を短縮することができる。   From the above, according to the present embodiment, it is possible to shorten the time for data transfer in the memory while suppressing the burden on the CPU.

次に、本発明によるメモリコピー方法を適用したコンピュータシステムの最小構成について説明する。図11は、コンピュータシステムの最小の構成例を示すブロック図である。図11に示すように、コンピュータシステムは、二重化されたコンピュータシステムであって、フラグ制御部134と、コピー制御部130と、チップセット160とを備える。   Next, a minimum configuration of a computer system to which the memory copy method according to the present invention is applied will be described. FIG. 11 is a block diagram illustrating a minimum configuration example of a computer system. As shown in FIG. 11, the computer system is a duplicated computer system, and includes a flag control unit 134, a copy control unit 130, and a chip set 160.

フラグ制御部134は、データが書き換えられたか否かを示すダーティ情報(ダーティフラグ)を用いて、メインメモリの記憶領域を管理する機能を備える。また、コピー制御部130は、当該コンピュータシステム以外のコンピュータシステムにデータをコピーするコピー制御を行うときに、ダーティ情報に基いて、メインメモリの記憶領域のうちデータが書き換えられた領域のデータのみを転送する機能を備える。また、チップセット160は、コピー制御以外におけるデータの転送を行う機能を備える。また、コピー制御部130は、ハードウェアにより構成され、チップセット160とは異なるバスに接続されている。なお、例えば、チップセット160の中にコピー制御部130を含むように構成してもよい。   The flag control unit 134 has a function of managing the storage area of the main memory using dirty information (dirty flag) indicating whether data has been rewritten. In addition, when performing copy control for copying data to a computer system other than the computer system, the copy control unit 130, based on the dirty information, only the data in the area where the data is rewritten in the storage area of the main memory. It has a function to transfer. The chip set 160 has a function of transferring data other than copy control. The copy control unit 130 is configured by hardware, and is connected to a bus different from the chip set 160. Note that, for example, the copy control unit 130 may be included in the chip set 160.

図11に示す最小構成のコンピュータシステムによれば、CPUの負担を抑えつつメモリのデータ転送の時間を短縮することができる。   According to the computer system having the minimum configuration shown in FIG. 11, it is possible to reduce the time for data transfer in the memory while suppressing the burden on the CPU.

なお、上記に示した実施形態では、以下の(1)〜(6)に示すようなコンピュータシステムの特徴的構成が示されている。   In the embodiment described above, the characteristic configuration of the computer system as shown in the following (1) to (6) is shown.

(1)コンピュータシステムは、二重化されたコンピュータシステムであって、データが書き換えられたか否かを示すダーティ情報(例えば、ダーティフラグ)を用いて、メインメモリ(例えば、メインメモリ120)の記憶領域を管理する記憶領域管理部(例えば、フラグ制御部134)と、当該コンピュータシステム以外のコンピュータシステムにデータをコピーするコピー制御を行うときに、ダーティ情報に基いて、メインメモリの記憶領域のうちデータが書き換えられた領域のデータのみを転送するコピー用データ転送部(例えば、コピー制御部130)と、コピー制御以外におけるデータの転送を行う通常用データ転送部(例えば、チップセット160)とを備え、コピー用データ転送部は、ハードウェアにより構成され、通常用データ転送部とは異なるバスに接続されていることを特徴とする。 (1) The computer system is a duplicated computer system, and uses the dirty information (for example, dirty flag) indicating whether or not the data has been rewritten, and uses the storage area of the main memory (for example, the main memory 120). When performing copy control for copying data to a storage area management unit (for example, flag control unit 134) to be managed and a computer system other than the computer system, data in the storage area of the main memory is based on dirty information. A copy data transfer unit (for example, the copy control unit 130) that transfers only the data in the rewritten area, and a normal data transfer unit (for example, the chip set 160) that transfers data other than the copy control, The data transfer unit for copying consists of hardware and is used for normal use. Characterized in that it is connected to a different bus than the over data transfer unit.

(2)コンピュータシステムは、ダーティ情報を記憶するダーティ情報記憶部(例えば、フラグメモリ140,150)を備え、記憶領域管理部は、ダーティ情報記憶部が記憶するダーティ情報に、データが書き換えられたことを示す情報を書き込むように構成されていてもよい。 (2) The computer system includes a dirty information storage unit (for example, flag memories 140 and 150) that stores dirty information, and the storage area management unit rewrites data to the dirty information stored in the dirty information storage unit. It may be configured to write information indicating that.

(3)コンピュータシステムは、ハードウェアにより構成され、当該コンピュータシステム以外のコンピュータシステムとのデータの転送を中継する転送中継部(例えば、DMA制御部133)を備え、記憶領域管理部と転送中継部とが連携して処理を実行することによって、データが書き換えられた領域のデータのみを転送するように構成されていてもよい。 (3) The computer system is configured by hardware and includes a transfer relay unit (for example, a DMA control unit 133) that relays data transfer with a computer system other than the computer system, and includes a storage area management unit and a transfer relay unit May be configured to transfer only the data in the area in which the data has been rewritten by executing the process in cooperation with.

(4)コンピュータシステムは、マイクロコード(例えば、図2に示すマイクロコード)に従ってメインメモリの記憶領域にデータを書き込むとともに、該マイクロコードに従ってダーティ情報を書き込むように構成されていてもよい。 (4) The computer system may be configured to write data to the storage area of the main memory according to microcode (for example, the microcode shown in FIG. 2) and to write dirty information according to the microcode.

(5)コンピュータシステムは、フォールトトレラントシステムでの二重化プロセスにおけるコピー制御を行うように構成されていてもよい。 (5) The computer system may be configured to perform copy control in a duplex process in a fault tolerant system.

(6)コンピュータシステムは、仮想化システムでのマイグレーションプロセスにおけるコピー制御を行うように構成されていてもよい。 (6) The computer system may be configured to perform copy control in a migration process in the virtualization system.

本発明は、コンピュータシステムにおいて、ミッションクリティカルな用途のため少しのダウンタイムも許されないシステムとして使用される装置や、1つの装置で複数のゲストシステムを構築するような仮想化システムに適用することができる。   INDUSTRIAL APPLICABILITY The present invention can be applied to a computer system that is used as a system that does not allow any downtime for mission-critical applications, or a virtualization system that constructs a plurality of guest systems with a single device. it can.

10 DMA制御デコーダ
11 DMAモードレジスタ
12 ページアドレスカウンタ
13 セレクタ
14 オフセットカウンタ
15 メインメモリ読出し制御部
16 送信バッファ
17 受信バッファ
18 メインメモリ書込み制御部
20 フラグ制御デコーダ
21 フラグ選択レジスタ
22 フラグ許可レジスタ
23 フラグ書込み制御部
24 フラグ書込みレジスタ
25 フラグ検出部
26 フラグカウンタ
27 フラグ読出し制御部
28 アドレスポインタ
29 フラグ読出しレジスタ
30 アドレスエンコーダ
31,32,33,34 セレクタ
100 モジュール
110 プロセッサ
111 CPUコア
112 マイクロコード
113 内部バス
114 メモリI/F
115 バスI/F
120 メインメモリ
130 コピー制御部
131 トランザクション振分部
132 制御レジスタ群
133 DMA制御部
134 フラグ制御部
135,136 フラグメモリI/F
140,150 フラグメモリ
10 DMA control decoder 11 DMA mode register 12 page address counter 13 selector 14 offset counter 15 main memory read control unit 16 transmission buffer 17 reception buffer 18 main memory write control unit 20 flag control decoder 21 flag selection register 22 flag permission register 23 flag write Control unit 24 Flag write register 25 Flag detection unit 26 Flag counter 27 Flag read control unit 28 Address pointer 29 Flag read register 30 Address encoder 31, 32, 33, 34 Selector 100 Module 110 Processor 111 CPU core 112 Microcode 113 Internal bus 114 Memory I / F
115 Bus I / F
120 Main memory 130 Copy control unit 131 Transaction allocation unit 132 Control register group 133 DMA control unit 134 Flag control unit 135, 136 Flag memory I / F
140,150 flag memory

Claims (7)

二重化されたコンピュータシステムであって、
データが書き換えられたか否かを示すダーティ情報を用いて、メインメモリの記憶領域を管理する記憶領域管理部と、
当該コンピュータシステム以外のコンピュータシステムにデータをコピーするコピー制御を行うときに、前記ダーティ情報に基いて、前記メインメモリの記憶領域のうちデータが書き換えられた領域のデータのみを転送するコピー用データ転送部と、
前記コピー制御以外におけるデータの転送を行う通常用データ転送部とを備え、
当該コンピュータシステムは、マイクロコードに従って、前記コピー用データ転送部に前記ダーティ情報を書き込み、
前記コピー用データ転送部は、ハードウェアにより構成され、前記通常用データ転送部とは異なるバスに接続されている
ことを特徴とするコンピュータシステム。
A duplicated computer system,
A storage area management unit for managing the storage area of the main memory, using dirty information indicating whether or not the data has been rewritten;
Copy data transfer for transferring only data in the storage area of the main memory in which data has been rewritten based on the dirty information when performing copy control for copying data to a computer system other than the computer system And
A normal data transfer unit for transferring data other than the copy control,
The computer system writes the dirty information in the copy data transfer unit according to microcode,
The copy data transfer unit is configured by hardware and is connected to a different bus from the normal data transfer unit.
ダーティ情報を記憶するダーティ情報記憶部を備え、
記憶領域管理部は、前記ダーティ情報記憶部が記憶する前記ダーティ情報に、データが書き換えられたことを示す情報を書き込む
請求項1記載のコンピュータシステム。
A dirty information storage unit for storing dirty information;
The computer system according to claim 1, wherein the storage area management unit writes information indicating that data has been rewritten in the dirty information stored in the dirty information storage unit.
コンピュータシステムは、ハードウェアにより構成され、当該コンピュータシステム以外のコンピュータシステムとのデータの転送を中継する転送中継部を備え、
記憶領域管理部と前記転送中継部とが連携して処理を実行することによって、データが書き換えられた領域のデータのみを転送する
請求項1又は請求項2記載のコンピュータシステム。
The computer system is configured by hardware, and includes a transfer relay unit that relays data transfer with a computer system other than the computer system.
The computer system according to claim 1 or 2, wherein only the data in the area where the data has been rewritten is transferred by executing a process in cooperation between the storage area management section and the transfer relay section.
コンピュータシステムは、マイクロコードに従ってメインメモリの記憶領域にデータを書き込
請求項1から請求項3のうちのいずれか1項に記載のコンピュータシステム。
Computer system, the computer system according to any one of claims 3 to write no claims 1 to write data in the storage area of the main memory in accordance with the microcode.
コンピュータシステムは、フォールトトレラントシステムでの二重化プロセスにおけるコピー制御を行う
請求項1から請求項4のうちのいずれか1項に記載のコンピュータシステム。
The computer system according to any one of claims 1 to 4, wherein the computer system performs copy control in a duplex process in a fault-tolerant system.
コンピュータシステムは、仮想化システムでのマイグレーションプロセスにおけるコピー制御を行う
請求項1から請求項4のうちのいずれか1項に記載のコンピュータシステム。
The computer system according to any one of claims 1 to 4, wherein the computer system performs copy control in a migration process in the virtualization system.
二重化されたコンピュータシステムにおいて、データが書き換えられたか否かを示すダーティ情報を用いて、メインメモリの記憶領域を管理し、
当該コンピュータシステム以外のコンピュータシステムにデータをコピーするコピー制御を行うときに、前記ダーティ情報に基いて、前記メインメモリの記憶領域のうちデータが書き換えられた領域のデータのみを転送し、
当該コンピュータシステムが、マイクロコードに従って、前記コピー制御を行うときにデータの転送を行うコピー用データ転送部に前記ダーティ情報を書き込み、
記コピー用データ転送部が、ハードウェアにより構成され、前記コピー制御以外におけるデータの転送を行う通常用データ転送部とは異なるバスに接続されている
ことを特徴とするメモリコピー方法。
In the duplicated computer system, using the dirty information indicating whether the data has been rewritten, the storage area of the main memory is managed,
When performing copy control to copy data to a computer system other than the computer system, based on the dirty information, only the data in the area where the data is rewritten in the storage area of the main memory is transferred,
The computer system writes the dirty information in a copy data transfer unit that transfers data when performing the copy control according to microcode,
Before Kiko Phi data transfer unit is constituted by hardware, memory copying method characterized in that it is connected to a different bus than the normal data transfer unit for transferring data in other than the copy control.
JP2017063060A 2017-03-28 2017-03-28 Computer system and memory copy method Active JP6365718B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017063060A JP6365718B1 (en) 2017-03-28 2017-03-28 Computer system and memory copy method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017063060A JP6365718B1 (en) 2017-03-28 2017-03-28 Computer system and memory copy method

Publications (2)

Publication Number Publication Date
JP6365718B1 true JP6365718B1 (en) 2018-08-01
JP2018165915A JP2018165915A (en) 2018-10-25

Family

ID=63036750

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017063060A Active JP6365718B1 (en) 2017-03-28 2017-03-28 Computer system and memory copy method

Country Status (1)

Country Link
JP (1) JP6365718B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021081967A (en) * 2019-11-19 2021-05-27 三菱パワー株式会社 Arithmetic processing device, redundant system and program, and construction method for redundant configuration

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62226736A (en) * 1986-03-28 1987-10-05 Toshiba Corp Data equalizing method for duplicated system
JP2006178735A (en) * 2004-12-22 2006-07-06 Yokogawa Electric Corp Redundant system
JP2012181798A (en) * 2011-03-03 2012-09-20 Nec Corp Data transfer device, ft server, data transfer method, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62226736A (en) * 1986-03-28 1987-10-05 Toshiba Corp Data equalizing method for duplicated system
JP2006178735A (en) * 2004-12-22 2006-07-06 Yokogawa Electric Corp Redundant system
JP2012181798A (en) * 2011-03-03 2012-09-20 Nec Corp Data transfer device, ft server, data transfer method, and program

Also Published As

Publication number Publication date
JP2018165915A (en) 2018-10-25

Similar Documents

Publication Publication Date Title
US7363389B2 (en) Apparatus and method for enhanced channel adapter performance through implementation of a completion queue engine and address translation engine
US7523260B2 (en) Propagating data using mirrored lock caches
US20080235477A1 (en) Coherent data mover
US10713083B2 (en) Efficient virtual I/O address translation
US9146879B1 (en) Virtual memory management for real-time embedded devices
US7734842B2 (en) Computer-implemented method, apparatus, and computer program product for managing DMA write page faults using a pool of substitute pages
US6996693B2 (en) High speed memory cloning facility via a source/destination switching mechanism
US7069394B2 (en) Dynamic data routing mechanism for a high speed memory cloner
US20220179792A1 (en) Memory management device
US6892283B2 (en) High speed memory cloner with extended cache coherency protocols and responses
US20080065855A1 (en) DMAC Address Translation Miss Handling Mechanism
JP5439808B2 (en) System LSI with multiple buses
US6898677B2 (en) Dynamic software accessibility to a microprocessor system with a high speed memory cloner
JP6365718B1 (en) Computer system and memory copy method
JP5673396B2 (en) Information processing system, information processing program, and information processing method
US6986013B2 (en) Imprecise cache line protection mechanism during a memory clone operation
US7502917B2 (en) High speed memory cloning facility via a lockless multiprocessor mechanism
US6986011B2 (en) High speed memory cloner within a data processing system
US6915390B2 (en) High speed memory cloning facility via a coherently done mechanism
GB2502858A (en) A method of copying data from a first memory location and storing it in a cache line associated with a different memory location
JP2685455B2 (en) Data processing device
JP4965974B2 (en) Semiconductor integrated circuit device
US20070168646A1 (en) Data exchange between cooperating processors
US6928524B2 (en) Data processing system with naked cache line write operations
JP2008123333A5 (en)

Legal Events

Date Code Title Description
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: 20180605

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180618

R150 Certificate of patent or registration of utility model

Ref document number: 6365718

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150