JP2001216092A - Data writing method, data reading method, disk drive and disk drive controller - Google Patents

Data writing method, data reading method, disk drive and disk drive controller

Info

Publication number
JP2001216092A
JP2001216092A JP2000019379A JP2000019379A JP2001216092A JP 2001216092 A JP2001216092 A JP 2001216092A JP 2000019379 A JP2000019379 A JP 2000019379A JP 2000019379 A JP2000019379 A JP 2000019379A JP 2001216092 A JP2001216092 A JP 2001216092A
Authority
JP
Japan
Prior art keywords
command
write
write command
data
read
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
JP2000019379A
Other languages
Japanese (ja)
Inventor
Hiroshi Uchiike
寛 内池
Takashi Kuroda
尚 黒田
Atsushi Kanamaru
淳 金丸
Hiromi Nishinomiya
寛美 西宮
Takahiro Saito
高裕 齋藤
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.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Priority to JP2000019379A priority Critical patent/JP2001216092A/en
Priority to SG200100217A priority patent/SG115353A1/en
Priority to KR10-2001-0002134A priority patent/KR100368964B1/en
Priority to US09/772,263 priority patent/US6654852B2/en
Publication of JP2001216092A publication Critical patent/JP2001216092A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B5/00Recording by magnetisation or demagnetisation of a record carrier; Reproducing by magnetic means; Record carriers therefor
    • G11B5/02Recording, reproducing, or erasing methods; Read, write or erase circuits therefor
    • G11B5/09Digital recording
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve the reading efficiency to a write command that is kept waiting for its execution and also to improve performance of a hard disk drive. SOLUTION: When a data read request is received while a data write request is kept waiting for its execution, the logical block address of a write command W1 is compared with that of a read command R for deciding presence or absence of their duplication in a positional relation deciding step and a data reading step, where the read command R is executed before all write commands W are executed when no duplication of block addresses is decided.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、ディスクドライブ
装置におけるデータの読み出しおよび書き込みに関し、
特にデータの読み出しおよび書き込みを迅速に行うこと
のできる方法に関するものである。
The present invention relates to reading and writing data in a disk drive.
In particular, the present invention relates to a method for reading and writing data quickly.

【0002】[0002]

【従来の技術】コンピュータの外部記憶装置としてのハ
ードディスクドライブ装置に対してホストコンピュータ
から複数の書き込み要求がなされた場合に、実際にハー
ドディスクドライブ装置にデータの書き込みが実行され
終了するまでには相当の時間が必要である。したがっ
て、ハードディスクドライブ装置は、書き込み要求に関
するコマンドを受け取ったことをホストコンピュータに
通知する一方、実行待ちの書き込みコマンドを保持する
ことになる。
2. Description of the Related Art When a host computer issues a plurality of write requests to a hard disk drive as an external storage device of a computer, it takes a considerable amount of time to actually write data to the hard disk drive and finish the operation. Time is needed. Therefore, the hard disk drive notifies the host computer of the reception of the command related to the write request, while holding the write command waiting to be executed.

【0003】実行待ちの書き込みコマンドが複数存在す
る場合には、RPO(Rotational Position Optimizati
on)によって順次実行するコマンドを選択することが行
われている。RPOは実行待ちのコマンドを実行したと
きに、磁気ディスク上の目標となるトラックへのシーク
を開始してから当該トラックに到達するまでのシーク時
間と、到達後に目標のセクタにアクセスを開始するまで
のディスク回転待ち時間とを予想する。そして、このシ
ーク時間および回転待ち時間の合計が最短となる実行待
ちコマンドを、次に実行するコマンドとして選択する手
法である。
When there are a plurality of write commands waiting to be executed, an RPO (Rotational Position Optimizati
On), commands to be sequentially executed are selected. When the RPO executes a command waiting to be executed, the seek time from the start of a seek to a target track on the magnetic disk to the arrival at the track, and the start of access to the target sector after the arrival. Predict the disk rotation latency. In this method, the command waiting for execution with the shortest sum of the seek time and the rotation waiting time is selected as the next command to be executed.

【0004】[0004]

【発明が解決しようとする課題】RPOによりコマンド
の実行時間を短縮することができるため、ハードディス
クドライブ装置のパフォーマンスが向上する。しかし、
RPOによりコマンドの実行時間をより一層短縮してハ
ードディスクドライブ装置のパフォーマンスを向上する
ことが望ましいことは言うまでもない。ところで、ハー
ドディスクドライブ装置は、実行待ちの書き込みコマン
ドが存在する状態でホストコンピュータから、磁気ディ
スクに記憶されたデータの読み出し要求がなされること
もある。このような場合に従来のハードディスクドライ
ブ装置は、実行待ちの書き込みコマンドが全て実行、つ
まり磁気ディスクへの書き込みが終了した後に読み出し
コマンドを実行してデータの読み出しが行われていた。
したがって、実行待ちの書き込みコマンドが存在する場
合には読み出しが行われるまでに相当の時間を要してい
た。この点からも、ハードディスクドライブ装置のパフ
ォーマンスを向上することが望まれていた。そこで本発
明は、実行待ちの書き込みコマンドがある場合の書き込
みまたは読み出しの効率化を図り、ハードディスクドラ
イブ装置のパフォーマンスを向上することを課題とす
る。
Since the execution time of a command can be shortened by the RPO, the performance of the hard disk drive is improved. But,
It is needless to say that it is desirable to further shorten the command execution time by RPO to improve the performance of the hard disk drive. By the way, in the hard disk drive, there may be a case where a request to read data stored in the magnetic disk is made from the host computer in a state where there is a write command waiting to be executed. In such a case, in the conventional hard disk drive, all the write commands waiting to be executed are executed, that is, the data is read by executing the read command after the writing to the magnetic disk is completed.
Therefore, when there is a write command waiting to be executed, it takes a considerable time before reading is performed. Also from this point, it has been desired to improve the performance of the hard disk drive. Accordingly, an object of the present invention is to improve the performance of a hard disk drive by improving the efficiency of writing or reading when there is a write command waiting to be executed.

【0005】[0005]

【課題を解決するための手段】本発明は、ホスト装置か
ら書き込み要求がなされた書き込みデータを記録媒体に
書き込むデータの書き込み方法であって、書き込み実行
待ち状態にある先行書き込みコマンドの論理的ブロック
アドレスと新たに書き込み要求がなされた後続書き込み
コマンドの論理的ブロックアドレスを比較して、前記先
行書き込みコマンドと前記後続書き込みコマンドとの論
理的ブロックアドレス上の位置関係を判断する位置関係
判断ステップと、前記位置関係判断ステップにより前記
先行書き込みコマンドと前記後続書き込みコマンドとが
論理的ブロックアドレス上で離間していると判断された
場合に、その離間距離が規定の離間距離以下であるか否
か判断する離間距離判断ステップと、前記離間距離判断
ステップにより前記先行書き込みコマンドと前記後続書
き込みコマンドとの論理的ブロックアドレス上の離間距
離が規定の距離以下であると判断された場合に、前記先
行書き込みコマンドに対応する書き込みデータと前記後
続書き込みコマンドに対応する書き込みデータとを連続
して前記記録媒体に書き込むデータ書き込みステップと
を備えたことを特徴とするデータの書き込み方法により
前記課題を解決する。
SUMMARY OF THE INVENTION The present invention relates to a method of writing data to a recording medium for writing write data for which a write request has been made by a host device, the logical block address of a preceding write command in a write execution waiting state. And a logical block address of a subsequent write command for which a new write request has been made, and a positional relationship determining step of determining a positional relationship on the logical block address between the preceding write command and the subsequent write command; When it is determined by the positional relationship determination step that the preceding write command and the subsequent write command are separated on a logical block address, a separation that determines whether the separation distance is equal to or less than a specified separation distance. The distance determination step and the separation distance determination step When it is determined that the separation distance on the logical block address between the preceding write command and the subsequent write command is equal to or less than a prescribed distance, the write data corresponding to the preceding write command and the write corresponding to the subsequent write command are written. The above object is solved by a data writing method, comprising: a data writing step of writing data continuously to the recording medium.

【0006】前記本発明データの書き込み方法におい
て、前記離間距離判断ステップにおいて離間距離が規定
の離間距離以下であると判断された前記先行書き込みコ
マンドが複数存在する場合に、前記データ書き込みステ
ップは、前記先行書き込みコマンドに対応する書き込み
データを書き込んだ直後に、前記離間距離が最も小さい
前記後続の書き込みコマンドに対応する書き込みデータ
を書き込むことが望ましい。
In the data writing method according to the present invention, when there are a plurality of preceding write commands for which the separation distance is determined to be equal to or less than a specified separation distance in the separation distance determination step, the data writing step includes the following. Immediately after writing the write data corresponding to the preceding write command, it is desirable to write the write data corresponding to the subsequent write command having the smallest separation distance.

【0007】また本発明では、データ書き込み要求が実
行待ちの状態でホスト装置からデータ読み出し要求がな
された際のデータ読み出し方法であって、書き込み実行
待ち状態にある書き込みコマンドの論理的ブロックアド
レスと新たに読み出し要求がなされた読み出しコマンド
の論理的ブロックアドレスとを比較して、前記書き込み
コマンドと前記読み出しコマンドに論理的ブロックアド
レス上の重複が存在しないか否か判断する位置関係判断
ステップと、前記位置関係判断ステップにより前記書き
込みコマンドと前記読み出しコマンドに論理的ブロック
アドレス上の重複が存在しないと判断された場合に、前
記書き込みコマンドの全てが実行される前に前記読み出
しコマンドを実行するデータ読み出しステップとを備え
ることを特徴とするデータの読み出し方法により前記課
題を解決する。
According to the present invention, there is provided a data reading method when a data read request is issued from a host device in a state where a data write request is waiting for execution. Comparing the logical command with the logical block address of the read command for which the read request has been made, and determining whether the write command and the read command have an overlap on the logical block address. A data reading step of executing the read command before all of the write commands are executed, when it is determined by the relationship determining step that the write command and the read command have no overlap on a logical block address; Characterized by having The data reading method solving the problem.

【0008】前記本発明のデータの読み出し方法におい
て、前記読み出しコマンドの実行は、前記読み出しコマ
ンドの論理的ブロックアドレスの先端と論理的ブロック
アドレスの後端との距離が最小となる前記書き込みコマ
ンドの実行後に引き続いて行うこととすることができ
る。
In the data reading method of the present invention, the execution of the read command is performed by executing the write command in which a distance between a leading end of a logical block address of the read command and a trailing end of the logical block address is minimized. It can be performed subsequently.

【0009】また本発明は、ランダムアクセス可能なデ
ィスク状記録媒体と、外部装置から送信された書き込み
コマンドを実行するまで保持するコマンド保持手段と、
前記コマンド保持手段に保持された書き込みコマンドと
前記外部装置から新たに送信された書き込みコマンドと
の間で論理的ブロックアドレスの重複部分があるか否か
判断するコマンド関係判断手段と、前記コマンド関係判
断手段によって前記重複部分がないと判断された場合
に、前記コマンド保持手段に保持された書き込みコマン
ドと前記新たに送信された書き込みコマンドとが論理的
ブロックアドレス上で規定の距離よりも離れているか否
か判断するコマンド距離判断手段と、前記コマンド距離
判断手段により前記コマンド保持手段に保持された書き
込みコマンドと前記新たに送信された書き込みコマンド
とが前記規定の距離よりも離れていないと判断された場
合に、当該2つのコマンドに対応する書き込みデータを
連続して前記記憶媒体に書き込むよう指示する書き込み
指示手段とを備えることを特徴とするディスクドライブ
装置である。
The present invention also provides a disk-shaped recording medium which can be accessed randomly, a command holding means for holding a write command transmitted from an external device until the command is executed,
Command relation determining means for determining whether there is an overlapping portion of a logical block address between a write command held in the command holding means and a write command newly transmitted from the external device; and When the means determines that there is no overlapping portion, whether the write command held by the command holding means and the newly transmitted write command are separated from a specified distance on a logical block address Command distance determining means for determining whether the write command held by the command holding means and the newly transmitted write command are not separated from the specified distance by the command distance determining means. Then, the write data corresponding to the two commands is continuously written to the storage medium. Is a disk drive apparatus characterized by comprising a writing instruction means for instructing to write to.

【0010】本発明のディスクドライブ装置において、
前記コマンド距離判断手段は、前記新たに送信された書
き込みコマンドに対して、前記距離が規定値以下となる
前記コマンド保持手段に保持された書き込みコマンドが
複数存在する場合に、前記距離が最小となる前記コマン
ド保持手段に保持された書き込みコマンドを特定するこ
とができる。
In the disk drive of the present invention,
The command distance determination unit is configured such that, when there are a plurality of write commands held in the command holding unit in which the distance is equal to or less than a specified value, the distance becomes minimum with respect to the newly transmitted write command. The write command held by the command holding means can be specified.

【0011】また本発明は、ランダムアクセス可能なデ
ィスク状記録媒体と、外部装置から送信された書き込み
コマンドを実行するまで保持するコマンド保持手段と、
前記外部装置から送信された読み出し要求についての読
み出しコマンドと前記コマンド保持手段に保持されてい
る書き込みコマンドとの論理的ブロックアドレスにおけ
る関係を判断するコマンド比較手段と、前記コマンド比
較手段の比較結果に基づき読み出しを指示する読み出し
指示手段とを備えたことを特徴とするディスクドライブ
装置である。
Further, the present invention provides a disk-shaped recording medium which can be accessed randomly, a command holding means for holding a write command transmitted from an external device until the command is executed,
A command comparing unit that determines a relationship between a read command for a read request transmitted from the external device and a write command held in the command holding unit in a logical block address, based on a comparison result of the command comparing unit And a read instructing means for instructing reading.

【0012】以上のディスクドライブ装置において、前
記コマンド比較手段は、前記書き込みコマンドに対して
論理的ブロックアドレス上で重複する前記読み出しコマ
ンドが存在するか否かを判断することができる。また、
以上のディスクドライブ装置において、前記読み出し指
示手段は、前記コマンド比較手段が前記書き込みコマン
ドに対して論理的ブロックアドレス上で重複する前記読
み出しコマンドが存在すると判断した場合に、前記コマ
ンド保持手段に保持されている前記書き込みコマンドの
うち前記重複する書き込みコマンドを実行した後に、前
記コマンド保持手段に前記読み出しコマンドを実行する
よう指示することができる。また、前記読み出し指示手
段は、前記書き込みコマンドと前記読み出しコマンドと
が論理的ブロックアドレス上で重複しないと前記コマン
ド比較手段が判断すると、前記コマンド保持手段に実行
待ちの前記書き込みコマンドが保持された状態で前記読
み出しコマンドを実行するよう指示することができる。
In the above disk drive device, the command comparing means can determine whether or not the read command overlapping the write command on a logical block address exists. Also,
In the above disk drive device, the read instructing unit is held in the command holding unit when the command comparing unit determines that the read command overlapping on the logical block address with respect to the write command exists. After executing the duplicated write command among the write commands, the command holding unit can be instructed to execute the read command. Further, the read instructing means, when the command comparing means determines that the write command and the read command do not overlap on a logical block address, holds the write command awaiting execution in the command holding means. To execute the read command.

【0013】また本発明では、ランダムアクセス可能な
ディスク状記録媒体へのデータの書き込みを制御するデ
ィスクドライブ装置のコントローラであって、外部装置
から先行して送信された先行書き込みコマンドを実行す
るまで保持するコマンド保持手段と、前記外部装置から
新たに送信された後続書き込みコマンドと論理的ブロッ
クアドレス上で規定値以下の範囲で離れている前記先行
書き込みコマンドがあるか否か判断するコマンド比較手
段と、前記コマンド比較手段により前記規定値以下の範
囲で離れている前記先行書き込みコマンドがあると判断
した場合に、前記後続書き込みコマンドを前記先行書き
込みコマンドより優先して書き込みの実行をするよう指
示する書き込み指示手段とを備えたことを特徴とするデ
ィスクドライブ装置のコントローラが提供される。さら
に本発明では、ランダムアクセス可能なディスク状記録
媒体からのデータの読み出しを制御するディスクドライ
ブ装置のコントローラであって、外部装置から先行して
送信された複数の先行書き込みコマンドを実行するまで
保持するコマンド保持手段と、前記外部装置から新たに
送信された読み出しコマンドと論理的ブロックアドレス
上で重複する前記先行書き込みコマンドがあるか否か判
断するコマンド比較手段と、前記コマンド比較手段によ
り前記読み出しコマンドと論理的ブロックアドレス上で
重複する前記先行書き込みコマンドがないと判断された
場合に、前記書き込みコマンドの実行に優先して前記読
み出しコマンドを実行することを指示する読み出し指示
手段とを備えたことを特徴とするディスクドライブ装置
のコントローラが提供される。
Further, according to the present invention, there is provided a controller of a disk drive for controlling writing of data to a disk-shaped recording medium which can be accessed randomly, and holds the data until a preceding write command previously transmitted from an external device is executed. Command holding means, and a command comparison means for determining whether or not there is the preceding write command that is separated within a range equal to or less than a specified value on a logical block address and a subsequent write command newly transmitted from the external device, When the command comparing means determines that there is the preceding write command that is separated within a range equal to or less than the specified value, a write instruction for instructing that the subsequent write command be executed with priority over the preceding write command. Disk drive device comprising: Controller is provided for. Further, according to the present invention, a controller of a disk drive device for controlling reading of data from a randomly accessible disk-shaped recording medium, which holds a plurality of pre-write commands transmitted from an external device in advance. Command holding means, command comparison means for determining whether or not there is a preceding write command duplicated on a logical block address with a read command newly transmitted from the external device, and the command comparison means Read instruction means for instructing execution of the read command prior to execution of the write command when it is determined that there is no duplicate preceding write command on a logical block address. Disk drive device control There is provided.

【0014】[0014]

【発明の実施の形態】以下、本発明を実施の形態に基づ
き説明する。図1は、本発明を実施するコンピュータの
外部記憶装置としてのHDD(HardDisk Drive)装置1
0の概略構成を示す図である。同図に示されるように、
HDD装置10は、記憶媒体としてデータを記憶する磁
気ディスク21、磁気ディスク21を回転駆動するスピ
ンドルモータ22を備えている。磁気ヘッド23は、磁
気ディスク21へのデータの記録・再生(書き込み・読
み出し)を行う。ヘッドアーム24は、その先端に磁気
ヘッド23を備え、磁気ディスク21の記録面の上空を
移動している。また、アクチュエータ25は、ヘッドア
ーム24を保持すると共にヘッドアーム24を回転駆動
させている。これらによって、磁気ヘッド23は、磁気
ディスク21の略半径方向を移動し、磁気ディスク21
の記録面に対してランダムにアクセスできるように構成
されている。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be described based on embodiments. FIG. 1 shows a hard disk drive (HDD) device 1 as an external storage device of a computer for implementing the present invention.
FIG. 2 is a diagram showing a schematic configuration of a zero. As shown in the figure,
The HDD device 10 includes a magnetic disk 21 that stores data as a storage medium, and a spindle motor 22 that drives the magnetic disk 21 to rotate. The magnetic head 23 performs recording / reproducing (writing / reading) of data to / from the magnetic disk 21. The head arm 24 has a magnetic head 23 at its tip, and moves over the recording surface of the magnetic disk 21. The actuator 25 holds the head arm 24 and drives the head arm 24 to rotate. As a result, the magnetic head 23 moves in a substantially radial direction of the magnetic disk 21 and
Is configured to be able to randomly access the recording surface.

【0015】磁気ディスク21、スピンドルモータ2
2、磁気ヘッド23およびアクチュエータ25から構成
される駆動機構は、制御回路30によって制御されてい
る。この制御回路30は、HDC(Hard Disk Controlle
r)31、ROM32、RAM33およびホストI/F
(インターフェース)34を備えており、これらはバス
35を介して相互に接続されている。
Magnetic disk 21, spindle motor 2
2. The drive mechanism including the magnetic head 23 and the actuator 25 is controlled by the control circuit 30. The control circuit 30 has an HDC (Hard Disk Control
r) 31, ROM 32, RAM 33 and host I / F
(Interface) 34, which are interconnected via a bus 35.

【0016】HDC31は、HDD装置10の内部コン
トローラとして、ROM32に記憶された制御プログラ
ムと制御データに従ってHDD装置10の全体を制御し
ている。このHDC31は、サーボ制御やデータの書き
込み・読み出し時の制御のための演算処理を実行してい
る。これによって、スピンドルモータ22やアクチュエ
ータ25を駆動し、磁気ヘッド23の記録用ヘッドおよ
び再生用ヘッドを用いて書き込み・読み出しを実行して
いる。また、HDC31は、記憶媒体としての磁気ディ
スク21に記録されるデータの一部をRAM33に保持
し、また、磁気ディスク21に格納されているデータの
一部を先読みしてRAM33に保持するための制御を行
っている。
The HDC 31, as an internal controller of the HDD device 10, controls the entire HDD device 10 according to a control program and control data stored in the ROM 32. The HDC 31 executes arithmetic processing for servo control and control when writing and reading data. Thus, the spindle motor 22 and the actuator 25 are driven, and writing / reading is performed using the recording head and the reproducing head of the magnetic head 23. The HDC 31 stores a part of the data recorded on the magnetic disk 21 as a storage medium in the RAM 33, and reads a part of the data stored in the magnetic disk 21 in advance and stores the data in the RAM 33. Control.

【0017】ROM32には、HDC31により実行さ
れる制御プログラムおよびこの制御プログラムにより使
用される制御データが格納されている。RAM33は、
磁気ディスク21に記録される書き込みデータを一時的
に記憶すると共に、磁気ディスク21から読み出された
読み出しデータを一時的に記憶するためのキャッシュメ
モリとしての機能を有する。また、ホストI/F34
は、ホスト40との間でデータやコマンドを送受するイ
ンターフェイス回路である。
The ROM 32 stores a control program executed by the HDC 31 and control data used by the control program. RAM 33 is
It has a function as a cache memory for temporarily storing write data recorded on the magnetic disk 21 and for temporarily storing read data read from the magnetic disk 21. Also, the host I / F 34
Is an interface circuit for transmitting and receiving data and commands to and from the host 40.

【0018】図2は、HDC31の主要機能ブロックを
示している。HDC31は、MPU(マイクロ・プロセ
ッシング・ユニット)41、MM(メモリ・マネージ
ャ)42、RAM43およびSG44(セグメント・ハ
ンドラ)を備えている。RAM43には、図16に示す
構成のテーブルおよび図17に示す構成のライト・セグ
メントがテーブル形式で格納されている。なお、図16
のテーブルは、後述する、NO OF HIT(OVERLAY HIT(オ
ーバーレイ・ヒット)の数)、ヘッド・ベスト・スキッ
プ・レングス(HEAD BEST SKIP LENGTH)、ヘッド・ベ
スト・スキップ・セグメント・ID(HEAD BEST SKIP S
EGMENT ID)、テール・ベスト・スキップ・レングス(T
AIL BEST SKIP LENGTH)、テール・ベスト・スキップ
・セグメント・ID(TAIL BEST SKIP SEGMENT ID)を
記憶する。また、図17のライト・セグメントは、4ワ
ードから構成されており、そのうちの1ワードおよび2
ワード目をLBAが使用し、3ワード目をブロック長
(LENGTH)が、また4ワード目がヒット・ステータス
(HIT STATUS)が使用する構成となっている。SG44
は、MM42を通じてRAM43にアクセスしてRAM
43内のテーブルのサーチを行う。また、SG44は後
述するスキップ・レングス(SKIP LENGTH)を一時的に
格納するレジスタを備えている。
FIG. 2 shows main functional blocks of the HDC 31. The HDC 31 includes an MPU (micro processing unit) 41, an MM (memory manager) 42, a RAM 43, and an SG 44 (segment handler). The RAM 43 stores a table having the configuration shown in FIG. 16 and a write segment having the configuration shown in FIG. 17 in a table format. Note that FIG.
The table of “NO OF HIT (number of overlay hits)”, “HEAD BEST SKIP LENGTH”, “HEAD BEST SKIP LENGTH” and “HEAD BEST SKIP S
EGMENT ID), Tail best skip length (T
AIL BEST SKIP LENGTH) and tail best skip segment ID (TAIL BEST SKIP SEGMENT ID) are stored. The write segment in FIG. 17 is composed of four words, one word and two words out of four words.
The LBA uses the word, the block length (LENGTH) uses the third word, and the hit status (HIT STATUS) uses the fourth word. SG44
Accesses the RAM 43 through the MM 42 and
A search of the table in 43 is performed. The SG 44 has a register for temporarily storing a skip length (SKIP LENGTH) described later.

【0019】本実施の形態では、ホスト40からすでに
送信された先行書き込みコマンドと新たにホスト40か
ら送信された後続書き込みコマンドとの、論理的ブロッ
クアドレス(以下、LBA)上の位置関係を判断する。
なお、LBAに関する情報、つまり当該書き込みコマン
ドについての先端および後端のLBAおよびブロック長
は書き込みコマンド、書き込みデータとともにホスト4
0から送信される。この書き込みデータは一旦RAM3
3に記憶され、また、LBAに関する情報は、図17に
示したライト・セグメントに記憶される。本実施の形態
では、先行書き込みコマンドのことをバッファデータと
称し、後続書き込みコマンドのことを単に書き込みコマ
ンドと称することとする。また、本実施の形態では、L
BA上の位置関係を、単に、関係、あるいは位置関係と
言うことがある。
In the present embodiment, the positional relationship between a preceding write command already transmitted from the host 40 and a subsequent write command newly transmitted from the host 40 on a logical block address (hereinafter, LBA) is determined. .
The LBA information, that is, the leading and trailing LBAs and block lengths of the write command are included in the host 4 data along with the write command and write data.
Sent from 0. This write data is stored in RAM3
3 and information on the LBA is stored in the write segment shown in FIG. In the present embodiment, the preceding write command is referred to as buffer data, and the subsequent write command is simply referred to as a write command. In the present embodiment, L
The positional relationship on the BA may be simply referred to as a relationship or a positional relationship.

【0020】本実施の形態では、第1段階として、バッ
ファデータと書き込みコマンドとの関係が図3に示すN
O HIT−A、TAIL_SEQ、OV_TAIL、O
V_ALL、OV_COVER、OV_HEAD、HEA
D_SEQおよびNO HIT−Bの8つの分類のうち
のいずれに該当するかをLBAに基づき判断する。この
判断は、図4〜図6に示すフローに基づき行われる。次
に、第2段階として、やはりLBAを用い図7〜図14
に示すフローに基づきバッファデータと書き込みコマン
ドとの関係を詳細に判断する。そして、この判断結果に
基づいて、RPOを実行するのが本実施の形態によるH
DD装置である。
In the present embodiment, as a first stage, the relationship between the buffer data and the write command is represented by N shown in FIG.
O HIT-A, TAIL_SEQ, OV_TAIL, O
V_ALL, OV_COVER, OV_HEAD, HEA
It is determined based on the LBA which of the eight classifications D_SEQ and NO HIT-B falls. This determination is made based on the flows shown in FIGS. Next, as a second stage, LBA is also used and FIGS.
The relationship between the buffer data and the write command is determined in detail based on the flow shown in FIG. The HPO according to the present embodiment executes the RPO based on the determination result.
It is a DD device.

【0021】まず図3に基づき第1段階で判断される8
つの分類を説明する。図3において、バッファデータの
書き込み先の後端のLBAをLLBAと表記する。ま
た、バッファデータのブロック長をLENGTHと表記
している。さらに、書き込みコマンドの書き込み先の先
端のLBAをSLBAと、後端のLBAをELBAと表
記する。さらにまた、書き込みコマンドのLBAのブロ
ック長をSLENという。図3中の#1〜#8と記され
ているものが書き込みコマンドを示している。なお、#
1〜#8は書き込みコマンドを便宜上区分けするために
記したものであって、ホスト40から送信された順番を
示すものでないことを最初に断っておきたい。
First, judgment is made in the first stage based on FIG.
The two categories will be described. In FIG. 3, the LBA at the end of the buffer data write destination is denoted as LLBA. The block length of the buffer data is represented by LENGTH. Further, the leading LBA at the write destination of the write command is referred to as SLBA, and the LBA at the trailing end is referred to as ELBA. Furthermore, the block length of the LBA of the write command is referred to as SLEN. Items denoted by # 1 to # 8 in FIG. 3 indicate write commands. Note that #
1 to # 8 are written for the purpose of classifying the write commands for the sake of convenience, and it is necessary to first deny that they do not indicate the order of transmission from the host 40.

【0022】本実施の形態においては、バッファデータ
に対する書き込みコマンドの位置関係を、図3に示すよ
うに8種類に分類する。各々の内容は以下の通りであ
る。 <NO HIT−A>書き込みコマンド#1は、バッフ
ァデータのLLBAより離れた位置に存在している。こ
のようにバッファデータに対して書き込みコマンド#1
が重複部分を有していない場合には、NO HIT−A
と判断する。
In the present embodiment, the positional relationship of the write command with respect to the buffer data is classified into eight types as shown in FIG. The contents of each are as follows. <NO HIT-A> The write command # 1 exists at a position separated from the LLBA of the buffer data. Thus, the write command # 1 for the buffer data
Has no overlap, NO HIT-A
Judge.

【0023】<TAIL_SEQ>書き込みコマンド#
2のように、バッファデータの後端に書き込みコマンド
#2の先端が連続的につながっている場合には、TAI
L_SEQと判断する。 <OV_TAIL>書き込みコマンド#3のように、バ
ッファデータの後端側でバッファデータと書き込みコマ
ンド#3が重複している場合には、OV_TAILと判
断する。 <OV_ALL>書き込みコマンド#4は、バッファデ
ータの中に全て包含されている。このような場合にはO
V_ALLと判断する。
<TAIL_SEQ> Write command #
When the leading end of the write command # 2 is continuously connected to the trailing end of the buffer data as in
Judge as L_SEQ. <OV_TAIL> When the buffer data and the write command # 3 overlap at the rear end of the buffer data as in the case of the write command # 3, it is determined to be OV_TAIL. <OV_ALL> Write command # 4 is all contained in the buffer data. In such a case, O
Judge as V_ALL.

【0024】<OV_COVER>書き込みコマンド#
5は、バッファデータを全て包含している。このような
場合にはOV_COVERと判断する。 <OV_HEAD>書き込みコマンド#6のように、バ
ッファデータの先端側でバッファデータと書き込みコマ
ンド#6が重複している場合には、OV##HEADと判
断する。
<OV_COVER> Write command #
5 includes all buffer data. In such a case, it is determined as OV_COVER. <OV_HEAD> When the buffer data and the write command # 6 overlap at the leading end of the buffer data as in the case of the write command # 6, it is determined to be OV ## HEAD.

【0025】<HEAD_SEQ>書き込みコマンド#
7のように、バッファデータの先端に書き込みコマンド
#7の後端が連続的につながっている場合には、HEA
D_SEQと判断する。 <NO HIT−B>書き込みコマンド#8のように、
バッファデータの先端側において書き込みコマンド#8
がバッファデータと離れている場合には、NO HIT
−Bと判断する。
<HEAD_SEQ> Write command #
When the rear end of the write command # 7 is continuously connected to the front end of the buffer data, as shown in FIG.
Judge as D_SEQ. <NO HIT-B> Like write command # 8,
Write command # 8 at the leading end of buffer data
NO HIT if is far from the buffer data
Judge as -B.

【0026】以上の判断は、HDC31のSG(セグメ
ント・ハンドラ)44が、書き込みコマンドのLBA情
報と、RAM33内に記憶されているセグメント・テー
ブルのLBA情報を比較することにより実行される。具
体的なフローを図4〜図6に基づき説明する。図4〜図
6において、ステップS11において、LLBA<SL
BA−1であるか否か判断し、LLBA<SLBA−1
の場合にはステップS12に進み、そうでない場合には
ステップS13に進む。なおステップS11における判
断は、バッファデータの後端のLBAと書き込みコマン
ドの先端のLBAとの位置を比較したものである。LL
BA<SLBA−1であれば、ステップS12におい
て、バッファデータと書き込みコマンドとの間にLBA
上の重複がないことから、バッファデータに対する書き
込みコマンドの関係、つまりヒット・ステータス(HIT
STATUS)をNO HIT−Aと判断する。なお、「A」
は、書き込みコマンドがバッファデータの後方に存在す
ることを示している。
The above determination is made by the SG (segment handler) 44 of the HDC 31 comparing the LBA information of the write command with the LBA information of the segment table stored in the RAM 33. A specific flow will be described with reference to FIGS. 4 to 6, in step S11, LLBA <SL
It is determined whether BA-1 or not, and LLBA <SLBA-1
If so, the process proceeds to step S12; otherwise, the process proceeds to step S13. The determination in step S11 is a comparison of the positions of the LBA at the rear end of the buffer data and the LBA at the front end of the write command. LL
If BA <SLBA-1, in step S12, LBA is inserted between the buffer data and the write command.
Since there is no overlap, the relationship of the write command to the buffer data, that is, the hit status (HIT
STATUS) is determined to be NO HIT-A. Note that "A"
Indicates that the write command exists after the buffer data.

【0027】ステップS13ではLLBA=SLBA−
1であるか否か、つまりバッファデータの後端のLBA
に書き込みコマンドの先端のLBAが連続するものであ
るか否か判断する。連続していればステップS14にお
いてヒット・ステータスをTAIL##SEQと判断す
る。LLBA=SLBA−1でなければステップS15
に進む(以下、図5)。
In step S13, LLBA = SLBA-
1 or LBA at the end of buffer data
It is determined whether or not the LBA at the leading end of the write command is continuous. If they are consecutive, the hit status is determined to be TAIL ## SEQ in step S14. Unless LLBA = SLBA-1, step S15
(Hereinafter, FIG. 5).

【0028】ステップS15では、LENGTH<LL
BA−SLBA+1であるか否か判断する。そうであれ
ばステップS19に進み、そうでなければステップS1
6に進む。ステップS16ではLLBA<ELBAであ
るか否かを判断する。LLBA<ELBAであればステ
ップS17においてヒット・ステータスをOV_TAI
Lと判断し、そうでなければステップS18においてヒ
ット・ステータスをOV_ALLと判断する。一方、ス
テップS19ではLLBA≦ELBAであるか否か判断
し、そうであればステップS20においてヒット・ステ
ータスをOV_COVERと判断する。そうでなけれ
ば、ステップS21に進む。
In step S15, LENGTH <LL
It is determined whether or not BA-SLBA + 1. If so, go to step S19; otherwise, go to step S1.
Proceed to 6. In step S16, it is determined whether or not LLBA <ELBA. If LLBA <ELBA, the hit status is set to OV_TAI in step S17.
L, otherwise, the hit status is determined to be OV_ALL in step S18. On the other hand, in step S19, it is determined whether or not LLBA ≦ ELBA, and if so, in step S20, the hit status is determined to be OV_COVER. Otherwise, the process proceeds to step S21.

【0029】ステップS21では、LENGTH<LL
BA−ELBAであるか否か判断し、そうであればステ
ップS22においてヒット・ステータスをNO HIT
−Bと判断する。そうでなければ、ステップS23に進
む(以下、図6)。ステップS23では、LENGTH
=LLBA−ELBAであるか否か判断し、そうであれ
ばヒット・ステータスをHEAD_SEQと判断する。
一方、そうでなければヒット・ステータスをOV_HE
ADと判断する。以上で第1段階の判断が終了する。
In step S21, LENGTH <LL
It is determined whether or not BA-ELBA, and if so, the hit status is set to NO HIT in step S22.
Judge as -B. Otherwise, the process proceeds to step S23 (hereinafter, FIG. 6). In step S23, LENGTH
= LLBA-ELBA, and if so, the hit status is determined to be HEAD_SEQ.
On the other hand, if not, the hit status is set to OV_HE.
Judge as AD. This is the end of the first-stage determination.

【0030】次に、第2段階の処理を図7〜図14に基
づき説明する。 <NO HIT−A>NO HIT−Aと判断された場
合には、図7に示す判断がなされる。つまり、ステップ
S101においてスキップ・レングス(SKIP LE
NGTH)がスキップ・クライテリア(SKIP CR
ITERIA)より大きいか否か判断する。なお、ここ
でスキップ・レングスとは、LLBA−SLBA+1で
定義される値であり、バッファデータの後端と書き込み
コマンドの先端との距離を示している。スキップ・レン
グスがスキップ・クライテリアより大きい場合には、ス
テップS102において、書き込みコマンドはバッファ
データに対してNO HITであると判断する。つま
り、書き込みコマンドの先端とバッファデータの後端と
の離間距離が規定の離間距離であるスキップ・クライテ
リアを超えて離れている場合にはNO HITと判断す
る。NO HITと判断されると、当該バッファデータ
と当該書き込みコマンドとの間に関連性がないものとみ
なして、データの書き込み実行時に連続して書き込む等
の処置を行わない。
Next, the processing of the second stage will be described with reference to FIGS. <NO HIT-A> If NO HIT-A is determined, the determination shown in FIG. 7 is made. That is, in step S101, skip length (SKIP LE)
NGTH) Skip Criteria (SKIP CR)
It is determined whether or not the value is larger than (TERIA). Here, the skip length is a value defined by LLBA-SLBA + 1, and indicates the distance between the rear end of the buffer data and the front end of the write command. If the skip length is larger than the skip criteria, it is determined in step S102 that the write command is NO HIT for the buffer data. In other words, if the distance between the leading end of the write command and the trailing end of the buffer data exceeds the skip criterion, which is the prescribed distance, it is determined to be NO HIT. If NO HIT is determined, it is considered that there is no relationship between the buffer data and the write command, and no processing such as continuous writing is performed when data is written.

【0031】スキップ・レングスがスキップ・クライテ
リア以下の場合には、書き込みコマンドは、ステップS
103において、バッファデータに対してテール・ヒッ
ト(TAIL HIT)であると判断する。つまり、当
該バッファデータと当該書き込みコマンドとは離間して
いるものの、その距離が規定値以下であるために連続性
のあるデータに関するものとみなしてデータの書き込み
実行時に連続して書き込みを実行する対象とする。した
がって、RPOによるパフォーマンス向上に有効であ
る。この点は、NO HIT−Bと判断された場合につ
いても同様である。テール・ヒットと判断した場合に
は、今までのテール・ベスト・スキップ・レングス(T
AIL BEST SKIP LENGTH)が0未満
であるか否かステップS104にて判断する。テール・
ベスト・スキップ・レングスが0未満の場合には処理が
終了する。そうでなければステップS105において、
今回のスキップ・レングスがテール・ベスト・スキップ
・レングスより小さいか否か判断する。小さい場合に
は、ステップS106において、今回のスキップ・レン
グスをテール・ベスト・スキップ・レングスとし、テー
ル・ベスト・スキップ・レングスおよびテール・ベスト
・スキップ・セグメント・IDを更新する。そうでなけ
れば、処理を終了する。
If the skip length is equal to or less than the skip criterion, the write command
At 103, it is determined that the data is a tail hit (TAIL HIT) for the buffer data. In other words, although the buffer data and the write command are separated from each other, since the distance is equal to or less than a specified value, the buffer data and the write command are regarded as data related to continuity. And Therefore, it is effective for performance improvement by RPO. The same applies to the case where NO HIT-B is determined. If it is determined that the tail hit has occurred, the tail best skip length (T
It is determined in step S104 whether or not (AIL BEST SKIP LENGTH) is less than 0. Tail
If the best skip length is less than 0, the process ends. Otherwise, in step S105,
It is determined whether or not the current skip length is smaller than the tail best skip length. If it is smaller, in step S106, the current skip length is set as the tail best skip length, and the tail best skip length and the tail best skip segment ID are updated. Otherwise, the process ends.

【0032】ここで、テール・ベスト・スキップ・レン
グスについて、図23を参照しつつ説明する。図23
は、書き込みコマンドが2つのバッファデータのいずれ
に対してもテール・ヒットとなっているものとする。と
ころが、スキップ・レングスは、セグメントIDが2の
バッファデータのほうがセグメントIDが1のバッファ
データデータよりも小さいことがわかる。この場合、当
該書き込みコマンドのテール・ベスト・スキップ・レン
グスはセグメントIDが2のバッファデータとのスキッ
プ・レングスとなり、テール・スキップ・セグメント・
IDは2になる。そして、テール・ベスト・スキップ・
レングスおよびテール・スキップ・セグメント・ID
は、図16に示すテーブルに記憶される。
Here, the tail best skip length will be described with reference to FIG. FIG.
Assume that the write command is a tail hit for any of the two buffer data. However, it can be seen that the skip length of buffer data with a segment ID of 2 is smaller than that of buffer data with a segment ID of 1. In this case, the tail best skip length of the write command becomes the skip length with the buffer data having a segment ID of 2, and the tail skip segment length
The ID becomes 2. And the tail best skip
Length and tail skip segment / ID
Are stored in the table shown in FIG.

【0033】<TAIL_SEQ>TAIL_SEQと判
断された場合には、図8に示す処理がなされる。TAI
L_SEQの場合には、ステップS201にて、ヒット
・ステータスをテール・ヒットと判断する。次いで、今
までのテール・ベスト・スキップ・レングスが0未満で
あるか否か、ステップS202にて判断する。テール・
ベスト・スキップ・レングスが0未満の場合には処理を
終了する。そうでなければステップS203において、
スキップ・レングスがテール・ベスト・スキップ・レン
グスより小さいか否かを判断する。小さい場合には、ス
テップS204において、テール・ベスト・スキップ・
レングスおよびテール・ベスト・スキップ・セグメント
IDを更新する。
<TAIL_SEQ> When it is determined that TAIL_SEQ is present, the processing shown in FIG. 8 is performed. TAI
In the case of L_SEQ, the hit status is determined to be a tail hit in step S201. Next, it is determined in step S202 whether or not the current tail best skip length is less than 0. Tail
If the best skip length is less than 0, the process ends. Otherwise, in step S203,
It is determined whether or not the skip length is smaller than the tail best skip length. If it is smaller, in step S204, the tail, the best, the skip,
Update the length and tail best skip segment ID.

【0034】<OV_TAIL>OV_TAILと判断さ
れた場合には、図9に示す処理がなされる。まず、ステ
ップS301にてヒット・ステータスをテール・ヒット
と判断し、ついで、ステップS302にてスキップ・レ
ングスがテール・ベスト・スキップ・レングスより小さ
いか否かを判断する。小さい場合には、ステップS30
3において、テール・ベスト・スキップ・レングスおよ
びテール・ベスト・スキップ・セグメントIDを更新す
る。そうでない場合には処理を終了する。
<OV_TAIL> When it is determined that OV_TAIL, the processing shown in FIG. 9 is performed. First, in step S301, the hit status is determined to be a tail hit, and then, in step S302, it is determined whether the skip length is smaller than the tail best skip length. If smaller, step S30
At 3, update the tail best skip length and the tail best skip segment ID. If not, the process ends.

【0035】<OV_ALL>OV_TALLと判断され
た場合には、図10および図11に示す処理がなされ
る。まず、ステップS401においてLLBAとELB
Aとが一致するか否か判断する。一致する場合にはステ
ップS402に進み、一致しない場合には図11のステ
ップS408に進む。ステップS402では、SLBA
=LLBA−LENGTH+1であるか否かを判断す
る。そうであればステップS403へ、そうでなければ
ステップS405へ進む。ステップS404では、ステ
ップS402でSLBAとバッファデータの先端LBA
とが一致すると判断した場合に、ヒット・ステータスを
カバー・オーバーレイと判断し、次いでステップS40
4においてオーバーレイ・ヒット(OVERLAY HIT)のカ
ウントを1増やす。ステップS405では、ヒット・ス
テータスをテール・ヒットと判断する。次いでステップ
S406にてスキップ・レングスがテール・ベスト・ス
キップ・レングスより小さいか否かを判断する。小さい
場合には、ステップS407において、テール・ベスト
・スキップ・レングスおよびテール・ベスト・スキップ
・セグメントIDを更新する。そうでない場合には処理
を終了する。
<OV_ALL> If it is determined that OV_TALL, the processing shown in FIGS. 10 and 11 is performed. First, in step S401, LLBA and ELB
It is determined whether or not A matches. If they match, the process proceeds to step S402. If they do not match, the process proceeds to step S408 in FIG. In step S402, SLBA
= LLBA-LENGTH + 1 is determined. If so, the process proceeds to step S403; otherwise, the process proceeds to step S405. In step S404, the SLBA and the leading LBA of the buffer data in step S402
If the hit status is determined to match, the hit status is determined to be cover overlay, and then step S40
At 4, increase the overlay hit count by one. In step S405, the hit status is determined to be a tail hit. Next, in step S406, it is determined whether the skip length is smaller than the tail best skip length. If smaller, in step S407, the tail best skip length and the tail best skip segment ID are updated. If not, the process ends.

【0036】ステップS408ではSLBA=LLBA
−LENGTH+1であるか否か判断する。そうであれ
ばステップS409へ、そうでなければステップS41
2へ進む。ステップS409ではヒット・ステータスを
ヘッド・ヒット(HEAD HIT)と判断する。続い
て、ステップS410において、スキップ・レングス
(ここでは、SLEN)がヘッド・ベスト・スキップ・
レングス(HEAD BEST SKIP LENGT
H)より小さいか否かを判断する。そうであればステッ
プS411へ進み、また、そうでなければ処理を終了す
る。ステップS411ではヘッド・ベスト・スキップ・
レングスおよびヘッド・ベスト・スキップ・セグメント
ID(HEAD BEST SKIP SEGMENT
ID)を更新し、その後処理を終了する。
In step S408, SLBA = LLBA
It is determined whether or not -LENGTH + 1. If so, go to step S409; otherwise, go to step S41.
Proceed to 2. In step S409, the hit status is determined as a head hit (HEAD HIT). Subsequently, in step S410, the skip length (here, SLEN) is changed to the head best skip.
Length (HEAD BEST SKIP LENGT
H) It is determined whether or not it is smaller. If so, the process proceeds to step S411; otherwise, the process ends. In step S411, the head best skip
Length and Head Best Skip Segment ID (HEAD BEST SKIP SEGMENT
ID) is updated, and the process is thereafter terminated.

【0037】S412ではヒット・ステータスをオール
・オーバーレイ(ALL OVERLAY)と判断し、ついでステ
ップS413にてオーバーレイ・ヒットのカウントを1
増やして処理を終了する。なお、オーバーレイ・ヒット
のカウントは、図16に示すテーブルのNO OF H
ITのセルにて増やされる。
In S412, the hit status is determined to be all overlay (ALL OVERLAY), and then in step S413, the count of overlay hits is incremented by one.
Increase the number and end the process. Note that the count of the overlay hit is determined by the NO OFH in the table shown in FIG.
Increased in IT cells.

【0038】<OV_COVER>OV_COVERと判
断された場合には、図12に示すようにステップS50
1においてヒット・ステータスをオール・オーバーレイ
と判断し、次いでステップS502にてオーバーレイ・
ヒットのカウントを1増やして処理を終了する。
<OV_COVER> When it is determined that OV_COVER is satisfied, step S50 is executed as shown in FIG.
In step S502, it is determined that the hit status is all overlay.
The hit count is incremented by one, and the process ends.

【0039】<OV_HEAD>OV_HEADと判断さ
れた場合には、図13に示す処理がなされる。OV_H
EADの場合には、ステップS601でヒット・ステー
タスをヘッド・ヒットと判断する。次いで、ステップS
602において、スキップ・レングス(ここの判断で
は、(LLBA−LENGTH+1)−ELBA)がヘ
ッド・ベスト・スキップ・レングスより小さいか否か判
断する。小さい場合には、ステップS603において、
ヘッド・ベスト・スキップ・レングスおよびヘッド・ベ
スト・スキップ・セグメントIDを更新する。そうでな
ければ処理を終了する。
<OV_HEAD> When it is determined that OV_HEAD, the processing shown in FIG. 13 is performed. OV_H
In the case of EAD, the hit status is determined to be a head hit in step S601. Then, step S
At 602, it is determined whether the skip length (in this determination, (LLBA-LENGTH + 1) -ELBA) is smaller than the head best skip length. If smaller, in step S603,
Update the head best skip length and head best skip segment ID. Otherwise, the process ends.

【0040】<HEAD_SEQ>HEAD_SEQと判
断された場合には、図14に示す処理がなされる。HE
AD_SEQの場合には、ステップS701においてヒ
ット・ステータスをヘッド・ヒットと判断する。次いで
ステップS702において今までのベスト・ヒット・ス
キップ・レングスが負か否かを判断する。負の場合には
処理を終了する。負でない場合には、ステップS703
に進む。ステップS703では、スキップ・レングスが
ヘッド・ベスト・スキップ・レングスより小さいか否か
を判断する。なお、ここのスキップ・レングスはゼロで
ある。スキップ・レングスがヘッド・ベスト・スキップ
・レングスより小さい場合には、ステップS704にお
いてヘッド・ベスト・スキップ・レングスおよびヘッド
・ベスト・スキップ・セグメント・IDを更新して処理
を終了する。
<HEAD_SEQ> If HEAD_SEQ is determined, the processing shown in FIG. 14 is performed. HE
In the case of AD_SEQ, the hit status is determined to be a head hit in step S701. Next, in step S702, it is determined whether or not the best hit skip length so far is negative. If the result is negative, the process ends. If not negative, step S703
Proceed to. In step S703, it is determined whether the skip length is smaller than the head best skip length. Note that the skip length here is zero. If the skip length is smaller than the head best skip length, in step S704 the head best skip length and the head best skip segment ID are updated, and the process ends.

【0041】<NO HIT−B>NO HIT−Bと
判断された場合には、図15に示す処理がなされる。つ
まり、ステップS801において、(LLBA−LEN
GTH+1)−ELBAがスキップ・クライテリアより
大きいか否か判断する。スキップ・レングスがスキップ
・クライテリアより大きい場合には、ステップS802
において、ヒット・ステータスをノー・ヒット(NO
HIT)と判断する。スキップ・レングスがスキップ・
クライテリア以下の場合には、ステップS803におい
て、ヒット・ステータスがヘッド・ヒットであると判断
し、ステップS804に進む。ステップS804ではス
キップ・レングスがヘッド・ベスト・スキップ・レング
スより小さいか否かを判断する。なお、ここのスキップ
・レングスは、(LLBA−LENGTH+1)−EL
BAで定義される。ヘッド・ベスト・スキップ・レング
スがスキップ・レングス以下である場合には処理を終了
する。スキップ・レングスがヘッド・ベスト・スキップ
・レングスより小さい場合には、ステップS805にお
いて、ヘッド・ベスト・スキップ・レングスおよびヘッ
ド・ベスト・スキップ・セグメントIDを更新して処理
を終了する。
<NO HIT-B> If NO HIT-B is determined, the process shown in FIG. 15 is performed. That is, in step S801, (LLBA-LEN
GTH + 1) -ELBA is determined to be greater than the skip criterion. If the skip length is greater than the skip criterion, step S802
In, the hit status is changed to no hit (NO
HIT). Skip length is skipped
If the condition is equal to or less than the criteria, it is determined in step S803 that the hit status is a head hit, and the process proceeds to step S804. In step S804, it is determined whether the skip length is smaller than the head best skip length. Here, the skip length is (LLBA-LENGTH + 1) -EL
Defined by BA. If the head best skip length is less than or equal to the skip length, the process ends. If the skip length is smaller than the head best skip length, in step S805, the head best skip length and the head best skip segment ID are updated, and the process ends.

【0042】以上の説明から明らかなように、本実施の
形態では、当初図3に示すようにバッファデータと書き
込みコマンドとの関係を大まかに分類して、その後に図
7〜図15に示したようにバッファデータとコマンドと
の関係を詳細に判断するという手法を採用している。な
お、NO HIT−A、TAIL##SEQ、OV_TA
IL、OV_ALL、OV_COVER、OV_HEA
D、HEAD_SEQおよびNO HIT−Bと図7〜
図15により判断された各ヒット・ステータスとの関係
をバッファデータとの位置関係を含めて図24に示して
おく。
As is apparent from the above description, in the present embodiment, the relationship between the buffer data and the write command is first roughly classified as shown in FIG. 3, and then shown in FIG. 7 to FIG. As described above, the technique of judging the relationship between the buffer data and the command in detail is adopted. Note that NO HIT-A, TAIL ## SEQ, OV_TA
IL, OV_ALL, OV_COVER, OV_HEA
D, HEAD_SEQ and NO HIT-B and FIGS.
FIG. 24 shows the relationship with each hit status determined in FIG. 15, including the positional relationship with the buffer data.

【0043】以上の判断はホスト40から書き込み要求
がなされる度にセグメント・ハンドラ(SG)がメモリ
・マネージャ(MM)を通じてセグメント・テーブルが
格納されているRAM43にアクセスすることにより実
行される。セグメント・テーブルを構成するライト・セ
グメントは、図16に示すように4ワードから構成され
る。そのうちの1ワードおよび2ワード目をLBAが使
用し、3ワード目をブロック長(LENGTH)が、ま
た4ワード目がヒット・ステータスが使用する構成とな
っている。従来のHDDは、このライト・セグメントが
1セットしか存在しておらず、また、4ワード目は使用
していなかった。以上に対して本実施の形態では、図1
6に示す書き込みセグメントを64セット用意し、しか
も従来未使用であった4ワード目をヒット・ステータス
のために使用することとした。したがって、書き込みコ
マンドは、RAM43に保持されることになる。
The above determination is executed by the segment handler (SG) accessing the RAM 43 storing the segment table through the memory manager (MM) every time a write request is made from the host 40. The write segment constituting the segment table is composed of four words as shown in FIG. The LBA uses the first and second words, the third word uses the block length (LENGTH), and the fourth word uses the hit status. In the conventional HDD, only one set of the write segment exists, and the fourth word is not used. In contrast, in the present embodiment, FIG.
64 sets of write segments shown in FIG. 6 are prepared, and the fourth word which has not been used in the past is used for hit status. Therefore, the write command is held in the RAM 43.

【0044】この書き込みセグメントに格納されたヒッ
ト・ステータスをRPO(Rotational Position Optimi
zation)に反映させる。RPOは、まず実行待ちのコマ
ンドを実行したときに、磁気ディスク21上の目標とな
るトラックへのシークを開始してから当該トラックに到
達するまでのシーク時間と、到達後に目標のセクタにア
クセスを開始するまでのディスク回転待ち時間とを予想
する。そして、このシーク時間および回転待ち時間の合
計が最短となる実行待ちコマンドを、次に実行するコマ
ンドとして選択する手法である。
The hit status stored in the write segment is represented by RPO (Rotational Position Optimi).
zation). The RPO first executes a command waiting to be executed, and starts a seek to a target track on the magnetic disk 21 until the track reaches the target track, and accesses a target sector after the seek. Predict the disk rotation waiting time before starting. In this method, the command waiting for execution with the shortest sum of the seek time and the rotation waiting time is selected as the next command to be executed.

【0045】本実施の形態においては、前述のようにラ
イト・セグメントに格納されたヒット・ステータスを参
照することにより、複数の書き込みコマンドのうち、一
連のデータとみなせる書き込みコマンドを関連づけるこ
とができる。つまり、相互にNO−HIT以外の場合に
は、一連のコマンドの塊として連続的に書き込み実行の
対象とすることができる。本実施の形態では前述のよう
に書き込みセグメントを64セット用意しているため、
その中で以上のようなコマンド塊が複数存在する場合も
ある。このようにコマンド塊が複数存在した場合には、
従来のRPOにしたがい、シーク時間および回転待ち時
間の合計が最短となるコマンド塊から先に書き込みの実
行を行う。もちろん、コマンド塊を構成しない書き込み
コマンドが存在することもあるから、そのような書き込
みコマンド同士、また、コマンド群との間では従来のR
POにしたがって、書き込みコマンドの実行順位が決定
される。
In this embodiment, by referring to the hit status stored in the write segment as described above, a write command that can be regarded as a series of data among a plurality of write commands can be associated. That is, in cases other than NO-HIT, it is possible to continuously execute writing as a series of commands. In this embodiment, since 64 sets of write segments are prepared as described above,
Among them, there may be a plurality of command blocks as described above. If there are multiple command blocks like this,
According to the conventional RPO, writing is executed first from the command block in which the total of the seek time and the rotation waiting time is the shortest. Of course, there may be a write command that does not constitute a command block, and therefore, the conventional R
The execution order of the write commands is determined according to the PO.

【0046】以上の処理の概念について、図18を用い
て説明する。図18(a)は、ホスト40からの書き込
み要求のあった複数のコマンド〜を示している。各
コマンドに付された番号〜は、ホストから送信され
た書き込みの要求順位を示し、また、横軸はLBAを示
している。図18(a)において、前述のLBAの比較
に基づき、コマンドとコマンド、また、コマンド
とコマンドは各々は一連のデータ群を構成していると
判断する。しかし、コマンド、コマンドは、他のコ
マンドとの関連がなく、ノー・ヒットと判断されるもの
である。したがって、コマンド〜は、図18(b)
に示すようにA〜Dの6つのデータ群に置き換えること
ができる。そして、書き込みを行う際の順番を、ホスト
40から送信された順番ではなく、A,B,CおよびD
の順番となるように並び替える。
The concept of the above processing will be described with reference to FIG. FIG. 18A shows a plurality of commands to which a write request has been issued from the host 40. The numbers assigned to the respective commands indicate the order of write requests transmitted from the host, and the horizontal axis indicates LBA. In FIG. 18A, based on the above-described comparison of LBAs, it is determined that each of the commands constitutes a series of data groups. However, the commands have no relation to other commands and are determined to be no hits. Therefore, the command ~ is as shown in FIG.
Can be replaced with six data groups A to D as shown in FIG. The order of writing is not the order transmitted from the host 40 but A, B, C, and D.
Rearrange in order.

【0047】次に、オーバーレイ・ヒットとなったデー
タ群の書き込み実行を行う際の処理について図19に基
づき説明する。図19に示すように、先行する書き込み
要求のコマンド(バッファデータ)のLBAが1,2お
よび3、後続の書き込み要求のコマンド(書き込みコマ
ンド)のLBAが0および1とする。バッファデータに
対する書き込みコマンドのヒット・ステータスは、オー
バーレイ・ヒットであり、LBA1のブロックが重複し
ている。RPOに単純に従って書き込みコマンドの書き
込みを実行した後にバッファデータの書き込みを実行し
たとすると、LBA1のブロックについては、書き込み
コマンドのデータの上にバッファデータのデータが上書
きされることになる。バッファデータのデータは書き込
みコマンドのデータより古いから、前記上書きにより古
いデータが新しいデータの上に書き込まれることにな
る。
Next, a description will be given, with reference to FIG. 19, of a process for executing writing of a data group having an overlay hit. As shown in FIG. 19, the LBA of the command (buffer data) of the preceding write request is 1, 2, and 3, and the LBA of the command (write command) of the subsequent write request is 0 and 1. The hit status of the write command for the buffer data is an overlay hit, and blocks of LBA1 are duplicated. If the writing of the buffer data is executed after the writing of the write command is executed simply according to the RPO, the data of the buffer data is overwritten on the data of the write command for the block of LBA1. Since the data of the buffer data is older than the data of the write command, the overwriting causes old data to be written over new data.

【0048】そこで本実施の形態において、図19の右
側のように、バッファデータのうち重複するブロックを
消去(DISCARD)する。その後に、バッファデー
タの書き込み実行し、ついで書き込みコマンドの書き込
みを実行する。そうすることにより、重複する部分につ
いても新しいデータが書き込まれることになる。
Therefore, in the present embodiment, as shown on the right side of FIG. 19, duplicate blocks in the buffer data are erased (DISCARD). Thereafter, writing of buffer data is executed, and then writing of a write command is executed. By doing so, new data is also written for the overlapping part.

【0049】次に、書き込みコマンドが複数実行待ちの
状態で読み出し要求コマンドがホスト40からなされた
場合の処理について説明する。従来のHDD装置は、書
き込みコマンドが実行待ちの状況で読み出し要求があっ
た場合には、実行待ちの書き込みコマンドが全て実行さ
れてから読み出し要求のコマンドを実行していた。とこ
ろが、書き込みコマンドの実行が全て終了した後に読み
出し要求のコマンドを実行したのでは、データの読み出
しが遅くなる。今現在優先すべきなのは、読み出しコマ
ンドである。そこで、本実施の形態では、書き込みコマ
ンドが複数実行待ちの状態で読み出し要求コマンドがホ
スト40からなされた場合に、書き込みコマンドが全て
実行される前に、読み出しコマンドを割り込み実行する
ことができるようにした。
Next, a description will be given of a process performed when a host issues a read request command while a plurality of write commands are waiting to be executed. In a conventional HDD device, when a read request is issued while a write command is waiting to be executed, the read request command is executed after all the write commands waiting to be executed have been executed. However, if a read request command is executed after execution of all write commands is completed, data reading is delayed. What should be prioritized now is the read command. Therefore, in the present embodiment, when a plurality of write commands are waiting to be executed and a read request command is issued from the host 40, the read command can be interrupted before all the write commands are executed. did.

【0050】書き込みコマンドが複数実行待ちの状態で
読み出し要求があり、その読み出し要求のコマンドを書
き込みコマンドの途中に割り込ませる場合に注意を要す
るのは、読み出し要求のコマンドと実行待ちの書き込み
要求のコマンドとに重複がある場合である。このことを
図20を用いて説明する。図20は、理解を容易にする
ために、1つの書き込みコマンドと1つの読み出しコマ
ンドとの関係を示している。図20(a)は、先行する
書き込みコマンド(図中、W)と後続する読み出しコマ
ンド(図中、R)とにLBA上の重複がない場合を示し
ている。このような場合には、書き込みコマンドWを実
行する前に、読み出しコマンドRを優先して実行しても
問題はない。ところが、図20(b)に示すように、書
き込みコマンドWと読み出しコマンドRとにLBA上の
重複部分が存在する場合には、書き込みコマンドWを実
行する前に読み出しコマンドRを優先して実行すると以
下のような問題がある。
When a read request is issued while a plurality of write commands are waiting to be executed, and when the read request command is interrupted in the middle of the write command, it is necessary to pay attention to the read request command and the write request command waiting to be executed. And when there is an overlap. This will be described with reference to FIG. FIG. 20 shows the relationship between one write command and one read command to facilitate understanding. FIG. 20A shows a case where the preceding write command (W in the figure) and the subsequent read command (R in the figure) have no overlap on the LBA. In such a case, there is no problem if the read command R is preferentially executed before the write command W is executed. However, as shown in FIG. 20B, when the write command W and the read command R have an overlapping portion on the LBA, the read command R is preferentially executed before the write command W is executed. There are the following problems.

【0051】ホスト40からの読み出し要求は、最新の
データに対してなされるべきものである。図20(b)
に示す場合には、書き込みコマンドWによるデータが最
新のものである。前述のように、書き込みコマンドWと
読み出しコマンドRにはLBAに重複がある。この重複
部分について、読み出しコマンドRの対象となるデータ
は書き込みコマンドWによるデータである。したがっ
て、書き込みコマンドWが実行されて当該データが実際
に書き込まれる前に読み出しコマンドRが実行されたと
すると、この読み出しコマンドRの実行により読み出さ
れたデータは最新のものではない部分を含む。これでは
読み出しコマンドRが適正に実行されたことにならな
い。
The read request from the host 40 is to be made for the latest data. FIG. 20 (b)
In the case shown in (1), the data by the write command W is the latest data. As described above, the write command W and the read command R have overlapping LBAs. Regarding this overlapping portion, the data targeted by the read command R is data by the write command W. Therefore, if the read command R is executed before the write command W is executed and the data is actually written, the data read by the execution of the read command R includes a part that is not the latest. This does not mean that the read command R has been properly executed.

【0052】そこで本実施の形態では、実行待ちの書き
込みコマンドが複数存在するときに読み出し要求があっ
た場合に、実行待ちの書き込みコマンドのLBAとホス
ト40から要求された読み出しコマンドのLBAとの位
置関係を確認することとした。そして、図20(b)の
ような関係にある実行待ちの書き込みコマンドがある場
合には、その書き込みコマンドを実行した後に読み出し
コマンドを割り込ませて他の実行待ちの書き込みコマン
ドに優先して実行することとした。
Therefore, in this embodiment, when a read request is issued when there are a plurality of write commands waiting to be executed, the position of the LBA of the write command waiting to be executed and the position of the LBA of the read command requested by the host 40 are determined. We decided to confirm the relationship. When there is a write command waiting to be executed having a relationship as shown in FIG. 20B, the read command is interrupted after executing the write command, and the write command is executed prior to other write commands waiting to be executed. I decided that.

【0053】図21にその1例を示す。図21(a)に
おいて、W1〜W4を実行待ちの書き込みコマンド、R
を書き込みコマンドW1〜W4が実行待ちのときにホス
ト40から要求された読み出しコマンドとする。図21
(a)に示すように、読み出しコマンドRと書き込みコ
マンドW2、W3とにLBA上の重複がある。したがっ
て、読み出しコマンドRを実行するには、図21(b)
に示すように、書き込みコマンドW1、W2およびW3
を実行した後に、読み出しコマンドRを実行する。そし
て、読み出しコマンドRの実行後に書き込みコマンドW
4を実行することにした。このようにすることにより、
読み出しコマンドRの実行により読み出されたデータは
最新のデータを含むものとなる。なお、図21(b)の
〜は、実行の順位を示している。
FIG. 21 shows an example. In FIG. 21A, a write command waiting for execution of W1 to W4, R
Are read commands requested from the host 40 when the write commands W1 to W4 are waiting to be executed. FIG.
As shown in (a), the read command R and the write commands W2 and W3 have an overlap on the LBA. Therefore, in order to execute the read command R, it is necessary to execute the read command R shown in FIG.
As shown in the figure, write commands W1, W2 and W3
After that, the read command R is executed. After the execution of the read command R, the write command W
4 was decided to be executed. By doing this,
The data read by execution of the read command R includes the latest data. Note that 〜 in FIG. 21B indicates the order of execution.

【0054】図21では読み出しコマンドRと書き込み
コマンドW2、W3とにLBA上の重複がある例につい
て示したが、図22(a)に示すように読み出しコマン
ドRと書き込みコマンドとにLBA上の重複がない場合
には、図22(b)に示すように、読み出しコマンドR
を書き込みコマンドW1の前に割り込みして実行するこ
ともできる。
FIG. 21 shows an example in which the read command R and the write commands W2 and W3 have an overlap in the LBA. However, as shown in FIG. 22A, the read command R and the write command have an overlap in the LBA. When there is no read command R, as shown in FIG.
Can be executed by interrupting before the write command W1.

【0055】[0055]

【発明の効果】以上説明のように、本発明によれば、実
行待ちの書き込みコマンドがある場合の書き込みまたは
読み出しの効率化を図り、ハードディスクドライブ装置
のパフォーマンスを向上することができる。
As described above, according to the present invention, the efficiency of writing or reading when there is a write command waiting to be executed can be improved, and the performance of the hard disk drive can be improved.

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

【図1】 本実施の形態にかかるHDD(Hard Disk Dr
ive)装置の概略構成を示す図である。
FIG. 1 shows an HDD (Hard Disk Dr.) according to the present embodiment.
ive) It is a figure which shows the schematic structure of a device.

【図2】 本実施の形態にかかるHDDのHDC(Hard
Disk Controller)の主要構成を示す図である。
FIG. 2 shows an HDC (Hard Disk) of the HDD according to the embodiment.
3 is a diagram illustrating a main configuration of a Disk Controller. FIG.

【図3】 バッファデータと書き込みコマンドとの関係
を説明するための図である。
FIG. 3 is a diagram for explaining a relationship between buffer data and a write command.

【図4】 バッファデータと書き込みコマンドとの関係
を判断するためのフローチャートある。
FIG. 4 is a flowchart for determining the relationship between buffer data and a write command.

【図5】 バッファデータと書き込みコマンドとの関係
を判断するためのフローチャートである。
FIG. 5 is a flowchart for determining the relationship between buffer data and a write command.

【図6】 バッファデータと書き込みコマンドとの関係
を判断するためのフローチャートである。
FIG. 6 is a flowchart for determining the relationship between buffer data and a write command.

【図7】 バッファデータと書き込みコマンドとの関係
がNO HIT−Aの場合のその後の処理を示すフロー
チャートである。
FIG. 7 is a flowchart illustrating a subsequent process when the relationship between buffer data and a write command is NO HIT-A.

【図8】 バッファデータと書き込みコマンドとの関係
がTAIL_SEQの場合のその後の処理を示すフロー
チャートである。
FIG. 8 is a flowchart illustrating a subsequent process when the relationship between buffer data and a write command is TAIL_SEQ.

【図9】 バッファデータと書き込みコマンドとの関係
がOV_TAILの場合のその後の処理を示すフローチ
ャートである。
FIG. 9 is a flowchart illustrating a subsequent process when the relationship between buffer data and a write command is OV_TAIL.

【図10】 バッファデータと書き込みコマンドとの関
係がOV_ALLの場合のその後の処理を示すフローチ
ャートである。
FIG. 10 is a flowchart showing a subsequent process when the relationship between buffer data and a write command is OV_ALL.

【図11】 バッファデータと書き込みコマンドとの関
係がOV_ALLの場合のその後の処理を示すフローチ
ャートである。
FIG. 11 is a flowchart illustrating a subsequent process when the relationship between buffer data and a write command is OV_ALL.

【図12】 バッファデータと書き込みコマンドとの関
係がOV_COVERの場合のその後の処理を示すフロ
ーチャートである。
FIG. 12 is a flowchart illustrating a subsequent process when the relationship between buffer data and a write command is OV_COVER.

【図13】 バッファデータと書き込みコマンドとの関
係がOV_HEADの場合のその後の処理を示すフロー
チャートである。
FIG. 13 is a flowchart illustrating a subsequent process when the relationship between buffer data and a write command is OV_HEAD.

【図14】 バッファデータと書き込みコマンドとの関
係がHEAD_SEQの場合のその後の処理を示すフロ
ーチャートである。
FIG. 14 is a flowchart showing the subsequent processing when the relationship between buffer data and a write command is HEAD_SEQ.

【図15】 バッファデータと書き込みコマンドとの関
係がNO HIT−Bの場合のその後の処理を示すフロ
ーチャートである。
FIG. 15 is a flowchart illustrating a subsequent process when the relationship between buffer data and a write command is NO HIT-B.

【図16】 RAM43に格納されるテーブルを示す図
である。
FIG. 16 is a diagram showing a table stored in a RAM 43.

【図17】 ライト・セグメントの構成を示す図であ
る。
FIG. 17 is a diagram showing a configuration of a write segment.

【図18】 本実施形態によるデータの書き込みを説明
するための図である。
FIG. 18 is a diagram for explaining data writing according to the present embodiment.

【図19】 本実施形態によるオーバーレイ・ヒットの
時のデータの書き込みを説明するための図である。
FIG. 19 is a diagram for describing data writing at the time of an overlay hit according to the present embodiment.

【図20】 書き込みコマンドと読み出しコマンドとの
関係を示す図である。
FIG. 20 is a diagram showing a relationship between a write command and a read command.

【図21】 書き込みコマンドが複数実行待ちのときに
読み出しコマンドが発生したときの状態を説明する図で
ある。
FIG. 21 is a diagram illustrating a state when a read command is issued while a plurality of write commands are waiting to be executed.

【図22】 書き込みコマンドが複数実行待ちのときに
読み出しコマンドが発生したときの状態を説明する図で
ある。
FIG. 22 is a diagram illustrating a state when a read command is issued while a plurality of write commands are waiting to be executed.

【図23】 ベスト・テール・スキップ・レングスを説
明するための図である。
FIG. 23 is a diagram for describing a best tail skip length.

【図24】 図7〜図15により判断された各ヒット・
ステータスとの関係をバッフアデータとの位置関係を含
めて示した図である。
FIG. 24 is a table showing each hit / judgment determined based on FIGS.
FIG. 4 is a diagram showing a relationship with a status including a positional relationship with buffer data.

【符号の説明】 10…HDD(Hard Disk Drive)装置、21…磁気デ
ィスク、22…スピンドルモータ、23…磁気ヘッド、
24…ヘッドアーム、25…アクチュエータ、30…制
御回路、31…HDC(Hard Disk Controller)、32…
ROM、33…RAM、34…ホストI/F(インター
フェース)、35…バス、40…ホスト、41…MPU
(マイクロ・プロセッシング・ユニット)、42…MM
(メモリ・マネージャ)、43…RAM、44…SG
(セグメント・ハンドラ)
[Description of Signs] 10 HDD (Hard Disk Drive) device, 21 magnetic disk, 22 spindle motor, 23 magnetic head,
Reference numeral 24: head arm, 25: actuator, 30: control circuit, 31: HDC (Hard Disk Controller), 32:
ROM, 33 RAM, 34 host I / F (interface), 35 bus, 40 host, 41 MPU
(Micro processing unit), 42 ... MM
(Memory manager), 43 ... RAM, 44 ... SG
(Segment handler)

フロントページの続き (72)発明者 黒田 尚 神奈川県藤沢市桐原町1番地 日本アイ・ ビー・エム株式会社 藤沢事業所内 (72)発明者 金丸 淳 神奈川県藤沢市桐原町1番地 日本アイ・ ビー・エム株式会社 藤沢事業所内 (72)発明者 西宮 寛美 神奈川県藤沢市桐原町1番地 日本アイ・ ビー・エム株式会社 藤沢事業所内 (72)発明者 齋藤 高裕 神奈川県藤沢市桐原町1番地 日本アイ・ ビー・エム株式会社 藤沢事業所内 Fターム(参考) 5B014 EB05 5B065 BA01 CA11 CA15 Continuing from the front page (72) Inventor Kuroda Hisashi 1 Kirihara-cho, Fujisawa-shi, Kanagawa Prefecture IBM Japan, Ltd. Fujisawa Office (72) Inventor Jun Kanamaru 1 Kirihara-cho, Fujisawa-shi, Kanagawa Japan M Co., Ltd. Fujisawa Office (72) Inventor Hiromi Nishinomiya 1 Kirihara-cho, Fujisawa City, Kanagawa Prefecture IBM Japan Co., Ltd. Fujisawa Office (72) Inventor Takahiro Saito 1 Kirihara-cho, Fujisawa City, Kanagawa Prefecture BM Corporation Fujisawa Office F-term (reference) 5B014 EB05 5B065 BA01 CA11 CA15

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 ホスト装置から書き込み要求がなされた
書き込みデータを記録媒体に書き込むデータの書き込み
方法であって、 書き込み実行待ち状態にある先行書き込みコマンドの論
理的ブロックアドレスと新たに書き込み要求がなされた
後続書き込みコマンドの論理的ブロックアドレスを比較
して、前記先行書き込みコマンドと前記後続書き込みコ
マンドとの論理的ブロックアドレス上の位置関係を判断
する位置関係判断ステップと、 前記位置関係判断ステップにより前記先行書き込みコマ
ンドと前記後続書き込みコマンドとが論理的ブロックア
ドレス上で離間していると判断された場合に、その離間
距離が規定の離間距離以下であるか否か判断する離間距
離判断ステップと、 前記離間距離判断ステップにより前記先行書き込みコマ
ンドと前記後続書き込みコマンドとの論理的ブロックア
ドレス上の離間距離が規定の距離以下であると判断され
た場合に、前記先行書き込みコマンドに対応する書き込
みデータと前記後続書き込みコマンドに対応する書き込
みデータとを連続して前記記録媒体に書き込むデータ書
き込みステップとを備えたことを特徴とするデータの書
き込み方法。
1. A method for writing data to be written to a recording medium, wherein write data for which a write request has been issued from a host device is provided, wherein a logical block address of a preceding write command in a write execution waiting state and a new write request are issued. A positional relationship determining step of comparing a logical block address of a subsequent write command to determine a positional relationship on the logical block address between the preceding write command and the subsequent write command; When it is determined that the command and the subsequent write command are separated on the logical block address, a separation distance determining step of determining whether the separation distance is equal to or less than a specified separation distance; and By the determining step, the preceding write command and When it is determined that the separation distance on the logical block address from the subsequent write command is equal to or less than a specified distance, the write data corresponding to the preceding write command and the write data corresponding to the subsequent write command are continuously generated. And writing the data to the recording medium.
【請求項2】 前記離間距離判断ステップにおいて離間
距離が規定の離間距離以下であると判断された前記先行
書き込みコマンドが複数存在する場合に、 前記データ書き込みステップは、前記先行書き込みコマ
ンドに対応する書き込みデータを書き込んだ直後に、前
記離間距離が最も小さい前記後続の書き込みコマンドに
対応する書き込みデータを書き込むことを特徴とする請
求項1に記載のデータの書き込み方法。
2. When there are a plurality of preceding write commands for which the separation distance is determined to be equal to or less than a prescribed separation distance in the separation distance determination step, the data writing step includes a step of writing corresponding to the preceding write command. 2. The data writing method according to claim 1, wherein immediately after writing the data, write data corresponding to the subsequent write command having the smallest separation distance is written.
【請求項3】 データ書き込み要求が実行待ちの状態で
ホスト装置からデータ読み出し要求がなされた際のデー
タ読み出し方法であって、 書き込み実行待ち状態にある書き込みコマンドの論理的
ブロックアドレスと新たに読み出し要求がなされた読み
出しコマンドの論理的ブロックアドレスとを比較して、
前記書き込みコマンドと前記読み出しコマンドに論理的
ブロックアドレス上の重複が存在しないか否か判断する
位置関係判断ステップと、 前記位置関係判断ステップにより前記書き込みコマンド
と前記読み出しコマンドに論理的ブロックアドレス上の
重複が存在しないと判断された場合に、前記書き込みコ
マンドの全てが実行される前に前記読み出しコマンドを
実行するデータ読み出しステップとを備えることを特徴
とするデータの読み出し方法。
3. A data reading method when a data read request is issued from a host device in a state where a data write request is waiting to be executed, wherein a logical block address of a write command in a write execution waiting state and a new read request are provided. Is compared with the logical block address of the read command
A positional relationship determining step of determining whether there is a logical block address overlap between the write command and the read command; and a logical block address overlap between the write command and the read command by the positional relationship determining step. A data reading step of executing the read command before all of the write commands are executed when it is determined that the data does not exist.
【請求項4】 前記読み出しコマンドの実行は、前記読
み出しコマンドの論理的ブロックアドレスの先端と論理
的ブロックアドレスの後端との距離が最小となる前記書
き込みコマンドの実行後に引き続いて行われることを特
徴とする請求項3に記載のデータの読み出し方法。
4. The execution of the read command is performed after the execution of the write command in which the distance between the leading end of the logical block address of the read command and the trailing end of the logical block address is minimized. 4. The data reading method according to claim 3, wherein:
【請求項5】 ランダムアクセス可能なディスク状記録
媒体と、 外部装置から送信された書き込みコマンドを実行するま
で保持するコマンド保持手段と、 前記コマンド保持手段に保持された書き込みコマンドと
前記外部装置から新たに送信された書き込みコマンドと
の間で論理的ブロックアドレスの重複部分があるか否か
判断するコマンド関係判断手段と、 前記コマンド関係判断手段によって前記重複部分がない
と判断された場合に、前記コマンド保持手段に保持され
た書き込みコマンドと前記新たに送信された書き込みコ
マンドとが論理的ブロックアドレス上で規定の距離より
も離れているか否か判断するコマンド距離判断手段と、 前記コマンド距離判断手段により前記コマンド保持手段
に保持された書き込みコマンドと前記新たに送信された
書き込みコマンドとが前記規定の距離よりも離れていな
いと判断された場合に、当該2つのコマンドに対応する
書き込みデータを連続して前記記憶媒体に書き込むよう
指示する書き込み指示手段とを備えることを特徴とする
ディスクドライブ装置。
5. A disk-shaped recording medium that can be accessed randomly, a command holding unit that holds a write command transmitted from an external device until the command is executed, a write command held by the command holding unit, and a new command from the external device. Command relationship determining means for determining whether there is an overlapping portion of a logical block address between the command and the write command transmitted to the command. Command distance determining means for determining whether the write command held in the holding means and the newly transmitted write command are more than a specified distance on a logical block address, and the command distance determining means The write command held in the command holding means and the new transmission Write instruction means for instructing, when it is determined that the written command is not apart from the prescribed distance, writing data corresponding to the two commands to the storage medium continuously. A disk drive device characterized by the above-mentioned.
【請求項6】 前記コマンド距離判断手段は、前記新た
に送信された書き込みコマンドに対して、前記距離が規
定値以下となる前記コマンド保持手段に保持された書き
込みコマンドが複数存在する場合に、前記距離が最小と
なる前記コマンド保持手段に保持された書き込みコマン
ドを特定することを特徴とする請求項5に記載のディス
クドライブ装置。
6. The command distance judging means, when there are a plurality of write commands held in the command holding means in which the distance is equal to or less than a specified value with respect to the newly transmitted write command, 6. The disk drive device according to claim 5, wherein a write command held by the command holding unit having a minimum distance is specified.
【請求項7】 ランダムアクセス可能なディスク状記録
媒体と、 外部装置から送信された書き込みコマンドを実行するま
で保持するコマンド保持手段と、 前記外部装置から送信された読み出し要求についての読
み出しコマンドと前記コマンド保持手段に保持されてい
る書き込みコマンドとの論理的ブロックアドレスにおけ
る関係を判断するコマンド比較手段と、 前記コマンド比較手段の比較結果に基づき読み出しを指
示する読み出し指示手段とを備えたことを特徴とするデ
ィスクドライブ装置。
7. A disk-shaped recording medium that can be accessed randomly, command holding means for holding a write command transmitted from an external device until execution, a read command for a read request transmitted from the external device, and the command Command comparison means for judging the relationship in the logical block address with the write command held in the holding means, and read instructing means for instructing reading based on the comparison result of the command comparison means. Disk drive device.
【請求項8】 前記コマンド比較手段は、前記書き込み
コマンドに対して論理的ブロックアドレス上で重複する
前記読み出しコマンドが存在するか否かを判断すること
を特徴とする請求項7に記載のディスクドライブ装置。
8. The disk drive according to claim 7, wherein the command comparing unit determines whether the read command overlapping the write command on a logical block address exists. apparatus.
【請求項9】 前記読み出し指示手段は、前記コマンド
比較手段が前記書き込みコマンドに対して論理的ブロッ
クアドレス上で重複する前記読み出しコマンドが存在す
ると判断した場合に、前記コマンド保持手段に保持され
ている前記書き込みコマンドのうち前記重複する読み出
しコマンドを実行した後に、前記コマンド保持手段に前
記読み出しコマンドを実行するよう指示することを特徴
とする請求項7に記載のディスクドライブ装置。
9. The read instructing unit is held in the command holding unit when the command comparing unit determines that the read command overlapping on the logical block address with respect to the write command is present. 8. The disk drive device according to claim 7, wherein after executing the duplicate read command among the write commands, the command holding unit is instructed to execute the read command.
【請求項10】 前記読み出し指示手段は、前記書き込
みコマンドと前記読み出しコマンドとが論理的ブロック
アドレス上で重複しないと前記コマンド比較手段が判断
すると、前記コマンド保持手段に実行待ちの前記書き込
みコマンドが保持された状態で前記読み出しコマンドを
実行するよう指示することを特徴とする請求項7に記載
のディスクドライブ装置。
10. The read instructing means, when the command comparing means determines that the write command and the read command do not overlap on a logical block address, holds the write command awaiting execution in the command holding means. 8. The disk drive device according to claim 7, wherein an instruction is given to execute the read command in a state where the read command is executed.
【請求項11】 ランダムアクセス可能なディスク状記
録媒体へのデータの書き込みを制御するディスクドライ
ブ装置のコントローラであって、 外部装置から先行して送信された先行書き込みコマンド
を実行するまで保持するコマンド保持手段と、 前記外部装置から新たに送信された後続書き込みコマン
ドと論理的ブロックアドレス上で規定値以下の範囲で離
れている前記先行書き込みコマンドがあるか否か判断す
るコマンド比較手段と、 前記コマンド比較手段により前記規定値以下の範囲で離
れている前記先行書き込みコマンドがあると判断した場
合に、前記後続書き込みコマンドを前記先行書き込みコ
マンドより優先して書き込みの実行をするよう指示する
書き込み指示手段とを備えたことを特徴とするディスク
ドライブ装置のコントローラ。
11. A controller of a disk drive device for controlling writing of data to a randomly accessible disk-shaped recording medium, the command being retained until a preceding write command previously transmitted from an external device is executed. A command comparing means for judging whether or not there is a preceding write command which is separated from a subsequent write command newly transmitted from the external device in a range not more than a specified value on a logical block address, and the command comparison Means for instructing the subsequent write command to execute writing with priority over the preceding write command when it is determined by the means that there is the preceding write command that is separated within the range of the specified value or less. Control of disk drive device characterized by comprising Troller.
【請求項12】 ランダムアクセス可能なディスク状記
録媒体からのデータの読み出しを制御するディスクドラ
イブ装置のコントローラであって、 外部装置から先行して送信された複数の先行書き込みコ
マンドを実行するまで保持するコマンド保持手段と、 前記外部装置から新たに送信された読み出しコマンドと
論理的ブロックアドレス上で重複する前記先行書き込み
コマンドがあるか否か判断するコマンド比較手段と、 前記コマンド比較手段により前記読み出しコマンドと論
理的ブロックアドレス上で重複する前記先行書き込みコ
マンドがないと判断された場合に、前記書き込みコマン
ドの実行に優先して前記読み出しコマンドを実行するこ
とを指示する読み出し指示手段とを備えたことを特徴と
するディスクドライブ装置のコントローラ。
12. A controller of a disk drive device for controlling reading of data from a randomly accessible disk-shaped recording medium, wherein the controller holds a plurality of pre-write commands transmitted from an external device in advance. A command holding unit, a command comparison unit that determines whether there is the preceding write command overlapping on a logical block address with a read command newly transmitted from the external device, and the read command by the command comparison unit. Read instruction means for instructing execution of the read command prior to execution of the write command when it is determined that there is no duplicate preceding write command on a logical block address. Disk drive controller .
JP2000019379A 2000-01-27 2000-01-27 Data writing method, data reading method, disk drive and disk drive controller Pending JP2001216092A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2000019379A JP2001216092A (en) 2000-01-27 2000-01-27 Data writing method, data reading method, disk drive and disk drive controller
SG200100217A SG115353A1 (en) 2000-01-27 2001-01-13 Data writing method, data reading method, disk drive apparatus and disk drive apparatus controller
KR10-2001-0002134A KR100368964B1 (en) 2000-01-27 2001-01-15 Data writing method, data reading method, disk drive apparatus and disk drive apparatus controller
US09/772,263 US6654852B2 (en) 2000-01-27 2001-01-29 Method and system of reading and writing data by a disk drive apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000019379A JP2001216092A (en) 2000-01-27 2000-01-27 Data writing method, data reading method, disk drive and disk drive controller

Publications (1)

Publication Number Publication Date
JP2001216092A true JP2001216092A (en) 2001-08-10

Family

ID=18546080

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000019379A Pending JP2001216092A (en) 2000-01-27 2000-01-27 Data writing method, data reading method, disk drive and disk drive controller

Country Status (4)

Country Link
US (1) US6654852B2 (en)
JP (1) JP2001216092A (en)
KR (1) KR100368964B1 (en)
SG (1) SG115353A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006251844A (en) * 2005-03-08 2006-09-21 Hitachi Global Storage Technologies Netherlands Bv Data storage device, and its write cache control method
JP2012063875A (en) * 2010-09-14 2012-03-29 Toshiba Corp Data storage device, command control device, electronic apparatus

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004523837A (en) * 2001-02-28 2004-08-05 クロスローズ・システムズ・インコーポレイテッド Method and system for duplicating a data flow within a SCSI extended copy command
US7003644B2 (en) * 2002-03-28 2006-02-21 Seagate Technology Llc Execution time dependent command schedule optimization
US7000483B2 (en) * 2003-02-03 2006-02-21 Dielectrics Industries, Inc. Inflatable manometers
US7376784B2 (en) 2004-01-26 2008-05-20 Hitachi Global Storage Technologies Netherlands B.V. System and method for selecting command for execution in HDD based on benefit
US7299334B2 (en) * 2003-07-15 2007-11-20 Xiv Ltd. Storage system configurations
CN102063271B (en) * 2010-12-17 2014-08-13 曙光信息产业(北京)有限公司 State machine based write back method for external disk Cache
US8949489B1 (en) 2012-03-21 2015-02-03 Google Inc. Method for combining bulk and latency-sensitive input and output
US10423568B2 (en) * 2015-12-21 2019-09-24 Microsemi Solutions (U.S.), Inc. Apparatus and method for transferring data and commands in a memory management environment
US20190286342A1 (en) * 2018-03-16 2019-09-19 Seagate Technology Llc Efficient storage drive read-write head verification
US11657848B1 (en) * 2022-02-24 2023-05-23 Western Digital Technologies, Inc. Data access and logical mapping for magnetic disks

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02276083A (en) * 1989-04-17 1990-11-09 Seiko Instr Inc Optimizing method for disk head seeking operation
JPH0612189A (en) * 1992-06-29 1994-01-21 Nec Corp Seek operation control system for auxiliary storage device
US5708796A (en) * 1994-11-18 1998-01-13 Lucent Technologies Inc. Method of retrieving continuous and non-continuous media data from a file system
US5664143A (en) * 1994-11-23 1997-09-02 International Business Machines Corporation Method and apparatus for sorting disk access commands in a rotational position queue according to time differences between the commands
US5570332A (en) * 1995-05-25 1996-10-29 Seagate Technology, Inc. Method for reducing rotational latency in a disc drive
US6029226A (en) * 1996-09-30 2000-02-22 Lsi Logic Corporation Method and apparatus having automated write data transfer with optional skip by processing two write commands as a single write command
US6571298B1 (en) * 2000-01-11 2003-05-27 International Business Machines Corporation System and method for grouping disk access commands in a queue according to proximate disk positions

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006251844A (en) * 2005-03-08 2006-09-21 Hitachi Global Storage Technologies Netherlands Bv Data storage device, and its write cache control method
JP2012063875A (en) * 2010-09-14 2012-03-29 Toshiba Corp Data storage device, command control device, electronic apparatus

Also Published As

Publication number Publication date
US20010020260A1 (en) 2001-09-06
KR100368964B1 (en) 2003-01-24
KR20010077984A (en) 2001-08-20
SG115353A1 (en) 2005-10-28
US6654852B2 (en) 2003-11-25

Similar Documents

Publication Publication Date Title
JP2001312373A (en) Write method for data and disk drive device
US6944717B2 (en) Cache buffer control apparatus and method using counters to determine status of cache buffer memory cells for writing and reading data therefrom
US7783828B1 (en) File system write to storage without specifying location reference
JP4777263B2 (en) Mass storage accelerator
US6735678B2 (en) Method and apparatus for disc drive defragmentation
US20100023676A1 (en) Solid state storage system for data merging and method of controlling the same according to both in-place method and out-of-place method
JP2006139548A (en) Media drive and command execution method thereof
US10152236B2 (en) Hybrid data storage device with partitioned local memory
KR20020064357A (en) Buffer management system for managing the transfer of data into and out of a buffer in a disc drive
JPH1063578A (en) Information recording and reproducing device
JP2001216092A (en) Data writing method, data reading method, disk drive and disk drive controller
US7225293B2 (en) Method, system, and program for executing input/output requests
JP3745552B2 (en) Information storage device
JP2001117817A (en) Control method for cache memory, computer system, hard disk drive, and hard disk controller
US20030074526A1 (en) Data storage apparatus, computer apparatus, data processing apparatus, and data processing method
KR19980029917A (en) How to improve read cache performance on magnetic disk drives
US6567886B1 (en) Disk drive apparatus and control method thereof
US10628045B2 (en) Internal data transfer management in a hybrid data storage device
KR20070060301A (en) Hard disk driver having non-volatile write cache
US10459658B2 (en) Hybrid data storage device with embedded command queuing
US6957300B2 (en) Reducing delay of command completion due to overlap condition
US7730256B2 (en) Dual work queue disk drive controller
US20050097268A1 (en) System for transferring data from one storage device to another
JP4470471B2 (en) Recording / reproducing apparatus and method, and recording / reproducing system
JPH06111482A (en) Magnetic disk device