JP4878050B2 - Computer and control method - Google Patents
Computer and control method Download PDFInfo
- Publication number
- JP4878050B2 JP4878050B2 JP2008303592A JP2008303592A JP4878050B2 JP 4878050 B2 JP4878050 B2 JP 4878050B2 JP 2008303592 A JP2008303592 A JP 2008303592A JP 2008303592 A JP2008303592 A JP 2008303592A JP 4878050 B2 JP4878050 B2 JP 4878050B2
- Authority
- JP
- Japan
- Prior art keywords
- processor
- spin
- spin wait
- detection unit
- instruction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
本発明は、キャッシュメモリを備えた複数のプロセッサを有する共有メモリ型マルチプロセッサ構成のコンピュータ及び制御方法に関し、特に、同期処理などに用いられるスピンウェイト命令の命令実行効率を改善するためのコンピュータ及び制御方法に関する。
The present invention relates to a shared memory multiprocessor computer having a plurality of processors having a cache memory and a control method, and more particularly to a computer and a control for improving the instruction execution efficiency of a spin wait instruction used for synchronous processing and the like. Regarding the method.
従来、キャッシュメモリを備えた複数のプロセッサでメインメモリを共有する共有メモリ型マルチプロセッサシステムにおいては、プロセッサ間の同期処理にスピンウェイトが用いられることが多い。 Conventionally, in a shared memory multiprocessor system in which a main memory is shared by a plurality of processors having a cache memory, spin weights are often used for synchronization processing between the processors.
このプロセッサ間の同期処理にスピンウェイトを使用する代表的な例がスピンロックである。スピンロックの命令処理は図1のように、検証部100と設定部102の手順で実現されることが多い。検証部100は、ロック獲得ポイントに達したプロセス又はスレッドがステップS1で変数Xをロードし、ステップS2で変数Xが例えばX=0といったロック獲得が可能であることを示す値か否か判定し、X=0になるまでステップS1,S2の処理を繰り返すスピンを行って待つスピンウェイトを行う。設定部102は、
「test_and_set」や「compare_and_jump」などのインターロック命令を用いて、ステップS3でロック変数値XをX=1に設定してスピンロック処理を抜ける。
A typical example of using a spin weight for synchronization processing between processors is spin lock. Spin lock command processing is often realized by the procedure of the verification unit 100 and the
Using an interlock instruction such as “test_and_set” or “compare_and_jump”, the lock variable value X is set to X = 1 in step S3, and the spin lock process is exited.
もしロック変数値X=1の設定に失敗したら検証部100に戻りスピンウェイトを継続する。このように、ロック獲得が可能であるかどうかをチェックするスピンロックの検証部100でスピンウェイトが用いられることが多い。 If the setting of the lock variable value X = 1 fails, the process returns to the verification unit 100 and continues the spin wait. As described above, the spin weight is often used in the spin lock verification unit 100 that checks whether the lock can be acquired.
スピンロック以外では、共有メモリ型マルチプロセッサシステムにおけるプロセッサ間の同期処理にスピンウェイトを使用するバリア同期がある。バリア同期とは、同期対象であるプロセス又はスレッドが同期ポイントで待ち合わせを行うことであり、メモリベースのバリア同期の場合には、図2の手順で実現されることが多い。 Other than spin lock, there is barrier synchronization using spin wait for synchronization processing between processors in a shared memory multiprocessor system. Barrier synchronization means that a process or thread to be synchronized waits at a synchronization point. In the case of memory-based barrier synchronization, it is often realized by the procedure of FIG.
まず設定部104のステップS1において、プロセス又はスレッドが同期ポイントに達する前はロック変数XはX=0である。同期ポイントに達するとプロセス又はスレッドは、「test_and_set」や「compare_and_jump」などのインターロック命令を用いて該当するプロセス又はスレッドに対応するロック変数Xのビットを1に設定し、検証部106に進む。
First, in step S1 of the setting unit 104, the lock variable X is X = 0 before the process or thread reaches the synchronization point. When the synchronization point is reached, the process or thread sets the bit of the lock variable X corresponding to the corresponding process or thread to 1 using an interlock instruction such as “test_and_set” or “compare_and_jump”, and proceeds to the
検証部106は、ステップS2でロック変数Xをロードし、ステップS3でバリア同期の対象となっている全プロセス又は全スレッドのビットが1になるまで、即ち
all X=1まで スピンして待つスピンウェイトを行う。全プロセス又は全スレッドが同期ポイントに達すると、all X=1になり、同期がとられた状態でスピンウェイトを抜けて次の処理に移行する。
The
このようにバリア同期でも、全プロセス又は全スレッドが同期ポイントに達しているかどうかをチェックする検証部106でスピンウェイトが用いられることが多い。
As described above, even in the barrier synchronization, the spin weight is often used in the
また、I/Oデバイス(入出力デバイス)との同期にもスピンウェイトが使用されている。通常のI/O処理では、プロセッサとI/Oデバイス間の同期には割り込みを使うのが一般的であった。これは、I/Oデバイスがプロセッサと比べて非常に遅く、I/Oデバ イスからの応答をプロセッサが待ち続けることの損失が大きかったためである。 Also, spin waits are used for synchronization with I / O devices (input / output devices). In normal I / O processing, an interrupt is generally used for synchronization between a processor and an I / O device. This is because the I / O device is very slow compared to the processor, and the loss that the processor keeps waiting for a response from the I / O device is large.
しかし、I/Oデバイスの高速化により、一部のI/Oデバイスにおいては割り込みを使うことによる弊害が出てきている。一般的に割り込みはオーバーヘッド(遅延)が大きいので、I/Oデバイス本来の速度を活かせない。そのため、一部の高速I/Oデバイスに関しては、スピンウェイトによる同期処理を採用し始めている。
しかしながら、スピンウェイトの実行には無駄が多い。スピンウェイトは、ウェイト終了条件となっている変数値が他のプロセッサやI/Oデバイスなどの他のエージェントにより所望の値に変更されるまで延々と同じ命令列の実行を繰り返す。繰り返しの回数となるスピン回数は、場合によっては数百回、数千回に及ぶこともめずらしくなく、ある意味でプロセッサを無駄に使用しているといえる。電力消費の観点から考えると、スピンウェイトのあいだは無駄に電力を消費していることになる。 However, the execution of spin wait is wasteful. In the spin wait, the execution of the same instruction sequence is repeated until the variable value serving as the wait end condition is changed to a desired value by another agent such as another processor or an I / O device. The number of spins, which is the number of repetitions, is rarely in the range of several hundreds or thousands, and it can be said that the processor is wasted in a sense. From the viewpoint of power consumption, the power is wasted during the spin weight.
また、複数スレッドの同時実行が可能なSMT(Simultaneous
Multi−Threading archtecture)プロセッサにおいては、スピンウェイトを実行中のスレッドが他の実行スレッドの妨げとなる可能性がある。一般的にSMTプロセッサでは、プロセッサリソースはスレッド間で共有されている。このプロセッサリソースは、実行スレッド毎に均等に割り当てられるのではなく、各スレッドの状態に応じて割り当てられるプロセッサリソースの数や量が変わるというのが一般的である。プロセッサリソース割り当てを決定する基準にはいろいろな方法が提案されているが、例えば次のようなアプローチがある。
Also, SMT (Simultaneous) that allows simultaneous execution of multiple threads
In a multi-threading architecture (processor), a thread that is executing a spin wait may interfere with another execution thread. Generally, in the SMT processor, processor resources are shared among threads. In general, the processor resources are not allocated evenly for each execution thread, but the number and amount of processor resources to be allocated vary according to the state of each thread. Various methods have been proposed as criteria for determining processor resource allocation. For example, there are the following approaches.
(1)キャッシュミスを起こしたスレッドヘのリソース割り当てを減らす;
(2)投機的に実行している命令数が多いスレッドヘのリソース割り当てを減らする;
(3)リザベーションステーションに登録されている命令数の多いスレッドヘのリソース割り当てを減らす;
これらのアプローチは、よりスムーズに命令を実行できる可能性の高いスレッドに優先的にプロセッサリソースを割り当てようという考えに基づいている。ここスピンウェイトは命令を非常にスムーズに実行することができる。なぜなら、同じ命令列の実行を繰り返しているだけなので、キャッシュミスも起らないし、分岐予測も外れることがないからである。
(1) Reduce resource allocation to the thread that caused the cache miss;
(2) Reduce resource allocation to threads with a large number of speculatively executing instructions;
(3) Reduce resource allocation to threads with a large number of instructions registered in the reservation station;
These approaches are based on the idea of preferentially allocating processor resources to threads that are likely to execute instructions more smoothly. Here spin weights can execute instructions very smoothly. This is because only the execution of the same instruction sequence is repeated, so that no cache miss occurs and branch prediction is not missed.
したがって、SMTプロセッサにおいては、スピンウェイトを実行中のスレッドに期せずして優先的にプロセッサリソースを割り当てることになる。すると、スピンウェイト実行中スレッドに比べ、生産性の高い命令列を実行していると思われる他のスレッドへのプロセッサリソースの割り当てが減ってしまい、結果としてプロセッサの性能が下がる可能性がある。 Therefore, in the SMT processor, processor resources are preferentially allocated without regard to the thread that is executing the spin wait. Then, as compared with a thread that is executing a spin wait, the allocation of processor resources to other threads that are considered to execute a highly productive instruction sequence may be reduced, resulting in a decrease in processor performance.
この様に、スピンウェイトには
(1) 電力を無駄に消費する;
(2)SMTプロセッサの性能が下げる可能性が高い;
といった問題がある。
In this way, the spin weight (1) wastes power.
(2) SMT processor performance is likely to be degraded;
There is a problem.
この問題への対策として、スピンウェイトが始まったことを検出したら、スピンウェイトの実行を停止し、スピンウェイトから抜けられる条件が整ったら割り込みにより通知し、実行を再開するという手法もある。しかし、スピンウェイトから抜けられる条件が整ったことを、割り込みで通知してしまっては元も子もない。そもそもスピンウェイトは低遅延を実現するために採用しているのであり、割り込みを使ったら時間コストが大きくなってしまう。 As a countermeasure against this problem, there is a method of stopping execution of the spin wait when it is detected that the spin wait has started, and notifying by an interrupt when the condition for exiting from the spin wait is satisfied, and restarting the execution. However, if the conditions for exiting the spin wait are in place, there is no origin or child if it is notified by an interrupt. In the first place, spin wait is used to achieve low delay, and using interrupts increases the time cost.
また、同期専用のハードウェアを備えるという手法もある。しかし、その場合にはハードウェアコストが高くなる。現在、メモリベースの同期処理が一般的となっている背景には、汎用デバイス(メモリ)を用いて同期処理を行うことによるコスト削減のメリットが大きいという歴史的な経緯がある。 There is also a method of providing hardware dedicated for synchronization. However, in that case, the hardware cost becomes high. Currently, memory-based synchronization processing is common, and there is a historical background that there is a great merit in cost reduction by performing synchronization processing using a general-purpose device (memory).
本発明は、スピンウェイトの実行で生じる電力やプロセッサリソースの無駄を省いて命令実行効率を高めるコンピュータ及び制御方法を提供することを目的とする。
It is an object of the present invention to provide a computer and a control method that increase the efficiency of instruction execution by eliminating the waste of power and processor resources caused by the execution of spin waits.
本発明は、キャッシュメモリを備えた複数のプロセッサを有するコンピュータにおいて、プロセッサによるスピンウェイト命令の実行中を検出した際に、スピンウェイトの終了条件となっている変数値の監視を指示した後にプロセッサの動作状態を変更させるスピンウェイト検出部と、スピンウェイト検出部から指示された変数値を監視し、この変数値が変更されたことを検出した場合にプロセッサに値変更を通知して動作状態を元に戻す値変更検出部とを設けたことを特徴とする。 In the present invention, in a computer having a plurality of processors having a cache memory, when it is detected that a spin wait instruction is being executed by the processor, monitoring of a variable value that is a spin wait termination condition is instructed. The spin weight detection unit that changes the operation state and the variable value instructed by the spin weight detection unit are monitored, and when the change of the variable value is detected, the processor is notified of the value change and the operation state is recovered. And a value change detecting unit for returning to (2).
このように本発明は、スピンウェイトから脱出できる可能性がない時、もしくは可能性が低い時は、プロセッサの動作状態を変更することにより、スピンウェイト実行中に生ずる無駄を削減する。また本発明によれば、プロセッサにスピンウェイト検出部を設け、またキャッシュメモリに値変更検出部を設けるといった少量のハードウェアの追加により、スピンウェイトが終了する可能性が無いか又は低いときの無駄を削減し、スピンウェイトの低遅延という特徴を損ねることなく、プロセッサの命令実行効率を良くする。 As described above, the present invention reduces waste caused during the execution of the spin wait by changing the operating state of the processor when there is no possibility of being able to escape from the spin wait or when the possibility is low. In addition, according to the present invention, there is no possibility that the spin wait is completed or low due to the addition of a small amount of hardware such as providing the processor with a spin weight detection unit and providing a cache memory with a value change detection unit. And improving the instruction execution efficiency of the processor without impairing the feature of low delay of the spin wait.
スピンウェイト検出部は、プロセッサによるスピンウェイト命令の実行中を検出した際に、スピンウェイト命令の実行で参照している変数値が格納されたキャッシュメモリのキャッシュブロックの監視を値変更検出部に指示する。値変更検出部は、キャッシュブロックの状態が他のプロセッサ又は入出力ユニットにより無効化されたことを検出した場合に、プロセッサに値変更を通知する。変更検出部は、キャッシュブロックがキャッシュメモリから追い出されたことを検出した場合にも、プロセッサに値変更を通知する。 When the spin wait detection unit detects that the processor is executing a spin wait instruction, the spin wait detection unit instructs the value change detection unit to monitor the cache block of the cache memory in which the variable value referenced in the execution of the spin wait instruction is stored. To do. The value change detection unit notifies the processor of a value change when it is detected that the state of the cache block has been invalidated by another processor or the input / output unit. The change detection unit also notifies the processor of a value change when it is detected that the cache block has been evicted from the cache memory.
スピンウェイト検出部は、プロセッサによるスピンウェイト命令の実行中を検出した際に、スピンウェイト命令の実行で参照している変数値が格納されているメモリアドレスに対するバスリクエストの監視を値変更検出部に指示する。値変更検出部は、スピンウェイト検出部から指示された変数値が格納されているメモリアドレスに対するバスリクエストを監視し、他のプロセッサ又は入出力ユニットから前記メモリアドレスに対するバスリクエストを検出した場合に、プロセッサに値変更を通知する。 When the spin wait detection unit detects that the processor is executing the spin wait instruction, the value change detection unit monitors the bus request for the memory address in which the variable value referenced in the execution of the spin wait instruction is stored. Instruct. The value change detection unit monitors the bus request for the memory address in which the variable value instructed from the spin weight detection unit is stored, and when the bus request for the memory address is detected from another processor or input / output unit, Notify the processor of the value change.
プロセッサは通常モードと低消費電力モードの少なくとも2つ以上の動作モードを持っている場合、スピンウェイト検出部は、スピンウェイト命令の実行中を検出した際にプロセッサの動作モードを低消費電力モードに変更する。また値変更検出部は、スピンウェイトの終了条件となっている変数値の変更を検出した際に、プロセッサの動作モードを通常モードに変更させる。これによりスピンウェイト実行中にプロセッサの消費電力量を削減できる。 When the processor has at least two operation modes of the normal mode and the low power consumption mode, the spin wait detection unit sets the operation mode of the processor to the low power consumption mode when detecting that the spin wait instruction is being executed. change. Further, the value change detection unit changes the operation mode of the processor to the normal mode when detecting the change of the variable value which is the spin wait termination condition. As a result, the power consumption of the processor can be reduced during the execution of the spin wait.
プロセッサはプログラム実行を停止する機能を持っている場合、スピンウェイト検出部は、スピンウェイト命令の実行中を検出した際にプロセッサにプログラムの実行を停止させる。また値変更検出部は、スピンウェイトの終了条件となっている変数値の変更を検出した際に、プロセッサにプログラムの実行を再開させる。これによりスピンウェイト実行中にプログラムの実行が停止され、これに伴いプロセッサの消費電力量を削減できる。 When the processor has a function of stopping the program execution, the spin wait detection unit causes the processor to stop executing the program when detecting that the spin wait instruction is being executed. The value change detection unit causes the processor to resume execution of the program when detecting the change of the variable value which is the spin wait termination condition. As a result, the execution of the program is stopped during the spin wait execution, and accordingly, the power consumption of the processor can be reduced.
プロセッサは、複数スレッドを同時実行できる構造(SMTプロセッサ)を持っている場合、スピンウェイト検出部は、スピンウェイト命令の実行中のスレッドを検出した際に、このスレッドヘのプロセッサリソースの割り当てを減少又は停止させる。また値変更検出部は、スピンウェイトの終了条件となっている変数値の変更を検出した際に、スレッドヘのプロセッサリソースの割り当てを増加又は再開させる。 When the processor has a structure (SMT processor) capable of executing a plurality of threads at the same time, when the spin weight detection unit detects a thread that is executing a spin wait instruction, the processor decreases the allocation of processor resources to the thread or Stop. Further, the value change detection unit increases or restarts the allocation of the processor resource to the thread when detecting the change of the variable value which is the spin wait termination condition.
これによりSMPプロセッサにおけるスレッドのスピンウェイト実行中に、他のスレッドプログラムの実行が停止され、スピンウェイト実行スレッドによる他のスレッドヘの悪影響を回避し、結果としてプロセッサの性能が上がる。 As a result, the execution of other thread programs is stopped during the spin wait execution of the thread in the SMP processor, the adverse effect on the other threads by the spin wait execution thread is avoided, and as a result, the performance of the processor is improved.
プロセッサはスピンウェイト専用命令を持っており、スピンウェイト検出部は、プロセッサによるスピンウェイト専用命令の実行からスピンウェイト実行中を検出する。またスピンウェイト検出部は、プロセッサによる実効済命令列を格納するバッファと、スピンウェイト専用命令の命令列を記録する命令列記録部と、バッファと命令列記録部とを比較して命令列が一致した際に、スピンウェイト実行中を検出する比較部とを備える。 The processor has a spin wait dedicated instruction, and the spin wait detection unit detects that the spin wait is being executed from the execution of the spin wait dedicated instruction by the processor. The spin wait detection unit compares the instruction sequence by comparing the buffer that stores the executed instruction sequence by the processor, the instruction sequence recording unit that records the instruction sequence of the dedicated spin wait instruction, and the buffer and instruction sequence recording unit. And a comparison unit for detecting that the spin wait is being executed.
本発明は、キャッシュメモリを備えた複数のプロセッサを有するコンピュータの制御方法を提供するものであり、
プロセッサによるスピンウェイト命令の実行中を検出した際に、スピンウェイトの終了条件となっている変数値の監視を開始した後にプロセッサの動作状態を変更させ、
監視中に変数値が変更されたことを検出した場合にプロセッサに値変更を通知して動作状態を元に戻させることを特徴とする。
この制御方法の詳細はコンピュータの場合と基本的に同じになる。
The present invention provides a method for controlling a computer having a plurality of processors having a cache memory,
When the execution of the spin wait instruction by the processor is detected, change the operating state of the processor after monitoring the variable value that is the end condition of the spin wait,
When it is detected that a variable value has been changed during monitoring, the processor is notified of the value change and the operation state is restored.
The details of this control method are basically the same as in the case of a computer.
本発明によれば、スピンウェイトの特徴である遅延の低さを犠牲にすることなく、スピンウェイト命令実行によって発生する無駄な命令実行やプロセッサの動作を制限することができ、その結果としてプロセッサの電力消費を節減することができる。 According to the present invention, it is possible to limit useless instruction execution and processor operation generated by spin wait instruction execution without sacrificing the low delay characteristic of spin wait, and as a result, the processor Power consumption can be saved.
またSMTプロセッサにあっては、スピンウェイト実行スレッドによる他のスレッドへの悪影響を回避することができ、SMTプロセッサの処理能力を向上させることができる。
Further, in the SMT processor, it is possible to avoid an adverse effect on other threads by the spin wait execution thread, and it is possible to improve the processing capability of the SMT processor.
図3は、本発明が適用される共有メモリ型マルチプロセッサシステムのブロック図である。図3において、マルチプロセッサシステムは、例えば4台のプロセッサ10−1〜10−4を備えており、プロセッサ10−1〜10−4ごとにキャッシュメモリ12−1〜12−4が設けられている。 FIG. 3 is a block diagram of a shared memory multiprocessor system to which the present invention is applied. In FIG. 3, the multiprocessor system includes, for example, four processors 10-1 to 10-4, and cache memories 12-1 to 12-4 are provided for the processors 10-1 to 10-4. .
キャッシュメモリ12−1〜12−4はバス14を介して共有メモリとして使用されるメインメモリ16を接続している。またバス14には入出力ユニット18が接続され、この入出力ユニット18としては例えば入出力エージェントとして機能する入出力プロセッサであり、外部のハードディスクドライブHDDなどのサブシステムやネットワーク、更にはキーボード、マウス、ディスプレイなどの入出力機器を接続している。
The cache memories 12-1 to 12-4 are connected to the main memory 16 used as a shared memory via the
図4は、図3のプロセッサ10−1の実施形態である。なお、他のプロセッサ10−2〜10−4も同じ実施形態となる。図4において、プロセッサ10−1は、プロセッサコア11、キャッシュメモリインタフェ−ス20を備える。またキャッシュメモリ12−1は、プロセッサインタフェース24、キャッシュメモリ制御部26、バスインタフェース28及びキャッシュメモリアレイ30を備えている。
FIG. 4 is an embodiment of the processor 10-1 of FIG. The other processors 10-2 to 10-4 are also the same embodiment. In FIG. 4, the processor 10-1 includes a
このようなプロセッサ10−1及びキャッシュメモリ12−1の構成は従来のプロセッサと同じであるが、本発明にあってはプロセッサ10−1側に新たにスピンウェイト検出部22を設け、同時にキャッシュメモリ12−1側に値変更検出部32を設けている。プロセッサ10−1に設けられたスピンウェイト検出部22は、プロセッサコア11によるスピンウェイト命令の実行中を検出した際に、スピンウェイトの終了条件となっている変数値の監視をキャッシュメモリ12−1側に設けた値変更検出部32に指示した後に、プロセッサ10−1の動作状態を変更させる。
The configurations of the processor 10-1 and the cache memory 12-1 are the same as those of the conventional processor. However, in the present invention, a spin
スピンウェイト検出部22によるプロセッサ10−1の動作状態の変更としては、スピンウェイト命令の実行中に生ずる無駄を削減する動作状態に変更するものであり、具体的には次のようになる。
The change of the operation state of the processor 10-1 by the spin
例えばプロセッサ10−1が通常モードと低消費電力モードの少なくとも2つの動作モードを持っている場合には、スピンウェイト検出部22でスピンウェイト命令の実行中を検出した際にはプロセッサの動作モードを低消費電力モードに変更する。
For example, when the processor 10-1 has at least two operation modes of a normal mode and a low power consumption mode, when the spin
またプロセッサがプログラム実行を停止する機能を持っている場合には、スピンウェイト検出部22でスピンウェイト命令の実行中を検出した際にプロセッサにプログラムの実行を停止させる。このスピンウェイト命令の実行を検出した際の低消費電力モードへの変更あるいはプログラムの実行停止のいずれも、スピンウェイトの終了条件が所定の値に変更されるまで延々とスピンウェイトの命令列の実行を繰り返すスピンにより、プロセッサの無駄な動作や無駄に使用している消費電力を防ぐようにする。もちろん、スピンウェイト命令検出時のプロセッサによるプログラムの実行停止は低消費電力モードの1つの形態に含まれると言うこともできる。
Further, when the processor has a function of stopping the program execution, when the spin
キャッシュメモリ12−1側に設けた値変更検出部32は、スピンウェイト検出部22から指示されたスピンウェイトの終了条件となっている変数値を監視し、この変数値が他のプロセッサ10−2〜10−4や入出力ユニット18により変更されたことを検出した場合に、プロセッサ10−1側に値変更を通知してプロセッサの動作状態を元に戻す。
The value
例えば、スピンウェイト命令実行中の検出でプロセッサか低消費電力モードに変更されていた場合には通常モードに戻す。またスピンウェイト命令の実行中の検出でプロセッサのプログラムの実行停止となっていた場合にはプログラムの実行を再開させる。 For example, if the processor is changed to the low power consumption mode upon detection during execution of the spin wait instruction, the normal mode is restored. When the execution of the spin wait instruction is detected and the execution of the program of the processor is stopped, the execution of the program is resumed.
図5は、図4のプロセッサ10−1に設けているスピンウェイト検出部22の実施形態である。スピンウェイト検出部22は、実行済命令列バッファ34、スピンウェイト命令列記録部36及び比較部38を備える。この実施形態にあっては、既存の命令セットISA(Instruction Set Architecture)をそのまま使用した場合を例に取っている。スピンウェイト検出部22は、まずスピンウェイト命令列記録部36にスピンウェイトであることを示す命令列を予め記録する。
FIG. 5 is an embodiment of the
この命令列の記録は複数個でもよく、また記録内容は予め定められたものであっても良い。実行済命令列バッファ34には、プロセッサコアで実行が完了した命令列が記録される。比較部38は、スピンウェイト命令列記録部36に記録している基準となる命令列と実行済命令列バッファ34に記録された命令列を比較し、両者が一致したら即ちスピンウェイト命令列が実行されていることを検出したら、キャッシュメモリインタフェース20に対しスピンウェイト命令列検出信号E1を出力する。
There may be a plurality of records of this instruction sequence, and the recorded contents may be predetermined. In the executed
図6は、図4のキャッシュメモリ12−1側に設けている値変更検出部32の実施形態である。この実施形態において値変更検出部32には、監視対象先記録部40とキャッシュステート監視部42を設けている。プロセッサにおいてスピンウェイト命令の実行によりスピンウェイトが始まると、図5に示したスピンウェイト検出部22よりスピンウェイト命令列検出信号E1が出力され、図6の値変更検出部32に設けている監視対象アドレス記録部40にスピンウェイトの終了条件として参照している変数値を格納しているキャッシュブロック、具体的にはキャッシュメモリエントリを、キャッシュメモリ制御部26を経由して受けて記録する。
FIG. 6 shows an embodiment of the value
キャッシュステート監視部42は監視対象アドレス記録部40に記録されたキャッシュメモリエントリを監視しており、このエントリのキャッシュステート(キャッシュ状態)が更新されたら、キャッシュメモリ制御部26を介してプロセッサ側に値変更検出信号E2を出力する。
The cache
この実施形態において、キャッシュプロトコルとしてはMESIプロトコルを例にとっており、この場合、キャッシュステート監視部42は監視対象となるエントリのキャッシュステートが無効Iに更新されたら値変更検出信号E2を出力する。なおキャッシュステート監視部42としては、スピンウェイト終了条件となっている変数値の書き換えに対応したキャッシュステートの無効Iの更新から値変更検出信号E2を出力しているが、キャッシュメモリのLRUアルゴリズムにより監視対象となっているキャッシュメモリエントリの追い出しが行われた場合にも値変更検出信号E2を出力する。
In this embodiment, the MESI protocol is taken as an example of the cache protocol. In this case, the cache
図7は、スピンウェイト検出時にスピンウェイト終了条件となっている変数値が格納されているキャッシュメモリエントリ(キャッシュブロック)を監視して値変更を検出する本発明の処理手順のタイムチャートである。まずスピンウェイト検出部22がステップS1でプロセッサ10−1でスピンウェイト命令を実行中か否かチェックしている。
FIG. 7 is a time chart of the processing procedure of the present invention for detecting a value change by monitoring a cache memory entry (cache block) that stores a variable value that is a spin wait termination condition when detecting a spin wait. First, the spin
プロセッサ10−1でスピンウェイト命令が実行されると、図5の実施形態に示したようなスピンウェイト検出部22でスピンウェイト命令の実行が検出され、スピンウェイト命令検出信号E1が出力される。これによって、ステップS2でスピンウェイト検出部22は、スピンウェイトで参照している変数値が格納されたキャッシュブロックの監視をキャッシュメモリ12−1側の値変更検出部32に指示する。これと同時にスピンウェイト検出部22は、ステップS3でプロセッサ10−1によるスピンウェイト命令の実行を停止し、低消費電力の動作状態に入る。
When the processor 10-1 executes the spin wait instruction, the spin
スピンウェイト検出部22からキャッシュブロックの監視を指示された値変更検出部32は、ステップS101でプロセッサから指示されたキャッシュブロックの監視を開始する。即ち、ステップS102で監視対象となるキャッシュブロックにおけるキャッシュステート即ちキャッシュ状態の状態変化、具体的には無効化が行われたか否かを検出している。この状態で他のプロセッサ10−1〜10−4のいずれか、あるいは入出力ユニット18によるキャッシュブロックの更新があると、監視しているキャッシュブロックのキャッシュステートが無効状態に更新される。
The value
これをステップS102で検出すると、ステップS103に進み、キャッシュブロックの状態変化を図6の値変更検出部30より値変更検出信号E2として出力し、キャッシュブロックの状態変化即ち無効化をプロセッサ側に通知する。この値変更検出信号を受けて、スピンウェイト検出部22にあっては、ステップS4でプロセッサ10−1によるスピンウェイト命令の実行を再開する。
When this is detected in step S102, the process proceeds to step S103, where the state change of the cache block is output as the value change detection signal E2 from the value
図8は、マルチプロセッサシステムにおけるバリア同期処理を例にとって本発明の処理手順を示した説明図である。図8(A)はバリア同期処理の対象となるマルチプロセッサシステムの一部であり、説明を簡単にするため2台のプロセッサ10−1,10−2のバリア同期処理を例にとっている。 FIG. 8 is an explanatory diagram showing the processing procedure of the present invention taking barrier synchronization processing in a multiprocessor system as an example. FIG. 8A shows a part of the multiprocessor system that is the target of the barrier synchronization processing, and the barrier synchronization processing of the two processors 10-1 and 10-2 is taken as an example to simplify the description.
またプロセッサ10−1,10−2に設けたキャッシュメモリ12−1,12−2にあっては、スピンウェイト命令の実行で参照しているスピンウェイトの終了条件となっている2ビットの変数値とキャッシュブロックにおけるキャッシュステートを示している。 Further, in the cache memories 12-1 and 12-2 provided in the processors 10-1 and 10-2, a 2-bit variable value which is a termination condition of the spin wait referred to in the execution of the spin wait instruction And the cache state in the cache block.
このキャッシュステートはMESIプロトコルに対応しており、また変数値は2台のプロセッサ10−1,10−2のバリア同期であることから、それぞれに対応した2ビットの情報であり、同期ポイントに達する前の状態では「00」となっている。 Since this cache state corresponds to the MESI protocol and the variable value is barrier synchronization of the two processors 10-1 and 10-2, it is 2-bit information corresponding to each and reaches the synchronization point. In the previous state, it is “00”.
図8(B)〜(G)は、図7に示した本発明の処理手順に従ったバリア同期処理の動作の遷移状態を時間的に分けて表わしている。図8(B)はバリア同期の対象となっている2台のプロセッサ10−1,10−2の内、プロセッサ10−1が同期ポイントに達してスピンウェイトした状態である。 FIGS. 8B to 8G show the transition states of the barrier synchronization processing operation according to the processing procedure of the present invention shown in FIG. FIG. 8B shows a state in which the processor 10-1 reaches the synchronization point and spin-waits out of the two processors 10-1 and 10-2 that are subject to barrier synchronization.
即ちプロセッサ10−1は、同期ポイントへの到達で図2に示した設定部104の処理により、キャッシュメモリ12−1の対象エントリの変数値のうち自分の対応ビットを1にセットし、これにより変数値は「00」から「01」となる。このキャッシュメモリ12−1の変数値の更新に際し、同じキャッシュブロックを持っているプロセッサ10−2のキャッシュメモリ12−2にあっては、キャッシュステートの無効化が行われる。なおキャッシュメモリ12−1にあっては、該当するキャッシュブロックのキャッシュステートは変更Mに更新される。 That is, the processor 10-1 sets its own corresponding bit in the variable value of the target entry of the cache memory 12-1 by the processing of the setting unit 104 shown in FIG. The variable value is “00” to “01”. When updating the variable value of the cache memory 12-1, the cache state is invalidated in the cache memory 12-2 of the processor 10-2 having the same cache block. In the cache memory 12-1, the cache state of the corresponding cache block is updated to the change M.
この図8(B)のようにプロセッサ10−1でスピンウェイト状態になると、図4のようにプロセッサ10−1に設けているスピンウェイト検出部22がスピンウェイト命令の実行中を検出し、キャッシュメモリ12−1に対し該当するキャッシュブロックのキャッシュステートが無効Iになるか否かの監視を指示する。同時にプロセッサ10−1に対し例えばスピンウェイトのプログラム実行を停止させる。これにより図8(C)のように、プロセッサ10−1はスピンウェイトのプログラム実行を停止した状態となり、一方、プロセッサ10−2は通常モードでプログラム実行を続けている。
When the processor 10-1 enters the spin wait state as shown in FIG. 8B, the spin
図8(D)はプロセッサ10−2が同期ポイントに達したときの処理である。プロセッサ10−2が同期ポイントに達すると、スピンウェイト命令の実行によりキャッシュメモリ12−2からスピンウェイト終了条件となる変数値の読み込みを行う。このときキャッシュメモリ12−2の該当キャッシュブロックは無効I状態にあることから、キャッシュプロトコルによりプロセッサ10−1のキャッシュメモリ12−2から変数値を読み出してキャッシュステートを共有S状態にした後にプロセッサ10−2で読み取る。
FIG. 8D shows processing when the processor 10-2 reaches the synchronization point. When the processor 10-2 reaches the synchronization point, a variable value serving as a spin wait end condition is read from the cache memory 12-2 by executing the spin wait instruction. At this time, since the corresponding cache block of the cache memory 12-2 is in the invalid I state, the
続いて図8(E)のように、プロセッサ10−2は自分に割り当てられているビットを1に書き換えることで変数値を「11」とする。この変数値の更新により、プログラムの実行停止にあるプロセッサ10−1のキャッシュメモリ12−1に対し変数値の無効化が行われ、キャッシュステートはそれまでの共有Sから無効Iに更新される。このキャッシュメモリ12−1における無効Iへの状態変化を図4のキャッシュメモリ12−1側に設けている値変更検出部32で検出すると、プロセッサ10−1に対し値変更通知を行い、これによって、それまで停止していたプログラムの実行が再開される。
Subsequently, as shown in FIG. 8E, the processor 10-2 sets the variable value to “11” by rewriting the bit assigned to itself to 1. By updating the variable value, the variable value is invalidated for the cache memory 12-1 of the processor 10-1 in which the program execution is stopped, and the cache state is updated from the shared S so far to invalid I. When the state change to invalid I in the cache memory 12-1 is detected by the value
このため、プログラムの実行を再開したプロセッサ10−1は、図8(F)でスピンウェイト命令の実行によりキャッシュメモリ12−1の該当キャッシュブロックの変数値「11」を読み込み、これによってスピンウェイト終了条件が成立したことを認識する。 For this reason, the processor 10-1 that has resumed execution of the program reads the variable value “11” of the corresponding cache block in the cache memory 12-1 by executing the spin wait instruction in FIG. Recognize that the condition is met.
このときプロセッサ12−2側にあっても、変数値「11」の認識でスピンウェイト終了条件を判定しており、これにより2台のプロセッサ10−1,10−2のバリア同期が取られ、図8(G)のようにスピンウェイトを終了して、次のプログラムの実行処理に移行することになる。 At this time, even on the processor 12-2 side, the spin wait end condition is determined by recognizing the variable value “11”, whereby the barrier synchronization of the two processors 10-1 and 10-2 is taken. As shown in FIG. 8G, the spin wait is ended and the next program execution process is started.
図9は、図4のキャッシュメモリ12−1側に設けている値変更検出部32の他の実施形態であり、この実施形態にあってはスピンウェイトの終了条件となっている変数値を格納しているキャッシュブロックに対する他のプロセッサ、あるいは入出力ユニットによる変数値変更のためのバストランザクション(バスリクエスト)を監視して値変更を検出するようにしたことを特徴とする。
FIG. 9 shows another embodiment of the value
図9の値変更検出部32は、図6と同じ監視対象アドレス記録部40に対しバストランザクション監視部44を設けている。プロセッサ側でスピンウェイト命令の実行が開始されると、スピンウェイトで参照しているデータアドレスが監視対象アドレス記録部40に記録される。
The value
バストランザクション監視部44は、監視対象アドレスに対する他のプロセッサあるいは入出力ユニットからのバス14によるトランザクションをバスインタフェースス28を介して監視しており、監視しているバストランザクションを検出すると、値変更検出信号E2をキャッシュメモリ制御部26を経由してプロセッサ側に出力する。このバストランザクションの監視による値変更検出は、スピンウェイトの終了条件となっている変数値の変更を直接検出するものではなく、正確には変数値が変更される可能性があることを検出していると言うことができる。
The bus
図10は、図9のバストランザクションの監視により値変更を検出する場合の本発明の処理手順のタイムチャートである。スピンウェイト検出部22は、ステップS1でプロセッサでのスピンウェイト命令実行中を検出すると、ステップS2で、スピンウェイト命令で参照している変数値が格納されているキャッシュブロック、即ちデータアドレスの監視の指示をキャッシュメモリ側の値変更検出部32に対し行う。
FIG. 10 is a time chart of the processing procedure of the present invention when a value change is detected by monitoring the bus transaction of FIG. When the spin
またステップS3で、スピンウェイト検出部22はプロセッサに対しスピンウェイト命令列検出実行を出力して、プロセッサによるスピンウェイト命令の実行を停止させる。
In step S3, the spin
キャッシュメモリ側の値変更検出部32にあっては、ステップS101でプロセッサ側から指示されたデータアドレスに対するバストランザクションを監視し、監視対象のキャッシュブロックに対するバストランザクションをステップS102で検出すると、ステップS103でバストランザクションによる状態変化(可能性)を値変更検出信号の出力によりプロセッサ側に通知する。これを受けてスピンウェイト検出部22にあっては、ステップS4でプロセッサによるスピンウェイト命令の実行を再開することになる。
The value
次に図3のプロセッサ10−1〜10−4としてSMTプロセッサを使用した場合について、スピンウェイト命令実行中のプロセッサに対するプロセッサリソースの割り当てを削減する本発明の他の実施形態を説明する。 Next, another embodiment of the present invention that reduces the allocation of processor resources to a processor that is executing a spinwait instruction will be described in the case where an SMT processor is used as the processors 10-1 to 10-4 in FIG.
図11は、本発明が適用されるSMTプロセッサの概略構成である。SMTプロセッサは、命令ポインタ46−1,46−2、フェッチ/デコード48−1,48−2、実行ユニット50、リタイヤメントユニット52、1次命令キャッシュユニット54、1次データキャッシュユニット56及び2次キャッシュユニット58を備えている。このような概略構成を持つSMTプロセッサは、同時に複数スレッドを実行するため通常は命令ポインタを複数持っており、この例では2つの命令ポインタ46−1,46−2を持った場合を示している。
FIG. 11 is a schematic configuration of an SMT processor to which the present invention is applied. The SMT processor includes instruction pointers 46-1, 46-2, fetch / decode 48-1, 48-2,
この命令ポインタ46−1,46−2及びフェッチ/デコード48−1,48−2で実現される2つのスレッドの実行にあっては、実行ユニット50などのリソースをスレッド間で共有することにより、リソースの有効利用率を高めており、これがSMTプロセッサの狙いである。このように複数のスレッドでプロセッサリソースを共有するSMTプロセッサにあっては、次にどのスレッドの命令を実行ユニット50に割り当てるかを極める方針がいろいろ提案されている。
In the execution of the two threads realized by the instruction pointers 46-1, 46-2 and the fetch / decode 48-1, 48-2, resources such as the
そこで本発明は、この実行ユニットなどのプロセッサリソースをどのスレッドの命令に割り当てるかを決める方針の決定に利用することができる。具体的には、スピンウェイト実行中のスレッドを検出したら、スピンウェイト命令を実行中のスレッドに対する実行ユニットなどのプロセッサリソースの割り当てを削減もしくは停止する。
これによってスピンウェイトではない、より意味のある命令を実行している他のスレッドの命令を実行ユニットに割り当てる機会が増え、その結果、SMTプロセッサの処理性能の向上が期待できる。
Therefore, the present invention can be used to determine a policy for determining which thread's instruction a processor resource such as an execution unit is allocated to. Specifically, when a thread that is executing a spinwait instruction is detected, the allocation of processor resources such as execution units to the thread that is executing the spinwait instruction is reduced or stopped.
As a result, an opportunity to assign an instruction of another thread that is executing a more meaningful instruction that is not a spin wait to an execution unit increases, and as a result, an improvement in processing performance of the SMT processor can be expected.
図12は、SMTプロセッサについてスピンウェイトを検出してプロセッサリソースを削減する本発明の処理手順のタイムチャートである。SMTプロセッサ側のスピンウェイト検出部22は、ステップS1で複数のスレッド内のあるスレッドでスピンウェイト実行中か否かをチェックしており、実行中を検出すると、ステップS2に進み、スピンウェイトで参照している変数値が格納されたキャッシュブロックの監視をキャッシュメモリ側の値変更検出部32に指示する。
FIG. 12 is a time chart of the processing procedure of the present invention for detecting processor weights and reducing processor resources for an SMT processor. The spin
またステップS3で、スピンウェイト命令を実行中のスレッドの命令を割り当てるプロセッサリソースの削減または停止を行う。具体的には、例えば命令ポインタ46−1及びフェッチ/デコード48−1側で実行されるスレッドの命令でスピンウェイト実行中が検出された場合には、このスレッドによる命令の実行ユニット50に対する割り当てを削減または停止し、スピンウェイト命令以外の命令を実行している命令ポインタ46−2,フェッチ/デコード48−2側となる他のスレッドの命令に実行ユニット50を割り当てる。
In step S3, the processor resource to which the instruction of the thread executing the spinwait instruction is allocated is reduced or stopped. Specifically, for example, when the execution of the spin wait is detected in the instruction of the thread executed on the instruction pointer 46-1 and the fetch / decode 48-1 side, the instruction is allocated to the
キャッシュメモリ側の値変更検出部32にあっては、ステップS101でプロセッサ側から指示されたキャッシュブロックのキャッシュステートを監視し、ステップS102でキャッシュステート即ち状態が無効Iに更新されたことを検出すると、ステップS103でキャッシュブロックの状態変化をプロセッサ側に通知する。
The value
これを受けてスピンウェイト検出部22側にあっては、ステップS4でスピンウェイト命令を実行中のスレッドに対するそれまでのプロセッサリソースの割り当ての削減または停止を解除する。
In response to this, on the spin
なお上記の実施形態にあっては、キャッシュプロトコルとしてMESIプロトコルを例にとるものであったが、無効Iへの更新を含むものであれば適宜のキャッシュプロトコルであってもよい。また上記の実施形態にあっては、スピンウェイト終了条件のための変更値として該当するキャッシュブロックのキャッシュステートの無効化、あるいはこのステートに対するバストランザクションからキャッシュ終了条件となっている変数値を直接または間接的に監視しているが、これ以外の変数値の直接または間接的な監視であっても良いことはもちろんである。 In the above embodiment, the MESI protocol is taken as an example of the cache protocol, but an appropriate cache protocol may be used as long as the update includes invalid I. In the above embodiment, the cache state of the corresponding cache block is invalidated as the change value for the spin wait end condition, or the variable value that is the cache end condition is directly or directly from the bus transaction for this state. Although the monitoring is performed indirectly, it is a matter of course that other variable values may be directly or indirectly monitored.
また上記の実施形態にあっては、スピンウェイト実行中を検出した際のプロセッサの動作状態の変更として、低消費電力モードへの変更、プログラムの実行停止、更にはSMTプロセッサにあってはプロセッサリソースの割り当て減少または停止を例に取るものであったが、これ以外に適宜のスピンウェイト命令の実行で生ずる無駄を省くプロセッサの動作状態の変更であれば適宜のものを含む。 Further, in the above embodiment, as a change in the operation state of the processor when the execution of the spin wait is detected, the change to the low power consumption mode, the stop of the program execution, and the processor resource in the SMT processor However, any other change is possible as long as it is a change in the operating state of the processor that eliminates waste caused by the execution of an appropriate spin wait instruction.
また本発明は上記の実施形態に限定されず、その利点と目的を損なうことのない適宜の変形を含む。更に本発明は上記の実施形態に示した数値による限定は受けない。
The present invention is not limited to the above-described embodiments, and includes appropriate modifications that do not impair the advantages and objects thereof. Further, the present invention is not limited by the numerical values shown in the above embodiments.
10:キャッシュメモリインタフェ−ス
10−1〜10−4:プロセッサ
11:プロセッサコア
12−1〜12−4:キャッシュメモリ
14:バス
16:メインメモリ
18:入出力ユニット
22:スピンウェイト検出部
24:プロセッサインタフェース
26:キャッシュメモリ制御部
28:バスインタフェース
30:キャッシュメモリアレイ
32:値変更検出部
34:実行済命令列バッファ
36:スピンウェイト命令列記録部
38:比較部38
40:監視対象先記録部
42:キャッシュステート監視部42
44:バストランザクション監視部
46−1,46−2:命令ポインタ
48−1,48−2:フェッチ/デコード
50:実行ユニット
52:リタイヤメントユニット
54:1次命令キャッシュユニット
56:1次データキャッシュユニット
58:2次キャッシュユニット
10: Cache memory interfaces 10-1 to 10-4: Processor 11: Processor cores 12-1 to 12-4: Cache memory 14: Bus 16: Main memory 18: Input / output unit 22: Spin wait detection unit 24: Processor interface 26: Cache memory control unit 28: Bus interface 30: Cache memory array 32: Value change detection unit 34: Completed instruction sequence buffer 36: Spin wait instruction sequence recording unit 38:
40: monitoring target recording unit 42: cache
44: Bus transaction monitoring units 46-1, 46-2: Instruction pointers 48-1, 48-2: Fetch / decode 50: Execution unit 52: Retirement unit 54: Primary instruction cache unit 56: Primary data cache unit 58: Secondary cash unit
Claims (2)
前記プロセッサは、スピンウェイト検出部を備え、
前記キャッシュメモリは、値変更検出部を備え、
前記スピンウェイト検出部は、対応するプロセッサがスピンウェイト処理を実行していることを検出した場合に、前記スピンウェイト処理が監視している、前記スピンウェイトの終了条件である変数値を格納されたキャッシュブロックの監視を前記値変更検出部に指示した後に、対応するプロセッサによるスピンウェイト処理を停止させ、
前記値変更検出部は、前記スピンウェイト検出部からの指示に応じて、前記キャッシュブロックに格納された前記変数値の変更有無を監視し、前記変数値が変更されたことを検出した場合に、前記プロセッサに前記変数値の変更を通知して、前記プロセッサによるスピンウェイト処理を再開させ、
前記プロセッサは通常モードと低消費電力モードの少なくとも2つ以上の動作モードを備え、前記スピンウェイト検出部はスピンウェイト命令の実行中を検出した際に、前記プロセッサの動作モードを低消費電力モードに変更し、値変更検出部はスピンウェイトの終了条件となっている変数値の変更を検出した際に、プロセッサの動作モードを通常モードに変更させることを特徴とする、コンピュータ。
A con pin Yuta having a processor and a cache memory,
The processor includes a spin weight detection unit,
The cache memory includes a value change detection unit,
The spin weight detection unit stores a variable value that is the end condition of the spin weight that is monitored by the spin weight process when it detects that the corresponding processor is executing the spin wait process. After instructing the value change detection unit to monitor the cache block, the spin wait process by the corresponding processor is stopped,
The value change detection unit monitors whether or not the variable value stored in the cache block is changed according to an instruction from the spin weight detection unit, and detects that the variable value is changed. Notifying the processor of the change of the variable value, and restarting the spin wait process by the processor ,
The processor has at least two operation modes of a normal mode and a low power consumption mode, and when the spin wait detection unit detects that a spin wait instruction is being executed, the processor changes the operation mode of the processor to the low power consumption mode. change, when the value change detecting unit which detects a change of the variable value that is the termination condition of spinwait, characterized Rukoto to change the operation mode of the processor in the normal mode, the computer.
前記プロセッサによるスピンウェイトの実行を監視し、
前記プロセッサによる前記スピンウェイトの実行を検出した際に、前記スピンウェイトの終了条件となっている変数値の監視を開始し、
前記変数値の監視を開始した後に、前記プロセッサが実行しているスピンウェイトを停止させ、
前記変数値が変更されたことを検出した場合に、前記プロセッサに値変更を通知して前記プロセッサによるスピンウェイト処理を再開させ、
前記プロセッサは通常モードと低消費電力モードの少なくとも2つ以上の動作モードを備え、前記スピンウェイト検出部はスピンウェイト命令の実行中を検出した際に、前記プロセッサの動作モードを低消費電力モードに変更し、値変更検出部はスピンウェイトの終了条件となっている変数値の変更を検出した際に、プロセッサの動作モードを通常モードに変更させることを特徴とするコンピュータの制御方法。 In a method of controlling a computer having a processor with a cache memory,
Monitoring the execution of the spin wait by the processor;
When the execution of the spin wait by the processor is detected, monitoring of the variable value that is the end condition of the spin wait is started,
After starting monitoring the variable value, stop the spin wait that the processor is executing,
When it is detected that the variable value has been changed, the processor notifies the processor of the value change and restarts the spin wait process by the processor;
The processor has at least two operation modes of a normal mode and a low power consumption mode, and when the spin wait detection unit detects that a spin wait instruction is being executed, the processor changes the operation mode of the processor to the low power consumption mode. changed, when the value change detecting unit which detects a change of the variable value that is the termination condition of spinwait, control method of a computer, characterized in Rukoto to change the operation mode of the processor to the normal mode.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008303592A JP4878050B2 (en) | 2008-11-28 | 2008-11-28 | Computer and control method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008303592A JP4878050B2 (en) | 2008-11-28 | 2008-11-28 | Computer and control method |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003542505A Division JP4253796B2 (en) | 2001-11-08 | 2001-11-08 | Computer and control method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2009116885A JP2009116885A (en) | 2009-05-28 |
| JP4878050B2 true JP4878050B2 (en) | 2012-02-15 |
Family
ID=40783894
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2008303592A Expired - Lifetime JP4878050B2 (en) | 2008-11-28 | 2008-11-28 | Computer and control method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4878050B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2011150422A (en) | 2010-01-19 | 2011-08-04 | Renesas Electronics Corp | Data processor |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS61166669A (en) * | 1985-01-19 | 1986-07-28 | Panafacom Ltd | Processor control system |
| US4979105A (en) * | 1988-07-19 | 1990-12-18 | International Business Machines | Method and apparatus for automatic recovery from excessive spin loops in an N-way multiprocessing system |
| JPH04296951A (en) * | 1991-03-19 | 1992-10-21 | Mitsubishi Electric Corp | cache memory |
| JPH04350743A (en) * | 1991-05-29 | 1992-12-04 | Mitsubishi Electric Corp | cache memory |
| US6049851A (en) * | 1994-02-14 | 2000-04-11 | Hewlett-Packard Company | Method and apparatus for checking cache coherency in a computer architecture |
| JPH09325912A (en) * | 1996-06-07 | 1997-12-16 | Oki Electric Ind Co Ltd | Information processor |
| US6615375B1 (en) * | 2000-02-03 | 2003-09-02 | International Business Machines Corporation | Method and apparatus for tolerating unrecoverable errors in a multi-processor data processing system |
| WO2003040948A1 (en) * | 2001-11-08 | 2003-05-15 | Fujitsu Limited | Computer and control method |
-
2008
- 2008-11-28 JP JP2008303592A patent/JP4878050B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JP2009116885A (en) | 2009-05-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8898435B2 (en) | Optimizing system throughput by automatically altering thread co-execution based on operating system directives | |
| US8176489B2 (en) | Use of rollback RCU with read-side modifications to RCU-protected data structures | |
| US6871264B2 (en) | System and method for dynamic processor core and cache partitioning on large-scale multithreaded, multiprocessor integrated circuits | |
| JP4603583B2 (en) | Processor, apparatus, and method | |
| KR101392109B1 (en) | Providing state storage in a processor for system management mode | |
| US8539485B2 (en) | Polling using reservation mechanism | |
| US10013326B2 (en) | Propagating a prefetching profile bit from a prefetch queue to a data cache to indicate that a line was prefetched in response to an instruction within a code region | |
| US9063786B2 (en) | Preferential CPU utilization for tasks | |
| JP4253796B2 (en) | Computer and control method | |
| US20230127112A1 (en) | Sub-idle thread priority class | |
| US20160179429A1 (en) | Controlling memory access conflict of threads on multi-core processor with set of highest priority processor cores based on a threshold value of issued-instruction efficiency | |
| WO2009122694A1 (en) | Cache memory device, cache memory system, and processor system | |
| KR100856144B1 (en) | Decoupling the number of logical threads from the number of simultaneous physical threads in a processor | |
| US20100082952A1 (en) | Processor | |
| CN105378652A (en) | Method and apparatus for allocating thread shared resource | |
| US20110055831A1 (en) | Program execution with improved power efficiency | |
| JP4965638B2 (en) | System and method for controlling task switching | |
| JP4878050B2 (en) | Computer and control method | |
| JP5704176B2 (en) | Processor processing method and processor system | |
| JP5376042B2 (en) | Multi-core processor system, thread switching control method, and thread switching control program | |
| JP5601414B2 (en) | Multi-core processor system, control method, and control program | |
| JP3998686B2 (en) | CPU usage time counting method and job control apparatus using this CPU usage time | |
| JP5582241B2 (en) | Multi-core processor system, multi-core processor system control method, and multi-core processor system control program | |
| CN120508530A (en) | Dynamic reconfiguration from a unified core processor to a multi-core processor | |
| JP2019179417A (en) | Scheduling method and scheduling apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110803 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A132 Effective date: 20110816 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20111013 |
|
| 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: 20111101 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20111124 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4878050 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20141209 Year of fee payment: 3 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313113 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| EXPY | Cancellation because of completion of term |