主权项 |
1. A magnetic disk device comprising:
a magnetic disk including a recording region; a storage unit configured, for each of a plurality of regions, to store a first count value in association with each of the plurality of regions, the first count value being a value according to a number of accesses of a corresponding region of the plurality of regions, the plurality of regions being obtained by dividing of the recording region of the magnetic disk, each of the plurality of regions being allocated at least one logical address; and a control unit configured, for each of the plurality of regions, to generate the first count value, to count a second count value, to generate a first accumulation value based on the first count value and the second count value, to update the stored first count value with the first accumulation value, and to reallocate data recorded on the magnetic disk according to the first value, the second count value being a value according to the number of accesses of the corresponding region, the second count value being counted by a variable count step size, the variable count step size being a size variably determined according to an elapsed time from occurrence of startup of the magnetic disk device and being a size to be counted per unit access, and wherein the storage unit stores an access counter table in which a logical address and a first count value are associated with each other with respect to a plurality of logical addresses, and the control unit specifies a logical address to be updated in the access counter table, counts a second count value of the specified logical address, generates a first accumulation value of the specified logical address based on the first count value associated with the specified logical address and the second count value associated with the specified logical address, and overwrites, with the first accumulation value of the specified logical address, the first count value associated with the specified logical address in the access counter table. |