6.5 Read-Ahead Cache. Fujitsu C141-E090-02EN

Add to My manuals
189 Pages

advertisement

6.5 Read-Ahead Cache. Fujitsu C141-E090-02EN | Manualzz

6.5

Read-Ahead Cache

After a read command which reads the data from the disk medium is completed, the readahead cache function reads the subsequent data blocks automatically and stores the data in the data buffer.

When the next command requests to read the read-ahead data, the data can be transferred from the data buffer without accessing the disk medium. The host can access the data at higher speed.

6.5.1

Data buffer configuration

The device has a 512-KB data buffer. The buffer is used by divided into two and other commands parts; for MPU work, for read cache of read commands and other commands (see

Figure 6.9).

for MPU work

63 KB

(64,512 bytes)

2 MB (2,097,152 bytes) for READ command for WRITE command

695 KB

(711,680 bytes)

1290 KB

(1,320,960 bytes)

Figure 6.9

Data buffer configuration

The read-ahead operation is performed at execution of the READ SECTOR(S), READ

MULTIPLE, or READ DMA command, and read-ahead data are stored in the buffer for read cache.

C141-E090-01EN 6 - 13

6.5.2

Caching operation

The caching operation is performed only at receipt of the following commands. The device transfers data from the data buffer to the host system if the following data exist in the data buffer.

All sector data to be processed by the command

A part of data including the starting sector to be processed by the command

When a part of data to be processed exist in the data buffer, the remaining data are read from the disk medium and are transferred to the host system.

(1) Commands that are object of caching operation

The following commands are object of caching operation.

READ SECTOR (S)

READ MULTIPLE

READ DMA

When the caching operation is disabled by the SET FEATURES command, no caching operation is performed.

(2) Data that are object of caching operation

The following data are object of caching operation.

1) Read-ahead data read from the disk medium in the data buffer after completion of the command that are object of caching operation.

2) Data transferred to the host system once by requesting with the command that are object of caching operation. When the sector data requested by the host does not finish storing in the buffer for read cache, it is not object of caching operation. And also, when the sequential hit occurs continuously, the caching data required by the host becomes invalid.

(3) Invalidating caching data

Caching data in the data buffer is invalidated in the following case.

1) Commands other than the following commands are issued (all caching data are invalidated)

WRITE SECTOR(S)

WRITE DMA

WRITE MULTIPLE

2) Caching operation is disabled by the SET FEATURES command.

3) Command issued by the host is terminated with an error.

4) Soft reset or hard reset is executed, or power is turned off.

6 - 14 C141-E090-01EN

6.5.3

Usage of read segment

This subsection explains the usage of the read segment buffer at following cases.

(1) Miss-hit (no hit)

A lead block of the read-requested data is not stored in the data buffer. The requested data is read from the disk media.

1) Sets the host address pointer (HAP) and the disk address pointer (DAP) to the sequential address to the last read segment.

HAP

Segment only for read

DAP

2) Transfers the requested data that already read to the host system with reading the requested data from the disk media.

HAP

Stores the read-requested data upto this point

Read-requested data

Empty area

DAP

3) After reading the requested data and transferring the requested data to the host system had been completed, the disk drive continues to read till a certain amount of data is stored.

HAP

(stopped)

Read-requested data

Read Ahead Data

(stopped)

DAP

4) Following shows the cache enabled data for next read command.

Cache enabled data

Start LBA Last LBA

C141-E090-01EN 6 - 15

(3) Sequential read

When the disk drive receives the read command that targets the sequential address to the previous read command, the disk drive tries to fill the buffer space with the read ahead data.

a. Sequential command just after non-sequential command

1) At receiving the sequential read command, the disk drive sets the DAP and HAP to the sequential address of the last read command and reads the requested data.

HAP

Mis-hit data Empty data

DAP

2) The disk drive transfers the requested data that is already read to the host system with reading the requested data.

HAP

Mis-hit data Requested data Empty data

DAP

3) After completion of the reading and transferring the requested data to the host system, the disk drive performs the read-ahead operation continuously till a certain amount of data is stored.

HAP

Mis-hit data Requested data

Readahead data

Empty data

DAP

6 - 16 C141-E090-01EN

b. Sequential hit

When the last sector address of the previous read command is sequential to the lead sector address of the received read command, the disk drive transfers the hit data in the buffer to the host system.

The disk drive performs the read-ahead operation of the new continuous data to the empty area that becomes vacant by data transfer at the same time as the disk drive starts transferring data to the host system.

1) In the case that the contents of buffer is as follows at receiving a read command;

HAP (Completion of transferring requested data)

Read-ahead data Hit data

DAP

Last LBA Start LBA

2) The disk drive starts the read-ahead operation to the empty area that becomes vacant by data transfer at the same time as the disk drive starts transferring hit data.

HAP

Read-ahead data New read-ahead data Hit data

HAP

DAP

3) After completion of data transfer of hit data, the disk drive performs the read-ahead operation for the data area of which the disk drive transferred hit data.

Read-ahead data

DAP

C141-E090-01EN 6 - 17

(3) Full hit (hit all)

All requested data are stored in the data buffer. The disk drive starts transferring the requested data from the address of which the requested data is stored. After completion of command, a previously existed cache data before the full hit reading are still kept in the buffer, and the disk drive does not perform the read-ahead operation. If the disk drive receives a full hit command while performing the read-ahead operation, the disk drive starts transfering the requested data without stopping the read-ahead operation.

1) In the case that the contents of the data buffer is as follows for example and the previous command is a sequential read command, the disk drive sets the HAP to the address of which the hit data is stored.

HAP

Last position at previous read command

HAP (set to hit position for data transfer)

Cache data Full hit data Cache data

DAP

Last position at previous read command

2) The disk drive transfers the requested data but does not perform the read-ahead operation.

Cache data Full hit data

HAP

(stopped)

Cache data

(4) Partially hit

A part of requested data including a lead sector are stored in the data buffer. The disk drive starts the data transfer from the address of the hit data corresponding to the lead sector of the requested data, and reads remaining requested data from the disk media directly.

Following is an example of partially hit to the cache data.

Cache data

Start LBA

Last LBA

6 - 18 C141-E090-01EN

1) The disk drive sets the HAP to the address where the partially hit data is stored, and sets the DAP to the address just after the partially hit data.

HAP

Partially hit data Lack data

DAP

2) The disk drive starts transferring partially hit data and reads lack data from the disk media at the same time.

Requested data to be transferred

HAP

(stopped)

Partially hit data Lack data

DAP

C141-E090-01EN 6 - 19

advertisement

Related manuals

Download PDF

advertisement

Table of contents