JP2010226275A - Communication equipment and communication method - Google Patents
Communication equipment and communication method Download PDFInfo
- Publication number
- JP2010226275A JP2010226275A JP2009069400A JP2009069400A JP2010226275A JP 2010226275 A JP2010226275 A JP 2010226275A JP 2009069400 A JP2009069400 A JP 2009069400A JP 2009069400 A JP2009069400 A JP 2009069400A JP 2010226275 A JP2010226275 A JP 2010226275A
- Authority
- JP
- Japan
- Prior art keywords
- work
- packet
- output queue
- subwork
- sub
- 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.)
- Withdrawn
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
本発明は、パケットの転送処理技術に関する。 The present invention relates to a packet transfer processing technique.
複数の入力ポートと複数の出力ポートとを備え、入力ポートから入力されたパケットをその宛先やQoSクラスに応じた出力ポートから出力する、パケットの転送処理を行う通信装置は、従来から種々のものが知られている(例えば、特許文献1参照)。 Conventionally, there are various communication devices for performing packet transfer processing, which have a plurality of input ports and a plurality of output ports, and output packets input from the input ports from the output ports according to their destinations and QoS classes. Is known (see, for example, Patent Document 1).
特許文献1に記載されている通信装置は、マルチコアプロセッサーを用いて構成されており、異なるIPフローに属するパケットに対する処理(デフラグメント処理、IPSec復号化処理、ネットワークアドレス変換処理など)を異なるプロセッサーコアで並列に処理することにより、スループットを向上させるようにしている。ここで、マルチコアプロセッサーとは、2つ以上のプロセッサーコアを1個のパッケージに集積したマイクロプロセッサーである。また、異なるIPフローに属するパケットとは、IPヘッダー、TCPヘッダーについて異なる5-tuple情報を持つパケットである。5-tuple情報とはIPパケットの「あて先IPアドレス」、「ソースIPアドレス」、「プロトコル番号」、TCP/UDPヘッダーの「あて先ポート番号」、「ソースポート番号」の5つの情報を指す。 The communication device described in Patent Document 1 is configured by using a multi-core processor, and processes for packets belonging to different IP flows (defragment processing, IPSec decoding processing, network address conversion processing, etc.) are different processor cores. The throughput is improved by processing in parallel. Here, the multi-core processor is a microprocessor in which two or more processor cores are integrated in one package. Further, packets belonging to different IP flows are packets having different 5-tuple information about the IP header and the TCP header. The 5-tuple information refers to five pieces of information: “destination IP address”, “source IP address”, “protocol number” of the IP packet, “destination port number” of the TCP / UDP header, and “source port number”.
ところで、プロセッサーによる処理の完了したパケットは、その出力先もしくはQoSクラスに対応した出力キューを介して外部に送出されるが、対応する出力キューが輻輳しバッファのオーバーフローが発生すると、処理済みのパケットが出力キューで破棄されてしまう。この場合、最終的に廃棄されたパケットに対して、プロセッサー処理能力、メモリー等のリソースが使用されるため、リソースが有効活用されていないことになる。しかし、特許文献1においては、このようなことは全く考慮されていない。なお、このような問題は、マルチコアプロセッサーを利用した通信装置特有のものではなく、シングルコアプロセッサーを利用した通信装置においても発生する。 By the way, a packet that has been processed by the processor is sent to the outside via an output queue corresponding to the output destination or QoS class. However, when the corresponding output queue is congested and a buffer overflow occurs, the processed packet is processed. Will be discarded in the output queue. In this case, since resources such as processor processing capacity and memory are used for the finally discarded packet, the resources are not effectively used. However, Patent Document 1 does not consider this at all. Such a problem is not unique to a communication device using a multi-core processor, but also occurs in a communication device using a single-core processor.
[発明の目的]
そこで、本発明の目的は、リソースを有効利用し、パケットに対する処理を効率的に行えるようにすることにある。
[Object of invention]
Therefore, an object of the present invention is to efficiently use resources and to efficiently process a packet.
本発明にかかる第1の通信装置は、
プロセッサーコアと、
処理の完了したパケットがストアされる複数の出力キューと、
受信したパケットに対する処理を複数のサブワークに分割し、該各サブワークを前記プロセッサーコア上で実行されるスレッドに割り当てるワークコントロール部とを備え、
前記ワークコントロール部は、前記複数の出力キューの中に輻輳している出力キューが存在する場合は、該輻輳している出力キューをストア先にしているパケットに関連するサブワークについてはスレッドの割り当てを制限する。
The first communication device according to the present invention is:
Processor cores,
Multiple output queues where processed packets are stored;
A work control unit that divides the processing for the received packet into a plurality of sub-work, and assigns each sub-work to a thread executed on the processor core;
When there is a congested output queue among the plurality of output queues, the work control unit assigns a thread to a subwork related to a packet having the congested output queue as a store destination. Limit.
本発明にかかる第1の通信方法は、
ワークコントロール部が、受信したパケットに対する処理を複数のサブワークに分割する第1のステップと、
前記ワークコントロール部が、サブワークをプロセッサーコア上で実行される複数のスレッドの内の何れかに割り当てる際、処理が完了したパケットがストアされる複数の出力キューの中に輻輳している出力キューが存在する場合は、該輻輳している出力キューをストア先にしているパケットに関連するサブワークについてはスレッドの割り当てを制限する第2のステップとを含む。
A first communication method according to the present invention includes:
A first step in which the work control unit divides the processing for the received packet into a plurality of sub-work;
When the work control unit assigns a sub work to any one of a plurality of threads executed on the processor core, an output queue that is congested in a plurality of output queues in which processed packets are stored The second step of restricting thread allocation for subwork related to a packet having the congested output queue as a store destination.
本発明によれば、廃棄される可能性が高いパケットの処理に向けられていたプロセッサー処理能力、メモリなどのリソースの割り当てを、廃棄される可能性が低い他のパケットの処理に向けることが可能となり、通信装置が備えているリソースを有効利用することが可能になるという効果を得ることができる。 According to the present invention, it is possible to direct allocation of resources such as processor processing capacity and memory, which has been aimed at processing a packet having a high possibility of being discarded, to processing of other packets having a low possibility of being discarded. Thus, it is possible to obtain an effect that the resources provided in the communication device can be effectively used.
次に、本発明の第1の実施の形態について図面を参照して詳細に説明する。 Next, a first embodiment of the present invention will be described in detail with reference to the drawings.
図1を参照すると、本発明の第1の実施の形態にかかる通信装置は、データパケットの転送処理を行うものであり、データパケット(単にパケットという場合もある)を受信する受信インタフェース部101と、処理済みのデータパケットを送信する送信インタフェース部102とを備えている。なお、図示を省略したが、受信インタフェース部101、送信インタフェース部102は、それぞれ複数の受信ポート、送信ポートを備えている。
Referring to FIG. 1, the communication apparatus according to the first embodiment of the present invention performs a data packet transfer process, and includes a
受信インタフェース部101及び送信インタフェース部102は、それぞれスイッチ部103a,103bを介してマルチコアプロセッサー部105内の受信コントロール部111及び送信コントロール部112に接続されている。ここで、スイッチ部103aは、複数のマルチコアプロセッサー部150の内のどのマルチコアプロセッサー部へデータパケットを出力すべきかを決定する機能を持っている。この場合、IPデータパケットの「あて先IPアドレス」、「ソースIPアドレス」、「プロトコル番号」などの情報からハッシュ関数を用いて算出した値をもとに、出力先のマルチコアプロセッサー部を決定する等の方式をとることが可能である。つまり、データパケットのIPフローに応じて出力先のマルチコアプロセッサー部を決定することが可能である。また、スイッチ部103bは、各マルチコアプロセッサー部150からのデータパケットを送信インタフェース部102へ出力する機能を持っている。
The
また、受信コントロール部111及び送信コントロール部112はマルチコアプロセッサー部150の内部のバスインタフェース160と接続されており、それぞれ受信インタフェース部101から渡されたデータパケットをバスインタフェース160へ出力する機能、およびバスインタフェース160を介して送られてくるマルチコアプロセッサー部150の外部へのデータパケットをスイッチ103bを介して送信インタフェース部102に渡す機能を持っている。
The
マルチコアプロセッサー部150の内部には複数のコア130 が配置されており、各コア130は、それぞれバスインタフェース160を介して、ワークコントロール部120、メインメモリ140、受信コントロール部111、送信コントロール部112に接続されている。また、各コア130はそれぞれ複数のスレッド131を同時に実行できる構成となっている。受信コントロール部111は、新規に受信したデータパケットをメインメモリ140にストアすると共に、ワークコントロール部120に対して上記データパケットの処理をワークという形で受け渡し、ワークに対するスレッド131の割り当てを依頼する機能を有する。
A plurality of
ワークコントロール部120は、ワークを複数のサブワークに分割し、各サブワークにコア130上で実行されるスレッド131を割り当てる機能を有する。ここで、サブワークとしては、例えば、送信コントロール部112が備えている複数の出力キューの内のどの出力キューにデータパケットを格納するのかを決定する処理、デフラグメント処理、IPSec復号化処理、IPSec暗号化処理、ネットワークアドレス変更処理などがある。更に、ワークコントロール部120は、送信コントロール部112が備えている複数の出力キューの中に輻輳している出力キューが存在している場合は、その出力キューを格納先にしているパケットに関するサブワークについてはスレッド131の割り当てを制限する機能を有する。この機能により、将来的に廃棄される可能性が高いパケットによってリソースが消費されることを防ぐことができる。
The
各コア130上で実行されるスレッド131は、ワークコントロール部120によってサブワークが割り当てられると、割り当てられたサブワークに応じた処理命令を実行する。ワーク処理のための入力情報、行うべき命令(アクション)はメインメモリ140から入手し、また、処理結果である出力情報はメインメモリ140に対して書き込む。また、処理の過程で得られたさらに細分化されたサブワークをワークコントロール部120に対して発行し、該当サブワークに対する他のスレッド131の割り当てを依頼することが可能である。
When a sub work is assigned by the
送信コントロール部112は、データパケットの送信先毎(出力ポート毎)、もしくはQoSクラス毎の出力キューを備えており、出力タイミングをスケジューリングした上で、スイッチ部103bを介して送信インタフェース部102へと送信する。更に、送信コントロール部112は、上記複数の出力キューの内の何れかに輻輳が発生した場合、輻輳の発生した出力キューを示す情報をワークコントロール部120に渡す機能を有する。
The
受信インタフェース部101にて受信されたデータパケットは、スイッチ部103aを介してマルチコアプロセッサー部150の受信コントロール部111へと転送される。図2を参照すると、受信コントロール部111は、新規に受信したデータパケット201について、エレメントIDと呼ばれるユニークなID情報およびワークIDと呼ばれるユニークなID情報を採番する。採番したエレメントIDは、上記データパケット201を識別するために利用され、ワークIDは、データパケット201に対する処理(ワーク)を複数のサブワークに階層的に分割した際の最上位のサブワークを識別するために利用される。
The data packet received by the
また、受信コントロール部111は、受信したデータパケット201や、採番したエレメントIDおよびワークIDなどを含む情報をパケットエレメントテーブル210と呼ばれる形でメインメモリ140に格納すると共に、採番したワークIDおよびエレメントIDや、ワークの処理内容などを含む情報をワークテーブル211と呼ばれる形でメインメモリ140に格納する。更に、受信コントロール部111は、採番したエレメントIDおよびワークIDをそれぞれ送信コントロール部112およびワークコントロール部120へ送信する。なお、パケットエレメントテーブル210及びワークテーブル211については、図6及び図7を参照して後で詳しく説明する。
Further, the
送信コントロール部112は、受信コントロール部111から渡されたエレメントIDをパケットキュー群220に格納し、パケット送信スケジューラー230を用いてスケジューリングする。そして、送出するデータパケットを決定すると、そのデータパケットをメインメモリ140から読み出し、送信インタフェース部102へ送る。なお、送信コントロール部112の詳細な構成及び動作については、後で、図4を参照して説明する。
The
また、ワークコントロール部120は、受信コントロール部111から渡されたワークIDをワークキュー群221に格納し、その後、ワークスケジューラー231を用いてどのサブワークをどのスレッド131に割り当てるのかを決定する。そして、割り当て先の決定したサブワークのワークIDを割り当て先のスレッド131に渡す。また、ワークコントロール部120は、コア130上で動作しているスレッド131からサブワークIDが渡された場合も、同様の処理を行う。なお、ワークコントロール部120の詳細な構成及び動作については、後で、図5を参照して詳細に説明する。
Further, the
ここで、図3を参照して、データパケット201を管理するパケットエレメントテーブル210と、このデータパケット201についての各サブワークを管理するワーク管理テーブル211との関係について説明する。
Here, with reference to FIG. 3, the relationship between the packet element table 210 that manages the
データパケット201の受信時、受信コントロール部111は、上記データパケット201を管理するためのパケットエレメントテーブル210と、上記データパケット201に対する各サブワークの内の、最上位階層(第1階層)のサブワークを管理するためのワークテーブル211を生成する。この2つのテーブル210、211には、同一のエレメントID及びワークID301が設定されており、エレメントIDによって両テーブル210、211は関連付けられるようになっている。データパケット201に関連する各サブワークのワークテーブル211には、そのワークテーブル固有のワークIDが設定されると共に、自ワークテーブルの親及び子を示すワークIDが設定されており、これらによりワークテーブルの階層関係を認識できるようになっている。
When receiving the
各サブワークで行われる具体的な処理内容はアクションと呼ばれており、メインメモリ140内に保存されているアクションテーブル310にその処理命令が記述されている。アクションテーブル310には、各サブワークに関連する処理命令が、それぞれ異なるアクションID302に関連付けて登録されており、各サブワークのワークテーブル211には、そのサブワークで実行する処理命令を示すアクションIDが登録されている。従って、アクションIDによって、サブワークとそのサブワークで実行する処理命令とを関連付けることができる。
Specific processing contents performed in each subwork are called actions, and processing instructions are described in an action table 310 stored in the
図4を参照すると、送信コントロール部112は、パケットキュー群220と、パケット送信スケジューラー230とを備えている。
Referring to FIG. 4, the
パケットキュー群220は、出力先振り分けパケットキュー402、処理待ちパケット出力キュー群401、および、出力キュー群403から構成されている。
The packet queue group 220 includes an output destination
処理待ちパケット出力キュー群401は、データパケットの出力インタフェース(出力ポート)ごと、もしくはQoSクラスごとの処理待ちパケット出力キューを備え、出力キュー群403も出力インタフェースごと、もしくはQoSクラスごとの出力キューを備えている。図4では処理待ちパケット出力キュー群401および出力キュー群403は、それぞれN個の処理待ちパケット出力キューおよび出力キューから構成されており、各処理待ちパケット出力キューおよび出力キューには、#1〜#Nの出力キューIDと呼ばれる識別子が付与されている。出力キューIDが#1〜#Nの処理待ちパケット出力キューから出力されるエレメントIDは、同一の出力キューIDを持つ出力キューに入力される。また図4に示すように、処理待ちパケット出力キュー群401の前段には、出力先振り分けパケットキュー402が配置されており、出力キューIDがまだ確定していないデータパケットに関して、そのエレメントIDをストアする。
The waiting packet
受信コントロール部111から送信コントロール部112に送付されたデータパケット201のエレメントIDは、最初に出力先振り分けパケットキュー402にストアされる。このキュー402は、FIFO(First In First Out)の原則に従って、エレメントIDを処理待ちパケット出力キュー群401内の何れかのキューに振り分ける機能を持っている。出力先振り分けパケットキュー402は、キューからエレメントIDを出力する際に、出力するエレメントIDに対応したパケットエレメントテーブル(そのテーブルを識別するための情報として、上記エレメントIDと同一のエレメントIDが設定されているパケットエレメントテーブル、図6参照)をチェックする。このパケットエレメントテーブルに、出力キューIDが記録済みであれば(出力キューID有効ビットが“1”であれば)、処理待ちパケット出力キュー群401内の対応するキューへ該当エレメントIDの振り分けを行う。例えば、パケットエレメントテーブルに出力キューIDとして#3が記録されている場合は、処理待ちパケット出力キュー群401内のN個のキューの内、出力キューIDが#3の処理待ちパケット出力キューにエレメントIDを振り分ける。出力キューIDがパケットエレメントテーブルに記録されていない場合は、記録されるまで待ち続ける。なお、パケットエレメントテーブル210への出力キューIDの記録は、コア130で実行されているスレッド131によって行われるものである。スレッド131の動作については、後で図8を参照して詳しく説明する。
The element ID of the
処理待ちパケット出力キュー群401内の各キューにストアされたエレメントIDは、FIFOの原則に従って、同一の出力キューIDを持つ、出力キュー群403内の出力キューへと送信される。処理待ちパケット出力キュー群401は、キューからエレメントIDを出力する際に、対応したパケットエレメントテーブルをチェックする。該当するデータパケットに関するすべてのサブワークが完了し、ワーク完了ビットが“1”になっている場合、出力キュー群403内の対応する出力キューへエレメントIDの転送を行う。該当するパケットエレメントテーブルのワーク完了ビットが“0”になっている場合は、ワーク完了ビットが“1”になるまで待ち続ける。なお、ワーク完了ビットの設定は、コア130で実行されているスレッド131によって行われるものである。
The element ID stored in each queue in the process waiting packet
パケット送信スケジューラー230は、出力キュー群403を構成する各出力キューの先頭にストアされているエレメントIDを順次読み出し、読み出したエレメントIDに対応するデータパケットをメインメモリ140から読み出して送信インタフェース部102の該当する出力ポート(エレメントIDを読み出した出力キューに対応する出力ポート)へ送信する。また、パケット送信スケジューラー230は、出力キュー403群内の輻輳した出力キューを検出するため、出力キューの使用率を監視している。そして、使用率が予め定められている閾値を超える出力キューが発生した場合には、その出力キューに輻輳が発生したと判断し、その出力キューの出力キューIDを含んだ輻輳通知をワークコントロール120へ送信する。また、使用率が閾値以下に戻った出力キューが発生した場合には、その出力キューの出力キューIDを含んだ輻輳解消通知をワークコントロール部120へ送信する。なお、閾値は、例えば80%程度とすることができる。
The
図5を参照すると、ワークコントロール部120は、図2に示したワークキュー群221を構成するワーク出力キュー群501及び出力先振り分けワークキュー502と、ワークスケジューラー231と、ラウンドロビン機能部511、512と、出力キューIDチェックポイント521とを備えている。ワーク出力キュー群501は、処理待ちパケットキュー群401や出力キュー群403と同様にN個のワーク出力キューから構成されており、#1〜#Nの出力キューIDによって識別することができる。
Referring to FIG. 5, the
ワークコントロール部120は、受信コントロール部111或いはコア130上で実行されているスレッド131からワークIDが入力されると、このワークIDが所属するパケットエレメントテーブル(このワークIDによって示されるサブワークの生成元のパケットエレメントテーブル)の状態に応じて、このワークIDの分配先(ストア先)にするキューを決定する。具体的には、パケットエレメントテーブル210に出力キューID(図6参照)が記録済みであれば、ワーク出力キュー群501を構成するN個のキューの内の、上記出力キューIDによって特定されるキューに、ワークIDを分配する。これに対して、出力キューIDがパケットエレメントテーブルに記録されていない状態であれば、ワークIDを出力先振り分けワークキュー502へと分配する。
When a work ID is input from the
ワーク出力キュー群501を構成するN個のワーク出力キュー、および、出力先振り分けワークキュー502にストアされたワークIDは、FIFOの原則に従って、それぞれラウンドロビン機能部511、ラウンドロビン機能部512を経由して、ワークスケジューラー231へと配信される。つまり、ワークスケジューラー231は、各コア130に属するスレッド131の処理状況を確認し、ワークを処理していないスレッド131を見つけた場合は、ラウンドロビン機能部511、ラウンドロビン機能部512を経由して、ワーク出力キュー群501を構成するN個のワーク出力キュー、或いは、出力先振り分けワークキュー502からワークIDを引き取り、このワークIDを上記見つけたスレッド131に割り当てる。ここで、出力キューIDチェックポイント521は、出力先振り分けワークキュー502からワークID情報が引き出された場合に、該当ワークIDが所属するデータパケットのパケットエレメントテーブルの状態を再度チェックし、出力キューIDがパケットエレメントテーブルに記録済みであれば、ワーク出力キュー501へのワークIDの再振り分けを行うものである。出力キューIDがパケットエレメントテーブルに記録済みでなければ、ワークスケジューラー231はそのままワークIDを引き取る。
The N work output queues that make up the work
ワークコントロール部120は、送信コントロール部112内の出力キュー群403を構成するN個の出力キューの使用率が全て閾値以下である場合には、上述した処理を行う。これに対して、使用率が閾値を超える出力キューが発生した場合には、その出力キューに対応したワーク出力キューからのワークIDの出力を制限する。このようにする理由は、データパケットの出力キューが何らかの理由で輻輳状態にある場合、該当出力キューがオーバーフローしてしまう可能性があるためである。該当出力キューがオーバーフローして対応するデータパケットが廃棄された場合、該当するデータパケットに対応するワークに費やされたマルチコアプロセッサーの処理能力が無駄になってしまう。そこで、本実施の形態では、データパケットの出力キュー群403を構成するN個の出力キューの中に使用率がある一定の閾値を超える出力キューが発生した場合、該当出力キュー403が輻輳状態であるとみなし、該当出力キューに対応したワーク出力キューからのワークIDの出力を制限することで、将来的に廃棄される可能性が高いデータパケットに対する処理(サブワーク)へのスレッド131のアサイン(割り当て)を後回しにし、他の廃棄される可能性が少ないパケットに対する処理(サブワーク)をスレッド131にアサインすることができる。
The
ここで、具体例を挙げて使用率が閾値を超える出力キューが発生した場合の動作について説明する。今、例えば、出力キュー群403を構成するN個の出力キューの内、出力キューIDが#1の出力キューの使用率が閾値を超えたとする。なお、以下の説明では、出力キューIDが#jの出力キューや、ワーク出力キューなどを、出力キュー#jや、ワーク出力キュー#jと記す場合がある。パケット送信スケジューラー230は、上記出力キュー#1の使用率が閾値を超えたことを検出すると、出力キューID「#1」を含んだ輻輳通知をワークコントロール部120へ送信する。
Here, an operation when an output queue having a usage rate exceeding a threshold value occurs will be described with a specific example. Now, for example, it is assumed that the usage rate of the output queue with the output queue ID # 1 out of N output queues constituting the output queue group 403 exceeds the threshold. In the following description, an output queue whose output queue ID is #j, a work output queue, or the like may be referred to as an output queue #j or a work output queue #j. When the
ワークコントロール部120内のワークスケジューラー231は、送信コントロール部112から出力キューID「#1」を含んだ輻輳通知が送られてくると、ワーク出力キュー群501を構成するN個のワーク出力キュー#1〜#Nの内の、ワーク出力キュー#1からのワークIDの出力を制限する。具体的には、例えば、ラウンドロビン機能部512に対して、ワーク出力キュー#1からのワークIDの読み出しを禁止することを指示する。これにより、ワーク出力キュー#1からはワークIDが出力されなくなる。あるいは、例えば、ラウンドロビン機能部512に対して、ワーク出力キュー#1からは、M回(Mは2以上の整数)の走査につき1回だけストアされているワークIDを読み出すことを指示する。これにより、ワーク出力キュー#1から出力されるワークIDの数は、他のワーク出力キュー#2〜#Nから出力されるワークIDの数の1/Mとなる。
When the
また、送信コントロール部112内のパケット送信スケジューラー230は、出力キュー#1の使用率が閾値以下に戻ったら、出力キューID「#1」を含んだ輻輳解消通知をワークコントロール部120へ送信する。これにより、ワークコントロール部120内のワークスケジューラー231は、ラウンドロビン機能部512に対して、輻輳通知受信時に行った制限を解除することを指示する。これにより、パケット出力キュー#1からも他のパケット出力キュー#2〜#Nと同様にワークIDが出力される。
Further, the
次に、図6および図7を参照して、パケットエレメントテーブル210およびワークテーブル211について説明する。 Next, the packet element table 210 and the work table 211 will be described with reference to FIGS.
先ず、図6を参照してパケットエレメントテーブル210の各構成要素について説明する。 First, each component of the packet element table 210 will be described with reference to FIG.
・エレメントID…データパケット201の受信時に受信コントロール部111で採番されたエレメントIDが設定される。
・エレメントID有効ビット…エレメントIDが有効か否か、つまり、該当パケットエレメントテーブル210が有効か否かを表示する。
Element ID: The element ID assigned by the
Element ID valid bit: Displays whether the element ID is valid, that is, whether the corresponding packet element table 210 is valid.
・ワークID…データパケット201の受信時に受信コントロール部111で採番されたワークIDが設定される。
・ワークID有効ビット…ワークIDが有効か否かを表示する。
Work ID: The work ID assigned by the
• Work ID valid bit: Displays whether the work ID is valid.
・ワーク処理結果…ワークの処理結果が設定される。
・ワーク完了ビット…データパケット201に関するワークが完了したか否かを表示する。
-Work processing result: The work processing result is set.
Work completion bit: Displays whether or not the work related to the
・出力キューID…送信コントロール部112のパケットキュー220について、該当パケットがどの出力キュー403から出力されるのかを示すID情報を記載する[データパケット201の格納先にする出力キューのID(出力キューID)が設定される]。
・出力キューID有効ビット…出力キューIDが有効か否かを表示する。
Output queue ID: For the packet queue 220 of the
• Output queue ID valid bit: Displays whether the output queue ID is valid.
・パケットキュー種別表示フィールド…該当パケットエレメントテーブル210のエレメントIDが、送信コントロール部112に設けられている出力先振り分けパケットキュー402、処理待ちパケット出力キュー群401または出力キュー群403の内の何れに収容されているかを表示する。
Packet queue type display field: The element ID of the corresponding packet element table 210 is assigned to any of the output destination
・パケットキュー先行エレメントID…パケットキュー群220において、このパケットエレメントテーブル210の生成元となったデータパケットのエレメントIDの前段に先行して収容されているエレメントIDを表示する。
・パケットキュー先行エレメントID有効ビット…パケットキュー群220において、このパケットエレメントテーブル210の生成元となったデータパケットのエレメントIDの前段に先行して収容されているエレメントIDが存在するか否かを表示する。
Packet queue preceding element ID: In the packet queue group 220, the element ID accommodated prior to the preceding stage of the element ID of the data packet that is the generation source of the packet element table 210 is displayed.
Packet queue preceding element ID valid bit: In the packet queue group 220, it is determined whether or not there is an element ID accommodated before the element ID of the data packet that is the generation source of the packet element table 210. indicate.
・パケットキュー後続エレメントID…パケットキュー群220において、このパケットエレメントテーブル210の生成元となったデータパケットのエレメントIDの後段に後続して収容されているエレメントIDを表示する。
・パケットキュー後続エレメントID有効ビット…パケットキュー群220において、このパケットエレメントテーブル210の生成元となったデータパケットのエレメントIDの後段に後続して収容されているエレメントIDが存在するかどうかを表示する。
Packet Queue Subsequent Element ID: In the packet queue group 220, the element ID accommodated after the element ID of the data packet that is the generation source of the packet element table 210 is displayed.
Packet Queue Subsequent Element ID Valid Bit: Indicates whether or not there is an element ID subsequently stored in the packet queue group 220 following the element ID of the data packet that is the generation source of this packet element table 210 To do.
・データパケット…データパケットの内容がストアされる。 Data packet: The contents of the data packet are stored.
次に、図7を参照してワークテーブル211の構成要素について説明する。 Next, the components of the work table 211 will be described with reference to FIG.
・ワークID…このワークテーブル211によって管理されるサブワーク(該当サブワーク)を特定するID情報である。
・ワークID有効ビット…ワークIDが有効か否か、つまり、該当ワークテーブル211の情報が有効か否かを示す。
Work ID: ID information for specifying a sub work (corresponding sub work) managed by the work table 211.
Work ID valid bit: Indicates whether the work ID is valid, that is, whether the information in the corresponding work table 211 is valid.
・エレメントID…該当サブワークの生成元となっているデータパケットを示すエレメントIDが設定される。言い換えれば、該当サブワークによって処理が行われるデータパケットのエレメントIDが設定される。
・エレメントID有効ビット…エレメントIDが有効か否かを表示する。
Element ID: An element ID indicating a data packet that is a generation source of the corresponding subwork is set. In other words, the element ID of the data packet to be processed by the corresponding subwork is set.
• Element ID valid bit: Displays whether the element ID is valid.
・アクションID…該当サブワークが実際に行う処理(アクション)の内容を示したアクションテーブル310(図3参照)のID情報を示す。
・アクションID有効ビット…アクションIDが有効か否かを表示する。
Action ID: Indicates ID information of the action table 310 (see FIG. 3) indicating the contents of the processing (action) actually performed by the subwork.
• Action ID valid bit: Displays whether the action ID is valid.
・割り当てスレッドID…該当サブワークを割り当てるスレッド131のIDが設定される。
・割り当てスレッド完了ビット…該当サブワークに対するスレッド割り当てが完了し、割り当てスレッドIDが有効になったか否かを表示する。
Assigned thread ID: The ID of the
Assigned thread completion bit: Displays whether or not the assigned thread ID for the corresponding sub-work has been completed and the assigned thread ID has become valid.
・親ワークID…該当サブワークの生成元となった親サブワークがあれば、親サブワークのID情報を表示する。
・親ワークID有効ビット…親サブワークID情報が有効か否かを表示する。該当サブワークの生成元となった親サブワークが無ければ“0”を設定する。
-Parent work ID: If there is a parent subwork from which the corresponding subwork is generated, the ID information of the parent subwork is displayed.
-Parent work ID valid bit: Displays whether parent sub work ID information is valid. Set to “0” if there is no parent subwork that has generated the subwork.
・ワークキューID…このワークテーブル121のワークIDがワークコントロール部120内のどのキューにストアされているかを表示する。
・ワークキュー割り当て完了ビット…該当ワークテーブル121のワークID情報がワーク出力キュー501に割り当てられたか否かを表示する。
Work queue ID: Displays in which queue in the
Work queue assignment completion bit: Displays whether or not the work ID information of the corresponding work table 121 has been assigned to the
・ワークキュー先行ワークID…ワークキュー群221において、このワークテーブル121のワークIDの前段に先行して収容されているワークIDを表示する。
・ワークキュー先行ワークID有効ビット…ワークキュー群221において、このワークテーブル121のワークIDの前段に先行して収容されているワークIDが存在するか否かを表示する。
Work queue preceding work ID: In the work queue group 221, the work ID accommodated prior to the work ID of the work table 121 is displayed.
Work queue preceding work ID valid bit: Displays whether or not there is a work ID stored in the work queue group 221 prior to the work ID of the work table 121.
・ワークキュー後続ワークID…ワークキュー群221において、このワークテーブル121のワークIDの後段に後続して収容されているワークIDを表示する。
・ワークキュー後続ワークID有効ビット…ワークキュー群221において、このワークテーブル121のワークIDの後段に後続して収容されているワークIDが存在する否かを表示する。
Work queue subsequent work ID: In the work queue group 221, the work ID stored subsequent to the work ID of the work table 121 is displayed.
Work queue subsequent work ID valid bit: Displays whether or not there is a work ID stored subsequent to the work ID of the work table 121 in the work queue group 221.
・処理経過情報…該当サブワークの処理を実行した結果をこのフィールドに随時アップデートして記録する。 Process progress information: The result of executing the process of the corresponding subwork is updated and recorded in this field as needed.
・サブワークID…該当サブワークの配下にサブワークが存在していれば、サブワークIDをテーブルに追加する。
・サブワークID発行完了ビット…該当サブワークの発行が完了しているか否かを表示する。
-Subwork ID: If a subwork exists under the subwork, add the subwork ID to the table.
・ Subwork ID issuance completion bit: Displays whether or not the subwork has been issued.
・サブワークアクションID…該当サブワークが実行するアクションのID情報を記録する。
・サブワーク入力データ…該当サブワークを発行する際、入力データとして使用したい値があれば記載する。
Subwork action ID: Records the ID information of the action executed by the subwork.
-Subwork input data: Enter any value you want to use as input data when issuing the subwork.
・サブワークID結果情報…該当サブワークが実行完了した際に得られた実行結果情報を記録する。
・サブワークID結果有効ビット…該当サブワークが実行完了して、サブワークID結果情報が有効になっているかどうかを表示する。
Subwork ID result information: Records the execution result information obtained when the corresponding subwork is completed.
Subwork ID result valid bit: Displays whether or not the subwork ID result information is valid after execution of the subwork is completed.
なお、最下位階層のワークテーブルには、項目「サブワークID発行完了ビット」「サブワークID」「サブワークアクションID」「サブワーク入力データ」「サブワークID結果有効ビット」「サブワークID結果情報」は存在しない。 In the work table at the lowest level, the items "subwork ID issue completion bit", "subwork ID", "subwork action ID", "subwork input data", "subwork ID result valid bit", "subwork ID result" There is no “information”.
次に、受信コントロール111がデータパケット201を受信した際に行うパケットエレメントテーブルの生成処理およびワークテーブルの生成処理について、図6および図7を参照して説明する。
Next, packet element table generation processing and work table generation processing performed when
先ず、図6を参照してパケットエレメントテーブル210の生成処理について説明する。パケットエレメントテーブル210の生成処理においては、各項目に対して次のような設定を行う。 First, generation processing of the packet element table 210 will be described with reference to FIG. In the generation process of the packet element table 210, the following settings are made for each item.
・エレメントID…データパケット201の受信時に採番したエレメントIDを設定する。
・エレメントID有効ビット…エレメントIDが有効であることを示す“1”を設定する。
Element ID: Sets the element ID assigned when receiving the
• Element ID valid bit: Set “1” to indicate that the element ID is valid.
・ワークID…データパケット201の受信時に採番したワークIDを設定する。
・ワークID有効ビット…ワークIDが有効であることを示す“1”を設定する。
Work ID: Set the work ID assigned when receiving the
• Work ID valid bit: Set “1” to indicate that the work ID is valid.
・ワーク処理結果…未処理であることを設定する。
・ワーク完了ビット…ワークが完了していないことを示す“0”を設定する。
-Work processing result: Set that it is unprocessed.
• Work completion bit: Set “0” to indicate that the work is not completed.
・出力キューID…何も設定しない。出力キューIDは、サブワークが割り当てられたスレッドによって設定される。
・出力キューID有効ビット…出力キューIDが無効であることを示す“0”を設定する。
-Output queue ID: Set nothing. The output queue ID is set by the thread to which the sub work is assigned.
Output queue ID valid bit: Set “0” to indicate that the output queue ID is invalid.
・パケットキュー種別表示フィールド…何も設定しない。このフィールドは、送信コントロール部112によって設定される。
• Packet queue type display field: Nothing is set. This field is set by the
・パケットキュー先行エレメントID…何も設定しない。この項目は、送信コントロール部112によって設定される。
・パケットキュー先行エレメントID有効ビット…無効であることを示す“0”を設定する。
-Packet queue preceding element ID: Nothing is set. This item is set by the
Packet queue preceding element ID valid bit: “0” indicating invalid is set.
・パケットキュー後続エレメントID…何も設定しない。この項目は、送信コントロール部112によって設定される。
・パケットキュー後続エレメントID有効ビット…無効であることを示す“0”を設定する。
-Packet queue subsequent element ID: Nothing is set. This item is set by the
• Packet queue subsequent element ID valid bit: “0” indicating invalidity is set.
・データパケット…受信したデータパケット201を設定する。
Data packet: The received
次に、図7を参照してワークテーブル210の生成処理について説明する。ワークテーブル210の生成処理においては、各項目に対して次のような設定を行う。 Next, processing for generating the work table 210 will be described with reference to FIG. In the process of generating the work table 210, the following settings are made for each item.
・ワークID…データパケット201の受信時に採番したワークIDを設定する。
・ワークID有効ビット…ワークIDが有効であることを示す“1”を設定する。
Work ID: Set the work ID assigned when receiving the
• Work ID valid bit: Set “1” to indicate that the work ID is valid.
・エレメントID…データパケット201の受信時に採番したエレメントIDを設定する。
・エレメントID有効ビット…エレメントIDが有効であることを示す“1”を設定する。
Element ID: Sets the element ID assigned when receiving the
• Element ID valid bit: Set “1” to indicate that the element ID is valid.
・アクションID…最上位のサブワークでのアクションが定義されたアクションIDを設定する。
・アクションID有効ビット…アクションIDが有効であることを示す“1”を設定する。
-Action ID: Set the action ID that defines the action at the highest sub-work.
• Action ID valid bit: Set “1” to indicate that the action ID is valid.
・割り当てスレッドID…何も設定しない。この項目は、ワークコントロール部120によって設定される。
・割り当てスレッド完了ビット…スレッドへの割り当てが完了していないことを示す“0”を設定する。
-Assigned thread ID: Nothing is set. This item is set by the
Assigned thread completion bit: “0” indicating that assignment to a thread has not been completed is set.
・親ワークID…自身が最上位階層のサブワークであり、親ワークは存在しないので、何も設定しない。
・親ワークID有効ビット…親ワークIDが無効であることを示す“0”を設定する。
-Parent work ID: Since it is the sub-work of the highest hierarchy and there is no parent work, nothing is set.
• Parent work ID valid bit: “0” indicating that the parent work ID is invalid is set.
・ワークキューID…この項目はワークコントロール部120によって設定されるので、何も設定しない。
・ワークキュー割り当て完了ビット…ワークキュー群への割り当てが完了していないことを示す“0”を設定する。
Work queue ID: Since this item is set by the
Work queue assignment completion bit: “0” indicating that assignment to the work queue group is not completed is set.
・ワークキュー先行ワークID…この項目はワークコントロール部120によって設定されるので、何も設定しない。
・ワークキュー先行ワークID有効ビット…ワークキュー先行ワークIDが無効であることを示す“0”を設定する。
Work queue preceding work ID: Since this item is set by the
Work queue preceding work ID valid bit: “0” indicating that the work queue preceding work ID is invalid is set.
・ワークキュー後続ワークID…この項目はワークコントロール部120によって設定されるので、何も設定しない。
・ワークキュー後続ワークID有効ビット…ワークキュー後続ワークIDが無効であることを示す“0”を設定する。
Work queue subsequent work ID: Since this item is set by the
Work queue subsequent work ID valid bit: “0” indicating that the work queue subsequent work ID is invalid is set.
・処理経過情報…任意 (データパケット201中の特定フィールドを設定することも可能) ・ Processing progress information: Arbitrary (It is also possible to set specific fields in the data packet 201)
・サブワークID…自サブワークに対して予め定められているサブワークそれぞれについてサブワークIDを採番し、設定する。
・サブワークID発行完了ビット…未発行を示す“0”を設定する。
Subwork ID: Number and set a subwork ID for each of the subwork predetermined for the subwork.
• Subwork ID issuance completion bit: Set "0" to indicate that no work has been issued.
・サブワーク入力データ…該当サブワークを発行する際、入力データとして使用したい値があれば記録する。
・サブワークアクションID…サブワークで実施するアクションのアクションIDを設定する。
-Subwork input data: When issuing the subwork, record any values you want to use as input data.
-Subwork action ID: Set the action ID of the action to be executed in the subwork.
・サブワークID結果情報…この項目は、スレッドによって設定されるので、何も設定しない。
・サブワークID結果有効ビット…サブワークID結果情報が無効であることを示す“0”を設定する。
Subwork ID result information: This item is set by the thread, so nothing is set.
Subwork ID result valid bit: “0” indicating that the subwork ID result information is invalid is set.
受信コントロール部111は、メインメモリ140上にパケットエレメントテーブル210及びワークテーブル211を生成すると、最上位階層のサブワークのワークIDをワークコントロール部120に送付して該当サブワークへのスレッドへの割り当てを依頼すると共に、データパケット201のエレメントIDを送信コントロール部112へ送付する。なお、以下では、最上位階層のサブワークをサブワークW1と記す。また、サブワークW1のワークIDがID「IDW1」であり、データパケット201のエレメントIDが「ID201」であるとする。
When the
ワークコントロール部120では、受信コントロール部111から送られてきた最上位階層のサブワークW1のワークID「IDW1」を出力先振り分けワークキュー502にストアし、送信コントロール部112では、受信コントロール部111から送られてきたエレメントID「ID201」を出力先振り分けパケットキュー402にストアする。
The
その後、ワークコントロール部120内のワークスケジューラー231によって、最上位階層のサブワークW1にスレッド131が割り当てられる。ワークスケジューラー231は、最上位のサブワークW1にスレッド131を割り当てると、該当するワークテーブル211に割り当てスレッドIDとして上記スレッドのIDを設定すると共に、割り当てスレッド完了ビットを“1”とする。
Thereafter, the
スレッド131は、最上位階層のサブワークW1のワークID「IDW1」が割り当てられると、図8のフローチャートに示す処理を開始する。
When the work ID “IDW1” of the sub-work W1 in the highest hierarchy is assigned, the
スレッド131は、先ず、該当ワークID「IDW1」のワークテーブル211に対して排他制御を実施する(ステップ1)。ここで排他制御の設定および解除手順について下記に定義する。
First, the
[排他制御の設定手順]
・他のスレッドが該当ワークID「IDW1」のワークテーブル211に対して排他制御を行っているかどうかを確認する。
・他のスレッドが排他制御を行っている場合は排他制御が解除されるまで待ち続ける。他のスレッドが排他制御を行っている場合、下記の動作となる。
→該当スレッドは該当ワークIDのサブワークを実行できない
→該当スレッドは該当ワークIDのワークテーブル211にアクセスできない
・他のスレッドによる排他制御が行われていない場合は該当ワークID「IDW1」のワークテーブル211に対して排他制御を設定し、他のスレッドが該当ワークIDのワークを実行できず、なおかつ該当ワークID「IDW1」のワークテーブル211にアクセスできないようにする。
[Exclusive control setting procedure]
-Check whether other threads are performing exclusive control on the work table 211 with the corresponding work ID "IDW1".
-If other threads are performing exclusive control, continue to wait until exclusive control is released. When other threads are performing exclusive control, the following operations are performed.
-> The corresponding thread cannot execute the sub-work of the corresponding work ID-> The corresponding thread cannot access the work table 211 of the corresponding work ID-If the exclusive control is not performed by another thread, the work table of the corresponding work ID "IDW1" Exclusive control is set for 211 so that other threads cannot execute the work with the corresponding work ID and cannot access the work table 211 with the corresponding work ID “IDW1”.
[排他制御の解除手順]
・該当ワークID「IDW1」のワークテーブル211に対する排他制御を解除し、他のスレッドが該当ワークID「IDW1」のワークを実行できるようにすると共に、該当ワークID「IDW1」のワークテーブル211にアクセスできるようにする。
[Procedure for releasing exclusive control]
・ Release exclusive control for the work table 211 with the corresponding work ID “IDW1” so that other threads can execute the work with the corresponding work ID “IDW1” and access the work table 211 with the corresponding work ID “IDW1”. It can be so.
その後、スレッド131は、該当ワークテーブル211に設定されているアクションIDを参照し、対応するアクションテーブルに記載されている命令(命令列)を実行する(ステップ2)。命令を実行する際に引き渡す入力データと実行後に期待される出力データは下記になる。なお、命令を実行した後は、アクションID有効ビットを“0”とする。なお、命令列は、サブワークの初回発行時と再発行時とで処理内容を異なるものにすることができる。
Thereafter, the
[入力データ]ワークID、アクションID、処理経過情報、各サブワークIDの結果情報
[出力データ]処理経過情報 (情報をアップデートする)、サブワークID、サブワークアクションID、サブワーク入力データ、出力キューID
[Input data] Work ID, action ID, process progress information, result information of each sub work ID [Output data] Process progress information (update information), sub work ID, sub work action ID, sub work input data, output Queue ID
今、例えば、ステップ2において、データパケット201をストアする出力キューを決定したとすると、スレッド131は、上記出力キューの出力キューID(例えば、#1とする)をデータパケット201用のパケットエレメントテーブル210に設定すると共に、出力キューID有効ビットを“1”とする。これにより、送信コントロール部112は、出力先振り分けパケットキュー402にストアされている、データパケット201を特定するエレメントIDを処理待ちパケット出力キュー群401を構成するキューの内の、出力キューIDが#1のキューにストアする。なお、パケットエレメントテーブル210に出力キューIDを設定するなど、パケットエレメントテーブル210を更新する場合には、パケットエレメントテーブル210に対して排他制御を実施した上で更新を行い、その後、排他制御を解除する。
Now, for example, assuming that the output queue for storing the
その後、スレッド131は、サブワークW1についてのワークテーブル211のサブワークID発行完了ビットに基づいて、未発行のサブワークがあるか否かを判定する(ステップ3)。そして、全て“1”となっている場合は、未発行のサブワークが無いと判断してステップ4へ進み、そうでない場合は、未発行のサブワークがあると判断してステップ13へ進む。なお、ワークテーブルに項目「サブワークID発行完了ビット」が存在しない場合は、未発行のサブワークが無いと判断するものとする。今、処理対象にしているサブワークW1は、最上位階層のサブワークであり、まだ、サブワークの発行処理を行っていないので、スレッド131は、ステップ13に進む。
Thereafter, the
ステップ13において、スレッド131は、未発行のサブワーク(第2階層のサブワーク)の発行処理を行う。具体的には、最上位のサブワークW1のワークテーブル211を参照し、サブワークID発行完了ビットが“0”となっているサブワークIDそれぞれについて、メインメモリ140上に新規のワークテーブルを生成する。その後、ワークコントロール部120へ該当サブワークID(第2階層のサブワークのサブワークID)を送付する。なお、ワークテーブルの生成方法は、前述した最上位階層のワークテーブルの生成方法と下記の点を除いて同じである。また、この例では、m個のサブワークが発行されたとし、各サブワークをサブワークW21〜W2mと記す。また、該当サブワークが属するデータパケットが廃棄されている場合はサブワークの発行を行わない(この場合、該当ワークが属するパケットエレメントテーブルのエレメントIDが“0”となっていることで判別可能である)。
In
・アクションID…最上位のサブワークW1のワークテーブル211中のアクションIDを設定する。
・親ワークID…該当サブワークW2i(1≦i≦m)の発行元となったサブワークW1のワークIDを設定する。
・親ワークID有効ビット…“1”を設定する。
・処理経過情報…サブワークID入力データを使用する。
Action ID: Sets the action ID in the work table 211 of the highest sub work W1.
Parent work ID: Set the work ID of the sub work W1 that has issued the corresponding sub work W2i (1 ≦ i ≦ m).
• Parent work ID valid bit: Set “1”.
-Process progress information: Sub-work ID input data is used.
その後、スレッド131は、サブワークW1のワークテーブル211に対する排他制御を解除し、その処理を終了する。
Thereafter, the
一方、第2階層のサブワークW2iのサブワークID(IDW2iとする)が渡されたワークコントロール部120は、このサブワークW2iの生成元となったデータパケット201のパケットエレメントテーブル210の出力キューID(#1が設定されている)を参照し、上記サブワークID「IDW2i」を、ワーク出力キュー群501を構成するワーク出力キューの内の、出力キューIDが#1のキューにストアする。その後、ワークコントロール部120内のワークスケジューラー231は、この第2階層のサブワークID「IDW2i」にスレッド131(最上位階層のサブワークIDを割り当てたスレッドと同じスレッドである場合もあるし、異なるスレッドである場合もある)を割り当てる。
On the other hand, the
第2階層のサブワークID「IDW2i」が割り当てられたスレッド131は、前述したステップ1、2の処理を行った後、未発行のサブワークが存在するか否かを判定する(ステップ3)。今、第2階層が最下位層であるとすると、項目「サブワークID発行完了ビット」が存在しないので、スレッド131は、未発行のサブワークが無いと判断してステップ4に進む。
The
ステップ4では、未完了のサブワークが存在するか否かを判定する。未完了のサブワークが存在するか否かは、現在処理対象にしているサブワークW2iのワークテーブルに設定されているサブワークID結果有効ビットに基づいて行う。即ち、サブワークID結果有効ビットが全て“1”である場合には未完了のサブワークが無いと判断し、そうで無い場合は未完了のサブワークが存在すると判断する。また、ワークテーブルに項目「サブワークID結果有効ビット」が無い場合も、未完了のサブワークが無いと判断する。現在処理対象にしているサブワークW2iは最下位階層のサブワークであり、そのワークテーブルには項目「サブワークID結果有効ビット」が存在しないので、スレッド131は、未完了のサブワークが無いと判断し、ステップ5に進む。
In
ステップ5では、現在処理対象にしているサブワークW2iを発行した、親となるサブワークが存在するか否かを判断する。具体的には、サブワークW2iのワークテーブルに登録されている親ワークID有効ビットが“1”であれば、親となるサブワークが存在すると判断し、“0”であれば、親となるサブワークが存在しないと判断する。そして、親となるサブワークが存在する場合には、ステップ6に進み、存在しない場合は、ステップ14へ進む。この例の場合、処理対象にしているサブワークW2iは、第2階層のサブワークであり、親となるサブワークW1が存在するので、ステップ6へ進むことになる。
In
ステップ6では、サブワークW2iの親となるサブワークW1のワークテーブルに対する排他制御を行う。次のステップ7では、サブワークW1に設定されているサブワークID結果情報の内、現在実行中のワークID「IDW2i」と一致するものを更新し、更に、サブワークID結果有効ビットを“1”に変更する。
In step 6, exclusive control is performed on the work table of the sub work W1 which is the parent of the sub work W2i. In the
次の、ステップ8では、処理対象にしているサブワークW2iの親となるサブワークW1において、全てのサブワークW21〜W2mが完了しているか否かを、サブワークW1のサブワークID結果有効ビットが全て“1”になっているか否かに基づいて判断する。そして、全てが“1”になっている場合は、サブワークW1の全てのサブワークW21〜W2mが完了していると判断してステップ9に進み、そうでない場合はステップ10に進む。
In the
ステップ9では、サブワークW2iの親であるサブワークW1のワークID「IDW1」をワークコントロール部120へ送信し、サブワークW1へのスレッド131の割り当てを要求する。次のステップ10では、サブワークW1のワークテーブルに対する排他制御を解除する。ステップ11では、サブワークW2i及びそれよりも下位のサブワークの処理が完了したと判断し、サブワークW2iのワークテーブルのワークID有効ビットを“0”とする。そして、最後に、現在処理対象にしているサブワークW2iのワークテーブルに対する排他制御を解除する(ステップ12)。
In
ステップ9においてワークコントロール部120に送信された最上位階層のサブワークW1のワークID「IDW1」は、ワーク出力キュー群501内の出力キューIDが「#1」のキューにストアされ、ワークスケジューラー231によってスレッド131が割り当てられる。
The work ID “IDW1” of the sub-work W1 of the highest hierarchy transmitted to the
最上位階層のサブワークW1が割り当てられたスレッド131は、前述したステップ1、2の処理を行った後、未発行のサブワークがあるか否かを調べる(ステップ3)。この例では、既にサブワークW1は、全てのサブワークW21〜W2mを発行済みであり、該当するワークテーブルのサブワークID発行完了ビットが“1”となっているので、ステップ3の判断結果はN(No)となり、ステップ4の処理が行われる。
The
ステップ4では、サブワークW1に未完了のサブワークが存在するか否かを調べる。この例では、未完了のサブワークは存在しないので、ステップ4の判断結果はNとなり、ステップ5の処理が行われる。
In
ステップ5では、サブワークW1に親となるサブワークが存在するか否かを調べる。この例では、サブワークW1は最上位階層のサブワークであるので判断結果はNとなり、ステップ14の処理が行われる。
In
ステップ14では、サブワークW1のワークテーブルの処理経過情報や、サブワークW1配下のサブワークW21〜W2mのワークテーブルのサブワークID結果情報を使用して、ワーク発生元となったデータパケット201のパケットエレメントテーブル210を更新(例えば、データパケットのアドレスの書き換えなど)する。なお、パケットエレメントテーブル210を更新する場合は、排他制御を実行した後、更新処理を行う。
In
本実施の形態によれば、廃棄される可能性が高いデータパケットの処理に向けられていたプロセッサー処理能力、メモリなどのリソースの割り当てを、廃棄される可能性が低い他のデータパケットの処理に向けることが可能となり、通信装置が備えているリソースを有効利用することが可能になるという効果を得ることができる。その理由は、出力キュー群403を構成するキューの中に輻輳している出力キューが存在する場合は、該輻輳している出力キューを格納先にしているパケットに関連するサブワークについてはスレッドの割り当てを制限するようにしているからである。 According to the present embodiment, the allocation of resources such as processor processing capacity and memory, which has been directed to processing data packets that are likely to be discarded, can be used for processing other data packets that are unlikely to be discarded. Therefore, it is possible to obtain an effect that it is possible to effectively use resources included in the communication device. The reason is that when there is a congested output queue among the queues constituting the output queue group 403, the thread of the subwork related to the packet storing the congested output queue is stored in the thread. This is because the allocation is limited.
また、本実施の形態では、同一フローに属するデータパケットを同一の出力キューにストアし、データパケットに関する全てのサブワークが完了した後、出力キューから送出するようにしているので、1つのデータパケットに関する複数のサブワークを任意の複数のスレッド131で並行して実行させることが可能になり、処理効率が向上する。
In this embodiment, since data packets belonging to the same flow are stored in the same output queue and all sub-work related to the data packet is completed, it is sent out from the output queue. A plurality of sub-work can be executed in parallel by an arbitrary plurality of
更に、本実施の形態では、サブワークを任意のスレッド131に割り当てることができるので、コア数やスレッド数がデバイスのアップグレードにより増加した場合でも処理アルゴリズムを修正することなく、容易に処理能力の向上を図ることが可能となる。
Furthermore, in this embodiment, since sub-work can be assigned to any
[本発明の第2の実施の形態]
次に、本発明にかかる通信装置の第2の実施の形態について説明する。本実施の形態は、サブワークに優先度を付与し、優先度の高いサブワークに優先的にスレッドを割り当てるようにしたことを特徴とする。以下では、第1の実施の形態との相違点について説明する。
[Second embodiment of the present invention]
Next, a second embodiment of the communication apparatus according to the present invention will be described. The present embodiment is characterized in that a priority is assigned to a sub work and a thread is preferentially assigned to a sub work having a high priority. Hereinafter, differences from the first embodiment will be described.
本実施の形態では、第1の実施の形態で利用するワークテーブルに「ワーク優先度」という項目を追加した図10に示すワークテーブルを利用する。なお、本実施の形態では、ワーク優先度は、第1レベル〜第kレベルのk段階であるとする。第1レベルが最も優先度が高いとする。 In the present embodiment, the work table shown in FIG. 10 is used in which the item “work priority” is added to the work table used in the first embodiment. In this embodiment, it is assumed that the work priorities are k levels from the first level to the k-th level. Assume that the first level has the highest priority.
また、本実施の形態では、ワークコントロール部120として図9に示す構成を有するものを利用する。本実施の形態のワークコントロール部120は、ワーク出力キュー群501の代わりにワーク出力キュー群501aを備えている点、および、ラウンドロビン機能部512の代わりにラウンドロビン機能部512aを備えている点が、図5に示した第1の実施の形態のワーク出力キュー群501と相違している。
In the present embodiment, the
第1の実施の形態のワーク出力キュー群501はN個(出力キュー群403を構成するキューの数と同数)のキューによって構成されているのに対し、本実施の形態のワーク出力キュー群501aは、N×k個のキューによって構成されている。即ち、本実施の形態のワーク出力キュー群501aは、1つの出力キューに対して、ワーク優先度の段階数分(k個)のキューから構成されている。別の言い方をすれば、1つの出力キューIDに対応付けて、ワーク優先度「第1レベル〜第kレベル」用のk個のキューが設けられている。ワークコントロール部120は、コア130からワークIDが渡された場合、ストア先にするキューの出力キューIDが既に確定している場合は、上記出力キューIDによって特定されるk個のキューの内に、上記ワークIDのワーク優先度に応じたキューにストアする。なお、図9においては、出力キューID「X」に対応する第Yレベルのキューには、符号LX-Yを付している。
The work
ラウンドロビン機能部512aは、ワークIDの出力を停止もしくは抑制(選択される割合を他のキューよりも少なくする)するキューの出力キューIDがワークスケジューラー231によって指定された場合、上記出力キューIDに対応するk個のキューからのワークIDの出力を停止もしくは抑制する。また、ラウンドロビン機能部512aは、ワーク優先度が高いキューにストアされているワークIDを優先的に出力する。例えば、ワーク優先度が最も高い第1レベルのキューからはk回の走査全てにおいてワークIDを出力し、第2レベルのキューからはk回の走査の内の(k-1)回の走査においてワークIDを出力し、最もワーク優先度が低い第kレベルのキューからはk回の走査の内の1回の走査においてワークIDを出力する。
When the
ワークテーブルへのワーク優先度の設定は、ワークコントロール部120において行われると共に、図8に示したフローチャートのステップ13において行われる。
The setting of the work priority in the work table is performed in the
ワークコントロール部120では、最上位階層のサブワークに対応するワークテーブルを生成する際、予め定められているワーク優先度を設定する。
The
ステップ13において、スレッド131は、例えば、次のようなサブワークに高いワーク優先度を与える。
In
・データパケットの出力キューIDを算出するサブワーク…データパケットの出力キューIDを求める操作を優先的に処理すると、マルチコアプロセッサー部150のリソースを効果的にサブワークに対して配分することが可能となると考えられる。そのため、データパケットの出力キューIDを算出するサブワークのワーク優先度を高くする。
・処理待ちパケット出力キュー(処理待ちパケット出力キュー群401を構成しているキュー)が輻輳しているデータパケットのサブワーク…処理待ちパケット出力キューが輻輳しているデータパケットに所属するサブワークは処理が遅れていると考えられるため、該当サブワークの優先度を上げる。なお、処理待ちパケット出力キューが輻輳しているか否かは、例えば、キューの使用率が閾値を超えているか否かにより判断する。
・QoSクラスが高いデータパケットに対応するサブワーク
・その他、処理単位が大きいワーク、配下のサブワーク数が大きいワーク、メモリーを大量に確保しているワーク等
-Subwork for calculating the output queue ID of the data packet: By preferentially processing the operation for obtaining the output queue ID of the data packet, the resources of the multi-core processor unit 150 can be effectively distributed to the subwork. It is considered to be. For this reason, the work priority of the sub work for calculating the output queue ID of the data packet is increased.
• Subwork of data packets that are congested in the queued packet output queue (queues that constitute the queued packet output queue group 401). Since the processing is considered to be delayed, raise the priority of the corresponding subwork. Note that whether or not the processing-waiting packet output queue is congested is determined based on, for example, whether or not the queue usage rate exceeds a threshold value.
・ Sub work corresponding to data packet with high QoS class ・ Other work with large processing unit, work with large number of sub-work under it, work with large amount of memory, etc.
本実施の形態によれば、第1の実施の形態で得られる効果に加え、更に処理を効率的に行うことが可能になるという効果を得ることができる。その理由は、ワーク優先度の高いワークに優先的にスレッドを割り当てるようにしているからである。 According to the present embodiment, in addition to the effect obtained in the first embodiment, it is possible to obtain an effect that the processing can be performed more efficiently. The reason is that threads are preferentially assigned to work having a high work priority.
本発明は、パケットの転送処理を行う通信装置に利用可能である。 The present invention can be used in a communication apparatus that performs packet transfer processing.
101…受信インタフェース部
102…送信インタフェース部
103a,103b…スイッチ部
111…受信コントロール部
112…送信コントロール部
120…ワークコントロール部
130…コア
131…スレッド
140…メインメモリ
150…マルチコアプロセッサー部
160…バスインタフェース
201…データパケット
210…パケットエレメントテーブル
211…ワークテーブル
220…パケットキュー群
221…ワークキュー群
230…パケット送信スケジューラー
231…ワークスケジューラー
401…処理待ちパケット出力キュー群
402…出力先振り分けパケットキュー
403…出力キュー群
501,501a…ワーク出力キュー群
502…出力先振り分けワークキュー
511,512,512a…ラウンドロビン機能部
101 ... Receiving interface section
102: Transmission interface
103a, 103b ... Switch part
111 ... Reception control section
112 ... Transmission control section
120… Work control section
130 ... Core
131 ... Thread
140 ... Main memory
150 ... multi-core processor
160 ... Bus interface
201 ... Data packet
210 ... Packet element table
211… Work table
220 ... Packet queue group
221 ... Work queue group
230 ... Packet transmission scheduler
231 ... Work scheduler
401: Processing packet output queue group
402: Output destination packet queue
403 ... Output queue group
501,501a ... Work output queue group
502: Output destination work queue
511,512,512a… Round robin function
Claims (13)
処理の完了したパケットがストアされる複数の出力キューと、
受信したパケットに対する処理を複数のサブワークに分割し、該各サブワークを前記プロセッサーコア上で実行されるスレッドに割り当てるワークコントロール部とを備え、
前記ワークコントロール部は、前記複数の出力キューの中に輻輳している出力キューが存在する場合は、該輻輳している出力キューをストア先にしているパケットに関連するサブワークについてはスレッドの割り当てを制限することを特徴とする通信装置。 Processor cores,
Multiple output queues where processed packets are stored;
A work control unit that divides the processing for the received packet into a plurality of sub-work, and assigns each sub-work to a thread executed on the processor core;
When there is a congested output queue among the plurality of output queues, the work control unit assigns a thread to a subwork related to a packet having the congested output queue as a store destination. A communication device characterized by restricting.
前記輻輳している出力キューは、使用率が第1の閾値を超える出力キューであることを特徴とする通信装置。 The communication device according to claim 1,
The communication device, wherein the congested output queue is an output queue whose usage rate exceeds a first threshold value.
前記サブワークに対するスレッドの割り当ての制限は、前記サブワークに対するスレッドの割り当てを禁止することであることを特徴とする通信装置。 The communication device according to claim 1 or 2,
The communication apparatus according to claim 1, wherein the limitation on the assignment of threads to the subwork is to prohibit the assignment of threads to the subwork.
前記サブワークに対するスレッドの割り当ての制限は、前記サブワークに対するスレッドの割り当て頻度を他のスレッドに比較して少なくすることであることを特徴とする通信装置。 The communication device according to claim 1 or 2,
The communication device is characterized in that the restriction on the assignment of threads to the subwork is to reduce the frequency of assignment of threads to the subwork compared to other threads.
前記出力キューにストアされているパケットは、そのパケットに関する全てのサブワークが完了した後、送出されることを特徴とする通信装置。 The communication apparatus according to any one of claims 1 to 4,
The communication apparatus is characterized in that the packet stored in the output queue is sent out after all sub-work related to the packet is completed.
前記ワークコントロール部は、前記複数のサブワークを前記プロセッサーコア上で実行されるスレッドに割り当てる際、優先度の高いサブワークから優先的にスレッドを割り当てることを特徴とする通信装置。 The communication apparatus according to any one of claims 1 to 5,
The work control unit, when assigning the plurality of sub-work to a thread executed on the processor core, preferentially assigns a thread from a sub-work having a high priority.
パケットのストア先にする出力キューを決定するサブワークの優先度を他のサブワークよりも高くすることを特徴とする通信装置。 The communication device according to claim 6.
A communication apparatus characterized in that the priority of a subwork for determining an output queue to be a packet storage destination is higher than that of other subwork.
前記出力キュー毎の処理待ちパケット出力キューであって、処理が未完了のパケットをストアし、処理が完了したパケットを自処理待ちパケット出力キューに対応する出力キューへ出力する処理待ちパケット出力キューを備え、
使用率が第2の閾値以上の処理待ちパケット出力キューに関連するサブワークの優先度を他のサブワークよりも高くすることを特徴とする通信装置。 The communication device according to claim 6.
A process waiting packet output queue for each output queue, which stores a process unfinished packet and outputs a process completed packet to an output queue corresponding to its own process waiting packet output queue. Prepared,
A communication apparatus characterized in that a priority of a subwork related to a processing-waiting packet output queue whose usage rate is equal to or higher than a second threshold is higher than that of other subwork.
前記プロセッサーコアは複数存在することを特徴とする通信装置。 The communication device according to any one of claims 1 to 8,
2. A communication apparatus comprising a plurality of the processor cores.
前記ワークコントロール部が、サブワークをプロセッサーコア上で実行される複数のスレッドの内の何れかに割り当てる際、処理が完了したパケットがストアされる複数の出力キューの中に輻輳している出力キューが存在する場合は、該輻輳している出力キューをストア先にしているパケットに関連するサブワークについてはスレッドの割り当てを制限する第2のステップとを含むことを特徴とする通信方法。 A first step in which the work control unit divides the processing for the received packet into a plurality of sub-work;
When the work control unit assigns a sub work to any one of a plurality of threads executed on the processor core, an output queue that is congested in a plurality of output queues in which processed packets are stored A sub-work related to a packet that stores the congested output queue as a store destination, the second step of restricting thread allocation.
前記輻輳している出力キューは、使用率が第1の閾値を超える出力キューであることを特徴とする通信方法。 The communication method according to claim 10,
The communication method, wherein the congested output queue is an output queue whose usage rate exceeds a first threshold value.
前記サブワークに対するスレッドの割り当ての制限は、前記サブワークに対するスレッドの割り当てを禁止することであることを特徴とする通信方法。 The communication method according to claim 10 or 11,
The communication method according to claim 1, wherein the limitation on the assignment of threads to the subwork is to prohibit the assignment of threads to the subwork.
前記サブワークに対するスレッドの割り当ての制限は、前記サブワークに対するスレッドの割り当て頻度を他のスレッドに比較して少なくすることであることを特徴とする通信方法。 The communication method according to claim 10 or 11,
The communication method is characterized in that the limitation of the thread allocation to the subwork is to reduce the frequency of thread allocation to the subwork as compared to other threads.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009069400A JP2010226275A (en) | 2009-03-23 | 2009-03-23 | Communication equipment and communication method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009069400A JP2010226275A (en) | 2009-03-23 | 2009-03-23 | Communication equipment and communication method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010226275A true JP2010226275A (en) | 2010-10-07 |
Family
ID=43043014
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009069400A Withdrawn JP2010226275A (en) | 2009-03-23 | 2009-03-23 | Communication equipment and communication method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010226275A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107729267A (en) * | 2011-05-20 | 2018-02-23 | 英特尔公司 | The scattered distribution of resource and the interconnection structure for support by multiple engine execute instruction sequences |
KR20180094369A (en) * | 2017-02-15 | 2018-08-23 | 주식회사 시큐아이 | Network device and interrupt management method of the network device |
US10740126B2 (en) | 2013-03-15 | 2020-08-11 | Intel Corporation | Methods, systems and apparatus for supporting wide and efficient front-end operation with guest-architecture emulation |
CN113419871A (en) * | 2021-06-21 | 2021-09-21 | Oppo广东移动通信有限公司 | Object processing method based on synchronous slot and related product |
US11163720B2 (en) | 2006-04-12 | 2021-11-02 | Intel Corporation | Apparatus and method for processing an instruction matrix specifying parallel and dependent operations |
US11204769B2 (en) | 2011-03-25 | 2021-12-21 | Intel Corporation | Memory fragments for supporting code block execution by using virtual cores instantiated by partitionable engines |
US11656875B2 (en) | 2013-03-15 | 2023-05-23 | Intel Corporation | Method and system for instruction block to execution unit grouping |
-
2009
- 2009-03-23 JP JP2009069400A patent/JP2010226275A/en not_active Withdrawn
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11163720B2 (en) | 2006-04-12 | 2021-11-02 | Intel Corporation | Apparatus and method for processing an instruction matrix specifying parallel and dependent operations |
US11204769B2 (en) | 2011-03-25 | 2021-12-21 | Intel Corporation | Memory fragments for supporting code block execution by using virtual cores instantiated by partitionable engines |
CN107729267A (en) * | 2011-05-20 | 2018-02-23 | 英特尔公司 | The scattered distribution of resource and the interconnection structure for support by multiple engine execute instruction sequences |
CN107729267B (en) * | 2011-05-20 | 2022-01-25 | 英特尔公司 | Distributed allocation of resources and interconnect structure for supporting execution of instruction sequences by multiple engines |
US10740126B2 (en) | 2013-03-15 | 2020-08-11 | Intel Corporation | Methods, systems and apparatus for supporting wide and efficient front-end operation with guest-architecture emulation |
US11656875B2 (en) | 2013-03-15 | 2023-05-23 | Intel Corporation | Method and system for instruction block to execution unit grouping |
KR20180094369A (en) * | 2017-02-15 | 2018-08-23 | 주식회사 시큐아이 | Network device and interrupt management method of the network device |
KR101912393B1 (en) * | 2017-02-15 | 2018-10-26 | 주식회사 시큐아이 | Network device and interrupt management method of the network device |
CN113419871A (en) * | 2021-06-21 | 2021-09-21 | Oppo广东移动通信有限公司 | Object processing method based on synchronous slot and related product |
CN113419871B (en) * | 2021-06-21 | 2023-01-31 | Oppo广东移动通信有限公司 | Object processing method based on synchronous groove and related product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11962490B2 (en) | Systems and methods for per traffic class routing | |
US10530846B2 (en) | Scheduling packets to destination virtual machines based on identified deep flow | |
US9244880B2 (en) | Automatic construction of deadlock free interconnects | |
CN108965132B (en) | A method and device for selecting a path | |
US9154442B2 (en) | Concurrent linked-list traversal for real-time hash processing in multi-core, multi-thread network processors | |
JP5603481B2 (en) | Relay device | |
JP5931908B2 (en) | Techniques for managing traffic in routers | |
JP2010226275A (en) | Communication equipment and communication method | |
CN112084027B (en) | On-chip network data transmission method, device, on-chip network, equipment and medium | |
US8149846B2 (en) | Data processing system and method | |
CN105511954A (en) | Method and device for message processing | |
JP2016195375A (en) | Method and apparatus for using multiple linked memory lists | |
TW201001975A (en) | Network system with quality of service management and associated management method | |
KR101639797B1 (en) | Network interface apparatus and method for processing virtual machine packets | |
CN107797848A (en) | Process scheduling method, device and host device | |
CN111756586A (en) | A priority queue-based fair bandwidth allocation method, switch and readable storage medium in a data center network | |
JP6069913B2 (en) | Information processing system, information processing system control method, and control program | |
EP2912811B1 (en) | Traffic engineering system for preventing demand deadlock and achieving uniform link utilization | |
JP2004046372A (en) | Distributed processing system, resource allocation method and program, and recording medium on which resource allocation program is recorded | |
JP5704567B2 (en) | Node device, system, and packet processing method | |
CN118433093A (en) | Multipath routing selection method, device, electronic device and storage medium | |
CN104360843A (en) | Priority-based JMS (java messaging service) message scheduling method in SOA (service-oriented architecture) system | |
WO2022088074A1 (en) | Instruction processing method based on multiple instruction engines, and processor | |
US10341246B1 (en) | Update packet sequence number packet ready command | |
CN115242727B (en) | User request processing method, device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20120605 |