Disk drive with adaptively segmented cache
First Claim
1. In a disk drive having an intelligent interface for communicating with a host, a magnetic disk, and a cache wherein the cache is divisible into a number of segments, wherein each segment has a cache access type, wherein the number of segments may be varied, a method for adaptively segmenting the cache comprising the steps of:
- (a) calculating a plurality of caching factors while processing commands from the host; and
(b) regularly determining whether to change the number of segments wherein an increase of the number of segments is effected based on a weighed weighing of the plurality of caching factors, wherein commands from the host have a block count of a number of blocks of data to transfer and each segment contains a number of blocks per segment and wherein, while processing commands from the host, the disk drive counts the number of random cache accesses, and counts the segments that have sequential access as sequential cache hits, wherein the plurality of caching factors further comprises the number of random cache accesses, the number of sequential cache hits, the number of segments, the block count, and the number of blocks per segment.
6 Assignments
0 Petitions
Accused Products
Abstract
A disk drive has an intelligent interface for communicating with a host, a magnetic disk, and a cache. The cache is divisible into a number of segments, with each segment having a cache access type. The number of segments may be varied in practice of a method for adaptively segmenting the cache. The method comprises the steps of: (a) calculating a plurality of caching factors while processing commands from the host; and (b) regularly determining whether to change the number of segments wherein an increase of the number of segments is effected based on a weighed weighing of the plurality of caching factors.
61 Citations
24 Claims
-
1. In a disk drive having an intelligent interface for communicating with a host, a magnetic disk, and a cache wherein the cache is divisible into a number of segments, wherein each segment has a cache access type, wherein the number of segments may be varied, a method for adaptively segmenting the cache comprising the steps of:
-
(a) calculating a plurality of caching factors while processing commands from the host; and (b) regularly determining whether to change the number of segments wherein an increase of the number of segments is effected based on a weighed weighing of the plurality of caching factors, wherein commands from the host have a block count of a number of blocks of data to transfer and each segment contains a number of blocks per segment and wherein, while processing commands from the host, the disk drive counts the number of random cache accesses, and counts the segments that have sequential access as sequential cache hits, wherein the plurality of caching factors further comprises the number of random cache accesses, the number of sequential cache hits, the number of segments, the block count, and the number of blocks per segment. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. In a disk drive having an intelligent interface for communicating with a host, a magnetic disk, and a cache wherein the cache is divisible into a number of segments wherein the number of segments may be varied, a method for adaptively segmenting the cache comprising the steps of:
-
(a) calculating a plurality of caching factors while processing commands from the host; and (b) regularly determining whether to change the number of segments wherein a decrease of the number of segments is effected based on a weighed weighing of the plurality of caching factors, wherein each command from the host has a block count of data to be transferred, wherein the method further comprises the step of decreasing the number of segments if the block count is larger than half a number of blocks in a segment. - View Dependent Claims (8, 9, 10)
-
-
11. In a disk drive having an intelligent interface for communicating with a host, a magnetic disk, 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 array, a method for adaptively segmenting the cache comprising the steps of:
-
(a) maintaining the cache array wherein there is a cache array entry for each one of the number of segments, where each cache array entry classifies a segment by a cache access type, wherein the cache access type is selected from a plurality of cache access types including sequential and random; and (b) regularly determining whether to change the number of segments wherein an increase of the number of segments is effected when all of the segments are classified as sequential. - View Dependent Claims (12, 13, 14)
-
-
15. In a disk drive having an intelligent interface for communicating with a host, a magnetic disk, 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 method for determining when to adaptively segment the cache comprising the steps of:
-
(a) receiving a first command from the host; (b) receiving a second command from the host, (c) checking if the disk drive is busy processing the first command; (d) checking if a scan first flag has been set; (e) if the disk drive is not busy processing the first command or the scan first flag is not set then starting a seek for the second command and adapting the number of segments in the cache. - View Dependent Claims (16, 17)
-
-
18. In a disk drive having an intelligent interface for communicating with a host, a magnetic disk, 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 caching factors, and wherein the disk drive performs a number of seeks while processing commands from the host, a method for adaptively managing the cache comprising the steps of:
-
(a) computing caching factors while processing commands from the host until a predetermined number of seeks have occurred; (b) checking whether a sequential stream is in process; (c) stopping the sequential stream once if a sequential stream is in process; and (d) changing the number of segments in the cache based on the commands processed. - View Dependent Claims (19, 20, 21)
-
-
22. In a disk drive having an intelligent interface for communicating with a host, a magnetic disk, 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, an upvote counter and a downvote counter, a block count of the number of blocks to transfer for a command from the host, a number of cache hits, a number of sequential cache hits, and a blocks per segment, a method for adaptively managing the number of segments in the cache comprising the steps of:
-
(a) initializing the upvote counter and the downvote counter; (b) checking each segment of the cache to determine the number of cache hits and the number of sequential cache hits; (c) computing an average block count; (d) incrementing the upvote counter if there was a cache hit; (e) incrementing the upvote counter if the number of sequential cache hits is greater than or equal to the number of segments divided by two; (f) decrementing the upvote counter and incrementing the downvote counter if a number of sequential streams is greater than zero and the number of sequential streams is less than the number of segments divided by four; (g) incrementing the downvote counter if the block count is greater than the blocks per segment divided by two; (h) decrementing the upvote counter if the block count is less than the blocks per segment divided by two; (i) incrementing the downvote counter if the block count is greater than the blocks per segment; (j) halving the number of segments if the downvote counter is greater than the upvote counter; and (k) doubling the number of segments if the upvote counter is greater than the downvote counter. - View Dependent Claims (23, 24)
-
Specification