Magnetic disk device
By measuring the write time and access times of serial NAND, determining the backup block order, and utilizing the back electromotive force of the spindle motor to back up data to the serial NAND memory, the problems of insufficient backup data and poor write performance in the PLP function of serial NOR and serial NAND are solved, achieving more reliable and efficient data backup.
Patent Information
- Application Number
- CN202410843208.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-03-22
- Filing Date
- 2024-06-27
- Publication Date
- 2025-09-23
AI Technical Summary
In the prior art, the PLP function using serial NOR flash memory cannot ensure sufficient backup data size, and serial NAND may produce poorly written blocks, resulting in a reduction in backup data size or backup function failure.
By measuring the write time and access count of the serial NAND, the block order for backup is determined to avoid accessing high-risk blocks. The back electromotive force of the spindle motor is used to back up data to the serial NAND memory. Block address sorting and bad block processing mechanisms are adopted to ensure the reliability of data writing.
The PLP function improves the backup data reliability, reduces the backup time loss caused by bad blocks, shortens the backup processing time, balances the block usage frequency, avoids concentrated access, and improves HDD performance.
Smart Images

Figure CN120687024A_ABST
Abstract
Description
[0001] This application claims the benefit of priority based on Japanese Patent Application No. 2024-046340 (filing date: March 22, 2024), the entire contents of which are incorporated herein by reference. Technical Field
[0002] Embodiments of the present invention relate to backup data processing in a magnetic disk device. Background Art
[0003] Magnetic disk drives (HDDs) now have a Power Loss Protection (PLP) function, a technology that backs up cached data in volatile memory to nonvolatile memory during a power outage. Conventionally, the nonvolatile memory used in PLP has been serial NOR flash memory.
[0004] However, due to the long data write time of serial NOR, it is sometimes impossible to back up sufficient data, that is, the backup data size cannot be guaranteed. Therefore, by adopting serial NAND with larger capacity and faster access speed, it is expected to achieve improved HDD performance, such as increasing the backup data size. However, serial NAND products may generate blocks with poor (erroneous) writes (bad blocks), which may reduce the backup data size when executing PLP. Summary of the Invention
[0005] An embodiment of the present invention provides a magnetic disk device having a PLP function for performing data backup to a flash memory using a serial NAND.
[0006] The magnetic disk device of this embodiment has a flash memory that uses a serial NAND having multiple blocks. Based on the write time of the serial NAND in blocks, one or more first blocks among the multiple blocks to be written during backup are determined, and the data on the non-volatile memory is backed up to the serial NAND using the back electromotive force of the spindle motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 It is a structural diagram of a magnetic disk device according to an embodiment.
[0008] Figure 2 This is a time chart showing the operation of the PLP function of the magnetic disk device according to the embodiment.
[0009] Figure 3This is a schematic diagram showing the data structure of the nonvolatile memory (serial NAND) of the magnetic disk device according to the embodiment.
[0010] Figure 4 This is a flowchart showing the processing operation of the magnetic disk device according to the embodiment.
[0011] Figure 5A This is an example of a case where the number of backup executions of the PLP information table of the serial NAND included in the magnetic disk device according to the embodiment is 0.
[0012] Figure 5B This is an example of a case where a backup of the PLP information table of the serial NAND in the magnetic disk device according to the embodiment has been performed in the past.
[0013] Figure 6 (a) to (c) are schematic diagrams showing addresses sorted in the order of blocks with the shortest write time in the magnetic disk device according to the embodiment.
[0014] Figure 7 (a) and (b) are schematic diagrams of a serial NAND in a case where a write failure (failure) occurs in a serial NAND block in the magnetic disk device according to the embodiment.
[0015] Figure 8 This is a flowchart showing the processing operation when the PLP of the magnetic disk device according to the embodiment is started (activated).
[0016] Description of labels
[0017] 1 Magnetic disk device; 2 Host system; 10 HDA; 11 Disk; 12 SPM; 13 VCM; 14 Pivot; 15 Arm; 16 Suspension; 17 Micro actuator; 18 Slider; 19 Head; 20 Driver IC; 30 Head amplifier IC; 40 R / W channel; 50 HDC (hard disk controller); 60 Main controller; 61 Read / write control unit; 62 Servo control unit; 70 Volatile memory; 80 Non-volatile memory; 101 HDD external power supply; 102 HDD backup power supply; 500 PLP execution unit; 501 Block write time measurement unit; 502 Block access count unit; 503 Block address sorting unit; 504 Block availability determination unit; 505 PLP information update unit; 801 Serial NAND. DETAILED DESCRIPTION
[0018] (First embodiment)
[0019] This embodiment shows an example of a magnetic disk drive having a PLP function using a serial NAND. The PLP function is a function for backing up unwritten data in a volatile memory such as a DRAM to a nonvolatile memory when the magnetic disk drive is powered off.
[0020] This embodiment is an example of a disk device that predicts the risk of generating unusable blocks, i.e., bad blocks, on a serial NAND and avoids accessing high-risk blocks when executing PLP. This utilizes the characteristic of serial NAND that blocks with longer write times are more likely to become bad blocks.
[0021] Figure 1 It is a structural diagram of a magnetic disk device according to an embodiment.
[0022] The magnetic disk device 1 is a storage device equipped with a magnetic disk 11 (hereinafter sometimes simply referred to as the disk 11) capable of reading and writing data. It includes a processor (e.g., a processing device such as a CPU or microprocessor) and various types of memory capable of computer functions such as computational processing. Based on commands received from a connected host system 2, the magnetic disk device 1 outputs data to the host system 2 and writes data input from the host system 2 to the magnetic disk 11.
[0023] The magnetic disk device 1 of this embodiment employs a method of temporarily storing received data from the host system 2 in a buffer memory before writing the data to the disk 11. The buffer memory utilizes a volatile memory 70, such as a DRAM, described later. By utilizing the buffer memory, the data transmission speed from the host system 2 is increased, thereby improving the throughput of the magnetic disk device 1.
[0024] The host system 2, such as a personal computer, outputs a read command to read data from the disk 11 to the magnetic disk device 1, or outputs a write command to write data to the disk together with the data. Furthermore, the host system 2 may output information about a sampling period of servo information contained on the disk 11 of the magnetic disk device 1 and specify the information to the magnetic disk device 1.
[0025] The HDA 10 is called a head disk assembly, and the disk 11, the spindle motor 12 (hereinafter, sometimes referred to as SPM 12), the arm 15 equipped with the head 19, the voice coil motor 13 (hereinafter, sometimes referred to as VCM 13), etc. are housed in a housing. Figure 1 In the HDA 10 shown in FIG. 1 , an example is shown in which one disk 11 and one head 19 are provided, but more than one may be provided.
[0026] The disk 11 is a rotating, magnetic disk storage medium. A data area, where data can be written (sometimes referred to as "write"), is divided into a user data area accessible to the user and a system area where information required for system management is written. Hereinafter, the direction perpendicular to the radial direction of the disk 11 is referred to as the circumferential direction. The disk 11 is mounted on a spindle motor 12 and is driven to rotate by the spindle motor 12.
[0027] The disk 11 is set with a plurality of tracks. Figure 1 In the diagram, three tracks TR1, TR2, and TR3 (referred to as tracks TR unless otherwise specified) are shown as examples. However, multiple tracks are set concentrically around the spindle motor 12 in the data area. When reading or writing data (reading / writing) on the disk 11, the head 19 is moved to the track TR where the data to be read or written (sometimes referred to as target data) is located through seek control and tracking control, and the head 19 reads or writes the data. The track TR where the target data is located is sometimes referred to as the target track.
[0028] In addition, servo information is written in the disk 11 for use in detecting the position of the head 19. The servo information is set at a predetermined position (called a servo area) in the circumferential direction of the disk 11. The servo information is general in nature and its detailed description is omitted. Figure 1 In the example shown, three servo areas SVA1, SVA2, and SVA3 (referred to as servo areas SVA unless otherwise specified) are shown as examples of servo areas. However, generally speaking, servo areas SVA are arranged at equal intervals along the entire circumference of the disk 11, and servo information is written to the servo areas SVA of each track TR. The magnetic disk device 1 can detect the current position of the head 19 (head position) based on the servo information read by the head 19.
[0029] The spindle motor 12 (SPM12) is a support for the disk 11 and is provided on a magnetic disk housing, etc. The disk 11 rotates when the spindle motor 12 rotates.
[0030] The VCM 13 is a voice coil motor type actuator for moving the arm 15 etc. The VCM 13 controls the operation of the arm 15 etc. based on input current or voltage.
[0031] The pivot shaft 14 is a bearing for supporting the arm 15 and the like and enabling the arm 15 to perform a rotational operation.
[0032] The arm 15 supports the slider 18 and / or the head 19 and transmits power from the VCM 13 to the head 19 to move the head 19 to the target track TR.
[0033] A microactuator 17 is connected to the suspension 16 .
[0034] The microactuator 17 (sometimes also referred to as MA17) performs high-precision position adjustment, such as tracking control of the head 19, based on the input current or voltage. The microactuator 17 has a general function and a detailed description is omitted, but it is used to fine-tune the position of the head 19 during stabilization (settling) after seek control and / or to perform tracking control of the target track after seek control. Stability refers to the state in which, after the head 19 is moved by seek control, the positioning error with respect to the target track, including the influence of the vibration of the head 19 caused by seek control, falls below a certain threshold, for example. After the vibration of the head 19 becomes sufficiently small due to stabilization, data read and write control and / or tracking control are performed.
[0035] A head 19 is mounted on the slider 18 .
[0036] The head 19 is a part that writes data to the disk 11 and reads data recorded on the data tracks of the disk 11. In addition, when specifically distinguished, the head that writes data to the disk 11 is called a write head 19W, and the head that reads data recorded on the data tracks of the disk 11 is called a read head 19R.
[0037] The driver IC 20 outputs a current or a voltage for driving and controlling the SPM 12 , the VCM 13 , the MA 17 , and the like in accordance with control from the HDC 50 , the servo control unit 62 , and the like.
[0038] The head amplifier IC 30 includes a read amplifier and a write driver. The read amplifier amplifies a read signal read from the disk 11 and outputs it to the R / W channel 40. The write driver outputs a write current corresponding to the signal output from the R / W channel 40 to the head 19.
[0039] The R / W channel 40 controls the head amplifier IC 30 to read and write data from and to the disk 11, based on instructions from the HDC 50, the main controller 60, and other devices. The R / W channel 40 receives a read data signal from the head amplifier IC 30 and extracts the read data. Alternatively, the R / W channel 40 generates a write data signal based on commanded write data and outputs it to the head amplifier IC 30. Furthermore, the R / W channel 40 measures the signal quality of the read data received from the head amplifier IC 30. The R / W channel 40 can also extract position information of the head 19 based on a servo information signal received from the head amplifier IC 30.
[0040] The HDC 50 serves as the interface between the disk drive 1 and the host system 2 and is a hard disk controller that controls various components of the disk drive 1. The HDC 50 is comprised of a processing device (processor) such as a CPU with computational capabilities. Alternatively, it may be comprised of an IC chip with computational capabilities and various types of memory, a system LSI, or an FPGA. Various processes performed by the HDC 50 may be executed via software (including firmware), implemented as hardware, or a combination of both.
[0041] The HDC 50 receives commands such as a write command to write data to the disk 11 and a read command to read data from the disk 11 from the host system 2. Based on the received commands, the HDC 50 controls various components of the magnetic disk device 1 or transfers data between the host system 2 and the R / W channel 40. The HDC 50 can also control the reading and writing of data from the volatile memory 70 and the non-volatile memory 80.
[0042] The HDC 50 includes a PLP execution unit 500, a block write time measurement unit 501, a block access counter unit 502, a block address sorting unit 503, a block availability determination unit 504, and a PLP information update unit 505. However, their functions may be located elsewhere.
[0043] The PLP execution unit 500 is a unit that executes the PLP function. When it detects that the HDD external power supply 101 is powered off, it stores unwritten data in a volatile memory such as DRAM in the serial NAND 801. The PLP execution unit 500 can also execute PLP by referring to a separately generated PLP information table.
[0044] Furthermore, the PLP execution unit 500 counts the number of times the PLP function has been executed (referred to as the backup execution count). The backup execution count indicates the number of times data backup has been executed in the past using the PLP function, and is a value common to all blocks.
[0045] The block write time measurement unit 501 measures the time it takes for the serial NAND drive 801 to write data to a block (referred to as the serial NAND write time). The serial NAND write time represents the time it takes to write data to a block and is measured per block. The block write time measurement unit 501 may also measure the block write time by writing test data to a block immediately after the magnetic disk drive 1 is powered on.
[0046] The block access counter 502 counts the number of times data has been written to each block when the PLP function is executed (referred to as the backup usage count). The backup usage count indicates the number of times data has been written to the PLP function in the past and is a value for each block.
[0047] The block address sorting unit 503 determines the write order of the blocks to be written when executing the PLP function based on the serial NAND write time, the number of backup uses, etc., or arranges (sorts) the physical address or logical address of the block in the write order, and generates the write order and / or sorted address as the block address sorting result by block.
[0048] More specifically, the block address sorting unit 503, for example, uses the measured results of serial NAND write times to sort the addresses of blocks in ascending order of write time, generating a block address sorting result. During HDD power-off backup, the PLP execution unit 500 writes data to the blocks in the order of the block address sorting results, enabling data to be written in ascending order of write time.
[0049] Furthermore, the block address sorting unit 503 generates a block address sorting result based on the backup usage count so that data is written in order of blocks with the smallest access count, for example, for a plurality of serial NAND blocks with the same write time.
[0050] Furthermore, the block address sorting unit 503 may exclude blocks with write failures and / or blocks whose serial NAND write time exceeds the device's write time standard (outside the standard) from the sorting targets of the block address sorting result.
[0051] The block availability determination unit 504 sets a "Not Available (NG)" flag and stores it in the PLP information table for blocks with write failures, such as failure to write test data, and / or blocks whose measured write times exceed the device's write time standard. The PLP information table, for example, includes a "Block Available" data item. "Block Available" indicates whether data can be written ("OK" or "NG") during the execution of the PLP function, and is determined for each block. By predetermining the addresses of blocks designated as "Not Available" by the block availability determination unit 504, writing to blocks previously identified as bad blocks is prevented.
[0052] Furthermore, by utilizing the tendency that blocks with fewer backup usage times have less write degradation, the block availability determination unit 504 may use the backup usage count as an indicator when selecting blocks to write data to when executing the PLP function or determining the writing order. For example, by selecting a block address with less frequent writes as the block to be used when the PLP is activated, the block availability determination unit 504 can avoid concentrated access to the same block.
[0053] The PLP information update unit 505 stores or rewrites the data generated by the block write time measurement unit 501, block access count unit 502, block address sorting unit 503, block availability determination unit 504, etc. as described above in the PLP information table.
[0054] The main controller 60 is a main controller that controls various components of the magnetic disk drive 1. It is composed of a processor such as a CPU or microprocessor. Alternatively, it may be composed of an IC chip, a system LSI, an FPGA, or the like that has computing functions and various memories. The various processes of the main controller 60 may be executed by software (including firmware), implemented as hardware, or a combination of software and hardware.
[0055] The read / write control unit 61 selects a storage destination for write data (e.g., information on the data sector or track of the disk 11) based on commands received from the host system 2 and controls the data writing operation to the disk 11. The read / write control unit 61 notifies the servo control unit 61 and other units of the storage destination for read data (e.g., information on the data sector or track of the disk 11) based on commands received from the host system 2 and controls the data reading operation from the disk 11 by operating the head 19.
[0056] The servo control unit 62 controls the head 19 based on commands received from the host system 2, for example. For example, the servo control unit 62 controls the VCM 13 via the driver IC 20 to move the head 19 to a target position, thereby executing seek control and tracking control. Furthermore, the servo control unit 62 controls the MA 17 via the driver IC 20 to execute tracking control of the head 19.
[0057] Volatile memory 70 is a semiconductor memory that loses stored data when power is disconnected. It stores data required for processing in magnetic disk drive 1. Examples of volatile memory 70 include DRAM (Dynamic Random Access Memory) or SDRAM (Synchronous Dynamic Random Access Memory).
[0058] The nonvolatile memory 80 is a semiconductor memory that records stored data even when power is turned off. The nonvolatile memory 80 may include, for example, a NOR-type or NAND-type flash memory. Serial NAND 801 represents a serial NAND-type flash memory.
[0059] The HDD external power supply 101 is an external power supply for the magnetic disk device 1 , obtains AC power from the outside, and supplies power of 5V, 12V, etc. to the inside.
[0060] The HDD backup power supply 102 can be positioned as an internal power source relative to the HDD external power supply 101. The HDD external power supply 101 supplies 5V, 12V, or other power to various components within the magnetic disk drive 1. For example, if the HDD external power supply 101 experiences an unexpected power outage, the HDD backup power supply 102 can utilize the back electromotive force of the spindle motor 12 to continue providing power.
[0061] When the HDD external power supply 101 unexpectedly fails, the HDC 50 activates the PLP and uses the power supplied by the HDD backup power supply 102 using the back electromotive force of the spindle motor 12 to back up the unwritten data in the volatile memory 70 such as DRAM to the serial NAND 801.
[0062] Figure 2 This is a timing chart showing an example of the operation of the PLP function of a magnetic disk drive according to an embodiment. The horizontal axis represents time, and the vertical axis represents the amplitude of voltage, current, power, and the like. A1 through A4 represent examples of amplitude characteristics of voltage, current, power, and the like. Symbols prefixed with "t" indicate time, and these times are common to characteristics A1 through A4.
[0063] At time t0, the HDD external power supply 101 and the HDD backup power supply 102 are operating normally in the ON (started) state. Assume that at time t01, the HDD external power supply 101 is powered off. At time t1, the power of the HDD external power supply 101 is turned off (stopped).
[0064] At time t1, power to the HDD backup power supply 102 from the HDD external power supply 101 ceases. However, as shown by characteristic A2, power continues for a while, then continues to be supplied using the back electromotive force of the spindle motor 12. However, starting around time t2, as the rotation of the spindle motor 12 slows, characteristic A2 decreases. After time t3, the HDD backup power supply 102 is disconnected (off), and power supply ceases. Therefore, PLP must be completed within a certain period of time after the HDD is powered off.
[0065] If bad block processing (equivalent to the replacement process described later) is included during PLP execution, there is a fail-safe function that shortens the PLP time (the time during which data can be backed up) as the number of bad blocks increases. Therefore, there is a concern that the backup data size may be reduced due to the loss of PLP time, or that the backup function itself may malfunction due to bad blocks. Therefore, it is preferable to avoid accessing bad blocks during the PLP function.
[0066] When the HDC 50 detects a power failure of the HDD external power supply 101 at time t1, it activates the PLP function and, while the HDD backup power supply 102 is still sufficient, backs up the unwritten data in the volatile memory 70 to the serial NAND 801. Characteristic A3 shows an example of the time period during which data can be backed up using the PLP function (time period t11 to t22), while characteristic A4 shows an example of the time period during which data is actually written to the serial NAND 801 (time period t12 to t21).
[0067] Furthermore, as described above, the data written to the serial NAND 801 during power failure can be read out and stored in the disk 11 the next time the magnetic disk device 1 is powered on. After these processes are completed, the data stored in the serial NAND 801 can be invalidated.
[0068] Figure 3 This is a schematic diagram showing the data structure of the volatile memory (serial NAND) of the magnetic disk device according to the embodiment.
[0069] As shown in the figure, the write area of the serial NAND 801 can be roughly logically divided into a system information area and a user data area. The system information area is the area where the PLP information table described later is stored. The user data area is the area where data transferred from the volatile memory 70 via the PLP function is stored, and is called the PLP area.
[0070] Generally speaking, serial NAND uses a block consisting of multiple cells (1-bit area) as the minimum write unit. When writing to a cell, the entire block containing the cell must be rewritten. The figure shows an example of allocating 1024 blocks to the PLP area (in actual products, there is generally an area within the 1024 blocks that cannot be rewritten to store firmware information, parameter information, etc., so not all 1024 blocks are used as PLP areas). When each block is composed of 128Kbyte units, it has a capacity of 128MB.
[0071] The system information area stores information related to the PLP function of this embodiment, namely the PLP information table. The number of backup implementations indicates the number of times data backup has been implemented in the past through the PLP function, and is a value shared by all blocks. The serial NAND write time measurement result indicates the write time for writing data to a block in the PLP area, and is a value measured on a per-block basis. The block address sorting result indicates the write order of the blocks to which data is written when the PLP function is executed, and is a value determined on a per-block basis. Whether a block is available indicates whether it can be used for data writing when the PLP function is executed, and is information determined on a per-block basis. The number of backup uses indicates the number of times data writing has been performed in the past through the PLP function, and is a value for each block.
[0072] The following describes the operation of the magnetic disk device according to the embodiment.
[0073] Figure 4 This is a flowchart showing the processing operation of the magnetic disk device according to the embodiment, and may be, for example, instructions or processing steps included in software (including firmware) stored in the nonvolatile memory 80 or the like.
[0074] First, when the power source of the HDD external power source 101 is turned on (step S101 : YES), the HDC 50 reads the PLP information table (step S102 ).
[0075] HDC50 confirms the number of backup implementations of the PLP information table. When the number of backup implementations is 0, that is, when data has never been written to the PLP area in the past (step S103: yes), or when the number of backup implementations is 100n (n is a natural number) (step S104: yes), it enters the processing of step S105.
[0076] Furthermore, the condition "backup execution count is 100n" in step S104 is based on experimental results showing that when the number of writes to a serial NAND block reaches approximately 100, the write time to the serial NAND block begins to increase. Therefore, this embodiment shows an example in which writing to the serial NAND is performed again and the write time is updated every 100 backup executions. However, this is not limited to every 100 times and can be arbitrarily changed as a parameter.
[0077] The processing of steps S105 to S112 is performed for each block in the PLP information table. Hereinafter, the ith (i is an integer from 0 to 1023) block Block#i in the PLP area (backup data size area + reserved area) will be described as an example.
[0078] Test data is written to Block #i (step S106). For example, the test data may be set to 1 for all cells in the block. Writing is performed on a block-by-block basis in the serial NAND 801. Therefore, by charging all cells in Block #i, i.e., writing data, data writing to Block #i is completed.
[0079] The HDC 50 measures the writing time to Block #i during the writing process in step S106 (step S107). In step S107, the writing time can be measured by measuring the timestamps of when writing starts and ends. Alternatively, the measured time can be written into the PLP information table at the time of completion.
[0080] If a block has a write failure or a write time that exceeds the device standard, the block is marked as unusable and skipped (skip). For example, if the HDC 50 detects a write failure to Block #i during the write process in step S106 or detects that the write time to Block #i deviates from the standard during the process in step S107, Block #i is determined to be unusable (NG) (step S108: Yes, S109). On the other hand, if the conditions in step S108 are not met, Block #i is determined to be usable (OK) (step S108: No, S110).
[0081] In steps S109 and S110, the HDC 50 updates the "Block Usability" entry for Block #i in the PLP information table to "OK" or "NG" (step S111). The HDC 50 performs the processing from steps S105 to S112 for all blocks in the PLP area and uses the updated PLP information table to determine the order in which the blocks are written (step S113).
[0082] Figure 5A This is an example of the case where the number of backup execution times of the serial NAND PLP information table in the magnetic disk device according to the embodiment is 0. Figure 4 This is an example of the PLP information table being updated after the result of step S103 is "Yes".
[0083] The columns represent the data of the original block address, number of backup implementations, serial NAND write time, write (ascending) address sorting, block availability, and number of backup usages, and the rows represent the data of each item corresponding to the block specified by the original block address. The original block address represents the address of the block that identifies the PLP area, but for the sake of convenience, it is assumed here as follows: Figure 3 As shown, logical addresses are represented as #0, #1, and #2 in the physical block arrangement of the PLP area of the serial NAND 801. Note that #0, #1, and #2 may not necessarily be physically or logically adjacent.
[0084] Data D3 shows the Figure 4 The data D5 indicates the data writing time to the block measured in step S106, and whether the data can be written to the block is determined in step S108. The data D4 indicates the block address sorting result determined based on the data D3 and D5, and is the result of executing step S113.
[0085] For example, data BD1 is an example of the following situation: HDC50 performs steps S105 to S110 on the initial block address "Block#1", determines that the data write time is d [ms], and whether the block is available is "OK", and through the processing of step S113, determines that the block address sorting result is the 5th place.
[0086] In step S113, the HDC 50 may also determine the block address sorting result based on the serial NAND write time and block availability. For example, the write order may be determined from shortest to longest serial NAND write time. In this case, blocks such as data BD2 and BD3, which have a block availability rating of "NG" due to reasons such as exceeding the serial NAND write time limit or being unable to write to the serial NAND 801 (write failure), may be excluded from the write target.
[0087] Data D4 shows an example where the blocks whose block availability is "OK" in step S113 are written in ascending order of serial NAND write time. In the case where the serial NAND write times are the same, as in the example of Block #0 and Block #2, the writing order can be determined in ascending order, following the predetermined block order.
[0088] Figure 5B This is an example of a case where a backup was performed in the past for the PLP information table of the serial NAND in the magnetic disk device involved in the embodiment. Figure 4 An example of the PLP information table updated after the result of step S103 is "No".
[0089] Data D2 indicates that backup (writing to the serial NAND 801 based on the PLP function) has been performed 500 times in the past. In addition, as shown in data D6, the number of times each block has been used in past backups is reflected.
[0090] In this case, in the process of step S113, in addition to the serial NAND write time and block availability, the backup use count is also used. For example, the block access counter 502 of the HDC 50 counts the block use frequency (backup use count) and stores the backup use count in the PLP information table for monitoring. Therefore, after the second PLP, for blocks with the same serial NAND write time, blocks with a smaller access count (backup use count) are preferentially used.
[0091] More specifically, when the serial NAND write time of two blocks is the same as e [ms] as shown in data BD11 and BD12, Block #6 with the least number of backup uses may be placed first, that is, in the order of Block #6 and Block #1.
[0092] In addition, in the above example, the order of writing blocks is determined based on the number of backup usages, but the blocks used in the backup can also be determined based on the number of backup usages. For example, a threshold value is set for the number of backup usages, and blocks exceeding the threshold value are excluded from being written. Specifically, Figure 5B In the example of , when the threshold is set to 250, Block#1 and Block#4 are excluded from the writing target.
[0093] Figure 6 This is a schematic diagram of addresses sorted in the order of blocks with the shortest write time in the magnetic disk device according to the embodiment.
[0094] Figure 6 (a) means press Figure 5A 、 5B In the case where the blocks are arranged in the order of the initial block addresses shown in the data D1, Figure 6 (b) indicates that no backup was performed in the past (equivalent to Figure 5A For example) the blocks are arranged in the order of writing the blocks. Figure 6 (c) indicates that the backup was performed in the past (equivalent to Figure 5B For example, the order of writing blocks is arranged. Figure 6 (b) Figure 6 In (c), it is shown that the availability of Block#5 and Block#7 is set to "NG", and the blocks are arranged in order of writing time from shortest to longest, and the two blocks are excluded from the writing object. Figure 5A 、 5B In the example, the write address sequence of data D4 is shown in blocks, but it can also be shown in Figure 6 As in the address sorting of (b) and (c), the addresses are sorted in the order of writing and included in the PLP information table. Thus, when the PLP is started, the blocks can be written in the order of the address sorting from top to bottom.
[0095] Figure 7 This is a schematic diagram of a serial NAND in a case where a write failure occurs in a serial NAND block in the magnetic disk device according to the embodiment.
[0096] Generally speaking, unlike serial NOR, serial NAND requires the user to ensure that bad blocks (bad blocks) are written. Specifically, a device standard is set that 2% of the total product capacity (equivalent to the capacity of the PLP area) requires maintenance (care) on the user side. For example, in the case of a 128MB product, there are 1024 blocks in the total capacity, and 20 blocks, equivalent to 2%, need to be replaced with alternative blocks (bad block treatment).
[0097] Figure 7 (a) is an example of a case where the initial block address is designated for the physical block of the serial NAND 801, and shows a case where a failure occurs in Block #50. Figure 7 (b) shows the logical address status after bad block processing is performed on Block #50, which has a problem. Through bad block processing, Block #50 is moved to the initial block address of Block #1023. Block #1023 was originally a free block used for bad block processing.
[0098] When the PLP information table is updated in step S114, the magnetic disk device 1 enters the normal use state (HDD power-off ready state). Thereafter, if the HDD is powered off while in the HDD power-off ready state, the HDC 50 performs data backup by referring to the PLP information table and writing to the addresses of the serial NAND 801 blocks in ascending order of write time.
[0099] The following describes a processing operation when the magnetic disk device 1 unexpectedly powers off in the HDD power-off ready state and the PLP function is activated.
[0100] Figure 8 This is a flowchart showing the processing operation when the magnetic disk device according to the embodiment starts the PLP.
[0101] When the HDC 50 detects a power outage in the HDD external power supply 101, it activates the PLP function and reads the address sequence of the PLP information table (steps S201: Yes, S202). Based on the read address sequence, the HDC 50 sequentially writes the unwritten data in the volatile memory 70 to the serial NAND 801, block by block (step S203). After the HDC 50 completes writing a block (referred to as Block #i), it increments the backup usage count for Block #i by 1 and updates the PLP information table (step S204). After step S204, if the next block exists in the address sequence (step S205: Yes), the process from step S203 onward is repeated. Once the backup process for all blocks in the address sequence is complete (step S205: No), the process ends.
[0102] Through the above steps, the magnetic disk drive of this embodiment can reduce accesses (writes) to blocks with a high probability of becoming bad blocks when writing to serial NAND using the PLP function. This not only reduces the concern about backup time loss caused by the time it takes to handle bad blocks when using serial NAND, but also can be expected to improve the reliability of backup data and shorten backup processing time using the PLP function. In addition, by using the block access count function to monitor block usage frequency, it is possible to control concentrated access to the same block and also to achieve the effect of wear leveling (using block address dispersion).
[0103] According to at least one embodiment described above, there is provided a magnetic disk device that backs up data to a flash memory using a serial NAND using a PLP function.
[0104] Several embodiments have been described, but these embodiments are presented as examples and are not intended to limit the scope of the invention. These new embodiments can be implemented in various other ways, and various omissions, substitutions, and changes can be made without departing from the scope of the invention. These embodiments and their variations are included in the scope and / or gist of the invention and are included in the invention described in the claims and their equivalents. In addition, the processing shown in the flowcharts, timing diagrams, etc. can also be executed as instructions and / or steps for causing a computer to work, contained in software (including firmware) and / or hardware such as an IC chip or a digital signal processor (Digital Signal Processor or DSP), or executed by a combination of these hardware and software. In addition, the device of the present invention can be applied when the claims are expressed as control logic, when they are expressed as a program containing instructions for causing a computer to execute, and when they are expressed as a computer-readable recording medium recording the instructions. In addition, the names and terms used are not limited, and even if they are expressed in other ways, as long as they are essentially the same content and the same gist, they are included in the present invention.
Claims
1. A magnetic disk device, A flash memory using a serial NAND with a plurality of blocks is provided, and data on a nonvolatile memory is backed up to the serial NAND using the back electromotive force of a spindle motor. One or more first blocks to be used for writing during backup among the plurality of blocks are determined based on the block-by-block writing time of the serial NAND.
2. The magnetic disk device according to claim 1, The writing order of the one or more first blocks during backup is determined based on the writing time.
3. The magnetic disk device according to claim 2, The writing time is actually measured.
4. The magnetic disk device according to claim 2 or 3, The addresses of the blocks are pre-sorted according to the write order, and the sorted addresses are stored in the serial NAND.
5. The magnetic disk device according to claim 4, The unusable second block is determined and removed from the first block.
6. The magnetic disk device according to claim 5, If there is a writing failure or if the threshold set for the writing time is exceeded, the data is set to be unusable.
7. The magnetic disk device according to claim 5, The writing order is set to start with writing to the first block with a low writing frequency.
8. The magnetic disk device according to claim 7, The frequency of writing to the first block is counted.
9. The magnetic disk device according to claim 1, It has a PLP information table, which includes the number of backup implementations, the actual measurement results of the block write time of the serial NAND, the results of sorting the addresses in order of blocks with shortest write time to longest write time, the results of whether the block is available and the write frequency, that is, the number of times the block is used.
10. The magnetic disk device according to claim 9, Based on the number of backup implementations, it is determined whether to update the PLP information table.
Citation Information
Patent Citations
Semiconductor device
JP2024046340A