Disk drive adjusting read-ahead to optimize cache memory allocation
First Claim
1. A disk drive comprising:
- (a) a disk comprising a plurality of tracks, each track comprising a plurality of blocks;
(b) a head actuated radially over the disk;
(c) a semiconductor memory comprising a cache buffer for caching data written to the disk and data read from the disk; and
(d) a disk controller for;
receiving a read command from a host computer, the read command comprising a command size representing a number of blocks of read data to read from the disk;
allocating M cache segments from the cache buffer, wherein;
each of the M cache segment comprises N blocks; and
the number M of allocated cache segments is computed by;
summing the command size with a predetermined default number of read-ahead blocks to generate a summation; and
integer dividing the summation by N which results in a residue number of default read-ahead blocks;
reading the read data from the disk and storing the read data in part of the allocated cache segments; and
adjusting a read-ahead operation in response to the residue number of default read-ahead blocks to read read-ahead data from the disk following the read data and storing the read-ahead data in a remainder of the allocated cache segments.
8 Assignments
0 Petitions
Accused Products
Abstract
A disk drive is disclosed which receives a read command from a host computer, the read command comprising a command size representing a number of blocks of read data to read from the disk. A number M of cache segments are allocated from a cache buffer, wherein each cache segment comprises N blocks. The number M of allocated cache segments is computed by summing the command size with a predetermined default number of read-ahead blocks to generate a summation, and integer dividing the summation by N leaving a residue number of default read-ahead blocks. In one embodiment, the residue number of default read-ahead blocks are not read, in another embodiment the residue number of default read-ahead blocks are read if the residue number exceeds a predetermined threshold, and in yet another embodiment the number of read-ahead blocks is extended so that the summation divides evenly by N.
-
Citations
14 Claims
-
1. A disk drive comprising:
-
(a) a disk comprising a plurality of tracks, each track comprising a plurality of blocks;
(b) a head actuated radially over the disk;
(c) a semiconductor memory comprising a cache buffer for caching data written to the disk and data read from the disk; and
(d) a disk controller for;
receiving a read command from a host computer, the read command comprising a command size representing a number of blocks of read data to read from the disk;
allocating M cache segments from the cache buffer, wherein;
each of the M cache segment comprises N blocks; and
the number M of allocated cache segments is computed by;
summing the command size with a predetermined default number of read-ahead blocks to generate a summation; and
integer dividing the summation by N which results in a residue number of default read-ahead blocks;
reading the read data from the disk and storing the read data in part of the allocated cache segments; and
adjusting a read-ahead operation in response to the residue number of default read-ahead blocks to read read-ahead data from the disk following the read data and storing the read-ahead data in a remainder of the allocated cache segments. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method of reading data through a head actuated radially over a disk in a disk drive, the disk comprising a plurality of tracks, each track comprising a plurality of blocks, the disk drive comprising a cache buffer for caching read data, the method comprising the steps of:
-
(a) receiving a read command from a host computer, the read command comprising a command size representing a number of blocks of read data to read from the disk;
(b) allocating M cache segments of the cache buffer, wherein;
each of the M cache segments comprises N blocks; and
the number M of allocated cache segments is computed by;
summing the command size with a predetermined default number of read-ahead blocks to generate a summation; and
integer dividing the summation by N which results in a residue number of default read-ahead blocks;
(c) reading the read data from the disk and storing the read data in part of the allocated cache segments; and
(d) adjusting a read-ahead operation in response to the residue number of default read-ahead blocks to read read-ahead data from the disk following the read data and storing the read-ahead data in a remainder of the allocated cache segments. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
Specification