Disk drive cache system using a dynamic priority sequential stream of data segments continuously adapted according to prefetched sequential random, and repeating types of accesses
First Claim
1. In a disk drive having an intelligent interface for communicating with a host, a magnetic disk, host side programs, disk side programs, and a cache wherein the cache is divisible into a number of segments wherein the number of segments may be varied, wherein the cache employs a cache control structure including a cache entry table, a buffer counter, a host pointer and a disk pointer, a method for processing commands from the host comprising:
- (a) receiving a plurality of commands from the host including a read command;
(b) selecting the read command from the plurality of commands;
(c) initializing a task control block data structure for the read command;
(d) deciding whether to scan the cache first or start a seek first;
(e) if scanning the cache first, performing a scan of the cache entry table to assign a cache segment to the read command to determine a full cache hit or a partial cache hit by checking whether data requested in the read command is in the cache, obtaining the disk pointer if there was not a full cache hit, starting a seek if there was no cache hit, computing a prefetch if there was not a full cache hit, setting the buffer counter and starting the disk side programs if there was not a full cache hit, setting the host pointer and starting the host side programs, and setting the cache control structure to a state that represents a condition the cache will be in after the read command has completed; and
(f) if starting a seek first, obtaining the disk pointer, starting a seek, adjusting a size of each segment and number of segments in the cache to adapt to commands being processed, performing a scan of the cache entry table to assign a cache segment to the read command to determine a full cache hit or a partial cache hit by checking whether data requested in the read command is in the cache, performing a seek if there was a partial cache hit, computing a prefetch for the read command if there was not a full cache hit, setting the buffer counter and starting a read of the magnetic disk if there was not a full cache hit, setting the host pointer and starting the host, and setting the cache control structure to a state that represents a condition the cache will be in after the read command has completed.
6 Assignments
0 Petitions
Accused Products
Abstract
A magnetic disk drive with a caching system includes an intelligent interface to communicate with a host, a magnetic disk and a cache memory to buffer data transferred to and from the host. The caching system maximizes drive performance based on past access history. The caching system alters execution of commands by coalescing commands or executing internal commands in parallel. The caching system anticipates data requests by using a prefetch to store data that may be requested. The caching system divides the cache memory into segments to store multiple streams of data. The number of segments may be continuously adapted according to the types of access to maximize performance by maintaining a segment for each sequential stream of data. The caching system uses a dynamic priority list to determine segments to maintain and discard. Each segment is monitored to determine access types such as sequential, random, and repeating. The access type determines the amount of data to prefetch and to save, including a minimum and maximum prefetch. The caching system may prescan the cache memory during prefetch to alter the prefetch amount in response to a command request. The caching system may wait for a cache memory access that has not yet occurred. An initiator changes the caching parameters though a mode page.
233 Citations
20 Claims
-
1. In a disk drive having an intelligent interface for communicating with a host, a magnetic disk, host side programs, disk side programs, and a cache wherein the cache is divisible into a number of segments wherein the number of segments may be varied, wherein the cache employs a cache control structure including a cache entry table, a buffer counter, a host pointer and a disk pointer, a method for processing commands from the host comprising:
-
(a) receiving a plurality of commands from the host including a read command; (b) selecting the read command from the plurality of commands; (c) initializing a task control block data structure for the read command; (d) deciding whether to scan the cache first or start a seek first; (e) if scanning the cache first, performing a scan of the cache entry table to assign a cache segment to the read command to determine a full cache hit or a partial cache hit by checking whether data requested in the read command is in the cache, obtaining the disk pointer if there was not a full cache hit, starting a seek if there was no cache hit, computing a prefetch if there was not a full cache hit, setting the buffer counter and starting the disk side programs if there was not a full cache hit, setting the host pointer and starting the host side programs, and setting the cache control structure to a state that represents a condition the cache will be in after the read command has completed; and (f) if starting a seek first, obtaining the disk pointer, starting a seek, adjusting a size of each segment and number of segments in the cache to adapt to commands being processed, performing a scan of the cache entry table to assign a cache segment to the read command to determine a full cache hit or a partial cache hit by checking whether data requested in the read command is in the cache, performing a seek if there was a partial cache hit, computing a prefetch for the read command if there was not a full cache hit, setting the buffer counter and starting a read of the magnetic disk if there was not a full cache hit, setting the host pointer and starting the host, and setting the cache control structure to a state that represents a condition the cache will be in after the read command has completed. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)
-
Specification