Data management for a data storage device with zone relocation

Managing data stored on media of a Data Storage Device (DSD) using zone relocation. At least a portion of the media is logically divided into a plurality of zones and zones are identified with access counts greater than or equal to a threshold. The access count for each of the identified zones indicates a number of times data in the zone has been read or written. Data is relocated from at least one zone of the identified zones to at least one destination zone on the media to reduce a data access time between the identified zones.

BACKGROUND

Data Storage Devices (DSDs) are often used to record data onto or to reproduce data from a storage media. One type of storage media includes a rotating magnetic disk where a magnetic head of the DSD can read and write data in tracks on a surface of the disk.

To access data from a surface of the disk, the head seeks to the location of the data on the disk during a seek operation. A long seek operation can result in a decreased performance of the DSD due to a longer time to access the data from the disk.

DETAILED DESCRIPTION

In the following detailed description, numerous specific details are set forth to provide a full understanding of the present disclosure. It will be apparent, however, to one of ordinary skill in the art that the various embodiments disclosed may be practiced without some of these specific details. In other instances, well-known structures and techniques have not been shown in detail to avoid unnecessarily obscuring the various embodiments.

FIG. 1shows system100according to an embodiment which includes host101and Data Storage Device (DSD)106. System100can be, for example, a computer system (e.g., server, desktop, mobile/laptop, tablet, smartphone, etc.) or other electronic device such as a digital video recorder (DVR). In this regard, system100may be a stand-alone system or part of a network. Those of ordinary skill in the art will appreciate that system100and DSD106can include more or less than those elements shown inFIG. 1and that the disclosed processes can be implemented in other environments.

In the example embodiment ofFIG. 1, DSD106includes both solid-state memory128and disk150for storing data. In this regard, DSD106can be considered a Solid-state Hybrid Drive (SSHD) in that it includes both solid-state Non-Volatile Memory (NVM) media and disk NVM media. In other embodiments, each of disk150or solid-state memory128may be replaced by multiple Hard Disk Drives (HDDs) or multiple Solid-State Drives (SSDs), respectively, so that DSD106includes pools of HDDs or SSDs. In yet other embodiments, the NVM media of DSD106may only include disk150without solid-state memory128.

DSD106includes controller120which includes circuitry such as one or more processors for executing instructions and can include a microcontroller, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), hard-wired logic, analog circuitry and/or a combination thereof. In one implementation, controller120can include a System on a Chip (SoC).

Host interface126is configured to interface DSD106with host101and may interface according to a standard such as, for example, PCI express (PCIe), Serial Advanced Technology Attachment (SATA), or Serial Attached SCSI (SAS). As will be appreciated by those of ordinary skill in the art, host interface126can be included as part of controller120.

In the example ofFIG. 1, disk150is rotated by a spindle motor (not shown). DSD106also includes head136connected to the distal end of actuator130which is rotated by Voice Coil Motor (VCM)132to position head136in relation to disk150. Controller120can control the position of head136and the rotation of disk150using VCM control signal30and SM control signal34, respectively.

As appreciated by those of ordinary skill in the art, disk150may form part of a disk pack with additional disks radially aligned below disk150. In addition, head136may form part of a head stack assembly including additional heads with each head arranged to read data from and write data to a corresponding surface of a disk in a disk pack.

Disk150includes a number of radial spaced, concentric tracks (not shown) for storing data on a surface of disk150from an Inside Diameter (ID) portion to an Outside Diameter (OD) portion of disk150. In the example ofFIG. 1, the tracks on disk150are grouped together into zones152with each track divided into a number of sectors that are spaced circumferentially along the tracks. In other embodiments, zones152may include groups of sectors within a track rather than groups of tracks.

Disk150also includes a plurality of angularly spaced servo wedges1540-154N, each of which may include embedded servo information that can be read by head136to determine a position of head136over disk150. For example, each servo wedge1540-154Nmay include a pattern of alternating magnetic transitions (servo burst), which may be read by head136and used to estimate the position of head136relative to disk200.

In addition to disk150, the NVM media of DSD106also includes solid-state memory128for storing data. While the description herein refers to solid-state memory generally, it is understood that solid-state memory may comprise one or more of various types of memory devices such as flash integrated circuits, Chalcogenide RAM (C-RAM), Phase Change Memory (PC-RAM or PRAM), Programmable Metallization Cell RAM (PMC-RAM or PMCm), Ovonic Unified Memory (OUM), Resistance RAM (RRAM), NAND memory (e.g., Single-Level Cell (SLC) memory, Multi-Level Cell (MLC) memory, or any combination thereof), NOR memory, EEPROM, Ferroelectric Memory (FeRAM), Magnetoresistive RAM (MRAM), other discrete NVM chips, or any combination thereof.

Volatile memory140can include, for example, a Dynamic Random Access Memory (DRAM) which can be used by DSD106to temporarily store data. Data stored in volatile memory140can include data read from NVM media (e.g., disk150or solid-state memory128), data to be written to NVM media, instructions loaded from firmware of DSD106for execution by controller120, or data used in executing firmware of DSD106.

As shown in the embodiment ofFIG. 1, volatile memory140stores translation table22, which provides a mapping between Logical Block Addresses (LBAs) used by host101to address data and physical locations (e.g., Physical Block Addresses (PBAs)) indicating physical locations on disk150or in solid-state memory128. In one implementation, a back-up copy of a translation table is stored on disk150which is updated to account for changes to translation table22stored in volatile memory140. In other embodiments, translation table22may be stored in a different location such as in solid-state memory128. Translation table22is described in more detail below with reference toFIGS. 7A and 7B.

In operation, host interface126receives read and write commands from host101via host interface126for reading data from and writing data to the NVM media of DSD106. In response to a write command from host101, controller120may buffer the data to be written for the write command in volatile memory140.

For data to be stored in solid-state memory128, controller120receives data from host interface126and may buffer the data in volatile memory140. In one implementation, the data is then encoded into charge values for charging cells (not shown) of solid-state memory128to store the data.

In response to a read command for data stored in solid-state memory128, controller120in one implementation reads current values for cells in solid-state memory128and decodes the current values into data that can be transferred to host101. Such data may be buffered by controller120before transferring the data to host101via host interface126.

For data to be written to disk150, controller120can encode the buffered data into write signal32which is provided to head136for magnetically writing data to the surface of disk150.

In response to a read command for data stored on disk150, controller120positions head136via VCM control signal30to magnetically read the data stored on the surface of disk150. Head136sends the read data as read signal32to controller120for decoding, and the data is buffered in volatile memory140for transferring to host101.

As discussed in more detail below, particular zones152may be accessed for reading or writing more frequently than other zones152on disk150. Often a workload from host101includes localized random activity spread across a stroke of actuator130. This can reduce performance of DSD106in servicing read and write commands since it can take a relatively long time (e.g., 5 ms or longer) to position head136from one localized area of activity to another area of localized activity.

FIG. 2illustrates an example of such localized activity across disk150according to an embodiment. Zones152on disk150are shown along the x-axis corresponding to their physical locations from an ID portion to an OD portion of disk150. An access count indicating a number of times a particular zone has been accessed for reading or writing is shown inFIG. 2. Certain zones such as zones208,210,212and214have a relatively high frequency of access as compared to other zones. The zones with a high frequency of access can be separated by large distances across disk150such as areas202and204with little or no access activity. Performance of DSD106generally suffers by having zones with high access counts spread out across disk150since this can result in longer seek times when moving head136from one frequently accessed zone to the next.

The processes discussed below involve identifying zones with an access count greater than or equal to a threshold and relocating data from at least one of the identified zones to reduce a data access time between the identified zones. The data access time between identified zones can refer to the time it takes to read or write data in an identified zone after reading or writing data in another identified zone.

In some cases, relocating data from at least one identified zone can include moving frequently accessed zones so that they are in close physical proximity to each other on a surface of a disk either radially by relocating the data to adjacent tracks or circumferentially by relocating the data to adjacent sectors or groups of sectors within a track. In other cases, data from at least one identified high access zone can be relocated to a different disk or a different disk surface in a disk pack so that the zones are in closer radial proximity to each other in the disk pack. In such an example, DSD106can then quickly switch from one head to another head in a head stack assembly to change between accessing high frequency zones on different disk surfaces with little or no movement of actuator130.

In some embodiments, the access count may be a random access count indicating a number of times data in a particular zone has been non-sequentially read or written. In contrast to sequential reads and writes, non-sequential or random reads and writes are typically isolated accesses of data from locations that are spread across the media. Sequential writes on the other hand include accesses of data from adjacent or nearly adjacent locations on the media. As a result, non-sequential reads and writes are generally more time consuming than sequential reads and writes since head136typically needs to reposition farther to complete a series of non-sequential reads or writes.

In other embodiments, the access count may indicate a number of times data in a particular zone has been sequentially read or written. Although the performance of a series of non-sequential reads or writes can be more time consuming, relocating zones that are frequently sequentially accessed can also improve a performance of DSD106in servicing read and write commands. In some embodiments, the access count can include both sequential and non-sequential reads and writes.

InFIG. 2, a threshold number of access counts has been set at 600 access counts as indicated by the dashed line. Zones208,210,212, and214may be identified as candidate zones for relocation with access counts greater than or equal to the threshold. In some embodiments, the threshold may be adjusted based on a data access time between zones with high access counts relative to other zones. For example, the threshold for zone208may be lowered to 400 based on the greater data access time or distance between zone208and the other frequently accessed zones when compared to shorter data access times or distances between zones210,212, and214.

FIG. 3depicts initial locations for zones208,210,212and214on disk150according to an embodiment. As shown inFIG. 3, zones208,210,212and214are initially spread out across disk150.

In addition,FIG. 3depicts first staging area224and second staging area226for copying or relocating data from an identified zone to a destination zone. The location of staging areas224and226may differ in other embodiments and do not need to be located adjacent to each other. In this regard, one or both of staging areas224and226in other embodiments may be located on a different disk or different media such as solid-state memory128or volatile memory140.

The area of disk150outside of dashed line222indicates an OD portion of disk150that is associated with a quicker data access rate than other portions of disk150. In some implementations, destination zones for relocating frequently accessed data may be located at or beyond dashed line222to allow for quicker access of frequently accessed data.

Although zones208,210,212and214inFIG. 3each include groups of tracks, the identified zones in other embodiments may only include a single track or a portion of a single track. In cases where identified zones include portions of a single track, data from the identified zones may be located adjacent to each other circumferentially by relocating data from the identified zones in close physical proximity to each other in the same track or in a radially adjacent track.

FIG. 4depicts the relocation of data from the zones ofFIG. 3according to an embodiment. As shown inFIG. 4, data from each of zones208,210, and212has been relocated to destination zones208′,210′, and212′, respectively. Zone214remains in its initial location. In other examples, data from a different number of identified zones may be relocated such that, for example, data from all of the identified zones (i.e., zones208,210,212,214) are relocated to destination zones or data from only half of the identified zones are relocated to destination zones.

In the example ofFIG. 4, the data of zones208,210,212has been relocated to destination zones208′,210′, and212′ using staging areas224and226to swap the data initially stored in a destination zone with the data initially stored in an identified zone. More specifically, data initially stored in a destination zone is copied to one of staging areas224or226to make room for data from an identified zone. The data initially stored in the identified zone is copied to the other staging area. The data initially stored in the destination zone can then be copied from its staging area to the initial location of the identified zone and the data initially stored in the identified zone can be copied from its staging area to the destination zone.

In other embodiments, the staging areas may not be located on disk150and may be located on a different disk in a disk pack or may be located in a different memory media such as solid-state memory128or volatile memory140.

FIG. 5is a flowchart for a zone relocation process that can be performed by controller120executing a firmware of DSD106or other computer-executable instructions according to an embodiment. In block502, controller120logically divides at least a portion of a media such as disk150into a plurality of zones. The logical division of the media can be made by dividing LBAs into ranges or blocks of LBAs. As part of the division in block502, controller120may first logically divide the media into a plurality of blocks with each block having a larger data capacity than the individual zones. Such large scale division followed by a finer subdivision of the blocks into zones can ordinarily allow for a more efficient use of resources (e.g., controller120and volatile memory140) by not having to evaluate access counts for each zone individually. Instead, the process ofFIG. 5may only evaluate the access counts for zones in blocks with higher access counts. An example of such a logical division into blocks, sub-blocks, and zones is conceptually illustrated inFIGS. 6A to 6C.

FIG. 6Adepicts blocks of zones with their respective access counts according to an embodiment. As shown inFIG. 6A, the media has been logically divided in terms of LBAs into four blocks A, B, C, and D. The blocks ofFIG. 6Amay represent a logical space for all of the media or for only a portion of the media. In addition, other embodiments may divide the media into a different number of blocks.

In the example ofFIG. 6A, blocks A and D are identified as having a high access count relative to other blocks. This may be accomplished by comparing the access counts for each of the blocks or by determining whether the access counts for the blocks have reached or exceeded a threshold number of access counts.

FIG. 6Bdepicts a subdivision of the identified blocks ofFIG. 6Aaccording to an embodiment. As shown inFIG. 6B, each of blocks A and D are further divided into sub-blocks A1to A4and D1to D4, respectively. Sub-blocks A2, A4, and D2are identified as having a high access count relative to the other sub-blocks. As with the identification of blocks inFIG. 6A, the identification of sub-blocks with a high access count may be accomplished by comparing the access counts for each of the sub-blocks or by determining whether the access counts for the sub-blocks have reached or exceeded a threshold number of access counts.

FIG. 6Cdepicts the identification of zones with access counts greater than or equal to a threshold according to an embodiment. As shown inFIG. 6C, each of the identified sub-blocks of A2, A4, and D2inFIG. 6Bhave been further subdivided into four zones. In addition, zones A2-1, A4-2, D2-1, and D2-4have been identified as zones with access counts greater than or equal to a threshold number of access counts. As described in more detail below, these identified zones serve as candidates for relocating data from the zones to destination zones.

In other embodiments, the number and size of blocks, sub-blocks and zones can differ from the example provided above withFIGS. 6A to 6Cbased on available resources such as a processing speed of controller120or an available data capacity of volatile memory140. Similarly, the number of iterations of subdividing can also differ so as to include more or less iterations of divisions. For example, other embodiments may only include a division of the media into blocks and zones without subdividing the blocks into sub-blocks. Other embodiments may include the subdivision of sub-blocks into smaller sub-blocks before subdividing the smaller sub-blocks into zones.

Returning to the relocation process ofFIG. 5, controller120in block504identifies zones with access counts greater than or equal to a threshold. This may be performed along the lines as discussed for the example ofFIG. 6Cdiscussed above. Controller120may also optionally adjust the threshold based on a data access time between zones with high access counts relative to other zones. This adjustment can compensate for factors such as the distance between frequently accessed zones being greater so as to allow such zones to reach the adjusted threshold quicker than if such zones were in closer physical proximity to each other.

In block506, data is relocated from at least one zone of the identified zones to at least one destination zone to reduce a data access time between the identified zones. As discussed above, this may include relocating data from an identified zone to a destination zone such that the data from the identified zones is in closer radial or circumferential proximity on a disk surface. The relocation of data in block506may also include relocating data from the identified zones so that the data is in closer radial proximity on different disk surfaces in a disk pack to reduce movement of actuator130when accessing data from the identified zones.

In block508, controller120updates a mapping by offsetting physical addresses for the relocated data. The mapping can include, for example, a portion of translation table22where the mapping indicates physical locations in terms of PBAs for data stored on the media.FIGS. 7A and 7Bdepict example portions of translation table22to illustrate one implementation for updating the mapping in block508ofFIG. 5.

FIG. 7Adepicts an initial logical to physical mapping for the identified zones ofFIG. 6C(i.e., zones A2-1, A4-2, D2-1, and D4-4) according to an embodiment. As shown inFIG. 7A, the LBAs for each of the identified zones are mapped to PBAs indicating a physical location on the media where data for the LBAs are stored. In the example ofFIG. 7A, there is not an exact one-to-one correspondence between LBAs and PBAs as shown by the slightly higher physical addressing for zones A4-2, D2-1, and D4-4as compared to the logical addressing for these zones. This difference can represent defects in the media such as defective sectors on disk150that have been mapped out or other reserved sectors that are not available for storing user data. Although the numerical ranges for LBAs inFIG. 7Agenerally correspond to approximately the same numerical ranges for PBAs for each zone, other embodiments may have PBA ranges that do not necessarily correspond to the ranges of LBAs.

FIG. 7Billustrates a logical to physical mapping for identified zones A2-1, A4-2, D2-1, and D4-4after the mapping has been updated to account for the relocation of data according to an embodiment. When compared toFIG. 7A, the LBAs for the identified zones remains the same while the PBAs for some of the identified zones has been offset to account for the relocation of data from the zones. In particular, the PBAs for zones A2-1, D2-1, and D4-4have been offset indicating that the data for these zones has been relocated.

After updating the mapping in block508, the process ofFIG. 5ends. Controller120may repeat the process ofFIG. 5or portions of the process ofFIG. 5after a predetermined amount of time and/or after a predetermined a number of reads or writes on the media. In one embodiment, controller120may periodically check to determine if any zones should be relocated by performing block504. If it is determined that a data access time can be reduced by relocating data from at least one identified zone, controller may proceed with performing blocks506and508to relocate the data. By periodically identifying zones with access counts greater than or equal to a threshold and relocating data, it is ordinarily possible to adapt to changing data access patterns and reduce an average or overall data access time for DSD106.

Those of ordinary skill in the art will appreciate that the various illustrative logical blocks, modules, and processes described in connection with the examples disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. Furthermore, the foregoing processes can be embodied on a computer readable medium which causes a processor or computer to perform or execute certain functions.

To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, and modules have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Those of ordinary skill in the art may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.

The activities of a method or process described in connection with the examples disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The steps of the method or algorithm may also be performed in an alternate order from those provided in the examples. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable media, an optical media, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuit (ASIC).

The foregoing description of the disclosed example embodiments is provided to enable any person of ordinary skill in the art to make or use the embodiments in the present disclosure. Various modifications to these examples will be readily apparent to those of ordinary skill in the art, and the principles disclosed herein may be applied to other examples without departing from the spirit or scope of the present disclosure. The described embodiments are to be considered in all respects only as illustrative and not restrictive and the scope of the disclosure is, therefore, indicated by the following claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.