[go: up one dir, main page]

JP4772648B2 - Data receiving method, data receiving apparatus and computer system - Google Patents

Data receiving method, data receiving apparatus and computer system Download PDF

Info

Publication number
JP4772648B2
JP4772648B2 JP2006313769A JP2006313769A JP4772648B2 JP 4772648 B2 JP4772648 B2 JP 4772648B2 JP 2006313769 A JP2006313769 A JP 2006313769A JP 2006313769 A JP2006313769 A JP 2006313769A JP 4772648 B2 JP4772648 B2 JP 4772648B2
Authority
JP
Japan
Prior art keywords
data
page
page offset
offset
computer system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2006313769A
Other languages
Japanese (ja)
Other versions
JP2008129832A (en
Inventor
充 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2006313769A priority Critical patent/JP4772648B2/en
Publication of JP2008129832A publication Critical patent/JP2008129832A/en
Application granted granted Critical
Publication of JP4772648B2 publication Critical patent/JP4772648B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Bus Control (AREA)

Description

本発明は、データ受信装置とコンピュータシステムとで構成されるシステムで実行されるデータ受信方法と、そのデータ受信方法の実現に用いられるデータ受信装置及びコンピュータシステムとに関し、特に、高価なハードウェアを用意したりプログラムを書き換えることなく、コンピュータシステムが外部から高速にデータを受け取ることができるようにすることを実現するデータ受信方法と、そのデータ受信方法の実現に用いられるデータ受信装置及びコンピュータシステムとに関する。   The present invention relates to a data receiving method executed in a system constituted by a data receiving device and a computer system, and a data receiving device and a computer system used for realizing the data receiving method, and particularly to expensive hardware. A data receiving method for realizing that a computer system can receive data at high speed from outside without preparing or rewriting a program, and a data receiving apparatus and a computer system used for realizing the data receiving method, About.

現在のコンピュータシステムにおいて、外部とのデータのやりとりを高速に行うことはシステム全体の高速化につながる重要な課題である。特に、パーソナルコンピュータなどの小さなコンピュータシステムをネットワークで接続して、全体として大きなひとつのコンピュータシステムとして使用するクラスタシステムなどでは、ネットワークを介したデータ伝送がシステム全体の計算速度を決める重要な要素となっている。   In today's computer systems, high-speed data exchange with the outside is an important issue that leads to high speed of the entire system. Especially in a cluster system where small computer systems such as personal computers are connected via a network and used as one large computer system as a whole, data transmission via the network is an important factor that determines the calculation speed of the entire system. ing.

このため、コンピュータシステムのデータ通信性能は年々向上しており、ここのところの約3年で2倍のペースで通信速度が上がっている。これはコンピュータの演算装置の速度向上を上回る勢いである。   For this reason, the data communication performance of the computer system has been improving year by year, and the communication speed has increased at a double rate in about three years here. This is faster than the speed of computer computing devices.

このようにデータ通信速度が速くなってくると、従来ではほとんど問題にならなかった受信データの取り扱い速度が非常に重要な課題となる。   As the data communication speed increases, the handling speed of received data, which has hardly been a problem in the past, becomes a very important issue.

従来ではネットワークからデータがやってくる速度に比べて演算装置の性能が非常に高かったため、受信したデータに対して複雑な処理を行ってもほとんどオーバーヘッドにはならなかった。   Conventionally, the performance of a computing device is very high compared to the speed at which data arrives from the network, so even if complex processing is performed on received data, there is almost no overhead.

しかしながら現在ではその関係が崩れ、コンピュータシステムが受信データを処理するのに手一杯という状況が頻繁に生じている。   At present, however, the relationship is broken, and there are frequent situations where the computer system is full of processing received data.

これではデータ受信の速度を低下させてしまうだけでなく、本来ならばこのコンピュータシステム上で処理できたはずの計算が処理できなくなってしまうといった副次的な性能低下を引き落とし、システム全体の性能を大幅に低下させてしまう重要な問題である。   This not only reduces the speed of data reception, but also subtracts the secondary performance degradation that would otherwise prevent processing that would have been possible on this computer system. It is an important problem that will greatly reduce it.

このような問題に対処するために、Protocol Offloading やRemote DMAなどといった新しい技術が開発されてきた。   In order to deal with such problems, new technologies such as Protocol Offloading and Remote DMA have been developed.

Protocol Offloading は、従来オペレーティングシステム(OS)が行っていたデータ受信処理の一部をハードウェアに実装し、ネットワークインタフェースカード(NIC)に搭載してしまう手法である。これによって、コンピュータシステム本体は、これまで外部からデータを受信した際に行っていた処理をせずに済み、負担が軽くなる。   Protocol Offloading is a technique in which a part of data reception processing that is conventionally performed by an operating system (OS) is mounted on hardware and mounted on a network interface card (NIC). As a result, the computer system body does not need to perform the processing that has been performed when data is received from the outside, and the burden is reduced.

しかしながら、このProtocol Offloading では、
1.コンピュータシステムが行っていた処理をまかなえるだけの、高速で複雑な処理が できるハードウェアを用意しなくてはならない
2.ソフトウェアは年々進化しており、OSの処理も年々変化しているので、ハードウ ェアではその変化に追従することができない
という問題点がある。
However, in this Protocol Offloading,
1. 1. Hardware that can perform high-speed and complex processing that can handle the processing that the computer system has performed must be prepared. Since software is evolving year by year and OS processing is also changing year by year, there is a problem that the hardware cannot follow the change.

一方、Remote DMAはこれらの問題点を解決する手段を提供する。Remote DMAは通信の方式を大幅に変更し、従来オペレーティングシステムが介在して複雑に処理しなければ受信できなかったデータを直接やり取りできるようにするものである。   On the other hand, Remote DMA provides a means to solve these problems. Remote DMA greatly changes the communication method, and allows data that could not be received without complicated processing to be exchanged directly by an operating system.

しかしながら、Remote DMAを用いるためには、Remote DMAに対応したハードウェアを用意し、Remote DMA用にプログラムを書き直す必要がある。そのため、一般にはなかなか普及していないというのが実情である。   However, in order to use Remote DMA, it is necessary to prepare hardware corresponding to Remote DMA and rewrite the program for Remote DMA. For this reason, in general, it is not so popular.

ここで、下記に示す特許文献1には、本発明に関連する発明として、物理アドレス上で連続しているページ間のページ境界を越えた高速のDMA転送を行うDMA制御装置が提案されている。
特開平11−184797号公報
Here, Patent Document 1 shown below proposes a DMA controller that performs high-speed DMA transfer across page boundaries between pages that are consecutive on a physical address as an invention related to the present invention. .
Japanese Patent Laid-Open No. 11-184797

このように、従来技術の問題点を解決するために、Protocol Offloading やRemote DMAなどといった新しい技術が開発されてきた。   Thus, in order to solve the problems of the prior art, new technologies such as Protocol Offloading and Remote DMA have been developed.

しかしながら、Protocol Offloading では、高価なハードウェアを用意しなければならないという問題点がある。また、Remote DMAでは、Remote DMAに対応したハードウェアを用意しなければならないという問題点があるとともに、Remote DMA用にプログラムを書き直す必要があるという問題点がある。   However, Protocol Offloading has a problem that expensive hardware must be prepared. In addition, Remote DMA has a problem that it is necessary to prepare hardware corresponding to Remote DMA, and there is a problem that it is necessary to rewrite a program for Remote DMA.

これから、高価なハードウェアを用意したりプログラムを書き換えることなく、コンピュータシステムが高速にデータを受信できるようにする新たな技術を構築する必要がある。   From now on, it is necessary to construct a new technology that enables a computer system to receive data at high speed without preparing expensive hardware or rewriting a program.

一方、OSが介在するデータ通信では、一般に、
ステップ1:外部からNICパケットが到達する
ステップ2:NICはあらかじめOSから指定された領域にパケットを転送し、転送し たことをOSに通知する
ステップ3.OSは転送されてきたパケット情報を解析し、最終的な宛先を決定する
ステップ4.最終的な宛先が使用されているデータ領域に、パケットに格納されている データをコピーする
というステップでデータ受信処理が行われる。
On the other hand, in data communication involving an OS,
Step 1: NIC packet arrives from outside Step 2: The NIC forwards the packet to the area designated in advance by the OS and notifies the OS that it has been forwarded. 3. The OS analyzes the transferred packet information and determines the final destination. Data reception processing is performed by copying the data stored in the packet to the data area where the final destination is used.

これらのステップの内、ステップ2の処理は外部からデータを受信する上で必要不可欠な操作である。そのため、工夫の余地があるとすればステップ3あるいはステップ4の処理である。特に重要と考えられるのがステップ4である。   Of these steps, the process of step 2 is an indispensable operation for receiving data from the outside. Therefore, if there is room for contrivance, the process of step 3 or step 4 is performed. Step 4 is considered to be particularly important.

ステップ4で実行するデータのコピー操作は、現在のプロセッサでは非常に重い処理のひとつである。それはいくらプロセッサの内部が高速化されても、メモリの速度はそれほど高速化されておらず、メモリアクセスを伴った操作は非常に時間のかかるものだからである。また、メモリは無限の速度を持っているわけではないので、メモリアクセスのための帯域には上限がある。データコピーの操作は、メモリからデータをいったん読み出し、別の場所に書き込む操作であるので、メモリに対する負荷が高く、メモリ帯域を無駄遣いしてしまう。この操作によって、他のメモリをアクセスする処理が滞ってしまうこともある。   The data copy operation executed in step 4 is one of very heavy processes in the current processor. This is because no matter how fast the processor is accelerated, the speed of the memory is not so high, and operations involving memory access are very time consuming. Also, since the memory does not have an infinite speed, there is an upper limit on the bandwidth for memory access. Since the data copy operation is an operation of once reading data from the memory and writing it to another location, the load on the memory is high and the memory bandwidth is wasted. By this operation, processing for accessing other memories may be delayed.

また、データのコピーはデータが増えれば増えるほど多くなっていく。したがって、データ通信速度が向上すると、それにしたがってデータコピー処理が重くなっていく。ステップ3で行うパケット情報の解析処理などは、パケットサイズを大きくしたり、ヘッダ情報をキャッシュにのせるなどの工夫により高速化が可能である。しかしながら、巨大なデータを扱うステップ4の処理では、そのような工夫はできにくい。   Also, the number of data copies increases as the data increases. Therefore, as the data communication speed is improved, the data copy process becomes heavier accordingly. The packet information analysis processing performed in step 3 can be speeded up by increasing the packet size or placing header information in a cache. However, in the process of step 4 for handling huge data, it is difficult to make such a device.

このようなステップ4の操作を高速化するために、ページマップの切り替えという手法を用いることが考えられる。   In order to speed up the operation in step 4 as described above, it is conceivable to use a technique called page map switching.

ページマップとは仮想記憶空間の実現に用いられるアドレス変換のためのテーブルである。ページマップには論理的なアドレスと物理的なアドレスとの組が記述されている。プログラムから論理アドレスAのデータを参照する要求があると、プロセッサはページマップを参照して、論理アドレスAに対応する物理アドレスA’を取り出す。そして、メモリの物理アドレスA’のデータを読み出し、これを論理アドレスAに対応するデータとしてプログラムに渡す。   A page map is a table for address conversion used for realizing a virtual storage space. The page map describes a set of logical addresses and physical addresses. When there is a request for referring to the data of the logical address A from the program, the processor refers to the page map and extracts the physical address A ′ corresponding to the logical address A. Then, the data at the physical address A 'of the memory is read out and transferred to the program as data corresponding to the logical address A.

この機構を用いると、データの移動をコピーなしに実現することができる。例えば、論理アドレスBに対して物理アドレスB’が対応しており、論理アドレスCに対して物理アドレスC’が対応していたとする。論理アドレスCから論理アドレスBへデータを移動しようとした場合、ページマップを書き替えて論理アドレスと物理アドレスとの対応関係を、「B→C’,C→B’」に変更してしまう。このようにすると、論理アドレスBのデータを参照すると、これまで論理アドレスCに格納されていたデータが参照できることになる。   By using this mechanism, data movement can be realized without copying. For example, it is assumed that the physical address B ′ corresponds to the logical address B, and the physical address C ′ corresponds to the logical address C. When data is moved from the logical address C to the logical address B, the page map is rewritten to change the correspondence between the logical address and the physical address from “B → C ′, C → B ′”. In this way, when the data at the logical address B is referred to, the data stored at the logical address C can be referred to so far.

なお、ページマップはアドレスひとつごとに用意されているのではなくて、ページと呼ばれるひとまとまりのデータ単位ごとに管理されている。例えば、広く用いられているIntel社のIA32プロセッサでは、このページサイズが4KBとなっている。   The page map is not prepared for each address, but is managed for each unit of data called a page. For example, in the widely used Intel IA32 processor, the page size is 4 KB.

ページマップの切り替えを用いるデータの移動はページ単位でなくてはならないために、利用できる状況が限定される。   Since data movement using page map switching must be performed in units of pages, the available situations are limited.

例えば、論理アドレス0x10000000番地から始まる4KB(=0x1000B)のデータを、論理アドレス0x20000000番地からの4KBという領域へ移動する場合には、論理アドレス0x20000000番地に対応するページマップを、現在論理アドレス0x10000000番地に対応している物理アドレスに関連付けるように書き替えればよい。   For example, when data of 4 KB (= 0x1000B) starting from the logical address 0x10000000 is moved to an area of 4 KB from the logical address 0x20000000, the page map corresponding to the logical address 0x20000000 is moved to the current logical address 0x10000000. What is necessary is just to rewrite so that it may associate with the corresponding physical address.

しかし、例えば、移動先が論理アドレス0x20000100番地になると、移動先の領域が論理アドレス0x20000000番地から始まるページと、論理アドレス0x20001000番地から始まるページとにまたがってしまうため、ページマップの書き替えではうまく対応付けることができない。この場合には、データをコピーしなくてはならない。   However, for example, if the destination is the logical address 0x20000100, the destination area will span the page starting from the logical address 0x20000000 and the page starting from the logical address 0x20001000. I can't. In this case, the data must be copied.

これを言い換えると、データのページオフセット(この例では、転送元が0x000 で、転送先が0x100)が一致していないと、ページマップの書き替えによるデータ移動は利用できない、ということになる。   In other words, if the page offset of the data (in this example, the transfer source is 0x000 and the transfer destination is 0x100) does not match, the data movement by rewriting the page map cannot be used.

これから、前述したようなステップ1〜ステップ4の処理を実行するOSが介在するデータ通信において、そのステップ4で、単純に、ページマップの書き替えによるデータ移動を利用することはできない。   From now on, in the data communication involving the OS that executes the processing of Step 1 to Step 4 as described above, it is not possible to simply use data movement by rewriting the page map in Step 4.

そこで、本発明では、前述したようなステップ1〜ステップ4の処理を実行するOSが介在するデータ通信において、受信したデータをOSが一時的に用意したメモリ領域からアプリケーションプログラムが実際に使用するメモリ領域へデータ転送する際に、ページマップの書き替えによるデータ移動を利用できる状況を多く作り出すことで、それによる高速なデータ転送を実現し、これにより、高価なハードウェアを用意したりプログラムを書き換えることなく、コンピュータシステムが外部から高速にデータを受け取ることができるようにする新たなデータ受信技術の提供を目的とする。   Therefore, in the present invention, in the data communication involving the OS that executes the processing of step 1 to step 4 as described above, the memory actually used by the application program from the memory area in which the OS temporarily prepares the received data. When transferring data to an area, by creating many situations where data movement by rewriting the page map can be used, high-speed data transfer can be realized, thereby preparing expensive hardware and rewriting programs It is an object of the present invention to provide a new data receiving technique that enables a computer system to receive data from outside at high speed.

この目的を達成するために、本発明では、コンピュータシステムに付随して設けられて、外部から送られてくるデータを受信してコンピュータシステム内のメモリに一時的に保存するデータ受信装置と、データ受信装置から転送されてくるデータを受信して、それをメモリに一時的に保存してから、アプリケーションプログラムの管理するアプリケーション用メモリ領域へ転送するコンピュータシステムとで構成されるときに、データ受信装置とコンピュータシステムとが以下のような構成を採る。   In order to achieve this object, according to the present invention, a data receiving device that is attached to a computer system, receives data sent from the outside, and temporarily stores it in a memory in the computer system; A data receiving device configured with a computer system that receives data transferred from a receiving device, temporarily stores the data in a memory, and then transfers the data to an application memory area managed by an application program The computer system has the following configuration.

〔1〕本発明のデータ受信装置の構成
本発明のデータ受信装置は、(イ)外部から送られてくるデータを受信するときに、アプリケーション用メモリ領域のページオフセットを予測する予測手段と、(ロ)メモリ上のデータ転送先ページの先頭アドレスと予測手段の予測したページオフセットとにより規定されるデータ格納開始アドレスを指定して、受信したデータをメモリに転送する転送手段と、(ハ)受信したデータの長さと予測手段の予測したページオフセットとに基づいて、次回のデータ受信の際に用いるページオフセットの予測値を設定する設定手段と、(ニ)コンピュータシステムから予測手段の予測したページオフセットの予測値について予測誤りの通知があるときに、設定手段の設定したページオフセットの予測値をコンピュータシステムから通知されるページオフセットに従って変更する変更手段とを備えるように構成する。
[1] Configuration of Data Receiving Device of the Present Invention The data receiving device of the present invention comprises (a) a predicting means for predicting a page offset of an application memory area when receiving data sent from the outside; (B) a transfer means for transferring the received data to the memory by designating a data storage start address specified by the top address of the data transfer destination page on the memory and the page offset predicted by the prediction means; Setting means for setting a predicted value of the page offset used in the next data reception based on the length of the data and the predicted page offset of the prediction means, and (d) a page offset predicted by the prediction means from the computer system When there is a notification of a prediction error for the predicted value, the predicted value of the page offset set by the setting means is compiled. And changing means for changing according to the page offset notified from the computer system.

この構成を採るときに、送信元情報及び送信先情報に対応付けて、設定手段の設定したページオフセットの予測値を記憶する第1の記憶手段を備えることがあり、この第1の記憶手段を備える場合には、予測手段は、データを受信するときに、その受信データの送信元情報及び送信先情報を抽出して、その抽出した送信元情報及び送信先情報をキーにして第1の記憶手段の記憶情報を参照することでページオフセットを予測するように処理する。   When adopting this configuration, a first storage unit that stores the predicted value of the page offset set by the setting unit in association with the transmission source information and the transmission destination information may be provided. In the case of providing, when receiving the data, the predicting means extracts the transmission source information and the transmission destination information of the received data, and uses the extracted transmission source information and the transmission destination information as a key for the first storage. Processing is performed so as to predict the page offset by referring to the storage information of the means.

このとき、さらに、コンピュータシステムから通知されるページオフセットの初期値に従って、第1の記憶手段に対して、ページオフセットの予測値を初期登録する初期登録手段を備えることがある。   At this time, there may be further provided initial registration means for initially registering the predicted value of the page offset in the first storage means in accordance with the initial value of the page offset notified from the computer system.

また、この構成を採るときに、送信元情報及び送信先情報に対応付けて、固定のページオフセットを用いるのか否かということと、固定のページオフセットを用いるものについては固定のページオフセットを記憶し、固定のページオフセットを用いないものについては、設定手段の設定したページオフセットの予測値を記憶する第2の記憶手段を備えることがあり、この第2の記憶手段を備える場合には、予測手段は、データを受信するときに、その受信データの送信元情報及び送信先情報を抽出して、その抽出した送信元情報及び送信先情報をキーにして第2の記憶手段の記憶情報を参照することでページオフセットを予測するように処理する。   In addition, when adopting this configuration, whether or not to use a fixed page offset in association with the transmission source information and the transmission destination information, and a fixed page offset for those using a fixed page offset are stored. For those that do not use a fixed page offset, there may be provided a second storage means for storing the predicted value of the page offset set by the setting means, and if this second storage means is provided, the prediction means When data is received, the source information and destination information of the received data are extracted, and the stored information in the second storage means is referenced using the extracted source information and destination information as a key. To process the page offset.

このとき、さらに、コンピュータシステムから通知される固定のページオフセットの値に従って、第2の記憶手段に対して、固定のページオフセットの値を登録する登録手段を備えることがあり、また、コンピュータシステムから通知されるページオフセットの初期値に従って、第2の記憶手段に対して、ページオフセットの予測値を初期登録する初期登録手段を備えることがある。   At this time, it may further comprise registration means for registering the fixed page offset value in the second storage means in accordance with the fixed page offset value notified from the computer system. There may be provided initial registration means for initially registering the predicted value of the page offset in the second storage means in accordance with the notified initial value of the page offset.

この第2の記憶手段を備える理由は以下の通りである。   The reason why the second storage means is provided is as follows.

すなわち、コンピュータシステムは、ループ処理などがある場合には、アプリケーション用メモリ領域の同じ場所に何度も小さなデータを受信していくことがある。   That is, when there is a loop process or the like, the computer system may receive small data many times at the same location in the application memory area.

このような場合に、第1の記憶手段を用いていると、予測するページオフセットが同じであるにもかかわらず、その都度、第1の記憶手段に対して同じページオフセットの予測値を書き込むという処理を繰り返すことになる。これに対して、第2の記憶手段を用いれば、そのような不都合な処理を行わなくも済むようになるからである。   In such a case, if the first storage means is used, the predicted value of the same page offset is written to the first storage means every time even though the predicted page offset is the same. The process will be repeated. On the other hand, if the second storage means is used, it is not necessary to perform such inconvenient processing.

〔2〕本発明のコンピュータシステムの構成
本発明のコンピュータシステムは、(イ)データ受信装置からデータ転送の際に指定されるデータ格納開始アドレスに基づいて、データ受信装置の予測したページオフセットを特定する第1の特定手段と、(ロ)メモリに格納したデータを解析することで、そのデータの転送先となるアプリケーション用メモリ領域のページオフセットを特定する第2の特定手段と、(ハ)第1の特定手段の特定したページオフセットと第2の特定手段の特定したページオフセットとが一致するのか否かを判断する判断手段と、(ニ)判断手段が2つのページオフセットの不一致を判断するときに、第2の特定手段の特定したページオフセットとメモリに格納したデータの長さとに基づいて、データ転送後におけるアプリケーション用メモリ領域のページオフセットを特定して、データ受信装置に通知する第1の通知手段と、(ホ)判断手段の判断結果に基づいて、メモリからアプリケーション用メモリ領域へのデータ転送方法を決定する決定手段とを備えるように構成する。
[2] Configuration of the computer system of the present invention The computer system of the present invention specifies (a) the page offset predicted by the data receiving device based on the data storage start address specified at the time of data transfer from the data receiving device. (B) second specifying means for specifying the page offset of the application memory area to which the data is transferred by analyzing the data stored in the memory; Determining means for determining whether or not the page offset specified by the first specifying means and the page offset specified by the second specifying means match; and (d) when the determining means determines a mismatch between the two page offsets. In addition, based on the page offset specified by the second specifying means and the length of the data stored in the memory, The first notification means for specifying the page offset of the application memory area and notifying the data receiving device, and (e) determining the data transfer method from the memory to the application memory area based on the determination result of the determination means And determining means for performing the above-described operation.

この構成を採るときに、データ受信装置に対して、ページオフセットの予測値の初期値を通知する第2の通知手段を備えたり、データ受信装置に対して、固定のページオフセットの値を通知する第3の通知手段を備えることがある。   When adopting this configuration, the data receiving apparatus is provided with a second notification means for notifying the initial value of the predicted value of the page offset, or the fixed value of the page offset is notified to the data receiving apparatus. Third notification means may be provided.

〔3〕本発明の処理について
本発明のデータ受信装置は、外部から送られてくるデータを受信すると、最終的なデータ転送先となるアプリケーション用メモリ領域のページオフセットを予測して、メモリ上のデータ転送先ページの先頭アドレスとその予測したページオフセットとにより規定されるデータ格納開始アドレスを指定して、受信したデータをメモリに転送するとともに、受信したデータの長さとその予測したページオフセットとに基づいて、次回のデータ受信の際に用いるページオフセットの予測値を設定する。
[3] Processing of the present invention When the data receiving apparatus of the present invention receives data sent from the outside, the data receiving apparatus predicts the page offset of the application memory area as the final data transfer destination, and stores it on the memory. Specify the data storage start address specified by the start address of the data transfer destination page and its predicted page offset, transfer the received data to the memory, and set the length of the received data and its predicted page offset. Based on this, a predicted value of the page offset to be used at the next data reception is set.

このデータ転送を受けて、本発明のコンピュータシステムは、転送されてきたデータを受信して、そのデータ転送の際に指定されるデータ格納開始アドレスを起点として、受信したデータをメモリに格納する。   Upon receiving this data transfer, the computer system of the present invention receives the transferred data, and stores the received data in the memory starting from the data storage start address designated at the time of the data transfer.

続いて、そのデータ格納開始アドレスに基づいて、本発明のデータ受信装置の予測したページオフセットを特定するとともに、メモリに格納したデータを解析することで、そのデータの転送先となるアプリケーション用メモリ領域のページオフセットを特定して、その特定した2つのページオフセットが一致するのか否かを判断する。   Subsequently, based on the data storage start address, the page offset predicted by the data receiving apparatus of the present invention is specified, and the data stored in the memory is analyzed, so that the application memory area to which the data is transferred The page offset is specified, and it is determined whether or not the two specified page offsets match.

続いて、その判断結果に基づいて、メモリからアプリケーション用メモリ領域へのデータ転送方法を決定する。   Subsequently, a data transfer method from the memory to the application memory area is determined based on the determination result.

具体的には、2つのページオフセットの不一致を判断するときには、データコピー操作に従ってデータ転送を行うことを決定し、2つのページオフセットの一致を判断するときには、ページマップ切り替え可能なページのデータについてはページマップ切り替え操作によってデータ転送を行い、それ以外のページのデータについてはデータコピー操作に従ってデータ転送を行うことを決定する。   Specifically, when determining the mismatch between two page offsets, it is determined to perform data transfer according to the data copy operation, and when determining whether the two page offsets match, the page map switchable page data is determined. Data transfer is performed by the page map switching operation, and it is determined that data transfer is performed according to the data copy operation for data of other pages.

続いて、2つのページオフセットの不一致を判断するときには、特定したアプリケーション用メモリ領域のページオフセットとメモリに格納したデータの長さとに基づいて、データ転送後におけるアプリケーション用メモリ領域のページオフセットを特定して、それを本発明のデータ受信装置に通知する。   Subsequently, when determining the mismatch between the two page offsets, the page offset of the application memory area after the data transfer is specified based on the page offset of the specified application memory area and the length of the data stored in the memory. This is notified to the data receiving apparatus of the present invention.

このページオフセットの通知を受けて、本発明のデータ受信装置は、予測したページオフセットに誤りがあることで、設定したページオフセットの予測値(次回のデータ受信の際に用いるページオフセットの予測値)についても誤りであることを判断して、本発明のコンピュータシステムから通知されるページオフセットに従って、その設定したページオフセットの予測値を変更する。   Upon receiving the notification of the page offset, the data receiving apparatus according to the present invention sets the predicted value of the set page offset (the predicted value of the page offset used at the next data reception) because the predicted page offset has an error. Is also determined to be an error, and the predicted value of the set page offset is changed according to the page offset notified from the computer system of the present invention.

〔4〕本発明の具体的な処理例
次に、転送されてくるデータがパケットであることを想定して、この本発明の処理について具体的に説明する。
[4] Specific Processing Example of the Present Invention Next, assuming that the transferred data is a packet, the processing of the present invention will be specifically described.

例えば、1ページの長さが0x1000で、外部から送られてくるパケットの長さが0x2800(2.5ページ分)で、本発明のデータ受信装置が一番初めに予測するアプリケーション用メモリ領域のページオフセットの予測値が0ページであることを仮定する。   For example, when the length of one page is 0x1000 and the length of a packet sent from the outside is 0x2800 (2.5 pages), the data reception device of the present invention predicts the application memory area first. Assume that the predicted value of page offset is 0 pages.

これから、本発明のデータ受信装置は、本発明のコンピュータシステムからページオフセットの予測誤りが通知されない場合には、
0ページ→0.5ページ→0ページ→0.5ページ→0ページ→・・・・・・
というように、アプリケーション用メモリ領域のページオフセットを予測していくことになる。
From this, the data receiving apparatus of the present invention is not notified of a page offset prediction error from the computer system of the present invention,
0 page → 0.5 page → 0 page → 0.5 page → 0 page →
Thus, the page offset of the application memory area is predicted.

(i)この場合にあって、さらに、アプリケーション用メモリ領域の先頭ページの実際のページオフセットが0ページであるとし、このとき、パケットがロスすることなく順番通りに転送されてくる場合には、図1に示すように、最初から、本発明のデータ受信装置の予測するアプリケーション用メモリ領域のページオフセットとアプリケーション用メモリ領域の実際のページオフセットとが一致することで、ページマップ切り替え操作を利用することによって、メモリからアプリケーション用メモリ領域へ高速にデータを移動できることになる。   (I) In this case, it is further assumed that the actual page offset of the first page of the application memory area is 0 page. At this time, when packets are transferred in order without loss, As shown in FIG. 1, the page map switching operation is used from the beginning when the page offset of the application memory area predicted by the data receiving apparatus of the present invention matches the actual page offset of the application memory area. As a result, data can be moved from the memory to the application memory area at high speed.

(ii)一方、この場合にあって、さらに、アプリケーション用メモリ領域の先頭ページの実際のページオフセットが0.5ページであるとし、このとき、パケットがロスすることなく順番通りに転送されてくる場合には、図2に示すように、最初だけ、本発明のデータ受信装置の予測するアプリケーション用メモリ領域のページオフセットとアプリケーション用メモリ領域の実際のページオフセットとが不一致となり、これにより、ページオフセットの予測の修正が行われ、それ以降、本発明のデータ受信装置の予測するアプリケーション用メモリ領域のページオフセットとアプリケーション用メモリ領域の実際のページオフセットとが一致することで、ページマップ切り替え操作を利用することによって、メモリからアプリケーション用メモリ領域へ高速にデータを移動できることになる。   (Ii) On the other hand, in this case, it is further assumed that the actual page offset of the first page of the application memory area is 0.5 page. At this time, packets are transferred in order without loss. In this case, as shown in FIG. 2, the page offset of the application memory area predicted by the data receiving apparatus of the present invention does not match the actual page offset of the application memory area only at the beginning. After that, the page offset switching operation is used when the page offset of the application memory area predicted by the data receiving apparatus of the present invention matches the actual page offset of the application memory area. Application memory from the memory It becomes possible to move data at high speed from re region.

(iii)一方、この場合にあって、さらに、アプリケーション用メモリ領域の先頭ページの実際のページオフセットが0ページであるとし、このとき、パケットがロスしたり順番通りに転送されてこない場合には、図3に示すように、その時点において、本発明のデータ受信装置の予測するメモリのページオフセットとアプリケーション用メモリ領域の実際のページオフセットとが不一致となり、これにより、ページオフセットの予測の修正が行われ、それ以降、本発明のデータ受信装置の予測するメモリのページオフセットとアプリケーション用メモリ領域の実際のページオフセットとが一致することで、ページマップ切り替え操作を利用することによって、メモリからアプリケーション用メモリ領域へ高速にデータを移動できることになる。   (Iii) On the other hand, in this case, it is further assumed that the actual page offset of the first page of the application memory area is 0 page. At this time, if packets are lost or not transferred in order As shown in FIG. 3, at that time, the page offset of the memory predicted by the data receiving apparatus of the present invention and the actual page offset of the application memory area are inconsistent, thereby correcting the prediction of the page offset. After that, the page offset of the memory predicted by the data receiving apparatus of the present invention and the actual page offset of the memory area for application coincide with each other. Data can be moved to the memory area at high speed.

ここで、この図3では、パケット#n+1よりも前にパケット#n+2が転送されてきたことを仮定しており、本発明のコンピュータシステムは、パケットのヘッダ情報を解析することで、そのことを検出することになる。   Here, in FIG. 3, it is assumed that the packet # n + 2 has been transferred before the packet # n + 1, and the computer system of the present invention analyzes this by analyzing the header information of the packet. Will be detected.

図1では、パケットの長さが2.5ページ分であることを仮定したが、図4に示すように、パケットの長さが2.6ページ分というような中途半端な場合でも、最初から、本発明のデータ受信装置の予測するアプリケーション用メモリ領域のページオフセットとアプリケーション用メモリ領域の実際のページオフセットとが一致するとともに、その後も、本発明のデータ受信装置の予測するアプリケーション用メモリ領域のページオフセットとアプリケーション用メモリ領域の実際のページオフセットとが一致することで、ページマップ切り替え操作を利用することによって、メモリからアプリケーション用メモリ領域へ高速にデータを移動できることになる。   In FIG. 1, it is assumed that the packet length is 2.5 pages, but as shown in FIG. 4, even if the packet length is halfway, such as 2.6 pages, from the beginning. The page offset of the application memory area predicted by the data receiving apparatus of the present invention matches the actual page offset of the application memory area, and thereafter the application memory area predicted by the data receiving apparatus of the present invention Since the page offset matches the actual page offset of the application memory area, data can be moved from the memory to the application memory area at high speed by using the page map switching operation.

また、図2に示す例では、アプリケーション用メモリ領域の先頭ページの実際のページオフセットが0.5ページであるにもかかわらず、本発明のデータ受信装置は一番初めにページオフセットの予測値を0ページと予測しているが、本発明のコンピュータシステムが、本発明のデータ受信装置に対してページオフセットの予測値の初期値を通知し、これを受けて、本発明のデータ受信装置が、その通知されたページオフセットの予測値の初期値に従って一番初めのページオフセットを予測するようにすれば、そのような不都合は起こらない。   In the example shown in FIG. 2, even though the actual page offset of the first page of the application memory area is 0.5 page, the data receiving apparatus of the present invention first calculates the predicted value of the page offset. The computer system of the present invention notifies the initial value of the predicted value of the page offset to the data receiving apparatus of the present invention, and in response to this, the data receiving apparatus of the present invention Such inconvenience does not occur if the first page offset is predicted according to the notified initial value of the predicted page offset value.

本発明によれば、コンピュータシステムに付随して設けられて、外部から送られてくるデータを受信してコンピュータシステム内のメモリに一時的に保存するデータ受信装置と、データ受信装置から転送されてくるデータを受信して、それをメモリに一時的に保存してから、アプリケーションプログラムの管理するアプリケーション用メモリ領域へ転送するコンピュータシステムとで構成されるシステムにおいて、データ受信装置がページマップの書き替えによるデータ移動を可能とするページオフセットを予測することが可能になり、これにより、ページマップの書き替えによるデータ移動を利用できる状況を多く作り出すことができることで、ページマップの書き替えによる高速なデータ転送を実現することができるようになる。   According to the present invention, a data receiving device that is provided in association with a computer system, receives data sent from the outside, and temporarily stores it in a memory in the computer system, and is transferred from the data receiving device. In a system comprised of a computer system that receives incoming data, temporarily stores it in memory, and then transfers it to an application memory area managed by an application program, the data receiving device rewrites the page map. It is possible to predict the page offset that enables data movement by, and by this, it is possible to create many situations that can use data movement by rewriting the page map, so that high-speed data by rewriting the page map Transfer can be realized.

これから、本発明によれば、高価なハードウェアを用意したりプログラムを書き換えることなく、コンピュータシステムが外部から高速にデータを受け取ることができるようになる。   Thus, according to the present invention, the computer system can receive data from the outside at high speed without preparing expensive hardware or rewriting the program.

以下、実施の形態に従って本発明を詳細に説明する。   Hereinafter, the present invention will be described in detail according to embodiments.

図5に、本発明のネットワークインタフェース装置1と本発明のデータ処理装置2とで構成されるシステム構成の一例を図示する。なお、ネットワークインタフェース装置1については、図面中でNICと略記することがある。   FIG. 5 illustrates an example of a system configuration including the network interface device 1 of the present invention and the data processing device 2 of the present invention. The network interface device 1 may be abbreviated as NIC in the drawings.

この図に示すように、本発明のネットワークインタフェース装置1は、図示しないイーサネット(登録商標)から送信されてくるTCP/IPパケットを受信して一時的に格納する受信データ格納バッファ10と、受信データ格納バッファ10に格納されたパケットをデータ処理装置2のOS用バッファ200に転送するDMAエンジン11と、受信データ格納バッファ10に格納されたパケットを解析して、パケット長と送信元のIPアドレスと送信先のポート番号とを抽出するキー抽出器12と、キー抽出器12の抽出した送信元IPアドレス及び送信先ポート番号をキーにしてテーブルを検索することで、データ処理装置2のAPL用バッファ210のページオフセットを予測するオフセット予測器13と、データ処理装置2の設定したOS用バッファ200のページ先頭アドレスを受け取り登録する受信バッファ登録器14と、受信バッファ登録器14の登録したページ先頭アドレスとオフセット予測器13の予測したページ先頭アドレスとを加算することでOS用バッファ200のデータ格納開始アドレスを算出して、DMAエンジン11に与える加算器15とを備える。   As shown in this figure, the network interface device 1 according to the present invention receives a TCP / IP packet transmitted from Ethernet (not shown) and temporarily stores it, and a received data storage buffer 10 and received data. The DMA engine 11 that transfers the packet stored in the storage buffer 10 to the OS buffer 200 of the data processing device 2, the packet stored in the reception data storage buffer 10 is analyzed, the packet length, the IP address of the transmission source, A key extractor 12 that extracts the port number of the transmission destination, and a buffer for APL of the data processing device 2 by searching the table using the transmission source IP address and the transmission destination port number extracted by the key extractor 12 as keys. Set by the offset predictor 13 that predicts the page offset of 210 and the data processing device 2 The receiving buffer register 14 that receives and registers the page head address of the OS buffer 200, and the OS buffer by adding the page head address registered by the receiving buffer register 14 and the page head address predicted by the offset predictor 13 And an adder 15 that calculates 200 data storage start addresses and gives them to the DMA engine 11.

一方、本発明のデータ処理装置2は、オペレーティングシステム20と、APL用バッファ210を備えて所定のデータ処理を実行するアプリケーションプログラム21とを備える。   On the other hand, the data processing apparatus 2 of the present invention includes an operating system 20 and an application program 21 that includes an APL buffer 210 and executes predetermined data processing.

オペレーティングシステム20は、ネットワークインタフェース装置1から転送されてくるパケットを受信して一時的に格納するOS用バッファ200と、アプリケーションプログラム21の設定した図6に示すようなAPL用バッファ210のデータ受信領域の情報を取得するAPL用バッファ領域情報取得部201と、データ受信領域となる図7に示すようなOS用バッファ200のページ先頭アドレスを設定して、その設定情報を受信バッファ登録器14に通知するOS用バッファアドレス通知部202と、オフセット予測器13の予測したページオフセットを特定するとともに、APL用バッファ210のページオフセットを特定するオフセット特定部203と、OS用バッファ200に格納したパケットのヘッダ情報を解析するヘッダ情報解析部204と、ページマップの切り替えによるOS用バッファ200からAPL用バッファ210へのデータ転送を制御するページマップ切替部205と、データコピーによるOS用バッファ200からAPL用バッファ210へのデータ転送を制御するデータコピー制御部206と、オフセット予測器13に対して、ページオフセットの予測の変更を指示するオフセット予測変更指示部207とを備える。   The operating system 20 receives a packet transferred from the network interface device 1 and temporarily stores it, and a data receiving area of the APL buffer 210 as shown in FIG. The APL buffer area information acquisition unit 201 for acquiring the information and the page head address of the OS buffer 200 as shown in FIG. 7 as the data reception area are set, and the setting information is notified to the reception buffer register 14. The OS buffer address notifying unit 202 that performs, the page offset predicted by the offset predictor 13, the offset specifying unit 203 that specifies the page offset of the APL buffer 210, and the header of the packet stored in the OS buffer 200 Analyzing information Data information analysis unit 204, page map switching unit 205 that controls data transfer from OS buffer 200 to APL buffer 210 by switching page maps, and data from OS buffer 200 to APL buffer 210 by data copying A data copy control unit 206 that controls the transfer, and an offset prediction change instruction unit 207 that instructs the offset predictor 13 to change the prediction of the page offset.

ここで、図6では、APL用バッファ210のデータ受信領域として連続ページ構成のものを例示したが、ページがリンクで関連付けされるような場合には、このような連続ページ構成にはならない。また、図7では、OS用バッファ200のデータ受信領域として連続ページ構成のものを例示したが、ページがリンクで関連付けされるような場合には、このような連続ページ構成にはならない。   Here, FIG. 6 illustrates a continuous page configuration as the data reception area of the APL buffer 210. However, when pages are associated with each other by a link, such a continuous page configuration is not used. 7 illustrates a continuous page configuration as a data reception area of the OS buffer 200. However, when pages are associated with each other by a link, such a continuous page configuration is not used.

図8に、オフセット予測器13の装置構成の一例を図示する。   FIG. 8 illustrates an example of a device configuration of the offset predictor 13.

この図に示すように、オフセット予測器13は、送信元IPアドレス及び送信先ポート番号に対応付けて、APL用バッファ210のページオフセットの予測値を管理するオフセット予測テーブル130と、キー抽出器12の抽出した情報の指すオフセット予測テーブル130のページオフセットを更新対象として、“新ページオフセット=ページオフセット+パケット長”という算出式に従ってAPL用バッファ210のページオフセットの新たな予測値を算出して、オフセット予測テーブル130に管理されるページオフセットを更新するテーブル更新部131と、オフセット予測変更指示部207からの指示情報に従って、オフセット予測テーブル130に管理されるページオフセットを変更するCPUインタフェース132と、キー抽出器12の抽出した送信元IPアドレス及び送信先ポート番号をキーにしてオフセット予測テーブル130を参照することでページオフセットを読み出して、それを加算器15やテーブル更新部131に与えるテーブル参照部133とを備える。   As shown in this figure, the offset predictor 13 includes an offset prediction table 130 that manages the predicted value of the page offset of the APL buffer 210 in association with the transmission source IP address and the transmission destination port number, and the key extractor 12. The page offset of the offset prediction table 130 pointed to by the extracted information is updated, and a new predicted value of the page offset of the APL buffer 210 is calculated according to the calculation formula “new page offset = page offset + packet length”, A table updating unit 131 that updates a page offset managed in the offset prediction table 130, a CPU interface 132 that changes a page offset managed in the offset prediction table 130 in accordance with instruction information from the offset prediction change instruction unit 207, and a key A table reference unit 133 that reads the page offset by referring to the offset prediction table 130 using the source IP address and destination port number extracted by the output unit 12 as keys, and supplies the page offset to the adder 15 and the table update unit 131. With.

図9及び図10に、本発明のネットワークインタフェース装置1の実行する処理の一例をフローチャートの形で図示し、図11に、本発明のデータ処理装置2の備えるオペレーティングシステム20の実行するフローチャートの一例を図示する。   9 and 10 show an example of processing executed by the network interface device 1 of the present invention in the form of a flowchart. FIG. 11 shows an example of flowchart executed by the operating system 20 included in the data processing device 2 of the present invention. Is illustrated.

次に、これらのフローチャートに従って、このように構成される本発明の実行する処理について詳細に説明する。   Next, according to these flowcharts, processing executed by the present invention configured as described above will be described in detail.

最初に、図9及び図10のフローチャートに従って、本発明のネットワークインタフェース装置1の実行する処理について説明する。   First, processing executed by the network interface device 1 of the present invention will be described with reference to the flowcharts of FIGS. 9 and 10.

本発明のネットワークインタフェース装置1は、図示しないイーサネットから送信されてくるTCP/IPパケットを受信して受信データ格納バッファ10に格納すると、図9のフローチャートに示すように、先ず最初に、ステップS10で、そのパケットのへッダ情報から、送信元のIPアドレスと、送信先を指定するポート番号と、パケット長とを抽出する。   When the network interface device 1 of the present invention receives a TCP / IP packet transmitted from an Ethernet (not shown) and stores it in the received data storage buffer 10, first, as shown in the flowchart of FIG. Then, the IP address of the transmission source, the port number for designating the transmission destination, and the packet length are extracted from the header information of the packet.

ここで、本発明のネットワークインタフェース装置1はハードウェアで構成されており、これから、このステップS10では、パケットのヘッダ情報を詳細に解析することは行わずに、送信元のIPアドレスと、送信先を指定するポート番号と、パケット長とを抽出するだけの処理を行うことになる。   Here, the network interface device 1 of the present invention is configured by hardware, and in this step S10, the packet header information is not analyzed in detail, and the source IP address and destination Only the process of extracting the port number for designating the packet length and the packet length is performed.

続いて、ステップS11で、抽出したIPアドレス及びポート番号をキーにしてオフセット予測テーブル130を参照することで、APL用バッファ210のページオフセットの予測値を特定する。   Subsequently, in step S11, the predicted value of the page offset of the APL buffer 210 is specified by referring to the offset prediction table 130 using the extracted IP address and port number as a key.

続いて、ステップS12で、前回転送したOS用バッファ200の最終ページの次のページの先頭アドレスと、特定したページオフセットの予測値とを加算することで、OS用バッファ200の転送先アドレスを算出する。   Subsequently, in step S12, the transfer destination address of the OS buffer 200 is calculated by adding the head address of the next page of the last page of the OS buffer 200 transferred last time and the predicted value of the specified page offset. To do.

続いて、ステップS13で、算出した転送先アドレスを転送先として、受信したパケットをOS用バッファ200に転送する。   In step S13, the received packet is transferred to the OS buffer 200 using the calculated transfer destination address as the transfer destination.

続いて、ステップS14で、ステップS11で特定したページオフセットを更新対象として、ステップS10で抽出したパケット長と、ステップS11で特定したページオフセットとを使い、
新ページオフセット=ページオフセット+パケット長
という算出式に従ってAPL用バッファ210のページオフセットの新たな予測値を算出して、オフセット予測テーブル130に管理されるページオフセットの予測値を更新して、処理を終了する。
Subsequently, in step S14, the page offset specified in step S11 is used as an update target, and the packet length extracted in step S10 and the page offset specified in step S11 are used.
A new predicted value of the page offset of the APL buffer 210 is calculated according to the calculation formula of new page offset = page offset + packet length, and the predicted value of the page offset managed in the offset prediction table 130 is updated. finish.

後述するように、本発明のデータ処理装置2は、このパケットの転送に際して、本発明のネットワークインタフェース装置1が予測したページオフセット(ステップS11で特定したページオフセット)に誤りがある場合には、本発明のネットワークインタフェース装置1に対して、次回のデータ転送の際に用いるページオフセットの予測値を指定して、ページオフセットの予測の変更を指示してくる。   As will be described later, the data processing apparatus 2 of the present invention, when transferring this packet, if there is an error in the page offset predicted by the network interface apparatus 1 of the present invention (the page offset specified in step S11). The network interface device 1 of the invention is instructed to change the prediction of the page offset by designating the predicted value of the page offset used at the next data transfer.

これから、本発明のネットワークインタフェース装置1は、本発明のデータ処理装置1からページオフセット予測の変更指示があると、図10のフローチャートに示すように、先ず最初に、ステップS20で、本発明のデータ処理装置1から送られてくるページオフセットの予測値を受け取り、続くステップS21で、図9のフローチャートのステップS14で更新したページオフセットの予測値を、その受け取ったページオフセットの予測値に変更して、処理を終了する。   From now on, when there is a page offset prediction change instruction from the data processing apparatus 1 of the present invention, the network interface apparatus 1 of the present invention, first, in step S20, as shown in the flowchart of FIG. The page offset prediction value sent from the processing device 1 is received, and in step S21, the page offset prediction value updated in step S14 in the flowchart of FIG. 9 is changed to the received page offset prediction value. The process is terminated.

次に、図11のフローチャートに従って、本発明のデータ処理装置2の備えるオペレーティングシステム20の実行する処理について説明する。   Next, processing executed by the operating system 20 included in the data processing apparatus 2 of the present invention will be described with reference to the flowchart of FIG.

本発明のデータ処理装置2は、本発明のネットワークインタフェース装置1から転送先アドレスを指定してパケットが送られてくると、その転送先アドレスの指すOS用バッファ200のメモリ領域にパケットを格納してから、OS用バッファ200に割り込みを通知することで、オペレーティングシステム20に対してパケットの受信を通知する。   When a packet is sent from the network interface device 1 of the present invention by designating a transfer destination address, the data processing device 2 of the present invention stores the packet in the memory area of the OS buffer 200 indicated by the transfer destination address. After that, by notifying the OS buffer 200 of an interrupt, the operating system 20 is notified of packet reception.

この割込通知を受けて、本発明のデータ処理装置2の備えるオペレーティングシステム20は、図11のフローチャートに示すように、先ず最初に、ステップS30で、OS用バッファ200に格納されたパケットのヘッダ情報を解析することで、そのパケットをAPL用バッファ210のどこに格納するのかを決定する。   Upon receipt of this interrupt notification, the operating system 20 included in the data processing apparatus 2 of the present invention, first, as shown in the flowchart of FIG. 11, first of all, the header of the packet stored in the OS buffer 200 in step S30. By analyzing the information, it is determined where to store the packet in the APL buffer 210.

すなわち、ネットワークを転送されてくるパケットは、順番通りに転送されてくるとは限らないし、パケットロスも発生することがある。これから、OS用バッファ200に格納されたパケットは、その格納順序のまま、APL用バッファ210にデータ転送していく訳にはいかない。そこで、このステップS30では、OS用バッファ200に格納されたパケットのヘッダ情報を解析することで、そのパケットをAPL用バッファ210のどこに格納するのかを決定するのである。   That is, packets transferred through the network are not always transferred in order, and packet loss may occur. From now on, the packets stored in the OS buffer 200 cannot be transferred to the APL buffer 210 in the storage order. Therefore, in step S30, the header information of the packet stored in the OS buffer 200 is analyzed to determine where the packet is stored in the APL buffer 210.

続いて、ステップS31で、ステップS30の決定結果に基づいて、APL用バッファ210の格納開始ページのページオフセット(先頭アドレスからのオフセット)を特定する。   Subsequently, in step S31, the page offset (offset from the start address) of the storage start page of the APL buffer 210 is specified based on the determination result in step S30.

続いて、ステップS32で、本発明のネットワークインタフェース装置1から指示された転送先アドレスに従って、OS用バッファ200の格納開始ページのページオフセット(先頭アドレスからのオフセット)を特定する。   Subsequently, in step S32, the page offset (offset from the head address) of the storage start page of the OS buffer 200 is specified according to the transfer destination address instructed from the network interface device 1 of the present invention.

続いて、ステップS33で、ステップS31で特定したページオフセットと、ステップS32で特定したページオフセットとが一致するのか否かを判断する。   Subsequently, in step S33, it is determined whether or not the page offset specified in step S31 matches the page offset specified in step S32.

この判断処理に従って、2つのページオフセットが一致することを判断するときには、ステップS34に進んで、OS用バッファ200に格納したパケットを処理対象として、ページマップの切り替えが可能なデータ部分については、ページマップの切り替えに従ってOS用バッファ200からAPL用バッファ210へデータ移動を行い、ページマップの切り替えが不可能なデータ部分については、OS用バッファ200からAPL用バッファ210へバイト単位にデータをコピーして、処理を終了する。   When it is determined that the two page offsets coincide with each other according to this determination process, the process proceeds to step S34, and the page stored in the OS buffer 200 is processed and the page map can be switched for the data portion. Data is moved from the OS buffer 200 to the APL buffer 210 in accordance with the map switching, and for data portions where the page map cannot be switched, data is copied from the OS buffer 200 to the APL buffer 210 in byte units. The process is terminated.

すなわち、本発明のネットワークインタフェース装置1の予測したAPL用バッファ210のページオフセットの予測値と、パケットのヘッダ情報の解析により求められた実際のAPL用バッファ210のページオフセットとが一致するときには、ページマップの切り替えを利用するデータ移動が可能であるので、ページマップの切り替えが可能なデータ部分については、ページマップの切り替えに従ってOS用バッファ200からAPL用バッファ210へデータ移動を行うように制御するのである。   That is, when the predicted value of the page offset of the APL buffer 210 predicted by the network interface apparatus 1 of the present invention matches the actual page offset of the APL buffer 210 obtained by analyzing the header information of the packet, the page Since data movement using map switching is possible, control is performed so that data portions that can be switched between page maps are moved from the OS buffer 200 to the APL buffer 210 according to the page map switching. is there.

一方、ステップS33の判断処理に従って、2つのページオフセットが一致しないことを判断するときには、ステップS35に進んで、OS用バッファ200に格納したパケットを処理対象として、OS用バッファ200からAPL用バッファ210へバイト単位にデータをコピーする。   On the other hand, when it is determined that the two page offsets do not match according to the determination process in step S33, the process proceeds to step S35, and the packet stored in the OS buffer 200 is set as a processing target from the OS buffer 200 to the APL buffer 210. Copy data in bytes.

すなわち、本発明のネットワークインタフェース装置1の予測したAPL用バッファ210のページオフセットの予測値と、パケットのヘッダ情報の解析により求められた実際のAPL用バッファ210のページオフセットとが一致しないときには、ページマップの切り替えを利用することができないので、OS用バッファ200からAPL用バッファ210へバイト単位にデータをコピーするのである。   That is, when the predicted value of the page offset of the APL buffer 210 predicted by the network interface apparatus 1 of the present invention does not match the actual page offset of the APL buffer 210 obtained by analyzing the header information of the packet, the page Since map switching cannot be used, data is copied in bytes from the OS buffer 200 to the APL buffer 210.

続いて、ステップS36で、APL用バッファ210にコピーしたパケットの最終格納ページのページオフセット(次回のOS用バッファ200の格納開始ページのページオフセットとなるもの)を特定する。   Subsequently, in step S36, the page offset of the last storage page of the packet copied to the APL buffer 210 (the page offset of the storage start page of the next OS buffer 200) is specified.

続いて、ステップS37で、本発明のネットワークインタフェース装置1に対して、特定したページオフセットを通知することで(IPアドレス及びポート番号も通知する)、オフセット予測テーブル130に格納されるページオフセットの予測値の変更を指示して、処理を終了する。   Subsequently, in step S37, the specified page offset is notified to the network interface device 1 of the present invention (IP address and port number are also notified), thereby predicting the page offset stored in the offset prediction table 130. An instruction to change the value is issued, and the process is terminated.

このページオフセットの予測変更指示を受けて、本発明のネットワークインタフェース装置1は、図10のフローチャートで説明したように、オフセット予測テーブル130に格納される図9のフローチャートのステップS14で更新したページオフセットの予測値を、オペレーティングシステム20から通知されるページオフセットに従って変更するのである。   Upon receiving this page offset prediction change instruction, the network interface device 1 according to the present invention, as described with reference to the flowchart of FIG. 10, stores the page offset updated in step S <b> 14 of the flowchart of FIG. 9 stored in the offset prediction table 130. Is predicted according to the page offset notified from the operating system 20.

次に、図12〜図17に従って、本発明の処理について具体的に説明する。ここで、図12〜図17では、1ページの長さを0x1000としている。   Next, the processing of the present invention will be specifically described with reference to FIGS. Here, in FIGS. 12 to 17, the length of one page is set to 0x1000.

図12〜図14に示す処理例(図1に示す処理例に相当するもの)では、図12に示すように、アプリケーションプログラム21がオペレーティングシステム20に対して、先頭アドレスが0x20000000で、長さが0x5000というAPL用バッファ210のメモリ領域にデータを受信することを要求し、オペレーティングシステム20がネットワークインタフェース装置1に対して、0x10000000〜0x10006000というOS用バッファ200のメモリ領域にデータを受信することを要求する、ということを想定している。   In the processing example shown in FIGS. 12 to 14 (corresponding to the processing example shown in FIG. 1), as shown in FIG. 12, the application program 21 has a start address of 0x20000000 and a length of the operating system 20. Requests that data be received in the memory area of the APL buffer 210 of 0x5000, and the operating system 20 requests the network interface apparatus 1 to receive data in the memory area of the OS buffer 200 of 0x10000000 to 0x10006000. It is assumed that.

この場合にあって、図13に示すように、ネットワークインタフェース装置1が0x2800(2.5ページ分)というパケット長のパケット#1を受信し、このとき、ネットワークインタフェース装置1が0x000 というページオフセットを予測したとする。   In this case, as shown in FIG. 13, the network interface device 1 receives packet # 1 having a packet length of 0x2800 (2.5 pages), and at this time, the network interface device 1 sets a page offset of 0x000. Suppose you predict.

この場合には、図13に示すように、ネットワークインタフェース装置1は、0x10000000を起点とするOS用バッファ200のメモリ領域に2.5ページのデータを転送し、次回のページオフセットの予測値として0x800(0.5ページ)を予測して、オフセット予測テーブル130に書き込む。   In this case, as shown in FIG. 13, the network interface device 1 transfers 2.5 pages of data to the memory area of the OS buffer 200 starting from 0x10000000, and 0x800 as the predicted value of the next page offset. (Page 0.5) is predicted and written to the offset prediction table 130.

このデータ転送を受けて、図13に示すように、オペレーティングシステム20は、APL用バッファ210の0x20000000が転送先領域として設定されていることで、ネットワークインタフェース装置1の予測したページオフセットと、APL用バッファ210のページオフセットとが一致することを判断して、ページテーブルの書き替えによるデータ移動を行いながら、OS用バッファ200からAPL用バッファ210へデータを転送する。   Upon receiving this data transfer, as shown in FIG. 13, the operating system 20 sets the page offset predicted by the network interface device 1 and the APL for 0x20000000 in the APL buffer 210 as the transfer destination area. When it is determined that the page offset of the buffer 210 matches, the data is transferred from the OS buffer 200 to the APL buffer 210 while performing data movement by rewriting the page table.

続いて、図14に示すように、ネットワークインタフェース装置1が0x2800(2.5ページ分)というパケット長のパケット#2を受信したとする。このとき、ネットワークインタフェース装置1は、オフセット予測テーブル130の格納データに従って0x800(0.5ページ)というページオフセットを予測する。   Subsequently, as shown in FIG. 14, it is assumed that the network interface apparatus 1 receives a packet # 2 having a packet length of 0x2800 (2.5 pages). At this time, the network interface apparatus 1 predicts a page offset of 0x800 (0.5 pages) according to the data stored in the offset prediction table 130.

この場合には、図14に示すように、ネットワークインタフェース装置1は、0x10003800(=0x10003000+0x800) を起点とするOS用バッファ200のメモリ領域に2.5ページのデータを転送し、次回のページオフセットの予測値として0x000(=0x800+0x800)を予測して、オフセット予測テーブル130に書き込む。   In this case, as shown in FIG. 14, the network interface device 1 transfers 2.5 pages of data to the memory area of the OS buffer 200 starting from 0x10003800 (= 0x10003000 + 0x800), and the next page 0x000 (= 0x800 + 0x800) is predicted as the predicted offset value and written to the offset prediction table 130.

このデータ転送を受けて、図14に示すように、オペレーティングシステム20は、APL用バッファ210の0x20002800が転送先領域として設定されていることで、ネットワークインタフェース装置1の予測したページオフセットと、APL用バッファ210のページオフセットとが一致することを判断して、ページテーブルの書き替えによるデータ移動を行いながら、OS用バッファ200からAPL用バッファ210へデータを転送する。   Upon receiving this data transfer, as shown in FIG. 14, the operating system 20 sets the page offset predicted by the network interface device 1 and the APL for 0x20002800 in the APL buffer 210 as the transfer destination area. When it is determined that the page offset of the buffer 210 matches, the data is transferred from the OS buffer 200 to the APL buffer 210 while performing data movement by rewriting the page table.

このようにして、図12〜図14に示す処理例では、図1に示したような形態でOS用バッファ200からAPL用バッファ210へデータ転送が実行されることになる。   Thus, in the processing examples shown in FIGS. 12 to 14, data transfer is executed from the OS buffer 200 to the APL buffer 210 in the form shown in FIG.

図15〜図17に示す処理例(図2に示す処理例に相当するもの)では、図15に示すように、アプリケーションプログラム21がオペレーティングシステム20に対して、先頭アドレスが0x20000800で、長さが0x5000というAPL用バッファ210のメモリ領域にデータを受信することを要求し、オペレーティングシステム20がネットワークインタフェース装置1に対して、0x10000000〜0x10006000というOS用バッファ200のメモリ領域にデータを受信することを要求する、ということを想定している。   In the processing example shown in FIGS. 15 to 17 (corresponding to the processing example shown in FIG. 2), as shown in FIG. 15, the application program 21 has the start address 0x20000800 and the length of the operating system 20. Requests that data be received in the memory area of the APL buffer 210 of 0x5000, and the operating system 20 requests the network interface apparatus 1 to receive data in the memory area of the OS buffer 200 of 0x10000000 to 0x10006000. It is assumed that.

この場合にあって、図16に示すように、ネットワークインタフェース装置1が0x2800(2.5ページ分)というパケット長のパケット#1を受信し、このとき、ネットワークインタフェース装置1が0x000 というページオフセットを予測したとする。   In this case, as shown in FIG. 16, the network interface device 1 receives a packet # 1 having a packet length of 0x2800 (2.5 pages). At this time, the network interface device 1 sets a page offset of 0x000. Suppose you predict.

この場合には、図16に示すように、ネットワークインタフェース装置1は、0x10000000を起点とするOS用バッファ200のメモリ領域に2.5ページのデータを転送し、次回のページオフセットの予測値として0x800(0.5ページ)を予測して、オフセット予測テーブル130に書き込む。   In this case, as shown in FIG. 16, the network interface device 1 transfers 2.5 pages of data to the memory area of the OS buffer 200 starting from 0x10000000, and 0x800 as the predicted value of the next page offset. (Page 0.5) is predicted and written to the offset prediction table 130.

このデータ転送を受けて、図16に示すように、オペレーティングシステム20は、APL用バッファ210の0x20002800が転送先領域として設定されていることで、ネットワークインタフェース装置1の予測したページオフセットと、APL用バッファ210のページオフセットとが一致しないことを判断して、ページテーブルの書き替えによるデータ移動を行わずに、OS用バッファ200からAPL用バッファ210へデータを転送する。そして、ネットワークインタフェース装置1に対して、ページオフセットの予測値を0x000 に変更すべく通知する。   Upon receiving this data transfer, as shown in FIG. 16, the operating system 20 sets the page offset predicted by the network interface device 1 and the APL for 0x20002800 in the APL buffer 210 as the transfer destination area. It is determined that the page offset of the buffer 210 does not match, and data is transferred from the OS buffer 200 to the APL buffer 210 without performing data movement by rewriting the page table. Then, it notifies the network interface device 1 to change the predicted value of the page offset to 0x000.

続いて、図17に示すように、ネットワークインタフェース装置1が0x2800(2.5ページ分)というパケット長のパケット#2を受信したとする。このとき、ネットワークインタフェース装置1は、オペレーティングシステム20からの変更指示に従って0x000 というページオフセットを予測する。   Subsequently, as shown in FIG. 17, it is assumed that the network interface apparatus 1 receives a packet # 2 having a packet length of 0x2800 (2.5 pages). At this time, the network interface device 1 predicts a page offset of 0x000 in accordance with the change instruction from the operating system 20.

この場合には、図17に示すように、ネットワークインタフェース装置1は、0x10003000(=0x10003000+0x000) を起点とするOS用バッファ200のメモリ領域に2.5ページのデータを転送し、次回のページオフセットの予測値として0x800(=0x000+0x800)を予測して、オフセット予測テーブル130に書き込む。   In this case, as shown in FIG. 17, the network interface device 1 transfers 2.5 pages of data to the memory area of the OS buffer 200 starting from 0x10003000 (= 0x10003000 + 0x000), and the next page As a predicted offset value, 0x800 (= 0x000 + 0x800) is predicted and written to the offset prediction table 130.

このデータ転送を受けて、図17に示すように、オペレーティングシステム20は、APL用バッファ210の0x20003000が転送先領域として設定されていることで、ネットワークインタフェース装置1の予測したページオフセットと、APL用バッファ210のページオフセットとが一致することを判断して、ページテーブルの書き替えによるデータ移動を行いながら、OS用バッファ200からAPL用バッファ210へデータを転送する。   Upon receiving this data transfer, as shown in FIG. 17, the operating system 20 sets the page offset predicted by the network interface device 1 and the APL for 0x20003000 in the APL buffer 210 as the transfer destination area. When it is determined that the page offset of the buffer 210 matches, the data is transferred from the OS buffer 200 to the APL buffer 210 while performing data movement by rewriting the page table.

このようにして、図15〜図17に示す処理例では、図2に示したような形態でOS用バッファ200からAPL用バッファ210へデータ転送が実行されることになる。   In this way, in the processing examples shown in FIGS. 15 to 17, data transfer is executed from the OS buffer 200 to the APL buffer 210 in the form shown in FIG.

図示実施形態例に従って本発明を説明したが、本発明はこれに限定されるものではない。   Although the present invention has been described according to the illustrated embodiment, the present invention is not limited to this.

例えば、実施形態例では、オフセット予測テーブル130が送信元IPアドレス及び送信先ポート番号に対応付けて、APL用バッファ210のページオフセットの予測値を管理するものを開示したが、送信元IPアドレス及び送信先ポート番号に対応付けて、固定のページオフセットを用いるのか否かということと、固定のページオフセットを用いるものについては固定のページオフセットを管理し、固定のページオフセットを用いないものについては、APL用バッファ210のページオフセットの予測値を管理するという構成を採ることもある。   For example, in the exemplary embodiment, the offset prediction table 130 discloses that manages the predicted value of the page offset of the APL buffer 210 in association with the transmission source IP address and the transmission destination port number. Whether or not to use a fixed page offset in association with the destination port number, and for those that use a fixed page offset, manage a fixed page offset, and for those that do not use a fixed page offset, A configuration may be adopted in which the predicted value of the page offset of the APL buffer 210 is managed.

データ処理装置2は、ループ処理などがある場合には、APL用バッファ210の同じメモリ領域に何度も小さなデータを受信していくことがあるので、このような場合には、オフセット予測テーブル130は、送信元IPアドレス及び送信先ポート番号に対応付けて、固定のページオフセットを用いるのか否かということと、固定のページオフセットを用いるものについては固定のページオフセットを管理し、固定のページオフセットを用いないものについては、APL用バッファ210のページオフセットの予測値を管理するという構成を採ることになる。   When there is a loop process or the like, the data processing apparatus 2 may receive small data many times in the same memory area of the APL buffer 210. In such a case, the offset prediction table 130 is used. Indicates whether or not to use a fixed page offset in association with the source IP address and destination port number, and manages a fixed page offset for those using a fixed page offset. For those not using, a configuration is adopted in which the predicted value of the page offset of the APL buffer 210 is managed.

本発明は、コンピュータシステムに付随して設けられて、外部から送られてくるデータを受信してコンピュータシステムに転送するデータ受信装置と、そのデータ受信装置を接続するコンピュータシステムとで構成されるシステムに適用できるものであり、データ受信装置がページマップの書き替えによるデータ移動を可能とするページオフセットを予測することが可能になり、これにより、ページマップの書き替えによるデータ移動を利用できる状況を多く作り出すことができることで、ページマップの書き替えによる高速なデータ転送を実現することができるようになる。   The present invention is provided in association with a computer system, and includes a data receiving device that receives data transmitted from the outside and transfers the data to the computer system, and a computer system that connects the data receiving device. It is possible to predict the page offset that enables the data receiving device to move the data by rewriting the page map, which makes it possible to use the data movement by rewriting the page map. Since many can be created, high-speed data transfer by rewriting the page map can be realized.

(付記1)コンピュータシステムに付随して設けられて、外部から送られてくるデータを受信してコンピュータシステム内のメモリに一時的に保存するデータ受信装置と、データ受信装置から転送されてくるデータを受信して、それをメモリに一時的に保存してから、アプリケーションプログラムの管理するアプリケーション用メモリ領域へ転送するコンピュータシステムとで構成されるシステムで実行されるデータ受信方法であって、前記データ受信装置が、データを受信するときに、前記アプリケーション用メモリ領域のページオフセットを予測して、前記メモリ上のデータ転送先ページの先頭アドレスと予測したページオフセットとにより規定されるデータ格納開始アドレスを指定して、受信したデータを前記メモリに転送し、さらに、受信したデータの長さと予測したページオフセットとに基づいて、次回のデータ受信の際に用いるページオフセットの予測値を設定するとともに、コンピュータシステムから予測したページオフセットの予測値について予測誤りの通知があるときに、設定したページオフセットの予測値をコンピュータシステムから通知されるページオフセットに従って変更するように処理し、前記コンピュータシステムが、データ転送の際に指定されるデータ格納開始アドレスに基づいて、前記データ受信装置の予測したページオフセットを特定するとともに、前記メモリに格納したデータを解析することで、そのデータの転送先となる前記アプリケーション用メモリ領域のページオフセットを特定して、その特定した2つのページオフセットが一致するのか否かを判断し、2つのページオフセットの不一致を判断するときに、特定した前記アプリケーション用メモリ領域のページオフセットと前記メモリに格納したデータの長さとに基づいて、データ転送後における前記アプリケーション用メモリ領域のページオフセットを特定して、前記データ受信装置に通知し、さらに、2つのページオフセットが一致するのか否かの判断結果に基づいて、前記メモリから前記アプリケーション用メモリ領域へのデータ転送方法を決定するように処理することを、特徴とするデータ受信方法。   (Supplementary note 1) A data receiving device provided in association with a computer system for receiving data sent from the outside and temporarily storing it in a memory in the computer system, and data transferred from the data receiving device A data receiving method executed by a system comprising: a computer system that receives the data and temporarily stores the data in a memory and then transfers the data to an application memory area managed by an application program; When the receiving device receives data, it predicts the page offset of the application memory area, and sets the data storage start address defined by the start address of the data transfer destination page on the memory and the predicted page offset. Specify and transfer the received data to the memory, Based on the length of the received data and the predicted page offset, a predicted value of the page offset used for the next data reception is set, and a prediction error is notified of the predicted value of the page offset predicted from the computer system. And processing to change the predicted value of the set page offset according to the page offset notified from the computer system, and the computer system performs the data storage based on the data storage start address designated at the time of data transfer. The page offset predicted by the receiving apparatus is specified, and the data stored in the memory is analyzed to identify the page offset of the application memory area to which the data is transferred, and the two specified pages Offset matches And determining whether the two page offsets do not match, based on the specified page offset of the application memory area and the length of the data stored in the memory, for the application after the data transfer A method of transferring data from the memory to the application memory area based on a determination result of whether or not two page offsets match, specifying a page offset of the memory area and notifying the data receiving apparatus A data receiving method characterized in that processing is performed so as to determine.

(付記2)コンピュータシステムに付随して設けられて、外部から送られてくるデータを受信してコンピュータシステム内のメモリに一時的に保存するデータ受信装置であって、データを受信するときに、前記メモリからのデータ転送先となるアプリケーション用メモリ領域のページオフセットを予測する予測手段と、前記メモリ上のデータ転送先ページの先頭アドレスと前記予測手段の予測したページオフセットとにより規定されるデータ格納開始アドレスを指定して、前記受信したデータを前記メモリに転送する転送手段と、前記受信したデータの長さと前記予測手段の予測したページオフセットとに基づいて、次回のデータ受信の際に用いるページオフセットの予測値を設定する設定手段と、コンピュータシステムから前記予測手段の予測したページオフセットの予測値について予測誤りの通知があるときに、前記設定手段の設定したページオフセットの予測値をコンピュータシステムから通知されるページオフセットに従って変更する変更手段とを備えることを、特徴とするデータ受信装置。   (Supplementary Note 2) A data receiving device provided with the computer system for receiving data sent from the outside and temporarily storing it in a memory in the computer system. Data storage defined by a prediction unit that predicts a page offset of an application memory area that is a data transfer destination from the memory, a head address of a data transfer destination page on the memory, and a page offset predicted by the prediction unit A transfer unit that designates a start address and transfers the received data to the memory, and a page to be used for the next data reception based on the length of the received data and the page offset predicted by the prediction unit A setting means for setting a predicted value of the offset; and A change means for changing the predicted value of the page offset set by the setting means according to the page offset notified from the computer system when there is a notification of a prediction error with respect to the measured predicted value of the page offset. Data receiving device.

(付記3)付記2に記載のデータ受信装置において、送信元情報及び送信先情報に対応付けて、前記設定手段の設定したページオフセットの予測値を記憶する記憶手段を備え、前記予測手段は、データを受信するときに、その受信データの送信元情報及び送信先情報を抽出して、その抽出した送信元情報及び送信先情報をキーにして前記記憶手段の記憶情報を参照することでページオフセットを予測することを、特徴とするデータ受信装置。   (Supplementary note 3) In the data receiving device according to supplementary note 2, the data reception device includes a storage unit that stores a predicted value of the page offset set by the setting unit in association with transmission source information and transmission destination information, and the prediction unit includes: When receiving data, the page offset is obtained by extracting the transmission source information and transmission destination information of the received data and referring to the storage information of the storage means using the extracted transmission source information and transmission destination information as a key. A data receiving device characterized by predicting.

(付記4)付記2に記載のデータ受信装置において、送信元情報及び送信先情報に対応付けて、固定のページオフセットを用いるのか否かということと、固定のページオフセットを用いるものについては固定のページオフセットを記憶し、固定のページオフセットを用いないものについては、前記設定手段の設定したページオフセットの予測値を記憶する記憶手段を備え、前記予測手段は、データを受信するときに、その受信データの送信元情報及び送信先情報を抽出して、その抽出した送信元情報及び送信先情報をキーにして前記記憶手段の記憶情報を参照することでページオフセットを予測することを、特徴とするデータ受信装置。   (Supplementary Note 4) In the data receiving device described in Supplementary Note 2, whether or not to use a fixed page offset in association with the transmission source information and the transmission destination information, and what uses a fixed page offset is fixed For those which store a page offset and do not use a fixed page offset, the storage unit stores a predicted value of the page offset set by the setting unit, and the prediction unit receives the data when receiving the data. Extracting data transmission source information and transmission destination information, and predicting a page offset by referring to the storage information of the storage means using the extracted transmission source information and transmission destination information as a key Data receiving device.

(付記5)付記4に記載のデータ受信装置において、コンピュータシステムから通知される固定のページオフセットの値に従って、前記記憶手段に対して、固定のページオフセットの値を登録する登録手段を備えることを、特徴とするデータ受信装置。   (Supplementary note 5) The data receiving device according to supplementary note 4, further comprising registration means for registering a fixed page offset value in the storage means in accordance with a fixed page offset value notified from a computer system. , A data receiving device characterized.

(付記6)付記3ないし5のいずれか1項に記載のデータ受信装置において、コンピュータシステムから通知されるページオフセットの初期値に従って、前記記憶手段に対して、ページオフセットの予測値を初期登録する初期登録手段を備えることを、特徴とするデータ受信装置。   (Supplementary note 6) In the data receiving device according to any one of supplementary notes 3 to 5, the predicted value of the page offset is initially registered in the storage unit in accordance with the initial value of the page offset notified from the computer system. A data receiving apparatus characterized by comprising initial registration means.

(付記7)データ受信装置から転送されてくるデータを受信して、それをメモリに一時的に保存してから、アプリケーションプログラムの管理するアプリケーション用メモリ領域へ転送するコンピュータシステムであって、前記データ受信装置からデータ転送の際に指定されるデータ格納開始アドレスに基づいて、前記データ受信装置の予測したページオフセットを特定する第1の特定手段と、前記メモリに格納したデータを解析することで、そのデータの転送先となる前記アプリケーション用メモリ領域のページオフセットを特定する第2の特定手段と、前記第1の特定手段の特定したページオフセットと前記第2の特定手段の特定したページオフセットとが一致するのか否かを判断する判断手段と、前記判断手段が2つのページオフセットの不一致を判断するときに、前記第2の特定手段の特定したページオフセットと前記メモリに格納したデータの長さとに基づいて、データ転送後における前記アプリケーション用メモリ領域のページオフセットを特定して、前記データ受信装置に通知する第1の通知手段と、前記判断手段の判断結果に基づいて、前記メモリから前記アプリケーション用メモリ領域へのデータ転送方法を決定する決定手段とを備えることを、特徴とするコンピュータシステム。   (Supplementary note 7) A computer system for receiving data transferred from a data receiving device, temporarily storing the data in a memory, and transferring the data to an application memory area managed by an application program, wherein the data Based on a data storage start address specified at the time of data transfer from the receiving device, the first specifying means for specifying the page offset predicted by the data receiving device, and analyzing the data stored in the memory, Second specifying means for specifying a page offset of the application memory area to which the data is transferred, a page offset specified by the first specifying means, and a page offset specified by the second specifying means A judging means for judging whether or not they match, and the judging means comprises two page offsets. Is determined based on the page offset specified by the second specifying means and the length of data stored in the memory, the page offset of the application memory area after data transfer, First notification means for notifying the data receiving device; and determination means for determining a data transfer method from the memory to the application memory area based on a determination result of the determination means; Computer system.

(付記8)付記7に記載のコンピュータシステムにおいて、前記決定手段は、前記判断手段が2つのページオフセットの不一致を判断するときには、データコピー操作に従ってデータ転送を行うことを決定し、前記判断手段が2つのページオフセットの一致を判断するときには、ページマップ切り替え可能なページのデータについてはページマップ切り替え操作によってデータ転送を行い、それ以外のページのデータについてはデータコピー操作に従ってデータ転送を行うことを決定することを、特徴とするコンピュータシステム。   (Supplementary Note 8) In the computer system according to Supplementary Note 7, when the determination unit determines that two page offsets do not match, the determination unit determines to perform data transfer according to a data copy operation, and the determination unit When determining whether the two page offsets match, it is determined that the page map switchable page data is transferred by the pagemap switching operation, and other page data is transferred by the data copy operation. A computer system characterized by

(付記9)付記7又は8に記載のコンピュータシステムにおいて、前記データ受信装置に対して、固定のページオフセットの値を通知する第2の通知手段を備えることを、特徴とするコンピュータシステム。   (Supplementary note 9) The computer system according to supplementary note 7 or 8, further comprising: second notification means for notifying the data receiving device of a fixed page offset value.

(付記10)付記7又は8に記載のコンピュータシステムにおいて、前記データ受信装置に対して、ページオフセットの予測値の初期値を通知する第3の通知手段を備えることを、特徴とするコンピュータシステム。   (Supplementary note 10) The computer system according to Supplementary note 7 or 8, further comprising: third notification means for notifying the data reception device of an initial value of a predicted value of a page offset.

本発明の処理の説明図である。It is explanatory drawing of the process of this invention. 本発明の処理の説明図である。It is explanatory drawing of the process of this invention. 本発明の処理の説明図である。It is explanatory drawing of the process of this invention. 本発明の処理の説明図である。It is explanatory drawing of the process of this invention. 本発明を具備するシステムの装置構成図である。It is an apparatus block diagram of the system which comprises this invention. APL用バッファ領域情報取得部の取得する情報の説明図である。It is explanatory drawing of the information which the buffer area | region information acquisition part for APL acquires. OS用バッファアドレス通知部の設定する情報の説明図である。It is explanatory drawing of the information which the buffer address notification part for OS sets. オフセット予測器の装置構成図である。It is an apparatus block diagram of an offset predictor. ネットワークインタフェース装置の実行する処理をフローチャートの形で示した図である。It is the figure which showed the process which a network interface apparatus performs in the form of the flowchart. ネットワークインタフェース装置の実行する処理をフローチャートの形で示した図である。It is the figure which showed the process which a network interface apparatus performs in the form of the flowchart. データ処理装置の備えるオペレーティングシステムの実行するフローチャートである。It is a flowchart which the operating system with which a data processor is provided performs. 本発明の処理の説明図である。It is explanatory drawing of the process of this invention. 本発明の処理の説明図である。It is explanatory drawing of the process of this invention. 本発明の処理の説明図である。It is explanatory drawing of the process of this invention. 本発明の処理の説明図である。It is explanatory drawing of the process of this invention. 本発明の処理の説明図である。It is explanatory drawing of the process of this invention. 本発明の処理の説明図である。It is explanatory drawing of the process of this invention.

符号の説明Explanation of symbols

1 ネットワークインタフェース装置
2 データ処理装置
10 受信データ格納バッファ
11 DMAエンジン
12 キー抽出器
13 オフセット予測器
14 受信バッファ登録器
15 加算器
20 オペレーティングシステム
21 アプリケーションプログラム
200 OS用バッファ200
201 APL用バッファ領域情報取得部
202 OS用バッファアドレス通知部
203 オフセット特定部
204 ヘッダ情報解析部
205 ページマップ切替部
206 データコピー制御部
207 オフセット予測変更指示部
210 APL用バッファ
DESCRIPTION OF SYMBOLS 1 Network interface apparatus 2 Data processing apparatus 10 Received data storage buffer 11 DMA engine 12 Key extractor 13 Offset predictor 14 Receive buffer register 15 Adder 20 Operating system 21 Application program 200 OS buffer 200
201 APL buffer area information acquisition unit 202 OS buffer address notification unit 203 Offset specification unit 204 Header information analysis unit 205 Page map switching unit 206 Data copy control unit 207 Offset prediction change instruction unit 210 APL buffer

Claims (7)

コンピュータシステムに付随して設けられて、外部から送られてくるデータを受信してコンピュータシステム内のメモリに一時的に保存するデータ受信装置と、データ受信装置から転送されてくるデータを受信して、それをメモリに一時的に保存してから、アプリケーションプログラムの管理するアプリケーション用メモリ領域へ転送するコンピュータシステムとで構成されるシステムで実行されるデータ受信方法であって、
前記データ受信装置が、
データを受信するときに、前記アプリケーション用メモリ領域のページオフセットを予測して、前記メモリ上のデータ転送先ページの先頭アドレスと予測したページオフセットとにより規定されるデータ格納開始アドレスを指定して、受信したデータを前記メモリに転送し、さらに、受信したデータの長さと予測したページオフセットとに基づいて、次回のデータ受信の際に用いるページオフセットの予測値を設定するとともに、コンピュータシステムから予測したページオフセットの予測値について予測誤りの通知があるときに、設定したページオフセットの予測値をコンピュータシステムから通知されるページオフセットに従って変更するように処理し、
前記コンピュータシステムが、
データ転送の際に指定されるデータ格納開始アドレスに基づいて、前記データ受信装置の予測したページオフセットを特定するとともに、前記メモリに格納したデータを解析することで、そのデータの転送先となる前記アプリケーション用メモリ領域のページオフセットを特定して、その特定した2つのページオフセットが一致するのか否かを判断し、2つのページオフセットの不一致を判断するときに、特定した前記アプリケーション用メモリ領域のページオフセットと前記メモリに格納したデータの長さとに基づいて、データ転送後における前記アプリケーション用メモリ領域のページオフセットを特定して、前記データ受信装置に通知し、さらに、2つのページオフセットが一致するのか否かの判断結果に基づいて、前記メモリから前記アプリケーション用メモリ領域へのデータ転送方法を決定するように処理することを、
特徴とするデータ受信方法。
A data receiving device provided with the computer system for receiving data sent from the outside and temporarily storing it in a memory in the computer system, and receiving data transferred from the data receiving device A data receiving method executed in a system comprising a computer system that temporarily stores it in a memory and then transfers it to an application memory area managed by an application program,
The data receiving device is
When receiving data, predict the page offset of the application memory area, specify the data storage start address defined by the start address of the data transfer destination page on the memory and the predicted page offset, The received data is transferred to the memory, and furthermore, based on the length of the received data and the predicted page offset, a predicted value of the page offset used for the next data reception is set and predicted from the computer system When there is a notification of a prediction error about the predicted value of the page offset, process the predicted value of the set page offset to be changed according to the page offset notified from the computer system,
The computer system is
Based on the data storage start address specified at the time of data transfer, the page offset predicted by the data receiving device is specified, and the data stored in the memory is analyzed, so that the data transfer destination becomes The page offset of the application memory area is specified, and it is determined whether or not the two specified page offsets match. When the mismatch between the two page offsets is determined, the specified page of the application memory area is determined. Based on the offset and the length of the data stored in the memory, the page offset of the application memory area after the data transfer is identified and notified to the data receiving device, and whether the two page offsets match Based on the determination result of whether or not To process to determine the data transfer method to the application memory area,
Characteristic data receiving method.
コンピュータシステムに付随して設けられて、外部から送られてくるデータを受信してコンピュータシステム内のメモリに一時的に保存するデータ受信装置であって、
データを受信するときに、前記メモリからのデータ転送先となるアプリケーション用メモリ領域のページオフセットを予測する予測手段と、
前記メモリ上のデータ転送先ページの先頭アドレスと前記予測手段の予測したページオフセットとにより規定されるデータ格納開始アドレスを指定して、前記受信したデータを前記メモリに転送する転送手段と、
前記受信したデータの長さと前記予測手段の予測したページオフセットとに基づいて、次回のデータ受信の際に用いるページオフセットの予測値を設定する設定手段と、
コンピュータシステムから前記予測手段の予測したページオフセットの予測値について予測誤りの通知があるときに、前記設定手段の設定したページオフセットの予測値をコンピュータシステムから通知されるページオフセットに従って変更する変更手段とを備えることを、
特徴とするデータ受信装置。
A data receiving device that is attached to a computer system, receives data sent from the outside, and temporarily stores it in a memory in the computer system,
A predicting means for predicting a page offset of an application memory area as a data transfer destination from the memory when receiving data;
A transfer means for designating a data storage start address defined by a head address of a data transfer destination page on the memory and a page offset predicted by the prediction means, and transferring the received data to the memory;
A setting unit that sets a predicted value of a page offset to be used at the time of next data reception based on the length of the received data and the page offset predicted by the prediction unit;
Change means for changing the predicted value of the page offset set by the setting means according to the page offset notified from the computer system when there is a notification of a prediction error from the computer system for the predicted value of the page offset predicted by the prediction means; Having
A characteristic data receiving apparatus.
請求項2に記載のデータ受信装置において、
送信元情報及び送信先情報に対応付けて、前記設定手段の設定したページオフセットの予測値を記憶する記憶手段を備え、
前記予測手段は、データを受信するときに、その受信データの送信元情報及び送信先情報を抽出して、その抽出した送信元情報及び送信先情報をキーにして前記記憶手段の記憶情報を参照することでページオフセットを予測することを、
特徴とするデータ受信装置。
The data receiving device according to claim 2,
A storage unit that stores the predicted value of the page offset set by the setting unit in association with the transmission source information and the transmission destination information;
When receiving the data, the prediction means extracts the transmission source information and the transmission destination information of the received data, and refers to the storage information of the storage means using the extracted transmission source information and the transmission destination information as a key. Predicting the page offset by
A characteristic data receiving apparatus.
請求項2に記載のデータ受信装置において、
送信元情報及び送信先情報に対応付けて、固定のページオフセットを用いるのか否かということと、固定のページオフセットを用いるものについては固定のページオフセットを記憶し、固定のページオフセットを用いないものについては、前記設定手段の設定したページオフセットの予測値を記憶する記憶手段を備え、
前記予測手段は、データを受信するときに、その受信データの送信元情報及び送信先情報を抽出して、その抽出した送信元情報及び送信先情報をキーにして前記記憶手段の記憶情報を参照することでページオフセットを予測することを、
特徴とするデータ受信装置。
The data receiving device according to claim 2,
Whether to use a fixed page offset in association with the transmission source information and the transmission destination information, and for those using a fixed page offset, store a fixed page offset and do not use a fixed page offset For, comprising storage means for storing the predicted value of the page offset set by the setting means,
When receiving the data, the prediction means extracts the transmission source information and the transmission destination information of the received data, and refers to the storage information of the storage means using the extracted transmission source information and the transmission destination information as a key. Predicting the page offset by
A characteristic data receiving apparatus.
請求項3又は4に記載のデータ受信装置において、
コンピュータシステムから通知されるページオフセットの初期値に従って、前記記憶手段に対して、ページオフセットの予測値を初期登録する初期登録手段を備えることを、
特徴とするデータ受信装置。
In the data receiving device according to claim 3 or 4,
In accordance with the initial value of the page offset notified from the computer system, the storage means comprises initial registration means for initially registering the predicted value of the page offset.
A characteristic data receiving apparatus.
データ受信装置から転送されてくるデータを受信して、それをメモリに一時的に保存してから、アプリケーションプログラムの管理するアプリケーション用メモリ領域へ転送するコンピュータシステムであって、
前記データ受信装置からデータ転送の際に指定されるデータ格納開始アドレスに基づいて、前記データ受信装置の予測したページオフセットを特定する第1の特定手段と、
前記メモリに格納したデータを解析することで、そのデータの転送先となる前記アプリケーション用メモリ領域のページオフセットを特定する第2の特定手段と、
前記第1の特定手段の特定したページオフセットと前記第2の特定手段の特定したページオフセットとが一致するのか否かを判断する判断手段と、
前記判断手段が2つのページオフセットの不一致を判断するときに、前記第2の特定手段の特定したページオフセットと前記メモリに格納したデータの長さとに基づいて、データ転送後における前記アプリケーション用メモリ領域のページオフセットを特定して、前記データ受信装置に通知する通知手段と、
前記判断手段の判断結果に基づいて、前記メモリから前記アプリケーション用メモリ領域へのデータ転送方法を決定する決定手段とを備えることを、
特徴とするコンピュータシステム。
A computer system that receives data transferred from a data receiving device, temporarily stores the data in a memory, and then transfers the data to an application memory area managed by an application program,
First specifying means for specifying a page offset predicted by the data receiving device based on a data storage start address specified at the time of data transfer from the data receiving device;
Analyzing the data stored in the memory, a second specifying means for specifying a page offset of the application memory area to which the data is transferred;
Determining means for determining whether or not the page offset specified by the first specifying means and the page offset specified by the second specifying means match;
The application memory area after data transfer based on the page offset specified by the second specifying means and the length of data stored in the memory when the determining means determines a mismatch between two page offsets Notification means for identifying the page offset and notifying the data receiving device;
Determining means for determining a data transfer method from the memory to the application memory area based on a determination result of the determination means;
A featured computer system.
請求項6に記載のコンピュータシステムにおいて、
前記決定手段は、前記判断手段が2つのページオフセットの不一致を判断するときには、データコピー操作に従ってデータ転送を行うことを決定し、前記判断手段が2つのページオフセットの一致を判断するときには、ページマップ切り替え可能なページのデータについてはページマップ切り替え操作によってデータ転送を行い、それ以外のページのデータについてはデータコピー操作に従ってデータ転送を行うことを決定することを、
特徴とするコンピュータシステム。
The computer system according to claim 6.
The determining unit determines to perform data transfer according to a data copy operation when the determining unit determines a mismatch between two page offsets, and determines a page map when the determining unit determines a match between two page offsets. For page data that can be switched, data transfer is performed by a page map switching operation, and for other page data, it is determined to perform data transfer according to a data copy operation.
A featured computer system.
JP2006313769A 2006-11-21 2006-11-21 Data receiving method, data receiving apparatus and computer system Expired - Fee Related JP4772648B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006313769A JP4772648B2 (en) 2006-11-21 2006-11-21 Data receiving method, data receiving apparatus and computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006313769A JP4772648B2 (en) 2006-11-21 2006-11-21 Data receiving method, data receiving apparatus and computer system

Publications (2)

Publication Number Publication Date
JP2008129832A JP2008129832A (en) 2008-06-05
JP4772648B2 true JP4772648B2 (en) 2011-09-14

Family

ID=39555584

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006313769A Expired - Fee Related JP4772648B2 (en) 2006-11-21 2006-11-21 Data receiving method, data receiving apparatus and computer system

Country Status (1)

Country Link
JP (1) JP4772648B2 (en)

Also Published As

Publication number Publication date
JP2008129832A (en) 2008-06-05

Similar Documents

Publication Publication Date Title
US7836274B2 (en) Method and system for combining page buffer list entries to optimize caching of translated addresses
US7472205B2 (en) Communication control apparatus which has descriptor cache controller that builds list of descriptors
US6230241B1 (en) Apparatus and method for transferring data in a data communications device
US7234006B2 (en) Generalized addressing scheme for remote direct memory access enabled devices
EP2472411A1 (en) SAS expander connection routing techniques
US20110113197A1 (en) Queue arrays in network devices
US20050114561A1 (en) Method for performing DMA transfers with dynamic descriptor structure
US20070041383A1 (en) Third party node initiated remote direct memory access
US20230214354A1 (en) Method and Device for Local Random Readahead of File in Distributed File System
US7441179B2 (en) Determining a checksum from packet data
JP7671732B2 (en) PROGRAMMABLE NETWORK INTERFACE DEVICE COMPRISING A HOST COMPUTING DEVICE AND A NETWORK INTERFACE DEVICE - Patent application
US10097658B2 (en) Traffic control of packet transfer
CN105830027B (en) method and apparatus for prefetching and processing jobs for processor cores in a network processor
JPWO2008120325A1 (en) Switch and information processing apparatus
US6182164B1 (en) Minimizing cache overhead by storing data for communications between a peripheral device and a host system into separate locations in memory
JP4772648B2 (en) Data receiving method, data receiving apparatus and computer system
US6947971B1 (en) Ethernet packet header cache
US20050198400A1 (en) Systems and methods using nic-based prefetching for host TCP context lookup
JP2004246702A (en) Computer system, computer apparatus, and data access method and program in computer system
CN116991855A (en) Hash table processing method, device, equipment, medium, controller and solid state disk
CN1352773A (en) Method and apparatus for facilitating direct memory access
US8849940B1 (en) Wide area network file system with low latency write command processing
JP2021129162A (en) Communication device, control method, and program
JP2012164209A (en) Cache control method, cache control device, and program for cache control
JP2014235531A (en) Data transfer device, data transfer system, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090710

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110613

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: 20110621

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: 20110622

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140701

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4772648

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees