An embodiment described herein relates generally to a magnetic disk device and an operating method thereof.
A magnetic disk device has a disk for data storing, and the disk includes a plurality of tracks. When a particular track is subject to frequent data writing relative to the other tracks, an adjacent track erase (ATE) (or fringing) may occur. When the ATE occurs, data recorded in tracks adjacent to the particular track is destroyed.
One type of the magnetic disk device, to prevent the ATE, carries out an operation of a track refresh. The track refresh is an operation of rewriting data, recorded in tracks adjacent to a certain track, to the same adjacent tracks each time data has been written to the certain track a predetermined number of times.
In general, frequency of the data writing sufficient to cause the ATE depends on the operating environment (for example, the presence of vibration) of the magnetic disk device. On the other hand, performing the track refresh slows the operation speed of the magnetic disk device. It would be desirable to perform the track refresh efficiently without causing the ATE.
Various embodiments will be described hereinafter with reference to the accompanying drawings.
In general, according to one embodiment, a magnetic disk device includes a disk including a plurality of zones, each including a plurality of track groups and a controller. The controller is configured to determine that data stored in a first track group is to be rewritten to the first track group, based on a refresh threshold and a first number of times data has been written to the first track group since the last rewrite of the data stored in the first track group, rewrite the data stored in the first track group to the first track group, and change the refresh threshold based on second numbers, each of which is the number of times data has been written to a different one of the track groups in a zone including the first track group, since a last reset thereof.
The disk 11 is a magnetic recording medium having, on one surface, a recording surface on which data is magnetically recordable. The disk 11 is spun at high speed by the SPM 13. The SPM 13 is driven by a driving current (or driving voltage) applied by the driver IC 15. The disk 11 (more specifically, its recording surface) has a plurality of concentric tracks.
Similarly, the recording surface of the disk 11 is divided into n concentric track groups TG0, TG1, . . . , TGn−1 (arranged along the radius of the disk 11), for management. Namely, the recording surface of the disk 11 includes n track groups TG0 to TGn−1. Track group numbers 0 to n−1 are allocated to the track groups TG0 to TGn−1, respectively.
Each of the zones Z0 to Zm−1 includes a plurality of track groups (TGs). For instance, the zone Z0 includes p track groups TG0 to TGp−1, and the zone Z1 includes p track groups TGp to TG2p−1. Similarly, the zone Zm−1 includes p track groups TGn−p to TGn−1, assuming that n represents m·p. Thus, in the embodiment, the zones Z0 to Zm−1 each include the same number of track groups (i.e., p track groups). However, the zones Z0 to Zm−1 may not include the same number of track groups.
The track groups TG0 to TGn−1 each include a plurality of tracks (cylinders). In the embodiment, the track groups TG0 to TGn−1 each include the same number of tracks (r tracks). Accordingly, in the embodiment, the zones Z0 to Zm−1 each include the same number of tracks (r·p tracks). However, the zones Z0 to Zm−1 may not include the same number of tracks. Similarly, the track groups TG0 to TGn−1 may not include the same number of tracks.
Referring back to
The HDD 10 may include a plurality of disks unlike the configuration shown in
The driver IC 15 drives the SPM 13 and the VCM 140 under the control of the controller 17 (more specifically, a CPU 173 in the controller 17). The head IC 15 includes a head amplifier, and amplifies a signal (i.e., a read signal) read by the head 12. The head IC also includes a write driver, and converts write data from an R/W channel 171 of the controller 17 into a write current and supplies the write current to the head 12.
The controller 17 is, for example, a large-scale integrated circuit (LSI) with a plurality of elements integrated on a single chip, called a system-on-a-chip (SOC). The controller 17 includes the read/write (R/W) channel 171, a hard disk controller (HDC) 172, and the CPU 173.
The R/W channel 171 processes signals related to read/write. The R/W channel 171 digitizes a read signal, and decodes read data from the digitized data. Further, the R/W channel 171 extracts, from the digitized data, servo data necessary to position the head 12. The R/W channel 171 encodes write data.
The HDC 172 is connected to a host via a host interface 21. The HDC 172 receives commands (write and read commands, etc.) from the host. The HDC 172 controls data transfer between the host and the buffer RAM 18 and between the buffer RAM 18 and the R/W channel 171.
The CPU 173 functions as a main controller for the HDD shown in
The buffer RAM 18 is formed of a nonvolatile memory, such as a dynamic RAM (DRAM). The buffer RAM 18 is used to temporarily store data to be written to the disk 11 and data read from the disk 11.
The flash ROM 19 is a rewritable nonvolatile memory. In the embodiment, part of the storage area of the flash ROM 19 pre-stores an initial program loader (IPL). When, for example, the main power supply is turned on, the CPU 173 executes the IPL and loads, to the RAM 20, at least part of the control program stored on the disk 11.
Part of the storage area of the RAM 20 is used to store at least part of the control program. Another part of the storage area of the RAM 20 is used as a work area for the CPU 173. Yet, another part of the storage area of the RAM 20 is used to store a zone management table 201, a track refresh (TR) threshold table 202, and a write count table 203. The zone management table 201, the TR threshold table 202, and the write count table 203 are stored in a particular area on the disk 11, and are loaded to the RAM 20 upon the activation of the HDD shown in
For instance, the zone Z0 (i=0) includes q (=r·p) cylinders CL0 to CLq−1, to which cylinder numbers 0 to q−1 are allocated, respectively. Similarly, the zone Z1 (i=1) includes q cylinders CLq to CL2q−1 to which cylinder numbers q to 2q−1 are allocated, respectively. Similarly, the zone Zm−1 (i=m−1) includes q cylinders CLz−q to CLz−1, to which cylinder numbers z−q to z−1 are allocated, respectively, assuming that z represents m·q. Thus, in the embodiment, the zones Z0 to Zm−1 each include the same number (q) of cylinders (tracks). However, the zones Z0 to Zm−1 may not include the same number of cylinders.
Reference TR threshold TH_HRTi is indicative of a TR threshold associated with zone Zi, and is determined in a process of manufacturing the HDD shown in
Real TR threshold TH_TRi is indicative of a TR threshold associated with zone Zi, and is determined while the HDD is being used by a user. Real TR threshold TH_TRi is used to determine whether all tracks in track group TGj in zone Zi should be refreshed. Real TR threshold TH_TRi is set to a value (initial value) equal to reference TR threshold TH_HRTi when the HDD is shipped. After the HDD is shipped, real TR threshold TH_TRi may be changed while the user is using the HDD.
TG count TGC_Zi is indicative of the number of times data writing has been carried out on a certain track group TGj in zone Zi. TG count TGC_Zi is used to determine whether the real TR threshold TH_TRi should be set (changed) to a value different from reference TR threshold TH_HRTi. TG count TGC_Zi is incremented if write count W2_TGj associated with track group TGj is incremented and the thus-incremented write count W2_TGj satisfies a TG count update condition.
Write count W1_TGj is indicative of the number of times data write has been carried out with respect to the track group TGj. The write count W1_TGj is used to determine whether all tracks in track group TGj should be refreshed.
Write count W2_TGj is indicative of the number of times data write has been carried out with respect to the track group TGj, like write count W1_TGj. However, a condition for initializing write count W2_TGj differs from that for write count W1_TGj, as described below. As mentioned above, write count W2_TGj is used to determine whether TG count TGC_Zi should be incremented. Since TG count TGC_Zi is used to determine whether the TR threshold should be changed, it can be said that write count W2_TGj is also used to change the TR threshold.
Referring mainly to
The CPU 173 translates a logical block address into a physical address (i.e., a physical address including a cylinder number, a head number and a sector number) indicative of a physical position on the disk 11, by referring to an address translation table. Based on the physical address and the number of blocks, the CPU 173 specifies a write area (more specifically, a write area indicated by the physical address and the number of blocks) on the disk 11, designated by the write command from the host. For simplifying the description, it is assumed that the write area (write range) is a track T having cylinder number T. In this case, the CPU 173 causes the head 12 to write the write data stored in the buffer RAM 18 to the specified track (i.e., target track) T on the disk 11, via the HDC 172 and the R/W channel 171 (S601).
Subsequently, the CPU 173 specifies track group TGj and zone Zi to which the target track T belongs, as described below (S602). First, the CPU 173 refers to a row of the zone management table 201 corresponding to the cinder number T of the target track T. As a result, the CPU 173 specifies, as zone Zi including the target track T, zone Zi associated with a cylinder number range including the cylinder number T (i.e., the cylinder range including the target track T). The track groups TG0 to TGn−1 on the disk 11 each include the same number (r) of cylinders (tracks). In the present embodiment, based on the cylinder number T of the target track T and the number r, the CPU 173 specifies, by calculation, track group TGj to which the target track T belongs.
In the present embodiment, zones Z0 to Zm−1 on the disk 11 each include the same number (q) of cylinders (tracks). Accordingly, the CPU 173 can specify zone Zi to which the target track T belongs, by calculation using the cylinder number T of the target track T and the number q (=r·p). In this case, the zone management table 201 is not always necessary. Further, the track groups TG0 to TGn−1 may not include the same number of cylinders. In this case, the CPU 173 may specify track group TGj to which the target track T belongs, referring to a track group management table indicative of cylinder ranges associated with the respective track groups. The track group management table may be used even when the track groups TG0 to TGn−1 each include the same number of cylinders.
In S603 after executing S602, the CPU 173 increments, by one, each of write counts W1_TGj and W2_TGj associated in the write count table 203 with the specified track group TGj. Then, the CPU 173 executes TR processing for refreshing all tracks in track group TGj, based on the incremented write count W1_TGj (S604).
Referring then to the flowchart of
If the incremented write count W1_TGj exceeds real TR threshold TH_TRi (Yes in S701), the CPU 173 determines that a condition (track refresh activation condition) for refreshing all tracks (i.e., r tracks) in track group TGj has been satisfied. At this time, the CPU 173 executes track refreshing (S702). Namely, the CPU 173 reads data from r tracks in track group TGj, and rewrites the read data to the r tracks. As a result, the r tracks in track group TGj are refreshed.
After executing track refreshing, the CPU 173 initializes write count W1_TGj to 0 (S703), thereby finishing TR processing. In this case, the CPU 173 proceeds to S605 in
In contrast, if the incremented write count W1_TGj does not exceed real TR threshold TH_TRi (No in S701), the CPU 173 determines that the track refresh activation condition is not satisfied. At this time, the CPU 173 finishes TR processing (S604 in
In S605, the CPU 173 executes TG count update processing for updating TG count TGC_Zi. In TG count update processing, TG count TGC_Zi is updated based on the incremented write count W2_TGj and reference TR threshold TH_HRTi associated with the specified zone Zi.
Referring now to the flowchart of
If W2_TGj exceeds TH_HRTi×P_W/100 (Yes in S801), the CPU 173 determines that a large number of data writes have been carried out with respect to track group TGj, and hence that the condition (TG count update condition) for updating (incrementing) TG count TGC_Zi is satisfied. In this case, the CPU 173 increments, by one, TG count TGC_Zi (i.e., TG count TGC_Zi set in an entry of the TR threshold table 202 associated with the specified zone Zi) (S802).
Further, the CPU 173 initializes, to 0, write count W2_TGj (write count W2_TGj associated in the write count table 203 with the specified track group TGj) (S803). After executing S802 and S803, the CPU 173 finishes TG count update processing. At this time, the CPU 173 proceeds to S606 in
In contrast, if W2_TGj does not exceed TH_HRTi×P_W/100 (No in S801), the CPU 173 determines that a small number of data writes have been carried out with respect to track group TGj, and hence that the condition (TG count update condition) for updating TG count TGC_Zi is not satisfied. In this case, the CPU 173 determines that since a small number of data writes have been carried out with respect to track group TGj, the condition for updating TG count TGC_Zi is not satisfied. Accordingly, the CPU 173 finishes TG count update processing (S605 in
Referring then to the flowchart of
In view of the above, in the embodiment, the CPU 173 first determines whether TG count TGC_Zi (more specifically, latest TG count TGC_Zi) exceeds a reference count (hereinafter referred to as a minimum TG count) TGC0 (S901). If TG count TGC_Zi does not exceed the minimum TG count TGC0 (No in S901), the CPU 173 determines that TG count TGC_Zi does not satisfy a second TR threshold changing condition, and finishes TG count determination processing. At this time, the CPU 173 finishes the operation shown in the flowchart of
In contrast, if TG count TGC_Zi exceeds the minimum TG count TGC0 (Yes in S901), the CPU 173 determines that TG count TGC_Zi satisfies the second TR threshold changing condition. In this case, the CPU 173 calculates the latest average value TGC_Ave of the TG counts TGC_Z0 to TGC_Zm−1 including the latest TG count TGC_Zi.
Subsequently, the CPU 173 determines whether the ratio of TG count TGC_Zi to the calculated average value TGC_Ave exceeds a first ratio (S903). The first ratio is indicative of a determination criterion associated with TR threshold change, and is defined by a parameter P_TGC. In the embodiment, the parameter P_TGC is expressed by %, and is not less than 100%. Namely, in S903, the CPU 173 determines whether the latest TG count TGC_Zi exceeds TGC_Ave×P_TGC/100.
If TG count TGC_Zi does not exceed TGC_Ave×P_TGC/100 (No in S903), the CPU 173 determines that TG count TGC_Zi does not satisfy a first TR threshold changing condition. Namely, the CPU 173 determines that the number of times data writes have been carried out with respect to zone Zi is not significantly greater than that with respect to the other zones, and hence that the first TR threshold changing condition is not satisfied. At this time, the CPU 173 finishes TG count update processing (S606 in
In contrast, if TG count TGC_Zi exceeds TGC_Ave×P_TGC/100 (Yes in S903), the CPU 173 determines that TG count TGC_Zi satisfies the first TR threshold changing condition. Namely, the CPU 173 determines that the number of times data writes have been carried out to zone Zi is significantly greater than that with respect to the other zones, and hence that the first TR threshold changing condition is satisfied. Thus, in the embodiment, the CPU 173 determines in two stages (S901 and S903) whether TG count TGC_Zi (latest TG count TGC_Zi) satisfies the TR threshold changing condition.
When the determination result in S903 is Yes, the CPU 173 finishes TG count determination processing, and proceeds to S607 in
After that, the CPU 173 changes real TR threshold TH_TRi set in the entry of the TR threshold table 202 associated with zone Zi (i.e., real TR threshold TH_TRi in zone Zi) to a value lower than reference TR threshold TH_HRTi (S608). More specifically, the CPU 173 reduces the ratio of real TR threshold TH_TRi to reference TR threshold TH_HRTi to a second ratio. The second ratio is defined by a parameter P_TH. In the embodiment, the parameter P_TH is expressed by %, and is less than 100%. Namely, in S608, the CPU 173 sets TH_HRTi×P_TH/100 as real TR threshold TH_TRi.
It is assumed here that a real TR threshold TH_TRh in a zone Zh was reduced in the preceding loop of S608. In this case, in the current loop of S607, the CPU 173 may initialize only the real TR threshold TH_TRh in the zone Zh to be equal to a reference TR threshold TH_HRTh. For this initialization, in the preceding loop of S608, it is better for the CPU 173 to record the zone number h of the zone Zh in, for example, a particular area in the RAM 20 or on the disk 11. Further, the zone number h of the zone Zh may be attached in the TR threshold table 202 as a zone number allocated to a zone whose real TR threshold was reduced in a preceding loop.
After reducing (i.e., changing) real TR threshold TH_TRi in zone Zi (S608), the CPU 173 proceeds to S609. In S609, the CPU 173 sets, to an initial value of 0, (i.e., resets), the TG count TGC_Z0 to TGC_Zm−1 set in the entries of the write count table 203 associated with all zones Z0 to Zm−1. After this processing, the CPU 173 finishes the operation shown in the flowchart of
In the case of
Accordingly, in the case of
As described above, in the embodiment, the real TR threshold of only one (the zone Z0 in the case of
According to the present embodiment, the CPU 173 detects zone Zi among the zones Z0 to Zm−1 on the disk 11, on which data writing is concentrated, and reduces only the TR threshold (real TR threshold TH_TRi) of the detected zone Zi. As a result, a risk that data in tracks in zone Zi will be destroyed due to concentration of data writing on zone Zi can be reduced while suppressing reduction of the performance of the HDD due to reduction of the TR threshold. Namely, in the embodiment, a margin for the reduction of ATF resistance due to an environmental difference can be increased while the reduction of the performance of the HDD is suppressed.
Further, in the embodiment, the reference TR thresholds set for the respective zones during a manufacturing process are unchanged in the TR threshold table 202. This enables real TR threshold TH_TRi to be returned to a value equal to reference TR threshold TH_HRTi (i.e., an initial value), for example, when the number of data writes to zone Zi is reduced. For the same reason, the real TR threshold is changed to a value lower than the reference TR threshold by a real TR threshold in a zone on which data writing is always concentrated, even when the use state of the HDD is changed.
<First Modification>
A first modification of the embodiment will be described. In the above embodiment, the CPU 173 changes, to a value lower than the reference TR threshold, only a real TR threshold in one zone Zi among all zones Z0 to Xm−1 on the disk 11, in which zone both the first and second TR threshold changing conditions are satisfied. In contrast, in the first modification example, the CPU 173 changes, like the real TR threshold in zone Zi, a real TR threshold in a zone in which the second TR threshold changing condition is satisfied, even if the first TR threshold changing condition is not satisfied.
In the first modification, assume that the CPU 173 has detected a TG count satisfying the second TR threshold changing condition, e.g., a TG count TGC_Zg. In this case, the CPU 173 changes a real TR threshold TH_TRg in a zone Zg associated with the TG count TGC_Zg, as well as real TR threshold TH_TRi in zone Zi. Namely, the CPU 173 changes the real TR threshold TH_TRg in the zone Zg to TH_HRTg×P_TH/100.
In the example of
<Second Modification>
A second modification of the embodiment will be described. In the above-described first modification, when real TR thresholds in a plurality of zones including zone Zi are reduced, they are reduced by the same amount. In contrast, the second modification is characterized in that real TR thresholds are adjusted to be reduced in accordance with the TG counts of the respective zones associated with the real TR thresholds to be reduced.
First, it is assumed that TG count TGC_Zi in zone Zi satisfies the first and second TR threshold changing conditions. Here, it is assumed also that the TG count TGC_Zg in the zone Zg does not satisfy the first TR threshold changing condition, but satisfies the second TR threshold changing condition. In this case, regarding real TR threshold TH_TRi in zone Zi, the CPU 173 reduces it to TH_HRTi×P_TH/100. In contrast, regarding the real TR threshold TH_TRg in the zone Zg, the CPU 173 adjusts the ratio of reduction of the real TR threshold TH_TRg from a reference TR threshold TH_HRTg by the ratio of the TG count TGC_Zg to TR count TGC_Zi, based on the ratio indicated by the parameter P_TH. Namely, the CPU 173 reduces the real TR threshold TH_TRg to TH_HRTg×P_TH×TGC_Zg/(TGC_Zi×100). In the second modification, the risk of destroying data on tracks in zones in which a greater number of data writes are made can be further reduced with the reduction of the HDD performance suppressed effectively.
In one or more of the above-described embodiment, the risk of destroying data on tracks in zones in which a greater number of data writes are made can be reduced while the reduction of the HDD performance is suppressed.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.
This application is based upon and claims the benefit of priority from United States Provisional Patent Application No. 62/085,763, filed Dec. 1, 2014, the entire contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
62085763 | Dec 2014 | US |