IP Library Granted Patent US 6,910,099
Granted Patent B1
US 6,910,099 · App. 10/262,469 · Granted Jun 21, 2005

Disk drive adjusting read-ahead to optimize cache memory allocation

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 6,910,099
App. No.
10/262,469
Granted
Jun 21, 2005
Kind
B1
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.

Claims (56)

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.

2. The disk drive as recited in claim 1 , wherein the read-ahead operation is terminated prior to reading the residue number of default read-ahead blocks.

3. The disk drive as recited in claim 1 , wherein if the residue number of default read-ahead blocks exceeds a threshold, the disk controller for:

(a) allocating an additional cache segment;

(b) reading the residue number of default read-ahead blocks from the disk; and

(c) storing the residue number of default read-ahead blocks in the additional cache segment.

4. The disk drive as recited in claim 1 , wherein if the residue number of default read-ahead blocks is non-zero, the disk controller for:

(a) allocating an additional cache segment;

(b) reading the residue number of default read-ahead blocks from the disk;

(c) reading an extended number of read-ahead blocks from the disk; and

(d) storing the residue number of default read-ahead blocks and the extended number of read-ahead blocks in the additional cache segment.

5. The disk drive as recited in claim 1 , wherein the number of allocated cache segments is computed by summing a predetermined number of pre-read blocks with the command size and the predetermined default number of read-ahead blocks to generate the summation.

6. The disk drive as recited in claim 1 , wherein:

(a) the cache buffer comprises a plurality of cache segments each comprising P blocks where P<N; and

(b) the disk controller for allocating the cache segments comprising P blocks for write commands.

7. The disk drive as recited in claim 6 , wherein:

(a) the cache buffer comprises a plurality of segment pools;

(b) each segment pool comprises a plurality of cache segments; and

(c) each cache segment comprises 2 k number of blocks where k is a predetermined integer for each segment pool.

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.

9. The method of reading data as recited in claim 8 , further comprising the step of terminating the read-ahead operation prior to reading the residue number of default read-ahead blocks.

10. The method of reading data as recited in claim 8 , wherein if the residue number of default read-ahead blocks exceeds a threshold, further comprising the steps of:

(a) allocating an additional cache segment;

(b) reading the residue number of default read-ahead blocks from the disk; and

(c) storing the residue number of default read-ahead blocks in the additional cache segment.

11. The method of reading data as recited in claim 8 , wherein if the residue number of default read-ahead blocks is non-zero, further comprising the steps of:

(a) allocating an additional cache segment;

(b) reading the residue number of default read-ahead blocks from the disk;

(c) reading an extended number of read-ahead blocks from the disk; and

(d) storing the residue number of default read-ahead blocks and the extended number of read-ahead blocks in the additional cache segment.

12. The method of reading data as recited in claim 8 , wherein the number of allocated cache segments is computed by summing a predetermined number of pre-read blocks with the command size and the predetermined default number of read-ahead blocks to generate the summation.

13. The method of reading data as recited in claim 8 , wherein the cache buffer comprises a plurality of cache segments each comprising P blocks where P<N, further comprising the step of allocating the cache segments comprising P blocks for write commands.

14. The method of reading data as recited in claim 13 , wherein:

(a) the cache buffer comprises a plurality of segment pools;

(b) each segment pool comprises a plurality of cache segments; and

(c) each cache segment comprises 2 k number of blocks where k is a predetermined integer for each segment pool.

Assignments (8)
RELEASE OF SECURITY INTEREST AT REEL 038744 FRAME 0481 Recorded Feb 8, 2022
From: JPMORGAN CHASE BANK, N.A.
To: WESTERN DIGITAL TECHNOLOGIES, INC.
Reel/Frame 058982/0556 →
RELEASE OF SECURITY INTEREST Recorded Mar 5, 2018
From: U.S. BANK NATIONAL ASSOCIATION, AS COLLATERAL AGENT
To: WESTERN DIGITAL TECHNOLOGIES, INC.
Reel/Frame 045501/0714 →
SECURITY AGREEMENT Recorded May 17, 2016
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT
Reel/Frame 038744/0481 →
SECURITY AGREEMENT Recorded May 17, 2016
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT
Reel/Frame 038722/0229 →
SECURITY AGREEMENT Recorded May 17, 2016
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: U.S. BANK NATIONAL ASSOCIATION, AS COLLATERAL AGENT
Reel/Frame 038744/0281 →
RELEASE OF SECURITY INTEREST Recorded Sep 9, 2008
From: GENERAL ELECTRIC CAPITAL CORPORATION, AS AGENT
To: WESTERN DIGITAL TECHNOLOGIES, INC.
Reel/Frame 021502/0451 →
SEVENTH AMENDMENT TO PATENT TRADEMARK AND COPYRIGHT SECURITY AGREEMENT Recorded Apr 8, 2003
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: GENERAL ELECTRIC CAPITAL CORPORATION
Reel/Frame 014025/0301 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 30, 2002
From: WANG, MING Y.; THELIN, GREGORY B.
To: WESTERN DIGITAL TECHNOLOGIES, INC.
Reel/Frame 013359/0943 →