Claims
- 1. A method for controlling a cache buffer in a storage system having a storage medium, the storage medium receiving read and write commands from a host, comprising the steps of:
storing first data in the cache buffer in response to a first host command; executing a second host command, the second host command being a command to read second data from the storage system, by reading the second data from the cache buffer if all of the second data is included in the first data in the cache buffer, if not, determining an extended request by adding pre-read and pre-fetch data to the second data, determining whether there is overlap in the cache buffer between the first data and the second data, determining whether there any gaps in the storage medium between the first data and the second data, and if there are gaps or overlaps, storing the extended request in the cache buffer by reading one continuous stream of data from the storage medium and storing the extended request in the cache buffer such that the data is stored in the cache buffer without gaps in the cache buffer, and executing the second command by reading the second data from the cache buffer.
- 2. The method of claim 1 wherein the storage medium rotates and the extended request is read from the storage medium as it rotates, the method comprising the step of adjusting the amount of pre-read data to reduce the amount of rotation required before reading the extended request.
- 3. A method for controlling a cache buffer in a storage system having a storage medium, the storage system receiving read and write commands from a host, comprising the steps of:
storing first data in the cache buffer in response to a first host command; executing a second host command, the second host command being a command to read second data from the storage system, by reading the second data from the cache buffer if some of the second data is included in the first data in the cache buffer; defining the remaining data in the second data as redefined second data; and reading the redefined second data from the storage medium.
- 4. A method for controlling a cache buffer in a storage system having a storage medium, the storage system receiving read and write commands from a host, comprising the steps of:
storing first data in the cache buffer in response to a first host command; executing a second host command, the second host command being a command to read second data from the storage system, by determining an extended request by adding a predetermined amount of pre-read and pre-fetch data to the second data; determining whether any of the first data is included in the extended request and if so, identifying a gap between the first data within the extended request and the second data; adjusting the extended request to include only the gap; storing the revised extended request in the cache buffer; and executing the second command by reading the second data from the cache buffer.
- 5. A method for controlling a cache buffer in a storage system having a storage medium, the storage system receiving read and write commands from a host, comprising the steps of:
storing first data in the cache buffer in response to a first host command; establishing a cache information table using the logical addresses of the first data; executing a second host command, the second host command being a command to read second data from the storage system, by searching the cache information table to identify data included in the second host command that is already stored in the cache buffer, identifying a first gap in terms of the logical address of data between the host request data and forwardly adjacent cache data N; identifying a second gap in terms of the logical addresses of data between the second request data and the backwardly adjacent cache data M; setting the value of the first gap as a pre-read amount and the value of the second gap as a pre-fetch amount; identifying the pre-read amount, the second data extent and the pre-fetch amount as an extended request, reading the data in the first gap and the second gap into the cache buffer; and executing the second command by reading the second data from the cache buffer.
- 6. A method for controlling a cache buffer in a storage system according to claim 5, wherein if there is duplicate data in the cache buffer, the earlier stored copy of the duplicate data is invalidated.
- 7. The method of claim 5 comprising the steps of:
identifying a first maximum value as the gap between the second data and the cache data in terms of data continuity; identifying a second maximum value as a predetermined value; measuring the positional relationship between positions on the storage medium for data currently under processing and the extended request; identifying the processing operation time on the storage medium from the positions; calculating a limitation value for pre-read and pre-fetch data related to the second data; comparing the first maximum value with the limitation value of the pre-read and pre-fetch data; if the first maximum value is larger than the limitation value, adapting the limitation value as a pre-read value or a pre-fetch value; and comparing the second maximum value with the limitation value, and if the second maximum value is larger than the limitation value, adapting the limitation value as a pre-read or a pre-fetch value; whereby when a second host request is given during calculation of a pre-read value and a pre-fetch value for a present host request, the waiting processing time in filling the gaps is not increased.
- 8. A cache algorithm for a hard disk drive having a nonvolatile memory for storing information and a volatile random access cache memory for storing information read from the nonvolatile memory for processing by a host unit and storing information to be written to the nonvolatile memory, the nonvolatile memory storing the information in linear block areas (LBA's), the LBA's being partially or completely filled with information blocks, the cache algorithm comprising:
means for overwriting old LBA's in a buffer when a write that has not been written to disk yet is in the buffer, only when a second write command is received that covers some or all of those LBA's, means for filling gaps in LBA space when a read command is received that is somewhere in a gap by filling the gap with data read before the requested data and data read after the requested data, and means for reducing the frequency of writes to the disk in order to increase the frequency of reads from the disk.
- 9. A method for controlling a cache buffer in a storage system having a rotating storage medium, the storage medium receiving read and write commands from a host, comprising the steps of:
executing a host command, the host command being a command to read first data from the storage system by adding pre-read and pre-fetch data to the first data, the pre-read data being determined in a manner which reduces the amount of rotation required before reading the pre-read, first and pre-fetch data.
Parent Case Info
[0001] This is a continuation of provisional application Ser. No. 60/308,424, filed Jul. 27, 2001.
[0002] This invention relates to cache control methods for hard disk drives used in computers, and more particularly to control methods for hard disk drives that search for and use data already stored in a cache buffer for read command execution.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60308424 |
Jul 2001 |
US |