[go: up one dir, main page]

JP2002342038A - Disk unit that controls the execution order of commands - Google Patents

Disk unit that controls the execution order of commands

Info

Publication number
JP2002342038A
JP2002342038A JP2001145781A JP2001145781A JP2002342038A JP 2002342038 A JP2002342038 A JP 2002342038A JP 2001145781 A JP2001145781 A JP 2001145781A JP 2001145781 A JP2001145781 A JP 2001145781A JP 2002342038 A JP2002342038 A JP 2002342038A
Authority
JP
Japan
Prior art keywords
command
write
read
cache
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2001145781A
Other languages
Japanese (ja)
Inventor
Yukie Hiratsuka
幸恵 平塚
Hitoshi Ogawa
仁 小川
Manabu Nishikawa
西川  学
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2001145781A priority Critical patent/JP2002342038A/en
Publication of JP2002342038A publication Critical patent/JP2002342038A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

PROBLEM TO BE SOLVED: To shorten access time and to improve the performance of a disk device by controlling the execution order of commands with both of read commands and write commands as objects. SOLUTION: At the time of read and write, read data and write request data are read to a cache 104 and managed. On condition that the write request data on the cache are not to be subscribed by the read data read by the read command, the execution order of the read command and the write command is controlled so as to shorten the access time.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ディスクへのライ
ト要求データの書き込み及びリード要求データのディス
クからの読み出しの際にかかるアクセス時間を短縮する
ようコマンドの実行順序を制御し、ディスク装置の性能
を向上させるための技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention controls the execution order of commands so as to reduce the access time required when writing write request data to a disk and reading read request data from the disk, and improves the performance of the disk device. Related to the technology for improving.

【0002】[0002]

【従来の技術】ハードディスクでは、キャッシュを設け
ホストから転送されるライト要求データを一旦キャッシ
ュに蓄積して管理し、キャッシュからディスクにライト
要求データを書き込むことにより、ホストからのデータ
転送速度(ディスクへのライト要求データの書き込み速
度に比べると速い)とディスクへのライト要求データの
書き込み速度(ホストからのライト要求データの転送速
度に比べると遅い)の差を吸収している。
2. Description of the Related Art In a hard disk, a cache is provided, write request data transferred from a host is temporarily stored in a cache, and the cache is managed. The difference between the write request data write speed and the disk write request data write speed (slow compared to the write request data transfer speed from the host) is absorbed.

【0003】具体的には、受領したライトコマンドのラ
イト要求データをキャッシュに転送して管理するが、一
連の連続ライトコマンドによりディスク上の連続領域に
データを書き込む場合、一度の書き込み処理でそれら一
連のライトコマンドを実行できるようにしている。
Specifically, write request data of a received write command is transferred to a cache for management. When data is written to a continuous area on a disk by a series of continuous write commands, the data is written in a single write process. To execute the write command.

【0004】また、特開平11−265262号公報記載の「高
速ライトキャッシュディスク装置」のように、キャッシ
ュに転送されたライト要求データの管理情報に基づき、
一連のライトコマンドを処理する際のアクセス時間が最
少になるようライトコマンドの実行順序を制御すること
により、一連のライトコマンドの実行時間を短縮するよ
うにした手法がある。
Further, based on management information of write request data transferred to a cache, as in a “high-speed write cache disk device” described in Japanese Patent Application Laid-Open No. H11-265262,
There is a method of shortening the execution time of a series of write commands by controlling the execution order of the write commands so as to minimize the access time when processing a series of write commands.

【0005】[0005]

【発明が解決しようとする課題】コマンドの実行時間を
短縮するには、コマンドにより指示されたディスク上の
特定領域へのアクセスにかかる時間を短縮することが重
要である。また、コマンドにより指示されたディスク上
の特定領域へのアクセスにかかる時間を短縮するには、
アクセス時間が最少になるようコマンドの実行順を制御
した上でコマンドを実行することが有効である。
In order to reduce the execution time of a command, it is important to reduce the time required to access a specific area on a disk specified by the command. To shorten the time required to access a specific area on the disk specified by the command,
It is effective to execute the command after controlling the execution order of the commands so as to minimize the access time.

【0006】特開平11−265262号公報に記載の「高速ラ
イトキャッシュディスク装置」では、ディスクの特定領
域へのアクセス時間を短縮するためにコマンドの実行順
を制御しているものの、コマンド実行順の制御は、ライ
トコマンドに限られている。
In the "high-speed write cache disk device" described in Japanese Patent Application Laid-Open No. H11-265262, the order of command execution is controlled in order to reduce the access time to a specific area of the disk. Control is limited to write commands.

【0007】そのため、ライトコマンドとリードコマン
ドを交互に処理する必要が生じた場合、アクセス時間を
短縮できないという問題があった。
Therefore, when it becomes necessary to alternately process the write command and the read command, there is a problem that the access time cannot be reduced.

【0008】本発明の目的は、リードコマンド及びライ
トコマンドを対象にしてコマンドの実行順序を制御し、
アクセス時間を短縮して、ディスク装置の性能を向上さ
せることである。
An object of the present invention is to control a command execution order for a read command and a write command,
The purpose is to shorten the access time and improve the performance of the disk device.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
に本発明のディスク装置は、キャッシュ上のライト要求
データが、リードコマンドにより読み込まれたデータに
より上書きされないようにすることを前提に、ライトコ
マンド及びリードコマンドを対象にしてアクセス時間を
短縮するようコマンドの実行順序を制御するようにして
いる。
In order to achieve the above object, a disk device according to the present invention is designed to prevent a write request data in a cache from being overwritten by data read by a read command. The command execution order is controlled so as to shorten the access time for the command and the read command.

【0010】すなわち、本発明は、第1の様態として、
リード及びライトの際にリードデータ及びライト要求デ
ータをキャッシュに読み込み管理するディスク装置であ
って、キャッシュ上のライト要求データが、リードコマ
ンドにより読み込まれるデータにより上書きされないよ
うにすることを前提に、アクセス時間が短縮されるよう
コマンドの実行順序を決める手段をもつことを特徴とす
るディスク装置を提供している。
That is, the present invention provides, as a first aspect,
A disk device that reads and manages read data and write request data into a cache at the time of reading and writing, and performs access by assuming that write request data in the cache is not overwritten by data read by a read command. A disk device characterized by having means for determining the order of command execution so that time is reduced.

【0011】なお、上記コマンド実行順序制御手段は、
ディスクへのデータの書き込みを停止あるいは待機させ
ることができ、適当なタイミングで再開または開始可能
にすることでリード処理をライト処理に優先させること
ができる。
[0011] The command execution order control means includes:
Writing of data to the disk can be stopped or put on standby, and read processing can be given priority over write processing by allowing restart or start at an appropriate timing.

【0012】また、上記ディスク装置は、キャッシュか
らディスクにデータを書き込んでいる最中にリードコマ
ンドを受領した場合、アクセスを短くするタイミングで
該受領リードコマンドをライト処理に割り込みをかけて
実行させることができる。
Further, when the disk device receives a read command while data is being written from the cache to the disk, the disk device interrupts the write process and executes the received read command at a timing for shortening access. Can be.

【0013】また、上記目的を達成するために本発明の
ディスク装置は、コマンドの実行順を制御するに際し
て、ある一定の時間次のコマンドの発行を待つことによ
り、次のコマンドの出方を見ながらコマンドの実行順を
決めることができるようにしている。
Further, in order to achieve the above object, the disk device of the present invention waits for a certain time to issue the next command when controlling the execution order of the commands, so that the way of issuing the next command is checked. The order of command execution can be determined.

【0014】すなわち、本発明のディスク装置は、第2
の様態として、第1の様態において、未処理のライトコ
マンドがない状況でライトコマンドを受領した場合及び
ライト処理を停止している時に新たにライトコマンドを
受領した場合において、現ヘッド位置と未処理のライト
コマンドのアドレスまでの距離があらかじめ設定した一
定距離内にある場合にのみ直ちに処理を開始し、そうで
ない場合は一定時間次のコマンドの発行を待ち次コマン
ドの出方を見た上でコマンドの実行順序を決める手段を
さらに備え、さらに上記コマンド実行順序制御手段は、
アクセス時間を最少化するタイミングで、待機または停
止しているライトコマンドの処理を開始または再開する
ことができる手段を提供する。
That is, the disk device of the present invention
In the first mode, when a write command is received in a state where there is no unprocessed write command and when a new write command is received while the write processing is stopped, the current head position and the unprocessed The process starts immediately only when the distance to the address of the write command is within the preset fixed distance. Otherwise, waits for the next command to be issued for a fixed time and checks the way the next command is issued. The command execution order control means further comprises means for determining the execution order of
Provided is a means for starting or resuming the processing of a standby or stopped write command at a timing to minimize the access time.

【0015】[0015]

【発明の実施の形態】以下、本発明の実施例を図面によ
り説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0016】図1 は本発明を適用したディスク装置の
例である。本発明を適用するディスク装置は、先読み制
御プログラムを実装するプログラムROM101、ROM上の
制御プログラムを読み込み実行する制御プロセッサ10
2、ホストとキャッシュ間、キャッシュとディスク間の
データ転送を制御する磁気ディスク制御装置103、リ
ードデータ/ライト要求データを一時的に書き込むキャ
ッシュ104(尚、キャッシュには、ディスクから読み
込んだデータについての情報を管理するキャッシュデー
タ管理テーブル(リードデータ用)105、ホストから
転送されたライト要求データについての情報を管理する
キャッシュデータ管理テーブル(ライトデータ用)10
6を備える)、データの読み書きをする際に、指定され
た位置にヘッドを移動するための制御を行うサーボ制御
部107、サーボ制御部の指示に従って、ヘッドを移動
するボイスコイルモータ(VCM)108、ディスクの回
転を制御するモータドライバ109、ヘッドから読み込
んだ磁気信号から指定されたヘッドの信号だけを選択す
るセレクタ110、セレクタから送られたアナログデー
タをディジタルデータに変換するまたは磁気ディスク制
御装置から送られたディジタルデータをアナログデータ
に変換する信号処理部111よりなる。
FIG. 1 shows an example of a disk drive to which the present invention is applied. A disk device to which the present invention is applied includes a program ROM 101 for mounting a prefetch control program, and a control processor 10 for reading and executing a control program on the ROM.
2. A magnetic disk controller 103 for controlling data transfer between the host and the cache, and between the cache and the disk, and a cache 104 for temporarily writing read data / write request data (the cache includes data read from the disk. Cache data management table (for read data) 105 for managing information, and cache data management table (for write data) 10 for managing information on write request data transferred from the host
6), when reading and writing data, a servo control unit 107 for controlling movement of the head to a designated position, and a voice coil motor (VCM) 108 for moving the head in accordance with an instruction of the servo control unit. A motor driver 109 for controlling the rotation of the disk, a selector 110 for selecting only a specified head signal from magnetic signals read from the head, and converting analog data sent from the selector into digital data or from a magnetic disk controller. It comprises a signal processing unit 111 for converting the transmitted digital data into analog data.

【0017】次にリードコマンド処理における動作を、
図1の構成に基づき説明する。
Next, the operation in the read command processing will be described.
Description will be made based on the configuration of FIG.

【0018】ホストは、ディスクに接続されたバスを介
してディスクに対しリードコマンドデータを送信する。
図2に、リード処理の際に発行されるコマンドの構成
を示す。リードコマンドは、リードコマンドを示すコー
ド21、リードするデータの論理ブロックアドレス(以
下、LBA)22、リード要求データのサイズを示すホス
ト要求データ転送数23よりなる。
The host transmits read command data to the disk via a bus connected to the disk.
FIG. 2 shows a configuration of a command issued at the time of read processing. The read command includes a code 21 indicating the read command, a logical block address (hereinafter, LBA) 22 of the data to be read, and a host request data transfer number 23 indicating the size of the read request data.

【0019】ディスク装置はリードコマンドを受け取る
と、キャッシュメモリ上にあるキャッシュデータ管理テ
ーブル(リードデータ用、ライトデータ用の両方)を用
いて、要求されたデータがキャッシュ上に存在するか検
索する。図4にキャッシュデータ管理テーブル(リード
データ用、ライトデータ用共通)の構成を示す。キャッ
シュデータ管理テーブルはキャッシュに書き込んだデー
タの開始LBA41、キャッシュ上開始アドレス42、デ
ータサイズ43より成る。ヒット検索の際には、キャッ
シュデータ管理テーブル(リードデータ用、ライトデー
タ用の両方)105・106を用いて、リード要求デー
タのすべてがキャッシュ上に存在するかを調べ、存在す
る場合は、該キャッシュ上データのキャッシュ上開始ア
ドレスからホスト要求データのキャッシュ上での開始ア
ドレスを算出し、該開始アドレスからホスト要求データ
を読み出しホストに転送する。キャッシュ上にホスト要
求データが存在しない場合には、プログラムROM101
に実装されている論理アドレス変換プログラムを用いて
LBAをディスク上での配置を示す物理アドレスに変換
し、次にサーボ制御部107を用いて、物理アドレスの
位置を検出しさらに信号制御部111を制御することで
ホストが指定したデータを磁気ディスク制御装置103
に転送する。磁気ディスク制御装置は、転送されたデー
タをキャッシュ104に書き込むと同時に、磁気ディス
ク装置に接続されたバス112を介してホストに要求デ
ータを転送し、さらにキャッシュに書き込んだデータに
ついての情報をキャッシュデータ管理テーブル(リード
データ用)105に登録する。
When the disk device receives the read command, it uses the cache data management table (both for read data and write data) in the cache memory to search whether the requested data exists in the cache. FIG. 4 shows the configuration of the cache data management table (common for read data and write data). The cache data management table includes a start LBA 41 of data written to the cache, a start address on the cache 42, and a data size 43. At the time of a hit search, the cache data management tables (both for read data and for write data) 105 and 106 are used to check whether or not all of the read request data exists in the cache. The start address of the host request data on the cache is calculated from the cache start address of the data on the cache, and the host request data is read from the start address and transferred to the host. If the host request data does not exist in the cache, the program ROM 101
Using the logical address translation program implemented in
The LBA is converted to a physical address indicating an arrangement on the disk, and then the position of the physical address is detected by using the servo control unit 107 and the signal control unit 111 is controlled to transfer the data specified by the host to the magnetic disk. Control device 103
Transfer to The magnetic disk control device writes the transferred data to the cache 104 and, at the same time, transfers the requested data to the host via the bus 112 connected to the magnetic disk device, and further stores information about the data written to the cache as cache data. It is registered in the management table (for read data) 105.

【0020】またライトコマンド処理における動作を図
1の構成に基づき説明する。
The operation in the write command processing will be described based on the configuration shown in FIG.

【0021】ホストは、ディスクに接続されたバスを介
してディスクに対しライトコマンドデータを送信する。
図3に、ライト処理の際に発行されるコマンドの構成
を示す。ライトコマンドは、ライトコマンドを示すコー
ド31、ライト要求データのディスク上の位置を示すLB
A32、ライト要求データのサイズを示すホスト要求デ
ータ転送数33、ディスクに書き込むデータ34よりな
る。
The host transmits write command data to the disk via a bus connected to the disk.
FIG. 3 shows a configuration of a command issued at the time of a write process. The write command includes a code 31 indicating the write command, and an LB indicating the position of the write request data on the disk.
A32, a host request data transfer number 33 indicating the size of the write request data, and data 34 to be written to the disk.

【0022】磁気ディスク制御装置103は、ライトコ
マンドを受け取るとすぐに、あらかじめ設定しておいた
キャッシュ上のライト要求データ書き込み可能位置から
ライト要求データを書き込む。但し、キャッシュ上のラ
イト要求データは、ディスクに書き込まれるまでは、キ
ャッシュ上に保持しなければならないため、キャッシュ
が未書き込みのライト要求データでいっぱいになり、新
たにライト要求データを書き込むスペースがない場合に
は、ホストからキャッシュへのデータ転送を停止し、キ
ャッシュ上のライト要求データがディスクに書き込ま
れ、キャッシュに空き領域が生じるまで待つ必要があ
る。また、キャッシュ上のライト要求データの書き込み
可能位置は、ライトコマンド受領前にあらかじめ設定さ
れているため、磁気ディスク制御装置103は、ライト
コマンドを受領すると同時にライト要求データをキャッ
シュに転送することができる。磁気ディスク制御装置1
03は、キャッシュにすべてのライト要求データを転送
すると、キャッシュ上のライト要求データに関する情報
をキャッシュデータ管理テーブル(ライトデータ用)1
06に登録する。
Upon receiving the write command, the magnetic disk control device 103 writes the write request data from a preset write request data writeable position on the cache. However, the write request data in the cache must be held in the cache until it is written to the disk. Therefore, the cache is full of unwritten write request data, and there is no space for writing new write request data. In this case, it is necessary to stop the data transfer from the host to the cache, wait until the write request data in the cache is written to the disk, and a free area is created in the cache. Further, since the write-enabled position of the write request data on the cache is set before receiving the write command, the magnetic disk control device 103 can transfer the write request data to the cache at the same time as receiving the write command. . Magnetic disk controller 1
When all the write request data is transferred to the cache, information about the write request data in the cache is stored in the cache data management table (for write data) 1.
Register at 06.

【0023】尚、キャッシュ上リードデータの転送元で
あるディスク上のデータが、ライトコマンドにより更新
される場合には、データの一貫性を保証するため、キャ
ッシュデータ管理テーブル(リードデータ用)105上
の、該ライトデータにより更新されるリードデータの情
報を無効にする。
When data on the disk, which is the transfer source of the read data on the cache, is updated by the write command, the data on the cache data management table (for read data) 105 is guaranteed in order to guarantee data consistency. Of the read data updated by the write data.

【0024】また未実行のライトコマンドにおいても複
数のライトコマンドが同じ領域を更新する場合には、デ
ータの一貫性を保証するため、常に最新のライト要求デ
ータだけがキャッシュデータ管理テーブル(ライトデー
タ用)106に登録されるようキャッシュデータ管理テ
ーブル(ライトデータ用)106を更新する。
When a plurality of write commands update the same area even in an unexecuted write command, only the latest write request data is always stored in the cache data management table (write data ) 106 so as to be registered in the cache data management table (for write data) 106.

【0025】次にキャッシュデータ管理テーブル(ライ
トデータ用)106の情報に基き、リードコマンド処理
時と同様のやり方でコマンドにより指示された位置を検
出し、磁気ディスク制御装置103及び信号処理部11
1を用いてキャッシュに書き込んだライト要求データを
ディスクに書き込む。尚、キャッシュ上のライト要求デ
ータのディスクへの書き込みは、ライトコマンドの受領
順に行う必要はない。
Next, based on the information in the cache data management table (for write data) 106, the position specified by the command is detected in the same manner as in the read command processing, and the magnetic disk controller 103 and the signal processor 11
1 to write the write request data written to the cache to the disk. It is not necessary to write the write request data on the cache to the disk in the order in which the write commands are received.

【0026】ライトコマンドとリードコマンドの処理の
仕方は以上であるが、ディスクはライトコマンドを受領
した場合、キャッシュにデータを転送すると、ホストに
対してコマンドの発行を許可するため、ディスクにデー
タを書き込んでいる最中に新たにコマンドを受領するこ
とができる。
The manner of processing the write command and the read command is as described above. When the disk receives the write command and transfers the data to the cache, the disk issues the command to permit the host to issue the command. A new command can be received while writing is in progress.

【0027】また、リード処理中は、ホストがリード要
求データを取得したのを確認しないと次のコマンドを発
行しないため、次のコマンドを受領することはない。
During the read processing, the next command is not issued unless the host confirms that the host has acquired the read request data, so that the next command is not received.

【0028】以下では、本発明においてライトコマンド
及びリードコマンドを対象にして、アクセス時間を短縮
するようコマンドの実行順序を制御する手段の一例につ
いて、図5、図6のフローチャートを用いて説明する。
Hereinafter, an example of means for controlling the execution order of commands so as to reduce the access time for write commands and read commands in the present invention will be described with reference to the flowcharts of FIGS.

【0029】尚、図5、図6では、ホストが発行したコ
マンドに対してだけではなく、複数のコマンドを一回の
アクセスで一度に処理できる場合、該コマンド群に対し
てもコマンドという言葉を使用した。
In FIG. 5 and FIG. 6, when not only a command issued by the host but also a plurality of commands can be processed at once by a single access, the word command is used for the command group. used.

【0030】図5は、ライト処理中にリードコマンド受
領した場合のリードコマンドの処理方法を示している。
FIG. 5 shows a method of processing a read command when a read command is received during a write process.

【0031】ライト処理中、リードコマンドを受領した
場合、キャッシュ上のキャッシュデータ管理テーブル
(リードデータ用、ライトデータ用の両方)105・1
06を用いてホスト要求データを検索し(ステップ50
1)、該リードコマンドによるホスト要求データが、キ
ャッシュ上に完全に存在する場合(以下このことをヒッ
トという)は、キャッシュへのデータの書き込みを継続
したまま、ホストが要求するリード要求データをキャッ
シュからホストに転送する(ステップ502)。
If a read command is received during the write process, the cache data management table (both for read data and for write data) 105.1 on the cache
06 to retrieve host request data (step 50).
1) If the host-requested data by the read command completely exists in the cache (hereinafter, this is referred to as a hit), the read-request data requested by the host is cached while the data writing to the cache is continued. To the host (step 502).

【0032】また、上記受領リードコマンドによるホス
ト要求データが、キャッシュデータ管理テーブル(ライ
トデータ用)106を検索することにより部分的にキャ
ッシュ上に存在するか(以下このことをハーフヒットと
いう)調べ(ステップ503)、該受領リードコマンド
のリード要求データが未書き込みのライト要求データの
中に一部分存在することが判明したら、キャッシュ上の
ディスクに未書き込みのライト要求データをすべてディ
スクに書き込んでから(ステップ504)リード処理を
行うようにする(ステップ508)。
Further, it is checked whether the host request data by the received read command partially exists in the cache by searching the cache data management table (for write data) 106 (hereinafter, this is called a half hit) ( Step 503), if it is determined that the read request data of the received read command partially exists in the unwritten write request data, all the write request data not yet written to the disk on the cache is written to the disk (step 503). 504) Read processing is performed (step 508).

【0033】またもし、キャッシュからディスクにライ
ト要求データを書き込み中に受領したリードコマンドの
リード要求データがまったくキャッシュ上に存在しない
場合は、該リードコマンドによるリード要求データのデ
ィスク上でのアドレスが、現在書き込みを行っているヘ
ッド位置とあらかじめ設定しておいた一定距離範囲内に
あるかを調べ(ステップ505)、該リード要求データ
の位置が、現在のヘッドの位置から一定の距離範囲にあ
れば、該リード要求データをキャッシュに読み込んだ場
合にもキャッシュ上の未書き込みのライト要求データが
該リードコマンドによるリード要求データにより上書き
されないか調べ(ステップ506)、上書きされないよ
うであれば現在処理中のライトコマンドが終了したらラ
イト処理を停止し(ステップ507)、該リードコマン
ドによるリード処理を行う(ステップ508)。
If the read request data of the read command received while writing the write request data from the cache to the disk does not exist at all in the cache, the address of the read request data by the read command on the disk is It is checked whether the position of the read request data is within a certain distance from the current head position by checking whether the position of the head currently writing is within a predetermined distance range (step 505). Even when the read request data is read into the cache, it is checked whether unwritten write request data in the cache is overwritten by the read request data by the read command (step 506). When the write command is completed, stop the write process. Step 507), performs a read process according to the read command (step 508).

【0034】またもし、該受領リードコマンドによるリ
ード要求データの物理アドレスが、現在ライト要求デー
タ書き込み中のヘッドの位置から一定の距離内になかっ
た場合は、現在実行中のライトコマンド処理を継続し
(ステップ510)、該実行中のライトコマンド処理を
終了した後も未処理のライトコマンドがあるかどうかを
調べ(ステップ511)、未処理のライトコマンドがあ
れば、 未処理のライトコマンドを新たに実行し(ステ
ップ512)、該ライトコマンドを対象にしてステップ
505以降の処理を繰り返す。また該実行中のライトコ
マンド終了後、未処理のライトコマンドがない場合は、
該受領リードコマンドを処理する(ステップ508)。
If the physical address of the read request data according to the received read command is not within a certain distance from the position of the head currently writing the write request data, the write command processing currently being executed is continued. (Step 510) It is checked whether or not there is an unprocessed write command even after finishing the currently executed write command processing (Step 511). If there is an unprocessed write command, the unprocessed write command is newly added. The write command is executed (step 512), and the process from step 505 is repeated for the write command. If there is no unprocessed write command after the end of the currently executed write command,
The received read command is processed (step 508).

【0035】またもし該リードコマンドによるリード要
求データにより、キャッシュ上の未書き込みのライト要
求データが上書きされるようであれば、現在実行中のラ
イトコマンド処理を継続し(ステップ509)、該ライ
トコマンド処理終了後新たに開始したライトコマンドに
対して、ステップ505以降の処理を行う。
If unread write request data in the cache is overwritten by the read request data by the read command, the currently executed write command processing is continued (step 509). The processing from step 505 is performed on the write command newly started after the processing is completed.

【0036】以下では、図6を用いて、ライトコマンド
の処理方法を示す。尚、ライト処理中のリードコマンド
の処理方法については、図5を使って説明した。
Hereinafter, a method of processing a write command will be described with reference to FIG. The method of processing a read command during a write process has been described with reference to FIG.

【0037】ディスクはライトコマンドを受領すると、
あらかじめ設定してあるライト要求データ書き込み可能
位置から自動的にキャッシュにデータを転送するため、
以下ではキャッシュへのライト要求データ転送以外のラ
イトの処理方法について説明する。
When the disk receives the write command,
To automatically transfer data to the cache from the pre-set write request data writable position,
Hereinafter, a write processing method other than transfer of write request data to the cache will be described.

【0038】本発明によるディスク装置では、ライトコ
マンドを受領すると、まず未処理のライトコマンドがあ
るかどうか調べ(ステップ602)、未処理のライトコ
マンドがなければ、該受領ライトコマンドに対するライ
ト処理をすぐには開始せず、次のコマンドの発行を待つ
(ステップ603)。但し、予め設定してある一定時間
だけ次のコマンドの発行を待つこととし、該一定時間内
に次のコマンドが発行された場合は、該受領ライトコマ
ンドの次ぎのコマンドがライトかどうかを調べ(ステッ
プ601)、該ライトコマンドのライト処理を行わない
まま、該ライトコマンドの次のコマンドに対してステッ
プ601以降の処理を行う。また、該一定時間内に次の
コマンドが発行されない場合は、該ライトコマンドのラ
イト処理を開始する(ステップ604)。
In the disk device according to the present invention, upon receiving a write command, it is first checked whether there is an unprocessed write command (step 602). If there is no unprocessed write command, the write process for the received write command is immediately performed. , And waits for the next command to be issued (step 603). However, it waits for the issuance of the next command for a preset fixed time, and if the next command is issued within the fixed time, it is checked whether the command next to the received write command is a write ( Step 601) The processing after step 601 is performed on the next command after the write command without performing the write processing of the write command. If the next command is not issued within the fixed time, the write command is started (step 604).

【0039】また未処理のライトコマンドがあるかどう
か調べ、未処理のライトコマンドがあれば、ライト処理
が待機または停止中かどうかを調べる(ステップ60
5)。ライト処理が待機または停止中であれば、該ライ
トコマンドのライト要求データをキャッシュに書き込む
だけの領域が、キャッシュ上にあるかどうかをしらべ
(ステップ606)、該ライトコマンドのライト要求デ
ータをキャッシュに書き込むだけの領域がないようであ
れば、ライト処理を開始または再開する(ステップ60
4)。
It is checked whether or not there is an unprocessed write command. If there is an unprocessed write command, it is checked whether or not the write process is waiting or stopped (step 60).
5). If the write process is waiting or stopped, it is checked whether there is an area in the cache for writing the write request data of the write command in the cache (step 606), and the write request data of the write command is stored in the cache. If there is no area for writing, the write processing is started or restarted (step 60).
4).

【0040】また、ライト処理が待機または停止中であ
って、該ライトコマンドのライト要求データをキャッシ
ュに書き込むだけの領域が、キャッシュ上にあるかどう
かをしらべ(ステップ606)、キャッシュ上に該空き
領域があれば、待機または停止中のライトコマンドの中
に、現在のヘッドの位置から一定距離内の領域にアクセ
スするものがあるかどうかを調べる(ステップ60
7)。この時待機または停止中のライトコマンドの中に
現在のヘッドの位置から一定距離範囲内の領域にアクセ
スするものがあれば、該一定距離内の領域にアクセスす
るライトコマンドの処理を開始する(ステップ60
8)。また、待機または停止中のライトコマンドの中に
現在のヘッドの位置から一定の距離範囲内の領域にアク
セスするものがなければ待機または停止中のコマンド数
が、あらかじめ設定してある待機または停止可能コマン
ド数に達したか調べ(ステップ609)、待機または停
止中のライトコマンドが待機または停止コマンド可能数
を超えた場合は、ライト処理を開始または再開する(ス
テップ604)。また待機または停止中のライトコマン
ドが待機または停止コマンド可能数以下である場合は、
次のコマンドの発行を待ち(ステップ603)、ステッ
プ603以降の処理を行う。
Further, it is checked whether or not the write processing is waiting or stopped and there is an area in the cache for writing the write request data of the write command to the cache (step 606). If there is an area, it is checked whether any of the write commands on standby or stopped accesses an area within a certain distance from the current head position (step 60).
7). At this time, if any of the waiting or stopped write commands accesses an area within a certain distance from the current head position, the processing of the write command for accessing the area within the certain distance is started (step S1). 60
8). Also, if there are no write commands in standby or stop that access the area within a certain distance from the current head position, the number of commands in standby or stop can be set to standby or stop in advance. It is checked whether the number of commands has reached (step 609). If the number of write commands on standby or stopped exceeds the allowable number of standby or stop commands, write processing is started or restarted (step 604). If the number of waiting or stopped write commands is less than the number of standby or stop commands,
It waits for the next command to be issued (step 603), and performs the processing from step 603.

【0041】またライト処理継続中にライトコマンドを
受領した場合は、キャッシュに該受領ライトコマンドの
ライト要求データを書き込む領域があるかどうかを調べ
(ステップ610)、該領域がなければ、キャッシュに
必要領域ができるのを待ち(ステップ611)、ライト
処理を継続する(ステップ612)。また、キャッシュ
に該受領ライトコマンドのライト要求データを書き込む
領域があればそのままライト処理を継続する(ステップ
612)。
If a write command is received during the continuation of the write process, it is checked whether or not the cache has an area for writing the write request data of the received write command (step 610). Wait for an area to be created (step 611), and continue the write processing (step 612). If there is an area in the cache where the write request data of the received write command is to be written, the write process is continued (step 612).

【0042】次に図7、図8を用いて、本発明のディス
ク装置によりアクセス時間が短縮するコマンドパタンの
一例を示す。縦軸は、発行されたコマンドの要求データ
のディスク上での位置を示すシリンダアドレスを示して
いる。また、横軸はコマンドの実行順を示している。ま
た記号Rはリードコマンドを示し、記号Wはライトコマ
ンドを示している。番号はリード、ライトのコマンドタ
イプ別のコマンド発行順を示している。
Next, an example of a command pattern for shortening the access time by the disk device of the present invention will be described with reference to FIGS. The vertical axis indicates the cylinder address indicating the position on the disk of the request data of the issued command. The horizontal axis indicates the order of command execution. The symbol R indicates a read command, and the symbol W indicates a write command. The numbers indicate the order in which commands are issued for each of the read and write command types.

【0043】図7、図8に示す例は、以前に何もコマン
ドを受領していない状態でR1のリードコマンドを受領
し、R1のリードコマンド処理後W1のライトコマンド
を受領し、さらにR2のリードコマンドを受領し、R2
のリードコマンド処理後W2のライトコマンドを受領し
た時のコマンドの処理例である。
In the example shown in FIGS. 7 and 8, the read command of R1 is received in the state where no command has been received before, the write command of W1 is received after the read command processing of R1, and the read command of R2 is further received. Receiving read command, R2
7 is a processing example of a command when a write command of W2 is received after the read command processing of FIG.

【0044】尚、図7、図8では、シーク時間がシーク
距離に比例して増えると仮定してアクセス時間を示し
た。
7 and 8 show the access time on the assumption that the seek time increases in proportion to the seek distance.

【0045】図7は、本発明を適用していないディスク
装置で上記一連のコマンド群を処理した場合の例であ
る。図7の実施例では、R1を処理後、W1を受領する
と、すぐにシークを開始してW1についてのライト処理
を開始する。W1の処理中R2を受け取ると、W1のラ
イト処理の終了を待ち、その後R2の処理を開始する。
またR2の処理を終了後、W2を受領するとすぐにW2
のライト処理を開始し、W2の処理が終了するとすべて
の処理を終了する。図7中のアクセス時間は、上記R1
からW2までのコマンド群の処理の際に要したアクセス
時間の合計を示している。本発明を適用しなかったディ
スク装置でのアクセス時間は、R1の処理終了後W1を
処理した際に発生したシーク時間T1(701)とW1
の処理終了後R2を処理した際に発生したシーク時間T
2(702)、R2の処理終了後W2を処理した際に発
生したT3(703)の合計時間である。
FIG. 7 shows an example in which the above-mentioned series of commands is processed by a disk device to which the present invention is not applied. In the embodiment of FIG. 7, upon receiving W1 after processing R1, seek is started immediately and write processing for W1 is started. Upon receiving R2 during the processing of W1, it waits for the end of the write processing of W1, and then starts the processing of R2.
Also, after completing the processing of R2, as soon as W2 is received, W2
Is started, and when the processing of W2 ends, all the processing ends. The access time in FIG.
7 shows the total access time required for processing the command group from to W2. The access time in the disk device to which the present invention is not applied is determined by the seek time T1 (701) generated when W1 is processed after the processing of R1 and W1.
Seek time T generated when R2 is processed after the processing of
2 (702), the total time of T3 (703) generated when W2 was processed after the processing of R2 was completed.

【0046】一方図8は、本発明を適用しているディス
ク装置で上記R1からW2までのコマンド群を処理した
場合の例である。R1の処理終了後、W1を受領すると
未処理のライトコマンドがないので、W1についてのラ
イト処理をすぐには開始せず、一定時間次のコマンドの
発行を待つ。
On the other hand, FIG. 8 shows an example in which the above-mentioned command group from R1 to W2 is processed by the disk device to which the present invention is applied. After the processing of R1, when W1 is received, there is no unprocessed write command. Therefore, the write processing for W1 does not start immediately, but waits for the issuance of the next command for a certain time.

【0047】一定の待ち時間内にR2を受領すると(ホ
ストが該一定時間内にR2コマンドを発行したとする)、
R2はR1処理後のヘッド位置から一定の領域内にある
ので(R2によるアクセス位置は、R1終了後のヘッド
の位置からあらかじめ設定した一定距離内にあるとす
る)、W1を実行しないままR2を実行する。
When R2 is received within a certain waiting time (assuming that the host issues an R2 command within the certain time),
Since R2 is within a certain area from the head position after the R1 processing (the access position by R2 is within a predetermined distance from the head position after the end of R1), R2 is executed without executing W1. Execute.

【0048】またR2の処理終了後W2を受領すると、
W1、及び、W2は、ともに、R2実行後のヘッド位置
から一定距離内にない(W1、及び、W2は、ともに、
R2実行後のヘッド位置から一定距離内にないとする)
ので、一定時間次のコマンドの発行を待つ。
When W2 is received after the processing of R2 is completed,
Both W1 and W2 are not within a certain distance from the head position after execution of R2 (W1 and W2 are both
(It is assumed that it is not within a certain distance from the head position after executing R2)
Therefore, it waits for the next command for a certain period of time.

【0049】その後、一定時間待っても次のコマンドが
発行されないので、キャッシュ上に蓄積されたW1とW
2のデータのディスクへの書き込みを行う。
After that, since the next command is not issued even after waiting for a certain time, W1 and W
2 is written to the disk.

【0050】図8中のアクセス時間'は、上記R1から
W2までの一連のコマンド群の処理に要したアクセス時
間の合計を示している。
The access time 'in FIG. 8 indicates the total access time required for processing the series of commands from R1 to W2.

【0051】本発明を適用したディスク装置でのアクセ
ス時間’は、R1処理終了後R2に対する処理を開始す
る際に発生したシーク時間T1' (801)、R2処理
終了後W1及びW2を処理する際に発生したシーク時間
T2'(802)の合計時間である。
The access time 'in the disk device to which the present invention is applied is determined by the seek time T1' (801) generated when the processing for R2 is started after the R1 processing is completed, and when the W1 and W2 are processed after the R2 processing is completed. Is the total time of the seek time T2 '(802) that occurred in the second time.

【0052】[0052]

【発明の効果】以上説明したように、本発明のディスク
装置によれば、リード、ライトの両方のコマンドを対象
にして、コマンドの実行順を制御することで、アクセス
時間を短縮し、ディスク装置の性能を向上させることが
できる。
As described above, according to the disk device of the present invention, the access time is shortened by controlling the execution order of commands for both read and write commands. Performance can be improved.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明を適用する磁気ディスク装置の構成を示
す図である。
FIG. 1 is a diagram showing a configuration of a magnetic disk drive to which the present invention is applied.

【図2】ホストが発行するリードコマンドの構成を示す
図である。
FIG. 2 is a diagram showing a configuration of a read command issued by a host.

【図3】ホストが発行するライトコマンドの構成を示す
図である。
FIG. 3 is a diagram illustrating a configuration of a write command issued by a host.

【図4】キャッシュ上のデータを管理するキャッシュデ
ータ管理テーブル(リードデータ用、ライトデータ用共
通)を示す図である。
FIG. 4 is a diagram showing a cache data management table (common for read data and write data) for managing data on the cache;

【図5】未処理のライトコマンドがある状態でリードコ
マンド受領した場合のリードコマンドの処理方法を示す
フローチャートである。
FIG. 5 is a flowchart illustrating a read command processing method when a read command is received in a state where there is an unprocessed write command;

【図6】未処理のライトコマンドがある状態でリードコ
マンドを受領した場合及び、ライトコマンドを受領した
場合の処理を示すフローチャートである。
FIG. 6 is a flowchart showing processing when a read command is received in the presence of an unprocessed write command and when a write command is received;

【図7】本発明を適用しないディスク装置でのコマンド
実行例を示す図である。
FIG. 7 is a diagram illustrating a command execution example in a disk device to which the present invention is not applied.

【図8】本発明を適用したディスク装置でのコマンド実
行例を示す図である。
FIG. 8 is a diagram showing a command execution example in a disk device to which the present invention is applied.

【符号の説明】[Explanation of symbols]

101…プログラムROM、102…制御プロセッサ、1
03…磁気ディスク制御装置、104…キャッシュメモ
リ、105…キャッシュデータ管理テーブル(リードデ
ータ用)、106…キャッシュデータ管理テーブル(ラ
イトデータ用)、107…サーボ制御部、108…ボイ
スコイルモータ(VCM)、109…モータドライバ、1
10…セレクタ、111…信号処理部。
101: Program ROM, 102: Control processor, 1
03: magnetic disk controller, 104: cache memory, 105: cache data management table (for read data), 106: cache data management table (for write data), 107: servo control unit, 108: voice coil motor (VCM) , 109 ... motor driver, 1
10 ... selector, 111 ... signal processing unit.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 西川 学 神奈川県小田原市国府津2880番地 株式会 社日立製作所ストレージ事業部内 Fターム(参考) 5B005 JJ11 MM11 NN73 5B065 BA01 CA15 CE11 CH01 CH15 ZA15 5D044 BC01 CC05 DE02 DE12 DE17 DE23 DE29 DE38 DE48 EF03 FG10 HH07 HL01 JJ03  ────────────────────────────────────────────────── ─── Continued from the front page (72) Inventor Manabu Nishikawa 2880 Kozu, Odawara-shi, Kanagawa F-term in the Storage Division, Hitachi, Ltd. (Reference) 5B005 JJ11 MM11 NN73 5B065 BA01 CA15 CE11 CH01 CH15 ZA15 5D044 BC01 CC05 DE02 DE12 DE17 DE23 DE29 DE38 DE48 EF03 FG10 HH07 HL01 JJ03

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 ディスクとヘッドとキャッシュメモリを
装備し、リード及びライトの際にリード要求データ及び
ライト要求データをキャッシュに読み込み管理し、キャ
ッシュ上のライト要求データが、リードコマンドにより
読み込まれるリードデータにより上書きされないように
することを前提に、アクセス時間が短縮されるようリー
ドコマンド及びライトコマンドの実行順序を決める手段
をもつことを特徴とするディスク装置。
1. A disk, a head, and a cache memory are provided, and read request data and write request data are read and managed in a cache at the time of reading and writing, and the write request data in the cache is read data read by a read command. A disk device having means for determining the execution order of a read command and a write command so that an access time is shortened on the premise that overwriting is not performed by the disk drive.
【請求項2】 請求項1に記載のディスク装置であっ
て、 上記コマンド実行順序制御手段は、ディスクへのデータ
の書き込みを停止あるいは待機させることができ、適当
なタイミングで再開または開始可能にすることでリード
処理をライト処理に優先させることを特徴とするディス
ク装置。
2. The disk device according to claim 1, wherein the command execution order control means can stop or wait for writing of data to the disk, and can restart or start at an appropriate timing. A disk device characterized by giving priority to read processing over write processing.
【請求項3】 請求項2に記載のディスク装置であっ
て、キャッシュからディスクにライト要求データを書き
込んでいる最中にリードコマンドを受領した場合、アク
セスを短くするタイミングで該受領リードコマンドをラ
イト処理に割り込みをかけて実行させることができるこ
とを特徴とするディスク装置。
3. The disk device according to claim 2, wherein when a read command is received while writing the write request data from the cache to the disk, the received read command is written at a timing to shorten the access. A disk device characterized in that it can be executed by interrupting processing.
【請求項4】 請求項2に記載のディスク装置であっ
て、未処理のライトコマンドがない状況でライトコマン
ドを受領した場合及びライト処理を一時停止している時
に新たにライトコマンドを受領した場合において、現ヘ
ッド位置と未処理のライトコマンドのアドレスまでの距
離があらかじめ設定した一定距離内にある場合にのみ直
ちに処理を開始し、そうでない場合は、一定時間次のコ
マンドの発行を待ち次コマンドの出方を見た上でコマン
ドの実行順序を決める手段をもつディスク装置。
4. The disk device according to claim 2, wherein a write command is received in a state where there is no unprocessed write command, and a new write command is received while the write processing is temporarily stopped. , The process is started immediately only when the distance between the current head position and the address of the unprocessed write command is within a preset fixed distance, otherwise, the next command is issued for a fixed time until the next command is issued. A disk unit that has a means to determine the order of command execution based on how the command is executed.
【請求項5】 請求項4に記載のディスク装置であっ
て、アクセス時間を最少化するタイミングで、待機また
は停止しているライトコマンドの処理を開始または再開
することができることを特徴とするディスク装置。
5. The disk drive according to claim 4, wherein the processing of the write command that is on standby or stopped can be started or restarted at a timing for minimizing the access time. .
JP2001145781A 2001-05-16 2001-05-16 Disk unit that controls the execution order of commands Pending JP2002342038A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001145781A JP2002342038A (en) 2001-05-16 2001-05-16 Disk unit that controls the execution order of commands

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001145781A JP2002342038A (en) 2001-05-16 2001-05-16 Disk unit that controls the execution order of commands

Publications (1)

Publication Number Publication Date
JP2002342038A true JP2002342038A (en) 2002-11-29

Family

ID=18991535

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001145781A Pending JP2002342038A (en) 2001-05-16 2001-05-16 Disk unit that controls the execution order of commands

Country Status (1)

Country Link
JP (1) JP2002342038A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7539816B2 (en) 2005-09-22 2009-05-26 Fujitsu Limited Disk control device, disk control method
JP2009532789A (en) * 2006-04-06 2009-09-10 インターナショナル・ビジネス・マシーンズ・コーポレーション Method, system, and computer program for consistent updates across a storage subsystem
JP2011013821A (en) * 2009-06-30 2011-01-20 Fujitsu Ltd Storage system, storage control apparatus and method
US7949180B2 (en) 2006-07-31 2011-05-24 Fuji Xerox Co., Ltd. Non-transitory computer readable medium for image processing searching colored regions for region satisfying searching condition, and image-processing apparatus for performing the image processing
JP2012532397A (en) * 2009-07-02 2012-12-13 サンドフォース インク. Ordering multiple write commands associated with a storage device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7539816B2 (en) 2005-09-22 2009-05-26 Fujitsu Limited Disk control device, disk control method
JP2009532789A (en) * 2006-04-06 2009-09-10 インターナショナル・ビジネス・マシーンズ・コーポレーション Method, system, and computer program for consistent updates across a storage subsystem
US7949180B2 (en) 2006-07-31 2011-05-24 Fuji Xerox Co., Ltd. Non-transitory computer readable medium for image processing searching colored regions for region satisfying searching condition, and image-processing apparatus for performing the image processing
JP2011013821A (en) * 2009-06-30 2011-01-20 Fujitsu Ltd Storage system, storage control apparatus and method
JP2012532397A (en) * 2009-07-02 2012-12-13 サンドフォース インク. Ordering multiple write commands associated with a storage device

Similar Documents

Publication Publication Date Title
JP3183993B2 (en) Disk control system
KR20090032821A (en) Inserting method of hard disk drive, suitable recording medium and suitable device
US6490651B1 (en) Host-based virtual disk drive for improving the performance of a hard disk drive's input/output
KR100675010B1 (en) Cache control method of hybrid hard disk drive, suitable recording medium and suitable device
JPH06236241A (en) Hard disk drive using flash memory
JP2003508866A (en) Reduced seek sound with minimal performance degradation
KR19980029917A (en) How to improve read cache performance on magnetic disk drives
JP2002342038A (en) Disk unit that controls the execution order of commands
JPH11161527A (en) Data storage system
US6957300B2 (en) Reducing delay of command completion due to overlap condition
JP3969809B2 (en) Data buffer management method in storage device
JP2007102436A (en) Storage control apparatus and storage control method
JP2001014111A (en) Method of controlling rotary storage device
US6957302B2 (en) System and method for performing write operations in a disk drive using a write stack drive
JPH10171713A (en) Disk storage device and cache control method applied to the device
JP2002244816A (en) Disk unit
JP2704138B2 (en) Control method of magnetic disk cache
JPH11232037A (en) Magnetic disk device with disk cache write function
JPH10275425A (en) Disk device and method for high-speed host transfer of relocated data due to defect in the device
JP3080758B2 (en) Magnetic disk drive
JP2004164144A (en) Disk unit
JPH1027069A (en) Storage device
JP2002108704A (en) Disk cache control system
JPH03290873A (en) Disk type storage device, controller of disk type storage device, and control method for disk type storage device
JP3435176B2 (en) Magnetic disk drive