Magnetic disk device and cache control method
View Patent ↗According to one embodiment, a magnetic disk device comprises a control part configured to execute a cache control based on accompanying information included in a command wherein the command includes a data write command to a disk or a data read command from the disk.
1. A magnetic disk device comprising:
a control part configured to execute a cache control based on accompanying information included in a command; and
a storage part configured to store condition table data defining a corresponding relationship between the accompanying information and an operation of the cache control when receiving the command,
wherein
the command includes a data write command to a disk or a data read command from the disk,
the control part performs the cache control based on the condition table data, and
the accompanying information is a set of one or more Descriptors of a Command Duration Limits (CDL) feature set defined by ATA Command Set-5.
2. The magnetic disk device of claim 1 , comprising an analysis part configured to perform analysis of a plurality of command data received previously, wherein
the control part determines the corresponding relationship based on a result of the analysis.
3. The magnetic disk device of claim 2 , wherein the analysis part performs the analysis with respect to command data for each Descriptor of the set of one or more Descriptors.
4. The magnetic disk device of claim 3 , wherein a second command includes a same command and a same Descriptor as in a first command, and is a command to designate a second block adjacent to a first block designated by the first command on the disk, and
the analysis part calculates a sequential ratio which is a ratio of sequential reception of the second command with the first command.
5. The magnetic disk device of claim 4 , wherein the sequential ratio is calculated for each Descriptor of the set of one or more Descriptors and saved.
6. The magnetic disk device of claim 5 , wherein the control part determines an operation of the cache control based on the sequential ratio acquired by the analysis part and a predetermined threshold with respect to the sequential ratio.
7. The magnetic disk device of claim 6 , wherein the control part determines a read-ahead data amount based on the sequential ratio acquired by the analysis part and the predetermined threshold with respect to the sequential ratio.
8. The magnetic disk device of claim 6 , wherein the control part determines a read-ahead time based on the sequential ratio acquired by the analysis part and the predetermined threshold with respect to the sequential ratio.
9. The magnetic disk device of claim 6 , wherein an operation of the cache control is determined based on Limit Time set in the Descriptor and a predetermined threshold N with respect to the Limit Time.
10. The magnetic disk device of claim 6 , wherein a read-ahead amount of a read-ahead control is determined based on Limit Time set in the Descriptor and a predetermined threshold N with respect to the Limit Time.
11. A cache control method of a magnetic disk device, comprising:
executing a cache control based on accompanying information included in a command;
storing condition table data defining a corresponding relationship between the accompanying information and an operation of the cache control when receiving the command; and
performing the cache control based on the condition table data, wherein
the command includes a data write command to a disk or a data read command from the disk, and
the accompanying information is a set of one or more Descriptors of a Command Duration Limits (CDL) feature set defined by ATA Command Set-5.